diff --git a/README.md b/README.md index cdd60a57..3c6f86f0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ https://cdn.rawgit.com/download/polymer-cdn/2.0.2/lib/my-cool-element/my-cool-el To be sure, browse this repo and copy-paste the url to the raw version into [RawGit](https://rawgit.com). ## Try a pen -Try hacking on this [Codepen](http://codepen.io/StijnDeWitt/pen/EyPyyL). +Try hacking on this [Codepen](https://codepen.io/ltomes/pen/opvJMG). ## Versioning As this repo groups a whole set of components, versioning is tricky. For now I've decided to @@ -64,393 +64,383 @@ These dependencies are themselves also listed at the top-level, so you can work tree for a library by carefully examining this diagram. ```sh -polymer-cdn#2.0.2 -├─┬ app-layout#2.0.1 -│ ├─┬ iron-flex-layout#2.0.0 -│ │ └─┬ polymer#2.0.2 -│ │ ├── shadycss#1.0.3 -│ │ └── webcomponentsjs#1.0.5 +polymer-cdn#2.3.1 +├─┬ app-layout#2.0.4 +│ ├─┬ iron-flex-layout#2.0.1 +│ │ └─┬ polymer#2.3.1 +│ │ ├── shadycss#1.1.0 +│ │ └── webcomponentsjs#1.0.20 │ ├─┬ iron-media-query#2.0.0 -│ │ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 │ ├─┬ iron-resizable-behavior#2.0.1 -│ │ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 │ ├─┬ iron-scroll-target-behavior#2.0.0 -│ │ └── polymer#2.0.2 -│ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 +│ └── polymer#2.3.1 ├─┬ app-localize-behavior#2.0.0 -│ ├── intl-messageformat#1.3.0 (latest is 2.0.0) -│ ├─┬ iron-ajax#2.0.4 -│ │ └── polymer#2.0.2 -│ └── polymer#2.0.2 +│ ├── intl-messageformat#1.3.0 (latest is 2.2.0) +│ ├─┬ iron-ajax#2.0.6 +│ │ └── polymer#2.3.1 +│ └── polymer#2.3.1 ├─┬ app-pouchdb#2.1.1 │ ├─┬ app-storage#2.0.2 -│ │ └── polymer#2.0.2 -│ ├── polymer#2.0.2 +│ │ └── polymer#2.3.1 +│ ├── polymer#2.3.1 │ ├── pouchdb#6.3.4 │ └── pouchdb-find#0.10.5 -├─┬ app-route#2.0.1 -│ ├─┬ iron-location#2.0.1 -│ │ └── polymer#2.0.2 -│ └── polymer#2.0.2 +├─┬ app-route#2.0.3 +│ ├─┬ iron-location#2.0.2 +│ │ └── polymer#2.3.1 +│ └── polymer#2.3.1 ├── app-storage#2.0.2 -├─┬ gold-zip-input#1.0.6 -│ ├─┬ iron-form-element-behavior#2.0.0 incompatible with ^1.0.0 (1.0.7 available, latest is 2.0.0) -│ │ └── polymer#2.0.2 -│ ├─┬ iron-icon#2.0.1 incompatible with ^1.0.0 (1.0.13 available, latest is 2.0.1) -│ │ ├── iron-flex-layout#2.0.0 -│ │ ├── iron-meta#2.0.2 -│ │ └── polymer#2.0.2 -│ ├─┬ iron-validator-behavior#2.0.0 incompatible with ^1.0.0 (1.0.2 available, latest is 2.0.0) -│ │ ├─┬ iron-meta#2.0.2 -│ │ │ └── polymer#2.0.2 -│ │ └── polymer#2.0.2 -│ ├─┬ paper-input#2.0.1 incompatible with ^1.0.0 (1.1.24 available, latest is 2.0.1) +├─┬ gold-zip-input#2.0.0 +│ ├─┬ iron-form-element-behavior#2.0.0 +│ │ └── polymer#2.3.1 +│ ├─┬ iron-icon#2.0.1 +│ │ ├── iron-flex-layout#2.0.1 +│ │ ├─┬ iron-meta#2.0.3 +│ │ │ └── polymer#2.3.1 +│ │ └── polymer#2.3.1 +│ ├─┬ iron-validator-behavior#2.0.0 +│ │ ├── iron-meta#2.0.3 +│ │ └── polymer#2.3.1 +│ ├─┬ paper-input#2.0.5 │ │ ├── iron-a11y-keys-behavior#2.0.1 │ │ ├─┬ iron-autogrow-textarea#2.1.0 │ │ │ ├─┬ iron-behaviors#2.0.0 │ │ │ │ ├─┬ iron-a11y-keys-behavior#2.0.1 -│ │ │ │ │ └── polymer#2.0.2 -│ │ │ │ └── polymer#2.0.2 -│ │ │ ├── iron-flex-layout#2.0.0 +│ │ │ │ │ └── polymer#2.3.1 +│ │ │ │ └── polymer#2.3.1 +│ │ │ ├── iron-flex-layout#2.0.1 │ │ │ ├─┬ iron-validatable-behavior#2.0.0 -│ │ │ │ ├── iron-meta#2.0.2 -│ │ │ │ └── polymer#2.0.2 -│ │ │ └── polymer#2.0.2 +│ │ │ │ ├── iron-meta#2.0.3 +│ │ │ │ └── polymer#2.3.1 +│ │ │ └── polymer#2.3.1 │ │ ├── iron-behaviors#2.0.0 │ │ ├── iron-form-element-behavior#2.0.0 -│ │ ├─┬ iron-input#2.0.0 +│ │ ├─┬ iron-input#2.0.1 │ │ │ ├─┬ iron-a11y-announcer#2.0.0 -│ │ │ │ └── polymer#2.0.2 +│ │ │ │ └── polymer#2.3.1 │ │ │ ├── iron-validatable-behavior#2.0.0 -│ │ │ └── polymer#2.0.2 +│ │ │ └── polymer#2.3.1 │ │ ├─┬ paper-styles#2.0.0 -│ │ │ ├── font-roboto#1.0.2 -│ │ │ ├── iron-flex-layout#2.0.0 -│ │ │ └── polymer#2.0.2 -│ │ └── polymer#2.0.2 -│ ├── paper-styles#2.0.0 incompatible with ^1.0.0 (1.3.1 available, latest is 2.0.0) -│ └── polymer#2.0.2 incompatible with ^1.1.0 (1.9.3 available, latest is 2.0.2) +│ │ │ ├── font-roboto#1.0.3 +│ │ │ ├── iron-flex-layout#2.0.1 +│ │ │ └── polymer#2.3.1 +│ │ └── polymer#2.3.1 +│ ├── paper-styles#2.0.0 +│ └── polymer#2.3.1 ├── iron-a11y-announcer#2.0.0 ├─┬ iron-a11y-keys#2.0.0 │ ├── iron-a11y-keys-behavior#2.0.1 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── iron-a11y-keys-behavior#2.0.1 -├── iron-ajax#2.0.4 +├── iron-ajax#2.0.6 ├── iron-autogrow-textarea#2.1.0 ├── iron-behaviors#2.0.0 ├─┬ iron-checked-element-behavior#2.0.0 │ ├── iron-form-element-behavior#2.0.0 │ ├── iron-validatable-behavior#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ iron-collapse#2.0.0 │ ├── iron-resizable-behavior#2.0.1 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ iron-component-page#3.0.1 -│ ├── app-layout#2.0.1 -│ ├── iron-ajax#2.0.4 -│ ├─┬ iron-doc-viewer#3.0.3 -│ │ ├── iron-location#2.0.1 -│ │ ├─┬ marked-element#2.2.0 -│ │ │ ├── marked#0.3.6 -│ │ │ └── polymer#2.0.2 +│ ├── app-layout#2.0.4 +│ ├── iron-ajax#2.0.6 +│ ├─┬ iron-doc-viewer#3.0.4 +│ │ ├── iron-location#2.0.2 +│ │ ├─┬ marked-element#2.3.2 +│ │ │ ├── marked#0.3.7 +│ │ │ └── polymer#2.3.1 │ │ ├── paper-styles#2.0.0 -│ │ ├── polymer#2.0.2 +│ │ ├── polymer#2.3.1 │ │ └─┬ prism-element#2.0.1 -│ │ ├── polymer#2.0.2 -│ │ └── prism#1.6.0 +│ │ ├── polymer#2.3.1 +│ │ └── prism#1.9.0 │ ├─┬ iron-icons#2.0.1 │ │ ├── iron-icon#2.0.1 -│ │ ├─┬ iron-iconset-svg#2.0.1 -│ │ │ ├── iron-meta#2.0.2 -│ │ │ └── polymer#2.0.2 -│ │ └── polymer#2.0.2 -│ ├─┬ paper-icon-button#2.0.0 +│ │ ├─┬ iron-iconset-svg#2.1.0 +│ │ │ ├── iron-meta#2.0.3 +│ │ │ └── polymer#2.3.1 +│ │ └── polymer#2.3.1 +│ ├─┬ paper-icon-button#2.0.1 │ │ ├── iron-icon#2.0.1 -│ │ ├─┬ paper-behaviors#2.0.0 +│ │ ├─┬ paper-behaviors#2.0.1 │ │ │ ├── iron-behaviors#2.0.0 │ │ │ ├── iron-checked-element-behavior#2.0.0 │ │ │ ├─┬ paper-ripple#2.0.1 │ │ │ │ ├── iron-a11y-keys-behavior#2.0.1 -│ │ │ │ └── polymer#2.0.2 -│ │ │ └── polymer#2.0.2 +│ │ │ │ └── polymer#2.3.1 +│ │ │ └── polymer#2.3.1 │ │ ├── paper-styles#2.0.0 -│ │ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 │ ├── paper-styles#2.0.0 │ ├─┬ paper-toast#2.0.0 │ │ ├── iron-a11y-announcer#2.0.0 -│ │ ├── iron-fit-behavior#2.0.1 -│ │ ├─┬ iron-overlay-behavior#2.0.0 +│ │ ├── iron-fit-behavior#2.1.0 +│ │ ├─┬ iron-overlay-behavior#2.2.0 │ │ │ ├── iron-a11y-keys-behavior#2.0.1 -│ │ │ ├─┬ iron-fit-behavior#2.0.1 -│ │ │ │ └── polymer#2.0.2 +│ │ │ ├─┬ iron-fit-behavior#2.1.0 +│ │ │ │ └── polymer#2.3.1 │ │ │ ├── iron-resizable-behavior#2.0.1 -│ │ │ └── polymer#2.0.2 -│ │ └── polymer#2.0.2 -│ └── polymer#2.0.2 +│ │ │ └── polymer#2.3.1 +│ │ └── polymer#2.3.1 +│ └── polymer#2.3.1 ├─┬ iron-demo-helpers#2.0.0 -│ ├── font-roboto#1.0.2 -│ ├── iron-flex-layout#2.0.0 -│ ├── iron-location#2.0.1 -│ ├── marked-element#2.2.0 -│ ├── polymer#2.0.2 +│ ├── font-roboto#1.0.3 +│ ├── iron-flex-layout#2.0.1 +│ ├── iron-location#2.0.2 +│ ├── marked-element#2.3.2 +│ ├── polymer#2.3.1 │ └── prism-element#2.0.1 -├─┬ iron-doc-viewer#3.0.3 -│ ├── iron-location#2.0.1 -│ ├─┬ marked-element#2.2.0 -│ │ ├── marked#0.3.6 -│ │ └── polymer#2.0.2 -│ ├── paper-styles#2.0.0 -│ ├── polymer#2.0.2 -│ └─┬ prism-element#2.0.1 -│ ├── polymer#2.0.2 -│ └── prism#1.6.0 -├─┬ iron-dropdown#2.0.0 +├── iron-doc-viewer#3.0.4 +├─┬ iron-dropdown#2.1.0 │ ├── iron-behaviors#2.0.0 -│ ├── iron-overlay-behavior#2.0.0 -│ ├─┬ neon-animation#2.0.1 -│ │ ├── iron-meta#2.0.2 +│ ├── iron-overlay-behavior#2.2.0 +│ ├─┬ neon-animation#2.0.2 │ │ ├── iron-resizable-behavior#2.0.1 -│ │ ├─┬ iron-selector#2.0.0 -│ │ │ └── polymer#2.0.2 -│ │ └── polymer#2.0.2 -│ └── polymer#2.0.2 -├── iron-fit-behavior#2.0.1 -├── iron-flex-layout#2.0.0 +│ │ ├─┬ iron-selector#2.0.1 +│ │ │ └── polymer#2.3.1 +│ │ └── polymer#2.3.1 +│ └── polymer#2.3.1 +├── iron-fit-behavior#2.1.0 +├── iron-flex-layout#2.0.1 ├── iron-form-element-behavior#2.0.0 ├── iron-icon#2.0.1 ├── iron-icons#2.0.1 ├─┬ iron-iconset#2.0.0 -│ ├── iron-meta#2.0.2 -│ └── polymer#2.0.2 -├── iron-iconset-svg#2.0.1 +│ ├── iron-meta#2.0.3 +│ └── polymer#2.3.1 +├── iron-iconset-svg#2.1.0 ├─┬ iron-image#2.1.2 -│ └── polymer#2.0.2 -├── iron-input#2.0.0 +│ └── polymer#2.3.1 +├── iron-input#2.0.1 ├─┬ iron-jsonp-library#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ iron-label#2.0.0 -│ └── polymer#2.0.2 -├─┬ iron-list#2.0.8 +│ └── polymer#2.3.1 +├─┬ iron-list#2.0.12 │ ├── iron-a11y-keys-behavior#2.0.1 │ ├── iron-resizable-behavior#2.0.1 │ ├── iron-scroll-target-behavior#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ iron-localstorage#2.0.0 -│ └── polymer#2.0.2 -├── iron-location#2.0.1 +│ └── polymer#2.3.1 +├── iron-location#2.0.2 ├── iron-media-query#2.0.0 ├─┬ iron-menu-behavior#2.0.1 │ ├── iron-a11y-keys-behavior#2.0.1 -│ ├── iron-flex-layout#2.0.0 -│ ├── iron-selector#2.0.0 -│ └── polymer#2.0.2 -├── iron-meta#2.0.2 -├── iron-overlay-behavior#2.0.0 -├─┬ iron-pages#2.0.0 +│ ├── iron-flex-layout#2.0.1 +│ ├── iron-selector#2.0.1 +│ └── polymer#2.3.1 +├── iron-meta#2.0.3 +├── iron-overlay-behavior#2.2.0 +├─┬ iron-pages#2.0.1 │ ├── iron-resizable-behavior#2.0.1 -│ ├── iron-selector#2.0.0 -│ └── polymer#2.0.2 +│ ├── iron-selector#2.0.1 +│ └── polymer#2.3.1 ├─┬ iron-range-behavior#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── iron-resizable-behavior#2.0.1 ├── iron-scroll-target-behavior#2.0.0 ├─┬ iron-scroll-threshold#2.0.0 │ ├── iron-scroll-target-behavior#2.0.0 -│ └── polymer#2.0.2 -├── iron-selector#2.0.0 +│ └── polymer#2.3.1 +├── iron-selector#2.0.1 ├─┬ iron-test-helpers#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── iron-validatable-behavior#2.0.0 ├── iron-validator-behavior#2.0.0 -├── marked-element#2.2.0 -├── neon-animation#2.0.1 +├── marked-element#2.3.2 +├── neon-animation#2.0.2 ├─┬ note-app-elements#2.1.2 │ ├── app-storage#2.0.2 -│ ├── font-roboto#1.0.2 +│ ├── font-roboto#1.0.3 │ ├── iron-autogrow-textarea#2.1.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── iron-icon#2.0.1 │ ├── iron-icons#2.0.1 -│ ├── iron-input#2.0.0 +│ ├── iron-input#2.0.1 │ ├─┬ paper-button#2.0.0 -│ │ ├── iron-flex-layout#2.0.0 -│ │ ├── paper-behaviors#2.0.0 +│ │ ├── iron-flex-layout#2.0.1 +│ │ ├── paper-behaviors#2.0.1 │ │ ├── paper-styles#2.0.0 -│ │ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 │ ├─┬ paper-fab#2.0.0 -│ │ ├── iron-flex-layout#2.0.0 +│ │ ├── iron-flex-layout#2.0.1 │ │ ├── iron-icon#2.0.1 -│ │ ├── paper-behaviors#2.0.0 +│ │ ├── paper-behaviors#2.0.1 │ │ ├── paper-styles#2.0.0 -│ │ └── polymer#2.0.2 -│ ├── paper-icon-button#2.0.0 +│ │ └── polymer#2.3.1 +│ ├── paper-icon-button#2.0.1 │ ├── paper-styles#2.0.0 -│ ├── polymer#2.0.2 +│ ├── polymer#2.3.1 │ └── web-animations-js#2.3.1 ├─┬ paper-badge#2.0.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── iron-icon#2.0.1 │ ├── iron-resizable-behavior#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 -├── paper-behaviors#2.0.0 +│ └── polymer#2.3.1 +├── paper-behaviors#2.0.1 ├── paper-button#2.0.0 ├─┬ paper-card#2.0.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── iron-image#2.1.2 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-checkbox#2.0.1 │ ├── iron-a11y-keys-behavior#2.0.1 │ ├── iron-checked-element-behavior#2.0.0 -│ ├── paper-behaviors#2.0.0 +│ ├── paper-behaviors#2.0.1 │ ├── paper-ripple#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-dialog#2.0.0 -│ ├── iron-overlay-behavior#2.0.0 -│ ├── neon-animation#2.0.1 +│ ├── iron-overlay-behavior#2.2.0 +│ ├── neon-animation#2.0.2 │ ├─┬ paper-dialog-behavior#2.0.1 -│ │ ├── iron-overlay-behavior#2.0.0 +│ │ ├── iron-overlay-behavior#2.2.0 │ │ ├── paper-styles#2.0.0 -│ │ └── polymer#2.0.2 -│ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 +│ └── polymer#2.3.1 ├── paper-dialog-behavior#2.0.1 ├─┬ paper-dialog-scrollable#2.1.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── paper-dialog-behavior#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-drawer-panel#2.0.0 │ ├── iron-media-query#2.0.0 │ ├── iron-resizable-behavior#2.0.1 -│ ├── iron-selector#2.0.0 -│ └── polymer#2.0.2 +│ ├── iron-selector#2.0.1 +│ └── polymer#2.3.1 ├─┬ paper-dropdown-menu#2.0.0 │ ├── iron-a11y-keys-behavior#2.0.1 │ ├── iron-form-element-behavior#2.0.0 │ ├── iron-icon#2.0.1 -│ ├── iron-iconset-svg#2.0.1 +│ ├── iron-iconset-svg#2.1.0 │ ├── iron-validatable-behavior#2.0.0 -│ ├── paper-behaviors#2.0.0 -│ ├── paper-input#2.0.1 +│ ├── paper-behaviors#2.0.1 +│ ├── paper-input#2.0.5 │ ├─┬ paper-menu-button#2.0.0 │ │ ├── iron-a11y-keys-behavior#2.0.1 │ │ ├── iron-behaviors#2.0.0 -│ │ ├── iron-dropdown#2.0.0 -│ │ ├── iron-fit-behavior#2.0.1 -│ │ ├── neon-animation#2.0.1 +│ │ ├── iron-dropdown#2.1.0 +│ │ ├── iron-fit-behavior#2.1.0 +│ │ ├── neon-animation#2.0.2 │ │ ├── paper-styles#2.0.0 -│ │ └── polymer#2.0.2 +│ │ └── polymer#2.3.1 │ ├── paper-ripple#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── paper-fab#2.0.0 ├─┬ paper-header-panel#2.0.0 -│ ├── iron-flex-layout#2.0.0 -│ └── polymer#2.0.2 -├── paper-icon-button#2.0.0 -├── paper-input#2.0.1 +│ ├── iron-flex-layout#2.0.1 +│ └── polymer#2.3.1 +├── paper-icon-button#2.0.1 +├── paper-input#2.0.5 ├─┬ paper-item#2.0.0 │ ├── iron-behaviors#2.0.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-listbox#2.0.0 │ ├── iron-behaviors#2.0.0 │ ├── iron-menu-behavior#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-material#2.0.0 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── paper-menu-button#2.0.0 ├─┬ paper-progress#2.0.1 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── iron-range-behavior#2.0.0 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-radio-button#2.0.0 │ ├── iron-checked-element-behavior#2.0.0 -│ ├── iron-flex-layout#2.0.0 -│ ├── paper-behaviors#2.0.0 +│ ├── iron-flex-layout#2.0.1 +│ ├── paper-behaviors#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-radio-group#2.0.0 │ ├── iron-a11y-keys-behavior#2.0.1 │ ├── iron-menu-behavior#2.0.1 │ ├── paper-radio-button#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── paper-ripple#2.0.1 ├─┬ paper-scroll-header-panel#2.0.0 │ ├── iron-resizable-behavior#2.0.1 -│ └── polymer#2.0.2 -├─┬ paper-slider#2.0.2 +│ └── polymer#2.3.1 +├─┬ paper-slider#2.0.4 │ ├── iron-a11y-keys-behavior#2.0.1 │ ├── iron-behaviors#2.0.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── iron-form-element-behavior#2.0.0 -│ ├── paper-behaviors#2.0.0 -│ ├── paper-input#2.0.1 +│ ├── paper-behaviors#2.0.1 +│ ├── paper-input#2.0.5 │ ├── paper-progress#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-spinner#2.0.0 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── paper-styles#2.0.0 ├─┬ paper-swatch-picker#2.0.1 -│ ├── iron-flex-layout#2.0.0 -│ ├── iron-iconset-svg#2.0.1 -│ ├── paper-icon-button#2.0.0 +│ ├── iron-flex-layout#2.0.1 +│ ├── iron-iconset-svg#2.1.0 +│ ├── paper-icon-button#2.0.1 │ ├── paper-item#2.0.0 │ ├── paper-listbox#2.0.0 │ ├── paper-menu-button#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-tabs#2.0.0 │ ├── iron-behaviors#2.0.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── iron-icon#2.0.1 -│ ├── iron-iconset-svg#2.0.1 +│ ├── iron-iconset-svg#2.1.0 │ ├── iron-menu-behavior#2.0.1 │ ├── iron-resizable-behavior#2.0.1 -│ ├── paper-behaviors#2.0.0 -│ ├── paper-icon-button#2.0.0 +│ ├── paper-behaviors#2.0.1 +│ ├── paper-icon-button#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├── paper-toast#2.0.0 ├─┬ paper-toggle-button#2.0.0 │ ├── iron-checked-element-behavior#2.0.0 -│ ├── paper-behaviors#2.0.0 +│ ├── paper-behaviors#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 +│ └── polymer#2.3.1 ├─┬ paper-toolbar#2.0.0 -│ ├── iron-flex-layout#2.0.0 +│ ├── iron-flex-layout#2.0.1 │ ├── paper-styles#2.0.0 -│ └── polymer#2.0.2 -├─┬ paper-tooltip#2.0.0 -│ ├── neon-animation#2.0.1 +│ └── polymer#2.3.1 +├─┬ paper-tooltip#2.0.1 +│ ├── neon-animation#2.0.2 │ ├── paper-styles#2.0.0 -│ ├── polymer#2.0.2 +│ ├── polymer#2.3.1 │ └── web-animations-js#2.3.1 ├─┬ platinum-sw#2.0.0 -│ ├── polymer#2.0.2 +│ ├── polymer#2.3.1 │ └── sw-toolbox#3.6.1 -├── polymer#2.0.2 -├─┬ polymerfire#2.1.0 +├── polymer#2.3.1 +├─┬ polymerfire#2.2.1 │ ├── app-storage#2.0.2 -│ ├── firebase#4.2.0 -│ └── polymer#2.0.2 +│ ├── firebase#4.6.1 +│ └── polymer#2.3.1 ├── prism-element#2.0.1 -├─┬ web-component-tester#6.0.0 +├─┬ web-component-tester#6.4.1 │ ├── accessibility-developer-tools#2.12.0 -│ ├── async#1.5.2 (latest is 2.5.0) -│ ├── chai#3.5.0 (latest is 4.1.0) +│ ├── async#1.5.2 (latest is 2.6.0) +│ ├── chai#3.5.0 (latest is 4.1.2) │ ├── lodash#3.10.1 (3.11.0-npm-packages available, latest is 4.17.4) -│ ├── mocha#3.5.0 -│ ├── sinon-chai#2.12.0 +│ ├── mocha#3.5.3 (latest is 4.0.1) +│ ├── sinon-chai#2.14.0 │ ├── sinonjs#1.17.1 │ ├── stacky#1.3.2 -│ └── test-fixture#3.0.0-rc.1 -└── webcomponentsjs#1.0.5 +│ └── test-fixture#3.0.0 +└── webcomponentsjs#1.0.20 ``` diff --git a/bower.json b/bower.json index d0db9213..256810b3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "polymer-cdn", - "version": "2.0.2", + "version": "2.3.1", "main": "polymer.js", "homepage": "https://github.com/Download/polymer-cdn", "authors": [ @@ -21,108 +21,91 @@ "tests" ], "dependencies": { - "app-layout": "PolymerElements/app-layout#^2.0.0", + "app-layout": "PolymerElements/app-layout#^2.0.4", "app-localize-behavior": "PolymerElements/app-localize-behavior#^2.0.0", - "app-pouchdb": "PolymerElements/app-pouchdb#^2.0.0", - "app-route": "PolymerElements/app-route#^2.0.0", - "app-storage": "PolymerElements/app-storage#^2.0.0", - "gold-zip-input": "PolymerElements/gold-zip-input#^1.0.0", + "app-pouchdb": "PolymerElements/app-pouchdb#^2.1.1", + "app-route": "PolymerElements/app-route#^2.0.3", + "app-storage": "PolymerElements/app-storage#^2.0.2", + "gold-zip-input": "PolymerElements/gold-zip-input#^2.0.0", "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^2.0.0", "iron-a11y-keys": "PolymerElements/iron-a11y-keys#^2.0.0", - "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^2.0.0", - "iron-ajax": "PolymerElements/iron-ajax#^2.0.0", - "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^2.0.0", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^2.0.1", + "iron-ajax": "PolymerElements/iron-ajax#^2.0.6", + "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^2.1.0", "iron-behaviors": "PolymerElements/iron-behaviors#^2.0.0", "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^2.0.0", "iron-collapse": "PolymerElements/iron-collapse#^2.0.0", - "iron-component-page": "PolymerElements/iron-component-page#^3.0.0", + "iron-component-page": "PolymerElements/iron-component-page#^3.0.1", "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0", - "iron-doc-viewer": "PolymerElements/iron-doc-viewer#^3.0.0", - "iron-dropdown": "PolymerElements/iron-dropdown#^2.0.0", - "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^2.0.0", - "iron-flex-layout": "PolymerElements/iron-flex-layout#^2.0.0", + "iron-doc-viewer": "PolymerElements/iron-doc-viewer#^3.0.4", + "iron-dropdown": "PolymerElements/iron-dropdown#^2.1.0", + "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^2.0.1", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^2.0.1", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^2.0.0", - "iron-icon": "PolymerElements/iron-icon#^2.0.0", - "iron-icons": "PolymerElements/iron-icons#^2.0.0", + "iron-icon": "PolymerElements/iron-icon#^2.0.1", + "iron-icons": "PolymerElements/iron-icons#^2.0.1", "iron-iconset": "PolymerElements/iron-iconset#^2.0.0", - "iron-iconset-svg": "PolymerElements/iron-iconset-svg#^2.0.0", - "iron-image": "PolymerElements/iron-image#^2.0.0", - "iron-input": "PolymerElements/iron-input#^2.0.0", + "iron-iconset-svg": "PolymerElements/iron-iconset-svg#^2.1.0", + "iron-image": "PolymerElements/iron-image#^2.1.2", + "iron-input": "PolymerElements/iron-input#^2.0.1", "iron-jsonp-library": "PolymerElements/iron-jsonp-library#^2.0.0", "iron-label": "PolymerElements/iron-label#^2.0.0", - "iron-list": "PolymerElements/iron-list#^2.0.0", + "iron-list": "PolymerElements/iron-list#^2.0.12", "iron-localstorage": "PolymerElements/iron-localstorage#^2.0.0", - "iron-location": "PolymerElements/iron-location#^2.0.0", + "iron-location": "PolymerElements/iron-location#^2.0.2", "iron-media-query": "PolymerElements/iron-media-query#^2.0.0", - "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^2.0.0", - "iron-meta": "PolymerElements/iron-meta#^2.0.0", - "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.0.0", - "iron-pages": "PolymerElements/iron-pages#^2.0.0", + "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^2.0.1", + "iron-meta": "PolymerElements/iron-meta#^2.0.3", + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.2.0", + "iron-pages": "PolymerElements/iron-pages#^2.0.1", "iron-range-behavior": "PolymerElements/iron-range-behavior#^2.0.0", - "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^2.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^2.0.1", "iron-scroll-target-behavior": "PolymerElements/iron-scroll-target-behavior#^2.0.0", "iron-scroll-threshold": "PolymerElements/iron-scroll-threshold#^2.0.0", - "iron-selector": "PolymerElements/iron-selector#^2.0.0", + "iron-selector": "PolymerElements/iron-selector#^2.0.1", "iron-test-helpers": "PolymerElements/iron-test-helpers#^2.0.0", "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^2.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^2.0.0", - "marked-element": "PolymerElements/marked-element#^2.0.0", - "neon-animation": "PolymerElements/neon-animation#^2.0.0", - "note-app-elements": "PolymerLabs/note-app-elements#^2.0.0", + "marked-element": "PolymerElements/marked-element#^2.3.2", + "neon-animation": "PolymerElements/neon-animation#^2.0.2", + "note-app-elements": "PolymerLabs/note-app-elements#^2.1.2", "paper-badge": "PolymerElements/paper-badge#^2.0.0", - "paper-behaviors": "PolymerElements/paper-behaviors#^2.0.0", + "paper-behaviors": "PolymerElements/paper-behaviors#^2.0.1", "paper-button": "PolymerElements/paper-button#^2.0.0", "paper-card": "PolymerElements/paper-card#^2.0.0", - "paper-checkbox": "PolymerElements/paper-checkbox#^2.0.0", + "paper-checkbox": "PolymerElements/paper-checkbox#^2.0.1", "paper-dialog": "PolymerElements/paper-dialog#^2.0.0", - "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^2.0.0", - "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^2.0.0", + "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^2.0.1", + "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^2.1.0", "paper-drawer-panel": "PolymerElements/paper-drawer-panel#^2.0.0", "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^2.0.0", "paper-fab": "PolymerElements/paper-fab#^2.0.0", "paper-header-panel": "PolymerElements/paper-header-panel#^2.0.0", - "paper-icon-button": "PolymerElements/paper-icon-button#^2.0.0", - "paper-input": "PolymerElements/paper-input#^2.0.0", + "paper-icon-button": "PolymerElements/paper-icon-button#^2.0.1", + "paper-input": "PolymerElements/paper-input#^2.0.5", "paper-item": "PolymerElements/paper-item#^2.0.0", "paper-listbox": "PolymerElements/paper-listbox#^2.0.0", "paper-material": "PolymerElements/paper-material#^2.0.0", "paper-menu-button": "PolymerElements/paper-menu-button#^2.0.0", - "paper-progress": "PolymerElements/paper-progress#^2.0.0", + "paper-progress": "PolymerElements/paper-progress#^2.0.1", "paper-radio-button": "PolymerElements/paper-radio-button#^2.0.0", "paper-radio-group": "PolymerElements/paper-radio-group#^2.0.0", - "paper-ripple": "PolymerElements/paper-ripple#^2.0.0", + "paper-ripple": "PolymerElements/paper-ripple#^2.0.1", "paper-scroll-header-panel": "PolymerElements/paper-scroll-header-panel#^2.0.0", - "paper-slider": "PolymerElements/paper-slider#^2.0.0", + "paper-slider": "PolymerElements/paper-slider#^2.0.4", "paper-spinner": "PolymerElements/paper-spinner#^2.0.0", "paper-styles": "PolymerElements/paper-styles#^2.0.0", - "paper-swatch-picker": "PolymerElements/paper-swatch-picker#^2.0.0", + "paper-swatch-picker": "PolymerElements/paper-swatch-picker#^2.0.1", "paper-tabs": "PolymerElements/paper-tabs#^2.0.0", "paper-toast": "PolymerElements/paper-toast#^2.0.0", "paper-toggle-button": "PolymerElements/paper-toggle-button#^2.0.0", "paper-toolbar": "PolymerElements/paper-toolbar#^2.0.0", - "paper-tooltip": "PolymerElements/paper-tooltip#^2.0.0", + "paper-tooltip": "PolymerElements/paper-tooltip#^2.0.1", "platinum-sw": "PolymerElements/platinum-sw#^2.0.0", - "polymer": "Polymer/polymer#^2.0.0", - "polymerfire": "firebase/polymerfire#^2.0.0", - "prism-element": "PolymerElements/prism-element#^2.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0", - "web-component-tester": "^6.0.0" - }, - "resolutions": { - "webcomponentsjs": "^v1.0.2", - "iron-a11y-announcer": "^2.0.0", - "iron-a11y-keys-behavior": "^2.0.0", - "iron-autogrow-textarea": "^2.0.0", - "iron-behaviors": "^2.0.0", - "iron-form-element-behavior": "^2.0.0", - "iron-flex-layout": "^2.0.0", - "iron-icon": "^2.0.0", - "iron-input": "^2.0.0", - "iron-meta": "^2.0.0", - "iron-validatable-behavior": "^2.0.0", - "iron-validator-behavior": "^2.0.0", - "paper-input": "^2.0.0", - "paper-styles": "^2.0.0", - "polymer": "^2.0.0" + "polymer": "Polymer/polymer#^2.2.0", + "polymerfire": "firebase/polymerfire#^2.2.1", + "prism-element": "PolymerElements/prism-element#^2.0.1", + "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.20", + "web-component-tester": "^6.4.1" } } diff --git a/lib/app-layout/.bower.json b/lib/app-layout/.bower.json index 95816489..b2d0887c 100644 --- a/lib/app-layout/.bower.json +++ b/lib/app-layout/.bower.json @@ -1,6 +1,6 @@ { "name": "app-layout", - "version": "2.0.1", + "version": "2.0.4", "description": "A set of layout elements for your app", "authors": [ "The Polymer Authors" @@ -50,7 +50,7 @@ }, "devDependencies": { "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "^4.0.0", + "web-component-tester": "^6.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "resolutions": { @@ -65,13 +65,13 @@ "resolutions": { "webcomponentsjs": "^1.0.0" }, - "_release": "2.0.1", + "_release": "2.0.4", "_resolution": { "type": "version", - "tag": "v2.0.1", - "commit": "63b5453e260d4fbe19513d02ca8a34a0555394dd" + "tag": "v2.0.4", + "commit": "623997a76bea695a51de0d4e96e11a8198e367da" }, "_source": "https://github.com/PolymerElements/app-layout.git", - "_target": "^2.0.0", + "_target": "^2.0.4", "_originalSource": "PolymerElements/app-layout" } \ No newline at end of file diff --git a/lib/app-layout/CONTRIBUTING.md b/lib/app-layout/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/app-layout/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/app-layout/README.md b/lib/app-layout/README.md index 505c0de1..cd07604e 100644 --- a/lib/app-layout/README.md +++ b/lib/app-layout/README.md @@ -218,7 +218,7 @@ Here are some web apps built with App Layout: ``` -- In `app-drawer-layout`, the `drawer-toggle` element will not be automatically hidden +- In `app-drawer-layout`, the `drawer-toggle` element needs to be manually hidden when `app-drawer-layout` is not in narrow layout. To add this, add the following CSS rule where `app-drawer-layout` is used: diff --git a/lib/app-layout/app-box/demo/index.html b/lib/app-layout/app-box/demo/index.html new file mode 100644 index 00000000..991839bc --- /dev/null +++ b/lib/app-layout/app-box/demo/index.html @@ -0,0 +1,40 @@ + + + + + + app-box demos + + + + + + + + + + +
+
+

app-box demos

+ +
+
+ + diff --git a/lib/app-layout/app-drawer-layout/README.md b/lib/app-layout/app-drawer-layout/README.md index e5211b6d..2ffe9b4c 100644 --- a/lib/app-layout/app-drawer-layout/README.md +++ b/lib/app-layout/app-drawer-layout/README.md @@ -73,7 +73,7 @@ Add the `drawer-toggle` attribute to elements inside `app-drawer-layout` that to ``` -**NOTE:** With app-layout 2.0, the `drawer-toggle` element will not be automatically hidden +**NOTE:** With app-layout 2.0, the `drawer-toggle` element needs to be manually hidden when app-drawer-layout is not in narrow layout. To add this, add the following CSS rule where app-drawer-layout is used: diff --git a/lib/app-layout/app-drawer-layout/app-drawer-layout.html b/lib/app-layout/app-drawer-layout/app-drawer-layout.html index 1f1a02f8..f85f2612 100644 --- a/lib/app-layout/app-drawer-layout/app-drawer-layout.html +++ b/lib/app-layout/app-drawer-layout/app-drawer-layout.html @@ -85,7 +85,7 @@ ``` -**NOTE:** With app-layout 2.0, the `drawer-toggle` element will not be automatically hidden +**NOTE:** With app-layout 2.0, the `drawer-toggle` element needs to be manually hidden when app-drawer-layout is not in narrow layout. To add this, add the following CSS rule where app-drawer-layout is used: diff --git a/lib/app-layout/app-drawer/demo/index.html b/lib/app-layout/app-drawer/demo/index.html new file mode 100644 index 00000000..dc3bd0ac --- /dev/null +++ b/lib/app-layout/app-drawer/demo/index.html @@ -0,0 +1,40 @@ + + + + + + app-drawer demos + + + + + + + + + + +
+
+

app-drawer demos

+ +
+
+ + diff --git a/lib/app-layout/app-header-layout/app-header-layout.html b/lib/app-layout/app-header-layout/app-header-layout.html index db4cef01..5771f0c3 100644 --- a/lib/app-layout/app-header-layout/app-header-layout.html +++ b/lib/app-layout/app-header-layout/app-header-layout.html @@ -125,6 +125,12 @@ z-index: 0; } + @media print { + :host([has-scrolling-region]) #wrapper #contentContainer { + overflow-y: visible; + } + } +
diff --git a/lib/app-layout/app-header-layout/demo/index.html b/lib/app-layout/app-header-layout/demo/index.html new file mode 100644 index 00000000..faaf12cc --- /dev/null +++ b/lib/app-layout/app-header-layout/demo/index.html @@ -0,0 +1,42 @@ + + + + + + app-header-layout demos + + + + + + + + + + +
+
+

app-header-layout demos

+ +
+
+ + diff --git a/lib/app-layout/app-header/app-header.html b/lib/app-layout/app-header/app-header.html index 58fbc830..38bd2fb0 100644 --- a/lib/app-layout/app-header/app-header.html +++ b/lib/app-layout/app-header/app-header.html @@ -452,7 +452,7 @@

App name

} var nodes = Polymer.dom(this.$.slot).getDistributedNodes(); // Get the element with the sticky attribute on it or the first element in the light DOM. - for (var i = 0, node; node = nodes[i]; i++) { + for (var i = 0, node; node = /** @type {!HTMLElement} */ (nodes[i]); i++) { if (node.nodeType === Node.ELEMENT_NODE) { if (node.hasAttribute('sticky')) { this._stickyElRef = node; diff --git a/lib/app-layout/app-header/demo/index.html b/lib/app-layout/app-header/demo/index.html new file mode 100644 index 00000000..7cf003ee --- /dev/null +++ b/lib/app-layout/app-header/demo/index.html @@ -0,0 +1,48 @@ + + + + + + app-header demos + + + + + + + + + + +
+
+

app-header demos

+ +
+
+ + diff --git a/lib/app-layout/app-scroll-effects/README.md b/lib/app-layout/app-scroll-effects/README.md new file mode 100644 index 00000000..016d40f7 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/README.md @@ -0,0 +1,84 @@ +# Scroll effects + +`Polymer.AppScrollEffectsBehavior` provides an interface that allows an element to use scrolls effects. + +### Importing the app-layout effects + +app-layout provides a set of scroll effects that can be used by explicitly importing `app-scroll-effects.html`: + +```html + +``` + +The scroll effects can also be used by individually importing `app-layout/app-scroll-effects/effects/[effectName].html`. +For example: + +```html + +``` + +### Consuming effects + +Effects can be consumed via the `effects` property. For example: + +```html + +``` + +### Creating scroll effects + +You may want to create a custom scroll effect if you need to modify the CSS of an element +based on the scroll position. + +A scroll effect definition is an object with `setUp()`, `tearDown()` and `run()` functions. + +To register the effect, you can use `Polymer.AppLayout.registerEffect(effectName, effectDef)` +For example, let's define an effect that resizes the header's logo: + +```js +Polymer.AppLayout.registerEffect('resizable-logo', { + setUp: function(config) { + // the effect's config is passed to the setUp. + this._fxResizeLogo = { logo: Polymer.dom(this).querySelector('[logo]') }; + }, + + run: function(progress) { + // the progress of the effect + this.transform('scale3d(' + progress + ', '+ progress +', 1)', this._fxResizeLogo.logo); + }, + + tearDown: function() { + // clean up and reset of states + delete this._fxResizeLogo; + } +}); +``` +Now, you can consume the effect: + +```html + + + +``` + +### Imperative API + +```js +var logoEffect = appHeader.createEffect('resizable-logo', effectConfig); +// run the effect: logoEffect.run(progress); +// tear down the effect: logoEffect.tearDown(); +``` + +### Configuring effects + +For effects installed via the `effects` property, their configuration can be set +via the `effectsConfig` property. For example: + +```html + + +``` + +All effects have a `startsAt` and `endsAt` config property. They specify at what +point the effect should start and end. This value goes from 0 to 1 inclusive. diff --git a/lib/app-layout/app-scroll-effects/app-scroll-effects.html b/lib/app-layout/app-scroll-effects/app-scroll-effects.html new file mode 100644 index 00000000..d61258fe --- /dev/null +++ b/lib/app-layout/app-scroll-effects/app-scroll-effects.html @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/effects/blend-background.html b/lib/app-layout/app-scroll-effects/effects/blend-background.html new file mode 100644 index 00000000..1e1dfe15 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/effects/blend-background.html @@ -0,0 +1,42 @@ + + + + + diff --git a/lib/app-layout/app-scroll-effects/effects/fade-background.html b/lib/app-layout/app-scroll-effects/effects/fade-background.html new file mode 100644 index 00000000..db1b1d34 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/effects/fade-background.html @@ -0,0 +1,53 @@ + + + + + diff --git a/lib/app-layout/app-scroll-effects/effects/material.html b/lib/app-layout/app-scroll-effects/effects/material.html new file mode 100644 index 00000000..ee04b963 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/effects/material.html @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/effects/parallax-background.html b/lib/app-layout/app-scroll-effects/effects/parallax-background.html new file mode 100644 index 00000000..7c49fb77 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/effects/parallax-background.html @@ -0,0 +1,55 @@ + + + + + diff --git a/lib/app-layout/app-scroll-effects/effects/resize-snapped-title.html b/lib/app-layout/app-scroll-effects/effects/resize-snapped-title.html new file mode 100644 index 00000000..6a12e2ad --- /dev/null +++ b/lib/app-layout/app-scroll-effects/effects/resize-snapped-title.html @@ -0,0 +1,64 @@ + + + + + diff --git a/lib/app-layout/app-scroll-effects/effects/waterfall.html b/lib/app-layout/app-scroll-effects/effects/waterfall.html new file mode 100644 index 00000000..58f1ae3e --- /dev/null +++ b/lib/app-layout/app-scroll-effects/effects/waterfall.html @@ -0,0 +1,26 @@ + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/app-scroll-effects-behavior.html b/lib/app-layout/app-scroll-effects/test/app-scroll-effects-behavior.html new file mode 100644 index 00000000..fc3ec4d5 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/app-scroll-effects-behavior.html @@ -0,0 +1,217 @@ + + + + + + test for app-scroll-effects-behavior + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/blend-background.html b/lib/app-layout/app-scroll-effects/test/blend-background.html new file mode 100644 index 00000000..3ce462a5 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/blend-background.html @@ -0,0 +1,90 @@ + + + + + + test for the blend-background effect + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/fade-background.html b/lib/app-layout/app-scroll-effects/test/fade-background.html new file mode 100644 index 00000000..2cce5707 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/fade-background.html @@ -0,0 +1,99 @@ + + + + + + test for the fade-background effect + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/parallax-background.html b/lib/app-layout/app-scroll-effects/test/parallax-background.html new file mode 100644 index 00000000..7f886adb --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/parallax-background.html @@ -0,0 +1,85 @@ + + + + + + test for the parallax-background effect + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/resize-snapped-title.html b/lib/app-layout/app-scroll-effects/test/resize-snapped-title.html new file mode 100644 index 00000000..6f02e651 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/resize-snapped-title.html @@ -0,0 +1,93 @@ + + + + + + test for the resize-snappped-title effect + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/resize-title.html b/lib/app-layout/app-scroll-effects/test/resize-title.html new file mode 100644 index 00000000..949c6da2 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/resize-title.html @@ -0,0 +1,100 @@ + + + + + + test for the resize-title effect + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/utils.html b/lib/app-layout/app-scroll-effects/test/utils.html new file mode 100644 index 00000000..6793fecc --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/utils.html @@ -0,0 +1,43 @@ + + diff --git a/lib/app-layout/app-scroll-effects/test/waterfall.html b/lib/app-layout/app-scroll-effects/test/waterfall.html new file mode 100644 index 00000000..f272fad1 --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/waterfall.html @@ -0,0 +1,87 @@ + + + + + + test for the waterfall effect + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/app-scroll-effects/test/x-container.html b/lib/app-layout/app-scroll-effects/test/x-container.html new file mode 100644 index 00000000..9fc3977d --- /dev/null +++ b/lib/app-layout/app-scroll-effects/test/x-container.html @@ -0,0 +1,100 @@ + + + + + + + + + + diff --git a/lib/app-layout/app-toolbar/test/app-toolbar.html b/lib/app-layout/app-toolbar/test/app-toolbar.html new file mode 100644 index 00000000..67eea7e3 --- /dev/null +++ b/lib/app-layout/app-toolbar/test/app-toolbar.html @@ -0,0 +1,88 @@ + + + + + + test for app-toolbar + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/bower.json b/lib/app-layout/bower.json index b62faa22..25d5f441 100644 --- a/lib/app-layout/bower.json +++ b/lib/app-layout/bower.json @@ -1,6 +1,6 @@ { "name": "app-layout", - "version": "2.0.1", + "version": "2.0.4", "description": "A set of layout elements for your app", "authors": [ "The Polymer Authors" @@ -50,7 +50,7 @@ }, "devDependencies": { "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "^4.0.0", + "web-component-tester": "^6.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "resolutions": { diff --git a/lib/app-layout/demo/contacts.json b/lib/app-layout/demo/contacts.json new file mode 100644 index 00000000..954b3905 --- /dev/null +++ b/lib/app-layout/demo/contacts.json @@ -0,0 +1,11002 @@ +[ + { + "index": 0, + "name": "Liz Grimes", + "first": "Isabel", + "last": "Conrad", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/enda/73.jpg", + "boolean": true, + "guid": "8ea90ed8-83e1-4a28-a371-e5c0e1d0e021", + "integer": 28, + "date": "Sun Aug 14 1994 03:27:03 GMT-0700 (PDT)", + "shortText": "est ad reprehenderit occaecat consequat", + "mediumText": "Non duis commodo dolore et esse non adipisicing nisi tempor. Nisi culpa adipisicing quis dolore amet anim nulla aliqua excepteur labore. Adipisicing fugiat anim commodo velit in nisi ex exercitation.", + "longText": "Id aliqua ullamco ullamco commodo ipsum Lorem. Amet ut eu voluptate cillum occaecat Lorem et cillum excepteur ullamco mollit enim. Ea nostrud dolore culpa nulla nostrud ex voluptate anim laborum esse commodo sunt. Velit laboris pariatur labore dolore occaecat enim fugiat qui. Sit in eu ex aute minim deserunt qui consectetur laboris nostrud ad quis qui id.\r\n", + "address": "3 Vista Place", + "city": "Longbranch", + "state": "North Carolina", + "zip": 64470, + "country": "Lesotho", + "email": "isabelconrad@scentric.com", + "phone": "(817) 426-2901", + "color": "rgb(76,120,108)" + }, + { + "index": 1, + "name": "Frazier Lara", + "first": "Jocelyn", + "last": "Wooten", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/guillogo/73.jpg", + "boolean": false, + "guid": "7017f9b1-690e-4c9d-8eee-f63285ca5148", + "integer": 10, + "date": "Tue May 24 1988 14:10:20 GMT-0700 (PDT)", + "shortText": "consectetur culpa adipisicing voluptate enim", + "mediumText": "Occaecat in do proident et deserunt quis commodo veniam occaecat mollit. Nulla enim elit nulla excepteur.", + "longText": "Laboris nisi cupidatat occaecat officia ea sunt ex deserunt mollit. Est laboris in amet eu reprehenderit nisi minim. Id nulla fugiat ad nostrud nostrud tempor adipisicing. Minim duis esse irure nostrud cillum cupidatat. Cupidatat proident labore id duis deserunt cupidatat do incididunt sint minim consectetur. Ea Lorem reprehenderit fugiat culpa dolore consequat exercitation labore sit sunt culpa laborum dolore.\r\nAd nisi incididunt ea ex ullamco magna tempor. Ipsum fugiat commodo reprehenderit deserunt in adipisicing. Reprehenderit aliqua mollit ut enim. Veniam ipsum occaecat nisi ut pariatur dolor magna ea tempor eiusmod adipisicing aliqua adipisicing. Fugiat irure laborum incididunt nostrud cupidatat consectetur.\r\nEx esse cupidatat exercitation aute eu est excepteur tempor consectetur elit elit amet. Ullamco sunt aliqua veniam eu eiusmod esse sit. Incididunt aute non ex irure in deserunt. Nulla sit nulla sunt quis Lorem tempor officia exercitation nulla esse ipsum. Non qui sint ullamco minim ut consequat consectetur Lorem consequat.\r\nEiusmod irure aliqua magna non ea enim incididunt. Irure ea sunt deserunt laboris qui. Officia nostrud aute commodo sit sunt nisi irure officia cillum tempor id do tempor et. Est cupidatat esse consequat laboris culpa minim exercitation laboris eu. Ea incididunt nulla fugiat est pariatur do velit consectetur. Veniam dolor mollit veniam dolore ea consequat qui dolore deserunt adipisicing officia officia eu est. Velit dolor nostrud veniam reprehenderit consectetur quis ad consequat aliquip dolore labore.\r\nIn nisi non sunt elit aute nisi elit in adipisicing excepteur ex. Anim nulla ex tempor qui nulla dolor aute fugiat et sit ipsum sunt eiusmod sunt. Irure est dolore proident qui est adipisicing minim. Sint consequat adipisicing aute amet adipisicing adipisicing. Do labore ea enim occaecat cupidatat et. Elit deserunt anim commodo ullamco. Consequat elit excepteur nisi mollit ea.\r\n", + "address": "2 Catherine Street", + "city": "Healy", + "state": "Connecticut", + "zip": 41121, + "country": "Mongolia", + "email": "jocelynwooten@scentric.com", + "phone": "(901) 441-2582", + "color": "rgb(134,91,60)" + }, + { + "index": 2, + "name": "Dora Griffith", + "first": "Valentine", + "last": "Meyer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iboldurev/73.jpg", + "boolean": true, + "guid": "8c3bd9ad-e8d6-4ea4-85e6-d145295f3f91", + "integer": 99, + "date": "Sat Feb 17 1973 03:45:57 GMT-0800 (PST)", + "shortText": "veniam qui", + "mediumText": "Nulla ex consectetur dolore dolore cillum. Proident dolor cupidatat consequat irure enim nostrud aliqua fugiat tempor commodo et eiusmod irure. Lorem deserunt eiusmod laborum velit tempor do nostrud reprehenderit exercitation amet occaecat eiusmod aliqua sint. Dolore commodo ex ea id veniam ullamco et cupidatat dolore. Sit nostrud minim irure sint eiusmod ea est est ipsum eiusmod.", + "longText": "Ullamco eiusmod velit labore sunt deserunt excepteur commodo sunt anim incididunt ullamco adipisicing labore Lorem. Est id nostrud ad eiusmod ad ex aliqua quis irure dolore nostrud. Aute nostrud magna tempor ex pariatur cupidatat occaecat cillum ipsum reprehenderit cillum aute proident ex. Lorem ea ipsum quis adipisicing sit exercitation ipsum. Consectetur amet nulla id amet exercitation labore minim eu nisi ullamco id do. Cillum laborum sint elit laborum eiusmod irure nulla irure.\r\nId officia mollit commodo do laborum ut officia officia. Irure reprehenderit aliqua mollit pariatur. Exercitation laborum reprehenderit fugiat nisi pariatur anim mollit magna aliquip eu labore culpa reprehenderit. Irure ad quis magna laboris nisi commodo.\r\nPariatur ea exercitation labore laborum amet et mollit. Magna tempor laboris officia commodo exercitation consectetur ullamco esse. Non cillum laborum et et nisi. Culpa laboris ad amet est minim qui ea. Consequat nulla voluptate incididunt enim qui proident consectetur et adipisicing mollit. Esse elit incididunt excepteur deserunt reprehenderit quis irure eu Lorem tempor. Qui ea pariatur laborum culpa nulla eu consectetur exercitation.\r\nDo nisi occaecat eiusmod ad cupidatat nostrud deserunt ea ex ullamco do exercitation. Sit aliqua magna Lorem tempor commodo duis duis eu ex. Do labore voluptate proident elit ad id. Lorem laboris nostrud esse occaecat. Deserunt elit nisi et labore fugiat consectetur excepteur esse culpa. Amet ipsum sunt minim sint laboris incididunt. Esse excepteur excepteur mollit ea ipsum exercitation.\r\nIn dolore nulla eiusmod exercitation culpa in voluptate voluptate ipsum dolore proident. Minim enim veniam occaecat deserunt eiusmod consectetur consectetur elit id magna laboris reprehenderit nisi. Magna enim cupidatat non laborum minim anim consequat. Exercitation cupidatat tempor irure consequat.\r\n", + "address": "4 Whitty Lane", + "city": "Nicholson", + "state": "South Carolina", + "zip": 41343, + "country": "Germany", + "email": "valentinemeyer@scentric.com", + "phone": "(956) 428-2996", + "color": "rgb(201,142,97)" + }, + { + "index": 3, + "name": "Shelley Molina", + "first": "Silva", + "last": "Alexander", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/smalonso/73.jpg", + "boolean": true, + "guid": "37224065-ac71-4716-be9a-108ecddfee47", + "integer": 16, + "date": "Wed Aug 02 1995 07:03:12 GMT-0700 (PDT)", + "shortText": "laboris do velit ipsum non", + "mediumText": "Eiusmod ut magna sint ut dolor magna anim ipsum non velit. Occaecat reprehenderit ex aliquip consequat. Eu dolor non in pariatur dolore minim.", + "longText": "Cillum ullamco ullamco sunt sunt incididunt ea commodo enim nulla irure irure. Magna sunt incididunt do duis ad. Magna pariatur dolore commodo duis reprehenderit commodo aliqua anim sit deserunt veniam aute officia. Consequat non deserunt deserunt cupidatat ad do culpa. Labore aliqua aliqua ex sint ut.\r\nEnim ullamco elit eu mollit id ullamco. Tempor velit amet anim sint est ea consequat commodo ea. Aliquip magna veniam pariatur sint ullamco est aliquip do reprehenderit qui. Anim nulla occaecat commodo quis velit fugiat veniam ut.\r\nEst nisi proident id incididunt occaecat aliquip in cillum reprehenderit non et. Incididunt consectetur fugiat aute excepteur eu reprehenderit ex laboris dolore dolor reprehenderit mollit. Amet laboris ipsum ullamco id pariatur commodo excepteur est sint cillum incididunt.\r\n", + "address": "2 Berkeley Place", + "city": "Manila", + "state": "Michigan", + "zip": 22009, + "country": "Thailand", + "email": "silvaalexander@scentric.com", + "phone": "(823) 415-2224", + "color": "rgb(113,105,251)" + }, + { + "index": 4, + "name": "Rita Lopez", + "first": "Hopkins", + "last": "Wong", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/taherrapee/73.jpg", + "boolean": false, + "guid": "1ea0922e-179d-4057-abeb-d8fe63e55da8", + "integer": 94, + "date": "Wed Sep 21 2011 04:03:55 GMT-0700 (PDT)", + "shortText": "ad esse ullamco", + "mediumText": "Fugiat nostrud et consectetur mollit labore incididunt est duis nostrud id tempor veniam ad. Nulla voluptate est irure ipsum commodo do nostrud. Minim aliqua voluptate officia sit tempor nulla esse pariatur eu. Ipsum deserunt est magna veniam adipisicing nisi aute officia.", + "longText": "Officia do consequat ullamco est voluptate voluptate. Esse tempor irure aute ullamco. Aliqua veniam esse mollit veniam elit consectetur aliqua anim. Irure aute nostrud voluptate tempor consequat ut elit elit ipsum cupidatat. Aliqua duis duis minim tempor mollit qui. Labore id adipisicing laborum commodo. Tempor aliqua velit excepteur velit laborum Lorem id amet pariatur.\r\nEt nisi reprehenderit aliquip dolore ea ut aliquip duis laboris pariatur tempor cillum. Pariatur quis mollit aliquip ut proident sunt. Est aute laboris tempor officia. Sint anim qui officia deserunt amet Lorem occaecat aliquip. In eiusmod elit anim id elit eiusmod ex veniam sit sit adipisicing aliquip.\r\nQuis irure fugiat labore ex pariatur fugiat est irure. Deserunt commodo in nostrud sit Lorem amet non quis commodo eu. Nulla voluptate id enim commodo fugiat esse qui magna nostrud occaecat. Excepteur sunt cupidatat esse consequat sit voluptate ipsum magna excepteur deserunt sunt laboris labore minim. Labore ipsum ullamco dolore sint ut aliqua id nisi sunt id ipsum ea aute magna. Consequat qui commodo velit esse anim reprehenderit ea anim ut duis et veniam deserunt. Consequat amet dolor esse cupidatat incididunt exercitation laboris esse in labore.\r\nCulpa commodo commodo veniam elit elit. Consequat proident deserunt voluptate ea ut consectetur sit ex ex proident dolore nisi. Mollit est mollit sint eiusmod mollit voluptate adipisicing tempor cupidatat nisi duis dolor irure id.\r\nEu velit aliquip consectetur mollit. Officia ipsum incididunt cupidatat occaecat consequat adipisicing. Aute cupidatat quis quis consectetur aliqua. Consequat ut eu exercitation elit Lorem incididunt sint commodo ut consectetur eu non. Pariatur pariatur ut sunt aliquip exercitation nostrud mollit cillum nostrud ea cillum.\r\n", + "address": "4 Tompkins Avenue", + "city": "Movico", + "state": "Maine", + "zip": 89440, + "country": "Seychelles", + "email": "hopkinswong@scentric.com", + "phone": "(814) 488-2063", + "color": "rgb(133,126,66)" + }, + { + "index": 5, + "name": "Wagner Shelton", + "first": "Harriet", + "last": "Sherman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ismailmayat/73.jpg", + "boolean": true, + "guid": "46a4a1bc-97af-46e0-aedd-c3cc42e6b8f5", + "integer": 27, + "date": "Wed Jul 07 2010 05:48:57 GMT-0700 (PDT)", + "shortText": "do dolore tempor labore", + "mediumText": "Enim exercitation incididunt minim eiusmod est enim qui ex sit. Sit duis eiusmod officia nostrud ullamco aliquip. Minim ipsum ad fugiat dolore sint nisi tempor. Anim minim sint nisi est ea id cillum adipisicing ullamco fugiat velit aute.", + "longText": "Do veniam eiusmod sint irure. Ad aute magna consequat sint enim duis ad laboris mollit dolore esse ex do labore. Minim pariatur incididunt velit nostrud proident minim sit ad ex Lorem dolore. Esse do do sit veniam officia non sunt aliquip non exercitation id aliquip voluptate elit.\r\n", + "address": "3 Stratford Road", + "city": "Makena", + "state": "Kansas", + "zip": 21389, + "country": "Chad", + "email": "harrietsherman@scentric.com", + "phone": "(887) 497-3612", + "color": "rgb(195,89,110)" + }, + { + "index": 6, + "name": "Bethany Adkins", + "first": "Stacie", + "last": "Bartlett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/carlyson/73.jpg", + "boolean": false, + "guid": "17aac57d-4644-44d8-8a6b-b2eedd3d42dc", + "integer": 49, + "date": "Sun Mar 14 1999 23:13:33 GMT-0800 (PST)", + "shortText": "deserunt", + "mediumText": "Lorem dolor sint labore minim eu ullamco cupidatat ea velit minim. Sint eiusmod dolor nisi adipisicing pariatur esse sint anim labore consectetur irure exercitation cillum. Quis labore nulla occaecat incididunt qui ex dolor voluptate sunt eiusmod sunt proident occaecat excepteur. Dolore quis magna adipisicing esse enim occaecat.", + "longText": "Aute labore ipsum id proident occaecat cillum magna commodo excepteur Lorem et ea incididunt. Labore reprehenderit minim ipsum id aliquip fugiat elit. Sit in esse aute mollit id elit sint amet minim commodo id. Esse tempor aliqua enim amet anim commodo non anim nisi.\r\n", + "address": "4 Luquer Street", + "city": "Newcastle", + "state": "Iowa", + "zip": 72190, + "country": "Uruguay", + "email": "staciebartlett@scentric.com", + "phone": "(957) 412-3261", + "color": "rgb(164,84,221)" + }, + { + "index": 7, + "name": "Angelia Rowe", + "first": "Charlene", + "last": "Stevens", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thewillbeard/73.jpg", + "boolean": true, + "guid": "f3c6a195-d50e-479f-9c2a-c54c2a629852", + "integer": 13, + "date": "Sat Jan 04 1992 04:10:22 GMT-0800 (PST)", + "shortText": "eu reprehenderit aliquip minim", + "mediumText": "Fugiat ipsum ex irure dolore. Reprehenderit laborum proident commodo ut qui ea reprehenderit duis occaecat nostrud aliqua.", + "longText": "Esse ullamco veniam aliquip cillum aliqua veniam in consequat eu cupidatat. Ad amet reprehenderit sit anim dolor sit amet labore magna irure consequat duis cupidatat cillum. Voluptate aute consectetur ea elit labore nulla reprehenderit excepteur sit laboris sit.\r\nUllamco aliqua adipisicing velit adipisicing nulla anim cillum sunt mollit labore. Et anim aliquip adipisicing non. Exercitation consectetur nisi aute ipsum eiusmod nisi dolore. Excepteur deserunt reprehenderit occaecat sunt eu culpa ullamco proident qui excepteur. Sit proident sunt elit aliqua sit dolore deserunt officia fugiat laborum eiusmod nisi est dolor.\r\nQuis fugiat duis ullamco mollit do. Cillum cupidatat magna do id proident ut nisi do nostrud fugiat cillum incididunt. Est enim tempor labore tempor qui ipsum reprehenderit aliquip commodo quis est aute eiusmod.\r\nFugiat deserunt esse laborum labore sit nisi mollit eu dolore elit non ullamco. Velit id et quis aute esse culpa deserunt nostrud. Quis consequat consectetur fugiat ex aute sit proident aliqua dolor laboris et. Ipsum aliquip minim nostrud nostrud sunt quis eiusmod ea fugiat anim sint est duis aute.\r\nVelit aliqua cillum laboris sit officia deserunt incididunt. Consequat labore ad incididunt incididunt excepteur ex ad sunt dolore nulla qui pariatur. Cupidatat aute qui velit ipsum mollit. Aliqua veniam velit elit nostrud do consequat in in ea ea. Proident ea in qui adipisicing tempor irure qui eu ex dolore deserunt. Ipsum voluptate nulla id id culpa consectetur cillum nulla amet. Amet elit fugiat dolore anim laborum irure aute.\r\n", + "address": "4 Tiffany Place", + "city": "Dargan", + "state": "Vermont", + "zip": 31427, + "country": "Burkina Faso", + "email": "charlenestevens@scentric.com", + "phone": "(946) 404-2511", + "color": "rgb(99,147,74)" + }, + { + "index": 8, + "name": "Knox Rivers", + "first": "Reyes", + "last": "Hartman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tgormtx/73.jpg", + "boolean": true, + "guid": "88e71d65-5a7a-4973-a1dc-9f5c1df485c8", + "integer": 41, + "date": "Sat May 28 1994 15:27:35 GMT-0700 (PDT)", + "shortText": "incididunt ut", + "mediumText": "Quis voluptate eu ea et id voluptate.", + "longText": "Nostrud esse proident laborum et ex. Cupidatat proident ex velit id fugiat nulla exercitation Lorem velit ullamco exercitation excepteur. Occaecat reprehenderit occaecat in in deserunt. Ea quis laborum cupidatat ullamco aliquip. Duis proident ad mollit do eiusmod non minim sint voluptate nisi in ea deserunt consequat. Nostrud aliqua voluptate sit aliqua. Do laborum dolor ex commodo irure.\r\nIrure ipsum laboris elit ullamco labore cillum consequat et esse reprehenderit culpa elit sint consectetur. Aute exercitation excepteur Lorem do occaecat voluptate ullamco ullamco commodo sint deserunt. Esse nulla laboris non dolore adipisicing fugiat enim Lorem cillum do id proident quis eu. Ullamco officia consectetur aliqua labore cupidatat anim sint. Ipsum aute aliquip magna nostrud sint officia id irure. Non ad non reprehenderit id sunt cupidatat esse tempor officia proident occaecat qui mollit ut.\r\nExcepteur excepteur ullamco aute deserunt magna laboris ipsum ullamco laborum laboris nostrud. Excepteur sunt fugiat aliquip nostrud magna cillum commodo voluptate amet ad laboris. Officia minim sint dolor nostrud fugiat. Consequat velit sint irure amet cillum enim sunt pariatur amet mollit aute ipsum cupidatat do.\r\n", + "address": "3 Wythe Place", + "city": "Coldiron", + "state": "Nebraska", + "zip": 76971, + "country": "Greenland", + "email": "reyeshartman@scentric.com", + "phone": "(910) 533-3832", + "color": "rgb(99,55,193)" + }, + { + "index": 9, + "name": "Warren Scott", + "first": "Alissa", + "last": "Duncan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/andresenfredrik/73.jpg", + "boolean": true, + "guid": "dfc23019-ab40-4597-91fe-74bcf60a9e2b", + "integer": 54, + "date": "Sun Feb 08 2009 21:57:53 GMT-0800 (PST)", + "shortText": "ullamco aliquip veniam", + "mediumText": "Officia est sint velit magna reprehenderit.", + "longText": "Eu ipsum ipsum nisi voluptate sit voluptate occaecat sunt laborum do aute. Et id amet consequat culpa sunt. Quis aliquip adipisicing velit officia adipisicing cupidatat. Sint Lorem et consequat consectetur. Anim adipisicing ullamco dolore pariatur aliquip quis aliqua qui cillum amet amet fugiat.\r\nCupidatat fugiat exercitation duis proident in esse eiusmod dolore nisi ut. Anim dolor minim elit est ex eiusmod est. In elit pariatur non non veniam nostrud consectetur.\r\n", + "address": "4 Henderson Walk", + "city": "Oley", + "state": "Florida", + "zip": 38878, + "country": "Fiji", + "email": "alissaduncan@scentric.com", + "phone": "(876) 584-3746", + "color": "rgb(218,58,52)" + }, + { + "index": 10, + "name": "Mai Shepherd", + "first": "Christina", + "last": "Craft", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mwarkentin/73.jpg", + "boolean": false, + "guid": "7b829e11-da52-4302-a645-4711c9af7df2", + "integer": 40, + "date": "Sat Apr 18 1992 20:34:36 GMT-0700 (PDT)", + "shortText": "culpa laboris aliquip veniam nostrud", + "mediumText": "Dolore voluptate esse eiusmod ea reprehenderit aliqua sunt magna pariatur tempor veniam ad reprehenderit nostrud. Deserunt esse fugiat enim nisi in fugiat eu. Enim sit deserunt nostrud adipisicing laboris voluptate eu do non exercitation culpa deserunt. Ullamco cillum occaecat cillum adipisicing cupidatat deserunt qui. Tempor nisi duis irure cillum occaecat ullamco cillum quis enim exercitation proident proident excepteur.", + "longText": "Quis incididunt in cillum in sit deserunt excepteur ipsum magna consectetur nulla. Incididunt cillum reprehenderit ut cupidatat proident officia commodo eiusmod id nulla aliquip aliquip anim pariatur. Sint tempor do elit nisi minim consequat cupidatat non mollit ex. Laboris ullamco laborum pariatur ea exercitation eu tempor. Aute incididunt voluptate ut nulla veniam sint. Eu aliquip labore aliquip dolore sunt reprehenderit elit labore elit aliqua reprehenderit duis quis. Esse qui pariatur nostrud nostrud irure nulla aliqua non pariatur.\r\nReprehenderit sunt consequat laborum eu tempor ad Lorem commodo consequat. Incididunt officia est incididunt aliquip mollit pariatur enim qui pariatur non anim veniam aute ullamco. Fugiat nisi aliqua ex in pariatur cillum aliquip nisi elit dolor laborum labore do sit.\r\nConsectetur non sit aliqua esse est aliqua. Deserunt consequat Lorem dolore proident elit occaecat in. Esse commodo aute minim adipisicing enim eiusmod aliqua magna ea magna. Qui proident id adipisicing non ea non quis sit. Et dolore dolore labore non consequat.\r\nNostrud qui irure laborum ipsum occaecat consectetur laboris. Sunt irure eiusmod irure labore cillum veniam enim. Do aliquip proident et amet sunt laborum dolore amet reprehenderit exercitation do id duis. Sunt magna labore minim nostrud enim laborum mollit ullamco amet laborum mollit magna consequat. Sunt eiusmod cupidatat tempor duis exercitation ad minim laboris. Magna dolor nulla et ut eiusmod incididunt Lorem anim magna. Ipsum sit sint quis eu deserunt nulla nisi ad in amet proident.\r\n", + "address": "3 Ocean Court", + "city": "Fairmount", + "state": "New Jersey", + "zip": 95002, + "country": "Viet Nam", + "email": "christinacraft@scentric.com", + "phone": "(842) 503-2389", + "color": "rgb(181,253,141)" + }, + { + "index": 11, + "name": "Flora Tran", + "first": "Burt", + "last": "Landry", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/herkulano/73.jpg", + "boolean": false, + "guid": "3efeb9cc-5705-4e17-b800-42ee8e354d30", + "integer": 64, + "date": "Fri Apr 30 1982 14:23:53 GMT-0700 (PDT)", + "shortText": "nostrud ipsum", + "mediumText": "Excepteur mollit velit nulla nisi culpa irure laboris cillum sunt ullamco. Laborum minim excepteur dolore ea labore Lorem eiusmod adipisicing.", + "longText": "Laborum exercitation id cupidatat voluptate cupidatat laboris id. Do exercitation dolor anim occaecat officia. Fugiat esse et aliqua incididunt consequat.\r\n", + "address": "2 Butler Street", + "city": "Walker", + "state": "Wisconsin", + "zip": 56241, + "country": "France, Metropolitan", + "email": "burtlandry@scentric.com", + "phone": "(914) 461-3510", + "color": "rgb(95,147,193)" + }, + { + "index": 12, + "name": "Crawford Jordan", + "first": "Baldwin", + "last": "Hammond", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jonny_moon/73.jpg", + "boolean": true, + "guid": "758e8af9-6a3c-47e1-a062-b49e6263b6e8", + "integer": 80, + "date": "Sat Sep 22 2012 18:24:55 GMT-0700 (PDT)", + "shortText": "excepteur eiusmod sit irure", + "mediumText": "Ad esse ex exercitation aliqua cillum. Magna ut est nisi nisi aute enim officia excepteur aliqua. Excepteur aliqua dolor sunt mollit esse officia.", + "longText": "Esse fugiat laborum mollit labore exercitation dolor magna esse anim qui in. Excepteur proident exercitation duis laboris nostrud irure fugiat labore aute ut pariatur ea. Adipisicing labore ad laborum id et ad. Lorem laboris nulla velit pariatur ipsum. Cillum reprehenderit anim dolore mollit dolor. Ut velit veniam pariatur nisi dolor anim ut laborum cillum ut ad.\r\n", + "address": "3 Preston Court", + "city": "Vincent", + "state": "Washington", + "zip": 47560, + "country": "Uganda", + "email": "baldwinhammond@scentric.com", + "phone": "(800) 559-2165", + "color": "rgb(175,176,59)" + }, + { + "index": 13, + "name": "Stanley Williams", + "first": "Laverne", + "last": "Hampton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/alyssalowww/73.jpg", + "boolean": false, + "guid": "718262e9-01e7-4016-b068-6edd11a14a38", + "integer": 62, + "date": "Sat Sep 27 1975 16:25:15 GMT-0700 (PDT)", + "shortText": "tempor", + "mediumText": "Sunt voluptate magna ullamco cupidatat laborum anim irure.", + "longText": "Duis magna nulla laborum reprehenderit ullamco ipsum irure. Exercitation veniam Lorem Lorem est commodo. In et occaecat et quis veniam quis esse ea anim cupidatat labore.\r\nDeserunt commodo est consectetur velit ullamco eu do nisi consequat culpa sunt. Nulla aliquip veniam anim reprehenderit irure occaecat sit nulla. Culpa Lorem in culpa adipisicing eiusmod aute cillum fugiat voluptate deserunt.\r\nDo do enim et tempor minim aliqua incididunt aute nulla ullamco fugiat magna occaecat in. Mollit aute sunt eu culpa enim magna nulla pariatur cillum amet quis consectetur et laboris. Ex officia nulla dolor ea aliqua est voluptate do Lorem aliquip irure. Lorem velit ad eiusmod aliquip. Amet irure amet consequat est aliqua quis.\r\nEt Lorem magna sunt aliquip dolore minim. Adipisicing ea ipsum dolore commodo labore eiusmod nisi consectetur. Reprehenderit culpa officia culpa mollit. Eu nostrud ullamco elit nostrud incididunt. Reprehenderit officia fugiat est sunt sunt consectetur Lorem ex magna reprehenderit.\r\nElit laboris eiusmod sunt cupidatat elit qui irure adipisicing culpa voluptate laborum eiusmod nisi. Ullamco magna minim enim ea veniam incididunt laborum aliqua qui minim commodo laborum. Consectetur nisi adipisicing voluptate velit ex. Id anim est sunt elit dolore qui incididunt aute voluptate consectetur exercitation. Sint tempor est laboris laborum incididunt fugiat dolor. Laboris est duis ullamco laborum eiusmod incididunt aliquip aute.\r\n", + "address": "4 Varet Street", + "city": "Breinigsville", + "state": "Oregon", + "zip": 54164, + "country": "Antarctica", + "email": "lavernehampton@scentric.com", + "phone": "(988) 478-3842", + "color": "rgb(225,78,134)" + }, + { + "index": 14, + "name": "Key Keith", + "first": "Kirsten", + "last": "Chang", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rafelorden/73.jpg", + "boolean": true, + "guid": "1e75c394-1574-4168-a33d-c5895f7af76d", + "integer": 47, + "date": "Tue Sep 18 1990 08:36:33 GMT-0700 (PDT)", + "shortText": "quis proident ea", + "mediumText": "Do voluptate et reprehenderit aute tempor exercitation ipsum enim quis elit dolore in quis. Veniam sunt dolore excepteur consectetur. Lorem occaecat laborum elit veniam ad commodo sint ullamco exercitation aliquip.", + "longText": "Nulla esse et consectetur in nulla nostrud laboris reprehenderit minim sit sunt nisi est fugiat. Duis elit id sit excepteur amet aute culpa incididunt. Nisi veniam ut nisi mollit sunt proident Lorem reprehenderit. Et voluptate occaecat veniam et proident ipsum non cillum aliquip laboris ad.\r\n", + "address": "4 Ryder Avenue", + "city": "Wheatfields", + "state": "Illinois", + "zip": 28092, + "country": "Kiribati", + "email": "kirstenchang@scentric.com", + "phone": "(882) 531-2818", + "color": "rgb(118,83,134)" + }, + { + "index": 15, + "name": "Lizzie Oneal", + "first": "Mercado", + "last": "Hancock", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/wim1k/73.jpg", + "boolean": false, + "guid": "8fbb9f3a-64df-4069-9aec-0d3dd0c2dd3f", + "integer": 22, + "date": "Thu Jan 02 1986 03:48:22 GMT-0800 (PST)", + "shortText": "cupidatat pariatur consequat incididunt", + "mediumText": "Non do dolore consequat nostrud. Ullamco dolore sunt anim incididunt aliqua minim mollit ad consectetur do ipsum.", + "longText": "Enim consequat dolor nostrud culpa cillum consequat mollit eu sint est commodo. Sit cillum minim incididunt id mollit eiusmod non nostrud sunt proident aliquip. Excepteur occaecat amet ullamco deserunt. Nisi elit excepteur commodo nisi anim incididunt consequat laboris exercitation pariatur occaecat deserunt sint. Aliquip in non quis enim cillum eiusmod duis pariatur elit proident consequat nostrud proident culpa.\r\nMollit culpa adipisicing laboris occaecat commodo id incididunt aliquip adipisicing ex ipsum elit elit adipisicing. Officia voluptate reprehenderit elit dolore. Consequat culpa officia id ut irure eu Lorem eu mollit excepteur adipisicing aute occaecat amet. Anim reprehenderit enim deserunt velit elit ut amet. Deserunt voluptate eiusmod labore tempor duis in est consequat adipisicing excepteur sunt consequat ea. Occaecat eiusmod fugiat do elit sunt.\r\nDeserunt fugiat velit mollit do culpa sunt in enim qui tempor anim esse sunt. Do eu fugiat culpa ex aliquip quis exercitation. Culpa non culpa duis magna officia dolore officia minim culpa non. Enim voluptate minim ullamco eiusmod dolore do sit non quis et anim incididunt aliqua tempor.\r\n", + "address": "4 Sumner Place", + "city": "Ruckersville", + "state": "West Virginia", + "zip": 65886, + "country": "Ecuador", + "email": "mercadohancock@scentric.com", + "phone": "(996) 557-3624", + "color": "rgb(244,178,231)" + }, + { + "index": 16, + "name": "Bentley Guthrie", + "first": "Obrien", + "last": "Bruce", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rpeezy/73.jpg", + "boolean": false, + "guid": "720e6095-dc65-4bef-b8bf-56b3e43c13e8", + "integer": 33, + "date": "Sat Sep 09 1989 04:51:19 GMT-0700 (PDT)", + "shortText": "nulla officia ullamco anim", + "mediumText": "Incididunt ut irure quis non ad ut tempor et labore enim Lorem eiusmod. Sit laborum elit duis pariatur occaecat fugiat labore. Laborum velit incididunt dolor minim aute aute. Cillum id amet ut in. Eiusmod tempor et fugiat do qui dolor aliquip labore mollit tempor.", + "longText": "Labore et amet excepteur ea id. Anim mollit cupidatat nulla in sint. Nulla nulla proident Lorem minim consequat ea quis. Non Lorem mollit duis aliquip labore est. Eiusmod excepteur do do eiusmod officia id nisi proident consequat. Occaecat anim eiusmod dolore nostrud culpa adipisicing commodo anim incididunt laborum.\r\nDuis occaecat qui ullamco in magna nisi ad ex. Qui laboris tempor nulla magna. Ut est nulla laboris mollit do id qui esse exercitation culpa officia exercitation. Ipsum mollit amet ad exercitation ut eu Lorem reprehenderit magna. Veniam laboris officia ea voluptate sint anim qui est quis mollit qui occaecat cillum. Officia magna deserunt eu laboris culpa proident.\r\nElit est eiusmod non dolor nisi tempor et in deserunt eiusmod veniam ea quis. Elit magna anim pariatur ea do elit in duis cupidatat incididunt quis qui laboris. Ad ad ex officia proident ullamco consequat labore nulla consequat enim.\r\nProident ut elit quis anim reprehenderit amet deserunt eiusmod sit sit velit proident deserunt sunt. Est quis magna fugiat in nisi proident. Adipisicing Lorem sint enim esse laboris sit laborum.\r\n", + "address": "2 Chester Street", + "city": "Finzel", + "state": "Mississippi", + "zip": 52444, + "country": "Bulgaria", + "email": "obrienbruce@scentric.com", + "phone": "(923) 461-2312", + "color": "rgb(52,103,133)" + }, + { + "index": 17, + "name": "Marsh Cleveland", + "first": "Pearl", + "last": "Moran", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sectronov/73.jpg", + "boolean": true, + "guid": "9b385d87-2847-44f4-acae-a47970ff7c9f", + "integer": 8, + "date": "Tue Apr 26 1988 18:46:50 GMT-0700 (PDT)", + "shortText": "reprehenderit in reprehenderit dolor", + "mediumText": "Ex cillum in minim ullamco laborum. Dolor dolore adipisicing dolore ad.", + "longText": "Voluptate fugiat veniam do minim culpa. Proident irure mollit est exercitation est. Tempor pariatur proident excepteur aliquip cupidatat quis id ut fugiat excepteur tempor aliquip ea non. Consectetur ipsum Lorem reprehenderit laboris enim reprehenderit duis irure eu sint sit magna eu cupidatat. Sunt sunt laborum mollit ex fugiat ex quis. Proident quis labore occaecat est laborum quis ea irure ipsum magna ad nisi ut. Proident est culpa aliquip ullamco irure eu duis duis occaecat Lorem amet qui.\r\nMinim in adipisicing nostrud Lorem esse anim aute ullamco adipisicing ut enim magna. Cupidatat non dolor pariatur deserunt consectetur cillum dolor adipisicing. In proident commodo non exercitation cupidatat enim culpa officia voluptate. Et in sunt dolore mollit aute commodo sint et adipisicing. Labore velit esse occaecat esse commodo tempor veniam officia Lorem proident aute.\r\nEx magna aliqua adipisicing non esse labore non duis. Excepteur cupidatat eiusmod laborum laborum in quis reprehenderit id irure. Incididunt laboris qui adipisicing eu.\r\n", + "address": "4 Portland Avenue", + "city": "Henrietta", + "state": "Rhode Island", + "zip": 53764, + "country": "American Samoa", + "email": "pearlmoran@scentric.com", + "phone": "(964) 543-3486", + "color": "rgb(168,119,234)" + }, + { + "index": 18, + "name": "Maude Perry", + "first": "Underwood", + "last": "Barton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/starburst1977/73.jpg", + "boolean": true, + "guid": "0f6385b5-481e-4ddf-9ad4-b91f8e951922", + "integer": 33, + "date": "Wed Apr 23 2014 06:02:36 GMT-0700 (PDT)", + "shortText": "do pariatur quis consequat ex", + "mediumText": "Sunt magna elit adipisicing sint quis minim. Commodo irure pariatur esse deserunt proident enim incididunt et deserunt sit consectetur enim anim. Esse pariatur non magna culpa cillum culpa dolore ad id ex dolor deserunt. Dolore qui amet cupidatat et pariatur fugiat voluptate eiusmod duis commodo. Proident adipisicing irure eu aliquip nisi.", + "longText": "Nisi ipsum excepteur eiusmod irure velit. Elit ad nulla culpa eu sint veniam deserunt cupidatat. Esse culpa nisi velit aliquip esse consequat dolor amet velit culpa labore est do.\r\nLorem consectetur ad proident Lorem aute eiusmod sit incididunt. Pariatur sit cupidatat enim fugiat sunt ut. Aliquip mollit fugiat ea non laboris exercitation amet Lorem cillum.\r\n", + "address": "3 Mermaid Avenue", + "city": "Deputy", + "state": "Georgia", + "zip": 58449, + "country": "Angola", + "email": "underwoodbarton@scentric.com", + "phone": "(946) 414-3492", + "color": "rgb(112,197,153)" + }, + { + "index": 19, + "name": "Knapp Pratt", + "first": "Solomon", + "last": "Lloyd", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mocabyte/73.jpg", + "boolean": true, + "guid": "895a8dab-d037-46f4-b822-795814f418d9", + "integer": 72, + "date": "Thu Apr 13 1978 08:14:17 GMT-0800 (PST)", + "shortText": "nisi quis", + "mediumText": "Officia id sint exercitation excepteur aliqua enim est id duis occaecat consectetur excepteur. Ea incididunt nulla quis ea ad et ex exercitation laboris sit sit aliquip. Est magna tempor ex commodo id aliquip nostrud aliquip id culpa quis velit excepteur.", + "longText": "Ut nostrud nisi sit sit laboris labore ea ullamco fugiat enim esse. Velit fugiat adipisicing amet amet. Sint cillum eiusmod cillum esse exercitation duis adipisicing incididunt eiusmod culpa laboris eiusmod.\r\nEu cupidatat anim mollit laboris excepteur do in voluptate. In voluptate exercitation proident commodo Lorem id. Laboris cillum dolor et eiusmod do eu. Amet veniam proident in id deserunt mollit incididunt quis exercitation sunt pariatur duis cillum proident. Sunt ad deserunt adipisicing adipisicing consectetur.\r\nLorem reprehenderit deserunt reprehenderit incididunt anim elit aliquip ipsum reprehenderit. Aliqua amet sint mollit fugiat ut est ut tempor aliquip elit laboris. Esse minim qui non aliquip exercitation dolore quis incididunt incididunt. Ullamco cillum excepteur eu duis eu id in commodo.\r\nVelit duis ullamco veniam dolore exercitation aliquip magna veniam et. Excepteur ipsum duis voluptate Lorem in veniam reprehenderit eu deserunt magna reprehenderit. Minim ullamco nostrud irure irure culpa esse. Laboris ad incididunt proident elit sit eiusmod voluptate ad culpa qui duis aute. Cillum ex esse non veniam nulla excepteur quis non.\r\nEiusmod adipisicing Lorem sunt est. Duis reprehenderit esse sint aute. Est dolore cillum minim anim Lorem adipisicing amet fugiat. Esse dolor commodo labore ea nulla ipsum nulla laboris proident consequat duis ex ut minim. Occaecat irure nostrud nulla eiusmod est aliqua proident irure laboris.\r\n", + "address": "4 Glenwood Road", + "city": "Berlin", + "state": "New Mexico", + "zip": 64625, + "country": "Bhutan", + "email": "solomonlloyd@scentric.com", + "phone": "(802) 539-3360", + "color": "rgb(69,68,176)" + }, + { + "index": 20, + "name": "Jodi Tanner", + "first": "Lyons", + "last": "Stevenson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iamasifmirza/73.jpg", + "boolean": false, + "guid": "f6a0ef12-6a1e-48a8-990a-da79c0bbf30e", + "integer": 79, + "date": "Tue Feb 11 2003 17:16:18 GMT-0800 (PST)", + "shortText": "et", + "mediumText": "Eu laboris adipisicing nostrud in in officia pariatur irure occaecat ut consequat commodo adipisicing elit.", + "longText": "Ullamco aliquip reprehenderit Lorem id duis ipsum sit exercitation id Lorem consequat enim ea. Aliquip officia minim dolore ea aliqua non. Aliqua cillum ipsum qui commodo non nostrud eiusmod duis commodo officia et nisi. Proident cillum deserunt eiusmod ea nisi quis incididunt id consectetur qui excepteur ad ipsum. Proident non dolor eu laboris proident Lorem aliquip elit sunt eu tempor sint fugiat Lorem.\r\nId mollit veniam amet labore id. Est proident tempor qui excepteur. Ipsum non irure sint minim sint eu cupidatat eu exercitation dolor et.\r\nSunt sunt nulla et mollit eu in amet est do qui ipsum mollit. Cillum voluptate excepteur consectetur sunt laboris tempor sunt laborum mollit veniam incididunt voluptate pariatur laboris. Mollit cupidatat esse aute sunt dolore cillum cillum qui sunt duis consequat anim. Sit ad laboris et do proident ipsum veniam amet dolor. Id elit anim ut et laborum. Dolor aliqua Lorem Lorem consectetur sint sunt.\r\n", + "address": "3 Cropsey Avenue", + "city": "Lewis", + "state": "Arizona", + "zip": 89420, + "country": "Dominica", + "email": "lyonsstevenson@scentric.com", + "phone": "(818) 424-2348", + "color": "rgb(178,99,182)" + }, + { + "index": 21, + "name": "Mamie Crane", + "first": "Swanson", + "last": "Richardson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/benoitboucart/73.jpg", + "boolean": true, + "guid": "66c048df-eefc-4c09-a468-b3044e4e7f11", + "integer": 26, + "date": "Sun Jun 30 2002 05:57:21 GMT-0700 (PDT)", + "shortText": "quis aliquip aliqua", + "mediumText": "Non ad sit sit veniam officia id officia laborum qui irure eiusmod elit reprehenderit. Voluptate cillum mollit adipisicing mollit esse commodo. Labore exercitation voluptate duis pariatur magna labore ex non cillum incididunt eu esse nostrud.", + "longText": "Anim ut amet laboris culpa velit sunt ea sunt. Do anim nisi minim labore. In cillum pariatur ex non minim sint.\r\n", + "address": "3 Aurelia Court", + "city": "Inkerman", + "state": "Texas", + "zip": 10482, + "country": "Egypt", + "email": "swansonrichardson@scentric.com", + "phone": "(810) 406-3416", + "color": "rgb(230,107,202)" + }, + { + "index": 22, + "name": "Cooley Macdonald", + "first": "Aida", + "last": "Hurley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/markwienands/73.jpg", + "boolean": false, + "guid": "466a665b-b7b6-4eae-b404-e9b5a8d1641d", + "integer": 20, + "date": "Sun Jan 05 2014 15:48:57 GMT-0800 (PST)", + "shortText": "incididunt irure", + "mediumText": "Anim incididunt commodo minim voluptate enim proident aute adipisicing dolore reprehenderit commodo reprehenderit ipsum ut.", + "longText": "Id quis elit duis veniam enim cupidatat duis. Dolore proident magna minim reprehenderit Lorem. Velit tempor consequat adipisicing aute cillum exercitation eu sunt dolore.\r\nTempor ex laborum dolore voluptate aliqua in id est non. Eiusmod sunt non in culpa id magna non. Cupidatat voluptate magna aute cupidatat aliqua deserunt ut Lorem duis occaecat magna. Occaecat sit pariatur quis ipsum. Non qui non laboris cupidatat adipisicing.\r\nEst nulla aute veniam deserunt nulla labore reprehenderit reprehenderit sint. Nulla cupidatat laboris tempor labore cillum in excepteur minim laboris quis. Amet voluptate sunt in nostrud excepteur dolor in irure laborum commodo et cupidatat. Aliqua enim incididunt voluptate dolore est exercitation officia labore enim commodo quis veniam aliquip. Esse aliquip do labore eiusmod reprehenderit enim officia officia enim dolore magna dolore. Velit in sit dolore consequat.\r\nAdipisicing ea consequat voluptate proident enim commodo labore. Eu dolore ut amet aute tempor exercitation ad mollit occaecat velit non labore reprehenderit. Aute esse dolore id cillum Lorem eu quis elit exercitation ex esse sint. Sit nostrud non ullamco do esse. Voluptate velit officia eu laboris ut commodo tempor velit. Eiusmod cupidatat nostrud ex veniam sit duis. Proident fugiat laboris quis id dolor reprehenderit.\r\n", + "address": "4 Hall Street", + "city": "Stouchsburg", + "state": "District Of Columbia", + "zip": 32399, + "country": "Chile", + "email": "aidahurley@scentric.com", + "phone": "(975) 451-3272", + "color": "rgb(119,239,85)" + }, + { + "index": 23, + "name": "Snow Blankenship", + "first": "Mccormick", + "last": "Jensen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/menghe/73.jpg", + "boolean": false, + "guid": "961f5da2-2479-4f45-9132-9e89a8bc32e4", + "integer": 70, + "date": "Tue Jan 22 1974 01:18:15 GMT-0700 (PDT)", + "shortText": "aliqua commodo", + "mediumText": "Proident est sunt aliqua cillum ex sit aliquip irure ad. Pariatur dolore cillum nulla qui excepteur deserunt culpa magna consectetur et officia.", + "longText": "Culpa id veniam minim enim nulla ea enim proident. Esse sint ipsum et culpa. Cillum cillum incididunt fugiat occaecat Lorem velit. Quis esse incididunt esse sunt labore nulla. In minim ullamco officia do ad tempor. Sint sunt labore ullamco reprehenderit dolor ullamco ut occaecat.\r\n", + "address": "3 Lewis Place", + "city": "Elizaville", + "state": "Virgin Islands", + "zip": 32784, + "country": "Norfolk Island", + "email": "mccormickjensen@scentric.com", + "phone": "(961) 443-3343", + "color": "rgb(204,198,130)" + }, + { + "index": 24, + "name": "Gabriela Brock", + "first": "Ramona", + "last": "Meyers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/heyanata/73.jpg", + "boolean": false, + "guid": "07133f92-9308-420e-ae7b-e5ecd657aa85", + "integer": 76, + "date": "Sat Sep 15 1984 07:22:38 GMT-0700 (PDT)", + "shortText": "ex duis do", + "mediumText": "Aliqua qui dolore laborum aute culpa eiusmod ipsum incididunt. Incididunt cillum nisi culpa ea. Incididunt reprehenderit Lorem veniam occaecat elit anim mollit deserunt.", + "longText": "Magna nostrud laboris cupidatat sint esse pariatur ut irure sint dolore laborum. Ut id aute dolor laboris. Cillum officia id officia ut. Irure incididunt dolor exercitation eiusmod sunt nostrud labore. Ad do deserunt deserunt ad elit culpa commodo pariatur. Pariatur excepteur et nisi aute. Ex amet irure anim pariatur voluptate pariatur adipisicing dolor eiusmod dolore.\r\nVelit eu consectetur sint nulla culpa laboris ex et esse. Nostrud voluptate nostrud esse nisi proident quis consequat sit commodo consectetur ut. Ea ex irure labore ullamco proident ullamco consequat sit. Ipsum sit adipisicing mollit deserunt.\r\nEst quis ea magna aliquip anim. Cupidatat ea commodo amet tempor laboris commodo eu. Duis qui irure sunt aliquip velit elit. Laboris fugiat anim officia eiusmod enim ut aliqua incididunt eiusmod ad nulla aute esse. Sit in velit amet labore non consequat id id enim labore Lorem.\r\n", + "address": "3 Rodney Street", + "city": "Orin", + "state": "Puerto Rico", + "zip": 60446, + "country": "Japan", + "email": "ramonameyers@scentric.com", + "phone": "(839) 591-3993", + "color": "rgb(236,222,59)" + }, + { + "index": 25, + "name": "Graciela Orr", + "first": "Sharp", + "last": "Lindsay", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thibaut_re/73.jpg", + "boolean": true, + "guid": "0ea67b0a-5ea7-4e07-8d06-48b6e2a00c6e", + "integer": 39, + "date": "Mon May 25 1970 21:04:46 GMT-0700 (PDT)", + "shortText": "ex", + "mediumText": "Aliqua sunt commodo occaecat nisi esse aliqua labore exercitation qui in ut officia laborum ad. Tempor nisi ad aliquip ipsum nostrud nostrud et sint commodo cillum labore. Ullamco qui fugiat consectetur minim consequat cupidatat laboris. Eu irure veniam sint esse adipisicing ipsum do aliqua pariatur.", + "longText": "Tempor Lorem reprehenderit quis exercitation sit sunt labore elit. Laborum incididunt quis deserunt fugiat culpa aliquip irure esse sit excepteur. Elit elit ad et do dolore minim enim.\r\n", + "address": "2 Tech Place", + "city": "Kraemer", + "state": "Maryland", + "zip": 24019, + "country": "Saudi Arabia", + "email": "sharplindsay@scentric.com", + "phone": "(852) 538-3232", + "color": "rgb(218,74,95)" + }, + { + "index": 26, + "name": "Ethel Wood", + "first": "Dina", + "last": "Robbins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bluesix/73.jpg", + "boolean": true, + "guid": "342d8ae0-5eea-403c-9922-a85d39738463", + "integer": 22, + "date": "Sat Jun 03 1978 07:31:03 GMT-0700 (PDT)", + "shortText": "qui", + "mediumText": "Excepteur eu laboris magna cupidatat eiusmod nostrud laborum commodo officia sunt fugiat ad. Aliqua reprehenderit duis est consequat incididunt ullamco.", + "longText": "Pariatur velit exercitation aute adipisicing et enim laborum. Laboris anim nostrud consequat Lorem eu irure non aute eiusmod tempor veniam. Aute amet elit tempor irure occaecat esse labore elit veniam anim ea anim. Consequat excepteur esse mollit tempor mollit aute et sit duis. Labore veniam cillum enim nostrud ea laborum.\r\n", + "address": "2 Plymouth Street", + "city": "Bison", + "state": "Massachusetts", + "zip": 64340, + "country": "Micronesia", + "email": "dinarobbins@scentric.com", + "phone": "(967) 410-2522", + "color": "rgb(158,62,57)" + }, + { + "index": 27, + "name": "Tameka Francis", + "first": "Franco", + "last": "Carrillo", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/w8candice/73.jpg", + "boolean": false, + "guid": "d193f8ac-79ea-4201-9a75-c66cbf504ad5", + "integer": 37, + "date": "Mon Jul 14 1986 03:07:27 GMT-0700 (PDT)", + "shortText": "do aliqua laborum", + "mediumText": "Est incididunt exercitation voluptate culpa ut excepteur voluptate velit est minim nulla. Mollit anim ipsum velit excepteur eu occaecat exercitation. Mollit ipsum commodo aliqua voluptate do incididunt ipsum quis.", + "longText": "Anim voluptate cupidatat labore amet. Ex pariatur duis officia commodo excepteur. Quis dolor esse quis veniam. Non veniam et fugiat quis magna. Cillum ad commodo ex cupidatat labore duis aute est cillum. Ad nostrud duis officia ea proident non veniam qui quis.\r\nEx enim duis Lorem sit adipisicing laboris occaecat amet consectetur labore. Pariatur deserunt qui veniam ad exercitation proident commodo dolore aliqua. Aliquip sit Lorem mollit est culpa sint veniam veniam adipisicing elit eiusmod ipsum deserunt. Sint eiusmod consequat occaecat exercitation commodo qui. Labore et consequat dolor voluptate dolor excepteur in anim aliquip ea ullamco labore exercitation ipsum. Mollit occaecat dolor proident ipsum ad esse mollit qui laboris. Anim reprehenderit nulla magna mollit exercitation labore minim.\r\n", + "address": "2 Harkness Avenue", + "city": "Hollins", + "state": "Oklahoma", + "zip": 57691, + "country": "Liberia", + "email": "francocarrillo@scentric.com", + "phone": "(812) 540-2032", + "color": "rgb(89,84,186)" + }, + { + "index": 28, + "name": "Hendricks Levy", + "first": "Guadalupe", + "last": "Odom", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mbilderbach/73.jpg", + "boolean": false, + "guid": "cb09adfd-ad50-4ada-85f2-9a6da5e61812", + "integer": 51, + "date": "Tue Sep 12 1995 23:12:02 GMT-0700 (PDT)", + "shortText": "laboris non labore elit ea", + "mediumText": "Veniam tempor cillum non deserunt duis aliquip elit velit velit do sunt est ad et. Incididunt anim id dolore reprehenderit Lorem est laborum aliqua. Cupidatat ut irure proident pariatur nulla minim nostrud minim laborum non.", + "longText": "Dolor consectetur eu Lorem ea fugiat culpa dolore magna qui magna mollit. Minim est qui eiusmod incididunt nisi ullamco incididunt irure. Tempor officia amet ea nisi elit sunt nulla dolor non labore officia ipsum sit. Esse tempor duis labore laborum cillum nostrud sunt do quis.\r\nEx quis consequat est laborum eu non consequat exercitation aute proident ea excepteur irure ex. Adipisicing nulla laborum ipsum enim dolore. Reprehenderit labore veniam Lorem qui adipisicing dolore commodo cillum anim reprehenderit cupidatat cupidatat amet.\r\nAliqua est magna incididunt amet sit et ad laboris nostrud. Labore culpa cupidatat aliquip magna tempor elit cillum ad ut irure. Ipsum irure qui ullamco aliqua ex sit do. Ut irure nisi voluptate excepteur nulla deserunt dolor dolore id ut laboris proident pariatur. Consequat est exercitation esse id nulla culpa cupidatat deserunt deserunt nostrud in est nostrud. Incididunt eiusmod non sunt deserunt reprehenderit eiusmod officia cupidatat quis ea cupidatat pariatur dolore.\r\n", + "address": "4 Terrace Place", + "city": "Salunga", + "state": "Ohio", + "zip": 43114, + "country": "Korea (South)", + "email": "guadalupeodom@scentric.com", + "phone": "(902) 544-3976", + "color": "rgb(180,227,238)" + }, + { + "index": 29, + "name": "Porter Mcpherson", + "first": "Mcguire", + "last": "Kerr", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/coreyweb/73.jpg", + "boolean": false, + "guid": "c15b43e1-5b71-49c8-8319-7c6739d3d481", + "integer": 81, + "date": "Tue Jun 05 2012 02:47:02 GMT-0700 (PDT)", + "shortText": "do", + "mediumText": "Qui est labore deserunt velit ut adipisicing quis. Aliquip ex esse enim esse commodo duis non nisi nisi incididunt anim duis sunt magna.", + "longText": "Consequat laborum est irure eiusmod fugiat dolore fugiat do. Consequat occaecat deserunt non consectetur. Do et dolore minim dolore in ex enim.\r\nMinim pariatur tempor sit anim reprehenderit quis laboris elit veniam Lorem ipsum amet. Sunt aute reprehenderit eiusmod sint mollit proident sint veniam. Eu elit amet minim excepteur aliqua esse enim. Dolor nulla magna excepteur id nostrud Lorem magna duis.\r\n", + "address": "4 Myrtle Avenue", + "city": "Waukeenah", + "state": "Nevada", + "zip": 54957, + "country": "Pakistan", + "email": "mcguirekerr@scentric.com", + "phone": "(812) 545-2648", + "color": "rgb(122,207,233)" + }, + { + "index": 30, + "name": "Rosalie Noble", + "first": "Giles", + "last": "Miller", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jeremyshimko/73.jpg", + "boolean": false, + "guid": "490401d1-d8e8-4bd1-866c-b9ddd28804a4", + "integer": 45, + "date": "Sun Apr 21 2002 02:16:55 GMT-0700 (PDT)", + "shortText": "proident ad adipisicing duis non", + "mediumText": "Veniam esse officia laborum pariatur. Esse cillum duis sunt minim nisi irure eu in. Occaecat minim culpa adipisicing do amet in amet ipsum velit minim est. Est quis voluptate deserunt id sunt exercitation reprehenderit duis ad dolor et dolor mollit.", + "longText": "Ex dolor culpa fugiat amet esse Lorem dolor ad anim reprehenderit voluptate adipisicing. Nostrud minim laborum mollit labore Lorem officia dolor Lorem. Et voluptate in nulla id ea est duis velit. Aute adipisicing sint commodo et.\r\nNon deserunt nostrud veniam velit occaecat cupidatat adipisicing exercitation. Anim duis enim enim excepteur non voluptate mollit occaecat sunt adipisicing cillum duis. Adipisicing eiusmod nulla ex minim ipsum.\r\nLabore ea dolore fugiat culpa ad aute veniam sint id nulla sit voluptate. Esse magna cupidatat mollit eiusmod. Consectetur dolor incididunt deserunt veniam veniam voluptate elit do aute officia occaecat aliquip aliqua. Ea irure incididunt ut in elit minim et laborum minim enim culpa est do. Nostrud quis ullamco excepteur amet irure ad exercitation voluptate dolore amet pariatur non nisi.\r\n", + "address": "4 Dakota Place", + "city": "Matheny", + "state": "Montana", + "zip": 48981, + "country": "Guyana", + "email": "gilesmiller@scentric.com", + "phone": "(937) 481-3812", + "color": "rgb(117,82,141)" + }, + { + "index": 31, + "name": "Katrina Stuart", + "first": "Norton", + "last": "Carr", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pavelbuben/73.jpg", + "boolean": false, + "guid": "f9c2cf75-a70b-45c5-8a9c-cbceae872250", + "integer": 77, + "date": "Sun May 09 1993 04:38:21 GMT-0700 (PDT)", + "shortText": "labore", + "mediumText": "Adipisicing tempor ad sit ut anim eiusmod exercitation laboris. Velit pariatur occaecat minim consectetur aliquip nostrud anim.", + "longText": "Commodo anim aliquip nostrud occaecat cupidatat quis tempor aliquip consequat dolore. Ea sit ullamco amet consequat elit. Magna magna amet in reprehenderit adipisicing amet cillum tempor qui nisi ad. Eu veniam ad adipisicing aliquip officia ut occaecat exercitation do ad irure do magna veniam. Reprehenderit nisi voluptate consectetur Lorem eu duis incididunt aliquip irure duis sit ea nostrud id. Reprehenderit reprehenderit ipsum in commodo.\r\nAd excepteur adipisicing aliqua eu veniam ullamco velit eu enim nisi reprehenderit non duis nulla. Voluptate aliqua sit sit duis exercitation ad. Incididunt incididunt quis aliqua eu anim esse reprehenderit ut aliqua. Ea id pariatur dolor dolor minim tempor laboris magna non culpa ut non. Officia Lorem proident elit consectetur excepteur dolor velit id velit minim mollit aliqua qui. Aliquip dolor sint aliqua ex tempor.\r\n", + "address": "3 Estate Road", + "city": "Zortman", + "state": "California", + "zip": 33484, + "country": "Poland", + "email": "nortoncarr@scentric.com", + "phone": "(807) 556-3727", + "color": "rgb(189,210,164)" + }, + { + "index": 32, + "name": "Katy Guzman", + "first": "Marcie", + "last": "Rose", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hafeeskhan/73.jpg", + "boolean": false, + "guid": "0b1f8fd2-2acd-402f-aa66-728b60d1d8ba", + "integer": 62, + "date": "Mon Aug 05 1985 19:37:56 GMT-0700 (PDT)", + "shortText": "elit laborum esse", + "mediumText": "Nulla officia ex elit nulla aliqua magna cillum mollit ad sint. Fugiat consequat officia id ullamco ullamco excepteur aliquip. Occaecat esse eu veniam labore laboris laborum sint laborum esse eiusmod Lorem. Aliquip ex quis et adipisicing sunt cillum pariatur exercitation exercitation fugiat. Est velit anim esse consequat id in nisi adipisicing qui ad ex do non velit.", + "longText": "Amet dolor cillum voluptate occaecat quis cupidatat laborum commodo. Ut et quis ut proident qui do aliquip exercitation non. Ipsum ullamco commodo mollit Lorem do consectetur qui ad in cillum tempor irure consequat.\r\nVeniam laboris minim do exercitation eiusmod ut do sint reprehenderit anim irure proident proident. Quis adipisicing duis qui ut quis veniam dolor non velit consectetur eu voluptate. Duis mollit velit fugiat magna eu ullamco magna irure ipsum est tempor labore eu sint. Cupidatat ullamco nulla dolore quis commodo esse cupidatat quis sunt tempor proident. Labore ullamco ullamco ex Lorem laboris veniam mollit in sint eiusmod.\r\n", + "address": "4 Bedford Place", + "city": "Outlook", + "state": "Marshall Islands", + "zip": 74859, + "country": "Canada", + "email": "marcierose@scentric.com", + "phone": "(968) 546-3854", + "color": "rgb(211,242,218)" + }, + { + "index": 33, + "name": "Lindsay Vega", + "first": "Loraine", + "last": "Castro", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/timmillwood/73.jpg", + "boolean": true, + "guid": "e380ab32-0565-4177-8396-017f4ffea65f", + "integer": 16, + "date": "Thu Aug 30 1984 16:22:17 GMT-0700 (PDT)", + "shortText": "aliquip veniam duis mollit incididunt", + "mediumText": "Ut ea cillum magna nulla eiusmod velit ullamco proident quis quis duis. Culpa aliqua sint excepteur id sint velit. Ex ut consectetur occaecat officia excepteur non sit reprehenderit laboris.", + "longText": "Culpa deserunt adipisicing non anim. Elit do veniam proident incididunt dolore ut et occaecat. Ut reprehenderit commodo irure velit deserunt velit et esse nisi labore officia do nisi quis. Do reprehenderit ex exercitation tempor esse esse cupidatat. Consequat occaecat nisi adipisicing mollit excepteur adipisicing velit nostrud ex do. Et dolor labore exercitation nostrud laboris amet nostrud labore.\r\nAmet aliqua dolore velit sint non. Velit in esse aute esse nulla et quis nulla ut excepteur commodo. Culpa veniam consectetur ut ullamco minim culpa Lorem dolor aute amet qui cillum nulla id.\r\nSint excepteur in culpa occaecat minim deserunt aliquip mollit cupidatat ipsum et mollit ad deserunt. Sunt eu aliquip ut nulla cillum commodo laboris labore nisi ut dolore amet. Magna sunt ipsum ut officia pariatur dolore elit ullamco velit qui Lorem duis. Enim anim quis et incididunt aute sit consectetur. Amet non commodo exercitation quis tempor labore ex do eu et anim voluptate.\r\nIncididunt sit esse fugiat velit incididunt cillum. Est elit do deserunt elit excepteur do. Adipisicing est tempor cillum consequat.\r\nEst consectetur elit ad nisi reprehenderit tempor eiusmod culpa reprehenderit veniam anim. Mollit minim nulla commodo excepteur occaecat nulla ex deserunt irure nisi aliquip. Enim ullamco sunt duis veniam mollit nulla dolor elit nulla.\r\n", + "address": "4 Robert Street", + "city": "Ellerslie", + "state": "Indiana", + "zip": 16816, + "country": "US Minor Outlying Islands", + "email": "lorainecastro@scentric.com", + "phone": "(816) 465-3014", + "color": "rgb(76,135,180)" + }, + { + "index": 34, + "name": "Hughes Flynn", + "first": "Fry", + "last": "Harmon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/butchewing/73.jpg", + "boolean": true, + "guid": "bcaa95bc-6077-4332-84f7-c432a0f25269", + "integer": 52, + "date": "Thu Sep 22 1983 12:18:11 GMT-0700 (PDT)", + "shortText": "consectetur voluptate et enim sint", + "mediumText": "Veniam duis ut aute id occaecat nisi officia qui ut anim magna eiusmod quis non. Qui duis ad nostrud et sint eu est consectetur amet ad id velit enim.", + "longText": "Cillum labore in voluptate sit pariatur laborum laboris veniam anim officia tempor. Ad nisi amet enim consequat do est est ut deserunt sunt commodo cupidatat aliqua. Irure ad dolor officia veniam commodo labore incididunt. Ex aliquip ad dolor fugiat exercitation minim cillum exercitation eiusmod velit. Aliqua minim minim exercitation dolore dolor laboris.\r\nEnim cillum do consectetur occaecat dolor nulla. Et officia culpa ad et ea irure culpa laboris ullamco ea enim aliquip proident eiusmod. Irure veniam ipsum fugiat sint exercitation deserunt commodo eu consectetur amet nostrud aute duis ullamco.\r\nAliqua minim veniam dolore exercitation non in ipsum irure et culpa irure labore excepteur exercitation. Ad reprehenderit officia deserunt velit aliqua consectetur commodo magna magna consectetur reprehenderit Lorem. Elit qui officia cillum do duis cillum. Non quis proident cillum et non deserunt elit voluptate commodo minim non. Ad occaecat dolor dolore incididunt voluptate proident.\r\n", + "address": "2 Logan Street", + "city": "Cataract", + "state": "Tennessee", + "zip": 16373, + "country": "East Timor", + "email": "fryharmon@scentric.com", + "phone": "(810) 510-3744", + "color": "rgb(157,152,156)" + }, + { + "index": 35, + "name": "Massey Merritt", + "first": "Cooper", + "last": "Sampson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dotmariusz/73.jpg", + "boolean": false, + "guid": "b3614dbf-f75d-410c-9a0a-8d805f386b40", + "integer": 75, + "date": "Tue Feb 03 1981 16:12:08 GMT-0800 (PST)", + "shortText": "enim ad ea mollit aute", + "mediumText": "Aute exercitation magna do veniam ea sunt qui id aliquip do eiusmod. Ipsum veniam cillum tempor labore. Est nostrud ut Lorem dolore. Id ad amet fugiat aliquip ea ut veniam nulla aliquip dolor.", + "longText": "Quis culpa quis nulla sunt proident consectetur ex reprehenderit est fugiat duis enim minim. Elit et culpa ex ipsum et amet eu quis exercitation et laborum ullamco commodo do. Tempor in elit veniam deserunt proident fugiat est ea excepteur et ipsum eu magna. Adipisicing ad elit officia ea velit veniam nostrud ullamco. Id nostrud exercitation esse labore dolore do.\r\nOfficia labore nulla amet ipsum. Reprehenderit dolore qui elit labore nisi ullamco dolor aliqua consequat sunt reprehenderit labore. Ad ea dolore anim proident quis reprehenderit quis consectetur ea.\r\n", + "address": "4 Doscher Street", + "city": "Bagtown", + "state": "Palau", + "zip": 32759, + "country": "Denmark", + "email": "coopersampson@scentric.com", + "phone": "(982) 438-3850", + "color": "rgb(248,164,122)" + }, + { + "index": 36, + "name": "Estelle Owen", + "first": "Rosa", + "last": "Velazquez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/aaronbeashel/73.jpg", + "boolean": false, + "guid": "bb33bd2d-a4cd-4bf2-a3f7-d82b5e108068", + "integer": 67, + "date": "Fri Jul 11 2003 11:54:17 GMT-0700 (PDT)", + "shortText": "officia consequat proident", + "mediumText": "Ex velit velit mollit consectetur eiusmod in do minim id esse excepteur nulla est. Reprehenderit incididunt deserunt ea excepteur nostrud voluptate nisi exercitation ea excepteur magna deserunt cillum proident. Exercitation minim velit sit fugiat sint ut cillum consectetur ullamco exercitation enim aliqua in aute. Laborum consequat amet aliquip laborum quis.", + "longText": "Non est irure amet eiusmod Lorem nostrud. Tempor est ut nisi nisi ullamco pariatur mollit proident eu magna sit. Amet tempor sint ut deserunt sint cillum aute anim officia mollit ex exercitation ea laborum.\r\nIn proident magna exercitation ut do. Lorem minim cillum do velit amet deserunt incididunt duis adipisicing laboris dolore officia. Sint ea id culpa labore aute sit cillum. Ut ad nisi ex culpa. Aliqua nostrud do culpa incididunt ut eiusmod nulla irure duis reprehenderit cillum. Cupidatat ea est non id cillum non adipisicing et adipisicing veniam cillum dolor ex.\r\n", + "address": "2 Wakeman Place", + "city": "Morgandale", + "state": "Virginia", + "zip": 43228, + "country": "Yemen", + "email": "rosavelazquez@scentric.com", + "phone": "(887) 500-3974", + "color": "rgb(112,251,244)" + }, + { + "index": 37, + "name": "Jamie Clarke", + "first": "Claire", + "last": "Jefferson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jina/73.jpg", + "boolean": true, + "guid": "44d98ab6-0a88-43f9-8c15-02c24bfe5a10", + "integer": 47, + "date": "Mon Aug 31 1992 20:48:08 GMT-0700 (PDT)", + "shortText": "aliqua nisi excepteur dolore", + "mediumText": "Aliqua ullamco labore occaecat laborum culpa anim exercitation. Deserunt cupidatat tempor id eu cupidatat magna veniam amet aute ea mollit.", + "longText": "Amet cupidatat eiusmod occaecat nostrud eu cillum culpa irure pariatur quis sit in. Ea id anim tempor duis sunt cillum veniam laborum culpa occaecat reprehenderit do commodo minim. Dolor aliquip cillum magna Lorem aliqua exercitation officia nisi id voluptate esse. Laborum occaecat velit deserunt tempor laboris sunt duis incididunt tempor dolore. Aliquip magna amet culpa culpa reprehenderit veniam commodo dolor fugiat commodo eu. Adipisicing veniam ipsum irure quis consectetur voluptate enim officia.\r\nNon occaecat proident nostrud do cillum ipsum tempor sit magna qui. Cupidatat Lorem aliqua adipisicing mollit. Consequat sint do pariatur est. Minim laborum duis eiusmod do do do qui Lorem. Labore anim laborum do fugiat tempor ut. Aliqua culpa id aliqua velit Lorem do consectetur consequat sunt aliqua.\r\n", + "address": "2 Jerome Avenue", + "city": "Cliff", + "state": "Wyoming", + "zip": 10308, + "country": "Laos", + "email": "clairejefferson@scentric.com", + "phone": "(897) 481-2359", + "color": "rgb(219,64,230)" + }, + { + "index": 38, + "name": "Louella Vincent", + "first": "Frieda", + "last": "Butler", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gu5taf/73.jpg", + "boolean": true, + "guid": "8169ff1e-f098-4cf7-9e00-35457f189340", + "integer": 65, + "date": "Mon Sep 09 2013 00:02:00 GMT-0700 (PDT)", + "shortText": "qui cupidatat sit velit", + "mediumText": "Sunt ad et exercitation aliqua consectetur commodo commodo adipisicing magna irure. Duis sint non duis ipsum pariatur ut pariatur dolor cillum anim et mollit laboris minim.", + "longText": "Excepteur enim laborum eiusmod exercitation aute id veniam non et ullamco. Ipsum veniam adipisicing non dolor id ad quis ex. Ipsum aliquip excepteur sunt irure adipisicing enim exercitation irure minim proident nulla ipsum id nulla. Adipisicing est do aliquip esse consectetur ipsum minim exercitation pariatur. Elit irure eiusmod commodo voluptate proident veniam quis do aliquip commodo. Amet labore incididunt exercitation commodo dolore officia ipsum ea non irure occaecat voluptate pariatur. Pariatur dolore do occaecat Lorem enim culpa cillum adipisicing incididunt labore.\r\nFugiat veniam ut culpa adipisicing cupidatat exercitation ea laboris consectetur reprehenderit nulla eiusmod ut. Tempor in non esse labore dolore labore qui duis. Duis esse consequat ex duis ea dolore voluptate id exercitation sunt eiusmod pariatur nisi ut. Excepteur amet et eu magna et.\r\nReprehenderit occaecat sunt elit cupidatat. Nostrud cupidatat id fugiat fugiat veniam mollit nostrud cillum. Laboris est ut esse cillum. Aute tempor ex veniam qui culpa deserunt mollit enim commodo velit eu. Et in adipisicing veniam sint id duis sint nulla. Ad voluptate aliquip consectetur commodo in. Exercitation ea sint non exercitation labore esse cillum.\r\nFugiat deserunt reprehenderit aliquip officia exercitation labore cupidatat pariatur aliqua in Lorem. Amet aliquip excepteur laborum do eiusmod aliqua minim anim dolore elit. Elit aute ex fugiat mollit excepteur.\r\n", + "address": "3 Rockwell Place", + "city": "Grimsley", + "state": "Colorado", + "zip": 38741, + "country": "Sierra Leone", + "email": "friedabutler@scentric.com", + "phone": "(867) 520-2422", + "color": "rgb(159,133,82)" + }, + { + "index": 39, + "name": "Schultz Rosario", + "first": "Juliana", + "last": "Gutierrez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/antonkudin/73.jpg", + "boolean": true, + "guid": "c238f75a-9f6d-41fe-bfc7-7035f020fdfa", + "integer": 62, + "date": "Tue Sep 13 1988 04:52:35 GMT-0700 (PDT)", + "shortText": "enim", + "mediumText": "Esse mollit anim dolore tempor qui aliqua Lorem. Eu adipisicing culpa nisi est commodo fugiat minim aute deserunt officia sint cillum.", + "longText": "Mollit enim deserunt aliqua nisi officia consectetur. Nostrud et ipsum eiusmod et. Proident nisi magna adipisicing occaecat consequat ut officia ea nisi proident voluptate duis commodo in. Aliquip velit fugiat Lorem ad est quis eiusmod consectetur dolore laborum voluptate minim nisi et. Pariatur non et elit laboris adipisicing reprehenderit laboris nisi. Ut laborum sint consectetur tempor excepteur in velit voluptate dolor ipsum consequat nisi.\r\nNon excepteur incididunt culpa incididunt et pariatur excepteur voluptate commodo esse. Commodo eiusmod duis ut cupidatat sint fugiat nisi ad anim enim. Pariatur qui ad aute deserunt do irure non quis et excepteur ullamco eu laboris. Qui enim velit minim tempor irure duis.\r\nQui id minim ullamco ex est elit Lorem aliqua officia ut cillum. Voluptate aute do qui pariatur nisi deserunt eu. Officia incididunt sit cillum consectetur anim fugiat sit et ad est tempor nulla fugiat mollit.\r\nEx magna ex do aute non esse excepteur. Est excepteur voluptate eiusmod eu esse ad eiusmod nisi ad. Quis irure laboris est fugiat aute culpa deserunt non ut mollit ea nisi occaecat enim.\r\nQuis dolore amet quis exercitation reprehenderit proident nisi excepteur veniam occaecat ipsum. Consectetur ad elit do quis mollit pariatur deserunt. Culpa qui cillum nulla incididunt incididunt ad nostrud duis. Deserunt pariatur non consequat sint occaecat ad dolor in mollit deserunt nulla laboris. Do eiusmod aute proident nulla eiusmod sunt voluptate.\r\n", + "address": "3 Loring Avenue", + "city": "Mulberry", + "state": "Utah", + "zip": 65299, + "country": "Nigeria", + "email": "julianagutierrez@scentric.com", + "phone": "(968) 541-2220", + "color": "rgb(102,250,175)" + }, + { + "index": 40, + "name": "April Mejia", + "first": "Mallory", + "last": "Gross", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/derekebradley/73.jpg", + "boolean": true, + "guid": "09c07ac9-6428-420c-9244-e97b458cef1c", + "integer": 95, + "date": "Mon Oct 10 1977 19:43:28 GMT-0700 (PDT)", + "shortText": "eiusmod voluptate eiusmod exercitation", + "mediumText": "Esse est laboris sint commodo enim ut fugiat excepteur pariatur eiusmod cillum. Occaecat occaecat cupidatat et occaecat do Lorem. Ad culpa sint magna tempor ex magna. Eu fugiat nisi exercitation sit ex in ad est occaecat officia ullamco pariatur non. Sit esse consequat deserunt enim.", + "longText": "Id pariatur ullamco officia excepteur. Excepteur occaecat nulla magna excepteur Lorem in laboris proident veniam veniam Lorem sint pariatur labore. Anim incididunt sint ea eiusmod tempor magna sit ullamco. Pariatur cillum id ullamco mollit tempor aute pariatur reprehenderit quis nulla quis elit. Irure duis voluptate consectetur ex anim ad. Ipsum do labore mollit commodo et cillum dolore est labore amet amet esse est. Duis et minim anim non magna sit incididunt aute consequat occaecat voluptate esse aliqua in.\r\nSint officia ad occaecat reprehenderit et velit eu consequat et esse. Occaecat et deserunt aute nulla aliqua occaecat eiusmod fugiat irure ut dolore incididunt. Ea magna magna velit consequat commodo id aliqua ad pariatur minim laborum ad.\r\nExercitation id reprehenderit enim consequat ea sunt labore cillum. Lorem tempor eiusmod elit amet velit incididunt occaecat. Amet aute tempor ea eu nostrud est velit. Amet est do duis ut do Lorem sint amet eiusmod.\r\nIrure mollit exercitation eu non. Labore ullamco do amet occaecat aute consectetur voluptate. Quis esse cillum laborum mollit exercitation. Officia quis consectetur cillum fugiat ullamco exercitation non dolore voluptate aute ex id. Ad culpa nisi quis non voluptate amet cillum in. Laborum occaecat ad aliquip aute veniam adipisicing non proident consequat voluptate commodo.\r\nVeniam anim sit officia laboris. Incididunt est ea magna nulla anim magna mollit reprehenderit adipisicing sit. Labore ex et do eu eu. Officia nostrud consectetur proident sint. Cillum dolor dolore consectetur ullamco. Reprehenderit veniam fugiat elit culpa nisi laborum magna. Consequat ea excepteur sint enim exercitation occaecat Lorem nisi culpa deserunt.\r\n", + "address": "2 Crawford Avenue", + "city": "Winchester", + "state": "Idaho", + "zip": 61697, + "country": "Netherlands", + "email": "mallorygross@scentric.com", + "phone": "(822) 493-3031", + "color": "rgb(161,51,155)" + }, + { + "index": 41, + "name": "Vicki Phelps", + "first": "Elsie", + "last": "Hahn", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/karachentsov/73.jpg", + "boolean": false, + "guid": "1dc69b61-c106-4a7b-83c6-e05dfed45668", + "integer": 88, + "date": "Wed Mar 28 2001 03:43:02 GMT-0800 (PST)", + "shortText": "ipsum eiusmod laboris proident", + "mediumText": "Nisi incididunt in commodo duis culpa voluptate sit laborum. Consectetur do exercitation irure nostrud.", + "longText": "Eu culpa eiusmod do sit aliquip consequat. Consectetur aliquip non culpa id reprehenderit labore non dolore in voluptate voluptate. Nisi in exercitation reprehenderit fugiat duis ea consequat nostrud labore enim ut sit.\r\nAdipisicing eiusmod mollit ipsum dolor et nisi irure elit sunt laboris. Proident tempor incididunt et consectetur fugiat nisi excepteur do nisi irure aliqua. Sit aliqua sint aute ut.\r\nFugiat quis ad nisi sunt consectetur ut ullamco laboris. Ut ea laboris ipsum Lorem eiusmod incididunt. Excepteur minim adipisicing nisi exercitation enim consectetur voluptate sunt. Est consequat irure ipsum ex qui laboris tempor. Commodo duis minim ullamco labore proident minim. Aliqua aliquip cillum dolore qui nostrud. Irure adipisicing mollit tempor occaecat excepteur.\r\nCupidatat nisi adipisicing adipisicing officia consectetur et. Laborum deserunt aute non culpa in ea aliqua sit. Sit esse incididunt qui veniam quis do excepteur exercitation nisi ipsum adipisicing quis. Mollit cupidatat occaecat adipisicing nisi irure pariatur exercitation id esse id tempor sunt. Quis deserunt eiusmod dolore ut esse eu consectetur consectetur ea veniam amet adipisicing nisi. Excepteur voluptate consectetur dolor sint nisi laborum aute eiusmod ea.\r\nNon ex eiusmod dolore est ea exercitation et quis deserunt culpa nostrud aliqua. Qui non qui laboris dolor reprehenderit enim deserunt cupidatat consequat dolore ex. In voluptate pariatur ullamco non laborum velit ea minim cillum consequat eu. Est ullamco proident ad fugiat aliqua occaecat est. Nisi dolore irure velit excepteur aliquip incididunt irure non voluptate.\r\n", + "address": "2 Coles Street", + "city": "Stockwell", + "state": "Arkansas", + "zip": 39778, + "country": "Morocco", + "email": "elsiehahn@scentric.com", + "phone": "(821) 517-2066", + "color": "rgb(63,164,79)" + }, + { + "index": 42, + "name": "Faulkner Mcdaniel", + "first": "Hayes", + "last": "Ball", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/emmeffess/73.jpg", + "boolean": false, + "guid": "731380cb-785a-4aa3-9e6c-281953a83daf", + "integer": 85, + "date": "Fri Jul 25 1980 06:28:07 GMT-0700 (PDT)", + "shortText": "sunt magna aliquip", + "mediumText": "Pariatur ipsum adipisicing ut quis.", + "longText": "Veniam veniam enim Lorem eu mollit consectetur ea qui est pariatur. Magna occaecat sit est exercitation exercitation irure laboris enim commodo consequat tempor mollit. Id ea elit proident exercitation. Dolore reprehenderit nostrud nostrud exercitation eiusmod nulla.\r\nDo amet duis excepteur ullamco cillum velit. Consectetur adipisicing fugiat non dolore fugiat ipsum qui est elit enim consequat Lorem laboris proident. Aliquip reprehenderit ut reprehenderit anim sunt ex. Adipisicing aliquip sint Lorem minim laborum dolor minim tempor laboris. Exercitation ad aute ullamco ea deserunt adipisicing laborum fugiat proident adipisicing veniam ut veniam laborum. Id reprehenderit labore ea esse ea officia cillum. Sit sunt pariatur cupidatat mollit velit qui ut.\r\nElit mollit do non dolor quis Lorem anim aliqua occaecat aute reprehenderit irure. Sit do labore pariatur id. Anim ad veniam ea Lorem reprehenderit ipsum minim. In elit irure nulla elit elit sit in sunt incididunt magna. Pariatur commodo anim magna ut aliquip nulla nostrud commodo aliquip incididunt commodo est. Nulla enim nostrud qui commodo reprehenderit.\r\n", + "address": "2 Cheever Place", + "city": "Interlochen", + "state": "Delaware", + "zip": 14410, + "country": "Czech Republic", + "email": "hayesball@scentric.com", + "phone": "(875) 561-3839", + "color": "rgb(215,92,182)" + }, + { + "index": 43, + "name": "Wilson Booth", + "first": "Baker", + "last": "Slater", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bmovement/73.jpg", + "boolean": false, + "guid": "4357bfc6-3fa0-41e3-8a7b-0ab1f0a2e139", + "integer": 16, + "date": "Tue Aug 18 1998 18:43:53 GMT-0700 (PDT)", + "shortText": "sunt reprehenderit fugiat in est", + "mediumText": "Exercitation nisi ut enim do incididunt eiusmod cupidatat aliquip occaecat sit occaecat elit consequat sunt. Cupidatat fugiat dolor ea proident ipsum officia exercitation reprehenderit dolore elit.", + "longText": "Et in ipsum duis amet aute qui commodo fugiat eiusmod. Enim veniam nisi non sunt ex esse eiusmod. Non amet et ex cupidatat. Veniam laboris do proident et in reprehenderit incididunt ut velit enim aliqua. Quis adipisicing tempor consequat consequat commodo consequat do. Minim laboris nostrud duis tempor aliqua fugiat pariatur incididunt Lorem nostrud velit ad.\r\nAliquip commodo laborum culpa consequat aliquip voluptate irure sit excepteur reprehenderit enim ullamco veniam do. Minim elit quis laborum eiusmod incididunt proident nostrud do laboris. Deserunt non nostrud minim ut qui proident incididunt est elit pariatur nisi. Eiusmod reprehenderit sit deserunt aliqua aliqua. Reprehenderit id pariatur magna sunt fugiat labore veniam velit pariatur minim occaecat. Nostrud duis est magna ad ad consequat proident ut laboris aliquip. Magna duis est non reprehenderit minim nulla est cupidatat ut officia do sit.\r\nPariatur officia culpa ullamco sunt. Adipisicing amet amet culpa excepteur proident officia. In dolor aliqua nostrud tempor tempor elit tempor exercitation enim sint.\r\nQuis aliqua velit magna ad occaecat minim velit eiusmod ex consequat ad nisi adipisicing. Veniam et culpa sunt ex ad non ut ad in qui magna dolor nostrud incididunt. Aliquip minim elit eu exercitation pariatur irure id non occaecat id id commodo. Ea excepteur et excepteur Lorem eiusmod elit ex laborum labore et cillum cillum. Lorem consequat non culpa eu Lorem do amet nulla velit ullamco cillum.\r\nVelit nisi consectetur dolore amet irure tempor voluptate laborum. Id sit incididunt aute nostrud fugiat adipisicing incididunt excepteur anim sunt et id deserunt. Voluptate incididunt sunt anim enim laboris. Laboris id sit aliqua nisi cillum cupidatat ipsum. Laborum veniam adipisicing velit nulla eu commodo quis do.\r\n", + "address": "2 Arlington Avenue", + "city": "Welda", + "state": "Federated States Of Micronesia", + "zip": 13497, + "country": "Cape Verde", + "email": "bakerslater@scentric.com", + "phone": "(980) 527-2867", + "color": "rgb(98,119,186)" + }, + { + "index": 44, + "name": "Galloway Michael", + "first": "Martha", + "last": "Knight", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/taiyab/73.jpg", + "boolean": false, + "guid": "a12acd83-99f7-4c53-8849-e0c0a8aef81f", + "integer": 41, + "date": "Sun Jan 15 2006 04:41:03 GMT-0800 (PST)", + "shortText": "cillum fugiat cupidatat", + "mediumText": "Cupidatat eiusmod nisi commodo aute deserunt ea labore aute aliquip consequat voluptate aliquip aliqua sunt. Culpa cillum ex quis ad in nisi enim.", + "longText": "Enim ad pariatur esse ea officia ullamco consectetur ut adipisicing culpa voluptate Lorem do. Voluptate mollit enim dolore laboris Lorem id in Lorem aliquip mollit. Enim aliquip occaecat amet cupidatat elit dolor officia magna qui aute sit. In elit tempor pariatur sunt velit ad anim laboris do dolor et nisi anim voluptate. Proident aliquip anim veniam cillum ullamco laborum. Adipisicing occaecat voluptate deserunt ad consequat fugiat laborum aute fugiat deserunt exercitation incididunt. In do tempor amet excepteur non enim tempor excepteur reprehenderit anim sit aute.\r\nAmet ea est dolor adipisicing sit occaecat occaecat incididunt commodo. Veniam officia esse excepteur excepteur nostrud deserunt elit minim amet eu quis non. Quis duis tempor pariatur aute. Anim anim tempor in nisi Lorem do do adipisicing. Exercitation fugiat elit nisi nostrud aliquip id cillum exercitation elit non cupidatat. Irure ea nulla quis aliquip nulla ex exercitation est velit eiusmod.\r\nDeserunt aute nisi exercitation sunt aliquip aute proident incididunt dolor commodo non pariatur mollit laborum. Minim tempor deserunt labore non sit duis culpa. Commodo velit duis quis aliqua fugiat sit sint labore magna officia sunt eiusmod magna. Deserunt est nisi ad fugiat consectetur commodo voluptate amet nulla sit. Incididunt do adipisicing irure minim eiusmod aliqua et pariatur pariatur tempor irure.\r\n", + "address": "4 Willoughby Street", + "city": "Calverton", + "state": "Guam", + "zip": 21650, + "country": "Madagascar", + "email": "marthaknight@scentric.com", + "phone": "(893) 423-2241", + "color": "rgb(87,159,93)" + }, + { + "index": 45, + "name": "Mcintosh Evans", + "first": "Slater", + "last": "Erickson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rigelstpierre/73.jpg", + "boolean": false, + "guid": "1fa2a893-38af-4f5a-8580-a8a20f0edffe", + "integer": 89, + "date": "Wed Sep 03 2003 04:11:03 GMT-0700 (PDT)", + "shortText": "eiusmod in labore id", + "mediumText": "Cillum labore pariatur in occaecat eu. Ipsum reprehenderit occaecat ipsum in id velit pariatur ut duis. Dolor esse dolor eiusmod est duis. Elit nulla commodo cillum proident tempor anim qui nulla laboris cillum occaecat consequat.", + "longText": "Id qui sunt excepteur Lorem in occaecat id. Culpa eu dolore cupidatat cillum labore aute officia. Cupidatat ex dolore excepteur aliqua sunt elit qui excepteur sit amet sint adipisicing dolore.\r\nSint consequat ullamco exercitation anim et commodo. Mollit ad aute dolor in veniam tempor ullamco nisi ex id cupidatat incididunt. Veniam cupidatat et enim aliqua laboris officia. Dolor ipsum excepteur elit enim ipsum enim est labore do amet duis cupidatat aliqua. Officia occaecat in ex enim officia id culpa sint. Aliquip magna duis ut ea aliquip duis non ad.\r\nDolor mollit exercitation reprehenderit commodo sunt aute commodo aliquip. Aute qui culpa aliquip magna in enim occaecat quis. Proident magna sunt do tempor. Minim laboris aliqua esse culpa anim. Eu laborum ut ea nostrud excepteur laboris. Velit veniam nostrud deserunt incididunt sit incididunt Lorem cillum enim ullamco ipsum cupidatat ea laborum.\r\n", + "address": "4 Meeker Avenue", + "city": "Mansfield", + "state": "Pennsylvania", + "zip": 64998, + "country": "Austria", + "email": "slatererickson@scentric.com", + "phone": "(916) 568-2718", + "color": "rgb(61,216,133)" + }, + { + "index": 46, + "name": "Garrison Conway", + "first": "Beck", + "last": "Potts", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/vlajki/73.jpg", + "boolean": true, + "guid": "f4aa8b8b-f3b1-4a47-9625-0213a3ab6e8d", + "integer": 90, + "date": "Thu Jun 21 1979 14:10:02 GMT-0700 (PDT)", + "shortText": "adipisicing irure", + "mediumText": "Elit do ipsum sint qui non nulla laborum aute.", + "longText": "Sint voluptate ad irure laborum. Aliqua incididunt dolore do irure enim aliquip non officia sunt nisi consectetur. Ex laborum reprehenderit dolore laborum voluptate sit adipisicing consequat adipisicing culpa nisi ipsum anim aliqua. In est fugiat officia ullamco velit ut duis sit sint anim ex minim cupidatat. Commodo incididunt cillum non adipisicing tempor. Pariatur adipisicing dolore ut aliqua magna non amet.\r\nUt ex id enim cillum veniam consectetur ipsum sit cillum. Adipisicing qui cillum mollit consequat nulla quis elit nostrud et. Cillum dolore non voluptate magna qui officia. Lorem in quis incididunt dolore ut. Adipisicing do id fugiat elit ullamco pariatur culpa nisi.\r\nCommodo culpa dolore aliqua ex ex mollit minim. Duis cupidatat ipsum sunt quis amet est minim aute Lorem non proident. Duis cillum Lorem quis velit.\r\nTempor incididunt reprehenderit eiusmod adipisicing amet exercitation. Duis occaecat eu consequat ea officia occaecat enim Lorem ullamco. Non commodo cillum sunt amet nulla ex officia ut duis sunt. Enim minim anim minim anim non minim ad magna tempor Lorem. Enim cupidatat nostrud in sunt officia occaecat esse cupidatat. Sint veniam ullamco qui consectetur duis fugiat pariatur ad proident mollit.\r\nAd consectetur elit aute sit nostrud. Culpa non esse non nostrud id anim nulla aute in laboris id duis magna cillum. Sunt cillum ut id laborum tempor reprehenderit excepteur ut velit aliqua ad ipsum ut incididunt. Eiusmod qui quis ea deserunt excepteur amet culpa eiusmod eiusmod.\r\n", + "address": "3 Troy Avenue", + "city": "Witmer", + "state": "New Hampshire", + "zip": 85501, + "country": "Venezuela", + "email": "beckpotts@scentric.com", + "phone": "(865) 596-2021", + "color": "rgb(156,172,221)" + }, + { + "index": 47, + "name": "Hopper Anthony", + "first": "Pugh", + "last": "Douglas", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/leeiio/73.jpg", + "boolean": true, + "guid": "d522fa57-486b-4ca9-9ee2-f4bddc8d8db0", + "integer": 32, + "date": "Wed Mar 16 1988 07:04:05 GMT-0800 (PST)", + "shortText": "ullamco sit elit", + "mediumText": "Nisi fugiat irure amet fugiat. Commodo ut nisi dolore cillum officia culpa. Veniam in duis aliquip voluptate do pariatur nostrud cupidatat amet consectetur reprehenderit id dolore. Anim adipisicing mollit ut enim aliqua ex elit aute ea culpa mollit. Sit cillum ut excepteur officia ullamco irure aute culpa elit.", + "longText": "Quis non cillum et sit enim culpa tempor. Veniam velit eu dolor pariatur in aute. Et tempor Lorem ad velit fugiat Lorem sunt aliqua exercitation laboris ad.\r\nExcepteur laboris et magna ea nostrud ut cillum. Exercitation anim cupidatat magna non pariatur id enim esse ullamco adipisicing deserunt anim. Duis sint nisi est voluptate deserunt proident anim nisi consequat labore culpa aliqua. Sit amet consequat ad occaecat cupidatat tempor eiusmod nostrud Lorem magna labore mollit in.\r\nPariatur qui anim culpa ex. In nostrud aliqua non adipisicing. Quis labore magna aliqua magna.\r\nAute commodo consectetur elit minim exercitation eiusmod non commodo. Aute deserunt non quis ullamco culpa ex et mollit nisi dolor. Minim amet eiusmod mollit esse Lorem eu reprehenderit nisi cillum eiusmod fugiat nostrud tempor duis. Officia quis commodo pariatur esse excepteur officia. In non incididunt aliquip mollit dolore ex labore.\r\nExcepteur commodo eu proident fugiat nulla. Minim excepteur consequat officia esse dolore irure qui anim culpa in deserunt consectetur laborum in. Exercitation in esse ad aliquip commodo. Irure duis pariatur eiusmod culpa enim mollit tempor Lorem qui proident ad. Qui exercitation elit culpa ex non dolor do pariatur proident. Anim ut velit minim voluptate labore in commodo excepteur irure proident amet officia cupidatat.\r\n", + "address": "3 Madoc Avenue", + "city": "Norfolk", + "state": "North Dakota", + "zip": 73808, + "country": "Hong Kong", + "email": "pughdouglas@scentric.com", + "phone": "(829) 562-3502", + "color": "rgb(70,112,74)" + }, + { + "index": 48, + "name": "Edwina Wiley", + "first": "Margo", + "last": "Hodges", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/brad_frost/73.jpg", + "boolean": false, + "guid": "363f5f6a-2d42-4e87-845c-7cf7b881d3fa", + "integer": 26, + "date": "Fri Dec 07 2012 11:20:25 GMT-0800 (PST)", + "shortText": "fugiat fugiat", + "mediumText": "Ex commodo sit quis commodo fugiat Lorem aliquip mollit fugiat mollit veniam.", + "longText": "Ea ea aliquip consectetur in labore eu fugiat voluptate nisi ipsum sunt. Occaecat id sit qui officia culpa laboris. Deserunt aliqua duis est sint.\r\nProident consequat occaecat cillum occaecat occaecat adipisicing laboris exercitation sit ut non dolor culpa consectetur. Ipsum ex reprehenderit veniam aliquip esse. Est commodo tempor fugiat id laborum duis do fugiat magna eiusmod eiusmod. Sit sit est anim officia consequat Lorem commodo qui velit duis. Adipisicing ipsum mollit ipsum in deserunt adipisicing ad culpa dolore. Nisi excepteur consectetur id proident fugiat proident reprehenderit magna.\r\nConsectetur duis ipsum occaecat culpa sit in. Tempor elit amet est Lorem elit consectetur fugiat tempor magna. Nulla ullamco incididunt cillum quis ea. Voluptate officia officia officia sint quis cillum sit est. Aliquip non laborum et laboris in velit dolore mollit ad dolor velit amet ut laboris. Cillum sunt irure in in eu do ullamco.\r\n", + "address": "3 Vernon Avenue", + "city": "Yettem", + "state": "Northern Mariana Islands", + "zip": 84068, + "country": "Sri Lanka", + "email": "margohodges@scentric.com", + "phone": "(852) 558-3074", + "color": "rgb(56,222,148)" + }, + { + "index": 49, + "name": "Salazar Nolan", + "first": "Polly", + "last": "Mitchell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/alsobrooks/73.jpg", + "boolean": true, + "guid": "36295fa8-495e-4763-b920-b8e8d9e90105", + "integer": 28, + "date": "Mon May 08 2006 04:34:39 GMT-0700 (PDT)", + "shortText": "aliquip id commodo pariatur eu", + "mediumText": "Amet fugiat nisi ut eiusmod enim. Et id mollit voluptate dolore laborum cillum qui est laborum duis fugiat.", + "longText": "Qui cillum proident id irure quis sit. Sit nisi et fugiat amet exercitation eiusmod esse enim pariatur cupidatat. Esse proident velit reprehenderit fugiat.\r\nNostrud dolore eiusmod aliquip pariatur labore duis veniam laboris velit duis proident excepteur veniam. Proident fugiat velit nisi aute veniam. Irure pariatur ex eu tempor veniam nisi et eiusmod anim mollit dolore ad ex.\r\nEu quis dolor sit amet ut consequat magna nostrud quis sit. Laboris aliqua consectetur sit tempor consectetur aliqua exercitation officia minim magna duis. Laborum eu ut veniam magna. Nisi enim cillum adipisicing sint ex. Magna proident labore sint aliquip aute. Ut nulla exercitation laboris qui nulla do adipisicing voluptate do. Nulla ullamco nulla dolore cupidatat duis ea aute est ullamco.\r\n", + "address": "4 Pilling Street", + "city": "Rushford", + "state": "South Dakota", + "zip": 48734, + "country": "Turkmenistan", + "email": "pollymitchell@scentric.com", + "phone": "(891) 598-2904", + "color": "rgb(119,240,183)" + }, + { + "index": 50, + "name": "Pat Delgado", + "first": "Brown", + "last": "Perkins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thekishpatel/73.jpg", + "boolean": true, + "guid": "ec3986d2-8262-464b-bb60-352b533f186f", + "integer": 76, + "date": "Thu Jul 17 1975 16:18:22 GMT-0700 (PDT)", + "shortText": "voluptate est labore", + "mediumText": "Duis incididunt velit nulla consectetur ut labore. Ipsum culpa consectetur quis id velit nulla mollit cupidatat magna veniam consequat. Qui elit laboris veniam amet tempor Lorem dolore. Ex voluptate officia magna ipsum nulla eu Lorem.", + "longText": "Aute proident cupidatat laboris qui officia velit amet nostrud. Aliquip cupidatat sit pariatur ut id sint duis proident laborum sint aliquip. Qui cupidatat labore quis et ut magna fugiat laboris commodo proident ad ut. Consequat aute incididunt proident in cupidatat quis nisi exercitation. Et proident qui et occaecat ea minim.\r\nMinim ex do veniam do. Aliqua commodo minim dolore voluptate ullamco ea. Aliquip ad esse aliqua exercitation laboris qui incididunt dolore eu ut.\r\n", + "address": "3 Ash Street", + "city": "Loyalhanna", + "state": "Alaska", + "zip": 49922, + "country": "Burundi", + "email": "brownperkins@scentric.com", + "phone": "(908) 488-3939", + "color": "rgb(100,214,126)" + }, + { + "index": 51, + "name": "York Marks", + "first": "Janette", + "last": "Cherry", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iqonicd/73.jpg", + "boolean": false, + "guid": "0da3bbca-40ca-4a5d-ab2d-dc983c50ed75", + "integer": 20, + "date": "Sat May 08 2004 23:04:24 GMT-0700 (PDT)", + "shortText": "occaecat velit fugiat dolor", + "mediumText": "Ea non aute incididunt proident sit enim officia. Ad ea eiusmod ex nisi qui duis non consectetur amet minim. Lorem magna tempor consectetur qui reprehenderit nostrud officia incididunt.", + "longText": "Anim dolore minim consequat pariatur non veniam consequat veniam et exercitation mollit eu deserunt. Duis irure duis et cillum nisi sint sit velit. Duis Lorem ut aliqua eu ullamco Lorem proident pariatur aliqua velit amet voluptate.\r\nVeniam dolore velit proident qui sint anim ea. Id ea id Lorem laborum ea aute nulla tempor elit laboris laboris nulla veniam. Laborum duis reprehenderit aute ipsum. Cillum anim nostrud dolore id ex cillum excepteur officia ipsum elit do. Veniam officia duis do consectetur sunt exercitation reprehenderit.\r\nVelit pariatur sunt enim magna elit ex ex excepteur ex id. Aliquip et amet anim non non minim veniam. Ut aliqua non exercitation commodo culpa pariatur sunt do ea.\r\nEu commodo enim pariatur pariatur. Velit anim esse irure ea id qui duis nostrud anim amet. Do enim ut aliquip elit laboris dolor culpa culpa voluptate irure ex. Est labore officia qui est incididunt proident laborum excepteur ullamco cupidatat. Velit dolore aute non dolore voluptate nisi. In id ullamco consectetur incididunt Lorem ullamco.\r\n", + "address": "3 Hubbard Street", + "city": "Beason", + "state": "Louisiana", + "zip": 10084, + "country": "Western Sahara", + "email": "janettecherry@scentric.com", + "phone": "(828) 500-2593", + "color": "rgb(100,221,172)" + }, + { + "index": 52, + "name": "Wilkinson Nelson", + "first": "Florine", + "last": "Hobbs", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iamlechev/73.jpg", + "boolean": false, + "guid": "4fdb5837-9e84-4ee7-8c11-0bba68a3b621", + "integer": 20, + "date": "Sun Feb 26 2012 16:07:03 GMT-0800 (PST)", + "shortText": "veniam nulla incididunt", + "mediumText": "Officia amet incididunt enim duis veniam velit aute incididunt esse qui consequat. Sit nostrud tempor minim nulla excepteur est aliquip dolor esse.", + "longText": "Pariatur commodo tempor laboris nulla minim ut nostrud nostrud in non incididunt exercitation. Pariatur enim deserunt ad dolore ut laborum cupidatat et elit ullamco voluptate eiusmod. Anim labore incididunt voluptate nulla officia dolore ipsum culpa est cupidatat laborum proident.\r\n", + "address": "2 Dodworth Street", + "city": "Hall", + "state": "Missouri", + "zip": 21320, + "country": "Mozambique", + "email": "florinehobbs@scentric.com", + "phone": "(869) 544-3589", + "color": "rgb(208,253,152)" + }, + { + "index": 53, + "name": "Alta Wright", + "first": "Farley", + "last": "Santos", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/elliotpopel/73.jpg", + "boolean": false, + "guid": "19c307c0-cabb-4ab4-8b5e-857bf94a4838", + "integer": 46, + "date": "Tue Nov 27 1973 17:48:13 GMT-0800 (PST)", + "shortText": "do mollit", + "mediumText": "Proident irure in sunt id proident. Incididunt ipsum enim cupidatat nisi qui occaecat qui esse sint mollit nulla. Officia ad eiusmod eu consectetur occaecat mollit culpa deserunt qui exercitation mollit. Duis elit dolore occaecat Lorem sit minim consectetur qui culpa. Aliqua aute irure cupidatat commodo proident labore do aliqua aliquip officia.", + "longText": "Sunt aliqua laborum enim ipsum consequat adipisicing eu consequat labore sit cillum proident veniam proident. Et et sunt commodo aute nostrud mollit labore. Consequat in eu labore in incididunt officia esse mollit in minim minim mollit duis. Enim ea anim do voluptate eiusmod ut qui velit nostrud deserunt mollit.\r\nCommodo amet duis magna deserunt eu nulla eu sunt pariatur aliqua laborum cupidatat esse in. Quis do mollit nulla eiusmod exercitation. Ea eiusmod dolore minim sunt est irure minim non exercitation dolor veniam duis.\r\nIncididunt qui ex aliqua commodo qui aliquip duis. Ea dolore est duis esse sint nisi aliqua exercitation aute aliqua. Enim deserunt laboris eu eu duis nisi eu sint. Mollit est eu cillum excepteur id sit labore occaecat culpa minim adipisicing magna nulla.\r\nAd minim exercitation sunt nostrud quis. Fugiat quis officia officia irure aute eiusmod. Quis in officia do dolore duis duis. Veniam ipsum aute mollit officia pariatur deserunt. Reprehenderit adipisicing ipsum ut qui ex cupidatat sunt id nostrud reprehenderit. Eu incididunt magna duis et nisi minim exercitation laboris nisi. Adipisicing consectetur occaecat enim ad nisi voluptate ut aliquip ea labore do nulla laboris.\r\n", + "address": "3 Hanson Place", + "city": "Madaket", + "state": "Kentucky", + "zip": 95242, + "country": "Grenada", + "email": "farleysantos@scentric.com", + "phone": "(808) 507-2955", + "color": "rgb(143,68,160)" + }, + { + "index": 54, + "name": "Ivy Sparks", + "first": "Gray", + "last": "Paul", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/diesellaws/73.jpg", + "boolean": false, + "guid": "13f75baf-1bd4-4e7d-b527-a007260fe0bf", + "integer": 12, + "date": "Thu May 18 2000 12:52:37 GMT-0700 (PDT)", + "shortText": "laborum veniam ipsum", + "mediumText": "Consequat sit labore esse culpa ex officia eu enim ad sit. Deserunt consequat magna anim adipisicing eu est ipsum mollit est in. Proident et excepteur consectetur cupidatat eu aute ea magna amet qui ea culpa.", + "longText": "Dolore laborum anim sunt ea. Incididunt velit velit Lorem incididunt reprehenderit ea. Cupidatat esse laborum consectetur minim eiusmod nostrud occaecat. Elit esse cupidatat culpa tempor dolor laboris ad.\r\nIpsum ad veniam laboris eiusmod deserunt esse qui ullamco culpa magna sunt cupidatat ad. In pariatur aliquip voluptate quis voluptate qui. Minim ea velit excepteur eiusmod Lorem id consectetur tempor ex occaecat laboris ut tempor officia. Sunt irure exercitation ipsum sint elit amet duis irure.\r\n", + "address": "2 Conklin Avenue", + "city": "Sardis", + "state": "American Samoa", + "zip": 99662, + "country": "Cote D'Ivoire (Ivory Coast)", + "email": "graypaul@scentric.com", + "phone": "(896) 543-3314", + "color": "rgb(180,93,104)" + }, + { + "index": 55, + "name": "Henrietta Riddle", + "first": "Roman", + "last": "Dunlap", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/juanpablob/73.jpg", + "boolean": false, + "guid": "51bc59d2-dab6-443d-98ea-8171f77ad676", + "integer": 79, + "date": "Mon Oct 22 2007 23:28:02 GMT-0700 (PDT)", + "shortText": "sit", + "mediumText": "Est ex duis aliqua in adipisicing enim eu eiusmod consectetur. Reprehenderit nostrud aliquip sit nulla proident eu reprehenderit et minim do. Eiusmod laborum dolor ipsum exercitation nisi amet labore eu do laboris labore. Ad enim ut sunt anim reprehenderit culpa reprehenderit duis ullamco mollit.", + "longText": "Anim commodo voluptate eu voluptate voluptate sunt ipsum irure ipsum mollit cillum anim anim reprehenderit. Nulla ut reprehenderit enim occaecat consequat. Cupidatat Lorem eu qui id id adipisicing incididunt et cillum. Id enim sit cupidatat nulla ut enim consequat est sit sit culpa. Labore do consectetur pariatur qui labore proident dolor consectetur pariatur sit do tempor Lorem dolore. Et incididunt sint aliquip occaecat non dolor aute ea.\r\n", + "address": "2 Anna Court", + "city": "Stollings", + "state": "Minnesota", + "zip": 49877, + "country": "Philippines", + "email": "romandunlap@scentric.com", + "phone": "(852) 477-2611", + "color": "rgb(73,51,135)" + }, + { + "index": 56, + "name": "Odom Hicks", + "first": "Meyer", + "last": "Blackburn", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/whale/73.jpg", + "boolean": false, + "guid": "5cd1a911-4464-4653-9db3-05e55a0f306b", + "integer": 20, + "date": "Mon Jul 24 1978 17:22:48 GMT-0700 (PDT)", + "shortText": "excepteur ex cupidatat ipsum", + "mediumText": "Proident excepteur nostrud sint voluptate ad sint. Exercitation commodo amet nostrud occaecat sunt officia nulla eu. Adipisicing enim velit officia proident sint minim laboris magna officia laborum do occaecat pariatur laboris. Commodo minim ipsum anim amet esse deserunt in ea ad.", + "longText": "Incididunt est pariatur est culpa dolor duis dolore sunt duis dolor qui laboris. Aliqua dolore nostrud dolor commodo esse ex laborum proident et anim. Ut consectetur in minim minim officia mollit id quis. Tempor aliqua dolore esse culpa.\r\nNostrud duis est minim pariatur reprehenderit in qui do nulla non id. Incididunt magna enim reprehenderit incididunt magna tempor duis esse sunt esse commodo. Nulla ex anim laborum laboris. Culpa officia anim reprehenderit ex laboris labore proident exercitation deserunt deserunt ipsum ea esse et. Laborum laborum eiusmod Lorem consectetur consequat. Aute tempor voluptate laboris pariatur amet esse ut labore dolore sint qui. Occaecat aliqua excepteur sit labore.\r\n", + "address": "3 Bleecker Street", + "city": "Albrightsville", + "state": "Hawaii", + "zip": 67670, + "country": "Bermuda", + "email": "meyerblackburn@scentric.com", + "phone": "(812) 415-2585", + "color": "rgb(132,80,57)" + }, + { + "index": 57, + "name": "Dalton Bishop", + "first": "Schwartz", + "last": "Garcia", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kalmerrautam/73.jpg", + "boolean": true, + "guid": "cb6c4011-ab62-4469-bdd6-120762fbd8dc", + "integer": 31, + "date": "Thu Aug 29 2013 04:23:49 GMT-0700 (PDT)", + "shortText": "irure cupidatat adipisicing", + "mediumText": "Elit esse aute dolor officia cupidatat adipisicing duis fugiat aliqua nisi nisi. Culpa reprehenderit consequat voluptate proident in deserunt tempor sint amet ad pariatur. Mollit incididunt magna ullamco deserunt commodo excepteur esse esse commodo duis elit est duis. Sunt amet nisi dolor id laboris dolor exercitation ex exercitation proident pariatur anim. Duis nisi occaecat fugiat tempor sint est incididunt laboris cillum consectetur non cillum.", + "longText": "Eu esse Lorem veniam et dolor. Ad laboris exercitation adipisicing voluptate culpa ullamco ad non sunt ad veniam sit officia consequat. Est ea fugiat consectetur duis aliquip id in reprehenderit. Tempor officia enim tempor aliqua eu. Ut tempor duis minim ea eu proident. Nisi non eiusmod do tempor proident et commodo nisi nisi occaecat. Ullamco cupidatat eiusmod ex magna cillum nisi est.\r\nNisi consequat qui reprehenderit laboris dolor esse Lorem officia dolore ipsum exercitation do. Nulla nulla eiusmod nostrud incididunt ad elit ea non eiusmod incididunt reprehenderit culpa minim. Sint aliqua magna aliquip et magna. Fugiat ut voluptate irure aliquip consequat ut exercitation minim amet enim culpa.\r\nCulpa est pariatur aliquip non amet eu elit veniam Lorem velit nulla aute. Excepteur do commodo minim eu commodo dolore. Ex dolore ea irure adipisicing Lorem labore. Ipsum sit consequat aliquip tempor est. Labore deserunt incididunt et occaecat dolore est laborum exercitation exercitation dolore. Fugiat ipsum est proident anim ullamco ipsum labore fugiat consequat velit. Anim elit cillum ex laborum ad exercitation voluptate ad magna Lorem voluptate tempor.\r\n", + "address": "2 Lynch Street", + "city": "Allison", + "state": "Alabama", + "zip": 19522, + "country": "Benin", + "email": "schwartzgarcia@scentric.com", + "phone": "(890) 442-3503", + "color": "rgb(97,239,223)" + }, + { + "index": 58, + "name": "Adela Key", + "first": "Thornton", + "last": "Sykes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nicoleglynn/73.jpg", + "boolean": true, + "guid": "8b7914e5-a64e-4c6a-aa82-b62d133a71b4", + "integer": 13, + "date": "Fri Jul 22 1983 16:03:00 GMT-0700 (PDT)", + "shortText": "nisi laboris duis ullamco", + "mediumText": "Aute aliqua adipisicing adipisicing nisi anim veniam adipisicing commodo. Pariatur adipisicing exercitation ullamco quis ad irure labore ad proident magna. Ea duis duis elit Lorem tempor nulla magna dolor adipisicing esse proident deserunt anim. Anim consectetur mollit irure consectetur velit Lorem enim Lorem exercitation laborum fugiat quis reprehenderit irure.", + "longText": "Minim occaecat consequat pariatur pariatur elit amet. Ex nostrud amet in cillum esse id laborum do velit. Anim laboris cillum incididunt fugiat reprehenderit est laboris mollit aliquip occaecat aliqua excepteur irure.\r\nVeniam occaecat sunt occaecat esse occaecat quis proident aliqua est ad magna. Occaecat proident esse officia consectetur sunt consectetur labore sint aliquip veniam ullamco in consequat est. Eiusmod labore amet id nulla tempor ad.\r\nDeserunt anim ea duis eu laborum aliqua exercitation. Proident enim Lorem enim mollit esse eu est ipsum adipisicing pariatur magna laboris. Excepteur exercitation labore ut qui velit do nulla. Et incididunt consectetur incididunt ipsum Lorem anim aute in dolor consequat laborum labore velit. Adipisicing duis voluptate duis deserunt dolore. Commodo culpa eiusmod excepteur sunt qui et elit non id occaecat est fugiat ea. Et ea elit dolore officia magna ad sit tempor est ullamco fugiat elit tempor dolor.\r\n", + "address": "2 Beaver Street", + "city": "Sidman", + "state": "North Carolina", + "zip": 72662, + "country": "Lithuania", + "email": "thorntonsykes@scentric.com", + "phone": "(895) 528-2574", + "color": "rgb(134,86,134)" + }, + { + "index": 59, + "name": "Church Walls", + "first": "Webb", + "last": "Maddox", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rickdt/73.jpg", + "boolean": true, + "guid": "446ed374-2f83-4fc6-933b-60892c7e61f6", + "integer": 97, + "date": "Fri Jun 11 1993 04:18:26 GMT-0700 (PDT)", + "shortText": "officia sint amet aute aliquip", + "mediumText": "Consectetur reprehenderit duis dolor duis sint adipisicing elit anim incididunt labore aliquip enim sit adipisicing.", + "longText": "Qui sit enim sunt anim quis aliquip reprehenderit id commodo pariatur sint. Ex aliquip quis voluptate id incididunt. Et fugiat laborum aute anim proident aliquip aliquip reprehenderit eu irure sint proident officia. Ipsum in commodo sint enim consectetur aliqua laboris ea proident ex. Proident culpa eiusmod ea officia excepteur anim fugiat irure ex nostrud dolore.\r\n", + "address": "4 Hicks Street", + "city": "Derwood", + "state": "Connecticut", + "zip": 72544, + "country": "Virgin Islands (British)", + "email": "webbmaddox@scentric.com", + "phone": "(944) 564-2803", + "color": "rgb(162,85,229)" + }, + { + "index": 60, + "name": "Kristi Crosby", + "first": "Cathleen", + "last": "Nichols", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/funwatercat/73.jpg", + "boolean": true, + "guid": "7a7ad168-8ae8-492d-956e-c2a16f8578e9", + "integer": 92, + "date": "Sun Jan 01 1989 18:01:36 GMT-0800 (PST)", + "shortText": "adipisicing Lorem velit quis", + "mediumText": "Velit esse consequat exercitation eu excepteur officia minim laborum cupidatat officia id ad amet occaecat. Dolor officia qui est ea nisi non.", + "longText": "Culpa anim qui adipisicing id cillum id officia quis incididunt aliqua. Anim excepteur dolore proident amet. Cillum sunt quis pariatur proident esse Lorem eiusmod et eiusmod non. Ipsum aliquip magna esse veniam nulla Lorem pariatur nulla voluptate ullamco excepteur nostrud non ex. Nisi et occaecat pariatur est irure amet consequat consectetur nisi consequat quis in exercitation. Culpa eu amet laborum ullamco do mollit mollit.\r\nIrure aliqua dolore nulla occaecat ipsum minim Lorem dolor Lorem ut. Velit amet laborum deserunt nostrud mollit Lorem ullamco incididunt excepteur magna. Eiusmod tempor pariatur anim do esse laborum sint ea elit excepteur. Commodo cillum cupidatat duis dolor ad laboris occaecat. Occaecat ad nostrud amet exercitation laborum eiusmod.\r\nAliquip ullamco officia ullamco do mollit amet non. Do ut aute velit culpa officia ullamco aliquip voluptate consequat quis quis irure qui dolore. Labore amet reprehenderit do velit aliqua minim aliqua commodo non ipsum labore culpa dolor ad. Nisi sit occaecat proident labore officia incididunt non consectetur Lorem. Consequat anim dolore duis esse ad aliqua ea sit ad ex. Consectetur est id non esse aliqua sit ut adipisicing commodo aliqua. Exercitation nisi consectetur tempor nulla.\r\nLorem in consectetur anim fugiat dolore duis fugiat. Nisi Lorem velit occaecat cillum consectetur ipsum aliqua velit et. Do cupidatat enim sit duis eu labore officia nostrud nisi qui.\r\n", + "address": "4 Engert Avenue", + "city": "Lumberton", + "state": "South Carolina", + "zip": 64235, + "country": "Jordan", + "email": "cathleennichols@scentric.com", + "phone": "(963) 428-3124", + "color": "rgb(237,75,179)" + }, + { + "index": 61, + "name": "Winnie Coleman", + "first": "Ila", + "last": "Bentley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ssiskind/73.jpg", + "boolean": false, + "guid": "2d8a81c0-1dd7-4c00-a89f-473446addf54", + "integer": 38, + "date": "Tue Jun 30 1998 19:23:01 GMT-0700 (PDT)", + "shortText": "incididunt", + "mediumText": "Ex velit voluptate aliquip adipisicing eiusmod. Occaecat aliqua voluptate nisi nostrud est sit sunt qui. Excepteur est nisi sunt esse ipsum ipsum reprehenderit velit deserunt minim labore est.", + "longText": "Do esse eu mollit sunt elit aute velit incididunt reprehenderit sunt. Ad ad minim adipisicing eiusmod magna pariatur irure velit labore cupidatat ea ipsum eu. Ipsum consequat ut in minim aliqua.\r\n", + "address": "2 Havemeyer Street", + "city": "Frank", + "state": "Michigan", + "zip": 60748, + "country": "Nicaragua", + "email": "ilabentley@scentric.com", + "phone": "(947) 456-2663", + "color": "rgb(77,78,128)" + }, + { + "index": 62, + "name": "Clemons Chen", + "first": "Warner", + "last": "Blair", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/the_purplebunny/73.jpg", + "boolean": true, + "guid": "1d9dfc0f-0e70-4189-9a2d-d134505173d7", + "integer": 28, + "date": "Sat Sep 12 2009 19:12:02 GMT-0700 (PDT)", + "shortText": "officia", + "mediumText": "Exercitation non labore et duis et Lorem est et irure fugiat dolore officia ex.", + "longText": "Ea aute eiusmod ipsum ipsum eu nostrud. Duis culpa consequat aute nulla nisi ut sint sit culpa et duis magna enim. Nisi sunt dolore minim quis do. Magna deserunt duis velit et ut et enim magna laborum nulla ea culpa commodo. Minim ut id culpa anim laborum laborum consectetur amet et ullamco culpa do labore.\r\nEst magna aliquip ea ullamco. Exercitation deserunt occaecat id in ut sit laborum aute. Ex ut ex anim cupidatat do amet proident mollit. Dolor magna irure id culpa. Amet ut laborum pariatur irure dolor velit aute magna cupidatat commodo amet officia reprehenderit. Aute elit nisi excepteur qui cillum nulla consequat quis veniam est fugiat sunt. Proident consequat sunt exercitation sint nostrud commodo laborum adipisicing excepteur deserunt.\r\nEiusmod sunt consequat enim non irure excepteur adipisicing. Ad id veniam consectetur fugiat excepteur ex non et velit ut Lorem. Exercitation occaecat officia fugiat consectetur tempor exercitation culpa sint enim cupidatat commodo ullamco Lorem. Aliquip non ut fugiat nisi Lorem nulla mollit aliquip voluptate et exercitation minim enim cupidatat.\r\nElit do est amet nulla aliquip proident consectetur aliquip. Lorem nulla incididunt laborum in proident. Lorem veniam enim tempor non consectetur et ea non elit. Cupidatat pariatur adipisicing quis ex in incididunt dolor officia in. Aliqua do laboris dolore eu dolore magna eiusmod consequat nostrud anim.\r\nUt ullamco voluptate fugiat ullamco irure laboris commodo officia veniam sint ex magna id nisi. Qui occaecat sit deserunt aliqua veniam. Cillum do eiusmod velit voluptate magna do sunt adipisicing adipisicing ex esse officia eiusmod. Consectetur minim sint pariatur eiusmod ipsum anim. Consectetur anim esse fugiat tempor excepteur aliqua esse deserunt consequat tempor velit magna.\r\n", + "address": "2 Woodbine Street", + "city": "Rivers", + "state": "Maine", + "zip": 35489, + "country": "South Africa", + "email": "warnerblair@scentric.com", + "phone": "(811) 480-2342", + "color": "rgb(88,244,211)" + }, + { + "index": 63, + "name": "Marcy William", + "first": "Garcia", + "last": "Carter", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/linkthief/73.jpg", + "boolean": false, + "guid": "bb80a091-a78d-4187-ab75-c5e5a6cb2362", + "integer": 3, + "date": "Wed Mar 20 1974 00:41:43 GMT-0700 (PDT)", + "shortText": "amet", + "mediumText": "Deserunt officia laboris velit enim do cillum enim. Aliquip commodo veniam dolore commodo eiusmod nostrud occaecat adipisicing amet id. Incididunt cillum sunt esse consequat magna eiusmod ex culpa. Aliquip irure excepteur sunt esse incididunt et sint.", + "longText": "Ullamco veniam exercitation velit eu aute fugiat nisi dolor do. Deserunt culpa laboris ipsum cillum sunt pariatur occaecat cillum sint qui deserunt tempor pariatur. Ex ea incididunt aute in fugiat dolor reprehenderit mollit velit ut eiusmod. Veniam sunt sit officia sint Lorem fugiat dolor commodo amet culpa. Officia nostrud eiusmod commodo ex labore nulla id ea ipsum excepteur laboris velit.\r\nFugiat eiusmod laboris pariatur labore. Non enim nisi nostrud quis amet laboris aliquip laborum et irure aute veniam. Anim ullamco in officia commodo aliqua minim. Amet in enim nostrud pariatur id est occaecat ad occaecat. Nisi commodo proident et pariatur est ea esse proident dolore aliqua sit voluptate.\r\nEt est fugiat duis cillum veniam nulla. Enim anim commodo consequat aliquip excepteur Lorem dolor adipisicing anim incididunt officia dolore laboris. Incididunt pariatur officia minim fugiat consectetur reprehenderit commodo et ut. Commodo nisi exercitation duis excepteur ea minim qui enim tempor aliqua Lorem ipsum est excepteur. Ullamco veniam occaecat excepteur et laborum. Voluptate Lorem proident id ipsum laboris consequat ullamco occaecat est cupidatat aute ipsum aliqua.\r\nAnim mollit laboris amet dolor occaecat tempor id. Adipisicing sit magna ullamco tempor dolor ullamco sunt exercitation enim dolore exercitation non ullamco eiusmod. Esse ad aliquip ullamco voluptate dolor voluptate Lorem nostrud Lorem aute id Lorem. Laborum nulla ex pariatur anim irure cillum veniam eiusmod commodo.\r\nAdipisicing est ea adipisicing incididunt nostrud reprehenderit labore pariatur est. Consequat sint deserunt ea ullamco do cupidatat incididunt mollit sunt veniam. Eu velit Lorem officia ex officia deserunt adipisicing culpa cillum mollit tempor cupidatat proident. Qui aliquip labore sunt commodo veniam aliqua est cillum. Ut esse laboris consectetur mollit eiusmod duis sunt esse duis laboris tempor.\r\n", + "address": "2 Sedgwick Place", + "city": "Malott", + "state": "Kansas", + "zip": 33342, + "country": "Mexico", + "email": "garciacarter@scentric.com", + "phone": "(838) 400-3578", + "color": "rgb(238,146,141)" + }, + { + "index": 64, + "name": "Saunders Tyler", + "first": "Bowen", + "last": "Olson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ffbel/73.jpg", + "boolean": false, + "guid": "81275503-dc66-4920-a852-66b9bb420ab7", + "integer": 83, + "date": "Sat Jun 05 2004 18:02:53 GMT-0700 (PDT)", + "shortText": "eu", + "mediumText": "Cillum eiusmod sit aliquip magna excepteur occaecat adipisicing culpa. Sint quis dolor est laborum cupidatat ea dolore eu incididunt quis ullamco. Culpa non ad consectetur aliqua sint consequat duis ea tempor cupidatat culpa minim duis aliqua.", + "longText": "Non veniam consequat laborum dolor deserunt nulla amet incididunt. Velit eu ut adipisicing labore nisi. Aute ea ex esse reprehenderit quis officia do. Labore dolor elit ea aliqua. Ex ut anim eiusmod est ullamco qui laborum consequat consequat ullamco velit nulla. Nisi id proident occaecat id ipsum cillum irure ea quis labore reprehenderit ipsum eu. Ea ex irure quis culpa proident laborum ut veniam magna nostrud ex officia.\r\nTempor ut sint sunt fugiat commodo dolore irure qui enim mollit. Lorem id cillum nulla ullamco amet. Proident anim proident ea ut aliquip in elit. Consequat eiusmod ut aliqua enim qui nulla reprehenderit laboris et ea ad aliqua commodo. Excepteur in proident irure esse.\r\n", + "address": "2 Fleet Walk", + "city": "Shelby", + "state": "Iowa", + "zip": 95437, + "country": "Sudan", + "email": "bowenolson@scentric.com", + "phone": "(895) 420-2620", + "color": "rgb(71,127,188)" + }, + { + "index": 65, + "name": "Landry Hendricks", + "first": "Kidd", + "last": "Sanders", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/labibjaffar/73.jpg", + "boolean": true, + "guid": "c1d57dbd-5b06-44aa-bf5b-ffa5bb4cc5ba", + "integer": 15, + "date": "Sat Oct 19 1996 17:52:51 GMT-0700 (PDT)", + "shortText": "elit duis", + "mediumText": "Laboris irure quis ipsum consequat consectetur culpa aliqua in.", + "longText": "Ad aliquip adipisicing eu ex sunt duis pariatur fugiat consectetur ex. Reprehenderit do Lorem velit et tempor. Duis ad ad minim dolore excepteur ex nostrud officia. Elit aute aliqua laboris enim velit esse ullamco. Cupidatat non sunt laborum labore eu aliqua exercitation ea. Mollit ex non consectetur ad ex. Dolor occaecat deserunt excepteur culpa sit proident ad sint nisi esse elit et irure anim.\r\nCupidatat ullamco aliquip in commodo laboris elit minim ad. Sit esse nulla et ipsum officia commodo. Dolore ad proident tempor aliquip occaecat tempor mollit.\r\n", + "address": "3 Union Avenue", + "city": "Shepardsville", + "state": "Vermont", + "zip": 42858, + "country": "Papua New Guinea", + "email": "kiddsanders@scentric.com", + "phone": "(857) 415-3707", + "color": "rgb(205,180,193)" + }, + { + "index": 66, + "name": "Hogan Strickland", + "first": "Deanne", + "last": "Casey", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tnrzdmr/73.jpg", + "boolean": false, + "guid": "66bcba0b-2ae4-4fba-9b76-ebf0bacf8b3c", + "integer": 23, + "date": "Tue Mar 24 2009 07:16:09 GMT-0700 (PDT)", + "shortText": "id non labore cupidatat enim", + "mediumText": "Deserunt dolor do cillum ut proident. Ad non proident laborum sint tempor velit. Voluptate eu ea commodo est ipsum laboris non nulla reprehenderit incididunt laborum proident id exercitation. Laboris amet exercitation qui proident veniam laboris.", + "longText": "Ea proident esse nisi eu officia eiusmod laborum. Occaecat aliqua eu enim ullamco culpa labore irure amet sunt adipisicing magna. Culpa enim veniam magna qui anim ad nulla. Lorem fugiat in nostrud sunt do mollit eiusmod ut. Occaecat ipsum esse laboris nostrud reprehenderit velit.\r\nVoluptate eiusmod ullamco sunt cupidatat pariatur ea qui non. Velit commodo sint esse adipisicing pariatur ut id ad Lorem cillum. Nisi ut esse quis deserunt magna eu esse minim.\r\nIncididunt ullamco sunt sunt velit. Minim quis quis quis aliqua anim quis est ad pariatur esse reprehenderit labore laboris. Irure magna dolor in nisi sunt et.\r\n", + "address": "2 Cornelia Street", + "city": "Kent", + "state": "Nebraska", + "zip": 46682, + "country": "Romania", + "email": "deannecasey@scentric.com", + "phone": "(935) 548-2580", + "color": "rgb(106,182,101)" + }, + { + "index": 67, + "name": "Hart Carlson", + "first": "Hardin", + "last": "Thornton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jeremyjantz/73.jpg", + "boolean": true, + "guid": "7601ed4e-21fb-4024-bb7e-36d45c052b7f", + "integer": 68, + "date": "Sat Apr 20 2002 15:29:17 GMT-0700 (PDT)", + "shortText": "ex anim", + "mediumText": "Tempor veniam proident elit proident aliqua nostrud tempor eiusmod. Commodo id dolor sint amet commodo officia. Anim sint ea amet cillum. Esse cupidatat aute veniam ipsum excepteur.", + "longText": "Cillum aute voluptate veniam minim et excepteur ad nulla enim anim adipisicing incididunt aute. Aliqua adipisicing elit minim officia id mollit laborum sunt do. Nostrud do laboris fugiat ad mollit. Eu dolor dolor Lorem labore mollit esse consectetur in fugiat enim ullamco sit elit nisi. Enim eiusmod nostrud enim velit. Lorem commodo laboris excepteur eu occaecat minim.\r\nEst nulla eiusmod tempor amet dolore aute proident eu commodo minim sint proident consectetur. Cupidatat sunt quis laboris adipisicing eiusmod aliqua mollit. Elit qui nostrud commodo irure irure ex esse sunt officia. Tempor cillum nulla anim aliqua. Cillum tempor irure voluptate sunt laboris non commodo anim qui ullamco. Quis velit consectetur eu irure proident reprehenderit nisi nulla dolore sunt magna.\r\nCulpa laborum enim enim proident sit dolore pariatur eiusmod. Excepteur proident mollit in ut do non. Cillum duis non consectetur ullamco minim Lorem occaecat consequat tempor ullamco veniam labore labore aliquip.\r\nLaboris voluptate anim dolore nisi ullamco consequat nostrud dolor. Nulla do do esse aute sint deserunt qui. Ex aliqua dolore minim dolore consectetur nulla consequat ad consequat. Nulla et proident magna eu consequat ullamco excepteur in ipsum enim ut duis. Deserunt et sunt tempor quis amet deserunt cupidatat veniam. Labore reprehenderit magna minim amet nostrud amet. Reprehenderit pariatur dolore ut culpa sint dolore.\r\n", + "address": "2 Lincoln Place", + "city": "Walland", + "state": "Florida", + "zip": 37274, + "country": "Bangladesh", + "email": "hardinthornton@scentric.com", + "phone": "(905) 466-2231", + "color": "rgb(145,123,64)" + }, + { + "index": 68, + "name": "Benita Lester", + "first": "Taylor", + "last": "Irwin", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ibrahemaq/73.jpg", + "boolean": false, + "guid": "dc96c6e9-9c43-4525-8de4-9a5e504ab886", + "integer": 2, + "date": "Sat Jun 25 1977 03:55:08 GMT-0700 (PDT)", + "shortText": "ex", + "mediumText": "Anim laboris dolore non aliqua proident aliqua et est ad reprehenderit duis ipsum do. Irure Lorem voluptate tempor ipsum exercitation. Sint deserunt adipisicing Lorem sit ea duis ex. Et fugiat anim est non irure proident in commodo sunt pariatur nulla.", + "longText": "Ut aute anim amet minim nulla. Fugiat dolor pariatur quis do aute officia magna in culpa ipsum fugiat. Cupidatat cillum duis aliquip nulla ea quis aliqua. Cillum sunt laboris velit deserunt cupidatat ullamco. Incididunt eiusmod culpa proident duis ex enim ad dolor labore voluptate eiusmod.\r\nLabore culpa commodo amet eu elit magna nisi minim in irure. Dolor adipisicing aliquip laboris irure. Amet et enim fugiat mollit ad laboris sint elit cupidatat deserunt. Ut amet laborum veniam elit amet minim et laboris aute nulla consequat esse ut. Ea dolore sit excepteur eiusmod pariatur sit non non consequat aute.\r\nAute culpa aute ullamco sunt irure quis voluptate est laborum. Duis eu ut do laboris laborum ipsum. Incididunt officia culpa velit commodo elit aliquip Lorem consectetur quis dolor veniam officia. Voluptate cupidatat duis ipsum elit cupidatat.\r\nCillum non ad ad et. Ad eiusmod dolor excepteur cillum mollit laboris ullamco cillum esse est. Aliquip eiusmod cupidatat ex id aute do officia excepteur non.\r\nOccaecat ullamco velit aliqua amet labore veniam dolore officia dolor nisi deserunt nisi qui fugiat. Velit laborum duis reprehenderit reprehenderit laboris occaecat. Aute exercitation magna exercitation magna sit. Fugiat cupidatat tempor eiusmod voluptate enim. Aliqua cillum sunt deserunt ex consectetur anim in labore excepteur fugiat reprehenderit.\r\n", + "address": "4 Crosby Avenue", + "city": "Wintersburg", + "state": "New Jersey", + "zip": 37633, + "country": "Monaco", + "email": "taylorirwin@scentric.com", + "phone": "(898) 517-3041", + "color": "rgb(85,97,125)" + }, + { + "index": 69, + "name": "Cantu Owens", + "first": "Stone", + "last": "Watson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/croakx/73.jpg", + "boolean": false, + "guid": "32abd836-bc46-4a8e-a2c1-7dc92b9e8322", + "integer": 46, + "date": "Mon Nov 17 2003 17:10:32 GMT-0800 (PST)", + "shortText": "cupidatat officia anim ipsum aliquip", + "mediumText": "Elit duis non minim aliqua aliquip irure. Duis ex est ut exercitation laborum excepteur aliqua. Nostrud ut fugiat officia exercitation cupidatat adipisicing nisi in ut ipsum sit reprehenderit. Qui ea Lorem quis velit.", + "longText": "Ipsum ullamco est aute tempor culpa aute enim id incididunt commodo aliqua. Mollit aute sit eu sint cillum ea cupidatat nulla labore anim ut. Est officia tempor ex amet veniam anim non mollit nulla cillum labore adipisicing velit. Et ut nostrud Lorem quis minim laboris mollit sit.\r\nVelit officia nulla reprehenderit exercitation irure exercitation eiusmod exercitation voluptate consequat cupidatat incididunt nisi. Ipsum aliqua quis laborum est sunt. In consectetur eiusmod aute magna. Ex ullamco sit sint excepteur esse eu magna aliqua do aute elit sunt cillum adipisicing. Sunt irure pariatur laboris et fugiat irure. Amet ipsum nostrud est Lorem anim velit. Est cupidatat dolor consectetur velit occaecat mollit cillum anim est pariatur ad occaecat in dolor.\r\nUllamco incididunt fugiat sit fugiat id Lorem pariatur laborum Lorem consequat. Ullamco irure incididunt duis occaecat aliqua pariatur. Aliqua reprehenderit aliqua est non nisi et consequat commodo nisi laborum. Ipsum est qui sunt voluptate elit do voluptate culpa sint ex est officia ad.\r\n", + "address": "2 Bayard Street", + "city": "Glasgow", + "state": "Wisconsin", + "zip": 57777, + "country": "Martinique", + "email": "stonewatson@scentric.com", + "phone": "(867) 474-2146", + "color": "rgb(96,110,114)" + }, + { + "index": 70, + "name": "Colon Jarvis", + "first": "Avery", + "last": "Knox", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_dukex/73.jpg", + "boolean": false, + "guid": "9bcf96b4-7ca7-4a59-b7b7-6d6a57293012", + "integer": 28, + "date": "Sun Jan 28 2001 22:12:27 GMT-0800 (PST)", + "shortText": "pariatur officia reprehenderit ut", + "mediumText": "Ut dolore quis eiusmod culpa laboris ad fugiat.", + "longText": "Irure sunt labore commodo ea ex in dolore. Minim reprehenderit sit non et reprehenderit qui esse ex adipisicing. Duis ipsum in culpa est. Non do nisi pariatur dolore elit do qui non pariatur. Id id laboris aliquip minim sint pariatur officia consequat proident cillum sint.\r\nFugiat duis est irure mollit. Cupidatat enim anim adipisicing mollit enim ut nostrud sit. Dolore anim ut enim sint fugiat dolor dolore laboris Lorem eu nostrud pariatur ullamco. Dolore eiusmod aliquip amet esse sunt culpa eiusmod aliquip et exercitation Lorem. Mollit deserunt eiusmod ex ipsum qui consectetur ullamco velit. Reprehenderit proident cupidatat reprehenderit cupidatat. Voluptate eu sit reprehenderit veniam ut.\r\nDo consectetur culpa deserunt dolor. Laborum dolore cillum exercitation id sit veniam dolor sunt consequat. Proident est proident sit ut incididunt tempor ullamco sunt.\r\nIn amet consectetur nulla ullamco ullamco culpa. Magna deserunt esse id ad proident pariatur aliquip cupidatat elit nulla deserunt ipsum consectetur elit. Eu sint sint incididunt nulla ad consequat ex anim sit duis ut quis mollit. Id aliquip consectetur cupidatat officia irure enim eu nostrud aliqua eiusmod dolore culpa. Cillum aute laborum aliquip aute labore nostrud cillum veniam incididunt veniam amet. Sit ad in proident cupidatat elit irure nostrud dolore.\r\n", + "address": "4 Sharon Street", + "city": "Chapin", + "state": "Washington", + "zip": 80442, + "country": "Kuwait", + "email": "averyknox@scentric.com", + "phone": "(851) 582-2204", + "color": "rgb(122,179,117)" + }, + { + "index": 71, + "name": "Ratliff Kline", + "first": "Cathryn", + "last": "Rodgers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gregsqueeb/73.jpg", + "boolean": false, + "guid": "9a177597-6ee1-4784-b217-60ded54d0072", + "integer": 32, + "date": "Fri May 07 1976 11:12:00 GMT-0700 (PDT)", + "shortText": "nostrud enim", + "mediumText": "Officia do enim nisi ullamco enim eiusmod eu enim ex tempor. Id voluptate nisi quis officia sint ut ex veniam mollit excepteur tempor. Et aliqua velit sit fugiat do voluptate ipsum aliquip veniam in sint do. Culpa ut dolore culpa sunt nostrud reprehenderit do veniam voluptate ut labore labore ullamco tempor. Voluptate voluptate veniam laborum deserunt.", + "longText": "Et laboris labore irure consequat consequat et eu minim aute consectetur. Nisi tempor sunt officia ad dolore culpa. Veniam proident minim velit nisi amet id nulla ullamco eiusmod sit ad.\r\n", + "address": "2 Burnett Street", + "city": "Tivoli", + "state": "Oregon", + "zip": 69271, + "country": "Ukraine", + "email": "cathrynrodgers@scentric.com", + "phone": "(819) 482-2099", + "color": "rgb(177,117,238)" + }, + { + "index": 72, + "name": "Burgess Mcconnell", + "first": "Head", + "last": "Cohen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/csmnng/73.jpg", + "boolean": false, + "guid": "22894c1b-29ad-4e31-a69e-d724d00cdec3", + "integer": 51, + "date": "Fri Jan 08 1993 09:39:13 GMT-0800 (PST)", + "shortText": "cupidatat ex excepteur tempor", + "mediumText": "Proident eiusmod mollit voluptate culpa incididunt et velit commodo laborum et. Anim ex sunt id ea id excepteur commodo esse exercitation pariatur esse anim. Qui dolore irure eiusmod eu dolore.", + "longText": "Dolor incididunt eiusmod nostrud consequat mollit amet nisi ea. Officia dolore mollit eiusmod ullamco anim incididunt. Laboris sint enim ex mollit consequat consequat.\r\nMinim quis labore eu dolor adipisicing magna nulla nulla quis voluptate voluptate. Nisi tempor non veniam duis qui dolore qui et ut exercitation amet labore elit. Reprehenderit magna do aliquip aliqua cillum tempor ex veniam mollit dolore est nulla ad aute. Est amet non ipsum adipisicing sunt duis Lorem officia ad culpa do proident ad. Consectetur excepteur culpa consequat esse consequat exercitation deserunt adipisicing adipisicing occaecat nisi. Commodo officia commodo deserunt minim excepteur do fugiat consectetur. Aliqua proident ad fugiat eiusmod tempor dolore do incididunt eiusmod labore quis.\r\nLabore fugiat incididunt aliquip deserunt fugiat nostrud. Velit minim aliqua sit incididunt. Velit ad et nulla est consectetur Lorem officia ut eu consequat enim ut. Consequat labore qui magna do aute deserunt consectetur. Minim aliquip in quis minim ad mollit ut non Lorem.\r\nEu laboris culpa magna dolor pariatur anim ea amet fugiat minim. Adipisicing fugiat ea est eiusmod proident proident anim commodo quis laboris cupidatat. Labore aliquip mollit Lorem voluptate sit laborum irure id adipisicing ex. Ad cillum sunt sit magna exercitation mollit eiusmod mollit est elit. Ullamco aute esse magna deserunt irure ex et ullamco consequat laborum deserunt aute. Nulla mollit sunt nostrud in quis in est nisi eiusmod excepteur ut voluptate. Do anim ex cillum eiusmod duis ut sit.\r\nAdipisicing nisi ullamco qui sint est laborum tempor incididunt pariatur excepteur fugiat. Officia sunt proident laborum fugiat quis magna veniam. Nulla do do esse magna. Labore ad sit mollit ullamco nulla aute est sit ipsum ex cupidatat. Dolor ex duis nostrud amet incididunt incididunt reprehenderit non tempor elit magna.\r\n", + "address": "3 Hamilton Avenue", + "city": "Crisman", + "state": "Illinois", + "zip": 36121, + "country": "Guatemala", + "email": "headcohen@scentric.com", + "phone": "(930) 570-3544", + "color": "rgb(151,112,173)" + }, + { + "index": 73, + "name": "Roberta Bond", + "first": "Simone", + "last": "Whitfield", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ogmenemre/73.jpg", + "boolean": false, + "guid": "4750f9fa-37f6-41d0-8599-946f9dff2e00", + "integer": 6, + "date": "Thu Sep 06 1984 11:04:11 GMT-0700 (PDT)", + "shortText": "Lorem consectetur", + "mediumText": "Ad anim sint ex in voluptate deserunt ut nulla adipisicing. Elit non velit pariatur nostrud quis do quis cillum ea et sint Lorem. Laboris eu amet do dolor cillum esse voluptate adipisicing officia aliqua aliqua duis.", + "longText": "Commodo cupidatat velit duis elit id duis aliqua. Laboris dolor laboris ad irure laborum. Dolor amet aliqua eu sint. Anim occaecat irure ex cillum qui et adipisicing cupidatat deserunt et est consequat velit quis. Magna ut cillum nostrud ea pariatur occaecat. Culpa eu voluptate nostrud elit anim cupidatat fugiat aute dolore nisi nostrud magna nostrud pariatur. Non aliquip irure excepteur culpa irure veniam ea ad deserunt laborum reprehenderit Lorem.\r\nCillum tempor nulla do tempor eiusmod id esse officia culpa aliqua culpa et exercitation laboris. Sit sit Lorem eu fugiat Lorem. Laboris consequat incididunt aliquip Lorem cupidatat sint deserunt ut duis labore dolor ipsum laboris nulla. Deserunt adipisicing reprehenderit id commodo aute sunt dolore ex duis cillum nisi eu. Anim deserunt et adipisicing fugiat anim in.\r\nId non irure in esse incididunt aliquip ullamco magna et nulla mollit dolore. Velit aliquip excepteur pariatur magna Lorem fugiat. Exercitation nisi nostrud cupidatat elit. Velit occaecat culpa nisi nisi proident quis dolore anim cupidatat adipisicing ullamco ad cupidatat dolor.\r\nConsequat ut esse incididunt et in commodo culpa consequat ipsum laboris consequat incididunt anim incididunt. Ad et nostrud amet non Lorem enim laborum id ad Lorem magna excepteur. Ad cupidatat cillum proident exercitation dolore aute veniam nostrud ex duis esse elit. Voluptate ullamco ipsum et do est ea laborum reprehenderit irure magna. Exercitation aliqua proident magna irure ex est laboris ea aliqua esse. Ea deserunt culpa aute velit reprehenderit Lorem voluptate mollit quis Lorem deserunt Lorem amet.\r\n", + "address": "4 Hastings Street", + "city": "Linganore", + "state": "West Virginia", + "zip": 87951, + "country": "Argentina", + "email": "simonewhitfield@scentric.com", + "phone": "(959) 575-3680", + "color": "rgb(205,221,178)" + }, + { + "index": 74, + "name": "Sara Mckay", + "first": "Sue", + "last": "Cotton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ionutmaxim/73.jpg", + "boolean": false, + "guid": "1da2f858-f774-49c1-9d77-e8a3eb040140", + "integer": 31, + "date": "Fri Nov 25 1994 01:11:26 GMT-0800 (PST)", + "shortText": "et", + "mediumText": "Pariatur Lorem veniam ullamco cupidatat sint. Cillum velit nostrud excepteur adipisicing velit Lorem fugiat proident.", + "longText": "Consectetur tempor mollit do ea anim dolore laboris in exercitation cupidatat commodo reprehenderit Lorem. Consequat exercitation sint culpa aute quis nisi. Exercitation consectetur irure aliqua cillum ut non labore exercitation ea et.\r\nUllamco dolor consequat reprehenderit dolore id mollit laborum ad. Amet ea voluptate voluptate fugiat sint adipisicing dolor dolor occaecat eu sit. Ea ea est amet enim tempor occaecat tempor sit exercitation. Ad eu nisi dolore do culpa do anim irure aliquip officia irure. Consectetur et voluptate sint sunt fugiat deserunt consectetur deserunt voluptate laborum non tempor occaecat. Amet magna velit ad qui consectetur reprehenderit deserunt voluptate commodo non ullamco proident laboris.\r\nCillum magna incididunt pariatur sunt ipsum duis voluptate in fugiat id officia cupidatat reprehenderit ipsum. Dolore anim excepteur ea laboris labore minim. Excepteur ex adipisicing eiusmod sit ut reprehenderit. Mollit elit veniam dolore quis nulla officia eiusmod minim nulla non amet. Minim nostrud veniam fugiat cillum est consectetur amet non ad dolore pariatur nisi.\r\n", + "address": "2 Fair Street", + "city": "Kingstowne", + "state": "Mississippi", + "zip": 18339, + "country": "Mauritius", + "email": "suecotton@scentric.com", + "phone": "(816) 520-2774", + "color": "rgb(241,214,199)" + }, + { + "index": 75, + "name": "Coleman Cook", + "first": "Olson", + "last": "Burch", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/teylorfeliz/73.jpg", + "boolean": true, + "guid": "0788dba4-5fa8-476e-9ba6-8f387bf77e75", + "integer": 13, + "date": "Thu Jun 21 1984 02:52:09 GMT-0700 (PDT)", + "shortText": "anim anim deserunt deserunt anim", + "mediumText": "Esse sunt irure magna amet. Adipisicing aliqua ut dolor nulla non aute tempor eu ex sit id et. Magna dolore aliqua qui velit eu officia. Est sunt magna adipisicing commodo mollit aute duis magna.", + "longText": "Duis fugiat culpa proident mollit nostrud. Dolore incididunt in esse veniam eiusmod voluptate consequat amet. Excepteur eu et duis enim proident ullamco irure minim duis quis anim consectetur. Amet excepteur et do officia fugiat mollit Lorem ut elit. Eiusmod magna tempor duis Lorem nostrud. Fugiat elit commodo non et fugiat eu eiusmod in minim veniam sint qui veniam ullamco. Aliquip sint ad culpa esse laboris elit.\r\nMinim reprehenderit quis ut incididunt incididunt cupidatat. Sit sit elit tempor irure id et aliqua deserunt Lorem aliqua exercitation. Elit nisi dolor enim amet esse incididunt ad. Aliqua elit velit nulla sit sint non occaecat ipsum ea velit minim proident. Sint laboris labore laboris elit nulla ullamco laboris cupidatat amet consectetur. Do eiusmod proident id laborum fugiat nostrud voluptate fugiat. Labore pariatur proident eiusmod laborum sunt occaecat enim nisi labore.\r\nLabore labore nisi velit consequat magna officia reprehenderit consequat. Nulla eu velit laborum voluptate. Fugiat tempor laborum labore minim nostrud tempor sit mollit laboris enim consectetur sit ut veniam. Occaecat exercitation ex consequat id occaecat elit duis reprehenderit ut enim quis magna. Non do ea fugiat quis duis esse amet deserunt eu id duis est enim.\r\nNostrud labore tempor minim proident do quis labore aliqua est mollit duis minim. Esse veniam commodo velit culpa in pariatur laborum in minim exercitation excepteur labore commodo. Mollit cillum ipsum adipisicing in nulla mollit irure. Et laborum minim sit id pariatur ad voluptate nulla ullamco deserunt veniam. Deserunt non aliquip sint amet.\r\nEsse dolor adipisicing ut pariatur pariatur dolore eu mollit reprehenderit consequat. Adipisicing fugiat sunt voluptate magna Lorem est eu anim id commodo eu consectetur. Mollit ad excepteur et do velit dolor adipisicing veniam cupidatat excepteur qui.\r\n", + "address": "2 Hull Street", + "city": "Darbydale", + "state": "Rhode Island", + "zip": 97458, + "country": "St. Helena", + "email": "olsonburch@scentric.com", + "phone": "(995) 590-2366", + "color": "rgb(91,252,80)" + }, + { + "index": 76, + "name": "Walton Wagner", + "first": "Powell", + "last": "Nunez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/linux29/73.jpg", + "boolean": false, + "guid": "6c34053d-b9d3-4a75-a660-83b6fc0925a5", + "integer": 97, + "date": "Wed Nov 27 1996 04:47:04 GMT-0800 (PST)", + "shortText": "sunt voluptate dolor", + "mediumText": "Magna elit cillum enim sunt ut occaecat veniam elit elit laborum. Amet sint labore tempor tempor consectetur commodo aliquip magna duis non et. Aute labore est cupidatat do officia minim consectetur ea exercitation ex nostrud enim tempor veniam. Excepteur amet eiusmod velit exercitation eu cillum et minim sunt adipisicing dolor velit. Duis laboris dolor aliquip minim non laboris do veniam.", + "longText": "Ea esse officia reprehenderit do proident dolore ullamco. Quis officia minim sit anim tempor laborum in tempor dolore officia consectetur. Officia pariatur est commodo veniam in ex duis labore velit irure enim laboris id. Esse irure in adipisicing irure officia et veniam anim mollit. Qui qui tempor proident sunt enim incididunt elit aliqua Lorem dolore est do enim dolor. Deserunt consequat pariatur magna aute enim.\r\nDolor est culpa magna duis reprehenderit Lorem ad dolore tempor aute velit veniam sunt. Labore reprehenderit ea culpa ea reprehenderit sint amet in eiusmod dolore. Anim consequat ex labore qui nulla occaecat laborum. Id voluptate pariatur esse aute consequat et nisi. Proident dolor consequat anim esse eiusmod et veniam proident qui non commodo nulla cupidatat.\r\n", + "address": "2 Vanderveer Place", + "city": "Robinette", + "state": "Georgia", + "zip": 54771, + "country": "Suriname", + "email": "powellnunez@scentric.com", + "phone": "(992) 548-3878", + "color": "rgb(95,253,239)" + }, + { + "index": 77, + "name": "Harris Ewing", + "first": "Orr", + "last": "Buchanan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/S0ufi4n3/73.jpg", + "boolean": true, + "guid": "387624b1-451d-47c6-978f-aabd0b34e707", + "integer": 69, + "date": "Sun Aug 18 1996 22:19:42 GMT-0700 (PDT)", + "shortText": "duis ea", + "mediumText": "Irure aliquip sit excepteur incididunt nisi excepteur laboris in do proident commodo ad. Culpa dolore Lorem irure magna mollit laboris officia fugiat amet. Ut ipsum est mollit quis. In occaecat mollit officia fugiat magna occaecat.", + "longText": "Magna cillum culpa esse in sint in sit. Sint aute nulla ad pariatur commodo sint aute consectetur magna dolore labore ex Lorem culpa. Officia aute magna cupidatat dolor aliquip minim voluptate mollit aliqua pariatur ullamco. Ullamco labore ex exercitation ad culpa labore laborum deserunt mollit mollit enim ut. Incididunt dolore est id cupidatat eu do aliqua minim occaecat consectetur.\r\n", + "address": "3 Ralph Avenue", + "city": "Martell", + "state": "New Mexico", + "zip": 31746, + "country": "Greece", + "email": "orrbuchanan@scentric.com", + "phone": "(861) 535-2683", + "color": "rgb(162,149,148)" + }, + { + "index": 78, + "name": "Kerr Briggs", + "first": "Helena", + "last": "Lynch", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nepdud/73.jpg", + "boolean": false, + "guid": "d16cdb93-caba-40e3-b359-8124309f23fd", + "integer": 83, + "date": "Tue Dec 27 2011 21:18:32 GMT-0800 (PST)", + "shortText": "adipisicing est laboris eiusmod", + "mediumText": "Voluptate ad eiusmod eiusmod sunt minim do et ullamco. Id incididunt do labore consectetur laborum excepteur labore id nostrud cupidatat anim officia et velit. Nostrud sunt commodo aute culpa ea et consequat laborum commodo deserunt. Dolore ad amet reprehenderit incididunt exercitation enim duis deserunt. Ea irure et veniam sunt Lorem tempor.", + "longText": "Commodo enim ullamco cupidatat ex minim et ex fugiat eiusmod exercitation minim eu. Id eu exercitation commodo fugiat elit ex laborum ea. Aute duis adipisicing mollit duis non anim anim deserunt. Nulla adipisicing irure commodo ut nostrud irure ea Lorem in enim laborum laboris laborum.\r\nSunt eiusmod dolor ullamco elit mollit esse consequat culpa non do minim reprehenderit exercitation. Id quis laborum eu id Lorem eu aute elit aliqua aliquip labore. Nisi sit mollit velit anim culpa proident esse ut sunt deserunt quis ad dolor. Incididunt excepteur non est occaecat do Lorem veniam sunt cillum velit ut exercitation et. Minim eiusmod ipsum veniam nisi nostrud anim commodo amet est amet ullamco minim ut. Magna aliquip Lorem dolore do nulla ipsum aute mollit incididunt in adipisicing pariatur ad eiusmod. Est velit Lorem incididunt ex aliquip ut laboris nulla.\r\nAd voluptate ullamco dolor culpa. Occaecat sit anim anim id esse commodo consectetur. Velit aliquip laborum fugiat occaecat consectetur magna amet tempor consequat nisi proident nisi. Aliquip et sit aliquip anim. Labore in culpa elit quis reprehenderit duis anim dolor dolore occaecat sint ad Lorem.\r\nDolore culpa irure cillum enim adipisicing enim sint ut laboris elit cillum veniam eu sit. Magna Lorem dolore sint aute cupidatat incididunt excepteur adipisicing magna ex exercitation. Duis id commodo eu adipisicing. Non labore ut laboris officia id.\r\n", + "address": "2 Wilson Avenue", + "city": "Coral", + "state": "Arizona", + "zip": 32289, + "country": "New Caledonia", + "email": "helenalynch@scentric.com", + "phone": "(880) 590-3786", + "color": "rgb(192,101,57)" + }, + { + "index": 79, + "name": "Genevieve Mooney", + "first": "Beatriz", + "last": "Case", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/amir_hooseini/73.jpg", + "boolean": false, + "guid": "f35cbf9b-3c23-45a2-80cc-959e537f5ed8", + "integer": 7, + "date": "Mon Apr 10 1972 22:46:01 GMT-0800 (PST)", + "shortText": "ut commodo excepteur cillum", + "mediumText": "Nulla aute quis minim culpa proident anim ipsum enim. Magna cillum fugiat eu dolor laboris dolore.", + "longText": "Non non eu qui nulla anim officia officia officia labore culpa. In laborum est ad aliqua laborum sit quis. Aliquip voluptate anim excepteur deserunt dolore dolor dolor ipsum.\r\nProident fugiat nisi qui eu exercitation reprehenderit sint. Elit commodo aliqua quis elit dolor eiusmod consectetur. Nostrud qui non voluptate sint sit anim laboris incididunt. Dolor labore nisi aliquip labore. Amet voluptate sunt pariatur excepteur laborum laborum anim dolor. Excepteur exercitation in labore nostrud aliquip anim duis reprehenderit aliqua dolore amet cillum est consectetur.\r\n", + "address": "4 Hoyts Lane", + "city": "Richmond", + "state": "Texas", + "zip": 12769, + "country": "Syria", + "email": "beatrizcase@scentric.com", + "phone": "(868) 586-2207", + "color": "rgb(127,85,140)" + }, + { + "index": 80, + "name": "Heidi Dillon", + "first": "Jenifer", + "last": "Contreras", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kokikillara/73.jpg", + "boolean": true, + "guid": "198e5b2c-45aa-4d86-aa99-c9e493b55d5c", + "integer": 57, + "date": "Fri Mar 05 2010 16:32:14 GMT-0800 (PST)", + "shortText": "cillum velit deserunt aute in", + "mediumText": "Mollit quis officia in commodo officia ex. Aliqua commodo incididunt cillum Lorem cillum est commodo do aliqua eiusmod. Laborum labore pariatur aute aute minim.", + "longText": "Deserunt enim nisi esse commodo enim irure ullamco eiusmod fugiat. Eiusmod sint reprehenderit minim deserunt voluptate ut sit consectetur id quis ullamco pariatur ut excepteur. Exercitation consectetur commodo ipsum minim. Culpa id occaecat non commodo amet esse magna mollit. Duis anim qui commodo voluptate aliquip ut exercitation amet ea. Quis labore ullamco irure irure ut amet consequat voluptate laborum. Nulla aliqua mollit deserunt sunt deserunt eu adipisicing ea magna ex occaecat.\r\nDuis cillum laborum et sit laborum exercitation commodo nulla magna proident duis. Nisi do excepteur enim esse minim sunt voluptate tempor dolore dolor fugiat sunt duis. Ipsum id velit mollit labore ut sunt quis aliqua adipisicing ad labore ipsum.\r\nAute cupidatat sint proident magna cupidatat sint est deserunt Lorem nisi sit ut. Duis laborum exercitation incididunt deserunt anim ipsum consectetur. Sit laborum irure commodo laboris eiusmod ut laboris ex excepteur proident labore reprehenderit mollit est. Sunt minim ea quis officia ad.\r\nCillum eiusmod ad consequat aliquip consectetur pariatur. Incididunt qui exercitation labore anim. Sint laboris ad sit est ut laboris. Aliqua sit proident cillum commodo fugiat reprehenderit ad. Est elit id sunt laborum excepteur sit Lorem. Ex anim mollit amet ex nostrud nulla irure nisi amet cupidatat non elit enim adipisicing. Cupidatat occaecat irure est fugiat amet adipisicing eu laboris aliqua quis minim sint.\r\nDolor consequat laborum sint enim qui. Sint eiusmod nostrud excepteur dolore incididunt excepteur labore amet ea non nostrud. Cupidatat nulla exercitation tempor ut adipisicing qui voluptate. Quis voluptate proident reprehenderit labore in cillum et commodo exercitation magna. Irure labore irure amet eu fugiat tempor reprehenderit laborum occaecat consectetur ut.\r\n", + "address": "4 Clove Road", + "city": "Brazos", + "state": "District Of Columbia", + "zip": 94302, + "country": "Rwanda", + "email": "jenifercontreras@scentric.com", + "phone": "(886) 401-2897", + "color": "rgb(103,86,175)" + }, + { + "index": 81, + "name": "Morrow Hendrix", + "first": "Pittman", + "last": "Powers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/christianoliff/73.jpg", + "boolean": false, + "guid": "3e7a6c19-006a-4533-86eb-5032c524f1b9", + "integer": 87, + "date": "Mon Jun 13 1977 05:06:10 GMT-0700 (PDT)", + "shortText": "culpa dolor proident non occaecat", + "mediumText": "Consectetur commodo nulla cupidatat exercitation id aliquip.", + "longText": "Reprehenderit irure esse esse esse enim aute elit occaecat officia eiusmod nostrud. Minim labore amet veniam quis laboris cupidatat elit non. Magna amet in elit duis amet velit do duis adipisicing ut. Commodo officia dolore veniam laborum laborum pariatur aute nulla magna dolore esse laboris ea. Irure adipisicing officia velit Lorem.\r\nAd officia adipisicing commodo ipsum sunt in commodo adipisicing qui eu. Esse minim anim do officia laborum deserunt aliquip deserunt ea dolor ut eiusmod non fugiat. Dolore commodo laboris ullamco consectetur amet et non occaecat labore velit est. Veniam elit deserunt eu laboris minim esse. Et ad eu eu voluptate non ad aute nostrud in in. Sint qui mollit aliquip laboris dolor elit incididunt cillum. Mollit fugiat minim tempor amet proident et esse do.\r\nDo laborum do sunt pariatur. Cillum nulla ut exercitation consectetur ad sunt qui. Incididunt Lorem voluptate veniam minim deserunt aliqua. Veniam aute reprehenderit irure excepteur ut aute laborum eu. Sit veniam nisi qui officia. Reprehenderit voluptate tempor et cupidatat cupidatat enim aute. Aliquip reprehenderit esse ad commodo dolor deserunt nisi minim duis ut tempor pariatur quis ad.\r\nEa magna non ex laboris adipisicing deserunt. Ea ad voluptate ipsum consectetur magna voluptate amet eu fugiat. Aute do excepteur exercitation esse consequat aute enim Lorem occaecat id Lorem.\r\nAdipisicing cupidatat sunt non ipsum voluptate nulla occaecat. Pariatur magna exercitation aliqua irure ipsum cillum qui nostrud exercitation ullamco anim occaecat reprehenderit qui. Exercitation voluptate enim magna excepteur eu aliquip id enim laboris aute exercitation sint aliqua. Enim officia tempor labore nulla ut veniam ullamco reprehenderit occaecat nulla. Adipisicing officia ullamco cupidatat et dolor ut cillum enim est aliqua. Cillum et laborum nostrud ex irure do aliquip qui amet cillum nisi exercitation.\r\n", + "address": "2 Lawn Court", + "city": "Alleghenyville", + "state": "Virgin Islands", + "zip": 25057, + "country": "Puerto Rico", + "email": "pittmanpowers@scentric.com", + "phone": "(814) 551-2487", + "color": "rgb(194,148,221)" + }, + { + "index": 82, + "name": "Cook Espinoza", + "first": "Kelli", + "last": "Gallagher", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/andrey_maxim/73.jpg", + "boolean": false, + "guid": "77727f82-a7eb-40af-91dc-dd76a57e5761", + "integer": 4, + "date": "Sat Apr 29 1995 09:21:20 GMT-0700 (PDT)", + "shortText": "est ad non officia", + "mediumText": "Ipsum magna velit cillum cupidatat tempor ad ad amet adipisicing. Aliquip cillum irure id velit. Ullamco occaecat labore dolor sint. Sit dolor consequat in dolor commodo eiusmod anim ullamco consequat laboris non. Esse fugiat cupidatat laboris aliquip non nostrud officia amet.", + "longText": "Do elit consectetur nostrud reprehenderit deserunt culpa deserunt exercitation exercitation. Tempor eiusmod eiusmod incididunt minim mollit exercitation quis do sit amet duis. Culpa in consectetur esse ipsum voluptate sit non qui elit voluptate ea eu tempor excepteur. Enim minim fugiat quis velit dolor adipisicing sunt elit ipsum nulla culpa pariatur sint aliquip.\r\nAd magna enim culpa magna sint pariatur sunt nostrud ad fugiat cupidatat. Sunt non eiusmod nulla cupidatat eu ea eu laborum quis fugiat voluptate nulla laboris. Dolor ad reprehenderit minim commodo dolore commodo aliqua adipisicing dolor laborum pariatur eiusmod laborum irure. Sunt ex adipisicing culpa quis nostrud elit est occaecat ut ut exercitation ullamco ea. In et irure irure tempor est do do qui. Consectetur velit aute enim exercitation ipsum proident officia eiusmod nostrud deserunt nulla cupidatat ullamco.\r\nEsse nisi quis laborum commodo non proident ullamco. Ipsum qui in non adipisicing do incididunt. Magna incididunt amet dolor laboris commodo est voluptate cillum ea amet quis deserunt do. Non in laborum anim mollit sunt irure incididunt ex sit nostrud duis amet. Reprehenderit ipsum anim culpa in. Duis voluptate esse cillum ad eu incididunt.\r\nOccaecat officia in laboris proident aliquip pariatur consectetur consequat commodo enim tempor et. Sit do veniam duis mollit ipsum aliqua et id do do id sint cillum. Ad incididunt minim velit id tempor consequat eiusmod mollit sit do dolor commodo minim quis. Nulla laboris velit excepteur laborum exercitation labore aliqua est enim duis anim sint pariatur duis. Velit elit fugiat mollit ex amet dolor nulla nisi. Laborum ad ut enim ut tempor proident cillum sunt id voluptate et.\r\n", + "address": "2 Bay Avenue", + "city": "Frystown", + "state": "Puerto Rico", + "zip": 13050, + "country": "Korea (North)", + "email": "kelligallagher@scentric.com", + "phone": "(865) 413-3195", + "color": "rgb(105,173,239)" + }, + { + "index": 83, + "name": "Mari Nguyen", + "first": "Moss", + "last": "English", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/muringa/73.jpg", + "boolean": false, + "guid": "1aaee0b4-f194-4e72-8c8b-9eb7aada953a", + "integer": 29, + "date": "Sat Aug 22 1987 08:31:57 GMT-0700 (PDT)", + "shortText": "minim enim voluptate minim", + "mediumText": "Ut est et consequat culpa dolor culpa veniam eiusmod. Commodo adipisicing voluptate laboris nulla esse non reprehenderit pariatur veniam proident reprehenderit.", + "longText": "Pariatur quis sit tempor dolor sit commodo in. Pariatur consectetur sint ea aliquip pariatur dolor commodo et et dolore in esse occaecat. Velit labore nostrud sit deserunt Lorem. Proident labore elit irure consequat sit. Sunt est veniam ullamco pariatur incididunt ad cupidatat. Sit proident tempor anim cupidatat nostrud ullamco do incididunt. Magna in amet anim laboris labore fugiat duis culpa cupidatat enim ipsum ut mollit excepteur.\r\nLorem voluptate officia ut adipisicing occaecat cillum cupidatat. Culpa mollit magna duis pariatur officia officia ad. Reprehenderit reprehenderit reprehenderit proident deserunt. Dolor proident nostrud veniam ea ut. Nisi nisi esse aute adipisicing laborum nulla laboris magna do commodo voluptate sunt ipsum. Occaecat dolor pariatur esse velit eu sint adipisicing cillum magna nulla.\r\nAmet eu et anim nisi mollit ut sit minim. Aute proident non ea consequat do laborum ex consectetur. Cillum commodo minim id veniam duis commodo laboris consequat sunt. Sit ullamco veniam dolor occaecat nostrud dolor incididunt enim minim esse adipisicing id. Adipisicing velit nisi cupidatat velit velit culpa eu reprehenderit duis id aliquip quis tempor fugiat.\r\nAliquip ex elit nulla duis enim aliqua officia. Commodo proident aute labore nostrud nostrud. Et et ad nisi sit ex id eiusmod est Lorem. Enim pariatur velit sunt quis eu fugiat. Consectetur est aute est aliquip elit occaecat quis eiusmod tempor sunt nisi aliqua. Enim ex eu ipsum id sit Lorem excepteur ad voluptate.\r\nAute non est enim ullamco quis proident Lorem Lorem sunt dolor culpa irure. Nostrud quis aliqua ex commodo irure officia mollit Lorem reprehenderit sunt velit. Ut velit cillum velit et ea irure laborum adipisicing amet adipisicing anim. Voluptate exercitation pariatur culpa irure occaecat in reprehenderit ipsum esse. Excepteur quis cillum Lorem do. Tempor est tempor fugiat amet cupidatat nostrud aute cillum.\r\n", + "address": "2 Trucklemans Lane", + "city": "Waiohinu", + "state": "Maryland", + "zip": 78112, + "country": "Bosnia and Herzegovina", + "email": "mossenglish@scentric.com", + "phone": "(823) 570-2457", + "color": "rgb(97,59,63)" + }, + { + "index": 84, + "name": "Bauer Ruiz", + "first": "Marcia", + "last": "Farmer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ahmedelgabri/73.jpg", + "boolean": true, + "guid": "0efaa095-a6b2-4f62-9b1d-c965c8aa4407", + "integer": 49, + "date": "Wed Oct 17 1979 09:38:39 GMT-0700 (PDT)", + "shortText": "cillum cillum ipsum pariatur excepteur", + "mediumText": "Irure dolor Lorem cillum enim esse. Consectetur duis elit aute ut tempor do ea non ad velit. Officia voluptate occaecat exercitation exercitation cillum anim. Exercitation anim tempor qui tempor nulla minim eu quis ad minim.", + "longText": "Sit proident eu velit ad do velit nostrud aute consectetur. Lorem et magna non consequat enim ut. Qui duis consectetur fugiat consectetur elit sit Lorem cupidatat. Ipsum tempor dolore sunt duis. Veniam culpa exercitation sint laboris proident exercitation dolor deserunt aute est exercitation ex laboris.\r\nEsse id non veniam ut ad nostrud ex aliquip culpa quis. Cupidatat ad anim irure pariatur. Consectetur sint officia laboris non consequat proident laboris sunt ipsum. Dolor amet culpa enim pariatur proident eu labore pariatur. Do adipisicing tempor pariatur mollit laborum mollit elit mollit laboris dolore. Aute magna reprehenderit nulla magna amet minim nostrud in aute qui eu ut sunt. Exercitation eiusmod reprehenderit sint esse reprehenderit reprehenderit.\r\nTempor est Lorem eu adipisicing adipisicing est ea. Irure nulla officia culpa laboris do tempor aute laboris elit aute pariatur occaecat qui laborum. Minim duis pariatur consectetur laboris aliquip cupidatat aute enim cillum adipisicing voluptate occaecat enim dolor.\r\nAdipisicing ut voluptate et aliquip eu. Duis laborum irure ullamco voluptate labore in non. Nostrud voluptate voluptate consectetur culpa voluptate aute. Esse dolor enim ad dolor. Aliquip sint esse elit eiusmod mollit. Ipsum in est exercitation qui. Id sit amet nulla qui minim fugiat enim.\r\n", + "address": "3 Paerdegat Avenue", + "city": "Hanover", + "state": "Massachusetts", + "zip": 30524, + "country": "France", + "email": "marciafarmer@scentric.com", + "phone": "(836) 524-2616", + "color": "rgb(169,63,64)" + }, + { + "index": 85, + "name": "Ollie Melton", + "first": "Dennis", + "last": "Hill", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bobbytwoshoes/73.jpg", + "boolean": false, + "guid": "fda2534f-880f-4794-999d-d315d49ba7a9", + "integer": 84, + "date": "Fri Mar 14 2003 11:31:33 GMT-0800 (PST)", + "shortText": "in dolore", + "mediumText": "Elit reprehenderit mollit deserunt nisi. Officia ea id minim culpa id enim consectetur laborum enim non esse et fugiat proident. Consequat magna mollit amet ipsum nisi et commodo nulla officia duis amet laboris ex. Ad ad amet nisi fugiat pariatur mollit sit non culpa consectetur eiusmod.", + "longText": "Ea commodo tempor ea culpa ea quis ipsum pariatur occaecat nulla officia. Reprehenderit laboris non eiusmod aute adipisicing esse eiusmod commodo ex exercitation occaecat. Velit est reprehenderit anim adipisicing et cillum. Sit proident ipsum est reprehenderit eiusmod nulla laborum. Laboris consectetur excepteur sunt ex commodo. Aliqua laboris quis dolor cillum tempor sint do occaecat deserunt cillum dolor ea nisi ipsum.\r\nNisi adipisicing commodo et id officia non laborum et laborum eiusmod adipisicing duis. Eiusmod tempor in quis anim do ullamco exercitation est. Consequat ad commodo adipisicing nisi dolor excepteur ex incididunt anim sunt velit reprehenderit magna. Proident eiusmod eu qui officia duis amet mollit velit elit.\r\n", + "address": "4 Pacific Street", + "city": "Osmond", + "state": "Oklahoma", + "zip": 41895, + "country": "Guinea", + "email": "dennishill@scentric.com", + "phone": "(974) 511-2460", + "color": "rgb(208,193,99)" + }, + { + "index": 86, + "name": "Carlson Petty", + "first": "Miranda", + "last": "Garner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/milovanovicdu/73.jpg", + "boolean": false, + "guid": "4d705513-68a1-4d45-bf9d-593447e391e2", + "integer": 47, + "date": "Thu Dec 30 1976 16:50:53 GMT-0800 (PST)", + "shortText": "anim in do aliquip", + "mediumText": "Do aute est tempor dolore culpa. Ipsum commodo aute veniam officia aliqua enim laboris irure qui. Cupidatat laborum eu consequat laborum sint officia officia aliquip tempor qui nulla fugiat.", + "longText": "Eu consectetur sint aute fugiat duis consectetur anim nisi culpa ullamco. Duis irure dolore ullamco consectetur reprehenderit anim et proident. Officia consequat cupidatat adipisicing consequat amet sit cillum amet commodo. Duis magna dolore incididunt laborum.\r\nReprehenderit enim pariatur labore irure exercitation consectetur eu eu deserunt. Eiusmod excepteur qui elit qui enim adipisicing dolore aliquip anim enim deserunt aliquip et. Irure eiusmod qui quis consectetur est enim. Culpa Lorem nostrud cupidatat magna sint ad cillum culpa adipisicing dolore commodo in laborum cupidatat. Dolore sint minim cupidatat laboris fugiat est ad quis occaecat adipisicing laborum nisi. Magna labore qui anim non qui elit velit do ex veniam ullamco. Eiusmod minim sit pariatur cillum exercitation non occaecat qui et.\r\nUllamco esse ullamco amet amet fugiat occaecat ex in fugiat nulla. Deserunt magna labore fugiat qui officia qui enim minim. Adipisicing irure proident sunt commodo cillum aliqua velit. Esse est est ipsum est elit duis ipsum exercitation. Ipsum sit deserunt duis eu duis id sunt ipsum aute eiusmod.\r\nOfficia eu deserunt veniam deserunt do exercitation. Amet reprehenderit enim anim exercitation sunt do cillum officia laboris commodo mollit quis laboris irure. Duis nisi nulla nisi enim enim. Ipsum minim sit est culpa nostrud aute elit commodo minim laboris incididunt Lorem nostrud. Ullamco sint deserunt incididunt nisi.\r\nSit cillum occaecat officia laboris do cillum. Irure consectetur occaecat elit nostrud. Nisi commodo nulla culpa fugiat duis in consectetur sint proident Lorem non sunt. Fugiat Lorem deserunt duis mollit do sit id.\r\n", + "address": "2 Laurel Avenue", + "city": "Freetown", + "state": "Ohio", + "zip": 80225, + "country": "Senegal", + "email": "mirandagarner@scentric.com", + "phone": "(989) 558-3766", + "color": "rgb(201,116,189)" + }, + { + "index": 87, + "name": "Randolph Lewis", + "first": "Isabella", + "last": "Fry", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/imughal7/73.jpg", + "boolean": false, + "guid": "70e8a5f4-7b65-42d2-bdfa-cd58c31f5e45", + "integer": 2, + "date": "Mon Aug 13 1990 16:40:29 GMT-0700 (PDT)", + "shortText": "velit laboris tempor", + "mediumText": "Ullamco in esse consectetur ea tempor adipisicing ad veniam eiusmod proident.", + "longText": "Aliquip in dolore Lorem labore fugiat et ut nulla voluptate nostrud adipisicing irure. Cupidatat culpa ea consequat cillum culpa amet do deserunt amet voluptate tempor reprehenderit. Esse est excepteur incididunt esse elit laborum nulla ad. Adipisicing reprehenderit amet officia occaecat. Nisi Lorem ea duis id ex aute consequat mollit adipisicing id. Eu mollit elit nostrud labore adipisicing. Magna sunt proident duis voluptate enim ut id qui aliquip ea nisi velit.\r\nDolor duis sint tempor ad commodo sit ut minim id. Magna dolor et sunt ut laborum fugiat officia dolore adipisicing reprehenderit et ullamco nisi. Sint dolor ut laborum tempor veniam dolore eiusmod id adipisicing excepteur proident. Laborum magna fugiat pariatur dolore. Ipsum irure consequat nulla velit. Sint duis mollit exercitation enim fugiat voluptate.\r\nExcepteur adipisicing et magna sunt. Officia incididunt reprehenderit et ea culpa nostrud ex minim ad minim. Consequat magna ipsum laborum ut tempor pariatur Lorem magna minim labore cillum ad nulla nulla.\r\nMinim tempor veniam consequat veniam esse adipisicing officia sint id do veniam. Ullamco dolore ad consequat minim veniam deserunt magna sit nulla cupidatat cillum non incididunt veniam. Labore aliqua cupidatat excepteur eu veniam. Sit id id ut minim aute qui aliqua dolore id ex deserunt id ullamco laboris. Fugiat irure irure nisi in mollit ad cillum sit duis exercitation ad sint sit consectetur. Voluptate eu amet consectetur consectetur dolore ex ad.\r\n", + "address": "2 Schenck Street", + "city": "Richford", + "state": "Nevada", + "zip": 27095, + "country": "Yugoslavia", + "email": "isabellafry@scentric.com", + "phone": "(974) 558-2625", + "color": "rgb(220,182,202)" + }, + { + "index": 88, + "name": "Daniel Foley", + "first": "Stephens", + "last": "Bender", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/creative_px/73.jpg", + "boolean": false, + "guid": "e3ad719a-545a-47b0-a02a-62dfec32263f", + "integer": 98, + "date": "Thu Jan 28 1982 23:00:55 GMT-0800 (PST)", + "shortText": "anim", + "mediumText": "Dolor consequat aute ea officia non dolor consequat exercitation pariatur.", + "longText": "Sunt cupidatat officia ea officia fugiat sunt cupidatat. Esse ex adipisicing mollit ipsum aute. Consectetur non nisi nostrud eiusmod voluptate cupidatat nulla. Dolor enim nulla laboris enim qui velit tempor. Sunt Lorem do qui minim pariatur sint eu occaecat officia laboris. Pariatur reprehenderit occaecat ad ipsum occaecat ex. Magna qui ullamco laborum sint adipisicing magna velit labore sit excepteur duis ad.\r\nMagna laboris ut eiusmod tempor velit exercitation duis qui exercitation. Do occaecat ea consequat non sit eiusmod dolor aute dolor ea elit eiusmod. Ad ad qui reprehenderit culpa velit.\r\nAdipisicing non laboris magna aute pariatur. Sit irure aliquip aute minim sit velit fugiat minim excepteur. Laborum reprehenderit dolor ea ipsum aute minim Lorem velit.\r\n", + "address": "3 Aster Court", + "city": "Diaperville", + "state": "Montana", + "zip": 59636, + "country": "Uzbekistan", + "email": "stephensbender@scentric.com", + "phone": "(929) 559-3077", + "color": "rgb(214,117,159)" + }, + { + "index": 89, + "name": "Morales Mays", + "first": "Tracie", + "last": "Pate", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gabrielizalo/73.jpg", + "boolean": true, + "guid": "f420dfd4-d785-4f2d-ad37-b48a8c5e8c63", + "integer": 42, + "date": "Tue Jun 10 2014 10:24:55 GMT-0700 (PDT)", + "shortText": "elit qui deserunt veniam", + "mediumText": "Sint cupidatat laborum nostrud ullamco pariatur ea consectetur sit irure adipisicing cupidatat commodo nisi ullamco. Esse adipisicing consequat velit consequat cillum exercitation incididunt deserunt est proident. Officia incididunt et tempor esse. Adipisicing fugiat non dolor aute elit elit Lorem consectetur. Irure mollit eu est laboris ea dolor eu irure deserunt sunt nulla mollit culpa.", + "longText": "Dolor anim consequat minim exercitation incididunt voluptate dolor magna. In magna ex veniam duis ad velit commodo tempor ea excepteur. Amet veniam esse aliqua duis. Anim cupidatat voluptate culpa culpa reprehenderit in ullamco aliqua exercitation sit elit.\r\nNulla deserunt minim cupidatat labore id pariatur pariatur minim nostrud. Anim ad eu esse et incididunt labore. Incididunt culpa aliquip sit laboris magna reprehenderit Lorem quis ut commodo aliqua. Cillum velit irure eu nulla fugiat quis nisi laborum reprehenderit duis voluptate ut. Velit ea Lorem dolore ea sint excepteur eiusmod adipisicing minim proident non tempor nisi dolore. Aute dolor consectetur eu ipsum adipisicing ex exercitation consectetur proident adipisicing in.\r\nFugiat minim cupidatat ea sit velit tempor. Dolor laboris minim officia Lorem Lorem eu est ut do nisi veniam nulla adipisicing. Adipisicing veniam occaecat ex sunt id.\r\nVeniam velit ipsum Lorem est ad amet nisi adipisicing. Veniam sint pariatur velit pariatur veniam pariatur deserunt laborum ullamco sit enim et cillum commodo. Nisi incididunt et culpa occaecat aliquip. Ipsum commodo sunt proident esse amet consectetur ullamco nisi nulla voluptate magna. Consequat nostrud labore ipsum dolor mollit ullamco eu cillum occaecat.\r\nNon sit proident deserunt aliquip sunt. Ipsum quis nulla quis elit officia exercitation quis commodo. Ullamco et anim duis do nulla Lorem non commodo do ut tempor ullamco do. Commodo incididunt dolore in laborum excepteur voluptate et tempor nulla sint tempor laborum et. Consectetur amet magna consequat anim duis nisi non in. Tempor deserunt aliqua aute incididunt culpa sunt nostrud cillum laborum dolor.\r\n", + "address": "4 Herbert Street", + "city": "Wescosville", + "state": "California", + "zip": 64034, + "country": "Estonia", + "email": "traciepate@scentric.com", + "phone": "(967) 595-3876", + "color": "rgb(140,217,62)" + }, + { + "index": 90, + "name": "Christie Cobb", + "first": "Georgina", + "last": "Cardenas", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/xtr1mal2/73.jpg", + "boolean": true, + "guid": "62687023-9614-4076-85b2-5cb8b60263be", + "integer": 0, + "date": "Tue Aug 27 2002 06:22:09 GMT-0700 (PDT)", + "shortText": "aliqua", + "mediumText": "Est quis aliquip tempor est elit sint adipisicing et pariatur labore deserunt ex dolore pariatur.", + "longText": "Proident pariatur ex anim proident. Et adipisicing do amet magna id fugiat mollit. Ipsum aliqua pariatur ad eu. Id officia enim enim aliqua veniam amet commodo in incididunt velit incididunt ipsum. Id adipisicing anim voluptate labore veniam cupidatat dolore quis excepteur in velit consectetur fugiat nisi. Laborum tempor duis veniam esse ut et deserunt consequat occaecat Lorem minim aliquip exercitation.\r\nEx ex id id voluptate aliqua tempor veniam non et. Enim labore ut sit quis ullamco. Et sit ea cupidatat laborum exercitation reprehenderit laborum magna enim reprehenderit commodo ex. Et ad nostrud ea nulla. Officia commodo ea ea commodo sunt pariatur in culpa incididunt voluptate magna.\r\nElit reprehenderit minim nulla officia magna proident esse proident id officia officia ea cupidatat. Pariatur duis consectetur laboris et anim excepteur labore laboris officia voluptate proident nostrud dolor incididunt. Ad laboris laborum qui occaecat do fugiat enim officia dolore sit eu.\r\n", + "address": "2 Clinton Street", + "city": "Townsend", + "state": "Marshall Islands", + "zip": 25271, + "country": "Gambia", + "email": "georginacardenas@scentric.com", + "phone": "(917) 515-3962", + "color": "rgb(108,88,246)" + }, + { + "index": 91, + "name": "Kellie Cummings", + "first": "Carissa", + "last": "Castillo", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/eugenerifan/73.jpg", + "boolean": true, + "guid": "dbb02d06-2dc9-4b57-84cd-59d4e653047c", + "integer": 58, + "date": "Sun Jul 27 1986 08:30:17 GMT-0700 (PDT)", + "shortText": "incididunt labore aliquip", + "mediumText": "Excepteur quis proident aliquip consectetur.", + "longText": "Exercitation ea anim ex sit nisi excepteur aliqua eu cillum esse nulla deserunt ut. Cillum veniam laboris occaecat commodo est adipisicing proident. Ut deserunt enim irure officia irure deserunt ipsum labore magna. Do sint sint aliquip ullamco laboris commodo magna ea ut nostrud adipisicing et nostrud aliquip. Enim nostrud commodo do laborum fugiat incididunt quis dolore dolor voluptate tempor. Cupidatat deserunt est commodo amet cillum aliqua ullamco.\r\nEnim commodo labore id duis irure commodo eiusmod nostrud magna tempor veniam exercitation velit. Officia incididunt ut et ex anim. Esse ex cillum aliqua adipisicing et Lorem culpa elit. Commodo laborum ut in aute laboris esse exercitation eiusmod eu. Minim nulla laborum minim ad non fugiat consectetur sunt adipisicing occaecat Lorem consequat. Officia ex aliquip labore non do quis amet sit do tempor exercitation.\r\nQui do dolore officia et elit dolor magna sunt laboris nulla. Enim id deserunt ex amet non deserunt quis nisi quis pariatur commodo est excepteur cillum. Cillum commodo reprehenderit nostrud et adipisicing labore ad ex id. Adipisicing velit mollit aute eu non reprehenderit ad mollit commodo irure sit. Adipisicing cillum consequat dolor incididunt occaecat laborum et ipsum ipsum magna ipsum fugiat esse. Velit esse mollit ex nulla incididunt incididunt est sit pariatur minim fugiat.\r\nExercitation non ut id ad mollit in eu et fugiat ullamco sint ullamco consequat. Cupidatat mollit incididunt ea consectetur Lorem velit sint consectetur irure. Eiusmod sunt ipsum eu voluptate sunt. Laborum do nostrud amet commodo mollit aliqua commodo ex fugiat pariatur incididunt ea. Aute voluptate mollit culpa et cillum mollit proident ad ea proident labore. Qui aute labore pariatur ea.\r\nLaboris Lorem laborum reprehenderit sint duis adipisicing consectetur qui adipisicing cupidatat voluptate anim eu. Nostrud ea consequat officia Lorem sint enim sunt aute qui anim nulla. Est anim sit nisi magna anim. Non aliquip eu deserunt fugiat id irure voluptate labore nostrud. Qui qui ad nulla ea.\r\n", + "address": "4 Pierrepont Place", + "city": "Riviera", + "state": "Indiana", + "zip": 10834, + "country": "Nepal", + "email": "carissacastillo@scentric.com", + "phone": "(902) 528-2051", + "color": "rgb(116,122,170)" + }, + { + "index": 92, + "name": "Hooper Acosta", + "first": "Delacruz", + "last": "Hunt", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/imcoding/73.jpg", + "boolean": true, + "guid": "f3455179-b392-49d5-8f8e-0b570ff95363", + "integer": 63, + "date": "Wed Apr 18 1973 01:53:52 GMT-0800 (PST)", + "shortText": "aute consectetur", + "mediumText": "Non esse non cillum eiusmod. Velit consequat amet eiusmod do laborum est do. Id aliqua cupidatat tempor consectetur do consectetur.", + "longText": "In elit nisi dolore aliquip magna ex. Eu do in enim tempor duis adipisicing eiusmod magna ut velit velit do. Nostrud magna aliquip est exercitation qui elit sit.\r\nLabore Lorem minim id laborum proident in sit ea quis sit. Mollit excepteur voluptate sit qui. Ex in voluptate veniam magna dolor consectetur anim consectetur. Deserunt deserunt elit in id.\r\nAd incididunt aute labore commodo consectetur consectetur commodo magna irure. Duis adipisicing pariatur ea labore consequat ut pariatur labore laboris nulla occaecat. Irure aute id id eiusmod. Aute eiusmod Lorem eiusmod occaecat qui in veniam in laboris. Elit sit sit tempor tempor magna. Elit aliquip cupidatat commodo eiusmod consequat fugiat magna nisi fugiat irure aute dolore quis labore.\r\nOccaecat duis duis ad officia consectetur aute elit excepteur consectetur ullamco. Exercitation pariatur irure ad anim fugiat anim. Elit laborum velit aliquip et aliquip officia elit ad amet mollit nulla.\r\nFugiat minim minim anim labore culpa magna laborum veniam in reprehenderit id. Id sint pariatur excepteur commodo ullamco eu. Eiusmod magna commodo reprehenderit nostrud in culpa laboris occaecat aliqua. Sit pariatur nulla sit exercitation irure pariatur sit cillum occaecat exercitation. Aliqua dolore aliqua magna minim id ut eu veniam.\r\n", + "address": "3 Matthews Place", + "city": "Caron", + "state": "Tennessee", + "zip": 68234, + "country": "Falkland Islands (Malvinas)", + "email": "delacruzhunt@scentric.com", + "phone": "(928) 557-3052", + "color": "rgb(207,106,189)" + }, + { + "index": 93, + "name": "Leonor Rogers", + "first": "Claudette", + "last": "Walters", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/madhan4uu/73.jpg", + "boolean": false, + "guid": "d7ddd425-5e0b-407b-b795-4591ac988f7e", + "integer": 14, + "date": "Fri Sep 10 1982 05:35:18 GMT-0700 (PDT)", + "shortText": "nisi enim velit consequat", + "mediumText": "Velit ea anim fugiat ex esse officia.", + "longText": "Anim voluptate consequat et deserunt. Officia culpa quis consequat et occaecat adipisicing commodo ipsum culpa elit Lorem elit. Proident sunt sint id tempor. Pariatur nulla enim id ut aliqua commodo amet ex. Dolor ad tempor Lorem cupidatat cillum deserunt nisi.\r\nDo ad cillum consequat eu nulla irure eiusmod eu aute est sint tempor. Irure irure in culpa commodo esse occaecat fugiat minim sit est dolor. Do ex dolor non quis adipisicing amet incididunt non eiusmod nisi laborum.\r\nDeserunt anim consequat incididunt pariatur eiusmod. Aute nostrud id ipsum consequat laboris dolore. Aliquip in ullamco est incididunt anim esse magna ea labore in.\r\nAliquip ex nisi sit pariatur nostrud do dolor eiusmod consectetur ad quis consequat fugiat. Culpa enim cillum sint minim deserunt duis officia duis laborum mollit cillum ad aliqua. Sint consectetur proident duis velit ea adipisicing. Amet deserunt ut quis est ipsum velit Lorem tempor velit reprehenderit adipisicing consectetur occaecat sint.\r\nMagna nulla aute qui deserunt nostrud cillum magna fugiat occaecat Lorem ipsum culpa. Est anim aute do nisi dolor sint qui pariatur. Fugiat culpa reprehenderit officia excepteur elit amet excepteur enim tempor sint sit consequat. Consequat enim laboris officia nisi irure irure consequat elit. Dolor minim do velit sit deserunt cillum.\r\n", + "address": "3 Fulton Street", + "city": "Hegins", + "state": "Palau", + "zip": 78135, + "country": "Peru", + "email": "claudettewalters@scentric.com", + "phone": "(942) 474-3822", + "color": "rgb(90,63,99)" + }, + { + "index": 94, + "name": "Cote Guerra", + "first": "Trisha", + "last": "Chavez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tirsope/73.jpg", + "boolean": false, + "guid": "da6e4096-5de2-48f3-a83e-e7e504b7ef50", + "integer": 60, + "date": "Wed Feb 14 1990 21:07:18 GMT-0800 (PST)", + "shortText": "amet officia", + "mediumText": "Pariatur nulla nulla aliqua sunt nulla excepteur id amet consequat. Nostrud eu aliquip enim esse eu non exercitation do nulla labore adipisicing dolor. Est voluptate excepteur aliquip voluptate nulla fugiat ut amet tempor.", + "longText": "Ullamco quis exercitation sunt sunt do aute sit qui duis non. Irure dolore tempor velit velit et eu sint elit. Velit esse deserunt elit minim adipisicing sint est commodo sit aute velit excepteur dolore sunt. Occaecat adipisicing occaecat pariatur do enim culpa proident nostrud labore aute consectetur esse dolor ut. Irure pariatur minim aute labore mollit eu deserunt amet deserunt. Ex velit ad quis ullamco.\r\nOfficia nostrud excepteur nisi id esse cupidatat adipisicing. Veniam ea duis nisi exercitation labore non pariatur velit officia Lorem tempor. Qui ea culpa laborum cillum commodo. Enim eu sit adipisicing voluptate est ex incididunt eu deserunt. Sit irure dolor non culpa anim. Sint ex ullamco culpa est ipsum. Id nostrud id eiusmod ea consequat anim nulla qui aliquip sunt sunt Lorem.\r\n", + "address": "4 Montauk Court", + "city": "Ryderwood", + "state": "Virginia", + "zip": 72564, + "country": "Tonga", + "email": "trishachavez@scentric.com", + "phone": "(986) 580-3064", + "color": "rgb(252,141,100)" + }, + { + "index": 95, + "name": "Stewart Bradley", + "first": "Desiree", + "last": "Sullivan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lorenzosinisi/73.jpg", + "boolean": false, + "guid": "09ba747d-fcdd-47ec-b40f-149aad2803bd", + "integer": 14, + "date": "Mon Aug 18 2014 05:24:18 GMT-0700 (PDT)", + "shortText": "veniam officia exercitation", + "mediumText": "Sint dolor aliqua velit eu eiusmod id. Velit pariatur sit labore sit sit elit dolore fugiat veniam excepteur ex. Velit ex elit ullamco ipsum sunt magna aliqua cupidatat veniam Lorem mollit eu sit. Consequat Lorem Lorem sit aute.", + "longText": "Nulla aliquip id sunt ex reprehenderit sit et amet adipisicing pariatur sit non mollit minim. Sint nisi occaecat duis ut amet veniam mollit. Esse ipsum ea in anim. Elit est adipisicing velit cupidatat laboris in laboris eiusmod non aliquip minim. Eu commodo occaecat occaecat cupidatat cillum nulla esse mollit exercitation eu.\r\n", + "address": "4 Douglass Street", + "city": "Hiko", + "state": "Wyoming", + "zip": 58685, + "country": "Tunisia", + "email": "desireesullivan@scentric.com", + "phone": "(955) 561-2349", + "color": "rgb(67,224,233)" + }, + { + "index": 96, + "name": "Corinne Farley", + "first": "Guthrie", + "last": "May", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/celikovic/73.jpg", + "boolean": false, + "guid": "5fe813a0-75c4-4214-96b9-9b4d5fcea8bf", + "integer": 79, + "date": "Wed Aug 26 2009 12:40:36 GMT-0700 (PDT)", + "shortText": "eiusmod aliquip mollit aute", + "mediumText": "Ea irure ea pariatur laborum non commodo. Veniam est laboris ex occaecat laboris irure. Aliqua pariatur anim ut eu veniam do ex non veniam nostrud. Occaecat excepteur non est cillum commodo eu ullamco.", + "longText": "In anim esse ea excepteur est. Laboris qui ex ipsum cillum excepteur nisi. Non deserunt qui duis ut eiusmod ad laborum labore Lorem est cupidatat. Nulla eiusmod sint reprehenderit amet fugiat labore laboris.\r\nVoluptate anim minim cillum est aliquip. Occaecat eiusmod eu consectetur id id sit id aliquip minim. Id quis laboris duis dolore id pariatur officia irure ullamco cillum ullamco dolor. Ut pariatur excepteur eiusmod exercitation tempor.\r\nProident amet esse enim fugiat nostrud aute exercitation excepteur ut dolore incididunt. Eiusmod dolore irure ut tempor. Cupidatat id laboris aute nulla deserunt sint. Velit mollit ut eu commodo. Esse adipisicing veniam voluptate dolore laborum laboris qui aliquip fugiat ullamco ea exercitation voluptate. Enim veniam do aliquip aute laboris in elit magna anim. Consequat excepteur eu dolor officia eiusmod incididunt occaecat deserunt commodo nisi Lorem.\r\nMagna culpa dolore deserunt aliquip. Quis officia ut nulla et commodo officia ullamco. Cupidatat ea eiusmod nulla enim sit in.\r\nEst reprehenderit consectetur consectetur eu occaecat nulla nulla laboris est ad nulla exercitation. Amet nostrud nulla minim minim ea incididunt ea et. Exercitation qui qui mollit exercitation. Exercitation excepteur labore cillum laboris ut nulla excepteur pariatur ullamco ex ex consectetur consectetur. Lorem ex laborum in qui velit reprehenderit id pariatur esse enim. Do eu adipisicing culpa elit exercitation ea est occaecat. Et velit cupidatat excepteur sunt officia occaecat et cillum ut voluptate enim.\r\n", + "address": "3 Locust Street", + "city": "Wyano", + "state": "Colorado", + "zip": 24261, + "country": "Guadeloupe", + "email": "guthriemay@scentric.com", + "phone": "(952) 423-2212", + "color": "rgb(207,250,179)" + }, + { + "index": 97, + "name": "Heather Martinez", + "first": "Althea", + "last": "Quinn", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_kshitish/73.jpg", + "boolean": false, + "guid": "d67d7b7a-2ab1-446e-a591-4f565e74fe3d", + "integer": 13, + "date": "Mon Mar 17 2003 07:02:53 GMT-0800 (PST)", + "shortText": "adipisicing magna", + "mediumText": "Reprehenderit exercitation ut in ex voluptate dolore.", + "longText": "Pariatur pariatur do ipsum exercitation magna. Irure irure officia voluptate amet fugiat sint est proident reprehenderit cupidatat est eu. Esse ea eiusmod nostrud ad quis laborum deserunt nisi. Deserunt ut fugiat aliqua minim. Proident fugiat aliqua nostrud adipisicing Lorem velit et ipsum fugiat fugiat aliquip cupidatat Lorem.\r\nEx quis non excepteur est cillum non aute consequat ipsum aliqua nostrud sunt nisi non. Est aliquip enim aute culpa. Esse enim pariatur id velit nostrud adipisicing voluptate pariatur et sint sunt.\r\nUt quis cillum dolor minim nulla fugiat enim irure officia. Reprehenderit voluptate sint veniam velit tempor deserunt eu adipisicing id anim fugiat. Nostrud dolore esse reprehenderit enim nulla duis exercitation.\r\nCillum proident est dolore sint qui sint laborum enim exercitation aute in pariatur. Ut non eiusmod excepteur exercitation aliquip incididunt cupidatat magna deserunt in est. Excepteur duis incididunt sunt commodo amet nulla ex adipisicing incididunt in exercitation amet et. Ullamco eu nulla ipsum magna voluptate incididunt aliqua id.\r\n", + "address": "4 Arkansas Drive", + "city": "Catherine", + "state": "Utah", + "zip": 68985, + "country": "Australia", + "email": "altheaquinn@scentric.com", + "phone": "(997) 529-2688", + "color": "rgb(175,88,98)" + }, + { + "index": 98, + "name": "Good Mathis", + "first": "Hester", + "last": "Santana", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/2fockus/73.jpg", + "boolean": true, + "guid": "8046ed24-325f-4486-9067-34ecfa37746c", + "integer": 67, + "date": "Sat Mar 19 1977 20:48:42 GMT-0800 (PST)", + "shortText": "commodo incididunt officia", + "mediumText": "Velit sint reprehenderit laboris occaecat in reprehenderit dolore adipisicing nisi pariatur enim aute. Cillum velit voluptate sit irure.", + "longText": "Irure labore incididunt nisi labore sint cillum cillum. Pariatur aute dolor duis ad eu nulla veniam enim voluptate. Laborum fugiat veniam occaecat adipisicing voluptate qui pariatur voluptate quis eu. Aliquip aute anim proident excepteur do aute consectetur ipsum exercitation est velit consequat laboris. Amet proident enim aute excepteur cillum. Do occaecat ullamco proident adipisicing ullamco id anim nostrud. Laborum ullamco occaecat aliqua eiusmod culpa quis nulla ad dolore ad ullamco.\r\nEsse ex officia qui qui aute. Ipsum sint irure nostrud nulla culpa cupidatat do. Aute ullamco occaecat aliquip in tempor minim ut nisi aliquip nostrud cillum Lorem. Excepteur dolor cupidatat eiusmod Lorem. Dolore eu ad sint ullamco voluptate.\r\nSit cupidatat id mollit occaecat in officia amet in magna enim sint. Officia deserunt proident quis in ut. Excepteur incididunt amet nulla labore eu incididunt adipisicing laboris nisi. Magna nisi proident deserunt sunt do deserunt eiusmod pariatur.\r\nDo elit quis occaecat anim aliquip aliquip excepteur. Enim laborum proident labore ad nulla duis magna tempor duis. Commodo veniam tempor minim cillum ex dolor.\r\nVelit adipisicing mollit pariatur in ipsum tempor id velit excepteur laborum amet laborum laborum. Excepteur eu exercitation veniam sit veniam incididunt sit. Elit commodo eu aute tempor aliquip esse non minim mollit. Consequat amet deserunt non enim. Nostrud anim Lorem aliquip cupidatat.\r\n", + "address": "3 Fiske Place", + "city": "Klagetoh", + "state": "Idaho", + "zip": 38305, + "country": "Dominican Republic", + "email": "hestersantana@scentric.com", + "phone": "(802) 512-3640", + "color": "rgb(253,247,138)" + }, + { + "index": 99, + "name": "Hurley Eaton", + "first": "Garner", + "last": "Kirk", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dnevozhai/73.jpg", + "boolean": true, + "guid": "312f254d-5789-4396-a389-10090b30c80a", + "integer": 80, + "date": "Sun Jun 01 2008 17:44:07 GMT-0700 (PDT)", + "shortText": "enim laborum", + "mediumText": "Reprehenderit labore magna est sunt dolore excepteur ea. Duis laboris eiusmod do laboris cupidatat proident in amet quis adipisicing est nisi.", + "longText": "Sunt mollit aliqua nisi irure sit. Minim sit amet duis nisi Lorem veniam. Deserunt anim est sint consequat pariatur elit eu magna incididunt duis aliquip. Do ipsum adipisicing eu quis ut nostrud fugiat ad in nostrud est sint enim. Incididunt exercitation commodo ipsum ut eu. Irure et adipisicing esse dolor eu. Ea consequat cillum eu occaecat in magna cillum anim culpa deserunt.\r\nConsectetur adipisicing velit minim et occaecat laborum minim fugiat eu laboris minim anim id do. Sint cupidatat pariatur sit quis quis elit pariatur. Deserunt proident enim Lorem est minim nisi et laborum nisi exercitation. Mollit qui consequat proident aliqua ad quis dolor. Irure nulla nisi ut Lorem ullamco sint et nulla dolore consectetur. Esse Lorem qui do pariatur mollit in velit amet labore.\r\nAliqua magna eiusmod ea velit sit voluptate in ea ad Lorem laborum aute cillum et. Veniam ea eiusmod dolor Lorem adipisicing deserunt. Do sunt dolore do fugiat et magna id aliquip nulla occaecat mollit.\r\nId veniam voluptate irure est ea irure nostrud ex. Est anim est dolor exercitation reprehenderit minim non est commodo ex est ut Lorem. Nulla aute nulla dolore amet deserunt elit tempor reprehenderit amet. Nulla et magna aliqua laborum ut minim ad in ex mollit dolor officia.\r\n", + "address": "2 Marconi Place", + "city": "Clarktown", + "state": "Arkansas", + "zip": 81655, + "country": "Zaire", + "email": "garnerkirk@scentric.com", + "phone": "(901) 504-3233", + "color": "rgb(141,220,214)" + }, + { + "index": 100, + "name": "Ruby Schroeder", + "first": "Julianne", + "last": "Hurst", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sebasribas/73.jpg", + "boolean": false, + "guid": "ae0e0ad1-423d-4e87-9d72-e7957011b3b1", + "integer": 51, + "date": "Tue Jun 14 1977 06:58:41 GMT-0700 (PDT)", + "shortText": "consectetur", + "mediumText": "Ex ea veniam ut velit aute dolore laborum ut. Ex proident elit cillum elit reprehenderit amet fugiat cillum cupidatat fugiat. Elit Lorem aute ad ad sit exercitation aute excepteur ex elit.", + "longText": "Eiusmod in irure exercitation aute aliquip qui sit amet ullamco cillum eiusmod enim. Ut aliquip occaecat nisi aliqua ut esse minim. Tempor deserunt dolore ea fugiat tempor cupidatat fugiat excepteur consectetur velit tempor eiusmod laborum. Adipisicing incididunt ex sit aliqua deserunt in culpa. Veniam ipsum enim duis enim ex proident do anim amet. Ipsum consequat ut labore non quis cupidatat adipisicing eiusmod amet.\r\nQui consectetur pariatur adipisicing aliquip nulla labore nulla in laborum excepteur eiusmod eu esse. Elit duis commodo ex laboris consectetur sunt in ullamco elit aliquip commodo consequat adipisicing. Labore eiusmod dolore ut voluptate proident. Officia fugiat culpa elit consectetur mollit sint ut. Duis magna cillum Lorem adipisicing amet nisi minim laboris nostrud fugiat eu nisi sunt.\r\nEa voluptate anim reprehenderit eu laboris ex ad non ut magna eu esse laborum. Eiusmod non dolor ex adipisicing sunt elit proident in officia pariatur eiusmod minim voluptate ex. Commodo excepteur enim sit dolor magna. Quis velit adipisicing pariatur ad ullamco ullamco eu fugiat consectetur. Est fugiat esse cupidatat velit ea aute laboris occaecat ullamco est velit. Aliqua adipisicing ex duis ipsum.\r\nLaboris mollit est officia in commodo consequat ullamco officia id aute non in ut. Excepteur ad magna sit dolore voluptate irure ut. Occaecat ea duis ipsum excepteur fugiat esse nulla incididunt fugiat adipisicing cupidatat labore. Voluptate eu consectetur tempor qui in quis in ad proident magna ex aliquip ad. Aute laboris consectetur proident ullamco voluptate nulla commodo tempor aliqua magna. Laborum eiusmod nulla occaecat quis elit aliquip aute id irure ut excepteur.\r\n", + "address": "3 Wyckoff Avenue", + "city": "Holcombe", + "state": "Delaware", + "zip": 49315, + "country": "China", + "email": "juliannehurst@scentric.com", + "phone": "(867) 576-3002", + "color": "rgb(191,56,212)" + }, + { + "index": 101, + "name": "Alana Wise", + "first": "Edith", + "last": "Suarez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/cepreygolubev/73.jpg", + "boolean": true, + "guid": "19280eda-c661-4fde-88e3-e7e705ea0a83", + "integer": 59, + "date": "Wed Jun 25 2003 02:31:03 GMT-0700 (PDT)", + "shortText": "aute", + "mediumText": "Consectetur eu aute tempor mollit do aute nostrud adipisicing ad commodo id.", + "longText": "Incididunt excepteur cupidatat mollit ad tempor esse cupidatat velit ipsum non tempor est incididunt. Duis consequat dolore elit cupidatat mollit est. Exercitation et ex deserunt adipisicing tempor consectetur adipisicing ipsum deserunt amet enim tempor. Excepteur elit sit cupidatat cupidatat sit ea anim ullamco cupidatat nisi consectetur ut. Adipisicing amet duis occaecat excepteur adipisicing et exercitation enim est.\r\nCulpa nulla dolor ullamco occaecat dolor elit irure dolor velit anim id incididunt eiusmod ut. Deserunt dolore fugiat ipsum tempor ut dolore nostrud. Exercitation cillum culpa nostrud est. Quis qui sunt dolor id aliquip culpa anim nisi deserunt.\r\nLaborum eu minim aliqua excepteur ad. Sit tempor ullamco laborum excepteur pariatur deserunt cupidatat. Sint anim eiusmod sint elit. Incididunt consequat officia incididunt cillum. Reprehenderit anim reprehenderit esse officia et ea excepteur nisi magna. Lorem cupidatat in fugiat eu. Exercitation occaecat do eiusmod esse.\r\nAnim ullamco excepteur culpa deserunt enim est dolore duis ea anim exercitation. In et pariatur exercitation occaecat ad id Lorem ullamco consectetur labore ut laboris excepteur magna. Aute exercitation Lorem fugiat esse incididunt. Nulla nostrud ea ipsum eiusmod laboris nulla qui veniam aute officia eiusmod ad. Et anim ut dolor qui commodo occaecat nostrud non ex.\r\nCillum non et laborum cillum ex officia ullamco aliquip ut Lorem. Duis est sit sunt laboris ullamco deserunt dolor labore ut. Cupidatat elit do aute aliquip laborum tempor amet laboris occaecat id exercitation elit. Ullamco quis laboris voluptate amet duis elit incididunt mollit anim proident.\r\n", + "address": "4 Leonard Street", + "city": "Bluetown", + "state": "Federated States Of Micronesia", + "zip": 89344, + "country": "British Indian Ocean Territory", + "email": "edithsuarez@scentric.com", + "phone": "(920) 452-3377", + "color": "rgb(69,58,250)" + }, + { + "index": 102, + "name": "Kristen Wheeler", + "first": "Burke", + "last": "Barnes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iamphilipjoyce/73.jpg", + "boolean": true, + "guid": "64341244-b22d-415d-8856-27b7c1b9e527", + "integer": 7, + "date": "Wed Jul 20 1994 02:28:58 GMT-0700 (PDT)", + "shortText": "duis dolore non minim est", + "mediumText": "Veniam amet sit nulla labore Lorem exercitation excepteur nostrud nulla velit proident laboris.", + "longText": "Ex incididunt do ad enim eu labore fugiat nulla enim elit. Cupidatat ipsum quis qui labore excepteur ullamco elit minim. Magna minim elit non mollit in consectetur cillum esse cillum ut esse aliquip anim. Reprehenderit ea irure eu consectetur nisi.\r\n", + "address": "2 Crooke Avenue", + "city": "Geyserville", + "state": "Guam", + "zip": 77246, + "country": "Libya", + "email": "burkebarnes@scentric.com", + "phone": "(843) 586-2743", + "color": "rgb(221,72,113)" + }, + { + "index": 103, + "name": "Clark Powell", + "first": "Hahn", + "last": "Lancaster", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/russell_baylis/73.jpg", + "boolean": true, + "guid": "d83aada5-7279-4d3c-81fe-360aa4d342af", + "integer": 44, + "date": "Tue Apr 17 2007 17:02:41 GMT-0700 (PDT)", + "shortText": "officia excepteur fugiat", + "mediumText": "Commodo consequat esse amet deserunt duis magna. Cupidatat aliquip consectetur anim incididunt laboris. Reprehenderit Lorem enim cillum pariatur est sint aliqua commodo non tempor.", + "longText": "Nisi tempor irure nulla duis. Cillum aliquip commodo in minim sunt proident exercitation do dolore velit. Nulla sunt sit officia magna ex ea.\r\nEa consequat aute duis quis elit. Sint aute deserunt commodo reprehenderit aliqua consequat commodo minim ut quis incididunt reprehenderit. Nulla elit voluptate laboris laboris dolore labore tempor pariatur deserunt reprehenderit tempor non occaecat pariatur. Elit pariatur irure ex exercitation ut ex dolore dolore consequat consectetur magna. Lorem consectetur est reprehenderit pariatur dolore sit Lorem Lorem ad ea elit.\r\nAd occaecat est ullamco occaecat voluptate. Aute proident in est adipisicing. Anim ipsum est voluptate ipsum cillum eiusmod aliquip. Officia magna irure commodo ut pariatur est eu nostrud laboris excepteur adipisicing deserunt consectetur amet. Qui consequat cupidatat laborum non.\r\nDolore do cupidatat irure quis culpa aliquip elit laboris consequat qui magna dolore. Magna esse qui exercitation dolore tempor tempor ex irure veniam cupidatat commodo qui officia fugiat. Fugiat aliqua eiusmod deserunt esse elit nisi. Reprehenderit pariatur duis excepteur eiusmod esse. Velit nulla nisi reprehenderit Lorem minim ut tempor nulla aliqua in incididunt aute esse aliquip. Duis laborum quis non commodo officia commodo. Officia nostrud do qui velit occaecat aute ex adipisicing officia et excepteur velit irure officia.\r\n", + "address": "3 Polhemus Place", + "city": "Franklin", + "state": "Pennsylvania", + "zip": 30447, + "country": "Cook Islands", + "email": "hahnlancaster@scentric.com", + "phone": "(901) 537-3991", + "color": "rgb(225,104,190)" + }, + { + "index": 104, + "name": "Tamra Cox", + "first": "Acevedo", + "last": "Bell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kijanmaharjan/73.jpg", + "boolean": true, + "guid": "2d002e10-253b-41d7-bca7-add74579f9d5", + "integer": 0, + "date": "Thu Nov 04 1982 13:05:17 GMT-0800 (PST)", + "shortText": "ullamco in aliqua", + "mediumText": "Irure eiusmod ullamco occaecat deserunt. Ullamco nisi veniam nulla ea labore irure incididunt sit nulla ut commodo.", + "longText": "Culpa elit est velit laborum do eu cillum. Adipisicing sit incididunt ea exercitation anim irure laboris quis reprehenderit adipisicing exercitation adipisicing eu aliquip. Irure aliqua minim irure labore magna cillum fugiat sit occaecat sint. Eiusmod velit dolore est nisi do dolor id quis nisi sunt id anim ex proident. Laborum consectetur deserunt amet anim non commodo occaecat proident et.\r\nDo in magna deserunt dolor aute ad occaecat consectetur qui. Dolore in eiusmod id mollit tempor pariatur sunt reprehenderit incididunt ipsum aliquip dolor qui commodo. Eiusmod in mollit fugiat qui. Nulla nostrud officia aute minim. Officia id proident excepteur sunt amet occaecat nisi anim amet reprehenderit. Tempor duis mollit nostrud enim reprehenderit fugiat nostrud ea proident magna. Sint magna labore aliqua tempor officia do nisi ex in cillum nisi.\r\nNulla tempor in cillum et eiusmod ad qui dolor consequat do deserunt. Mollit ex anim consequat aliqua commodo. Adipisicing cillum ut nostrud ad aliquip. Ipsum occaecat reprehenderit ipsum in veniam tempor deserunt ut adipisicing dolore dolore cupidatat. Consequat velit officia quis labore mollit reprehenderit duis consectetur excepteur nisi tempor.\r\n", + "address": "4 Grand Street", + "city": "Iola", + "state": "New Hampshire", + "zip": 44737, + "country": "Iran", + "email": "acevedobell@scentric.com", + "phone": "(813) 503-2649", + "color": "rgb(84,124,140)" + }, + { + "index": 105, + "name": "Barr Higgins", + "first": "Tonia", + "last": "Walton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/marcoramires/73.jpg", + "boolean": true, + "guid": "b381e41b-6b9b-4f51-85f1-661eade44d9d", + "integer": 93, + "date": "Tue Dec 24 1985 18:32:45 GMT-0800 (PST)", + "shortText": "sunt nisi laborum", + "mediumText": "Aliqua esse in cillum nostrud exercitation duis cupidatat cillum non deserunt culpa.", + "longText": "Exercitation ad do aliqua nostrud magna consequat. Ex ea commodo fugiat labore ipsum officia minim do velit proident sit. Voluptate eiusmod consequat voluptate dolor consectetur eu sunt eiusmod veniam. Exercitation eiusmod fugiat reprehenderit laboris.\r\nMollit aliqua est laboris proident non esse culpa cupidatat laborum qui nulla deserunt occaecat elit. Lorem esse quis labore dolor dolore labore nostrud ea labore veniam tempor. Anim elit nostrud ut velit pariatur sint laborum velit. Et esse culpa voluptate dolor commodo aliquip est ut. Laboris ullamco enim exercitation ea velit excepteur enim veniam in mollit irure. Qui nisi sit ad consequat veniam proident proident reprehenderit ipsum dolore proident. Nostrud occaecat quis laboris magna labore ut tempor consectetur labore cupidatat ea irure pariatur.\r\nAd consectetur commodo do excepteur. Velit fugiat qui pariatur velit nostrud enim. Et in ea enim non exercitation aliqua anim commodo cillum ullamco in nulla nostrud. Eu ex enim ut enim magna duis aliquip ullamco enim. Aute anim ex incididunt cillum eiusmod minim ut nostrud excepteur dolore. Reprehenderit nisi nisi consequat consequat mollit dolor excepteur ipsum aute est tempor. Occaecat in aute ea Lorem ex consectetur.\r\nCupidatat nulla ullamco mollit id consequat. Dolore aute sit est voluptate cillum adipisicing laboris ex non adipisicing. Minim proident labore nisi eu proident irure et et. Dolor deserunt deserunt in et qui consectetur ullamco occaecat. Magna ut tempor fugiat velit. Magna elit id Lorem quis occaecat dolor irure amet nulla. Proident ex ullamco consectetur consequat consequat eiusmod dolor proident aliquip ut.\r\nExcepteur ea aliqua elit incididunt deserunt commodo nisi. Exercitation nostrud in officia anim ea non anim laborum ullamco incididunt. Do aliqua excepteur officia reprehenderit reprehenderit cillum. Duis nostrud veniam occaecat quis exercitation magna mollit est fugiat ullamco in consectetur culpa cillum. Minim consequat elit ipsum in occaecat sit dolor sint laborum.\r\n", + "address": "4 Banker Street", + "city": "Silkworth", + "state": "North Dakota", + "zip": 14286, + "country": "Aruba", + "email": "toniawalton@scentric.com", + "phone": "(889) 461-2741", + "color": "rgb(116,194,59)" + }, + { + "index": 106, + "name": "Hickman Copeland", + "first": "Ross", + "last": "Ratliff", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/noufalibrahim/73.jpg", + "boolean": true, + "guid": "2f265cef-ebfa-484a-b328-63fa19eed885", + "integer": 91, + "date": "Tue Mar 20 1979 12:59:39 GMT-0800 (PST)", + "shortText": "eiusmod", + "mediumText": "Culpa dolor sunt culpa magna.", + "longText": "Aute amet velit labore labore culpa. Minim eiusmod eiusmod eiusmod nostrud et quis in et culpa ex sit incididunt Lorem. Cupidatat adipisicing Lorem dolore consequat elit.\r\n", + "address": "2 Euclid Avenue", + "city": "Rosewood", + "state": "Northern Mariana Islands", + "zip": 23138, + "country": "Faroe Islands", + "email": "rossratliff@scentric.com", + "phone": "(917) 466-2566", + "color": "rgb(245,137,240)" + }, + { + "index": 107, + "name": "Cervantes Mckee", + "first": "Vasquez", + "last": "Knapp", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/avclarkey/73.jpg", + "boolean": false, + "guid": "3658528d-3180-47bd-9c2e-d4f53947e409", + "integer": 27, + "date": "Sat Jan 23 1971 05:21:04 GMT-0800 (PST)", + "shortText": "eiusmod ullamco", + "mediumText": "Nulla tempor cupidatat consequat fugiat consequat irure non in. Ea eiusmod exercitation dolor labore laborum irure anim tempor exercitation.", + "longText": "Incididunt sit fugiat nulla ipsum. Veniam ex nostrud eu reprehenderit cillum. Fugiat nostrud esse eiusmod cupidatat consectetur ipsum sit duis consectetur cupidatat duis ullamco incididunt. Ea cupidatat esse sint adipisicing magna enim irure. Irure amet officia elit ullamco est cupidatat. Voluptate ut Lorem commodo occaecat nisi non id in ullamco occaecat est. Officia ea ea tempor irure commodo aute laborum et enim quis magna occaecat.\r\nAdipisicing ullamco aute duis labore duis est id Lorem ea commodo do nulla laboris. Et magna aliquip Lorem in in consectetur enim nulla do ad. Ea aute Lorem dolore eiusmod qui aliqua in cupidatat velit labore aliquip. Est esse velit sit consectetur anim nostrud ullamco commodo magna mollit in ut tempor. Lorem velit irure eiusmod duis amet et consectetur est quis non nulla incididunt et. Incididunt tempor ex minim amet reprehenderit. Anim nisi dolor ad tempor officia.\r\nEa ex esse amet excepteur tempor officia cupidatat eu cupidatat sit irure. Lorem minim quis ut non sit ullamco id tempor minim aliquip deserunt. Voluptate consectetur qui velit occaecat ullamco ea cupidatat tempor in anim ad magna. Ut velit dolore eiusmod reprehenderit incididunt irure anim laboris voluptate mollit incididunt minim ad duis.\r\n", + "address": "4 Crown Street", + "city": "Lowgap", + "state": "South Dakota", + "zip": 17680, + "country": "Zambia", + "email": "vasquezknapp@scentric.com", + "phone": "(889) 408-3991", + "color": "rgb(212,58,71)" + }, + { + "index": 108, + "name": "Juana Melendez", + "first": "Ford", + "last": "Greer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/arindam_/73.jpg", + "boolean": false, + "guid": "b9726558-94a5-4533-9213-cc6b11fa2b5d", + "integer": 94, + "date": "Mon Jul 17 1972 18:15:51 GMT-0700 (PDT)", + "shortText": "laboris velit esse", + "mediumText": "Aute ad non aute ipsum sint commodo cupidatat elit adipisicing fugiat.", + "longText": "Veniam ex consectetur id pariatur ipsum pariatur non officia sint. Exercitation quis eiusmod nisi officia aliquip. Laborum commodo occaecat ex ipsum aliqua. Et incididunt sunt deserunt Lorem eiusmod anim. Cillum consequat nulla ipsum eiusmod nulla velit pariatur aliqua. Reprehenderit est fugiat minim adipisicing ex esse adipisicing irure eu pariatur cupidatat.\r\nIn cupidatat elit reprehenderit deserunt sint mollit laborum consectetur enim anim. Consequat fugiat velit ut ipsum et duis consectetur. Aliqua velit nisi consequat mollit anim id quis cillum anim laboris exercitation adipisicing. Aliqua commodo cillum ut tempor incididunt sint ipsum incididunt nisi proident.\r\nEst qui incididunt dolore id. Culpa enim proident consectetur sunt. Ad laborum amet eiusmod mollit velit. Amet exercitation tempor nulla ullamco dolor fugiat non nostrud magna nisi veniam mollit laborum non.\r\nDuis ipsum voluptate ut laborum veniam. Commodo adipisicing sit nostrud mollit sint consequat ullamco sint amet ut enim. Anim pariatur magna reprehenderit elit fugiat culpa incididunt elit. Est irure tempor aliquip aliqua elit consequat pariatur est proident mollit tempor magna velit. Id nisi est cillum ut officia mollit deserunt nostrud ullamco.\r\nSit anim quis fugiat ullamco ipsum nulla proident sunt. Culpa est laborum veniam labore sit in mollit minim voluptate cupidatat. Elit qui sit amet qui eiusmod dolor. Irure sunt et minim culpa cillum. Minim consequat culpa ullamco excepteur duis nostrud consectetur proident dolor mollit veniam pariatur quis. Deserunt in reprehenderit eu velit ipsum excepteur pariatur deserunt officia fugiat qui exercitation magna dolor. Eiusmod cupidatat irure nisi dolor veniam aute ea quis nostrud eu esse excepteur aliquip.\r\n", + "address": "2 Crescent Street", + "city": "Valle", + "state": "Alaska", + "zip": 40517, + "country": "Albania", + "email": "fordgreer@scentric.com", + "phone": "(816) 454-3618", + "color": "rgb(249,251,66)" + }, + { + "index": 109, + "name": "Morin Franks", + "first": "Olive", + "last": "Bernard", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/emmakardaras/73.jpg", + "boolean": false, + "guid": "9c1e0cc3-71ab-4f1f-a061-864215df9f71", + "integer": 74, + "date": "Tue Aug 17 1976 13:06:23 GMT-0700 (PDT)", + "shortText": "reprehenderit voluptate occaecat tempor", + "mediumText": "Excepteur proident officia commodo ad aute et exercitation aliqua. Consequat exercitation proident ut sit cupidatat nulla dolor occaecat sit ad fugiat. Lorem cupidatat labore tempor fugiat consequat labore. Laborum consectetur amet mollit ullamco deserunt amet cupidatat qui. Est nulla est nostrud duis proident culpa laborum ipsum mollit cupidatat proident irure nisi officia.", + "longText": "Nulla consectetur velit cupidatat dolor ex dolore pariatur ea occaecat eu quis ut non elit. Magna esse consequat eu sit laboris dolor ullamco elit dolor. Eiusmod laboris irure consequat cillum. Nisi incididunt dolor velit aliquip labore culpa voluptate proident laborum adipisicing veniam aute. Aliquip exercitation ad culpa excepteur nisi minim non quis excepteur commodo esse nostrud laborum. Enim anim do duis deserunt mollit esse laborum anim. Aliqua eiusmod sunt aliqua officia quis in voluptate deserunt magna labore enim sit laborum.\r\nVelit dolor aute est sit aliqua. Occaecat occaecat officia pariatur esse do aute aliqua. Magna nostrud consectetur amet consequat veniam magna duis non. Est eu elit pariatur minim ut sit laborum proident. Do adipisicing et est ex id dolore. Amet magna minim do dolor duis veniam ipsum ex commodo anim culpa sint.\r\n", + "address": "2 Banner Avenue", + "city": "Forbestown", + "state": "Louisiana", + "zip": 26490, + "country": "Panama", + "email": "olivebernard@scentric.com", + "phone": "(980) 446-2496", + "color": "rgb(250,59,84)" + }, + { + "index": 110, + "name": "Le Frank", + "first": "Ada", + "last": "Love", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/georgespillman/73.jpg", + "boolean": false, + "guid": "6d7f1953-73e2-4cf5-904a-467d37de4108", + "integer": 28, + "date": "Mon Aug 03 1970 01:48:44 GMT-0700 (PDT)", + "shortText": "do officia", + "mediumText": "Ad elit labore sit culpa reprehenderit non elit sunt. Officia occaecat aliquip aliqua minim eu. Lorem aute consequat sunt sint excepteur do laborum consequat do. Occaecat eu enim irure laborum occaecat elit duis. Occaecat aute ad non Lorem voluptate magna.", + "longText": "Dolore sint proident ea culpa proident ut eu ipsum pariatur culpa fugiat est nisi sunt. Voluptate ut excepteur aliquip enim adipisicing deserunt. Commodo irure irure id non officia elit do eiusmod. Voluptate ipsum dolor sint aliquip laboris fugiat cupidatat et ea proident nostrud cillum duis.\r\nAliqua eiusmod sit laboris non tempor proident ea. Ut excepteur tempor non nisi. Do id velit do non anim laborum ad est laborum consequat. Ea sunt velit do incididunt duis amet velit adipisicing exercitation anim. Duis eiusmod exercitation officia dolor aliqua officia fugiat ad fugiat dolor elit qui. Sunt reprehenderit est esse enim exercitation eiusmod et quis ea et dolore. Enim occaecat sunt sit do velit nulla cillum laboris.\r\nMinim cupidatat ex minim excepteur. Quis est enim officia proident voluptate tempor anim duis. Magna anim voluptate ullamco dolore dolore aute ipsum nulla ea est nulla exercitation eiusmod. Ex Lorem nulla et do consequat nulla ipsum enim ad amet excepteur ipsum incididunt veniam. Occaecat enim eu aliquip consectetur fugiat anim. Cillum pariatur quis ullamco minim nisi proident dolor occaecat ad ipsum commodo deserunt eu nostrud. Sunt reprehenderit et ipsum exercitation est veniam aute ut ex.\r\nAd aliquip ad et aliquip. Officia ex est qui nisi dolore velit sint. Et enim voluptate irure culpa eiusmod id incididunt minim voluptate ut eiusmod incididunt. Non occaecat cillum exercitation duis eiusmod id laboris veniam. Nisi id ut veniam excepteur.\r\n", + "address": "4 Rochester Avenue", + "city": "Chesapeake", + "state": "Missouri", + "zip": 58919, + "country": "Turks and Caicos Islands", + "email": "adalove@scentric.com", + "phone": "(895) 541-3397", + "color": "rgb(133,191,68)" + }, + { + "index": 111, + "name": "Joseph Hooper", + "first": "Sally", + "last": "Blackwell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/fireupman/73.jpg", + "boolean": false, + "guid": "e86e14ac-2f06-4abd-93f2-552b79ec5e01", + "integer": 95, + "date": "Tue Jul 21 1987 11:15:23 GMT-0700 (PDT)", + "shortText": "anim duis", + "mediumText": "Amet ut occaecat do non nulla aute aliquip qui. Dolore sint sit ipsum ea minim reprehenderit irure quis magna elit exercitation mollit. Aute ullamco minim ut cupidatat incididunt aute occaecat aute ea consequat sint.", + "longText": "Officia commodo aute culpa sit ea in qui mollit laborum sunt aute eiusmod aliquip cillum. Velit commodo nisi qui consectetur eiusmod ad Lorem cupidatat irure adipisicing do adipisicing commodo. Laborum mollit cillum ad tempor. Anim proident culpa aliqua amet anim pariatur consequat aliquip anim cupidatat ut reprehenderit. Dolor reprehenderit magna enim dolore eu laborum consectetur do commodo proident. Duis voluptate dolor magna occaecat officia adipisicing duis voluptate adipisicing ex cupidatat. Ex aute adipisicing ullamco consectetur aute minim occaecat sit commodo Lorem duis.\r\nFugiat officia do do cillum ut adipisicing nisi nostrud culpa cupidatat. Magna velit ad excepteur et sunt sunt esse commodo velit consequat occaecat officia ea magna. Cillum culpa id aliqua in. Fugiat dolore elit do ea aliqua duis id eiusmod cillum amet ut. Dolor id magna id dolor aliqua veniam elit adipisicing qui nulla. Ex mollit consectetur adipisicing elit id eiusmod sunt deserunt veniam qui quis ut.\r\nProident exercitation aliqua occaecat anim tempor ullamco non laborum reprehenderit. Ullamco consectetur eiusmod ut quis cillum. Nulla officia in quis est sit consectetur eu ipsum sunt. Sunt cupidatat velit cillum non proident excepteur qui non aliquip.\r\nAd amet sit sint adipisicing dolore eu enim dolore velit sit deserunt. Esse labore non proident magna ut aliquip in id ex deserunt. Reprehenderit magna consequat irure ad ullamco pariatur magna consectetur pariatur magna voluptate non sunt.\r\nIpsum sint deserunt enim labore ea deserunt sint pariatur. Amet sit sint id minim esse quis magna fugiat dolore. Ullamco et magna ex dolor do commodo amet nostrud commodo adipisicing cillum. Dolor culpa mollit elit sit et enim ullamco fugiat proident occaecat.\r\n", + "address": "3 Congress Street", + "city": "Tedrow", + "state": "Kentucky", + "zip": 17527, + "country": "Christmas Island", + "email": "sallyblackwell@scentric.com", + "phone": "(883) 597-2036", + "color": "rgb(213,146,224)" + }, + { + "index": 112, + "name": "Shepherd Burt", + "first": "Pansy", + "last": "Young", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kylefrost/73.jpg", + "boolean": false, + "guid": "e82c95af-0ea1-4299-9f4e-131f39c1c537", + "integer": 49, + "date": "Sat May 24 2014 22:33:36 GMT-0700 (PDT)", + "shortText": "labore fugiat", + "mediumText": "Culpa eiusmod culpa nostrud voluptate eiusmod ea voluptate voluptate ex ut. Cillum consectetur voluptate tempor irure commodo id excepteur tempor laborum nisi. Proident eiusmod exercitation mollit sunt in est aliqua mollit non deserunt fugiat excepteur quis.", + "longText": "Sunt quis nisi cillum aute est reprehenderit non. Ullamco pariatur in est officia nisi laborum ad ut pariatur qui elit. Ipsum voluptate labore in et laboris amet quis esse occaecat dolore veniam cupidatat voluptate. In sint aute aliqua ea dolor Lorem quis sunt.\r\n", + "address": "2 Remsen Street", + "city": "Abrams", + "state": "American Samoa", + "zip": 37068, + "country": "Botswana", + "email": "pansyyoung@scentric.com", + "phone": "(938) 478-3164", + "color": "rgb(190,139,243)" + }, + { + "index": 113, + "name": "Brianna Peterson", + "first": "Carla", + "last": "Davidson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/quser/73.jpg", + "boolean": true, + "guid": "e7c8b790-5171-41b9-8926-16f6ba35a268", + "integer": 74, + "date": "Sun Aug 06 1989 02:58:01 GMT-0700 (PDT)", + "shortText": "sunt ex laboris cupidatat culpa", + "mediumText": "Ut duis eu quis nostrud irure excepteur quis. Cillum quis aute occaecat eu laborum non incididunt.", + "longText": "Tempor aute incididunt exercitation pariatur eu sunt magna excepteur. Do ex officia proident laborum ullamco cillum. In elit consequat anim velit commodo pariatur ad enim est nostrud anim proident amet nostrud. Proident duis incididunt ad deserunt nisi cupidatat irure eu cupidatat magna qui quis sunt.\r\nConsectetur occaecat sunt sint nostrud est dolor officia dolor occaecat ipsum labore consequat. Consequat eu ipsum voluptate et exercitation ex dolor commodo pariatur elit eu amet. In consectetur Lorem veniam est minim consectetur excepteur irure cillum. Ut Lorem incididunt laboris minim proident sit mollit tempor ad culpa amet amet. Quis duis velit ut dolor proident dolore proident ex sit adipisicing do.\r\nEsse elit occaecat pariatur nulla sint non elit aliquip est voluptate laboris. Consequat culpa fugiat ea eu. Et minim culpa voluptate amet. Sint qui cillum consequat quis velit et aliqua occaecat duis quis. Aute sunt aute in exercitation id exercitation cupidatat irure. Anim et minim cillum dolore irure enim eiusmod pariatur ad deserunt ea.\r\nIrure esse reprehenderit proident tempor non cupidatat incididunt laboris culpa eiusmod elit culpa velit non. Sit ullamco incididunt exercitation enim quis commodo id Lorem minim duis. Duis nulla sunt sit reprehenderit duis excepteur laborum in ut dolore consequat. Aliqua esse culpa nulla et amet ex fugiat sit non sunt. Elit nostrud commodo sunt veniam anim ut duis ullamco labore ex aliqua laboris.\r\n", + "address": "4 Oriental Court", + "city": "Valmy", + "state": "Minnesota", + "zip": 13895, + "country": "Algeria", + "email": "carladavidson@scentric.com", + "phone": "(995) 595-3974", + "color": "rgb(179,161,85)" + }, + { + "index": 114, + "name": "Erica Campbell", + "first": "Emilia", + "last": "Hernandez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/maikelk/73.jpg", + "boolean": false, + "guid": "a14b1c62-e553-458d-ab78-cd9e278ac859", + "integer": 59, + "date": "Tue Aug 21 2012 17:43:47 GMT-0700 (PDT)", + "shortText": "ut id sit ea est", + "mediumText": "Aliquip occaecat voluptate ea dolor pariatur. Dolor amet velit adipisicing duis elit nisi aute incididunt veniam minim.", + "longText": "Id eu commodo in anim proident sit aliquip sit. Mollit dolor exercitation laborum veniam reprehenderit tempor reprehenderit. Culpa in cillum nisi occaecat elit aute duis est. Laborum quis laborum nostrud amet nulla quis exercitation non officia cupidatat culpa deserunt incididunt nulla. Exercitation exercitation ex velit ipsum excepteur esse dolor ipsum et anim non proident Lorem. Nostrud laboris consectetur et eiusmod sint. Amet adipisicing dolore Lorem deserunt ad cupidatat labore.\r\nNisi ipsum anim aliquip id sit proident reprehenderit aute. Esse duis incididunt minim nisi velit do incididunt anim nostrud. In mollit aliquip duis proident dolor. Sunt ipsum amet esse laborum.\r\nCupidatat anim enim do ut. Nostrud ipsum consectetur non ipsum officia. Aliqua commodo eiusmod eu labore laborum. Magna aliqua in est amet eu anim reprehenderit qui ullamco est anim sit et. Est deserunt tempor commodo occaecat dolore sint esse aliquip culpa sint cupidatat non cupidatat. Est reprehenderit irure esse fugiat ad pariatur fugiat. Labore non consectetur nisi aliquip adipisicing culpa incididunt ad consectetur consequat ipsum.\r\n", + "address": "2 Legion Street", + "city": "Cuylerville", + "state": "Hawaii", + "zip": 84971, + "country": "Switzerland", + "email": "emiliahernandez@scentric.com", + "phone": "(922) 599-3995", + "color": "rgb(101,247,162)" + }, + { + "index": 115, + "name": "Sheryl Waller", + "first": "Martina", + "last": "Hebert", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ifarafonow/73.jpg", + "boolean": false, + "guid": "ab359e49-0653-4622-a683-fa6bb4a5e4eb", + "integer": 39, + "date": "Mon Nov 17 2008 06:44:36 GMT-0800 (PST)", + "shortText": "sunt", + "mediumText": "Nisi dolor ad enim nostrud id proident nisi elit cupidatat nisi nostrud laborum. Ea deserunt labore est in sunt id consectetur nisi.", + "longText": "Aliqua sunt enim Lorem amet enim. Nisi laboris elit veniam irure culpa nisi non aliquip. Anim dolor duis enim tempor culpa dolor reprehenderit elit. Non sunt veniam aliqua ea occaecat do pariatur occaecat ea. Exercitation nostrud cillum mollit ipsum laboris sunt est aute nostrud velit officia esse.\r\nLabore commodo ipsum proident est et sint sint deserunt. Proident qui elit eu duis et veniam excepteur eu ipsum ea consectetur consectetur fugiat sit. Aliqua aliqua laboris aute ut sit id nisi sunt reprehenderit qui deserunt. Labore laborum et ex enim dolore ullamco est excepteur dolore labore adipisicing. Commodo cupidatat non velit qui.\r\nQui exercitation esse ullamco nulla nisi labore ex ea voluptate eu consectetur et occaecat. Ullamco laborum esse labore et ullamco sunt proident eu esse proident excepteur. Qui incididunt occaecat minim elit irure ea aliquip in fugiat. Do cupidatat aliqua veniam cupidatat magna exercitation irure mollit fugiat consectetur. Sunt fugiat esse dolor mollit in fugiat reprehenderit qui tempor laborum Lorem incididunt. Exercitation do occaecat adipisicing velit aute enim enim occaecat nisi laboris quis ex minim eu. In incididunt consequat esse dolor officia eiusmod amet aliqua ad quis.\r\n", + "address": "3 Gelston Avenue", + "city": "Leeper", + "state": "Alabama", + "zip": 86800, + "country": "S. Georgia and S. Sandwich Isls.", + "email": "martinahebert@scentric.com", + "phone": "(814) 523-3612", + "color": "rgb(240,55,85)" + }, + { + "index": 116, + "name": "Frances Dalton", + "first": "Virgie", + "last": "Fuller", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ananya159/73.jpg", + "boolean": false, + "guid": "1ca31b96-9723-4249-bb9a-7062701a66b0", + "integer": 81, + "date": "Tue Oct 01 1974 14:29:16 GMT-0700 (PDT)", + "shortText": "cillum", + "mediumText": "Aliquip nisi proident id sint velit enim cillum reprehenderit ipsum nisi dolore laboris Lorem. Velit Lorem irure irure consectetur. Aliquip veniam culpa qui Lorem cupidatat non incididunt velit irure magna in do consequat do.", + "longText": "Nostrud adipisicing aute esse ipsum anim. Nisi pariatur excepteur est minim pariatur consectetur aliquip adipisicing. Adipisicing fugiat consequat proident deserunt exercitation exercitation irure sit qui deserunt. Dolor eu cillum eiusmod id incididunt consectetur nisi ullamco mollit labore. Aliqua ullamco proident adipisicing duis minim. Lorem ut fugiat cillum aliqua sit in mollit labore sunt reprehenderit.\r\nQui aliqua pariatur voluptate fugiat fugiat duis consequat occaecat laboris cillum sit. Sit officia fugiat esse ut eiusmod eu labore nostrud est incididunt fugiat. Voluptate velit laboris veniam sunt laborum ad nulla ad. Dolor deserunt ut ut culpa laboris qui elit est non cillum eu cillum anim laborum. Mollit consequat cillum id consequat sint voluptate pariatur nisi nostrud duis ipsum mollit.\r\nIncididunt dolor laborum adipisicing mollit voluptate ad labore ad do minim occaecat proident amet anim. Commodo anim pariatur dolor officia ipsum adipisicing irure excepteur irure eiusmod deserunt. Commodo veniam exercitation ex ad. Ut aliquip aliqua laboris ipsum quis duis. Amet in dolor minim veniam mollit dolore deserunt sit exercitation sint dolore consequat. Mollit anim qui dolor enim ea irure sint consectetur. Eiusmod eu exercitation incididunt Lorem dolore non cupidatat tempor do labore duis.\r\nMinim exercitation ut cupidatat est minim enim magna eiusmod aliquip ipsum incididunt in officia. Aliquip in fugiat dolor elit quis ad. Ipsum laboris sit non amet eu dolor aute velit ullamco eu proident. Consequat commodo consectetur Lorem esse duis esse exercitation adipisicing anim.\r\n", + "address": "2 Bokee Court", + "city": "Reinerton", + "state": "North Carolina", + "zip": 90734, + "country": "Brazil", + "email": "virgiefuller@scentric.com", + "phone": "(958) 511-3488", + "color": "rgb(151,135,52)" + }, + { + "index": 117, + "name": "Charity Hall", + "first": "Mitchell", + "last": "Williamson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/horaciobella/73.jpg", + "boolean": true, + "guid": "60b57acd-e17f-4c69-85e5-5df345c25c6f", + "integer": 22, + "date": "Wed Jan 19 2005 08:59:18 GMT-0800 (PST)", + "shortText": "eu nisi elit nostrud", + "mediumText": "Nisi id voluptate velit tempor voluptate laboris. Excepteur consectetur labore id ipsum anim proident ad adipisicing dolor. Magna aute excepteur veniam nulla laborum culpa et incididunt enim velit officia. Ipsum est qui minim consequat Lorem.", + "longText": "Enim consectetur quis tempor eu laboris veniam ea eu est. Ullamco commodo commodo dolor ad mollit ex in nulla. Ipsum dolor excepteur ut in sit est nulla ad nulla in tempor laboris ipsum laborum. Lorem incididunt fugiat eu laboris laborum eiusmod dolor tempor aliquip. Minim in do deserunt pariatur adipisicing id duis consectetur nostrud proident.\r\n", + "address": "4 Dover Street", + "city": "Fannett", + "state": "Connecticut", + "zip": 11138, + "country": "Anguilla", + "email": "mitchellwilliamson@scentric.com", + "phone": "(871) 435-3743", + "color": "rgb(243,134,198)" + }, + { + "index": 118, + "name": "Rodriquez Ferguson", + "first": "Shannon", + "last": "Morrow", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thatdesigner/73.jpg", + "boolean": false, + "guid": "6c85f6cb-e2c6-46e0-a68a-2ebc38f0035b", + "integer": 50, + "date": "Sat Feb 10 1973 15:31:21 GMT-0800 (PST)", + "shortText": "incididunt aute aliquip laborum labore", + "mediumText": "Minim ipsum sint consequat cillum aute ipsum et ipsum sint cillum qui eiusmod.", + "longText": "Reprehenderit est consequat incididunt nostrud do eiusmod adipisicing. Nulla voluptate ullamco consectetur eu sit. Est dolore cupidatat amet culpa occaecat ullamco nisi non veniam do est ullamco aliqua. Qui irure nisi laboris labore duis nulla magna. Culpa velit dolor exercitation elit sint irure velit eu veniam exercitation Lorem. Pariatur ipsum veniam consectetur nulla laborum.\r\nAdipisicing eu amet duis nulla. Anim dolore magna eu culpa voluptate sunt aute proident. Elit veniam adipisicing commodo aliqua eiusmod velit mollit nisi quis veniam excepteur mollit laborum. Esse ipsum commodo cupidatat sint quis mollit veniam consequat do laborum nulla. Aliquip consequat proident et aliqua ea proident proident dolore laboris consequat ut reprehenderit quis duis. Enim cupidatat reprehenderit reprehenderit esse irure officia irure laboris. Consequat esse qui pariatur elit cillum culpa deserunt culpa veniam qui excepteur laborum.\r\n", + "address": "4 Newel Street", + "city": "Dubois", + "state": "South Carolina", + "zip": 52970, + "country": "Mayotte", + "email": "shannonmorrow@scentric.com", + "phone": "(926) 593-2505", + "color": "rgb(161,59,65)" + }, + { + "index": 119, + "name": "Lee Dejesus", + "first": "Yang", + "last": "Walter", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/snaphappydad/73.jpg", + "boolean": false, + "guid": "bf814de3-e21d-41e7-9db1-2d541665fd2c", + "integer": 40, + "date": "Mon Feb 18 2002 15:18:34 GMT-0800 (PST)", + "shortText": "pariatur nisi", + "mediumText": "Esse dolore nulla aliqua id cupidatat ullamco commodo incididunt.", + "longText": "Ipsum cupidatat amet Lorem excepteur magna quis officia tempor enim voluptate consequat id ex. Ad labore aliqua exercitation nulla et esse nostrud pariatur. Nisi minim velit consequat dolore aliquip est labore sint.\r\nAnim non irure proident cillum eiusmod. Id anim non adipisicing consectetur qui duis. Sit culpa exercitation non nostrud.\r\nOccaecat aliquip elit anim ex nulla ut in. Aliqua ut cupidatat elit dolor id occaecat. Sit consectetur consequat eiusmod veniam tempor minim non voluptate labore ullamco esse velit proident.\r\n", + "address": "2 Krier Place", + "city": "Columbus", + "state": "Michigan", + "zip": 62839, + "country": "Northern Mariana Islands", + "email": "yangwalter@scentric.com", + "phone": "(821) 518-2276", + "color": "rgb(56,241,182)" + }, + { + "index": 120, + "name": "Wise Cannon", + "first": "Cobb", + "last": "Figueroa", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/cristianovalim/73.jpg", + "boolean": false, + "guid": "e5754bf6-f162-4fd2-a3e9-e3834bad0fed", + "integer": 61, + "date": "Sun Nov 22 1970 00:54:52 GMT-0800 (PST)", + "shortText": "Lorem dolor pariatur proident", + "mediumText": "Dolor tempor veniam ad do et. Mollit enim et id veniam in irure mollit duis deserunt commodo.", + "longText": "Ex pariatur eiusmod cupidatat nisi elit ullamco Lorem. Reprehenderit minim velit laboris et incididunt tempor anim elit ad aute duis ullamco. Amet est magna consectetur in cillum duis. Sunt id Lorem laboris cupidatat aute. Cillum est ea mollit exercitation ullamco pariatur exercitation anim Lorem dolore exercitation velit ipsum.\r\nExcepteur excepteur est pariatur eiusmod quis consectetur qui aute nulla ex Lorem sunt irure. Tempor excepteur proident esse excepteur consectetur minim consequat non. Mollit nulla ea veniam excepteur eu velit.\r\n", + "address": "4 Pulaski Street", + "city": "Glenville", + "state": "Maine", + "zip": 69282, + "country": "Pitcairn", + "email": "cobbfigueroa@scentric.com", + "phone": "(901) 579-2803", + "color": "rgb(243,138,133)" + }, + { + "index": 121, + "name": "Albert Benjamin", + "first": "French", + "last": "Hays", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pmeissner/73.jpg", + "boolean": false, + "guid": "4bcb4883-f717-4bc7-b0ff-91b548b5ae5a", + "integer": 11, + "date": "Fri Jun 27 1980 15:54:19 GMT-0700 (PDT)", + "shortText": "Lorem do", + "mediumText": "Ipsum irure amet aliquip deserunt irure nisi duis fugiat et officia voluptate aliquip labore consectetur. Reprehenderit aute cupidatat tempor enim aliquip non qui consequat do qui proident id. Aliquip labore in ex consequat commodo qui adipisicing proident. Tempor veniam non laborum aute velit Lorem sunt. Fugiat anim nulla veniam anim pariatur nulla irure incididunt occaecat.", + "longText": "Enim irure eiusmod magna non tempor eu mollit nostrud anim elit. Fugiat eu officia aliqua dolore non tempor aute ipsum occaecat. Amet velit fugiat aliqua Lorem officia excepteur sunt nostrud magna est. In pariatur irure quis ea ut et esse nisi do mollit excepteur laborum minim. Nostrud sunt est duis est. In in enim Lorem tempor aliquip enim ea irure deserunt.\r\nCillum est magna fugiat dolor nostrud adipisicing mollit qui enim. Nostrud consequat amet reprehenderit commodo ut amet est aute nisi exercitation aute. Eiusmod enim reprehenderit ut ut exercitation irure proident minim commodo nostrud. Consequat ex magna aliquip cupidatat culpa excepteur non.\r\nVeniam esse esse sunt reprehenderit veniam commodo irure fugiat qui. Consequat qui dolor veniam ipsum laboris enim labore. Mollit cupidatat sit non esse voluptate in qui cupidatat qui eu. Duis incididunt ad mollit ad nisi culpa irure anim ullamco commodo tempor consectetur. Cillum pariatur labore do quis commodo non eu proident et.\r\nAmet cupidatat amet et culpa proident labore esse ipsum. Labore fugiat ea laboris irure mollit cupidatat minim exercitation occaecat velit ullamco quis. Labore esse cupidatat nulla amet et. Duis est cupidatat eu ea excepteur nulla cupidatat dolor enim ipsum sit nostrud laborum sit. Voluptate cupidatat cillum nulla reprehenderit laboris incididunt eu nostrud amet ad dolore do. Non ea eu cillum duis consectetur in. Anim consequat in adipisicing fugiat sit do anim anim aute veniam eu consectetur aliquip.\r\nMollit aliquip cillum adipisicing ipsum non laboris. Consequat mollit in incididunt mollit deserunt eiusmod nulla dolor ea fugiat. Proident reprehenderit nisi tempor nulla excepteur dolor excepteur voluptate laboris tempor consequat. Dolor et minim enim ut laboris. Ipsum ex veniam consequat cillum nisi amet nostrud. Mollit labore in consequat irure enim. Qui tempor aliquip esse enim commodo culpa mollit.\r\n", + "address": "4 Pooles Lane", + "city": "Bellfountain", + "state": "Kansas", + "zip": 98526, + "country": "Saint Vincent and The Grenadines", + "email": "frenchhays@scentric.com", + "phone": "(819) 408-2182", + "color": "rgb(238,191,114)" + }, + { + "index": 122, + "name": "Nona Salinas", + "first": "Lacey", + "last": "Donaldson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/akbarbobojonov/73.jpg", + "boolean": true, + "guid": "bd1bbab7-51f1-45a4-a0c8-ad85a536c9ec", + "integer": 9, + "date": "Thu May 01 1986 06:09:47 GMT-0700 (PDT)", + "shortText": "proident ea qui culpa", + "mediumText": "Eiusmod labore in laboris eu pariatur amet. Et nulla aliqua consectetur nulla quis ad non. Aute ut sint reprehenderit et eu et sunt labore dolor.", + "longText": "Exercitation mollit commodo ad ipsum ipsum minim quis culpa cillum ut mollit labore commodo. Anim dolor eu in deserunt occaecat enim do proident mollit exercitation laborum consequat. Irure proident exercitation voluptate in. Magna officia sint occaecat pariatur irure elit cupidatat deserunt nulla ad cillum incididunt velit. Quis veniam est est id labore enim duis culpa deserunt aliquip mollit qui. Deserunt laboris proident incididunt esse velit minim sint ex excepteur. Cillum do sint commodo qui laborum occaecat dolore sint.\r\nDeserunt culpa pariatur dolore mollit dolor velit id labore incididunt eiusmod consectetur. Sunt eu duis ut eu sint sint non aliqua ullamco sunt est id irure eiusmod. Eiusmod ex cupidatat quis ut cillum elit. Lorem tempor proident elit adipisicing. Minim sunt minim esse do amet Lorem officia occaecat sit ut. In id ullamco ipsum ex sit adipisicing mollit irure non magna ad commodo proident aute. Mollit sunt mollit eiusmod voluptate consectetur magna ex ullamco.\r\n", + "address": "4 Freeman Street", + "city": "Wollochet", + "state": "Iowa", + "zip": 21774, + "country": "Iceland", + "email": "laceydonaldson@scentric.com", + "phone": "(977) 552-3200", + "color": "rgb(51,183,113)" + }, + { + "index": 123, + "name": "Karla Downs", + "first": "Cruz", + "last": "Colon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pjnes/73.jpg", + "boolean": true, + "guid": "2f9877c1-7121-400a-a476-36dfbedde48b", + "integer": 0, + "date": "Thu Feb 27 1992 08:28:41 GMT-0800 (PST)", + "shortText": "deserunt", + "mediumText": "Reprehenderit deserunt eiusmod sint laboris deserunt qui eiusmod ex aliqua et laborum duis magna deserunt. Officia tempor ullamco aute occaecat velit. Aliqua consectetur nulla eiusmod elit. Culpa enim reprehenderit labore incididunt id nostrud deserunt quis ad est irure laboris.", + "longText": "Ut qui adipisicing qui veniam irure fugiat. Cillum occaecat fugiat proident velit anim nostrud duis reprehenderit nostrud tempor aliquip veniam. Nostrud ipsum laboris eu enim id do. Adipisicing ea consequat enim et anim in fugiat amet ipsum.\r\nVoluptate tempor ut ut laborum et ad. Ea laboris duis ad pariatur commodo do et aute. Sit aliqua sint proident do consequat anim sit. Officia elit dolore exercitation elit anim ullamco excepteur deserunt quis quis proident esse fugiat voluptate. Culpa officia amet eu enim culpa sit et. Culpa incididunt adipisicing non eu in minim.\r\nDuis laborum laborum voluptate aliquip. Aliqua eu elit labore ipsum aliqua. Nulla reprehenderit aute labore aliqua est consectetur deserunt pariatur ut. Aute laboris voluptate ipsum nostrud enim proident amet ad.\r\nCulpa minim velit aliquip enim deserunt dolor. Commodo sit commodo enim adipisicing ea non aute consectetur proident eu do. Consequat elit irure minim dolor voluptate excepteur sunt eu et quis. Occaecat exercitation voluptate sunt ullamco reprehenderit ea amet magna. Cillum laborum commodo irure ad in sunt occaecat veniam non proident incididunt pariatur.\r\n", + "address": "3 Elm Place", + "city": "Richville", + "state": "Vermont", + "zip": 65904, + "country": "Andorra", + "email": "cruzcolon@scentric.com", + "phone": "(900) 475-3785", + "color": "rgb(165,150,188)" + }, + { + "index": 124, + "name": "Candace Gonzalez", + "first": "Debbie", + "last": "Moody", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/balintorosz/73.jpg", + "boolean": false, + "guid": "9d3734d9-4693-4ac0-9dba-85eb63a89032", + "integer": 1, + "date": "Fri May 06 2005 19:01:26 GMT-0700 (PDT)", + "shortText": "exercitation do mollit mollit proident", + "mediumText": "Ullamco ad quis laboris ea consectetur commodo anim ut irure. Sit id elit mollit eiusmod officia amet reprehenderit. Ea incididunt commodo officia qui eu ad exercitation occaecat ipsum ad aute laboris ea. Proident irure velit magna culpa proident qui amet.", + "longText": "Minim voluptate culpa mollit ad voluptate est mollit nisi cillum proident. Cillum ut aliqua esse ad esse qui magna anim mollit. Ipsum pariatur labore culpa velit ipsum mollit fugiat id velit in cillum sint. Voluptate aliquip irure reprehenderit incididunt ipsum magna duis proident commodo consequat. Eiusmod commodo labore ex commodo tempor veniam. Occaecat duis tempor cillum aute qui do officia excepteur et sunt eiusmod fugiat.\r\nConsectetur amet nulla sit commodo aute labore id commodo reprehenderit deserunt occaecat incididunt. Esse consectetur minim occaecat duis deserunt est magna aute aliqua veniam aute sunt nulla eu. Exercitation officia proident dolore ex aliqua officia laboris ullamco anim.\r\nReprehenderit exercitation veniam eu eu aute ullamco irure ex tempor. Irure tempor Lorem anim eu nulla proident nulla est sunt. Voluptate id dolor excepteur id ut quis duis.\r\nPariatur tempor aliquip consectetur reprehenderit qui dolore excepteur veniam. In aliqua aute veniam aliqua in officia aute nisi Lorem. Ea duis labore labore voluptate. Voluptate esse cillum excepteur reprehenderit.\r\n", + "address": "2 Duryea Court", + "city": "Bentonville", + "state": "Nebraska", + "zip": 43783, + "country": "Myanmar", + "email": "debbiemoody@scentric.com", + "phone": "(816) 429-3615", + "color": "rgb(209,130,75)" + }, + { + "index": 125, + "name": "Ayers Finley", + "first": "Janna", + "last": "Donovan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/martinhn/73.jpg", + "boolean": false, + "guid": "9910153e-54e3-4464-ab3b-2f87ff4a6574", + "integer": 29, + "date": "Wed Jun 03 1987 11:23:05 GMT-0700 (PDT)", + "shortText": "occaecat dolore sunt", + "mediumText": "Esse voluptate quis laborum voluptate ut labore tempor consequat sit. Adipisicing proident ex Lorem voluptate eu esse laborum ex laborum officia veniam aliquip enim id. Incididunt eu nisi proident pariatur ut non.", + "longText": "Incididunt do qui veniam Lorem quis. Aute culpa ut dolor incididunt deserunt consequat mollit non nulla dolore. Deserunt veniam velit tempor pariatur aliquip veniam. Duis aliquip nulla sunt ullamco esse aliqua Lorem esse aliquip veniam adipisicing. Cillum et do enim commodo aliqua ullamco exercitation exercitation. Mollit magna Lorem fugiat irure excepteur adipisicing id veniam. Sit tempor aute in minim dolore aliquip minim nisi magna.\r\nVelit aliqua ullamco ea amet culpa id. Magna velit voluptate culpa fugiat fugiat amet veniam ad labore eu in. Eu deserunt quis ipsum aliqua nulla pariatur commodo. Elit nostrud id irure eu reprehenderit est dolore sunt Lorem. Esse anim quis elit elit irure consectetur irure ut non ad ullamco magna et. Ex Lorem labore deserunt consequat consectetur officia veniam non commodo magna ut non eu in.\r\nVoluptate aliqua velit magna dolor in anim dolore ad quis. Ullamco magna officia labore ex adipisicing veniam magna adipisicing in id anim ea adipisicing mollit. Irure pariatur ea incididunt culpa ex veniam pariatur eiusmod duis ea. Ut exercitation duis aliqua quis elit reprehenderit magna veniam voluptate nostrud. Id proident nostrud consectetur occaecat nostrud nostrud nisi eu labore occaecat minim. Sint ut consequat ullamco dolor duis exercitation sint eiusmod nostrud et esse labore. Anim elit ipsum occaecat sint laborum esse.\r\nAd velit aliqua irure dolor aliquip eiusmod occaecat incididunt sunt dolore elit quis sunt. Sunt veniam quis eu anim et ut laborum. Nisi duis anim non sunt consequat labore duis sit minim velit dolor adipisicing pariatur. Qui fugiat elit non amet ad nostrud voluptate veniam proident.\r\nEnim qui non exercitation cupidatat pariatur cillum anim sunt aliqua sunt. Lorem ut excepteur consectetur ipsum dolore enim sint labore sunt. Anim dolore consectetur mollit ex consectetur ex enim eiusmod.\r\n", + "address": "2 Bank Street", + "city": "Martinsville", + "state": "Florida", + "zip": 62669, + "country": "Saint Lucia", + "email": "jannadonovan@scentric.com", + "phone": "(953) 514-3535", + "color": "rgb(140,207,218)" + }, + { + "index": 126, + "name": "Winifred Patel", + "first": "Mckenzie", + "last": "Saunders", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sasha_shestakov/73.jpg", + "boolean": true, + "guid": "0232aa09-2751-4a44-938d-2450be7353c5", + "integer": 47, + "date": "Tue May 04 2010 11:32:34 GMT-0700 (PDT)", + "shortText": "cillum culpa aliqua", + "mediumText": "Et ex ea sunt velit. Veniam amet incididunt labore consectetur incididunt do. Laborum nulla laboris commodo officia commodo fugiat voluptate aliqua ullamco occaecat adipisicing.", + "longText": "Exercitation ut commodo velit culpa veniam reprehenderit magna do amet fugiat dolor. Velit ad esse incididunt cillum eu aliquip aute in velit. Voluptate nulla veniam incididunt adipisicing commodo est aliqua irure id commodo commodo. Qui incididunt culpa culpa laborum exercitation sint eu excepteur dolore occaecat labore aute proident. Eiusmod est occaecat quis duis aliqua. Ad sit incididunt nostrud dolore velit mollit pariatur nostrud.\r\nTempor irure magna ex tempor occaecat voluptate voluptate velit eiusmod laboris enim minim quis. Id voluptate ex adipisicing eiusmod ut labore dolore qui eiusmod laborum exercitation. Irure labore laboris elit ea. Incididunt dolore ex sit id laboris eu dolor anim ullamco dolore laboris laboris ipsum. Est nulla excepteur proident enim labore. Pariatur aliquip voluptate qui amet commodo officia non.\r\nProident et minim excepteur laborum elit do laboris ipsum dolore eu nulla nulla. Id ad aliqua pariatur aliquip magna ea adipisicing occaecat. Exercitation quis Lorem consectetur eiusmod. Aliquip veniam consequat nostrud et id consectetur id consectetur eu ipsum elit incididunt. Aliquip do nostrud occaecat esse consectetur est irure nulla magna.\r\nEiusmod deserunt velit ut commodo commodo ea Lorem nisi voluptate voluptate non consequat sint sunt. Eiusmod nisi nulla minim non nisi sint excepteur ex cupidatat ipsum ex labore. Adipisicing dolore ut tempor exercitation cupidatat.\r\n", + "address": "2 Keap Street", + "city": "Blue", + "state": "New Jersey", + "zip": 62739, + "country": "Equatorial Guinea", + "email": "mckenziesaunders@scentric.com", + "phone": "(997) 545-3802", + "color": "rgb(62,238,78)" + }, + { + "index": 127, + "name": "Connie Conner", + "first": "Tracy", + "last": "York", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/vovkasolovev/73.jpg", + "boolean": true, + "guid": "8996bac9-5e0b-418e-a12c-710a15bdb763", + "integer": 8, + "date": "Thu Oct 05 2000 01:32:28 GMT-0700 (PDT)", + "shortText": "nostrud id eiusmod aliqua", + "mediumText": "Irure est aliquip magna excepteur velit cillum dolore eu veniam occaecat ex. Consequat proident nulla anim culpa ullamco sint.", + "longText": "Ipsum labore enim aliquip sit id qui elit ut ex laboris. Tempor ea consequat eiusmod ullamco pariatur sit esse elit in nisi aliquip non. Velit incididunt ea reprehenderit anim anim.\r\n", + "address": "3 Seton Place", + "city": "Cloverdale", + "state": "Wisconsin", + "zip": 87279, + "country": "Tanzania", + "email": "tracyyork@scentric.com", + "phone": "(880) 459-2370", + "color": "rgb(219,127,211)" + }, + { + "index": 128, + "name": "Ladonna Sheppard", + "first": "Jennie", + "last": "Glenn", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/urbanjahvier/73.jpg", + "boolean": false, + "guid": "5590b6a2-bb72-4d3e-8088-4af6a3a81dcb", + "integer": 4, + "date": "Mon Jun 04 1979 05:10:17 GMT-0700 (PDT)", + "shortText": "irure ea culpa", + "mediumText": "Est irure minim amet reprehenderit non minim et minim consequat cillum.", + "longText": "Minim laboris sint enim ea. Elit sunt esse pariatur officia voluptate deserunt cupidatat ex ad nisi dolor culpa duis. Velit nulla aute pariatur et voluptate cillum nostrud exercitation qui cillum elit occaecat. Laborum duis dolor cupidatat enim in elit occaecat quis non dolor culpa.\r\nIncididunt excepteur consequat consequat laborum. Cupidatat enim ad et qui pariatur proident ad voluptate minim quis dolore dolor veniam. Nisi sunt voluptate ut est aliqua. Irure Lorem ad non adipisicing aute quis officia dolore adipisicing quis ad minim.\r\n", + "address": "2 Bryant Street", + "city": "Harold", + "state": "Washington", + "zip": 92836, + "country": "Slovak Republic", + "email": "jennieglenn@scentric.com", + "phone": "(875) 496-3782", + "color": "rgb(60,201,252)" + }, + { + "index": 129, + "name": "Hancock Justice", + "first": "Jana", + "last": "Daugherty", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/betraydan/73.jpg", + "boolean": false, + "guid": "ac903149-dee1-4dbc-b0b4-01e15797af97", + "integer": 23, + "date": "Sun Dec 26 1976 01:33:58 GMT-0800 (PST)", + "shortText": "amet deserunt excepteur adipisicing", + "mediumText": "Mollit eu fugiat minim irure eu aliquip eiusmod do nisi elit minim anim commodo nisi. Tempor est exercitation consequat cillum nostrud consectetur ipsum qui. Proident voluptate fugiat labore minim nulla laborum sunt mollit dolore.", + "longText": "Commodo eiusmod nulla consequat Lorem ut ipsum esse cillum. Nostrud dolore proident proident ipsum sunt mollit esse amet. Et in adipisicing esse mollit consequat esse ipsum incididunt. Lorem est do id do qui non sit. Amet minim quis elit minim adipisicing et nisi nisi. Adipisicing aliqua voluptate amet velit amet excepteur id nulla excepteur laborum sit. Anim deserunt aute laboris duis deserunt aute quis veniam.\r\nAd elit fugiat id nisi nostrud esse aliquip. Ipsum esse labore laborum velit velit esse sit consequat non aliquip. Proident consequat est excepteur mollit.\r\nReprehenderit nulla sit adipisicing duis adipisicing qui amet incididunt non in. Est consectetur amet cillum minim enim commodo laborum ipsum occaecat voluptate ea excepteur. Duis mollit anim anim minim magna elit sunt.\r\nEx et quis excepteur deserunt ea occaecat in est cillum labore ad pariatur. Commodo ea anim ipsum qui laboris duis reprehenderit. Non commodo magna voluptate deserunt do. In officia excepteur exercitation qui. Cillum eu aute laboris culpa laborum eu eiusmod.\r\nLorem irure voluptate magna velit reprehenderit sint. Sint ea exercitation officia occaecat. Cillum veniam proident voluptate ullamco in nisi eu. Irure laboris voluptate veniam ea. Reprehenderit adipisicing incididunt enim aliquip ex. Dolore amet ullamco ullamco ad pariatur.\r\n", + "address": "3 Ocean Parkway", + "city": "Fairhaven", + "state": "Oregon", + "zip": 90433, + "country": "Iraq", + "email": "janadaugherty@scentric.com", + "phone": "(966) 582-2529", + "color": "rgb(210,84,143)" + }, + { + "index": 130, + "name": "Gilda Henry", + "first": "Graham", + "last": "Moore", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/justme_timothyg/73.jpg", + "boolean": true, + "guid": "25728c02-6a0c-45e4-8ed5-f0b169379f13", + "integer": 39, + "date": "Thu Aug 02 2001 00:17:50 GMT-0700 (PDT)", + "shortText": "irure incididunt magna", + "mediumText": "Ea do ad culpa adipisicing culpa. Tempor ullamco laboris anim nisi exercitation ipsum deserunt voluptate incididunt sunt veniam.", + "longText": "Laborum ex ut culpa occaecat. Ex ad qui amet minim. Occaecat sunt labore id fugiat occaecat deserunt magna dolor proident. Proident eu qui ut incididunt id. Id reprehenderit labore dolore do exercitation. Commodo exercitation sint nulla ullamco. Occaecat mollit velit elit aliquip ad ex.\r\nIrure deserunt mollit deserunt id elit. Labore officia cillum consequat incididunt aliqua veniam fugiat mollit do proident irure exercitation. Exercitation duis irure sunt sit ad proident mollit elit dolore sunt. Ex est ut qui veniam ut laboris dolor deserunt ipsum Lorem ea exercitation eu. Quis labore nostrud sint proident occaecat enim quis dolor aliquip reprehenderit aute officia. Magna aute irure ullamco voluptate nisi ipsum labore.\r\nIrure sit aliquip quis eiusmod nisi occaecat amet cillum minim ex. Ipsum eiusmod ut nostrud eiusmod cillum est fugiat irure qui. Enim minim consequat ullamco minim. Cupidatat culpa mollit ut et.\r\n", + "address": "4 Stewart Street", + "city": "Rossmore", + "state": "Illinois", + "zip": 45849, + "country": "Congo", + "email": "grahammoore@scentric.com", + "phone": "(991) 514-3925", + "color": "rgb(199,144,145)" + }, + { + "index": 131, + "name": "Bates Clements", + "first": "Hatfield", + "last": "Hayden", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/justinteractive/73.jpg", + "boolean": false, + "guid": "afe8d372-90a6-404f-85c7-16fd49fb9612", + "integer": 80, + "date": "Wed Feb 14 1990 23:57:58 GMT-0800 (PST)", + "shortText": "excepteur culpa voluptate consectetur", + "mediumText": "Aliqua sunt irure commodo veniam proident. Tempor qui tempor aliqua aute labore dolor consectetur magna duis proident eiusmod sit dolor officia. Eiusmod deserunt aliquip aute officia Lorem minim deserunt magna laboris ipsum et ad commodo esse.", + "longText": "Aute culpa mollit et nisi ut adipisicing et aliquip incididunt laboris dolor mollit. Deserunt elit in sit dolore ut enim eu. Lorem ut magna eu eiusmod commodo excepteur laborum mollit nostrud voluptate sit. Sunt deserunt occaecat sit ea nostrud excepteur commodo nulla qui dolor deserunt do laborum. Pariatur do qui culpa laborum velit cillum.\r\nLabore aute cillum consequat pariatur mollit eiusmod duis ex labore ut. Occaecat dolore irure excepteur mollit tempor tempor ut. Velit qui pariatur pariatur voluptate nostrud. Duis magna sint irure et labore ipsum deserunt non veniam.\r\nFugiat do sint ea ut aute consectetur tempor reprehenderit nulla nulla. Laborum cupidatat excepteur nulla dolor cupidatat duis laboris. Amet in ipsum proident deserunt consectetur in proident incididunt. Elit consectetur occaecat dolore duis aute pariatur.\r\n", + "address": "3 Bulwer Place", + "city": "Gilmore", + "state": "West Virginia", + "zip": 18380, + "country": "Cocos (Keeling Islands)", + "email": "hatfieldhayden@scentric.com", + "phone": "(907) 440-2113", + "color": "rgb(252,242,253)" + }, + { + "index": 132, + "name": "Bell Leonard", + "first": "Leticia", + "last": "Hickman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/psdesignuk/73.jpg", + "boolean": true, + "guid": "ed4df7d0-7592-4c76-b54b-edc925ddb79d", + "integer": 77, + "date": "Tue May 03 1983 09:44:10 GMT-0700 (PDT)", + "shortText": "enim consequat ad elit sit", + "mediumText": "Aute reprehenderit officia dolor sit ullamco consectetur nostrud. Sunt duis excepteur labore enim pariatur voluptate proident nulla dolore consequat ut. Commodo aliqua anim ut Lorem. Irure nostrud ad non eiusmod duis.", + "longText": "Reprehenderit esse laboris consequat aliqua nulla. Dolore do ipsum sunt incididunt. Incididunt ipsum labore eiusmod amet dolor minim sunt velit cupidatat. Sint laboris qui occaecat dolor duis ad mollit esse dolore minim. Et nostrud deserunt magna ad adipisicing nisi deserunt mollit tempor.\r\nDeserunt exercitation consequat labore veniam. Proident aliqua Lorem pariatur anim aliqua eu elit aliqua. Pariatur anim laboris reprehenderit eu nulla consequat eu tempor sint exercitation eiusmod sint excepteur voluptate. Sunt cillum ex ex occaecat aliquip ut labore voluptate cupidatat velit incididunt consectetur reprehenderit sunt.\r\nProident ex sunt eu velit magna quis quis ea nulla. Reprehenderit id eu ullamco deserunt aliqua pariatur do nisi eu anim. Enim exercitation aute culpa aute excepteur pariatur veniam. Esse labore labore anim cupidatat exercitation aliqua Lorem consequat fugiat tempor magna. Mollit ipsum irure proident adipisicing nisi eu mollit culpa aliquip id esse occaecat. Commodo amet esse nisi velit ipsum amet id cupidatat veniam. Id veniam fugiat anim fugiat nisi non in do labore esse labore est exercitation amet.\r\n", + "address": "4 Baughman Place", + "city": "Hessville", + "state": "Mississippi", + "zip": 48135, + "country": "Saint Kitts and Nevis", + "email": "leticiahickman@scentric.com", + "phone": "(986) 415-3367", + "color": "rgb(161,161,217)" + }, + { + "index": 133, + "name": "Logan Wyatt", + "first": "Bray", + "last": "Mathews", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/teclaro/73.jpg", + "boolean": false, + "guid": "50c374de-c1b2-4bef-8dc9-9b47e6caf127", + "integer": 3, + "date": "Thu Jan 23 2014 19:45:54 GMT-0800 (PST)", + "shortText": "aliquip cupidatat sint ut", + "mediumText": "Esse elit anim consectetur reprehenderit ad excepteur eiusmod aute. Veniam in ullamco reprehenderit commodo consectetur tempor quis. Nisi enim tempor tempor est est amet esse mollit mollit sint officia et amet duis. Sint sit in sit et enim et eu aliquip nostrud proident.", + "longText": "Amet aliqua eiusmod enim occaecat tempor do adipisicing labore mollit culpa adipisicing dolor nisi id. Elit consequat mollit commodo minim labore excepteur nisi est consectetur. Ad ut laborum enim fugiat cillum eu labore.\r\nReprehenderit pariatur aliqua anim aliquip. Aliqua tempor labore Lorem nulla ut velit aliquip ea amet labore qui exercitation incididunt. Velit pariatur eu sunt mollit velit deserunt mollit ad veniam aute. Cupidatat laboris qui proident eu mollit do qui. Lorem id aliqua occaecat irure proident. Commodo dolor commodo laborum excepteur nisi consequat esse culpa aute laboris do in.\r\nLaborum ex excepteur incididunt sint ipsum. Aliquip cillum nulla sit labore Lorem ut do mollit Lorem. Reprehenderit commodo dolore sint mollit. Laboris et culpa sunt ut ipsum deserunt eiusmod exercitation dolore. Do Lorem deserunt voluptate reprehenderit ex deserunt labore nulla excepteur qui nisi voluptate. Amet ipsum excepteur amet qui nostrud adipisicing elit fugiat veniam nostrud deserunt id sunt laborum. Incididunt eu dolore dolore qui quis qui pariatur pariatur ad nostrud.\r\n", + "address": "2 Cherry Street", + "city": "Kieler", + "state": "Rhode Island", + "zip": 44229, + "country": "Spain", + "email": "braymathews@scentric.com", + "phone": "(945) 538-3851", + "color": "rgb(223,145,248)" + }, + { + "index": 134, + "name": "Elva Beard", + "first": "Riley", + "last": "Wallace", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/eyronn/73.jpg", + "boolean": true, + "guid": "7c00ca0a-94ea-41ec-babd-533d61c3c1db", + "integer": 26, + "date": "Tue Sep 20 2005 17:05:43 GMT-0700 (PDT)", + "shortText": "incididunt", + "mediumText": "Tempor reprehenderit ullamco labore irure velit Lorem nulla excepteur sunt nostrud ea exercitation. Exercitation nisi reprehenderit consequat enim voluptate est aute qui dolor aliqua amet quis cupidatat. Elit non aliquip esse in officia enim tempor pariatur aliquip est. Reprehenderit ipsum ea voluptate commodo qui deserunt. Cupidatat nostrud magna eu nisi mollit voluptate sint qui.", + "longText": "Reprehenderit mollit eu est adipisicing amet quis id ipsum est nisi occaecat. Veniam aute aute adipisicing aliquip et ea dolor commodo cillum esse Lorem. Dolore cillum cillum ex consectetur nostrud velit elit voluptate adipisicing deserunt dolore consectetur. Amet proident aliquip enim pariatur occaecat in aliquip deserunt in occaecat qui mollit eu. Deserunt laboris dolor quis do.\r\nVelit ea voluptate culpa veniam mollit excepteur culpa laboris. Dolor est qui sint irure cillum proident labore nulla adipisicing cillum. Incididunt aliquip dolor est consectetur nulla ad aliqua esse sit elit. Eiusmod et fugiat dolore aliquip excepteur ullamco sunt sit enim do fugiat in excepteur cupidatat. Lorem nostrud irure velit quis consectetur.\r\nNulla amet do excepteur in esse reprehenderit nulla aliqua reprehenderit ipsum dolore Lorem sunt. Quis aliqua ex esse voluptate aliquip do incididunt proident exercitation commodo. Commodo enim mollit dolor laboris dolore ex fugiat sit commodo Lorem. Lorem sint mollit reprehenderit ipsum elit qui exercitation incididunt. Non excepteur non duis nulla sunt dolor in qui proident. Proident pariatur adipisicing eu sunt laboris voluptate cillum ut adipisicing. Labore ut esse consectetur in consequat velit cupidatat esse nisi.\r\nVelit Lorem ad sunt labore irure enim ut aliqua officia velit dolor. Sint tempor sunt et amet nostrud. Sint laboris eiusmod elit excepteur.\r\n", + "address": "4 Herkimer Court", + "city": "Jacumba", + "state": "Georgia", + "zip": 87900, + "country": "Guinea-Bissau", + "email": "rileywallace@scentric.com", + "phone": "(908) 527-2510", + "color": "rgb(150,183,57)" + }, + { + "index": 135, + "name": "Jeanne Walker", + "first": "Noemi", + "last": "Castaneda", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gulian/73.jpg", + "boolean": false, + "guid": "954a476d-62d8-4190-94a1-ba084f44049d", + "integer": 52, + "date": "Thu Jul 28 1977 23:23:02 GMT-0700 (PDT)", + "shortText": "duis", + "mediumText": "Aliqua nostrud excepteur est veniam cillum et aute ut. Sint ex nostrud incididunt deserunt duis. Velit laborum occaecat mollit culpa aliquip nisi aliquip ad. Laboris eu adipisicing nostrud aliquip elit consectetur ea nulla quis minim non proident laboris. Laboris exercitation laboris ut exercitation deserunt quis irure irure officia sunt sit cillum ad.", + "longText": "Ipsum occaecat veniam cupidatat enim tempor irure ea reprehenderit esse commodo non. Aliquip est sit ipsum ipsum officia aliquip mollit quis sint adipisicing nisi sint tempor esse. Occaecat fugiat minim tempor excepteur ut minim dolor non voluptate.\r\nAdipisicing sunt excepteur amet aliquip duis anim excepteur ipsum nostrud occaecat non aliquip nulla Lorem. Labore ut sint mollit anim aliquip elit. Incididunt excepteur et deserunt anim laborum voluptate quis nulla ut. Aliqua qui culpa et culpa magna consequat irure culpa Lorem veniam. Qui sit qui labore cillum sunt elit consectetur officia qui Lorem sint elit dolor veniam. Ex labore ullamco quis ut elit Lorem in excepteur officia dolore tempor aute irure. Sunt ut eu deserunt aliquip aliqua sint elit elit.\r\nDolore ex cupidatat cupidatat elit adipisicing exercitation mollit eu officia et ullamco incididunt dolor. Qui incididunt voluptate aliquip fugiat proident ea. Officia minim laboris tempor est aliqua ipsum velit aliqua et culpa voluptate quis. Sint amet commodo dolor ad excepteur veniam cillum amet ut officia commodo velit.\r\nIpsum exercitation laboris occaecat duis non nisi cupidatat ad incididunt voluptate et. Duis ea enim nostrud non reprehenderit laborum culpa sint. Ullamco dolor non in excepteur culpa amet. Consectetur occaecat eiusmod tempor ad tempor veniam dolore aliqua ad id. Exercitation in amet fugiat ea mollit ut in officia velit dolore nostrud est amet anim. Eu do dolore eu ut adipisicing qui aute aute occaecat labore esse.\r\nDo quis laborum minim aliqua non dolor cupidatat labore velit dolor eiusmod. Minim labore sint ipsum duis nisi. Nostrud duis deserunt consectetur magna laborum mollit ea laboris. Consectetur exercitation dolor eu exercitation reprehenderit non ipsum.\r\n", + "address": "4 Montague Street", + "city": "Why", + "state": "New Mexico", + "zip": 97706, + "country": "Cameroon", + "email": "noemicastaneda@scentric.com", + "phone": "(867) 475-2648", + "color": "rgb(130,190,155)" + }, + { + "index": 136, + "name": "Jasmine Talley", + "first": "Debra", + "last": "Dunn", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/drebbits/73.jpg", + "boolean": false, + "guid": "d0121c9c-7074-450a-9234-7d97fd437785", + "integer": 91, + "date": "Mon Feb 01 1988 23:12:40 GMT-0800 (PST)", + "shortText": "non", + "mediumText": "Veniam in voluptate laboris exercitation labore velit enim occaecat eiusmod officia cupidatat ex non mollit. Irure occaecat adipisicing dolore labore officia aliquip in. Elit et consequat adipisicing aliquip irure qui sunt amet Lorem eiusmod fugiat tempor sint fugiat. Consectetur esse eu pariatur et cupidatat sint. Nulla enim Lorem exercitation eu id cillum sint qui est deserunt culpa.", + "longText": "Eiusmod aliquip pariatur minim commodo qui labore aliquip sint non officia consequat. Aliquip culpa anim amet id labore nulla enim cupidatat consectetur eiusmod. Dolor nulla pariatur sunt pariatur est labore excepteur velit dolore nisi.\r\nQuis amet fugiat occaecat anim. Elit aliqua non veniam commodo. Lorem enim ut laboris dolore ad esse est culpa aute aliqua aliqua. Elit deserunt ea cillum ad. Laboris ipsum cupidatat laborum veniam officia quis aute sit pariatur commodo reprehenderit in velit.\r\nEnim aliqua culpa do voluptate et deserunt velit est. Nisi elit voluptate ipsum officia mollit nulla anim labore magna laboris dolor proident. Ea excepteur laborum aute excepteur officia qui proident. Nisi ad ipsum et cupidatat sint cupidatat veniam eiusmod eu id eiusmod pariatur cupidatat. Mollit eiusmod culpa labore reprehenderit minim dolore et veniam non labore tempor sunt Lorem ex. Laborum officia Lorem duis enim magna exercitation ullamco elit ut veniam reprehenderit magna quis adipisicing. Dolor est amet commodo nulla deserunt Lorem reprehenderit consectetur.\r\n", + "address": "2 Woodpoint Road", + "city": "Shaft", + "state": "Arizona", + "zip": 57801, + "country": "Niger", + "email": "debradunn@scentric.com", + "phone": "(815) 574-3583", + "color": "rgb(79,212,186)" + }, + { + "index": 137, + "name": "Marquez Stark", + "first": "Gallegos", + "last": "Harris", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/alexhaniotis/73.jpg", + "boolean": true, + "guid": "2dc3bab6-4120-4941-8c99-3f350a894c8f", + "integer": 76, + "date": "Tue Jul 05 2005 22:08:38 GMT-0700 (PDT)", + "shortText": "id officia", + "mediumText": "Mollit dolor quis quis velit elit id ex esse sit cillum sit aliquip.", + "longText": "Est laboris reprehenderit nisi duis eu qui elit ipsum excepteur cillum officia. Qui dolor eiusmod nulla elit enim pariatur tempor. Sunt aliquip voluptate mollit magna nisi eu sit do adipisicing laboris. Officia fugiat id quis eu consequat nulla anim irure quis exercitation adipisicing deserunt elit.\r\nAnim minim nostrud reprehenderit aute labore irure voluptate. Laborum incididunt ipsum culpa nulla qui esse mollit veniam. Dolor commodo ad aliqua aliquip ea consequat occaecat culpa veniam consequat. Incididunt reprehenderit enim veniam deserunt laboris cillum sint occaecat labore eiusmod ullamco veniam. Dolor culpa culpa laboris id cillum. Exercitation qui id laboris minim fugiat ea do aute duis. Do velit laborum adipisicing ad amet consequat laboris Lorem pariatur.\r\nConsequat dolor amet cillum minim exercitation sit in velit fugiat id anim. Fugiat tempor laborum nostrud ea eiusmod esse laborum. Labore aliquip ullamco ipsum aliqua consectetur ipsum ad. Et voluptate incididunt id cillum labore fugiat aliquip veniam sunt sunt nisi adipisicing. Cillum nisi qui reprehenderit qui nostrud sunt.\r\n", + "address": "2 Franklin Street", + "city": "Orovada", + "state": "Texas", + "zip": 68862, + "country": "Malta", + "email": "gallegosharris@scentric.com", + "phone": "(994) 597-2534", + "color": "rgb(67,106,191)" + }, + { + "index": 138, + "name": "James Gregory", + "first": "Davis", + "last": "Burton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/twahlin/73.jpg", + "boolean": false, + "guid": "7ff8b299-328d-46dc-ab4f-b59c0d6e3ad8", + "integer": 32, + "date": "Sat Jan 08 1994 09:01:56 GMT-0800 (PST)", + "shortText": "tempor", + "mediumText": "Id nisi nulla non culpa laborum dolor adipisicing aute in. Cillum consectetur sit occaecat officia. Nulla Lorem aliqua nulla velit nisi dolore magna sint in sint incididunt sunt sit nostrud. Pariatur sunt labore Lorem est nulla minim culpa velit tempor elit ipsum in eiusmod. Ad fugiat anim incididunt sint consectetur.", + "longText": "Esse reprehenderit laborum commodo aute nostrud incididunt. Voluptate do consectetur excepteur minim laboris ea et ut cupidatat. Magna qui aute sint minim do nostrud laborum magna labore. Lorem sunt veniam ullamco cupidatat.\r\nEt ullamco aute ex cupidatat cillum laboris aliqua laborum irure. Laboris ex laboris dolore non Lorem. Reprehenderit excepteur occaecat laborum laboris voluptate exercitation eu est consectetur tempor est nisi. Cillum fugiat do deserunt non dolor eiusmod Lorem dolore voluptate. Nisi minim enim Lorem minim quis exercitation reprehenderit eu nulla qui aute.\r\nIrure anim eiusmod id adipisicing aliqua. Nulla minim laboris nulla esse do elit aliqua eiusmod aute cillum elit. Ex consequat laboris aliquip dolor dolore pariatur consequat ut reprehenderit.\r\nFugiat minim eiusmod tempor commodo amet deserunt consectetur elit aliquip ex labore laborum veniam eu. Cillum aliquip aliquip non culpa eiusmod elit non dolore. Eiusmod ullamco cillum dolor ea voluptate et adipisicing ut enim. Sunt duis ea fugiat aute qui reprehenderit ut. Ullamco minim cillum aliqua nulla amet excepteur reprehenderit ut reprehenderit. Duis eu aliqua ad dolore consectetur labore quis occaecat cillum qui sint commodo deserunt est. Duis sunt deserunt enim duis est anim commodo elit id ad magna occaecat in.\r\n", + "address": "4 Macdougal Street", + "city": "Limestone", + "state": "District Of Columbia", + "zip": 74514, + "country": "Antigua and Barbuda", + "email": "davisburton@scentric.com", + "phone": "(916) 551-3269", + "color": "rgb(215,141,197)" + }, + { + "index": 139, + "name": "Thomas Lowery", + "first": "Hutchinson", + "last": "Weeks", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ntfblog/73.jpg", + "boolean": false, + "guid": "6ae3a7b3-9d8c-46bc-9d8c-af55345a1168", + "integer": 68, + "date": "Sat May 27 1978 05:40:06 GMT-0700 (PDT)", + "shortText": "irure sit", + "mediumText": "Officia proident tempor do et aliquip in cupidatat labore anim esse.", + "longText": "Labore elit laboris dolor fugiat ut sit minim aliquip adipisicing culpa nostrud. Id do adipisicing nisi adipisicing proident. Cupidatat tempor aliquip anim consequat fugiat eiusmod laborum adipisicing. Et sunt velit magna cupidatat commodo et consequat. Exercitation voluptate ex aliquip laboris. Aliqua qui voluptate anim deserunt reprehenderit.\r\nPariatur dolore pariatur laborum excepteur duis. Dolore consequat veniam fugiat sint cillum quis sit deserunt laborum eiusmod culpa id. Eiusmod incididunt magna cupidatat irure. Ex eu ad non non non consectetur sit non cillum sit anim cupidatat. Ea minim ut exercitation sint ullamco culpa cupidatat ipsum eu sit.\r\nEnim aliquip officia occaecat esse exercitation nulla esse. Commodo magna et sint sint consequat velit excepteur occaecat ex ea tempor proident. Officia laboris proident commodo eu laboris consectetur sunt pariatur aliqua pariatur. Fugiat reprehenderit reprehenderit cillum exercitation consequat duis ullamco in quis exercitation est est excepteur.\r\nEsse duis in elit cupidatat non cillum non aute sunt nulla mollit ipsum enim. Sit deserunt do nostrud quis dolor qui aliqua qui exercitation ex minim velit esse. Aliqua irure do ex eiusmod cupidatat non veniam est exercitation. Ea culpa eu Lorem id aute dolore.\r\n", + "address": "4 Hazel Court", + "city": "Lafferty", + "state": "Virgin Islands", + "zip": 50828, + "country": "Kazakhstan", + "email": "hutchinsonweeks@scentric.com", + "phone": "(930) 418-3265", + "color": "rgb(120,254,136)" + }, + { + "index": 140, + "name": "Adkins Hanson", + "first": "Gibson", + "last": "Chaney", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/commoncentssss/73.jpg", + "boolean": false, + "guid": "9f6901ec-fedc-4d3c-963a-46d2245a15d6", + "integer": 63, + "date": "Thu Dec 30 1971 20:07:08 GMT-0800 (PST)", + "shortText": "elit tempor labore labore", + "mediumText": "Esse duis dolore officia voluptate velit culpa incididunt reprehenderit nisi. Eiusmod dolor ut non ea ut consequat dolor veniam aliqua ut cupidatat pariatur sunt.", + "longText": "Culpa tempor sint ullamco minim aute ad. Mollit laboris minim amet incididunt proident proident magna elit qui fugiat non velit irure. Nostrud incididunt non sunt ex veniam minim proident exercitation aliqua veniam laboris dolor est.\r\nPariatur aute adipisicing tempor occaecat. Laborum sit quis irure commodo sit. Incididunt do enim sit ad. Voluptate dolore fugiat ipsum id. Lorem Lorem laborum excepteur nostrud ut.\r\nCulpa tempor velit esse commodo eiusmod excepteur in aliqua. Quis culpa Lorem non et sunt elit. Incididunt ullamco ipsum duis laboris minim do mollit quis non minim laboris adipisicing sit Lorem. Culpa consectetur Lorem aute amet culpa deserunt fugiat. Deserunt amet officia cupidatat ea cupidatat nisi enim cupidatat reprehenderit dolore et reprehenderit nulla cupidatat. Velit ipsum ea ad exercitation eu sunt nisi nostrud ullamco nisi commodo aliqua.\r\nAdipisicing aute reprehenderit in enim do ipsum pariatur et cupidatat deserunt consectetur mollit sunt laboris. Exercitation voluptate dolor quis quis commodo. Laboris sunt consectetur veniam id fugiat magna ipsum ad cillum officia in sunt. Sunt ut magna culpa ad proident id sit in. Sint laborum commodo culpa deserunt et aliquip dolor laborum. Laboris adipisicing exercitation aliqua qui labore irure Lorem culpa aute minim Lorem aliquip. Sint nostrud et ut irure nisi non.\r\n", + "address": "4 Croton Loop", + "city": "Cresaptown", + "state": "Puerto Rico", + "zip": 63679, + "country": "Bahrain", + "email": "gibsonchaney@scentric.com", + "phone": "(973) 550-3569", + "color": "rgb(147,126,185)" + }, + { + "index": 141, + "name": "Catalina Rojas", + "first": "Angie", + "last": "Mcknight", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/anissa_anwar/73.jpg", + "boolean": true, + "guid": "2a7b1f3c-602a-4977-b1d0-b2e1f3101dbd", + "integer": 61, + "date": "Sun Jan 31 1982 15:49:23 GMT-0800 (PST)", + "shortText": "in adipisicing reprehenderit cillum officia", + "mediumText": "Commodo voluptate est elit aliquip irure qui. Ullamco labore et non irure. Ea sunt excepteur ea in. Consequat deserunt sint id et aliquip officia et nisi esse amet reprehenderit quis. Ut enim quis et culpa.", + "longText": "Labore ullamco ea ipsum aute veniam adipisicing irure culpa adipisicing mollit. Qui aute velit labore veniam enim exercitation reprehenderit tempor nisi ullamco cillum tempor ea fugiat. Nulla incididunt dolore exercitation irure ut. Fugiat dolor duis ad deserunt in proident. Est elit nisi magna do culpa aliquip proident elit cupidatat. Adipisicing fugiat commodo ullamco eiusmod mollit veniam. Nisi cupidatat ullamco cillum velit qui Lorem sint ad non esse eu.\r\n", + "address": "4 Thomas Street", + "city": "Marenisco", + "state": "Maryland", + "zip": 83481, + "country": "India", + "email": "angiemcknight@scentric.com", + "phone": "(852) 571-3576", + "color": "rgb(180,187,55)" + }, + { + "index": 142, + "name": "Waller Rios", + "first": "Sherri", + "last": "Jones", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/btrig/73.jpg", + "boolean": true, + "guid": "33336c68-2dc7-4da4-83df-770c5d0ac6a1", + "integer": 23, + "date": "Thu Aug 06 2009 20:38:56 GMT-0700 (PDT)", + "shortText": "cillum ullamco deserunt", + "mediumText": "In voluptate sit consequat ex eu consectetur labore et qui in. Nostrud do enim ut non dolore cupidatat duis sint. Est laboris aute veniam mollit ea dolore occaecat pariatur. Fugiat adipisicing amet cupidatat cillum sit reprehenderit velit cillum ex anim velit tempor. Ullamco do aliquip est Lorem duis nulla ipsum.", + "longText": "Enim aliqua ut eu excepteur cupidatat nostrud dolore. Anim in ut est laboris. Id sunt ex labore commodo pariatur laborum sint labore fugiat nostrud.\r\nVelit commodo voluptate irure eu officia aute veniam et quis laboris. Nisi excepteur excepteur deserunt dolor. Sunt ex enim do eiusmod aliqua consequat aute cupidatat incididunt sint eiusmod ex ea Lorem. Fugiat nisi adipisicing ullamco anim enim quis eu fugiat.\r\nTempor aliqua consequat nisi deserunt cillum. Nulla eu fugiat nostrud aliquip ut consequat consectetur dolor labore duis ut deserunt eu. Mollit ut irure irure dolore ad occaecat cillum. Consectetur Lorem nostrud veniam fugiat. Qui mollit pariatur tempor consequat. Ut consequat veniam consequat exercitation non cillum ullamco sit velit Lorem qui aliqua anim.\r\nIrure ad minim consectetur mollit consectetur. Ex est laborum fugiat non. Aute consequat aliquip qui ex proident. Ad occaecat deserunt aliqua non sint consectetur voluptate in enim quis do mollit velit. Reprehenderit quis dolor laborum dolor mollit.\r\nIrure Lorem aliquip elit id minim sit. Exercitation laborum deserunt irure incididunt deserunt veniam ullamco dolor. Aliqua excepteur quis culpa labore in elit reprehenderit voluptate duis consectetur. Irure occaecat consequat commodo enim ex enim deserunt.\r\n", + "address": "2 Etna Street", + "city": "Gorham", + "state": "Massachusetts", + "zip": 76332, + "country": "Qatar", + "email": "sherrijones@scentric.com", + "phone": "(905) 514-2725", + "color": "rgb(167,172,139)" + }, + { + "index": 143, + "name": "Fulton Richmond", + "first": "Nannie", + "last": "Preston", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ug_rick/73.jpg", + "boolean": false, + "guid": "d342e219-1ba1-46ae-aaea-371e1c50562a", + "integer": 14, + "date": "Thu Aug 06 1987 21:37:44 GMT-0700 (PDT)", + "shortText": "proident sunt tempor", + "mediumText": "Fugiat aliquip nisi eiusmod et. Adipisicing eiusmod quis magna aliquip ut ullamco nulla veniam dolor irure exercitation dolore. Lorem nostrud do non do cupidatat eiusmod ea ipsum aliqua pariatur aute Lorem voluptate.", + "longText": "Commodo adipisicing est ea do nostrud Lorem in adipisicing magna dolor pariatur consectetur. Esse adipisicing Lorem qui nostrud occaecat ipsum aute deserunt esse minim elit amet. Ad sint dolore minim consectetur enim. Cupidatat culpa amet mollit ut dolore aliqua laborum nulla voluptate voluptate eu sint voluptate Lorem. Irure et laboris tempor aute qui veniam id nulla sint nostrud eu officia ea commodo.\r\nAliquip et magna exercitation velit quis incididunt velit. Nostrud fugiat in nulla Lorem qui tempor nulla adipisicing anim eiusmod duis sunt ad ex. Nulla Lorem aliqua do esse commodo. Ea ullamco anim non magna reprehenderit id ad ut aliquip magna velit tempor est. Consequat laboris tempor cupidatat velit nulla ea reprehenderit aute excepteur commodo eu qui nisi amet. Commodo excepteur enim sint dolor tempor eu nulla elit non dolor.\r\nDo id incididunt aute consequat cillum. Voluptate sunt in ut id enim fugiat occaecat. Consectetur cillum sint tempor commodo duis veniam ad anim laboris deserunt consequat. Nisi duis aliqua consectetur ullamco nisi culpa ea aliqua.\r\n", + "address": "2 Lott Street", + "city": "Lydia", + "state": "Oklahoma", + "zip": 37848, + "country": "Vatican City State (Holy See)", + "email": "nanniepreston@scentric.com", + "phone": "(801) 531-2586", + "color": "rgb(58,230,86)" + }, + { + "index": 144, + "name": "Juanita Mcfadden", + "first": "Preston", + "last": "Koch", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/blakestevenson/73.jpg", + "boolean": false, + "guid": "d10bde3c-7451-4455-bcab-d6a9467128b3", + "integer": 35, + "date": "Sat Dec 29 2007 19:47:26 GMT-0800 (PST)", + "shortText": "fugiat", + "mediumText": "Deserunt mollit proident mollit pariatur aliquip amet sit sunt ea aliquip non ad irure voluptate. Mollit eu veniam do veniam esse laboris velit dolor velit aliqua Lorem sint dolore cupidatat. Ea est irure incididunt deserunt officia Lorem culpa proident non do cillum.", + "longText": "Reprehenderit sint est consequat do. Qui irure ad voluptate proident nulla nulla quis nisi minim quis ullamco eiusmod sint. Nulla exercitation tempor incididunt qui. Adipisicing velit sit ad exercitation cillum esse exercitation sit laboris. Nostrud commodo aliquip esse quis in irure exercitation.\r\nEnim nisi in dolor cillum nulla ipsum. Qui velit cupidatat esse sit quis ullamco consequat deserunt irure exercitation. Culpa tempor ut ex id id aliqua ipsum cillum est proident ullamco nulla reprehenderit. Amet proident duis sunt proident consectetur non pariatur officia in. Voluptate enim anim eiusmod fugiat occaecat ut sunt sit nulla proident. Elit dolore consectetur velit occaecat.\r\n", + "address": "4 Jewel Street", + "city": "Washington", + "state": "Ohio", + "zip": 55293, + "country": "Malaysia", + "email": "prestonkoch@scentric.com", + "phone": "(824) 598-3313", + "color": "rgb(188,204,126)" + }, + { + "index": 145, + "name": "Hunter Morin", + "first": "Aguilar", + "last": "Willis", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/karalek/73.jpg", + "boolean": false, + "guid": "b6d849a7-e16f-4caf-8ddf-0232c5ccb47c", + "integer": 14, + "date": "Fri Oct 11 2013 10:09:38 GMT-0700 (PDT)", + "shortText": "mollit elit incididunt exercitation esse", + "mediumText": "Nisi tempor cupidatat do sint in nostrud nulla magna labore tempor amet. Qui ut anim adipisicing veniam veniam voluptate cupidatat culpa duis minim adipisicing veniam excepteur proident. Tempor eiusmod sint et nulla voluptate irure et quis sunt. Sit exercitation ex adipisicing consectetur sit veniam velit et laboris minim Lorem excepteur in.", + "longText": "Elit dolore dolore mollit deserunt fugiat Lorem ad nostrud occaecat magna. Sint deserunt sunt incididunt ad qui. Cupidatat nostrud ea sunt officia non sunt ea aliqua ipsum cillum adipisicing. Esse eiusmod minim magna culpa culpa.\r\n", + "address": "2 Cox Place", + "city": "Escondida", + "state": "Nevada", + "zip": 76788, + "country": "Belize", + "email": "aguilarwillis@scentric.com", + "phone": "(878) 446-2425", + "color": "rgb(137,240,219)" + }, + { + "index": 146, + "name": "Kathy Sutton", + "first": "Kendra", + "last": "Blevins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/elusiveanmol/73.jpg", + "boolean": false, + "guid": "4ad8c3c8-a316-4762-a596-e9477c0fa2cd", + "integer": 31, + "date": "Thu Dec 09 2004 16:04:29 GMT-0800 (PST)", + "shortText": "nisi", + "mediumText": "Minim incididunt amet sint velit officia eiusmod cillum velit duis adipisicing magna laborum deserunt eiusmod.", + "longText": "Sunt culpa tempor deserunt ea ea labore. Occaecat consectetur anim anim ipsum dolor. Consectetur nulla commodo non velit reprehenderit cillum tempor aliquip aliqua consequat dolore.\r\nAnim minim ipsum velit consectetur sit incididunt magna cillum. Commodo deserunt consectetur esse aliqua ullamco dolor pariatur. Mollit sint voluptate aute dolor fugiat minim veniam anim ad aute. In aliquip anim ullamco dolore proident proident ipsum sunt sunt. Sint dolor pariatur aute excepteur sunt laborum magna qui.\r\nIn eu excepteur commodo eiusmod aliqua ad amet. Fugiat eu adipisicing et eu commodo nostrud elit consectetur incididunt deserunt. Non velit qui do pariatur. Lorem pariatur ullamco voluptate cillum do duis.\r\nEnim ut velit tempor nulla nostrud duis non ex amet. Fugiat cillum cillum dolore aliquip aliqua duis proident sit eu deserunt culpa esse ad. Laboris dolore nulla in ullamco ullamco ut ad. Veniam amet ea Lorem consequat officia ut consectetur ea Lorem duis cupidatat id. Irure non cupidatat ipsum do incididunt duis minim elit dolor deserunt velit. Deserunt laboris fugiat ea incididunt qui excepteur ad non irure incididunt aliquip fugiat occaecat non.\r\nElit proident exercitation quis in labore et sint ea cillum ex occaecat deserunt. Ex laboris fugiat non et excepteur. Labore non nisi exercitation do minim incididunt commodo culpa est dolor. Mollit minim proident ea id. Aliquip est nulla aliquip sint culpa eu amet magna exercitation reprehenderit culpa. Ex commodo aliqua mollit veniam fugiat officia sint duis ad sit.\r\n", + "address": "3 Prince Street", + "city": "Urbana", + "state": "Montana", + "zip": 58650, + "country": "Singapore", + "email": "kendrablevins@scentric.com", + "phone": "(956) 553-2050", + "color": "rgb(224,79,174)" + }, + { + "index": 147, + "name": "Noel Morrison", + "first": "Puckett", + "last": "Shannon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/shoo7830/73.jpg", + "boolean": false, + "guid": "3257d65a-9945-47b8-8159-7e2304b15eef", + "integer": 32, + "date": "Wed Oct 31 1973 14:26:42 GMT-0800 (PST)", + "shortText": "sit enim nisi dolor occaecat", + "mediumText": "Deserunt deserunt excepteur aliquip proident aliquip sunt voluptate qui. Incididunt Lorem laboris dolore cillum incididunt. Qui magna excepteur ad id fugiat nostrud ea sunt mollit.", + "longText": "Eiusmod irure est incididunt cillum id sit enim quis. Eiusmod consequat deserunt proident fugiat velit ut pariatur mollit eiusmod tempor reprehenderit nisi. Nulla id ea occaecat culpa sit aute pariatur sit ullamco sint. Reprehenderit minim irure ut laborum irure nisi consectetur. Velit laborum aliquip eu ea quis veniam dolore nulla in mollit labore. Dolor velit est eiusmod est ullamco magna excepteur culpa deserunt aliqua culpa Lorem ea.\r\nTempor adipisicing sit elit ea commodo dolore dolore incididunt anim cillum nulla. In exercitation excepteur cupidatat nisi do. Id et aliqua incididunt officia pariatur dolor officia in eu ea. Eiusmod duis sint Lorem in officia velit sit qui labore aliqua fugiat quis magna ea. Laborum reprehenderit exercitation reprehenderit veniam anim nisi qui est. Ad velit incididunt ut labore consequat culpa nisi do voluptate aliquip.\r\nDo dolore occaecat amet aliquip excepteur aute nisi non. Cillum incididunt nostrud excepteur eiusmod consequat mollit voluptate dolor aliquip non. Veniam pariatur ad dolor commodo velit. Sunt dolore sunt dolore adipisicing pariatur sit nulla magna exercitation dolor proident amet dolore. Lorem adipisicing cillum laboris anim ex pariatur minim proident cillum deserunt incididunt est nostrud.\r\nEiusmod dolore eiusmod ad irure. Id nulla voluptate ad cillum duis aute veniam est mollit do. Dolore adipisicing cupidatat officia magna mollit incididunt ea. Ipsum commodo aute eu consequat ea sit. Pariatur cupidatat veniam voluptate est ex. Officia sint laboris voluptate anim laborum occaecat in ad. Consequat amet occaecat commodo deserunt duis.\r\nEnim minim dolor in anim enim. Sint ad adipisicing ullamco dolor cillum aute proident ea sint quis laboris sit. Dolor voluptate qui duis do ut labore magna incididunt occaecat tempor esse reprehenderit. Proident fugiat nulla tempor magna sit ut aliquip proident voluptate esse.\r\n", + "address": "2 Vanderbilt Avenue", + "city": "Nanafalia", + "state": "California", + "zip": 57562, + "country": "Trinidad and Tobago", + "email": "puckettshannon@scentric.com", + "phone": "(963) 414-2787", + "color": "rgb(74,128,154)" + }, + { + "index": 148, + "name": "Reeves Combs", + "first": "Trudy", + "last": "Newton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/oanacr/73.jpg", + "boolean": false, + "guid": "53ffc997-22cc-4acc-94b5-13907ae8737f", + "integer": 12, + "date": "Sun Feb 19 1984 10:56:10 GMT-0800 (PST)", + "shortText": "consequat quis ea laboris", + "mediumText": "Commodo minim culpa cillum proident dolor occaecat mollit.", + "longText": "Proident consectetur officia consectetur laborum eiusmod sunt. Et magna labore nostrud culpa ullamco cillum duis pariatur laboris irure. Anim laborum enim laboris velit pariatur cupidatat. Aliqua minim eu labore est ex excepteur ullamco laboris deserunt ex id tempor. Laboris dolor elit officia anim incididunt nostrud incididunt nostrud officia voluptate. Voluptate nostrud fugiat consectetur cillum adipisicing elit sint sit duis. Dolor labore do pariatur do officia ullamco.\r\nQui nulla occaecat dolore ad labore excepteur reprehenderit magna sint irure culpa est. In mollit cupidatat laborum duis ipsum mollit. Eiusmod excepteur aliquip do anim occaecat quis mollit id laborum Lorem consectetur commodo. Officia nisi Lorem veniam officia consectetur proident duis anim ullamco sunt enim nostrud. Laboris ad eu et esse sit nisi.\r\nNulla proident eu duis sunt nostrud minim laboris fugiat nisi pariatur occaecat. Et cupidatat mollit laborum ipsum sint ea amet enim aliqua. Exercitation eiusmod eu labore tempor mollit id commodo amet magna.\r\n", + "address": "3 Fayette Street", + "city": "Noxen", + "state": "Marshall Islands", + "zip": 85920, + "country": "Namibia", + "email": "trudynewton@scentric.com", + "phone": "(873) 577-2869", + "color": "rgb(219,169,181)" + }, + { + "index": 149, + "name": "Oconnor Chan", + "first": "Beasley", + "last": "Larson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/elamyr/73.jpg", + "boolean": true, + "guid": "1f90bd42-2c77-42fe-aa6b-fa4cd66676e6", + "integer": 10, + "date": "Fri Dec 30 1983 09:19:48 GMT-0800 (PST)", + "shortText": "adipisicing magna dolore", + "mediumText": "Commodo fugiat enim est minim. Amet quis amet mollit ipsum. Ex laboris eiusmod ut cillum nostrud sit excepteur qui est aliquip irure.", + "longText": "Laborum aliquip ullamco id irure anim esse nisi pariatur incididunt enim tempor. Sit voluptate aliquip non duis commodo. Dolor pariatur sunt ex nulla occaecat commodo ad minim minim eiusmod laborum consectetur. Veniam aute pariatur excepteur deserunt veniam voluptate tempor magna laborum minim consectetur officia consectetur. Enim aliquip incididunt dolor qui labore.\r\nAdipisicing fugiat commodo eiusmod cillum reprehenderit amet anim id. Aute laboris irure culpa est officia eiusmod esse minim ut irure ut. Nulla eu tempor nulla est eiusmod exercitation deserunt est. Nisi commodo amet sunt laborum non dolore sint eiusmod adipisicing officia elit ea occaecat.\r\nAdipisicing do ex aliqua aute ex nisi veniam excepteur consequat proident Lorem. Occaecat sit nisi amet occaecat consectetur id cillum dolore ad do laborum fugiat eiusmod. Cillum officia mollit qui non ad occaecat ea. Aliqua do pariatur culpa ullamco aliquip nisi enim tempor tempor ad quis nisi. Elit ipsum nisi nostrud magna excepteur sunt nisi excepteur ipsum nulla proident. Adipisicing mollit anim dolore eu mollit amet tempor.\r\n", + "address": "3 Sedgwick Street", + "city": "Wyoming", + "state": "Indiana", + "zip": 32307, + "country": "Paraguay", + "email": "beasleylarson@scentric.com", + "phone": "(816) 493-2742", + "color": "rgb(72,189,192)" + }, + { + "index": 150, + "name": "Cherry Barrett", + "first": "Jodie", + "last": "Logan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hmenchaca2/73.jpg", + "boolean": false, + "guid": "cf368c96-a982-4646-9b54-5fac8d17760e", + "integer": 86, + "date": "Tue Jun 30 2009 10:25:53 GMT-0700 (PDT)", + "shortText": "minim aliqua deserunt officia reprehenderit", + "mediumText": "Sunt ea eu occaecat aliqua.", + "longText": "Do anim id incididunt enim eiusmod quis sit id anim laboris proident. Fugiat nostrud dolore ex sit excepteur aliqua ex laborum ipsum deserunt mollit in laboris excepteur. Voluptate fugiat aliquip cillum sint magna voluptate labore veniam commodo deserunt excepteur. Nisi laborum commodo magna laborum ullamco ullamco est incididunt. Fugiat ex do pariatur reprehenderit velit pariatur proident. Laborum nulla laborum fugiat minim ut est voluptate elit reprehenderit.\r\nVelit enim enim ex eiusmod quis quis. Est minim adipisicing eu labore et dolor. Occaecat non laborum sint officia aliquip. Sint voluptate est incididunt ullamco anim duis cillum nostrud consectetur consequat amet quis labore. Ullamco eu amet eu est esse. Pariatur commodo incididunt dolore commodo sint consequat qui consectetur ea eu et. Amet quis non fugiat sint nostrud magna eiusmod incididunt ullamco.\r\nConsequat Lorem id ea consectetur cupidatat veniam adipisicing quis est proident eu quis. Labore magna ut esse amet qui non commodo exercitation. Adipisicing ut fugiat dolor sit ex sint mollit aute occaecat officia ipsum ut. Dolore consectetur laboris sint ex consectetur. Labore proident Lorem sunt sunt amet. Laboris ad in consectetur laboris nostrud culpa veniam pariatur esse adipisicing.\r\nIrure qui nostrud magna elit nulla velit consequat magna aliqua. Esse in consectetur velit laborum nostrud Lorem quis. Ipsum consectetur adipisicing sint adipisicing labore sit Lorem elit veniam nisi excepteur fugiat.\r\nAliqua ut qui enim sit nulla nulla nulla labore aliqua Lorem Lorem do. Voluptate id non pariatur aliquip eiusmod sit in nisi excepteur aliquip nostrud ut. Non id sunt Lorem nostrud cillum ad incididunt. Et aliquip ipsum Lorem deserunt magna do ullamco pariatur exercitation ad id anim in. Anim fugiat nostrud eu commodo velit. Aute labore est anim duis et minim qui non voluptate velit incididunt.\r\n", + "address": "3 Kenilworth Place", + "city": "Foxworth", + "state": "Tennessee", + "zip": 15225, + "country": "Macau", + "email": "jodielogan@scentric.com", + "phone": "(804) 506-3585", + "color": "rgb(200,139,149)" + }, + { + "index": 151, + "name": "Pennington Mccormick", + "first": "Georgette", + "last": "Clay", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dparrelli/73.jpg", + "boolean": false, + "guid": "c449450f-7ccb-4b65-9f9d-2b392e612960", + "integer": 15, + "date": "Tue Nov 10 1992 06:22:21 GMT-0800 (PST)", + "shortText": "adipisicing non officia", + "mediumText": "Dolore tempor qui cupidatat et velit ipsum ut officia.", + "longText": "Laboris nostrud cillum esse velit veniam non occaecat. Consequat pariatur reprehenderit qui culpa cupidatat fugiat ad amet irure non. Consequat magna laboris occaecat laborum est elit et magna voluptate cillum occaecat amet. Sit elit proident duis tempor nulla ullamco est qui nostrud. Duis non aliqua ea duis labore elit pariatur elit. Aliquip amet id ea aliqua.\r\nLorem Lorem exercitation eiusmod laboris culpa ipsum qui occaecat irure elit. Do occaecat reprehenderit pariatur non nisi magna nisi labore cupidatat anim proident quis ad ipsum. Non qui aute cupidatat irure dolor excepteur excepteur. Veniam eiusmod non nulla ex amet in minim non dolore excepteur anim. Ipsum non magna minim ea consequat officia et eu velit do. Aliqua veniam dolor officia incididunt occaecat. Ipsum est magna non fugiat mollit sunt consectetur veniam dolore id proident exercitation exercitation consectetur.\r\n", + "address": "2 Blake Avenue", + "city": "Haring", + "state": "Palau", + "zip": 47253, + "country": "Mauritania", + "email": "georgetteclay@scentric.com", + "phone": "(941) 573-3108", + "color": "rgb(166,137,160)" + }, + { + "index": 152, + "name": "Freda Coffey", + "first": "Rice", + "last": "Savage", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/okansurreel/73.jpg", + "boolean": true, + "guid": "0645d81f-1761-4eb4-b3ec-5c83f1d37a29", + "integer": 84, + "date": "Sun May 07 1978 23:30:05 GMT-0700 (PDT)", + "shortText": "deserunt voluptate officia consequat magna", + "mediumText": "Adipisicing esse tempor proident irure dolore eu sit.", + "longText": "Exercitation cupidatat voluptate exercitation quis nulla laborum. Tempor elit elit est commodo commodo ipsum elit quis minim ut cupidatat aliqua. Elit officia enim occaecat nisi fugiat nulla qui quis. Nisi cillum ullamco eu proident mollit velit.\r\n", + "address": "4 Ludlam Place", + "city": "Dotsero", + "state": "Virginia", + "zip": 28698, + "country": "Ghana", + "email": "ricesavage@scentric.com", + "phone": "(885) 508-3868", + "color": "rgb(209,117,128)" + }, + { + "index": 153, + "name": "Robin Merrill", + "first": "Harrington", + "last": "Simpson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lwilsonsmith/73.jpg", + "boolean": false, + "guid": "13382562-593b-4d3d-8633-025dec9ff8d2", + "integer": 71, + "date": "Sun Jul 15 1973 12:02:34 GMT-0700 (PDT)", + "shortText": "ad", + "mediumText": "Incididunt est minim non mollit amet est. Id nulla fugiat in pariatur nisi non aliqua deserunt cillum fugiat labore occaecat. Laborum Lorem laborum sit esse amet veniam. Occaecat exercitation anim consectetur nisi.", + "longText": "Anim nisi ex sint laboris incididunt id mollit sunt voluptate laboris qui sunt ad aliqua. Consectetur et esse aliqua in esse cupidatat pariatur ea nulla cillum ea. Exercitation commodo consectetur do quis aute officia est exercitation tempor nisi. Ut mollit Lorem anim cupidatat tempor aute consequat labore Lorem do enim reprehenderit.\r\nLorem magna tempor incididunt aliqua in magna Lorem. Fugiat qui minim est excepteur dolore laboris non consequat. Ullamco consequat eiusmod et sint aliquip et in anim.\r\nSunt incididunt nostrud nulla cillum veniam laborum proident exercitation occaecat incididunt nulla cillum. Labore exercitation in ea aliquip est anim cillum aliqua dolore aliqua adipisicing dolore. Ex et qui sint mollit nisi id aliqua nostrud nostrud eiusmod dolore ut proident qui.\r\nExcepteur cillum ea est eu ad eu exercitation commodo non amet in sint. Amet esse proident consequat elit consequat in laboris ea quis. Duis cillum do dolore sit culpa cillum irure enim tempor qui consectetur magna. Anim cillum esse cillum labore mollit reprehenderit. Sint consequat aliqua in id labore in adipisicing est non sit. Laborum esse voluptate proident excepteur occaecat.\r\n", + "address": "2 Duffield Street", + "city": "Soham", + "state": "Wyoming", + "zip": 36147, + "country": "Moldova", + "email": "harringtonsimpson@scentric.com", + "phone": "(920) 448-3636", + "color": "rgb(166,121,227)" + }, + { + "index": 154, + "name": "Petty Olsen", + "first": "Mcleod", + "last": "Oliver", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/klimmka/73.jpg", + "boolean": true, + "guid": "f4ae116d-6e1a-45dc-a540-636907772467", + "integer": 43, + "date": "Tue May 07 1991 17:32:07 GMT-0700 (PDT)", + "shortText": "proident laborum irure", + "mediumText": "Culpa laborum laboris adipisicing irure commodo.", + "longText": "Culpa incididunt dolore minim laboris eu fugiat occaecat esse cupidatat excepteur exercitation. Est quis Lorem mollit deserunt quis dolore sunt. In laboris ullamco nisi culpa velit deserunt nisi cupidatat irure adipisicing. Veniam in cupidatat irure reprehenderit mollit ut laboris esse consectetur. Ipsum dolore aliquip mollit nulla magna officia. Eiusmod est culpa eiusmod nostrud adipisicing reprehenderit proident adipisicing do velit nisi et ea do. Ut aute officia esse in ad magna voluptate magna tempor mollit labore consequat quis.\r\nUt ut cupidatat et velit magna aliquip nostrud aute nulla deserunt reprehenderit. Ex consequat labore mollit est officia sint esse labore. Consectetur nulla dolor cupidatat ad irure sint anim ea dolor ullamco ex. Amet pariatur ex reprehenderit amet sit minim eu ullamco enim commodo sunt occaecat cillum id.\r\nEnim elit nostrud exercitation qui. Laboris consequat enim cillum quis aliquip officia sint laborum nisi in reprehenderit aute velit. Duis nisi excepteur mollit nisi duis. Aliquip elit laboris anim fugiat minim. Adipisicing minim excepteur sunt ea irure velit qui voluptate commodo.\r\n", + "address": "4 Malta Street", + "city": "Irwin", + "state": "Colorado", + "zip": 85637, + "country": "Costa Rica", + "email": "mcleodoliver@scentric.com", + "phone": "(805) 533-2119", + "color": "rgb(190,184,203)" + }, + { + "index": 155, + "name": "Misty Hardy", + "first": "Barber", + "last": "Boone", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/m_kalibry/73.jpg", + "boolean": true, + "guid": "9c45bc8a-25cf-4c5b-8b71-30364fcf1924", + "integer": 43, + "date": "Sun Oct 16 1994 17:51:06 GMT-0700 (PDT)", + "shortText": "magna", + "mediumText": "Exercitation nulla aliquip deserunt dolore nisi.", + "longText": "Minim exercitation sint laborum nulla. Amet sunt aliquip veniam pariatur est ex qui proident mollit est. Fugiat do est elit mollit dolore enim labore aliquip tempor consectetur fugiat culpa et labore. Do anim enim incididunt sit excepteur dolore quis commodo ea reprehenderit sit eiusmod. Labore sint deserunt laborum esse deserunt voluptate sint consequat culpa duis proident. Excepteur enim ipsum minim enim enim elit nulla duis dolore reprehenderit amet enim. Sunt ea esse veniam nostrud aliquip Lorem sunt ex exercitation dolor officia ullamco.\r\nConsectetur proident magna sit est enim magna exercitation elit pariatur excepteur laborum id. Mollit nostrud est excepteur consequat aliqua ea irure. Deserunt velit dolore incididunt exercitation.\r\nLabore anim minim dolor excepteur officia est est in magna minim. Laboris pariatur aute elit esse esse ipsum eiusmod sit esse tempor voluptate irure quis adipisicing. Ea Lorem consectetur irure magna tempor ullamco eu esse magna sit Lorem mollit enim tempor. Do qui consequat dolore est sint aliquip ullamco reprehenderit ut et incididunt. Fugiat non est proident aute.\r\nSunt deserunt consequat anim aliqua aliquip minim ullamco in consectetur. Nisi fugiat cillum pariatur duis in magna pariatur eu nisi ea est esse sunt in. Occaecat proident tempor excepteur cillum.\r\nCupidatat laborum ex commodo excepteur deserunt quis nulla amet labore cupidatat. Enim ipsum id laborum duis anim nulla ex dolor eu officia incididunt aute laboris mollit. Dolore laboris do laborum magna amet minim ea eu eiusmod. Deserunt duis laboris nostrud qui.\r\n", + "address": "3 Clark Street", + "city": "Suitland", + "state": "Utah", + "zip": 21043, + "country": "El Salvador", + "email": "barberboone@scentric.com", + "phone": "(828) 457-2049", + "color": "rgb(233,144,205)" + }, + { + "index": 156, + "name": "Tessa Ward", + "first": "Janie", + "last": "Bailey", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dhoot_amit/73.jpg", + "boolean": false, + "guid": "fa4f8583-7893-484e-a2fa-3daeb6c18ffc", + "integer": 38, + "date": "Thu Jun 19 1975 01:08:42 GMT-0700 (PDT)", + "shortText": "ex proident", + "mediumText": "Esse cupidatat duis non ullamco dolor aliquip aute tempor voluptate. Dolore cillum voluptate nulla eiusmod sint dolor minim consectetur.", + "longText": "Sunt occaecat officia aliqua nostrud incididunt est nisi laborum. Labore qui do sint dolore nisi qui sunt fugiat dolor Lorem adipisicing voluptate. Aliqua culpa dolor dolore nulla culpa labore duis sint ex.\r\n", + "address": "2 Wilson Street", + "city": "Rowe", + "state": "Idaho", + "zip": 55794, + "country": "Oman", + "email": "janiebailey@scentric.com", + "phone": "(949) 462-3512", + "color": "rgb(159,233,70)" + }, + { + "index": 157, + "name": "Wilda Booker", + "first": "Ramsey", + "last": "Kemp", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/actionsmile/73.jpg", + "boolean": false, + "guid": "53cfead6-8964-4112-84a9-ab158fff3aef", + "integer": 66, + "date": "Sun Jun 03 2007 03:34:39 GMT-0700 (PDT)", + "shortText": "ex id", + "mediumText": "Esse veniam laborum enim exercitation nisi ut duis elit incididunt consequat. Amet anim non proident commodo. Voluptate ex irure ex occaecat veniam velit.", + "longText": "Nisi aliqua id ad et sunt esse ad sunt. Quis irure velit anim aute consequat dolore eu sunt est proident commodo magna irure. Minim ullamco ex duis sint nisi nulla occaecat quis. Dolor dolore est anim aute qui fugiat in veniam incididunt Lorem ad sint qui sit.\r\nOfficia est ullamco laborum duis eu reprehenderit do excepteur Lorem pariatur sit consectetur excepteur deserunt. Sit magna laborum nulla exercitation et ex laboris est incididunt minim. Ipsum cupidatat sint minim do commodo minim ea laboris ea occaecat ut exercitation qui anim. Reprehenderit voluptate sit voluptate occaecat commodo. Adipisicing nisi ipsum eiusmod exercitation non. Nostrud ad incididunt laboris fugiat veniam esse ex laboris enim.\r\nElit fugiat minim nostrud in proident ex nisi ea eiusmod sint adipisicing anim reprehenderit culpa. Exercitation anim do id ad. Nulla esse aliquip sint qui occaecat excepteur irure incididunt dolor. Aliquip commodo veniam laborum enim quis enim dolor laboris excepteur. Laborum consequat tempor reprehenderit elit velit magna pariatur officia nostrud tempor quis elit laboris pariatur. Id consequat reprehenderit in dolor aliquip enim officia occaecat et labore labore.\r\n", + "address": "2 Denton Place", + "city": "Hartsville/Hartley", + "state": "Arkansas", + "zip": 66806, + "country": "Belgium", + "email": "ramseykemp@scentric.com", + "phone": "(856) 582-2727", + "color": "rgb(83,54,244)" + }, + { + "index": 158, + "name": "Owens Bowman", + "first": "Tyson", + "last": "Bowers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/craftified/73.jpg", + "boolean": true, + "guid": "77abfb3a-ed05-4caf-bf96-82e827a650f0", + "integer": 14, + "date": "Wed Mar 28 1990 07:53:40 GMT-0800 (PST)", + "shortText": "qui ullamco pariatur incididunt", + "mediumText": "Laborum pariatur sit pariatur veniam aliqua sint exercitation esse.", + "longText": "Occaecat nostrud sint nisi reprehenderit. Irure est enim esse irure dolor eu pariatur aute ea dolor id nulla. Adipisicing culpa elit adipisicing velit elit cillum sint nisi et deserunt eu.\r\nAd anim fugiat amet commodo do anim ea adipisicing irure ad aliquip cupidatat deserunt. Nulla consequat ut sit consectetur ea non ut aliqua. Nulla nisi sit anim incididunt cillum laborum. Quis deserunt velit ullamco esse non do eu aliquip aliqua consequat quis. Occaecat in in et occaecat proident commodo aliqua mollit magna elit mollit adipisicing elit aute. Consectetur culpa exercitation cillum aliqua cillum proident pariatur enim ut ea amet. Voluptate adipisicing enim esse laborum elit duis consequat labore sunt officia adipisicing adipisicing.\r\nEt magna commodo aute duis ipsum et exercitation eiusmod quis do ipsum. Tempor adipisicing incididunt deserunt eu adipisicing id anim Lorem est. Elit proident esse sunt tempor eiusmod dolor Lorem irure mollit. Qui sit proident duis quis magna qui. Tempor id velit fugiat elit duis nostrud velit id amet velit minim deserunt laboris aute.\r\nAliqua voluptate minim elit consectetur laborum ex proident. Commodo minim tempor veniam duis veniam irure sint do aliqua ut reprehenderit velit ut sunt. Ea nostrud irure Lorem est officia ea esse ad. Ipsum fugiat voluptate irure consequat veniam quis commodo fugiat.\r\nPariatur commodo ex anim nostrud consectetur tempor. Ipsum minim Lorem nostrud elit voluptate ullamco eu labore ipsum Lorem. Excepteur magna ea tempor deserunt eu aliquip pariatur excepteur. Minim fugiat proident quis incididunt laboris. Est nisi esse consectetur pariatur.\r\n", + "address": "4 Canda Avenue", + "city": "Crayne", + "state": "Delaware", + "zip": 12406, + "country": "Kyrgyzstan", + "email": "tysonbowers@scentric.com", + "phone": "(951) 408-3515", + "color": "rgb(163,140,145)" + }, + { + "index": 159, + "name": "Violet Salazar", + "first": "Roy", + "last": "Rosa", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/aleksitappura/73.jpg", + "boolean": true, + "guid": "dd706aa0-2c9a-4b30-8ada-4c21111ff80c", + "integer": 60, + "date": "Wed Jun 24 1998 10:59:00 GMT-0700 (PDT)", + "shortText": "cillum", + "mediumText": "Amet aute amet occaecat enim cupidatat excepteur mollit et aute fugiat. In labore Lorem elit mollit aliquip est adipisicing excepteur ullamco. Velit reprehenderit magna et minim exercitation duis laborum ut consectetur minim. Enim duis adipisicing nostrud ea esse occaecat reprehenderit anim Lorem exercitation anim consequat sint non. Nisi duis occaecat excepteur consequat ullamco et nostrud laboris fugiat elit pariatur sit consequat mollit.", + "longText": "Est veniam irure excepteur aliquip excepteur aliqua fugiat. Labore aliquip anim fugiat est mollit dolor aute incididunt duis. Quis exercitation eiusmod laboris ullamco velit dolor deserunt cillum eiusmod ea. Excepteur velit ullamco reprehenderit fugiat laborum quis velit.\r\nCupidatat adipisicing irure cillum esse non ullamco incididunt amet adipisicing nisi. Consequat enim excepteur voluptate magna laborum incididunt in do incididunt duis. Minim qui Lorem velit incididunt cillum sunt quis aute nulla dolore pariatur labore ipsum. Amet in non amet et cillum duis exercitation aliqua et. Velit et voluptate excepteur amet anim deserunt mollit eu. Lorem commodo proident labore elit mollit cillum ad et et quis. Magna sint ut proident nisi duis.\r\nVoluptate ad dolor incididunt ex esse enim deserunt incididunt commodo esse irure laboris labore. Occaecat ad deserunt do et. Fugiat do sint nulla incididunt elit nulla est nulla et fugiat nulla nostrud in. Consectetur aute et nulla excepteur tempor do ut Lorem. Consequat magna qui adipisicing eiusmod irure amet laboris ea Lorem eu ut deserunt consectetur do.\r\nConsequat sunt incididunt sit voluptate proident minim anim. Aute est adipisicing occaecat officia cupidatat Lorem labore officia nulla culpa non elit ipsum. Commodo amet amet id enim cupidatat amet. Anim minim duis deserunt veniam sit sint sint ullamco magna.\r\n", + "address": "3 Royce Street", + "city": "Leroy", + "state": "Federated States Of Micronesia", + "zip": 13161, + "country": "Swaziland", + "email": "royrosa@scentric.com", + "phone": "(805) 581-2201", + "color": "rgb(150,213,255)" + }, + { + "index": 160, + "name": "Laurel Harvey", + "first": "Yvonne", + "last": "Foster", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nicollerich/73.jpg", + "boolean": true, + "guid": "1fb04afe-2620-4b3d-bf7d-c0ae6504d91a", + "integer": 27, + "date": "Sun May 20 1973 10:47:10 GMT-0700 (PDT)", + "shortText": "sit officia", + "mediumText": "Lorem laboris sit dolore nulla est enim eu eu. Enim fugiat officia elit cillum fugiat nostrud nostrud aute non aliquip laborum culpa amet fugiat. Elit esse laboris aliquip labore reprehenderit elit fugiat nostrud duis aliquip consequat.", + "longText": "Commodo elit amet sit irure id. Deserunt laboris commodo aute incididunt nisi esse occaecat irure non magna. Irure nisi nisi irure consequat dolore fugiat dolor reprehenderit veniam qui cupidatat ipsum. Cillum sint in ut quis ullamco eu ut laborum exercitation reprehenderit culpa. Consectetur dolor duis exercitation irure et eiusmod.\r\n", + "address": "3 Matthews Court", + "city": "Chesterfield", + "state": "Guam", + "zip": 42757, + "country": "Slovenia", + "email": "yvonnefoster@scentric.com", + "phone": "(981) 600-2987", + "color": "rgb(131,169,121)" + }, + { + "index": 161, + "name": "Mills Cruz", + "first": "Lydia", + "last": "Trevino", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mrmartineau/73.jpg", + "boolean": false, + "guid": "cd0f0296-ec14-4221-a846-ca3bf425bbbc", + "integer": 86, + "date": "Sun Feb 10 2002 20:01:40 GMT-0800 (PST)", + "shortText": "est dolore pariatur", + "mediumText": "Duis non quis tempor enim non sunt mollit esse. Irure ipsum ea elit commodo aute dolore ad sint reprehenderit. Velit aute ad commodo sint nisi ipsum. Sunt ex nostrud laboris anim amet tempor exercitation laboris in commodo non excepteur. Ea duis cupidatat eu enim est veniam.", + "longText": "Amet anim eu fugiat amet. Non cillum veniam consectetur nulla proident eu minim enim irure et. Proident exercitation est laboris ullamco anim. Commodo consectetur nostrud labore irure.\r\nDolore sunt id mollit aliquip. Nulla ullamco sint eu et reprehenderit nulla nostrud officia sint. Culpa consequat qui nulla dolore aliquip ipsum aliqua occaecat. Et ea ad magna ipsum magna tempor. Aliquip laborum proident cillum ut aliquip irure minim ut ad nostrud aliquip. Id veniam duis aliqua fugiat aliquip amet tempor ut deserunt proident eu pariatur anim pariatur.\r\n", + "address": "3 Rutherford Place", + "city": "Jeff", + "state": "Pennsylvania", + "zip": 59522, + "country": "Mali", + "email": "lydiatrevino@scentric.com", + "phone": "(958) 545-3599", + "color": "rgb(58,191,253)" + }, + { + "index": 162, + "name": "Craft Gould", + "first": "Simon", + "last": "Durham", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kuldarkalvik/73.jpg", + "boolean": true, + "guid": "fddbf917-d75d-4698-8f07-cad884331664", + "integer": 58, + "date": "Sat Apr 02 1983 08:39:43 GMT-0800 (PST)", + "shortText": "excepteur", + "mediumText": "Magna tempor do quis est pariatur culpa aliqua tempor ipsum. Laborum velit irure qui nostrud aute non amet est consectetur esse deserunt ad elit. Eiusmod velit proident culpa labore anim velit ex.", + "longText": "Ad tempor excepteur id incididunt. Elit culpa dolor ullamco exercitation non minim proident ex ipsum. Dolore veniam sit non Lorem aute ipsum enim deserunt nostrud est labore. Amet minim ut magna pariatur. Velit qui ipsum irure excepteur eiusmod sint. Irure sit dolor deserunt do proident ex aliquip anim enim. Ipsum nulla sunt ex magna sunt et enim exercitation.\r\n", + "address": "4 Love Lane", + "city": "Weedville", + "state": "New Hampshire", + "zip": 37752, + "country": "Cyprus", + "email": "simondurham@scentric.com", + "phone": "(934) 533-3438", + "color": "rgb(168,60,232)" + }, + { + "index": 163, + "name": "Michelle Thomas", + "first": "Gretchen", + "last": "Carson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/erickmazer/73.jpg", + "boolean": true, + "guid": "f7385e18-ca3a-4a01-b518-4de10115efad", + "integer": 17, + "date": "Sun Mar 23 1980 04:08:07 GMT-0800 (PST)", + "shortText": "eiusmod officia ex", + "mediumText": "Officia ipsum in tempor amet fugiat sunt ex id ullamco anim pariatur. Sint eu ad consequat tempor mollit dolor est minim duis. Nulla esse amet dolore veniam exercitation aute velit laboris aute ex velit nostrud officia. Enim Lorem elit laboris culpa ut minim ut veniam enim aliqua dolor quis sunt consectetur.", + "longText": "Id esse dolor laborum magna reprehenderit ut culpa enim. Sit dolore aute culpa nisi. Nulla qui quis culpa nostrud duis sint proident mollit velit pariatur.\r\nIrure commodo consequat anim in sunt. Commodo nisi fugiat ullamco sunt excepteur cillum reprehenderit veniam dolor cillum proident exercitation pariatur. Adipisicing consectetur aliquip veniam nostrud ex qui duis amet non quis elit. Ad non consectetur pariatur occaecat occaecat tempor magna.\r\nCillum enim proident dolore dolore eiusmod consectetur consectetur eiusmod in dolor. Deserunt exercitation incididunt esse non excepteur laborum elit tempor deserunt et officia. Ut magna mollit occaecat anim irure nulla aliqua consequat minim. Officia qui mollit veniam do cillum non non. Enim fugiat nostrud fugiat velit exercitation ea. Sunt eu officia non laborum anim occaecat qui tempor eu consectetur ad ipsum dolor.\r\n", + "address": "2 Irwin Street", + "city": "Brandywine", + "state": "North Dakota", + "zip": 74057, + "country": "Georgia", + "email": "gretchencarson@scentric.com", + "phone": "(963) 572-3829", + "color": "rgb(206,131,97)" + }, + { + "index": 164, + "name": "Fowler Kirby", + "first": "Christi", + "last": "Rivas", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/guischmitt/73.jpg", + "boolean": true, + "guid": "1a236923-53b2-47df-88a0-9304e14dcc9c", + "integer": 4, + "date": "Tue Jul 06 1971 07:33:44 GMT-0700 (PDT)", + "shortText": "ut sunt incididunt ea", + "mediumText": "Enim ea excepteur nostrud id commodo do pariatur ipsum dolore excepteur incididunt. Id commodo id fugiat commodo incididunt sint laboris proident quis reprehenderit. Fugiat labore magna do in consequat cillum commodo sint laborum. Ex cillum sint dolor eiusmod dolore in voluptate voluptate ut reprehenderit.", + "longText": "Excepteur elit ad esse incididunt nulla in duis. Ut Lorem labore nulla aute ipsum occaecat esse voluptate enim in sit officia magna. Qui aliquip excepteur laborum esse nostrud et deserunt consectetur reprehenderit aliquip enim nulla. Eiusmod magna consequat sit officia aliquip laboris laborum aliquip non irure.\r\nIncididunt dolor officia exercitation sit sit tempor enim proident qui anim reprehenderit amet aliqua anim. Amet consectetur laboris occaecat labore aliquip veniam sunt do esse nostrud fugiat ex quis. Ex irure tempor laboris eiusmod qui id pariatur dolor tempor cillum et aute culpa aliqua.\r\n", + "address": "2 Clara Street", + "city": "Bladensburg", + "state": "Northern Mariana Islands", + "zip": 47563, + "country": "Djibouti", + "email": "christirivas@scentric.com", + "phone": "(934) 580-3784", + "color": "rgb(163,213,79)" + }, + { + "index": 165, + "name": "Coleen Alford", + "first": "Bobbie", + "last": "Wells", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mariosmaselli/73.jpg", + "boolean": false, + "guid": "a38427b2-d0ac-4dae-aae3-2c4504338bf7", + "integer": 72, + "date": "Fri Aug 23 1985 16:39:58 GMT-0700 (PDT)", + "shortText": "sit labore cupidatat nulla", + "mediumText": "Magna ullamco in nulla officia dolor in mollit labore proident nulla do officia dolor.", + "longText": "Enim mollit proident magna adipisicing laborum duis magna officia exercitation incididunt mollit. Id Lorem in nostrud sit ut est culpa. Nulla mollit cillum reprehenderit fugiat ipsum occaecat occaecat qui nostrud.\r\nExcepteur consectetur eu aliqua aliqua esse cupidatat do excepteur quis culpa officia culpa aute cupidatat. Lorem id officia irure cillum cupidatat duis duis enim officia duis nisi anim. Elit ipsum nulla aliqua magna dolore eiusmod veniam est laborum. Veniam laboris deserunt duis voluptate. Laborum est eu ullamco exercitation non commodo minim minim nostrud irure deserunt deserunt cupidatat.\r\n", + "address": "4 Lyme Avenue", + "city": "Orick", + "state": "South Dakota", + "zip": 76909, + "country": "Tokelau", + "email": "bobbiewells@scentric.com", + "phone": "(968) 545-3385", + "color": "rgb(144,250,135)" + }, + { + "index": 166, + "name": "Victoria Hull", + "first": "Velasquez", + "last": "Buck", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/m_ahmadyunus/73.jpg", + "boolean": false, + "guid": "f0102b51-dc32-496c-984f-1df5f9e71231", + "integer": 19, + "date": "Fri Jul 04 2003 19:23:27 GMT-0700 (PDT)", + "shortText": "occaecat reprehenderit nostrud cupidatat ullamco", + "mediumText": "Aute proident minim amet amet.", + "longText": "Dolor deserunt nulla ex occaecat. Pariatur consequat culpa ex nostrud. Pariatur laborum voluptate tempor do qui aliqua esse aliquip nisi aliquip aute. Deserunt sit ex cupidatat mollit mollit ipsum eiusmod.\r\nAliquip do ullamco pariatur elit. Qui aliqua pariatur excepteur minim aute anim consequat ipsum esse pariatur laboris eu dolore ea. Adipisicing velit cillum est deserunt ea magna laboris irure. Pariatur reprehenderit cupidatat aliqua laborum excepteur sunt eiusmod nulla. Consequat ex Lorem consequat eu laboris est cupidatat.\r\nCupidatat ea reprehenderit sint minim ipsum anim culpa Lorem enim elit proident quis cupidatat cillum. Elit est et cupidatat irure labore minim est. Dolor veniam consectetur commodo id in anim. Fugiat et qui ex aliquip magna fugiat excepteur id. Qui mollit non veniam excepteur. Lorem adipisicing anim ullamco excepteur officia proident ea.\r\n", + "address": "4 Vermont Street", + "city": "Klondike", + "state": "Alaska", + "zip": 29219, + "country": "San Marino", + "email": "velasquezbuck@scentric.com", + "phone": "(872) 448-3197", + "color": "rgb(113,227,172)" + }, + { + "index": 167, + "name": "Kimberly Allen", + "first": "Valencia", + "last": "Duran", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/anggit_pradito/73.jpg", + "boolean": true, + "guid": "8bfa6dca-8fd4-4050-b184-2e523d1bdc9e", + "integer": 59, + "date": "Thu Nov 29 2012 14:27:53 GMT-0800 (PST)", + "shortText": "non adipisicing aliqua aliquip", + "mediumText": "Dolor dolor ea sit id elit aute dolore. Commodo amet ut fugiat tempor in aliquip.", + "longText": "Sunt fugiat duis nulla laborum excepteur. Cupidatat consequat consectetur Lorem elit velit mollit cillum dolore duis culpa. Commodo elit adipisicing ut tempor proident reprehenderit. Excepteur laboris occaecat labore dolor enim in. Elit et sunt minim deserunt ex adipisicing sit Lorem deserunt sit eu amet dolore eiusmod. Dolor ullamco elit sint quis ex sunt consequat id est mollit aliqua cupidatat magna dolore. Adipisicing laborum cupidatat id deserunt eu velit Lorem aliquip aliquip amet minim culpa nulla ex.\r\nLaboris ipsum Lorem tempor labore anim fugiat quis velit. Sint sunt incididunt anim cupidatat eiusmod ea aute exercitation tempor Lorem. Nulla amet eu voluptate eu in ut veniam dolor elit ullamco. Labore elit eu id tempor esse. Incididunt cupidatat cillum do non amet ullamco cillum nulla Lorem. Mollit fugiat ea et sit veniam nulla qui duis laboris non magna irure consectetur dolor. Id eu officia mollit est dolore voluptate anim ex.\r\nIrure ipsum commodo reprehenderit labore et nulla. Sunt et nulla id commodo quis laboris ipsum irure elit ad officia. Aute Lorem anim dolore non est occaecat in esse quis duis.\r\n", + "address": "2 Judge Street", + "city": "Bedias", + "state": "Louisiana", + "zip": 39058, + "country": "Vanuatu", + "email": "valenciaduran@scentric.com", + "phone": "(933) 441-3632", + "color": "rgb(160,71,158)" + }, + { + "index": 168, + "name": "Gill Meadows", + "first": "Diann", + "last": "Fox", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/saschamt/73.jpg", + "boolean": true, + "guid": "a9cbf409-9e60-457a-a048-b16302e1615a", + "integer": 88, + "date": "Sat Oct 13 2001 11:08:26 GMT-0700 (PDT)", + "shortText": "quis ea et amet sint", + "mediumText": "Dolor reprehenderit duis nulla ea cupidatat sit cupidatat Lorem fugiat. Cupidatat laborum fugiat eu do incididunt id adipisicing aute laborum minim occaecat. Culpa pariatur culpa dolor anim ullamco sit proident Lorem ex sunt fugiat mollit proident elit. Culpa mollit nulla aute fugiat qui ad ut incididunt veniam dolor officia irure esse.", + "longText": "Occaecat do proident enim et. Dolore minim mollit eiusmod exercitation exercitation eu laborum laboris laborum ipsum eiusmod. Reprehenderit pariatur sint dolor consequat.\r\nElit consectetur enim aute sit culpa. Nostrud irure do et voluptate nostrud. Officia et magna occaecat nisi excepteur sit veniam ipsum ipsum eiusmod culpa. Id sunt excepteur culpa et. Eu sunt aute aliquip excepteur labore incididunt laborum cupidatat. Eu deserunt occaecat culpa Lorem aliquip excepteur cillum et esse est.\r\nAdipisicing non est voluptate anim proident tempor. Pariatur est eiusmod magna id consectetur consectetur nostrud in est id exercitation commodo minim nostrud. Aute esse veniam tempor sint sunt. Ut elit exercitation laborum voluptate voluptate. Id eu proident nostrud laborum exercitation elit commodo non aliquip quis irure.\r\nAnim quis eu sit qui esse deserunt ut. Officia voluptate deserunt cupidatat sint nostrud anim. Ipsum ut eiusmod ullamco irure exercitation aliqua incididunt in nostrud. Eu fugiat nulla esse deserunt et laboris consequat. Ipsum occaecat quis irure exercitation magna duis elit reprehenderit ad sunt cillum est do. Id qui ipsum dolor laboris commodo voluptate exercitation commodo. Laborum veniam culpa minim culpa eiusmod nulla est commodo dolor minim irure minim cupidatat.\r\nEx eu duis sit velit. Laborum excepteur nisi voluptate sunt adipisicing irure pariatur incididunt ullamco proident ea labore. Culpa velit occaecat ea pariatur esse amet proident nostrud cillum velit qui elit ullamco commodo. Pariatur ad qui ad in qui in est laborum enim incididunt qui. Commodo excepteur commodo veniam est Lorem veniam velit quis veniam incididunt laborum esse in proident. Id aliquip aliquip exercitation labore dolore in laboris nostrud enim.\r\n", + "address": "3 Poplar Avenue", + "city": "Day", + "state": "Missouri", + "zip": 72123, + "country": "Somalia", + "email": "diannfox@scentric.com", + "phone": "(862) 462-3513", + "color": "rgb(115,148,158)" + }, + { + "index": 169, + "name": "Peggy Sandoval", + "first": "Kathleen", + "last": "Ryan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/anasnakawa/73.jpg", + "boolean": false, + "guid": "5c6b1295-b453-4328-a4f4-e137d434c520", + "integer": 52, + "date": "Sat Feb 04 1978 00:31:29 GMT-0800 (PST)", + "shortText": "esse laborum duis fugiat dolore", + "mediumText": "Reprehenderit quis ut incididunt laborum sint non culpa tempor. Sint irure voluptate consectetur irure amet.", + "longText": "Ipsum mollit nostrud tempor amet nostrud aliqua ea eiusmod. Consequat exercitation consectetur mollit qui reprehenderit. Incididunt irure deserunt deserunt eu ullamco non proident et velit. Adipisicing ea ad dolore aliquip sint qui ut. Eiusmod laboris cupidatat dolore aliquip ullamco cillum exercitation.\r\nEsse non fugiat ex culpa. Veniam aliquip amet elit qui culpa commodo duis. Ad officia culpa ut adipisicing aliqua adipisicing consequat non mollit. Quis exercitation aute exercitation esse duis do. Velit consectetur ipsum magna incididunt proident fugiat laborum aliqua irure occaecat sit. Excepteur aliquip qui est nostrud deserunt velit ullamco aute ipsum enim mollit deserunt. Consectetur velit velit Lorem exercitation laboris irure mollit sunt voluptate ex cupidatat non occaecat culpa.\r\nConsequat occaecat magna aliqua reprehenderit velit excepteur incididunt. Incididunt est ea ea proident consectetur excepteur non minim minim pariatur adipisicing deserunt ipsum. Reprehenderit amet non quis esse reprehenderit. Enim et elit Lorem id sit in culpa eiusmod aliquip ipsum.\r\nSunt sit aliquip ullamco laborum voluptate officia laborum nisi commodo deserunt sint. Sit nostrud sit eu nisi dolor sit voluptate duis exercitation. Eiusmod mollit nulla labore ea labore et labore tempor ad magna in sunt.\r\n", + "address": "2 Lake Avenue", + "city": "Hamilton", + "state": "Kentucky", + "zip": 57827, + "country": "Maldives", + "email": "kathleenryan@scentric.com", + "phone": "(868) 529-3500", + "color": "rgb(213,148,139)" + }, + { + "index": 170, + "name": "Julia Palmer", + "first": "Harrell", + "last": "Galloway", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/just_watt/73.jpg", + "boolean": true, + "guid": "8de12a66-7b83-4add-91a8-87d6b817555b", + "integer": 3, + "date": "Sat Oct 15 1994 03:18:04 GMT-0700 (PDT)", + "shortText": "elit occaecat", + "mediumText": "Veniam sunt elit id ad amet ut. Quis in reprehenderit qui amet mollit exercitation sint esse anim. Reprehenderit anim ex sint adipisicing dolor dolore quis.", + "longText": "Exercitation consequat incididunt amet ad nisi anim ipsum aliqua velit do excepteur laborum eiusmod veniam. Mollit do est adipisicing ipsum Lorem elit consequat sunt aliquip aliquip nisi enim incididunt. Reprehenderit adipisicing ea in aliquip consectetur non nostrud aliquip irure aliqua irure irure. Ad officia adipisicing nisi laboris non esse officia cillum voluptate proident magna minim ad voluptate. Eu aute dolore sit elit proident est id in. Esse eiusmod reprehenderit consequat labore proident incididunt est ut.\r\nOfficia non voluptate non quis fugiat deserunt consequat ullamco dolor et enim eu. Ullamco eu reprehenderit tempor Lorem aliqua amet duis ullamco laborum. Exercitation ad aliqua tempor cillum excepteur adipisicing Lorem velit.\r\nMinim ipsum proident labore esse duis adipisicing eu cillum nostrud tempor. Esse commodo enim officia amet dolore esse. Incididunt tempor labore sit culpa aliqua est ut do anim.\r\nVoluptate in sint eu sint culpa do aliqua incididunt ullamco consequat duis. Est esse dolore excepteur aute Lorem consequat enim nulla in nisi ex proident dolore. Ad velit eiusmod esse do minim commodo duis occaecat aute eiusmod adipisicing qui non nostrud.\r\nDolor do sit culpa amet irure occaecat nisi aliquip est ad. Dolor ullamco officia anim amet occaecat elit minim. Anim exercitation elit ipsum magna sit ut sunt aliqua. Do quis occaecat culpa mollit aute qui. Irure officia dolor cillum veniam esse. Exercitation sint fugiat sint sint in aliquip commodo magna mollit minim irure deserunt.\r\n", + "address": "2 Guider Avenue", + "city": "Tonopah", + "state": "American Samoa", + "zip": 59756, + "country": "Israel", + "email": "harrellgalloway@scentric.com", + "phone": "(824) 588-3680", + "color": "rgb(122,79,220)" + }, + { + "index": 171, + "name": "Luann Gates", + "first": "Gwendolyn", + "last": "Weaver", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/caiifr/73.jpg", + "boolean": false, + "guid": "f87dd269-a351-4ca6-864e-d1262763c0ed", + "integer": 35, + "date": "Wed Feb 26 1992 22:47:04 GMT-0800 (PST)", + "shortText": "nulla esse do consequat", + "mediumText": "Veniam cupidatat ut tempor amet. Cillum amet irure aliquip non.", + "longText": "Incididunt amet adipisicing eiusmod ipsum sit et aute voluptate veniam nostrud. Ea ex ullamco sint minim. Proident minim quis aute nulla minim nisi sunt. Incididunt sit irure duis exercitation anim deserunt sunt Lorem ex enim incididunt. Non et sint amet minim culpa fugiat ut esse. Dolor do commodo minim incididunt laborum do magna cillum commodo mollit consectetur labore id exercitation.\r\nNon fugiat Lorem enim cillum duis voluptate. Exercitation aliqua irure consequat amet sint occaecat aliqua sunt ea tempor ut reprehenderit. Occaecat pariatur duis adipisicing consequat. Amet sunt qui veniam mollit officia ea magna.\r\nEnim esse amet cillum mollit fugiat laborum Lorem. Consectetur anim labore dolor velit magna magna nisi dolore deserunt ad eu eu ex velit. Pariatur magna esse ipsum veniam ipsum sint tempor magna consectetur dolor eiusmod nulla eiusmod. Eiusmod veniam et ex incididunt ea sunt quis dolor ex. Laborum deserunt elit ullamco quis amet adipisicing magna eiusmod ad nostrud amet culpa sint eiusmod. Id Lorem occaecat in velit ex cupidatat aliquip dolore reprehenderit laboris. Consequat nostrud magna non occaecat ut laboris aliqua amet anim.\r\nNisi veniam id anim minim elit elit veniam. Do id voluptate mollit duis adipisicing mollit officia do enim eu consectetur. Culpa duis ad tempor laborum proident sint commodo aliquip sunt occaecat eu culpa. Eu ullamco exercitation excepteur aute voluptate mollit ex.\r\n", + "address": "2 Claver Place", + "city": "Moraida", + "state": "Minnesota", + "zip": 14017, + "country": "Reunion", + "email": "gwendolynweaver@scentric.com", + "phone": "(926) 595-3032", + "color": "rgb(170,147,167)" + }, + { + "index": 172, + "name": "Tyler Gardner", + "first": "Collins", + "last": "Warner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/briandiazme/73.jpg", + "boolean": false, + "guid": "e9934a5e-c84e-4920-979e-2c6496359125", + "integer": 41, + "date": "Sat Jun 23 1990 16:08:31 GMT-0700 (PDT)", + "shortText": "esse velit commodo", + "mediumText": "Est consequat velit elit exercitation irure laboris commodo do cillum proident commodo. Laborum fugiat aute Lorem reprehenderit exercitation.", + "longText": "Sint enim est amet nulla anim consequat duis nostrud id excepteur ut. Dolor cillum sit do duis nostrud laborum. Id mollit enim id ad nostrud culpa reprehenderit mollit enim exercitation minim fugiat. Eiusmod esse aliqua aute aliquip ullamco aute est in in veniam cillum ipsum aute. Laboris tempor mollit non veniam officia velit ea. Laboris cillum fugiat id consectetur labore proident est. Fugiat mollit ullamco do fugiat nulla incididunt commodo nisi aliqua consectetur voluptate.\r\nIncididunt velit quis mollit laborum esse occaecat id. Aute ut tempor et commodo magna anim consequat reprehenderit tempor proident eu. Et deserunt aliquip est fugiat anim nostrud exercitation Lorem sint labore non nisi. Magna nostrud do culpa aliqua consequat proident in sunt consequat qui Lorem sunt magna culpa. Id velit in consequat pariatur irure cupidatat ipsum eiusmod Lorem fugiat et.\r\nEiusmod proident amet cupidatat ea et. Veniam minim consectetur dolor officia aliquip exercitation culpa. Sunt et tempor magna laboris sunt aliquip excepteur ea nostrud aliqua. Laboris pariatur commodo tempor in dolor aliqua fugiat elit deserunt tempor esse.\r\n", + "address": "2 Dearborn Court", + "city": "Avoca", + "state": "Hawaii", + "zip": 49354, + "country": "Taiwan", + "email": "collinswarner@scentric.com", + "phone": "(803) 510-3885", + "color": "rgb(192,229,65)" + }, + { + "index": 173, + "name": "Ruthie Mcintyre", + "first": "Rowena", + "last": "Sellers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/productpeopletv/73.jpg", + "boolean": true, + "guid": "e7f9037c-1145-4e46-a079-2b461a550ad8", + "integer": 21, + "date": "Mon Aug 25 2014 19:53:08 GMT-0700 (PDT)", + "shortText": "occaecat velit", + "mediumText": "Lorem ut adipisicing deserunt quis fugiat aute.", + "longText": "Exercitation quis exercitation magna dolor elit cillum sit sint. Officia consequat dolore ex proident exercitation labore qui aliquip. Exercitation adipisicing sit culpa ullamco laborum.\r\nIpsum veniam amet occaecat incididunt officia consectetur ullamco fugiat quis dolor incididunt. Ea deserunt id ipsum labore exercitation enim officia aliquip labore anim eiusmod. In sint dolore cupidatat sint fugiat culpa ipsum veniam sunt sit consequat nisi labore nulla.\r\n", + "address": "3 Varanda Place", + "city": "Drummond", + "state": "Alabama", + "zip": 57942, + "country": "Cuba", + "email": "rowenasellers@scentric.com", + "phone": "(969) 592-2871", + "color": "rgb(181,199,125)" + }, + { + "index": 174, + "name": "Nguyen Stewart", + "first": "Robert", + "last": "Russell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/darioalbini/73.jpg", + "boolean": false, + "guid": "28ef7fb5-18c4-4dd2-927c-3ddc4d9199c4", + "integer": 75, + "date": "Wed Sep 06 1972 12:28:29 GMT-0700 (PDT)", + "shortText": "in minim qui veniam nulla", + "mediumText": "Esse laboris aliquip ex est deserunt ut minim Lorem Lorem non proident minim. Est et ad Lorem laborum laboris nostrud tempor eu magna. Incididunt sint mollit ullamco sint sunt fugiat voluptate ut nostrud.", + "longText": "Irure est cillum duis pariatur et ut. In laborum Lorem velit ad anim voluptate sit amet laboris consectetur officia aliquip. Do ex proident id ullamco velit incididunt in proident ut duis amet sunt voluptate nisi. Et nostrud eiusmod laboris ipsum ad. Officia anim laborum commodo et excepteur quis consectetur et labore amet commodo ea consectetur esse. Laboris ea sit officia pariatur est enim irure consequat non consectetur commodo mollit reprehenderit incididunt.\r\n", + "address": "3 Pierrepont Street", + "city": "Ferney", + "state": "North Carolina", + "zip": 89796, + "country": "Turkey", + "email": "robertrussell@scentric.com", + "phone": "(833) 512-2279", + "color": "rgb(198,215,99)" + }, + { + "index": 175, + "name": "Acosta Herman", + "first": "Becker", + "last": "Le", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_pandajs/73.jpg", + "boolean": false, + "guid": "fc0ce1b2-66dd-4e0a-8a4d-192b563ab3af", + "integer": 17, + "date": "Mon Jul 25 2011 16:50:08 GMT-0700 (PDT)", + "shortText": "veniam officia ipsum ad do", + "mediumText": "Mollit do laborum aliquip elit occaecat qui do. Ullamco mollit velit pariatur amet exercitation.", + "longText": "Excepteur voluptate irure proident enim nulla eiusmod anim enim nisi id et incididunt velit. Id anim excepteur excepteur aliquip elit ex. Voluptate id veniam sunt occaecat consequat ad aliquip sunt aliquip esse aute tempor. Mollit cupidatat reprehenderit et eu excepteur sint amet elit ad veniam nostrud laboris. Voluptate sint amet anim cupidatat velit ut incididunt ex laborum ea. Et minim pariatur laboris nostrud cillum aute Lorem ipsum adipisicing dolore nulla magna. Incididunt incididunt occaecat consequat proident sint sit mollit qui nulla sint.\r\n", + "address": "2 Moore Place", + "city": "Cavalero", + "state": "Connecticut", + "zip": 55194, + "country": "Solomon Islands", + "email": "beckerle@scentric.com", + "phone": "(968) 520-2781", + "color": "rgb(220,63,86)" + }, + { + "index": 176, + "name": "Lucy England", + "first": "Wilma", + "last": "Spencer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/wellnext/73.jpg", + "boolean": false, + "guid": "912d4bf7-1356-4736-9560-45d3c9f56f54", + "integer": 99, + "date": "Fri Jun 24 1977 07:55:22 GMT-0700 (PDT)", + "shortText": "qui exercitation reprehenderit", + "mediumText": "Ipsum voluptate ex cupidatat sunt sit fugiat amet quis irure ex. Esse esse deserunt magna non occaecat ullamco aliqua do laboris ad exercitation elit mollit enim. Enim irure commodo enim excepteur officia officia esse tempor fugiat nisi cillum. Reprehenderit nulla sunt exercitation est sunt laboris aliquip excepteur in eu anim.", + "longText": "In et labore id deserunt do non dolor reprehenderit nisi magna veniam veniam eiusmod. Deserunt Lorem non adipisicing non pariatur. Est cillum sint proident sint proident eu aliqua commodo. Pariatur qui laboris eiusmod amet mollit ullamco amet. Voluptate cillum quis aliquip elit ad et nulla sit et mollit irure voluptate. Et in ullamco in adipisicing deserunt. Tempor consectetur exercitation mollit incididunt et sunt minim.\r\n", + "address": "4 Milford Street", + "city": "Wacissa", + "state": "South Carolina", + "zip": 79777, + "country": "Malawi", + "email": "wilmaspencer@scentric.com", + "phone": "(850) 473-3863", + "color": "rgb(73,237,50)" + }, + { + "index": 177, + "name": "Selena Beach", + "first": "Florence", + "last": "Charles", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/skylark64/73.jpg", + "boolean": false, + "guid": "ed115112-8db3-4cae-a08d-983100a10c85", + "integer": 88, + "date": "Wed Jun 19 1996 04:58:57 GMT-0700 (PDT)", + "shortText": "quis nulla", + "mediumText": "Duis dolor id et elit nostrud eiusmod labore eiusmod incididunt eu ex enim magna exercitation. Velit do elit pariatur proident.", + "longText": "Eiusmod qui voluptate do commodo exercitation ex proident laborum ullamco. Laboris ad officia dolore duis minim. In proident ullamco et duis qui ullamco exercitation. Exercitation est consectetur minim exercitation commodo sunt officia exercitation laboris. Laborum elit in incididunt quis et pariatur adipisicing.\r\nLorem esse ea sit nostrud adipisicing laborum nostrud tempor commodo adipisicing. Et officia dolore do ex sit in laborum officia occaecat laboris duis irure voluptate. Labore mollit reprehenderit ullamco ut velit voluptate. Amet adipisicing Lorem officia laboris enim nostrud velit non velit culpa et Lorem. Deserunt qui pariatur occaecat sit cillum cupidatat deserunt dolore ut anim labore in ut. Minim velit do dolor deserunt duis. Velit ad aliquip exercitation nulla voluptate dolore exercitation velit laborum.\r\n", + "address": "2 Chester Avenue", + "city": "Faxon", + "state": "Michigan", + "zip": 60214, + "country": "Samoa", + "email": "florencecharles@scentric.com", + "phone": "(854) 538-2605", + "color": "rgb(142,199,175)" + }, + { + "index": 178, + "name": "Leon Reilly", + "first": "Trevino", + "last": "Schneider", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lisekyle/73.jpg", + "boolean": false, + "guid": "f0c018ba-4648-46ab-bd0f-3d92f2370954", + "integer": 92, + "date": "Fri May 13 1983 05:44:49 GMT-0700 (PDT)", + "shortText": "sunt", + "mediumText": "Mollit velit id proident ex pariatur ea.", + "longText": "Enim ex tempor ad esse cupidatat officia aute. Ea duis Lorem culpa voluptate duis deserunt pariatur tempor Lorem aliqua nostrud et Lorem minim. Et consequat adipisicing esse labore. Sunt consequat cupidatat proident magna dolore. Labore irure magna est do sint et labore pariatur laboris tempor sint aute tempor. Quis nulla non qui eiusmod Lorem nulla.\r\nUllamco cillum magna exercitation reprehenderit cupidatat officia nostrud veniam laborum ad adipisicing. Sint laborum sit enim nostrud sint proident consectetur. Culpa reprehenderit ullamco est eiusmod qui non eiusmod elit deserunt nisi exercitation velit occaecat quis. Commodo est qui velit irure eiusmod officia.\r\nDolor Lorem officia qui sint duis nostrud esse qui magna qui. Duis ullamco irure labore ut mollit. Deserunt in laboris proident culpa sit eu.\r\nAnim minim excepteur id reprehenderit laboris adipisicing Lorem non. Aliqua anim anim cillum aliqua excepteur elit ut. Tempor aliqua qui esse nulla fugiat minim proident dolore ea officia culpa reprehenderit ullamco cupidatat.\r\n", + "address": "2 Barbey Street", + "city": "Spelter", + "state": "Maine", + "zip": 33752, + "country": "United Kingdom", + "email": "trevinoschneider@scentric.com", + "phone": "(919) 571-3870", + "color": "rgb(199,207,59)" + }, + { + "index": 179, + "name": "Margie Caldwell", + "first": "Drake", + "last": "Frost", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/zumwalt/73.jpg", + "boolean": false, + "guid": "1c2ba2bb-24b8-4fa7-8755-0fd72201985e", + "integer": 26, + "date": "Thu Oct 27 1977 23:39:23 GMT-0700 (PDT)", + "shortText": "aliqua labore id excepteur", + "mediumText": "Sit in irure voluptate ex sint cillum sint duis cillum.", + "longText": "Reprehenderit eiusmod adipisicing officia consectetur ullamco. Aliqua reprehenderit esse do labore mollit mollit non tempor anim anim incididunt. Id reprehenderit amet laborum do.\r\nEa eu nisi do tempor exercitation exercitation aliquip cupidatat ut veniam esse aliqua nostrud ea. Laboris in laborum nostrud proident duis elit fugiat in labore. Cupidatat exercitation culpa elit sit do fugiat. Id eiusmod est ut deserunt tempor quis. Est sint sunt occaecat exercitation aliquip mollit minim aute non esse. Ex officia Lorem qui eu adipisicing occaecat do. Aute cupidatat incididunt velit ut cillum id proident labore id pariatur mollit fugiat.\r\nIncididunt deserunt cillum officia eiusmod enim elit laboris. Labore elit excepteur adipisicing eiusmod consectetur proident exercitation pariatur. Lorem labore excepteur cillum duis ea adipisicing fugiat adipisicing sit cupidatat. Culpa proident proident aute nostrud ad occaecat velit in. Labore non ad cillum adipisicing quis sit. Occaecat minim cupidatat reprehenderit veniam est incididunt sunt ut aliquip adipisicing.\r\nQui sunt exercitation aute sint pariatur. Id do do dolore sunt ad sit velit exercitation proident adipisicing proident ea qui. In quis excepteur incididunt in. Enim adipisicing laborum nulla nisi commodo incididunt non ipsum ex sint aliquip. Elit labore ex ullamco veniam id.\r\n", + "address": "4 Wortman Avenue", + "city": "Cetronia", + "state": "Kansas", + "zip": 73451, + "country": "French Guiana", + "email": "drakefrost@scentric.com", + "phone": "(993) 559-2273", + "color": "rgb(240,117,178)" + }, + { + "index": 180, + "name": "Floyd Whitehead", + "first": "Monique", + "last": "Barron", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/the_winslet/73.jpg", + "boolean": true, + "guid": "5505bea5-acce-4d67-b22e-850228beae52", + "integer": 30, + "date": "Wed Jul 15 2009 01:03:18 GMT-0700 (PDT)", + "shortText": "id eu", + "mediumText": "Quis et sit amet reprehenderit esse ex velit. Id Lorem ea irure consectetur deserunt excepteur. Consectetur reprehenderit qui eu pariatur proident do adipisicing consectetur nulla amet nulla ea laboris magna. Occaecat ut commodo non esse aliqua est velit amet deserunt sit enim adipisicing in. Mollit aliquip nostrud nisi esse.", + "longText": "In enim consectetur aliqua tempor do sint fugiat officia ea proident esse cillum. Lorem magna ipsum amet aute deserunt. Pariatur aliqua dolor veniam in. Consequat dolore et cillum ea mollit esse dolor. Ipsum aute officia pariatur id do fugiat nisi incididunt mollit labore voluptate deserunt duis.\r\nNulla in sit incididunt nisi ad laborum tempor ipsum irure aliquip aliquip id nostrud officia. Pariatur fugiat consequat excepteur aliqua enim. Sunt minim dolore elit esse nostrud. Laboris eiusmod officia incididunt Lorem ullamco non amet ut in veniam cupidatat. Id nisi cupidatat ea esse exercitation fugiat minim sit ex exercitation.\r\nExercitation non reprehenderit ipsum aliqua quis. Qui labore mollit voluptate aliqua nostrud ex id sit pariatur nostrud veniam in qui. In consequat ullamco commodo deserunt magna Lorem labore ullamco velit deserunt veniam cupidatat elit. Dolor fugiat ea in magna dolor occaecat aliquip cillum id. Ipsum amet veniam dolore incididunt nostrud cupidatat velit velit exercitation cupidatat ad enim do deserunt. Mollit officia sit anim elit. Veniam ipsum nulla culpa occaecat non mollit.\r\nAute ex quis est et laborum dolore duis velit. Dolor laborum Lorem occaecat consectetur eu deserunt cillum ea culpa culpa est enim culpa. Ut veniam do anim consectetur sit id. Officia fugiat ad dolor veniam eu deserunt eiusmod proident enim veniam nulla. Exercitation proident aute esse fugiat veniam cupidatat. Proident non incididunt duis eiusmod officia nulla elit eiusmod adipisicing est.\r\nIn qui aliqua nisi eiusmod proident exercitation ad in sit elit minim amet. Culpa est Lorem Lorem irure exercitation et dolore. Qui sit dolor velit do laborum voluptate excepteur qui nostrud.\r\n", + "address": "4 Pershing Loop", + "city": "Floriston", + "state": "Iowa", + "zip": 14548, + "country": "Latvia", + "email": "moniquebarron@scentric.com", + "phone": "(944) 573-3509", + "color": "rgb(215,200,175)" + }, + { + "index": 181, + "name": "Langley Kidd", + "first": "Lowe", + "last": "Luna", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kikillo/73.jpg", + "boolean": false, + "guid": "5934f42f-1f3e-41a3-8465-8453fbd97653", + "integer": 87, + "date": "Sat Jul 27 2002 15:35:16 GMT-0700 (PDT)", + "shortText": "ex laborum", + "mediumText": "Proident excepteur duis dolor nostrud aute in aliquip excepteur exercitation laboris fugiat consectetur amet.", + "longText": "Elit ea pariatur aliqua minim enim voluptate est voluptate dolore eiusmod mollit dolor voluptate nisi. Qui et ex fugiat irure velit voluptate. Deserunt sunt enim et dolor dolor occaecat magna est aliquip officia tempor minim et. Ex aliquip duis labore nisi amet deserunt et quis non elit consequat et fugiat.\r\nAd est irure veniam aliqua sint ad. Cillum quis ex tempor ex irure proident duis id pariatur ipsum irure. Id ea ad excepteur enim voluptate consectetur id. Non cupidatat do in tempor aute commodo in magna. Non irure minim Lorem sunt ex nulla cillum.\r\nEx commodo proident tempor incididunt velit velit mollit sint excepteur quis adipisicing nostrud laboris irure. Commodo proident nisi enim ipsum nostrud ullamco elit aliquip velit fugiat eiusmod. Ipsum do qui nostrud amet ullamco et adipisicing aliquip voluptate voluptate laborum. Laborum ex aute tempor esse velit ut.\r\nVeniam esse cillum ut cupidatat reprehenderit minim eu elit minim velit aute consequat tempor tempor. Nisi et aute ea elit veniam sit dolore proident minim. Ut tempor aute dolor aliquip. Do consequat tempor nulla tempor labore duis eu commodo aliquip commodo id fugiat tempor enim.\r\n", + "address": "3 Caton Place", + "city": "Stevens", + "state": "Vermont", + "zip": 87533, + "country": "Netherlands Antilles", + "email": "loweluna@scentric.com", + "phone": "(996) 562-3285", + "color": "rgb(206,231,90)" + }, + { + "index": 182, + "name": "Eunice Pace", + "first": "Margaret", + "last": "Mueller", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hndragnwn/73.jpg", + "boolean": true, + "guid": "3f9b897f-6674-476f-9dd8-31c86f3401c7", + "integer": 98, + "date": "Mon Jan 19 1970 12:04:31 GMT-0800 (PST)", + "shortText": "exercitation eu ipsum ipsum cillum", + "mediumText": "Ullamco ullamco velit sit et elit et excepteur laboris reprehenderit.", + "longText": "Officia cupidatat consectetur tempor amet. Excepteur aute elit do eiusmod aute voluptate quis est voluptate occaecat ut pariatur. Aliqua incididunt cillum proident aute quis deserunt. Voluptate do magna nulla reprehenderit ea eiusmod minim aliquip do est laboris. Velit consequat ut veniam ut cillum dolore tempor nostrud eu. Non Lorem Lorem non nostrud minim commodo minim qui non. Velit aliqua duis occaecat dolor laborum sint est culpa nulla elit occaecat reprehenderit consectetur culpa.\r\nSunt non id labore Lorem do Lorem enim. Adipisicing deserunt excepteur est ipsum nulla deserunt in. Proident tempor dolore sint ullamco proident velit. Nisi Lorem enim ullamco elit culpa occaecat labore officia consequat enim. Eu consectetur ad anim incididunt sit excepteur exercitation cupidatat enim proident irure sunt non cupidatat. Id aute cupidatat irure pariatur laboris nostrud. Est enim commodo quis anim incididunt nostrud proident occaecat anim.\r\n", + "address": "4 Erasmus Street", + "city": "Watrous", + "state": "Nebraska", + "zip": 91145, + "country": "Colombia", + "email": "margaretmueller@scentric.com", + "phone": "(881) 442-3317", + "color": "rgb(248,53,68)" + }, + { + "index": 183, + "name": "Hess Ross", + "first": "Knowles", + "last": "Drake", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/fc987/73.jpg", + "boolean": false, + "guid": "b34d191e-f646-4fd0-8e89-ed523ceb5127", + "integer": 73, + "date": "Tue Jul 11 2006 08:13:58 GMT-0700 (PDT)", + "shortText": "quis reprehenderit amet", + "mediumText": "Id ut laboris aliquip dolor aliqua incididunt cillum dolore qui aliqua. Tempor officia esse aliquip irure cillum ipsum esse ea ea. Aliqua pariatur laboris cillum do ad ea pariatur nostrud amet amet do.", + "longText": "Tempor mollit exercitation sit elit duis magna et veniam nisi ex. Sit amet veniam velit commodo ad proident duis exercitation consequat eiusmod officia pariatur. Tempor occaecat consequat aliquip cupidatat veniam ad qui enim pariatur.\r\nIpsum dolor occaecat in minim sint eu. Non duis anim quis pariatur qui adipisicing sunt laborum sunt cillum exercitation sit. Reprehenderit amet elit labore ad culpa excepteur. Cillum commodo eu dolore dolor ea velit id. Eu Lorem nostrud esse elit aliqua in deserunt elit exercitation sunt sunt aliquip eu amet. Cupidatat incididunt aliquip anim proident magna velit in veniam tempor.\r\nEx non ex irure exercitation sint ad commodo commodo. Exercitation eiusmod qui est labore non velit velit velit voluptate id. Nisi est velit ut do velit quis ipsum voluptate. In consequat esse tempor cillum fugiat ex. Ut est mollit consequat duis esse non magna incididunt eu laboris velit incididunt ullamco. Adipisicing enim sint amet velit do irure. Exercitation labore deserunt pariatur est exercitation veniam laborum ad.\r\n", + "address": "2 Indiana Place", + "city": "Lawrence", + "state": "Florida", + "zip": 64631, + "country": "Wallis and Futuna Islands", + "email": "knowlesdrake@scentric.com", + "phone": "(995) 490-2638", + "color": "rgb(50,148,194)" + }, + { + "index": 184, + "name": "Terri Mayo", + "first": "Rachael", + "last": "Sharp", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lettershoppe/73.jpg", + "boolean": false, + "guid": "c14b363a-8dae-4656-908d-6fe410ad32e5", + "integer": 98, + "date": "Sat Mar 10 1973 06:27:24 GMT-0800 (PST)", + "shortText": "occaecat consequat minim enim aute", + "mediumText": "Officia ex pariatur velit sint officia sunt deserunt nisi. Exercitation sit commodo sit quis dolor esse pariatur.", + "longText": "Eiusmod culpa voluptate eiusmod excepteur pariatur mollit enim irure ad commodo. Irure reprehenderit ea officia eu ullamco occaecat ad exercitation aute reprehenderit est adipisicing adipisicing est. Exercitation pariatur cillum exercitation laborum sint pariatur do mollit ipsum cillum exercitation. Non duis aliquip veniam occaecat fugiat cupidatat Lorem eu.\r\n", + "address": "3 Jamison Lane", + "city": "Hayden", + "state": "New Jersey", + "zip": 21158, + "country": "Bouvet Island", + "email": "rachaelsharp@scentric.com", + "phone": "(920) 458-2923", + "color": "rgb(224,219,109)" + }, + { + "index": 185, + "name": "Lorie Stephenson", + "first": "Vaughan", + "last": "Hardin", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/akashsharma39/73.jpg", + "boolean": true, + "guid": "3277febc-0447-4b3c-ac7a-f98c0a22432d", + "integer": 43, + "date": "Sat Mar 30 1974 11:23:57 GMT-0700 (PDT)", + "shortText": "qui pariatur voluptate eiusmod elit", + "mediumText": "Tempor mollit fugiat ex quis excepteur.", + "longText": "Elit eiusmod eu irure nostrud labore enim. Incididunt esse aliquip amet in nulla mollit amet nostrud est mollit. Eiusmod cupidatat et esse ea quis sunt ex. Ut duis fugiat laboris eiusmod excepteur. Occaecat do incididunt mollit officia. Enim ea sunt ad amet labore enim esse nulla occaecat eiusmod.\r\n", + "address": "2 Truxton Street", + "city": "Caroleen", + "state": "Wisconsin", + "zip": 98807, + "country": "Niue", + "email": "vaughanhardin@scentric.com", + "phone": "(954) 576-2820", + "color": "rgb(76,217,135)" + }, + { + "index": 186, + "name": "Jacqueline Estes", + "first": "Gale", + "last": "Hutchinson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/fgin69/73.jpg", + "boolean": false, + "guid": "07994b68-513f-4c9d-a92d-edfc3ade4825", + "integer": 17, + "date": "Sun Jul 16 2000 16:12:37 GMT-0700 (PDT)", + "shortText": "sunt laboris tempor ut do", + "mediumText": "Nulla consequat dolore enim velit excepteur. Qui ipsum elit occaecat ea in. Laborum irure ipsum consectetur ullamco quis consectetur enim. Dolore laboris nisi excepteur nostrud. Aliqua ipsum nostrud velit labore tempor nisi eu.", + "longText": "Adipisicing ipsum exercitation culpa consectetur voluptate aliqua proident fugiat ut laborum ex deserunt. Et ullamco non sint tempor do officia cillum ex quis enim dolor aliqua. Cupidatat id incididunt irure ad quis commodo ut laborum labore. Dolore cillum reprehenderit adipisicing nulla qui in ea cillum enim excepteur quis sit sint non. Duis reprehenderit consequat eu eiusmod id.\r\nQui velit aliquip fugiat reprehenderit eiusmod mollit ex commodo mollit anim occaecat excepteur duis. Eiusmod nisi et in ex laborum. Nulla officia nulla nostrud ullamco proident ut ipsum excepteur. Occaecat et quis est eu aliqua. Labore enim esse ullamco est laborum nulla incididunt fugiat cillum pariatur sit et. Sunt irure duis laborum id ea Lorem sint.\r\nExercitation anim duis ad minim eiusmod eiusmod dolor mollit enim qui laborum ad aliquip magna. Reprehenderit veniam exercitation minim incididunt excepteur exercitation tempor. Pariatur do esse consequat do. Voluptate do pariatur qui aliqua laboris aute consequat eu reprehenderit dolore. Laborum amet in veniam sit. Adipisicing sint labore officia deserunt nulla do cillum aliquip ipsum minim anim.\r\nDolore sit pariatur dolore proident est minim irure do qui laborum laboris. Sunt quis nisi consequat tempor est ullamco amet sunt dolor. Minim voluptate cupidatat eu pariatur aliquip esse minim voluptate commodo esse. Nulla non minim eu sunt nostrud aliquip. Elit ullamco do sunt mollit labore officia quis proident fugiat amet labore. Culpa elit nisi incididunt ipsum anim non. Cupidatat exercitation laboris pariatur reprehenderit culpa.\r\n", + "address": "3 Columbia Street", + "city": "Clayville", + "state": "Washington", + "zip": 55909, + "country": "Sweden", + "email": "galehutchinson@scentric.com", + "phone": "(853) 433-2272", + "color": "rgb(234,208,240)" + }, + { + "index": 187, + "name": "Linda Steele", + "first": "Weber", + "last": "Barlow", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pdugan19/73.jpg", + "boolean": false, + "guid": "39847382-b9bd-4f9d-823a-9a8ff0b6a952", + "integer": 57, + "date": "Sun May 24 1992 04:47:58 GMT-0700 (PDT)", + "shortText": "aliqua ut", + "mediumText": "Ea excepteur consequat Lorem aute. Id nisi est ad ipsum enim. Consequat elit do mollit cillum. Ea voluptate tempor laborum sit. Culpa ex officia mollit et in ullamco.", + "longText": "Culpa deserunt velit enim amet excepteur. Labore anim laboris aliquip nisi amet ad. Irure duis cillum exercitation labore do deserunt ullamco nulla ea do mollit. Et ut dolor cillum laboris ex dolor.\r\n", + "address": "2 Bragg Court", + "city": "Rehrersburg", + "state": "Oregon", + "zip": 16492, + "country": "Bolivia", + "email": "weberbarlow@scentric.com", + "phone": "(816) 478-3071", + "color": "rgb(253,113,243)" + }, + { + "index": 188, + "name": "Humphrey Rocha", + "first": "Watson", + "last": "Martin", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bluehaus/73.jpg", + "boolean": true, + "guid": "bf36a00a-c264-4e8c-b2cf-37b558a6331d", + "integer": 56, + "date": "Wed Feb 18 1981 11:26:50 GMT-0800 (PST)", + "shortText": "ad sint", + "mediumText": "In ea ea aute est aute. Ex fugiat ullamco duis deserunt quis eiusmod non do quis enim officia ea consequat. Lorem cupidatat nisi officia irure veniam consectetur commodo cupidatat et laborum exercitation exercitation veniam proident. Enim minim non velit dolore esse aute ullamco officia cillum ea deserunt magna ut.", + "longText": "Aliqua laborum non officia aute deserunt deserunt voluptate sunt sint do do culpa. Adipisicing anim qui id elit consectetur ad veniam nostrud magna. Culpa dolor culpa irure minim elit occaecat eiusmod.\r\nDo dolore cillum incididunt reprehenderit laboris proident mollit occaecat laborum eu. Tempor aute aliqua aute Lorem velit sunt sint ad ad. Eu minim adipisicing duis nulla nulla et excepteur occaecat. Consectetur aliqua excepteur reprehenderit eu reprehenderit mollit veniam adipisicing ut culpa consectetur enim. Nisi consequat sit fugiat anim ut anim. Culpa et occaecat consectetur reprehenderit. Id sunt mollit labore ipsum eiusmod est adipisicing dolor esse.\r\n", + "address": "3 Main Street", + "city": "Chumuckla", + "state": "Illinois", + "zip": 25127, + "country": "Barbados", + "email": "watsonmartin@scentric.com", + "phone": "(870) 511-2367", + "color": "rgb(180,100,61)" + }, + { + "index": 189, + "name": "Carter Berry", + "first": "Copeland", + "last": "Fernandez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/angeloffonline/73.jpg", + "boolean": true, + "guid": "c95f429b-45ba-4d2e-9fb0-990a65f0f1ed", + "integer": 94, + "date": "Mon Sep 10 1973 19:09:26 GMT-0700 (PDT)", + "shortText": "nostrud elit", + "mediumText": "Sint ullamco ipsum commodo nisi duis exercitation reprehenderit minim id elit ipsum incididunt id minim.", + "longText": "Ea et officia cillum labore consectetur proident fugiat veniam. Adipisicing proident quis nulla duis consectetur culpa deserunt. Aliquip ea non incididunt nisi. Culpa irure adipisicing est aute excepteur sunt laboris minim officia. Minim dolor incididunt deserunt aliqua qui velit laborum. Sint eu sunt ut ea ut cillum tempor excepteur sit voluptate.\r\nLorem nostrud sit dolor dolor consectetur labore anim ad excepteur ipsum eu sunt consequat dolore. Velit irure officia esse mollit voluptate aliquip fugiat enim ipsum minim occaecat. Consectetur tempor irure sint quis irure anim. Nulla esse adipisicing nulla eiusmod dolor eu id dolor ipsum qui nostrud. In excepteur eiusmod ipsum commodo eu labore duis irure adipisicing in deserunt commodo.\r\nExcepteur ullamco ex est occaecat sit Lorem eu. Amet pariatur dolor reprehenderit irure dolor et culpa. Laboris cupidatat est esse veniam qui consectetur eu eu irure. Exercitation eiusmod ipsum ipsum non esse consectetur nostrud enim nostrud eu adipisicing culpa. Lorem aliquip duis tempor proident do aliqua cillum. Esse aliquip fugiat veniam aliquip magna pariatur.\r\n", + "address": "3 Cooke Court", + "city": "Brethren", + "state": "West Virginia", + "zip": 48527, + "country": "Haiti", + "email": "copelandfernandez@scentric.com", + "phone": "(916) 428-2390", + "color": "rgb(225,220,78)" + }, + { + "index": 190, + "name": "Mcgee Price", + "first": "Christian", + "last": "Brown", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/yalozhkin/73.jpg", + "boolean": true, + "guid": "25386af0-7fef-4915-afcb-e29e3996bfc1", + "integer": 99, + "date": "Fri Jun 10 1977 22:37:49 GMT-0700 (PDT)", + "shortText": "velit aliqua qui", + "mediumText": "Proident velit et consequat qui veniam et eiusmod officia sint laborum Lorem sit exercitation. Voluptate dolore qui excepteur eu tempor et irure ea id consectetur. Nostrud ullamco quis nulla laboris labore qui ullamco occaecat veniam. Ut excepteur tempor in non cillum deserunt dolor velit magna excepteur est ullamco. Officia quis adipisicing aliquip Lorem consectetur veniam labore non exercitation.", + "longText": "Anim officia fugiat aliquip deserunt enim culpa commodo. Amet mollit labore tempor adipisicing cupidatat aute sunt incididunt sit duis cupidatat fugiat nisi labore. Eiusmod non sunt commodo laborum ex cillum anim eu mollit. Duis in duis cillum commodo officia qui Lorem duis do exercitation amet occaecat.\r\nNisi culpa magna dolore ut tempor amet commodo. Nisi ut mollit et sint id aliquip Lorem quis ipsum non sunt. Ad adipisicing qui ad nulla cillum id culpa. Occaecat duis magna deserunt dolor adipisicing ex in Lorem dolor occaecat enim laboris cupidatat eiusmod.\r\nDo velit occaecat cupidatat labore ut qui et ipsum pariatur excepteur aliqua sunt ad. Ut eu eu consectetur ut laborum aute culpa. Consequat qui irure ad magna qui exercitation nostrud ex ullamco Lorem consequat. Esse sunt do sunt consectetur tempor.\r\n", + "address": "4 Withers Street", + "city": "Aberdeen", + "state": "Mississippi", + "zip": 14870, + "country": "Heard and McDonald Islands", + "email": "christianbrown@scentric.com", + "phone": "(981) 586-2200", + "color": "rgb(211,68,198)" + }, + { + "index": 191, + "name": "Browning Harrison", + "first": "Wanda", + "last": "Dorsey", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/solid_color/73.jpg", + "boolean": false, + "guid": "18e2fdcf-33bc-447e-9d9e-95cd992f3b01", + "integer": 99, + "date": "Fri Apr 12 1996 19:22:55 GMT-0700 (PDT)", + "shortText": "nostrud", + "mediumText": "Minim velit ex mollit officia deserunt mollit.", + "longText": "In enim culpa ea quis occaecat Lorem voluptate voluptate. Ad occaecat dolore cillum exercitation laborum. Amet ex labore in sint dolor Lorem eiusmod elit voluptate magna. Dolore quis dolore ullamco velit. Occaecat incididunt ex laboris nulla sit amet sit. Proident nisi elit exercitation sunt incididunt ipsum ex laboris aliquip elit id fugiat id. Sint nulla irure labore mollit reprehenderit irure cupidatat exercitation.\r\nProident aliqua aliquip irure reprehenderit aliquip et nulla in ea do cillum. Anim esse culpa adipisicing do reprehenderit aliquip elit sunt fugiat velit aliqua excepteur. Irure nulla nulla elit esse qui magna qui adipisicing eu consectetur ea. Sint magna labore esse occaecat ad est. Voluptate ex sit anim ipsum consequat est aliquip quis. Quis eu anim officia reprehenderit dolore veniam labore.\r\nEiusmod quis cillum nisi officia. Consequat laborum amet enim deserunt occaecat cillum. Labore cupidatat eu sit officia ea.\r\nCillum mollit occaecat dolor labore dolore sint laborum irure commodo magna id officia. Ullamco minim reprehenderit nulla ea non commodo. Amet eu fugiat officia quis labore pariatur. Duis anim ad eiusmod magna ad voluptate dolore anim anim exercitation reprehenderit cillum labore. Nulla esse nisi ipsum cillum. Nulla incididunt consequat ut elit aute et Lorem ea enim do sint id proident. Voluptate et magna dolor deserunt sint laborum eu.\r\nAliquip laborum labore exercitation culpa duis sunt magna consequat excepteur. Sunt incididunt ad consectetur ullamco sit esse et fugiat mollit irure adipisicing. Ipsum enim enim sunt est. Ipsum officia incididunt dolore aute elit elit fugiat est commodo esse. Sunt minim et cillum excepteur deserunt. In id mollit quis et occaecat cupidatat irure velit dolor reprehenderit in commodo ad velit. Excepteur est et magna elit fugiat amet cupidatat ea anim.\r\n", + "address": "4 Irving Street", + "city": "Winesburg", + "state": "Rhode Island", + "zip": 33983, + "country": "United States", + "email": "wandadorsey@scentric.com", + "phone": "(857) 473-2997", + "color": "rgb(188,149,116)" + }, + { + "index": 192, + "name": "Beth Clark", + "first": "Stuart", + "last": "Potter", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/panghal0/73.jpg", + "boolean": false, + "guid": "885c3d9f-8acb-4fa6-82d0-3b1f8066fa8e", + "integer": 90, + "date": "Fri Sep 25 1998 20:49:56 GMT-0700 (PDT)", + "shortText": "ipsum voluptate qui est", + "mediumText": "Elit proident mollit qui reprehenderit labore minim aliquip ut ea dolore aliquip qui. Commodo sint non minim pariatur veniam.", + "longText": "Aliqua deserunt officia pariatur fugiat dolore magna pariatur exercitation elit esse elit. Ad enim consectetur nisi est amet irure aliqua nulla labore consequat cillum. In cupidatat laborum deserunt aliqua veniam mollit veniam nulla ex.\r\nEiusmod sint nostrud duis ad minim magna sit consequat commodo nostrud do laborum mollit id. Consequat exercitation dolore mollit exercitation aute id. Veniam minim laboris Lorem enim aliqua nulla et. Aliquip dolor officia duis cupidatat enim ad velit ad. Fugiat irure Lorem sunt deserunt consectetur id cillum elit. Nulla officia commodo enim labore sit dolore ipsum ad sint nisi consectetur esse.\r\n", + "address": "4 Dewitt Avenue", + "city": "Somerset", + "state": "Georgia", + "zip": 62165, + "country": "Jamaica", + "email": "stuartpotter@scentric.com", + "phone": "(868) 542-3034", + "color": "rgb(93,172,196)" + }, + { + "index": 193, + "name": "Neal Mcgee", + "first": "Daisy", + "last": "Lucas", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/renettarenula/73.jpg", + "boolean": true, + "guid": "a86f246d-1555-4d68-b633-713d56a7357a", + "integer": 66, + "date": "Wed Jan 22 1975 14:12:25 GMT-0800 (PST)", + "shortText": "aliquip quis", + "mediumText": "Pariatur nostrud irure dolor ad et. Commodo tempor mollit nisi consequat officia ex exercitation.", + "longText": "Velit deserunt ipsum Lorem id laboris et laborum in. Aute ea consequat elit magna sit ad voluptate nostrud dolor pariatur labore ipsum mollit consectetur. Fugiat velit ipsum et aute elit. Aliqua Lorem ullamco ad mollit ex. Sint cupidatat esse minim exercitation. Laborum ipsum quis ut commodo proident elit et et. Duis excepteur ut sit duis cupidatat mollit mollit.\r\nVeniam pariatur minim duis esse est mollit exercitation esse enim. Esse aliqua labore velit minim qui cillum excepteur qui occaecat excepteur quis Lorem sint. Culpa sint do commodo pariatur reprehenderit et adipisicing. Dolore Lorem minim in pariatur nulla incididunt magna amet qui. Excepteur velit adipisicing cupidatat aliquip cupidatat consectetur adipisicing consequat fugiat eiusmod consectetur consequat. Ea laborum occaecat voluptate do.\r\nCommodo minim adipisicing cupidatat labore velit. Commodo eu officia sunt ea sit exercitation nisi quis fugiat non Lorem duis. Culpa adipisicing mollit aliqua dolore aute mollit veniam non qui occaecat sunt.\r\n", + "address": "3 Cadman Plaza", + "city": "Kula", + "state": "New Mexico", + "zip": 50567, + "country": "Sao Tome and Principe", + "email": "daisylucas@scentric.com", + "phone": "(922) 417-2649", + "color": "rgb(242,147,241)" + }, + { + "index": 194, + "name": "Wall Vasquez", + "first": "Kara", + "last": "Avery", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kevin_granger/73.jpg", + "boolean": true, + "guid": "4ca5b46e-7470-4364-8a00-55922d238841", + "integer": 2, + "date": "Sun Oct 27 2002 02:24:06 GMT-0800 (PST)", + "shortText": "consequat ut", + "mediumText": "Culpa id occaecat pariatur eu id adipisicing est non adipisicing nisi et nostrud eu voluptate. Reprehenderit sit adipisicing eiusmod ex excepteur occaecat Lorem consectetur. Mollit exercitation ex adipisicing culpa non ullamco aute aliqua laborum anim deserunt id. Est magna do Lorem Lorem Lorem officia ullamco in eiusmod ut.", + "longText": "Nostrud eu elit voluptate consequat nisi. Dolor qui consequat minim ea sit eiusmod duis aliquip ex. Labore aliquip culpa quis velit id fugiat. Veniam exercitation exercitation aliquip magna eiusmod ad cupidatat sint ullamco consequat pariatur est consequat deserunt. Dolore qui nostrud velit labore magna proident enim in aliquip velit. Mollit ullamco sunt ut do do reprehenderit nostrud do.\r\nConsequat eiusmod adipisicing qui exercitation do minim consequat deserunt non elit sint. Elit dolore ullamco nostrud duis fugiat minim mollit Lorem. Occaecat incididunt officia do tempor dolor velit excepteur laborum. Occaecat cillum aliquip cupidatat anim. Laborum nostrud occaecat irure qui. Id tempor nulla enim irure cillum non culpa non ea enim ad tempor.\r\nQui qui laborum aliquip irure ipsum excepteur do tempor est pariatur nisi. Enim tempor et cupidatat tempor pariatur officia excepteur aliqua. Culpa incididunt laborum ea cupidatat culpa reprehenderit occaecat. Qui do dolor officia aliqua fugiat quis est ex irure. Proident dolor proident dolore proident amet duis labore sunt enim.\r\nSit incididunt deserunt veniam et velit. Eu voluptate esse dolor ullamco nisi sint reprehenderit. Excepteur pariatur est eiusmod eiusmod irure nostrud aliqua aliqua anim. Elit nisi aliqua incididunt tempor dolor commodo eiusmod sit sit ea nostrud eiusmod adipisicing ad. Et occaecat non enim proident nostrud voluptate reprehenderit veniam do exercitation pariatur ut quis. Minim labore ea deserunt deserunt eiusmod anim irure aliquip irure qui sit tempor ad.\r\nSunt sint nulla duis cupidatat. Culpa Lorem eu Lorem eu enim veniam voluptate irure nostrud est ullamco proident non. Aliqua tempor adipisicing proident aliquip cillum do esse laboris. Voluptate eu sint pariatur velit nisi dolore.\r\n", + "address": "2 Clinton Avenue", + "city": "Konterra", + "state": "Arizona", + "zip": 98633, + "country": "Belarus", + "email": "karaavery@scentric.com", + "phone": "(870) 572-3252", + "color": "rgb(192,119,159)" + }, + { + "index": 195, + "name": "Booker Mcgowan", + "first": "Olga", + "last": "Tucker", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/maxsmeagol/73.jpg", + "boolean": true, + "guid": "06e837ae-b847-48ce-8b91-832435eb8867", + "integer": 72, + "date": "Sat May 02 2009 00:56:50 GMT-0700 (PDT)", + "shortText": "anim commodo exercitation", + "mediumText": "Elit id enim esse ad Lorem irure laboris in laborum dolore aliquip.", + "longText": "Deserunt eu aute cillum excepteur dolore do do enim fugiat veniam ad. Dolore dolor eu aliquip et. Culpa excepteur aliqua excepteur nisi id eiusmod Lorem eiusmod duis est proident dolor occaecat anim. Aliqua laboris in incididunt sint labore. Incididunt eiusmod quis nostrud occaecat fugiat do cupidatat eu ex reprehenderit nostrud ea proident. Ad reprehenderit consequat laborum eu elit qui occaecat. Quis non magna duis minim amet consequat sunt.\r\nEa consequat do ex qui laboris amet mollit amet nulla. Veniam in sit nisi ad pariatur nulla cillum et ea ad eiusmod. Tempor aliqua eu amet esse dolore nisi pariatur cillum in.\r\nLaborum in ipsum dolor fugiat. Nostrud consectetur nostrud proident aliqua veniam et esse. Occaecat culpa et adipisicing magna ea sint sit fugiat consectetur.\r\nUllamco amet pariatur ipsum duis incididunt laborum ad commodo. Voluptate laborum ea culpa esse nulla dolor reprehenderit duis ut laboris ullamco minim adipisicing aute. Commodo id ad dolor nulla non aliquip eiusmod sint tempor cillum enim.\r\n", + "address": "4 Monroe Place", + "city": "Waterloo", + "state": "Texas", + "zip": 94273, + "country": "Russian Federation", + "email": "olgatucker@scentric.com", + "phone": "(902) 400-3059", + "color": "rgb(136,215,127)" + }, + { + "index": 196, + "name": "Blankenship Henson", + "first": "Staci", + "last": "King", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jvhleb/73.jpg", + "boolean": false, + "guid": "c0bdad68-d176-4514-8d66-d4ae0ae03bdf", + "integer": 41, + "date": "Wed Jan 10 1990 09:56:54 GMT-0800 (PST)", + "shortText": "elit velit exercitation deserunt", + "mediumText": "Labore exercitation excepteur non incididunt. Et reprehenderit anim exercitation ipsum id eu eu irure magna et adipisicing occaecat quis.", + "longText": "Officia nulla cillum duis nostrud labore mollit eiusmod labore ut aliqua elit incididunt. Minim exercitation consequat non eiusmod sint magna voluptate incididunt ex consectetur labore sunt nulla anim. Commodo ipsum aute ipsum mollit veniam reprehenderit reprehenderit irure amet. Nisi voluptate esse consectetur cillum. In eu in duis culpa deserunt ea tempor elit. Nisi tempor fugiat pariatur irure.\r\nQuis ex sunt cupidatat anim aliqua aliquip tempor minim incididunt fugiat officia. Et sunt eiusmod eu culpa incididunt aute culpa. Excepteur Lorem ipsum dolore labore amet occaecat elit fugiat. Eiusmod velit aute occaecat sunt qui ad irure in do id consequat sunt amet cupidatat. Non dolor sunt elit velit excepteur anim deserunt ut occaecat culpa aute aute.\r\n", + "address": "2 Beach Place", + "city": "Slovan", + "state": "District Of Columbia", + "zip": 43413, + "country": "Croatia (Hrvatska)", + "email": "staciking@scentric.com", + "phone": "(964) 422-3068", + "color": "rgb(123,169,84)" + }, + { + "index": 197, + "name": "Essie Hoover", + "first": "Lourdes", + "last": "Mayer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nbirckel/73.jpg", + "boolean": true, + "guid": "d4eca4a8-9d42-4800-9776-b3f2f858b3e5", + "integer": 7, + "date": "Wed Jul 02 1986 21:56:11 GMT-0700 (PDT)", + "shortText": "incididunt nisi minim id officia", + "mediumText": "Ex sint esse labore sit cillum cupidatat cupidatat consequat dolor aliquip elit sunt fugiat quis.", + "longText": "Minim veniam dolor tempor cupidatat nostrud dolore quis sint Lorem duis eiusmod consectetur. Incididunt irure consequat ipsum id cillum culpa qui ad magna nisi. Consequat quis adipisicing dolor consequat reprehenderit incididunt ipsum enim laborum duis. Dolor sit do ex magna do culpa dolor anim incididunt tempor nisi ipsum ex voluptate. Quis exercitation dolore voluptate veniam amet nostrud dolore consequat nulla quis anim amet. Veniam ut do incididunt culpa eiusmod proident in sint nostrud voluptate.\r\nVeniam sint excepteur laboris duis nostrud. Eiusmod commodo mollit est ex incididunt fugiat labore proident. Ea enim commodo non tempor non aliquip culpa non laborum. Anim veniam sit sunt adipisicing adipisicing ea cillum duis incididunt excepteur ut ad non ad. Ex in nulla exercitation laborum Lorem ex deserunt commodo esse dolore nostrud.\r\nOccaecat reprehenderit Lorem culpa tempor dolor et dolore nulla nostrud eiusmod dolor magna voluptate aliquip. Dolore consectetur exercitation proident aliquip cupidatat veniam ea ad anim nostrud enim nulla labore. Incididunt duis deserunt laborum mollit veniam irure est ad enim commodo eiusmod.\r\nCulpa consequat duis deserunt magna laborum magna amet eiusmod. Ut ipsum id aute duis reprehenderit. Nulla nisi sint mollit amet ex esse laborum nulla ullamco cupidatat nostrud. Enim consequat aute tempor veniam adipisicing aliqua laborum irure duis mollit Lorem eu ipsum quis. Dolor culpa est et reprehenderit occaecat. Amet ex ad do mollit sint mollit non culpa nisi laborum qui aliquip sit. Laborum officia ullamco pariatur non sit esse est sint duis reprehenderit laborum aute qui.\r\nLabore dolor occaecat anim deserunt anim duis Lorem incididunt anim amet amet ut eu dolore. Consequat commodo laborum ipsum id magna non occaecat adipisicing et non. Deserunt cupidatat culpa in reprehenderit mollit aliqua aute amet.\r\n", + "address": "2 Merit Court", + "city": "Curtice", + "state": "Virgin Islands", + "zip": 27446, + "country": "Indonesia", + "email": "lourdesmayer@scentric.com", + "phone": "(844) 447-3638", + "color": "rgb(56,235,218)" + }, + { + "index": 198, + "name": "Bridget Wilcox", + "first": "Danielle", + "last": "Delacruz", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/irida168/73.jpg", + "boolean": false, + "guid": "4072c5a4-5842-4c17-85c4-d9c472e32f5d", + "integer": 1, + "date": "Thu Mar 18 1993 10:26:24 GMT-0800 (PST)", + "shortText": "quis", + "mediumText": "Lorem in aliquip ullamco labore consequat elit nisi ex tempor. Enim exercitation cupidatat in laborum nulla.", + "longText": "Veniam ea qui pariatur laborum minim. Duis tempor commodo ad qui tempor est. Do enim incididunt Lorem elit proident ex nulla elit exercitation voluptate ex laborum ullamco deserunt. Ad voluptate mollit dolore sint exercitation anim laborum voluptate Lorem deserunt. Anim ullamco minim commodo non consequat est qui nostrud ullamco laboris mollit. Ipsum laborum anim ex labore laboris cillum cupidatat elit ex enim quis.\r\nAliquip anim ea fugiat aute nostrud occaecat culpa magna ut nisi ea tempor ex. Quis dolore aute cupidatat officia esse anim occaecat. Anim occaecat incididunt sit ea enim mollit consectetur aute anim. Voluptate sint et occaecat adipisicing eiusmod excepteur aliquip eu. Cillum enim et aliquip non cupidatat eu consequat voluptate culpa veniam esse. Commodo officia enim excepteur id cupidatat.\r\nSunt reprehenderit id voluptate deserunt irure veniam fugiat elit ipsum exercitation excepteur ut. Elit ut eu in Lorem reprehenderit reprehenderit aliqua duis dolor. Velit voluptate aute magna voluptate id do mollit enim nisi consequat veniam elit cupidatat et.\r\nEt sint adipisicing officia ipsum commodo do ea sunt anim. Laborum ullamco elit aute occaecat adipisicing exercitation labore nulla ipsum. Cupidatat sit eiusmod aliqua esse eu ullamco in. Laborum eiusmod excepteur ad magna exercitation occaecat amet ad sint ullamco aliquip excepteur. Nisi sit consequat laboris nulla consequat dolore fugiat. Lorem cupidatat adipisicing do esse nisi fugiat eu culpa fugiat ullamco quis elit in.\r\nMagna in cupidatat duis dolor quis cillum occaecat. Pariatur minim ipsum irure qui officia veniam incididunt adipisicing consectetur Lorem. Ex esse cillum ut sint minim. Esse ex excepteur id do culpa laboris nisi nisi non. Exercitation minim consectetur dolor aliqua culpa commodo dolor. Ut tempor sint mollit Lorem incididunt laborum laboris sit cupidatat ex esse. Enim amet sunt sit anim veniam fugiat ea mollit.\r\n", + "address": "4 Leonora Court", + "city": "Bradenville", + "state": "Puerto Rico", + "zip": 59719, + "country": "Nauru", + "email": "danielledelacruz@scentric.com", + "phone": "(952) 548-3787", + "color": "rgb(168,148,116)" + }, + { + "index": 199, + "name": "Mccarthy Fletcher", + "first": "Janis", + "last": "Fischer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kevin_py/73.jpg", + "boolean": true, + "guid": "010c3410-51e3-409d-ae76-1ef43f546c53", + "integer": 21, + "date": "Thu Feb 27 2014 18:02:21 GMT-0800 (PST)", + "shortText": "non ullamco exercitation voluptate", + "mediumText": "Ea velit ullamco ullamco excepteur culpa est in nisi cillum amet deserunt quis laborum. Tempor in duis cupidatat proident.", + "longText": "Labore reprehenderit deserunt sint reprehenderit officia et culpa sunt exercitation velit ipsum cupidatat veniam. Cupidatat ut elit cillum cupidatat qui sit tempor veniam consequat labore dolor minim. Ad duis laboris ad voluptate ea non velit elit excepteur sint elit consectetur non. Velit tempor officia quis cillum duis et culpa voluptate ipsum.\r\nMinim labore nostrud deserunt ipsum est qui aliqua Lorem ullamco non nostrud. Reprehenderit cillum consectetur ex aute est dolor laboris minim aliqua aliqua elit aliqua. Sint pariatur nostrud enim qui do exercitation occaecat mollit anim mollit.\r\nUllamco ea adipisicing duis est consectetur enim. Cillum esse et enim duis qui quis est elit. Occaecat sunt cupidatat voluptate consectetur anim ut non deserunt veniam ullamco laboris cupidatat incididunt pariatur. Id consequat nisi non aliquip voluptate esse. Cupidatat fugiat anim anim id quis aliquip sint nisi fugiat sit. Ipsum voluptate do officia quis culpa nulla et.\r\nEt commodo ea irure aliquip consectetur dolore. Eu nostrud non ad tempor commodo. Est tempor aliquip nisi mollit tempor excepteur. Enim consectetur cillum laborum do anim labore deserunt culpa exercitation commodo dolore commodo dolore nulla. Laboris ex officia officia incididunt fugiat reprehenderit officia proident laborum qui consectetur eiusmod et. Aute adipisicing eiusmod do cupidatat id commodo. Deserunt nostrud officia nulla exercitation nostrud occaecat tempor mollit duis.\r\n", + "address": "2 Colin Place", + "city": "Greensburg", + "state": "Maryland", + "zip": 26126, + "country": "Ireland", + "email": "janisfischer@scentric.com", + "phone": "(860) 405-3588", + "color": "rgb(113,69,223)" + }, + { + "index": 200, + "name": "Judy Whitley", + "first": "Webster", + "last": "Doyle", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ratbus/73.jpg", + "boolean": false, + "guid": "f4ccb739-8e28-42fd-b1a0-4051b77a60b3", + "integer": 57, + "date": "Tue Jan 29 2002 02:38:20 GMT-0800 (PST)", + "shortText": "cillum", + "mediumText": "Eiusmod nisi excepteur labore Lorem incididunt laborum cillum sit nisi id id sint minim. Proident reprehenderit excepteur cupidatat culpa dolor labore. Irure labore aute amet nostrud ad voluptate non.", + "longText": "Eiusmod do tempor aliquip adipisicing nisi sit amet sunt amet commodo aute pariatur occaecat. Labore incididunt qui incididunt duis non dolore eu voluptate. Veniam minim esse ipsum non do. Laboris non culpa adipisicing do dolore pariatur eiusmod aute incididunt mollit Lorem labore ad ad.\r\nEt fugiat ad deserunt exercitation pariatur. Elit eiusmod ut pariatur ut adipisicing officia proident Lorem nisi id dolore sit tempor occaecat. Et minim fugiat incididunt ad ullamco Lorem.\r\nElit ea cupidatat elit adipisicing magna ex culpa aliqua enim. Enim deserunt eiusmod dolore incididunt ex veniam dolor ipsum pariatur. Ipsum elit tempor eiusmod occaecat qui fugiat quis elit non nisi anim. Fugiat ut sit cillum ad dolore duis qui. Deserunt amet et sunt nulla duis nisi ea. In elit consectetur exercitation cupidatat sit nostrud reprehenderit adipisicing aliquip.\r\n", + "address": "3 Gerry Street", + "city": "Lookingglass", + "state": "Massachusetts", + "zip": 73514, + "country": "Luxembourg", + "email": "websterdoyle@scentric.com", + "phone": "(891) 436-2016", + "color": "rgb(129,172,59)" + }, + { + "index": 201, + "name": "Ware Harding", + "first": "Phyllis", + "last": "Holcomb", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sprayaga/73.jpg", + "boolean": true, + "guid": "87934fda-9cd1-4e95-9faa-53102d8ce1f2", + "integer": 3, + "date": "Fri May 19 1972 15:51:24 GMT-0700 (PDT)", + "shortText": "deserunt laboris excepteur pariatur nostrud", + "mediumText": "Tempor Lorem occaecat magna aute aliqua eu qui commodo.", + "longText": "Laboris deserunt anim excepteur magna et. Eu ullamco laborum enim id ut excepteur nulla est quis deserunt exercitation veniam irure. Sint officia anim cupidatat nostrud culpa aute ut. Amet id elit incididunt do excepteur. Qui aute voluptate tempor non ad fugiat commodo voluptate culpa eiusmod sit enim dolor. Minim est proident anim consequat adipisicing ea reprehenderit magna labore fugiat ea anim. Velit aute incididunt aute commodo aliquip veniam do fugiat ut anim.\r\nNulla aliquip aliqua est cupidatat ex laboris id velit ullamco labore qui. Commodo labore mollit esse laboris deserunt duis. Sunt velit ex excepteur cillum officia sint ad id commodo. Irure amet est laboris officia occaecat anim id ut irure sunt aute. Deserunt quis deserunt et ad mollit nulla. Velit eu Lorem deserunt ipsum sit aute amet exercitation aliquip nulla. Nulla sunt commodo adipisicing minim reprehenderit consequat minim elit qui do Lorem sit.\r\nIn et mollit minim proident eu qui anim magna Lorem consequat minim duis. Esse culpa eu commodo sit. Nostrud laborum magna id elit proident. Laboris commodo ipsum culpa laboris esse non enim id id mollit elit. Pariatur id in sunt et est tempor duis eu Lorem dolor tempor non veniam non. Ipsum officia aliquip anim id. Ex culpa aute et et consequat in qui.\r\nDeserunt nisi elit aliquip dolor culpa dolore mollit ullamco in cupidatat aliqua. Fugiat minim veniam labore ad minim in aliquip labore nulla quis pariatur. Est nisi pariatur duis culpa cupidatat labore in. Nisi tempor Lorem ea in laboris adipisicing do nisi consectetur laboris sunt culpa.\r\nDolore dolore veniam irure aute elit fugiat magna in. Irure enim fugiat ad ad aliqua exercitation proident duis officia dolor minim consequat reprehenderit. Occaecat ullamco esse cillum deserunt velit adipisicing laboris proident occaecat commodo occaecat tempor fugiat. Sint voluptate sunt anim sint do amet sint eiusmod ea enim Lorem. Aliqua consequat commodo sunt amet fugiat excepteur dolor dolor aliquip nostrud culpa. Fugiat elit adipisicing sit minim fugiat exercitation commodo anim duis. Ex voluptate excepteur occaecat nulla nostrud elit minim laborum fugiat.\r\n", + "address": "2 Brigham Street", + "city": "Chalfant", + "state": "Oklahoma", + "zip": 57590, + "country": "Afghanistan", + "email": "phyllisholcomb@scentric.com", + "phone": "(874) 534-3124", + "color": "rgb(210,230,76)" + }, + { + "index": 202, + "name": "Blanche Sears", + "first": "Peck", + "last": "Dean", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hai_ninh_nguyen/73.jpg", + "boolean": true, + "guid": "b362bf52-df9f-45bb-a64c-4f699bfd2cdb", + "integer": 64, + "date": "Thu May 23 2013 08:13:12 GMT-0700 (PDT)", + "shortText": "nisi tempor", + "mediumText": "Culpa id pariatur velit ut non adipisicing reprehenderit minim est pariatur excepteur nisi qui consectetur.", + "longText": "Voluptate minim deserunt reprehenderit anim ullamco. Consectetur laborum dolor ullamco laboris sunt elit nisi commodo esse sit. Voluptate dolor labore minim consectetur.\r\nQuis magna dolore incididunt deserunt qui dolor aute est culpa voluptate esse. Cillum quis exercitation dolore quis enim aliquip dolore dolor est adipisicing pariatur dolore deserunt. Consectetur sunt proident pariatur aute cupidatat voluptate fugiat pariatur sint.\r\nPariatur eiusmod consequat velit mollit ut reprehenderit irure. Voluptate nisi reprehenderit nisi adipisicing consectetur consequat in culpa laboris veniam laborum velit. Incididunt laboris cupidatat commodo sit commodo esse. Adipisicing proident cupidatat pariatur aute.\r\nEsse reprehenderit do id non occaecat dolore laborum dolore nostrud reprehenderit culpa voluptate voluptate nostrud. Laboris nostrud officia id consequat ullamco. Nisi est sunt ipsum excepteur nostrud dolore irure quis quis labore esse laboris. Adipisicing velit dolore ullamco voluptate reprehenderit ad duis reprehenderit. Commodo do laboris elit eu in nisi deserunt sint ipsum in duis sint excepteur. Culpa est est Lorem sint labore. Et qui ad anim ad.\r\nDo adipisicing amet cupidatat dolor dolore culpa incididunt culpa ad qui consequat ea reprehenderit proident. Irure qui ad adipisicing veniam irure nostrud esse id. Culpa do proident ex id eu Lorem veniam. Veniam commodo sit exercitation deserunt minim sint enim occaecat amet eu irure voluptate culpa eu. Deserunt ad laborum fugiat ex eu incididunt dolore adipisicing. Labore commodo aliquip deserunt aute eiusmod nisi. Est commodo duis excepteur nulla sunt laboris.\r\n", + "address": "4 Garden Place", + "city": "Ironton", + "state": "Ohio", + "zip": 89350, + "country": "St. Pierre and Miquelon", + "email": "peckdean@scentric.com", + "phone": "(994) 522-3068", + "color": "rgb(199,252,214)" + }, + { + "index": 203, + "name": "Conway Kelley", + "first": "Virginia", + "last": "Pollard", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gaborenton/73.jpg", + "boolean": false, + "guid": "afd59da0-9b9b-4b60-9da3-0ef8fc1e6349", + "integer": 14, + "date": "Sun Jul 17 1988 07:37:09 GMT-0700 (PDT)", + "shortText": "Lorem pariatur velit duis tempor", + "mediumText": "Incididunt dolore sint proident irure. Cillum minim veniam dolor ipsum ut cupidatat non proident tempor deserunt. Incididunt exercitation ut proident dolor do adipisicing sit Lorem aliqua enim nulla nostrud. Consectetur duis veniam elit laboris eiusmod ullamco labore exercitation fugiat sint reprehenderit eu nostrud dolor. Occaecat id laboris est tempor deserunt anim in fugiat proident enim cupidatat elit officia fugiat.", + "longText": "Veniam enim ad adipisicing cupidatat velit cillum anim et exercitation esse aliquip sit sunt. Irure mollit est sint minim consectetur labore sunt. Deserunt veniam sunt ut sunt tempor minim ipsum Lorem cupidatat laborum. Proident ipsum veniam quis nisi in consectetur sint labore laboris quis adipisicing velit. Dolore laboris exercitation quis sit. Laboris voluptate non consectetur incididunt laborum veniam pariatur exercitation sint.\r\nSint aute mollit eiusmod ea id cupidatat ad in sunt Lorem proident eiusmod ad. Proident ex occaecat pariatur excepteur labore consectetur laboris. Ut pariatur in adipisicing sit ipsum minim. Ut est elit eiusmod fugiat deserunt mollit fugiat incididunt laboris. Aute officia amet cupidatat in.\r\nVelit id enim ut ea veniam laborum eu duis adipisicing fugiat amet ullamco irure. Dolor et ad culpa esse in. Ea pariatur adipisicing minim sunt consequat sunt minim anim aute qui quis.\r\n", + "address": "3 Monaco Place", + "city": "Lopezo", + "state": "Nevada", + "zip": 45051, + "country": "Montserrat", + "email": "virginiapollard@scentric.com", + "phone": "(911) 563-3668", + "color": "rgb(120,253,100)" + }, + { + "index": 204, + "name": "Little Griffin", + "first": "Murray", + "last": "David", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/uralozden/73.jpg", + "boolean": false, + "guid": "9028904c-ab1e-4968-b7c4-20453df8469b", + "integer": 84, + "date": "Sun Dec 20 1987 15:41:10 GMT-0800 (PST)", + "shortText": "adipisicing ea pariatur enim", + "mediumText": "Commodo nostrud et irure amet pariatur proident eiusmod. Proident mollit eu fugiat irure voluptate proident laboris cillum proident voluptate.", + "longText": "Nisi et consectetur aute in tempor. Occaecat ad sint incididunt ullamco reprehenderit dolore. Nisi adipisicing in velit sint aliquip. Deserunt ut pariatur aute et voluptate fugiat id esse do sunt deserunt aute in. Excepteur adipisicing excepteur irure tempor sit culpa culpa mollit. Fugiat est culpa nostrud pariatur labore et in esse ullamco cillum et amet consequat cillum. Sint laboris cillum ea labore occaecat sunt enim.\r\n", + "address": "2 Gallatin Place", + "city": "Topaz", + "state": "Montana", + "zip": 18846, + "country": "Norway", + "email": "murraydavid@scentric.com", + "phone": "(994) 477-3415", + "color": "rgb(185,246,198)" + }, + { + "index": 205, + "name": "Goff Benton", + "first": "Mclean", + "last": "Pennington", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/attacks/73.jpg", + "boolean": false, + "guid": "70d6883d-2c03-4256-b2b8-d09f035e6d58", + "integer": 51, + "date": "Sun Feb 25 1979 17:08:08 GMT-0800 (PST)", + "shortText": "ipsum aute Lorem", + "mediumText": "Qui est officia sit nulla sunt reprehenderit incididunt aute.", + "longText": "Lorem eu proident exercitation do veniam. Sunt reprehenderit officia cupidatat est do ipsum sunt elit anim quis reprehenderit laborum quis non. Et aliqua excepteur culpa qui enim nulla id qui eiusmod dolor Lorem non mollit consectetur.\r\nLorem amet velit esse magna Lorem voluptate nostrud labore. Dolor Lorem cupidatat mollit laboris deserunt quis occaecat excepteur pariatur deserunt minim consectetur sint. Ad quis veniam dolore quis nostrud laboris ex anim quis eu nisi tempor. Consectetur voluptate id officia culpa anim enim eiusmod in amet amet. Velit anim deserunt officia eiusmod qui incididunt minim consequat ut sunt mollit. Ex enim aliquip enim quis enim irure sunt mollit laborum nisi.\r\nMagna sit ea deserunt excepteur aliqua esse nulla deserunt exercitation officia nulla id tempor cillum. Occaecat nulla sit tempor aute fugiat commodo. Laboris fugiat enim exercitation voluptate quis consequat consectetur aliquip fugiat voluptate ut occaecat reprehenderit irure. Esse sit laboris quis commodo ea in velit ad labore veniam. Aliquip dolor laborum commodo ad elit aliqua velit qui.\r\nElit exercitation culpa officia adipisicing amet in dolor eiusmod. Nostrud proident exercitation aliquip labore ad cupidatat velit incididunt. Officia ex veniam cillum deserunt id dolore excepteur pariatur mollit nulla laboris veniam veniam eu. Labore duis est ex reprehenderit fugiat commodo ut aute officia culpa irure amet id.\r\n", + "address": "4 Story Court", + "city": "Snowville", + "state": "California", + "zip": 33234, + "country": "Guam", + "email": "mcleanpennington@scentric.com", + "phone": "(882) 499-2242", + "color": "rgb(107,133,242)" + }, + { + "index": 206, + "name": "Hale Wilkinson", + "first": "Franks", + "last": "Howard", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mymyboy/73.jpg", + "boolean": false, + "guid": "974617cc-7395-4b74-aa1b-f5ea163bbb48", + "integer": 40, + "date": "Mon Jul 17 1972 11:03:48 GMT-0700 (PDT)", + "shortText": "dolor nulla culpa id", + "mediumText": "Veniam ipsum sit ea velit et magna exercitation exercitation occaecat voluptate aliqua. Deserunt nisi qui dolor mollit in anim labore. Dolore id quis occaecat aliqua pariatur cillum enim aliquip pariatur voluptate magna. Excepteur magna officia excepteur voluptate excepteur laboris.", + "longText": "Sit elit quis laborum do magna culpa Lorem magna incididunt. Consectetur non do non ea fugiat Lorem sint fugiat deserunt magna id ut aliquip. In Lorem ut voluptate magna consectetur exercitation cupidatat elit anim excepteur ipsum tempor amet. Velit commodo magna incididunt pariatur fugiat adipisicing cillum fugiat incididunt in sint velit ipsum. Sint non eiusmod quis minim anim. Irure reprehenderit adipisicing non nulla Lorem officia excepteur voluptate esse.\r\nOfficia dolore do aute culpa enim et quis laboris occaecat elit eiusmod mollit. Est non irure amet ad pariatur exercitation pariatur ad ex quis. Sunt ea minim id exercitation laborum dolore nulla et incididunt do. Aliqua amet Lorem eiusmod pariatur ipsum amet reprehenderit elit sit. Eu quis cillum voluptate magna ullamco.\r\nEa proident sit laborum commodo fugiat in elit amet. Non esse do exercitation culpa consectetur non magna voluptate velit ea culpa anim nulla. Eiusmod labore Lorem aute occaecat nulla fugiat.\r\nEst excepteur laborum ut amet Lorem ad veniam elit reprehenderit. Officia laboris id et consectetur sunt adipisicing nulla nostrud esse Lorem. Duis laboris veniam amet deserunt in deserunt laborum sit pariatur cillum nostrud.\r\n", + "address": "2 Hoyt Street", + "city": "Wolcott", + "state": "Marshall Islands", + "zip": 13071, + "country": "Gibraltar", + "email": "frankshoward@scentric.com", + "phone": "(893) 417-2654", + "color": "rgb(186,174,80)" + }, + { + "index": 207, + "name": "Betty Huff", + "first": "Mona", + "last": "Fulton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tristanlegros/73.jpg", + "boolean": false, + "guid": "c11ff2c4-c704-4729-88f9-b9932549a64a", + "integer": 26, + "date": "Thu Nov 04 1976 19:21:20 GMT-0800 (PST)", + "shortText": "sit nulla", + "mediumText": "Adipisicing minim nostrud magna amet tempor sunt duis officia cupidatat do incididunt dolore consectetur elit. Duis proident deserunt proident eu elit aliquip sint. Qui officia commodo voluptate deserunt amet ipsum magna dolore. Dolore labore eiusmod fugiat ad.", + "longText": "Aliquip in consequat nulla Lorem velit in cupidatat ut ut. Minim dolore cillum ut esse dolore ex. Eu occaecat officia tempor Lorem duis mollit magna Lorem eu deserunt aute et nisi reprehenderit. Eu magna qui enim officia nostrud proident officia sint elit ipsum quis duis velit Lorem.\r\n", + "address": "4 Ocean Avenue", + "city": "Finderne", + "state": "Indiana", + "zip": 46746, + "country": "Hungary", + "email": "monafulton@scentric.com", + "phone": "(946) 414-3557", + "color": "rgb(128,193,66)" + }, + { + "index": 208, + "name": "Emily Davis", + "first": "Sharon", + "last": "Green", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/allfordesign/73.jpg", + "boolean": true, + "guid": "e94e16a5-2c94-4436-8610-86a6f5f66355", + "integer": 99, + "date": "Mon Sep 28 2009 14:40:31 GMT-0700 (PDT)", + "shortText": "cillum dolor ex cupidatat deserunt", + "mediumText": "Cupidatat nulla anim reprehenderit laboris aute magna aliquip ea in sit. Reprehenderit reprehenderit amet id et ad ea. Deserunt veniam cillum dolor ullamco Lorem non cillum amet.", + "longText": "Quis voluptate ex cillum incididunt incididunt nisi. Dolor aliqua culpa dolor cillum eiusmod cillum tempor cillum. Est laboris esse exercitation nulla nisi anim et do cupidatat fugiat pariatur. Laborum duis eu fugiat anim duis.\r\nVeniam reprehenderit cupidatat ullamco Lorem ex officia mollit aliqua. Exercitation exercitation cillum irure officia deserunt velit laboris est irure irure minim veniam aliquip laborum. Ipsum ipsum sit ipsum ex veniam voluptate. Adipisicing do ex occaecat do. Laboris reprehenderit ad velit deserunt. Sint consectetur minim eiusmod excepteur eu cupidatat non mollit aliquip ad eu cupidatat.\r\nFugiat mollit ut ullamco veniam sint proident occaecat ad. Est exercitation laborum nisi laboris anim laborum magna. Labore ut adipisicing consectetur velit voluptate fugiat laborum adipisicing veniam reprehenderit. Adipisicing aliquip consectetur id occaecat labore exercitation ullamco.\r\nVoluptate reprehenderit occaecat eiusmod pariatur ipsum est eu. Id dolor laborum elit commodo duis et Lorem laboris. Sit officia do elit amet adipisicing. Exercitation commodo est do eu. In amet ad reprehenderit commodo.\r\nMinim nisi nostrud Lorem nostrud ea incididunt est in labore amet elit officia. Quis nostrud fugiat consequat culpa. Nisi ullamco irure sunt esse elit sunt nisi enim ullamco cupidatat dolore adipisicing. Ullamco sint laboris ullamco id magna qui et eiusmod laborum do enim minim amet aute. Ad fugiat elit velit amet officia nisi aliquip qui. Ut quis amet tempor ea ex id quis Lorem. Amet tempor incididunt esse sunt dolore non veniam esse nisi sint labore ut in.\r\n", + "address": "3 Colonial Court", + "city": "Trona", + "state": "Tennessee", + "zip": 67912, + "country": "Kenya", + "email": "sharongreen@scentric.com", + "phone": "(832) 403-3692", + "color": "rgb(208,118,108)" + }, + { + "index": 209, + "name": "Shelly Payne", + "first": "Doyle", + "last": "Vazquez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/serk002/73.jpg", + "boolean": true, + "guid": "1fbca6f1-d8c8-48ca-94be-6bfb87526c7d", + "integer": 58, + "date": "Sat May 15 1993 07:23:07 GMT-0700 (PDT)", + "shortText": "do amet aliqua duis ea", + "mediumText": "Minim adipisicing sint aliquip in do mollit labore occaecat in. Est commodo et deserunt aute. Ut consectetur exercitation et voluptate qui quis ex.", + "longText": "Ea consequat exercitation incididunt non veniam occaecat amet occaecat occaecat ex ex ullamco incididunt. Enim consequat nisi sit pariatur aliqua elit ipsum elit aliqua incididunt et. Cupidatat occaecat velit nostrud id consequat cupidatat. Nulla anim ipsum enim ad incididunt nostrud nulla et esse incididunt elit. Culpa commodo ad non sint anim. Ad deserunt aute eiusmod officia fugiat proident minim nostrud commodo voluptate velit mollit duis.\r\nEiusmod veniam adipisicing exercitation proident do voluptate ut culpa consequat Lorem. Deserunt ea voluptate anim quis duis deserunt mollit minim sit minim reprehenderit amet. Nisi labore dolore reprehenderit minim laborum fugiat Lorem incididunt sint. Enim aliquip voluptate ea nulla consectetur sit reprehenderit sunt in officia aute id. Pariatur sint sint eiusmod ea do est sint.\r\n", + "address": "3 Auburn Place", + "city": "Blairstown", + "state": "Palau", + "zip": 22120, + "country": "Honduras", + "email": "doylevazquez@scentric.com", + "phone": "(946) 513-2799", + "color": "rgb(255,190,226)" + }, + { + "index": 210, + "name": "Angela Mcmahon", + "first": "Rosalyn", + "last": "Bridges", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/keremk/73.jpg", + "boolean": true, + "guid": "92811c3f-0e5f-4f04-9543-6d026e4b26c4", + "integer": 16, + "date": "Fri Jan 16 1998 10:02:55 GMT-0800 (PST)", + "shortText": "velit", + "mediumText": "Lorem cupidatat dolor voluptate magna excepteur eiusmod est in.", + "longText": "Aliqua culpa aliqua aute labore nulla do pariatur consectetur sit sunt quis reprehenderit duis cupidatat. Pariatur eu voluptate cupidatat reprehenderit sit mollit proident ullamco proident ipsum nulla. Nulla qui ullamco sint eiusmod dolore. Minim esse et sit cupidatat dolore esse. Dolor reprehenderit aliquip magna commodo irure nulla culpa ipsum enim incididunt. Cillum velit minim incididunt qui velit nulla.\r\nConsectetur amet ex elit eu commodo sint enim. Proident et labore ipsum consequat pariatur irure. Fugiat non occaecat ipsum ullamco commodo. Nisi exercitation cupidatat nisi pariatur non culpa. Non do deserunt labore non amet excepteur ea sint. Pariatur quis ullamco laboris fugiat proident est irure magna commodo occaecat officia qui.\r\nPariatur et commodo officia ullamco do qui est nisi in. Laborum sint do minim aute aute dolore est consequat officia id. Nostrud velit ex ut eu dolore occaecat magna minim. Culpa amet sunt duis aliquip Lorem voluptate. Commodo occaecat reprehenderit nostrud magna ex proident incididunt est ut ad do.\r\n", + "address": "4 Fane Court", + "city": "Elrama", + "state": "Virginia", + "zip": 45107, + "country": "Eritrea", + "email": "rosalynbridges@scentric.com", + "phone": "(813) 440-3063", + "color": "rgb(184,249,205)" + }, + { + "index": 211, + "name": "Maryellen Ramos", + "first": "Rogers", + "last": "Silva", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/surjithctly/73.jpg", + "boolean": true, + "guid": "a833fdf1-9865-4e5c-91f8-8d1aaa2d2fba", + "integer": 75, + "date": "Sun Oct 24 2004 10:12:53 GMT-0700 (PDT)", + "shortText": "nisi duis", + "mediumText": "Magna elit fugiat occaecat incididunt elit tempor exercitation occaecat fugiat eiusmod incididunt dolore. Ad quis ea commodo reprehenderit sint sit esse quis quis. Minim esse anim aute eiusmod fugiat.", + "longText": "Voluptate id ullamco do aliqua ad deserunt commodo ex. Et aute excepteur elit adipisicing. Labore consequat consequat consequat qui aute non et ad deserunt. Ex adipisicing sunt sunt mollit do nulla eiusmod esse aute dolor. Elit veniam culpa labore proident cillum duis minim id sint sint eiusmod. Est deserunt in ut laboris fugiat ut sint consequat. Ullamco ex incididunt reprehenderit adipisicing occaecat.\r\nNisi officia excepteur enim aliquip aliqua occaecat aliqua mollit velit reprehenderit amet id cillum. Nulla fugiat ad id in velit consectetur sint id commodo pariatur velit reprehenderit est nisi. Reprehenderit exercitation voluptate ea cillum ea ut nisi deserunt laborum eiusmod ea. Voluptate velit consectetur aliquip aliquip Lorem consectetur dolore in qui laboris voluptate labore duis. In enim eiusmod minim minim non ea labore excepteur tempor officia ullamco.\r\nUt pariatur tempor aliquip eu quis cupidatat esse ad. Sint occaecat mollit eu consectetur dolore nostrud incididunt nostrud enim quis dolor elit adipisicing excepteur. Pariatur cupidatat consequat cillum deserunt sit eu in et veniam aliqua. Proident nostrud nostrud incididunt tempor ad nisi amet. Cupidatat ad ea mollit cupidatat est dolor eu laboris ex velit duis amet consectetur velit.\r\nCillum occaecat ex voluptate cupidatat est cillum qui. Et do incididunt nulla veniam sint eu consectetur et non minim officia excepteur velit. Anim labore mollit cillum sit nisi ex sunt mollit culpa enim ipsum sit laboris in. Quis ullamco et ullamco consequat mollit ex commodo laboris voluptate. Magna qui aute aliqua sit adipisicing id. Veniam mollit proident eu occaecat veniam sint sint laboris sit laborum.\r\n", + "address": "3 Brightwater Court", + "city": "Brandermill", + "state": "Wyoming", + "zip": 20996, + "country": "Tajikistan", + "email": "rogerssilva@scentric.com", + "phone": "(944) 540-3499", + "color": "rgb(88,243,243)" + }, + { + "index": 212, + "name": "Alvarado Abbott", + "first": "Jordan", + "last": "Hyde", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dimitris_d_/73.jpg", + "boolean": false, + "guid": "9b8ecabd-ca6e-4ee1-bd6a-08635f7312a6", + "integer": 97, + "date": "Fri Oct 21 1983 23:56:38 GMT-0700 (PDT)", + "shortText": "elit exercitation pariatur aliqua duis", + "mediumText": "Cupidatat consequat esse duis ex consequat consequat.", + "longText": "Anim aute nisi non adipisicing dolor incididunt non est esse culpa. Proident eiusmod et voluptate sint. Anim ex incididunt do ipsum dolor Lorem Lorem ut. Quis eiusmod esse anim aliqua ullamco. Non in ad qui excepteur minim adipisicing Lorem tempor elit. Nostrud cillum incididunt labore magna duis consectetur irure ut consectetur. Veniam eu officia qui sint pariatur culpa.\r\nSunt ea amet tempor minim labore consequat duis qui. Aliqua non nisi sint incididunt et veniam minim Lorem. Id fugiat consequat in labore velit proident est incididunt nisi non Lorem. Exercitation ipsum duis labore sunt officia proident labore labore ad. Sunt enim culpa adipisicing aute cillum. Officia in adipisicing tempor minim eiusmod dolor. Ea sunt ut elit cillum laboris nisi ipsum reprehenderit labore laborum culpa in.\r\nFugiat est eiusmod amet incididunt minim adipisicing voluptate. Ex eiusmod consequat consectetur occaecat laborum culpa in cupidatat voluptate ipsum reprehenderit elit consequat. Ut fugiat commodo qui aute consequat. Nostrud dolor duis magna minim do.\r\nId non fugiat pariatur pariatur Lorem nostrud irure. Tempor laboris voluptate velit magna. Ut ea ea sunt mollit aliqua. Ullamco dolore nostrud ex non non non culpa Lorem ullamco do do dolore quis. Id sunt magna laboris laboris enim. Sint aliquip elit ullamco ut nisi officia enim dolore nulla cupidatat duis. Cillum magna minim quis nulla nulla anim amet non nostrud sit nostrud exercitation magna ex.\r\n", + "address": "4 Bainbridge Street", + "city": "Chical", + "state": "Colorado", + "zip": 18544, + "country": "Brunei Darussalam", + "email": "jordanhyde@scentric.com", + "phone": "(822) 530-2413", + "color": "rgb(163,61,149)" + }, + { + "index": 213, + "name": "Caldwell Mckinney", + "first": "Melody", + "last": "Fisher", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bogdanroberta/73.jpg", + "boolean": true, + "guid": "7e4dcc0a-5507-4cee-948f-06e4315a2af8", + "integer": 41, + "date": "Wed May 03 1972 14:18:30 GMT-0700 (PDT)", + "shortText": "adipisicing", + "mediumText": "Aliqua laboris enim proident cillum ut id aute nulla ea.", + "longText": "Consequat excepteur non amet ipsum labore dolore consequat duis cillum. Enim occaecat nisi aute aliqua occaecat enim nulla. Eiusmod est adipisicing et in. Sint fugiat ullamco officia commodo minim ut velit voluptate non eiusmod. Est quis sunt nisi exercitation in nostrud laboris.\r\nIrure pariatur velit ad minim occaecat labore ad dolor eiusmod occaecat laboris. Et culpa voluptate minim aliquip. Sit commodo nostrud veniam in dolore magna officia eu ea nisi ex velit.\r\nQuis esse do anim ullamco deserunt consectetur cupidatat tempor cillum ex id. Aute velit non est amet officia laboris labore duis velit Lorem consectetur cupidatat tempor. Cupidatat eiusmod anim et elit ipsum esse minim. Irure eiusmod nisi duis velit id.\r\n", + "address": "2 Abbey Court", + "city": "Salvo", + "state": "Utah", + "zip": 63926, + "country": "Macedonia", + "email": "melodyfisher@scentric.com", + "phone": "(979) 487-2773", + "color": "rgb(71,205,213)" + }, + { + "index": 214, + "name": "Eloise Avila", + "first": "Gay", + "last": "Yang", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/shammellee/73.jpg", + "boolean": true, + "guid": "d615ea19-d16e-48f6-8ddb-02091a9fa272", + "integer": 25, + "date": "Tue Sep 03 1991 06:44:54 GMT-0700 (PDT)", + "shortText": "aliquip enim eu proident sunt", + "mediumText": "Ex deserunt reprehenderit qui ea adipisicing labore in ipsum.", + "longText": "Eiusmod anim ut occaecat veniam est quis labore consectetur elit. Sint minim nostrud non ad aliqua do. Dolor et ullamco aliqua cillum consectetur sunt. Tempor aliquip id labore anim voluptate aute cupidatat consequat. Et nostrud eu cillum sunt nisi excepteur laborum sint labore amet.\r\n", + "address": "3 Wogan Terrace", + "city": "Canby", + "state": "Idaho", + "zip": 49943, + "country": "French Polynesia", + "email": "gayyang@scentric.com", + "phone": "(951) 538-3316", + "color": "rgb(75,210,111)" + }, + { + "index": 215, + "name": "Christine Strong", + "first": "Sofia", + "last": "Alvarez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/donjain/73.jpg", + "boolean": true, + "guid": "7f27c6f9-a6f0-49b2-b6d4-0824fb02c1ba", + "integer": 2, + "date": "Fri Feb 27 1976 21:08:15 GMT-0800 (PST)", + "shortText": "incididunt mollit", + "mediumText": "Labore labore consectetur aliquip pariatur sit eu voluptate minim enim eu cillum proident.", + "longText": "Sint sit deserunt proident nulla culpa in reprehenderit veniam commodo consequat aliquip dolor. Eu mollit cillum et nulla nulla culpa voluptate proident irure mollit non ipsum nisi. Reprehenderit laboris eiusmod magna exercitation consectetur nulla sit do cupidatat est ad dolore culpa. Eiusmod commodo eiusmod dolore est ad reprehenderit occaecat irure. Adipisicing quis aliqua qui non labore consectetur ullamco aliquip.\r\nLorem fugiat excepteur do cupidatat labore elit tempor fugiat et. Commodo laborum nisi consectetur laboris culpa veniam ea minim fugiat dolor qui et pariatur occaecat. Culpa est ullamco in esse. Ut aliquip id dolore aute ullamco et velit veniam et est aute sunt. Sint Lorem consectetur elit occaecat ea enim proident sunt cupidatat cillum officia. Quis eu veniam deserunt occaecat aliqua est exercitation consequat ipsum officia sit Lorem aliqua.\r\nAmet mollit in ad sit. Adipisicing occaecat laboris qui enim ut aute deserunt proident. Ipsum labore laboris sunt nulla amet ad. Duis voluptate ut veniam est quis amet et occaecat.\r\nDuis pariatur voluptate ut veniam aliquip commodo ipsum commodo do. Pariatur deserunt laboris veniam duis ipsum dolore et duis laboris quis officia ad reprehenderit deserunt. Deserunt Lorem esse ad duis veniam ad proident dolore culpa enim commodo sunt est ex.\r\nExcepteur deserunt deserunt ea dolor nulla. Laborum irure elit ut fugiat deserunt amet nisi. Magna do elit est esse pariatur qui mollit proident esse. Id laborum amet fugiat ipsum tempor reprehenderit.\r\n", + "address": "3 Celeste Court", + "city": "Herbster", + "state": "Arkansas", + "zip": 97896, + "country": "Bahamas", + "email": "sofiaalvarez@scentric.com", + "phone": "(990) 470-3077", + "color": "rgb(250,51,175)" + }, + { + "index": 216, + "name": "Love Baldwin", + "first": "Rivers", + "last": "Rosales", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/21lab/73.jpg", + "boolean": true, + "guid": "b67fea0d-b75f-4344-8a9f-fe87e3c61b52", + "integer": 84, + "date": "Wed Jan 15 1975 15:08:56 GMT-0800 (PST)", + "shortText": "do elit sint excepteur", + "mediumText": "Veniam eiusmod sit duis fugiat mollit et dolore in ad nulla culpa. Proident labore eu dolore commodo sint deserunt dolore amet ullamco nulla eiusmod excepteur. Excepteur nisi duis consectetur qui. Exercitation laborum est aliquip deserunt.", + "longText": "Quis ea et cillum aliqua culpa commodo velit cupidatat ut ea. Nisi non qui esse labore veniam veniam sit. Excepteur aliquip sit anim minim incididunt consectetur consectetur laboris minim nisi labore in labore magna. Incididunt tempor eiusmod dolor elit et duis ex mollit.\r\nId excepteur do adipisicing laboris labore aliquip eu do enim incididunt esse nulla exercitation. Anim consequat culpa non incididunt dolore ad qui proident magna voluptate do occaecat fugiat occaecat. Velit pariatur amet ullamco quis sint.\r\n", + "address": "2 Ingraham Street", + "city": "Hendersonville", + "state": "Delaware", + "zip": 71466, + "country": "Palau", + "email": "riversrosales@scentric.com", + "phone": "(929) 466-3166", + "color": "rgb(255,204,95)" + }, + { + "index": 217, + "name": "Louisa Lang", + "first": "Jenna", + "last": "Roberson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ionuss/73.jpg", + "boolean": false, + "guid": "1fb6ce5a-06bc-4d09-93bb-4da1b2003f10", + "integer": 47, + "date": "Wed Aug 26 1981 07:54:13 GMT-0700 (PDT)", + "shortText": "sint nostrud commodo exercitation", + "mediumText": "Nulla culpa incididunt et veniam nisi officia. Et non fugiat incididunt in fugiat ad ullamco dolor cillum duis irure officia veniam dolor. Pariatur qui veniam cillum sunt consequat eiusmod ipsum.", + "longText": "Quis consequat ea velit ea labore do dolore. Aute in dolore occaecat sint dolor labore. Sunt consectetur laborum qui nostrud dolore reprehenderit sint sunt eu reprehenderit. Ullamco proident labore occaecat nostrud. Sint velit in do ut duis laborum ut ullamco. Tempor sunt consectetur officia veniam. Et cillum occaecat mollit tempor proident sunt mollit.\r\nOccaecat incididunt esse occaecat et non culpa culpa aliqua ex. Aute cillum magna nostrud ea. Anim consequat aliquip enim veniam culpa velit ea irure quis id ipsum deserunt ad. Elit dolor proident laboris nostrud id pariatur aute ut deserunt. Mollit consequat occaecat eiusmod ad voluptate laboris duis. Quis nulla culpa occaecat ea ullamco voluptate cupidatat irure. Incididunt amet ipsum cupidatat sint officia reprehenderit consequat velit non reprehenderit commodo ut amet.\r\nAliqua commodo ipsum ex officia esse veniam elit ullamco. Laborum adipisicing Lorem sint nisi commodo sunt aute commodo cupidatat reprehenderit ut exercitation. Eu ea magna anim in fugiat mollit proident exercitation ullamco amet. Ex ullamco et nulla non deserunt ullamco occaecat officia enim. Officia ea ullamco cillum dolor et aliqua elit consectetur nulla ex dolor nostrud aute velit. Exercitation mollit consequat consectetur veniam pariatur ullamco sit sunt dolore sint deserunt ut esse. Sint ullamco voluptate est veniam ullamco sit.\r\n", + "address": "4 Miller Place", + "city": "Sims", + "state": "Federated States Of Micronesia", + "zip": 93413, + "country": "Tuvalu", + "email": "jennaroberson@scentric.com", + "phone": "(943) 474-3085", + "color": "rgb(143,132,181)" + }, + { + "index": 218, + "name": "Snyder Cortez", + "first": "Ronda", + "last": "Nielsen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bameyrick/73.jpg", + "boolean": false, + "guid": "633a4429-d43e-452c-9b6c-b53f2ee2e347", + "integer": 85, + "date": "Tue Jan 06 1981 00:45:11 GMT-0800 (PST)", + "shortText": "ullamco deserunt adipisicing sint esse", + "mediumText": "Nostrud mollit exercitation culpa ipsum adipisicing fugiat aliquip ex.", + "longText": "Cupidatat veniam officia quis fugiat proident eu. Lorem voluptate enim do aute ut veniam ut. Ullamco exercitation cupidatat ipsum culpa aliqua duis veniam ullamco proident in fugiat dolore ullamco. Quis in irure adipisicing occaecat.\r\nVeniam consectetur labore consectetur consequat enim irure sunt. Enim nulla pariatur aliquip aute proident aute deserunt fugiat nisi irure ipsum irure proident. Ad laboris do aute ullamco et reprehenderit velit commodo ipsum magna sunt duis.\r\nOfficia excepteur sunt ut tempor Lorem in mollit ipsum et tempor cupidatat veniam. Aliqua id dolore Lorem officia quis velit. Ut tempor elit fugiat incididunt quis ad eiusmod in.\r\nExercitation Lorem aliquip laboris laboris incididunt qui laboris adipisicing irure laboris qui non deserunt qui. Voluptate sit aliquip ullamco anim. Dolore nulla ea culpa fugiat adipisicing qui proident do elit proident fugiat magna dolore quis.\r\nExcepteur elit laboris proident adipisicing ipsum aute ipsum magna voluptate officia officia consequat amet ullamco. Amet nostrud elit do culpa consectetur occaecat sint culpa id labore sit qui pariatur. Sunt esse nisi in proident labore excepteur deserunt elit cupidatat non. Labore sunt commodo nisi eu incididunt qui cillum tempor anim voluptate. Adipisicing dolor consequat pariatur id enim laboris incididunt duis magna enim velit fugiat esse.\r\n", + "address": "3 Quentin Road", + "city": "Islandia", + "state": "Guam", + "zip": 18417, + "country": "Liechtenstein", + "email": "rondanielsen@scentric.com", + "phone": "(819) 547-2703", + "color": "rgb(69,55,248)" + }, + { + "index": 219, + "name": "Michael Nixon", + "first": "Paul", + "last": "Huber", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/p_cherkashin/73.jpg", + "boolean": false, + "guid": "77b470a6-85b9-4d08-9bda-af2cf7b97919", + "integer": 86, + "date": "Mon Aug 24 1987 23:29:34 GMT-0700 (PDT)", + "shortText": "et", + "mediumText": "Adipisicing dolore magna sunt duis quis cillum incididunt sit commodo minim nisi irure culpa.", + "longText": "Sit qui excepteur consequat veniam. Qui deserunt nostrud esse velit nulla culpa ex. Enim esse nostrud quis consectetur ea ex. Veniam reprehenderit deserunt dolore ipsum Lorem reprehenderit ipsum laborum adipisicing adipisicing qui.\r\n", + "address": "3 Baltic Street", + "city": "Marienthal", + "state": "Pennsylvania", + "zip": 77950, + "country": "Virgin Islands (US)", + "email": "paulhuber@scentric.com", + "phone": "(822) 531-2515", + "color": "rgb(213,114,213)" + }, + { + "index": 220, + "name": "Erna Collier", + "first": "Brady", + "last": "Haney", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tube_man/73.jpg", + "boolean": true, + "guid": "2b70bd78-953b-4f78-b980-0443e7865502", + "integer": 89, + "date": "Thu Apr 09 1981 13:14:33 GMT-0800 (PST)", + "shortText": "labore consectetur qui", + "mediumText": "Eiusmod eiusmod sit consectetur dolor adipisicing adipisicing ipsum laborum. Nostrud est non sunt est Lorem aliquip non incididunt. Ad consequat incididunt labore adipisicing eiusmod magna ad pariatur quis.", + "longText": "Nostrud ullamco quis aliqua veniam officia est commodo anim commodo est exercitation. Dolor reprehenderit dolore occaecat anim cillum deserunt. Nostrud laboris esse quis voluptate magna esse. Et mollit mollit ad consectetur adipisicing do ullamco Lorem mollit cillum cillum pariatur ipsum duis. In exercitation esse nisi nostrud aliquip non velit magna incididunt anim. Dolor mollit eu quis laborum quis duis esse nisi exercitation duis duis quis adipisicing.\r\nFugiat nisi do reprehenderit dolor amet velit fugiat incididunt quis et aute eu cillum consequat. Occaecat laborum cupidatat occaecat voluptate proident irure anim proident sit in. In culpa ex pariatur deserunt sint in consectetur eiusmod. Aliqua cupidatat aute ullamco eiusmod fugiat.\r\nEx officia ut Lorem ex nisi pariatur incididunt qui. Fugiat pariatur ut tempor excepteur anim enim qui sint occaecat eiusmod veniam ad enim amet. Anim magna nulla magna pariatur. Mollit excepteur minim cillum irure nisi quis irure quis velit consectetur. Laboris sint aliquip minim aliqua incididunt eiusmod dolor amet. Velit sint cillum consectetur commodo culpa do exercitation amet laboris est laborum magna officia sit.\r\n", + "address": "3 Lawrence Street", + "city": "Summerset", + "state": "New Hampshire", + "zip": 76548, + "country": "Svalbard and Jan Mayen Islands", + "email": "bradyhaney@scentric.com", + "phone": "(933) 464-2281", + "color": "rgb(61,84,220)" + }, + { + "index": 221, + "name": "Serena Holden", + "first": "Dorsey", + "last": "James", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nicolaseek/73.jpg", + "boolean": true, + "guid": "e34b73b6-5bae-4d6e-8d76-8b030ff4d104", + "integer": 49, + "date": "Mon May 27 1985 00:38:05 GMT-0700 (PDT)", + "shortText": "occaecat Lorem", + "mediumText": "Sunt minim duis et reprehenderit commodo aute dolore. Elit veniam occaecat adipisicing officia ex.", + "longText": "Consectetur ipsum quis in veniam ipsum voluptate velit deserunt minim aute. Consectetur in commodo aliquip voluptate anim. Culpa veniam enim in voluptate do nulla culpa deserunt. Mollit in sit exercitation dolore id eu duis nulla consectetur laborum sit ex eu et.\r\nLaborum id occaecat labore voluptate officia labore in id cillum occaecat. Nisi et amet elit excepteur irure adipisicing est cillum sit est velit cillum. Irure Lorem qui qui Lorem qui id. Est velit adipisicing voluptate Lorem consectetur ut exercitation occaecat amet adipisicing sit adipisicing. Cillum sint quis incididunt sint anim et. Adipisicing veniam pariatur id laboris amet est cillum. Eiusmod in mollit in velit culpa Lorem consequat ad mollit amet laboris qui.\r\nIn nisi exercitation irure pariatur consequat consequat labore ipsum anim commodo fugiat id. Aute est sit reprehenderit cupidatat cupidatat pariatur laborum nulla culpa minim sunt. Consectetur ipsum duis dolor velit labore nisi magna enim voluptate laborum exercitation et.\r\n", + "address": "3 Green Street", + "city": "Allensworth", + "state": "North Dakota", + "zip": 77281, + "country": "Ethiopia", + "email": "dorseyjames@scentric.com", + "phone": "(856) 447-3354", + "color": "rgb(81,131,93)" + }, + { + "index": 222, + "name": "Tabitha Alvarado", + "first": "Grant", + "last": "Bauer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/joshjoshmatson/73.jpg", + "boolean": true, + "guid": "f0707477-7ccf-4f35-b9d8-ecdcea4b5444", + "integer": 59, + "date": "Sat Mar 13 1971 23:17:16 GMT-0800 (PST)", + "shortText": "cupidatat exercitation pariatur commodo anim", + "mediumText": "Nisi nulla est ipsum laboris. Ut et ea pariatur aute. Fugiat dolore esse laborum sunt.", + "longText": "Cupidatat pariatur nostrud cillum fugiat sint culpa officia adipisicing ipsum occaecat. Sunt id tempor tempor consectetur sint eu esse ullamco deserunt proident Lorem sit. Exercitation et ex dolor exercitation elit labore aute veniam consectetur. Duis mollit ut eiusmod reprehenderit duis anim qui.\r\nIpsum anim veniam nostrud occaecat et proident qui cupidatat voluptate eu enim esse Lorem nulla. Nulla voluptate ex irure ex excepteur minim duis ut ipsum aliqua ullamco. Excepteur ipsum proident ea duis Lorem ad incididunt esse non officia amet excepteur exercitation. Sit amet sint velit velit officia fugiat. Laboris aliqua irure incididunt nulla aliqua exercitation labore nostrud incididunt. Labore eu amet magna deserunt.\r\nAliqua adipisicing et aute ut occaecat laboris nulla. Excepteur non Lorem fugiat incididunt officia minim sunt tempor dolore magna ullamco ad veniam enim. Sunt labore adipisicing consequat non proident excepteur ullamco cupidatat eiusmod nulla culpa elit aliquip minim. Fugiat qui sint Lorem velit ea.\r\n", + "address": "3 Oak Street", + "city": "Kapowsin", + "state": "Northern Mariana Islands", + "zip": 57454, + "country": "Togo", + "email": "grantbauer@scentric.com", + "phone": "(985) 414-2281", + "color": "rgb(61,94,134)" + }, + { + "index": 223, + "name": "Tami Berger", + "first": "Rocha", + "last": "Ayers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jacopobassan/73.jpg", + "boolean": false, + "guid": "e0993984-2847-4494-bcec-273869d52b83", + "integer": 68, + "date": "Sun Nov 14 1971 20:32:38 GMT-0800 (PST)", + "shortText": "reprehenderit", + "mediumText": "Sit pariatur pariatur commodo magna fugiat aliquip proident qui. In tempor eu commodo id elit qui. Dolore do irure Lorem officia minim sit nostrud ad qui enim enim. Ut est nisi voluptate qui quis anim dolor sunt ad duis commodo. Fugiat nostrud minim pariatur do occaecat aliqua id proident veniam dolor nisi dolor.", + "longText": "Ad culpa eu proident mollit est duis eu ad et tempor dolore. Amet exercitation nostrud dolore nulla fugiat veniam dolor. Velit sit tempor aliquip ut officia. Excepteur commodo anim veniam esse amet tempor ipsum magna ut cillum eiusmod. Aute eiusmod in aliqua Lorem do aliqua ut id aliquip consectetur ut. Deserunt irure veniam voluptate eu esse in ea eiusmod.\r\nOfficia ipsum laboris proident mollit deserunt esse tempor laborum. Fugiat sit aliqua occaecat est dolore amet incididunt ullamco exercitation qui sit dolore ullamco. Dolore est cupidatat commodo veniam pariatur aliqua cillum cillum sunt et enim exercitation. Ut eu consequat culpa anim. Adipisicing enim et deserunt ullamco adipisicing dolor eu. Laboris velit labore labore consectetur ea pariatur quis.\r\nCulpa anim consectetur ad sint tempor aliquip. Ad magna cillum ut Lorem exercitation esse id labore sint nulla enim. Pariatur in reprehenderit consectetur mollit ullamco irure Lorem Lorem anim fugiat. Aliquip est elit sunt nisi labore. Voluptate reprehenderit excepteur ullamco tempor id ut excepteur laborum tempor. Proident dolore voluptate sunt ullamco qui sint culpa consectetur anim velit.\r\nPariatur consectetur excepteur anim elit do consectetur sint aute veniam duis quis. Ut ipsum mollit amet culpa laborum. Dolor nostrud commodo commodo deserunt dolore quis voluptate occaecat voluptate deserunt. Anim ipsum proident non eu eu ea nulla aliqua aliqua amet sit officia ut. Proident tempor ullamco elit cillum occaecat reprehenderit fugiat minim pariatur laborum anim ipsum. Velit Lorem Lorem do mollit occaecat ullamco adipisicing ut officia. Exercitation culpa magna duis proident magna velit culpa laboris eiusmod cupidatat sunt cillum.\r\n", + "address": "3 Benson Avenue", + "city": "Alfarata", + "state": "South Dakota", + "zip": 99292, + "country": "Zimbabwe", + "email": "rochaayers@scentric.com", + "phone": "(912) 557-3383", + "color": "rgb(237,77,56)" + }, + { + "index": 224, + "name": "Toni Hubbard", + "first": "Manuela", + "last": "Matthews", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/benhalllondon/73.jpg", + "boolean": false, + "guid": "6a196cdc-9694-4c30-a010-23fe19d05ccf", + "integer": 64, + "date": "Wed Mar 30 1994 01:18:27 GMT-0800 (PST)", + "shortText": "amet laboris do pariatur", + "mediumText": "Quis quis ex anim ea officia anim aute. Duis nostrud adipisicing consectetur dolor aute laboris deserunt eu. Tempor reprehenderit occaecat dolor Lorem minim laboris adipisicing cupidatat veniam eu laborum amet qui. Do Lorem anim do cupidatat.", + "longText": "Sit cupidatat ullamco esse sit Lorem laboris. Nisi culpa excepteur aute ad consectetur. Ad mollit dolor incididunt nostrud elit laboris nostrud nulla officia. Exercitation cillum proident deserunt aute minim proident.\r\n", + "address": "2 Autumn Avenue", + "city": "Hebron", + "state": "Alaska", + "zip": 68123, + "country": "Azerbaijan", + "email": "manuelamatthews@scentric.com", + "phone": "(802) 454-3368", + "color": "rgb(190,58,156)" + }, + { + "index": 225, + "name": "Mcmillan Burris", + "first": "Tisha", + "last": "Reese", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/umurgdk/73.jpg", + "boolean": false, + "guid": "4c6aa7ad-4530-4d0d-a5d2-bc8d25596090", + "integer": 19, + "date": "Tue Mar 08 2005 12:31:16 GMT-0800 (PST)", + "shortText": "deserunt elit occaecat", + "mediumText": "Duis veniam voluptate sint nulla adipisicing ea eiusmod qui eiusmod sunt sunt amet labore.", + "longText": "Dolor sint nostrud velit sit deserunt dolore. Duis velit commodo do tempor enim. Ex non occaecat ea commodo sint id officia aute. Eu eiusmod irure cupidatat reprehenderit ea duis qui velit nulla quis duis. Adipisicing fugiat consequat officia quis commodo reprehenderit cillum consectetur consectetur ut. Labore elit elit proident et aute voluptate ex sit quis voluptate commodo voluptate cupidatat commodo. Nulla deserunt elit in non cillum fugiat laborum pariatur esse in.\r\nQui aliqua quis eu enim cillum occaecat labore. Qui cupidatat nisi cillum commodo. Lorem nisi eu sint esse excepteur do.\r\nIncididunt quis deserunt in dolor dolore in mollit commodo sint tempor. Ullamco pariatur magna ad amet voluptate mollit aliquip. Ad ad irure magna anim id esse exercitation ipsum velit fugiat voluptate culpa ipsum. Officia ullamco fugiat minim dolor aliqua nulla amet eu nulla commodo. Duis ea et sunt laborum.\r\nLabore excepteur non aliquip sunt ad anim. Consectetur ipsum officia amet consectetur est. Fugiat duis exercitation nulla aliqua esse tempor aliquip et sunt qui.\r\nDeserunt nostrud sunt elit enim id id pariatur proident enim duis. Duis aute cillum sunt id commodo sint aute ipsum Lorem sint magna commodo. Dolor cillum cupidatat laboris incididunt amet excepteur voluptate occaecat excepteur. Veniam et nulla non tempor.\r\n", + "address": "3 Graham Avenue", + "city": "Brenton", + "state": "Louisiana", + "zip": 80517, + "country": "French Southern Territories", + "email": "tishareese@scentric.com", + "phone": "(886) 572-2143", + "color": "rgb(148,208,184)" + }, + { + "index": 226, + "name": "Conrad Holder", + "first": "Rebecca", + "last": "Cole", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_vectorhugo/73.jpg", + "boolean": false, + "guid": "2db95cdc-541c-4e6c-bb8a-9afb329188a9", + "integer": 96, + "date": "Thu Sep 30 1971 17:22:25 GMT-0700 (PDT)", + "shortText": "cillum minim aute laboris", + "mediumText": "Anim ullamco labore do labore nisi id cillum.", + "longText": "Ipsum enim minim fugiat voluptate quis consequat eiusmod aliquip exercitation ad sit labore nostrud. Dolore qui enim irure dolore anim enim amet et cupidatat. Id nisi fugiat proident Lorem sunt sunt voluptate mollit mollit sit elit veniam sint Lorem. Consectetur pariatur commodo ullamco duis nostrud. Reprehenderit elit labore consectetur incididunt veniam quis adipisicing enim ea ut do enim.\r\nTempor in pariatur reprehenderit occaecat anim labore aliqua elit irure. Duis fugiat deserunt commodo occaecat pariatur sint. Dolore aliqua aute ut aliqua qui.\r\n", + "address": "2 Butler Place", + "city": "Grazierville", + "state": "Missouri", + "zip": 37800, + "country": "Finland", + "email": "rebeccacole@scentric.com", + "phone": "(863) 438-3293", + "color": "rgb(252,113,153)" + }, + { + "index": 227, + "name": "Finley Norman", + "first": "Kemp", + "last": "Ramsey", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/traicyer/73.jpg", + "boolean": true, + "guid": "8d123ac2-6255-4f83-a056-c073a8853e3c", + "integer": 94, + "date": "Mon Nov 19 1979 06:35:50 GMT-0800 (PST)", + "shortText": "dolor id consequat occaecat", + "mediumText": "Magna cupidatat incididunt non excepteur deserunt eiusmod reprehenderit aliquip aute et. Culpa mollit laboris qui et veniam reprehenderit do eu sit id.", + "longText": "Mollit minim culpa ipsum aute ullamco. Tempor esse dolor exercitation in enim culpa ipsum sint eu laborum. Ea enim laboris veniam non duis quis. Laboris tempor culpa aliquip eiusmod tempor est ea mollit anim aute voluptate ea. Adipisicing incididunt irure cillum nisi sunt enim duis. Fugiat nostrud officia enim ea.\r\nNisi ullamco Lorem minim deserunt cillum esse officia labore anim commodo incididunt. Eu veniam consectetur ea commodo esse deserunt Lorem ex voluptate ad ad fugiat quis. Velit magna mollit eiusmod fugiat nulla ipsum cupidatat anim non eu nisi. Sint esse est ullamco eiusmod dolore et velit mollit pariatur fugiat sunt ipsum occaecat. Proident quis magna in occaecat aliqua nisi exercitation ea in.\r\n", + "address": "4 Fay Court", + "city": "Libertytown", + "state": "Kentucky", + "zip": 74614, + "country": "United Arab Emirates", + "email": "kempramsey@scentric.com", + "phone": "(983) 496-2931", + "color": "rgb(56,255,141)" + }, + { + "index": 228, + "name": "Tara Campos", + "first": "Roach", + "last": "Dodson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/brunodesign1206/73.jpg", + "boolean": true, + "guid": "777f0227-f8c4-47a4-b0d6-5b0b0703a74d", + "integer": 47, + "date": "Mon Aug 12 1974 17:16:53 GMT-0700 (PDT)", + "shortText": "aliquip nostrud", + "mediumText": "Culpa aute ut ea nisi excepteur reprehenderit consectetur veniam proident deserunt adipisicing excepteur tempor. Laboris adipisicing elit eu proident amet aliquip tempor elit in ut eiusmod proident ea. Aliquip sint quis sit nulla esse ut ullamco qui nostrud nisi sit. Velit cupidatat tempor sit esse. Anim ad officia dolore do mollit et excepteur cupidatat veniam.", + "longText": "Exercitation mollit et Lorem qui aliqua ex pariatur aliquip. Quis elit amet esse eiusmod labore. Excepteur sint sunt aute qui eiusmod ullamco commodo dolore duis ea eiusmod.\r\nConsequat irure minim mollit id amet pariatur qui. Exercitation aute nostrud veniam minim Lorem commodo velit. Nostrud sunt officia dolor aliquip veniam veniam cupidatat. Nisi ut nostrud occaecat cupidatat laborum amet ad reprehenderit voluptate nulla quis nostrud in. Mollit reprehenderit qui sit esse duis laboris sunt fugiat aute qui ex eiusmod non nisi. Dolore veniam ad anim veniam cillum nulla incididunt exercitation velit.\r\nNostrud tempor deserunt est minim aute anim dolore. Minim enim cillum voluptate officia tempor tempor excepteur duis non est elit velit do. Excepteur eiusmod cillum sunt deserunt reprehenderit labore eu aliquip commodo fugiat. Consequat minim exercitation eu fugiat occaecat aliquip elit elit dolore aliquip ea ea. Aliqua ex irure cillum labore ut mollit esse veniam sit.\r\nAliqua nisi non eu ad est enim reprehenderit culpa laborum. Mollit aute esse velit est labore quis irure. Nostrud tempor labore labore aliquip laboris excepteur ad. Lorem incididunt proident pariatur laboris do. Officia magna nostrud eiusmod velit commodo incididunt magna reprehenderit ullamco. Dolore culpa culpa cillum minim voluptate in.\r\n", + "address": "2 Agate Court", + "city": "Genoa", + "state": "American Samoa", + "zip": 48715, + "country": "Portugal", + "email": "roachdodson@scentric.com", + "phone": "(878) 581-2211", + "color": "rgb(224,94,95)" + }, + { + "index": 229, + "name": "Glass Navarro", + "first": "Potter", + "last": "Lowe", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/michalhron/73.jpg", + "boolean": false, + "guid": "181d7287-30f7-4285-bfa9-e21d28869bd0", + "integer": 86, + "date": "Wed Aug 11 1971 11:38:44 GMT-0700 (PDT)", + "shortText": "eu mollit sit", + "mediumText": "Aliquip nulla excepteur elit fugiat. Aliqua do enim eu dolor ipsum nostrud exercitation et veniam ad dolor. Culpa cillum labore aliquip sint do aliqua occaecat culpa ad officia eiusmod irure qui. Occaecat nostrud ad ullamco consequat.", + "longText": "Labore adipisicing pariatur nostrud in irure quis culpa culpa proident. Nulla et est exercitation id Lorem quis in. Culpa non veniam velit do dolore culpa commodo sunt consectetur ullamco laboris. Aliqua est fugiat reprehenderit occaecat qui. Et do Lorem veniam anim cillum do ullamco tempor elit amet.\r\nAliqua exercitation in aute excepteur aute elit nisi ex minim. Proident ex quis eiusmod cupidatat laboris esse consectetur dolor Lorem reprehenderit commodo labore nostrud consectetur. Ea duis tempor proident ad ea mollit adipisicing nisi exercitation voluptate irure ipsum irure velit. Tempor anim eiusmod sint aliquip cillum consectetur deserunt.\r\nAdipisicing laboris ex eiusmod elit ipsum cupidatat anim qui dolor fugiat quis nisi culpa. Sint consequat irure laborum in enim elit irure incididunt sit. Magna consequat quis deserunt ad mollit deserunt. Non id anim consectetur culpa ut do anim do sint veniam. Est amet ea minim minim labore Lorem.\r\n", + "address": "2 Allen Avenue", + "city": "Kilbourne", + "state": "Minnesota", + "zip": 75102, + "country": "Comoros", + "email": "potterlowe@scentric.com", + "phone": "(987) 576-3068", + "color": "rgb(171,255,82)" + }, + { + "index": 230, + "name": "Amparo Pope", + "first": "Maribel", + "last": "Burks", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/itskylemacey/73.jpg", + "boolean": true, + "guid": "f12a9fbc-2a4f-4fa5-8a07-f9241aa3cab1", + "integer": 91, + "date": "Sat Jun 12 2010 19:41:10 GMT-0700 (PDT)", + "shortText": "qui laborum ipsum est", + "mediumText": "Reprehenderit esse occaecat et incididunt ut eu cillum exercitation ut veniam irure. Sunt eu ullamco enim exercitation amet pariatur adipisicing nulla cillum.", + "longText": "Ipsum aliqua eu anim cupidatat tempor cillum tempor in officia anim. Culpa tempor adipisicing qui elit culpa eiusmod aliquip commodo. Dolore commodo consequat mollit ex nostrud aute incididunt officia anim incididunt reprehenderit. Labore Lorem labore minim et consectetur quis laboris incididunt pariatur esse nostrud. Dolore aute mollit esse esse.\r\nIncididunt sunt cillum nisi ea. Fugiat culpa excepteur id est magna sit proident labore commodo. Nostrud cupidatat consectetur nisi ipsum reprehenderit minim sint Lorem consequat cillum eiusmod aliqua pariatur Lorem. Proident magna est sit elit est eiusmod aliquip occaecat ullamco ea officia occaecat ut esse. Sunt tempor cupidatat enim ad reprehenderit incididunt voluptate aute dolor occaecat pariatur dolor.\r\n", + "address": "2 Gerritsen Avenue", + "city": "Westerville", + "state": "Hawaii", + "zip": 56057, + "country": "Central African Republic", + "email": "maribelburks@scentric.com", + "phone": "(843) 435-2675", + "color": "rgb(79,131,175)" + }, + { + "index": 231, + "name": "Dillard Johns", + "first": "Viola", + "last": "Pruitt", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mikaeljorhult/73.jpg", + "boolean": true, + "guid": "9b589ef4-79b4-4bc1-89ea-0b50bf8f5dad", + "integer": 74, + "date": "Thu Aug 21 1980 02:27:46 GMT-0700 (PDT)", + "shortText": "id nisi", + "mediumText": "Magna excepteur laboris enim magna quis ea sint. Velit ex nisi elit reprehenderit nostrud amet quis eu cillum exercitation. Ex elit adipisicing exercitation esse.", + "longText": "Sint nisi cillum ipsum laboris. Reprehenderit irure occaecat reprehenderit excepteur adipisicing exercitation incididunt sunt dolore. Deserunt elit reprehenderit tempor elit ex ea consequat eiusmod incididunt velit et consectetur officia quis. Id sunt enim quis ex nulla in ullamco voluptate anim esse nulla. Eu excepteur dolore deserunt consectetur esse et esse do cupidatat deserunt pariatur irure deserunt sunt.\r\nNon ut tempor Lorem fugiat cupidatat nostrud pariatur veniam fugiat sunt incididunt ut. Exercitation anim officia incididunt irure nulla sunt commodo eu non. Consectetur amet est laboris amet ipsum reprehenderit non exercitation non exercitation duis ut.\r\nEu laborum dolor amet sint deserunt mollit officia est. Velit minim id et deserunt ullamco sint elit tempor dolore consectetur. Cillum aute ut consequat aliqua laboris. Fugiat aute aliqua id ipsum laboris labore labore tempor mollit sunt sint. Sunt consectetur exercitation pariatur commodo occaecat voluptate velit dolore. Exercitation consectetur dolore reprehenderit aliqua eu consequat minim dolore ullamco nisi amet deserunt amet. Occaecat amet nulla incididunt ut cupidatat.\r\nPariatur irure sunt duis Lorem ad veniam ea duis. Anim irure amet commodo proident incididunt laborum elit in voluptate occaecat minim occaecat consequat. Dolore Lorem ex ipsum nulla deserunt dolore aute. Voluptate consectetur irure ea reprehenderit mollit eiusmod occaecat sunt ea adipisicing cupidatat. Proident laboris magna duis aliquip fugiat pariatur exercitation mollit laboris amet sint ea. Sit ex ex consequat sit.\r\nExcepteur amet in id pariatur ullamco excepteur excepteur proident in. Veniam non labore nostrud culpa excepteur sit enim ad duis non commodo nulla. Minim incididunt in ad reprehenderit. Culpa esse magna duis exercitation laboris. Adipisicing eiusmod consectetur culpa cupidatat nostrud sint veniam adipisicing.\r\n", + "address": "2 Grove Street", + "city": "Matthews", + "state": "Alabama", + "zip": 12918, + "country": "Gabon", + "email": "violapruitt@scentric.com", + "phone": "(908) 451-2708", + "color": "rgb(144,170,102)" + }, + { + "index": 232, + "name": "Jeanie Huffman", + "first": "Karyn", + "last": "Edwards", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ryoseptiian/73.jpg", + "boolean": true, + "guid": "7e4ee6b2-7816-43c3-9885-e74857955244", + "integer": 20, + "date": "Sat Apr 12 1975 06:27:04 GMT-0700 (PDT)", + "shortText": "ut sint consectetur", + "mediumText": "Cillum id mollit deserunt officia sint aliquip. Do duis reprehenderit voluptate cupidatat cupidatat Lorem quis fugiat incididunt ut occaecat mollit.", + "longText": "Fugiat sunt proident consequat culpa eiusmod consequat reprehenderit enim sunt. Sit ea ex ex qui labore in. Laborum sint occaecat proident eiusmod ex sit sint commodo officia aliqua culpa. Aliqua reprehenderit exercitation labore Lorem mollit fugiat.\r\nOfficia laborum reprehenderit amet laboris ex. Ullamco qui adipisicing ex laboris do minim proident veniam. Quis voluptate deserunt elit in culpa. Lorem id sint ut exercitation non qui.\r\nEu officia do irure veniam proident in veniam irure. Dolore sint do ad amet proident velit labore incididunt pariatur proident ea velit mollit adipisicing. Anim dolor in reprehenderit sunt ea nostrud est pariatur non do ad.\r\nConsequat amet reprehenderit cillum incididunt et ullamco consequat consequat proident irure. Est veniam tempor ea ad. Reprehenderit sunt tempor exercitation laborum labore anim ad duis consequat.\r\n", + "address": "2 Linden Boulevard", + "city": "Ripley", + "state": "North Carolina", + "zip": 45918, + "country": "Cambodia", + "email": "karynedwards@scentric.com", + "phone": "(877) 447-2061", + "color": "rgb(177,244,78)" + }, + { + "index": 233, + "name": "Alfreda Neal", + "first": "Dunlap", + "last": "Mcclure", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/olivierpineda/73.jpg", + "boolean": false, + "guid": "c5d9f660-404e-4dd8-a4e9-8ebd95a6d6eb", + "integer": 83, + "date": "Sun Dec 31 1978 03:35:38 GMT-0800 (PST)", + "shortText": "fugiat aliquip", + "mediumText": "Eu nulla fugiat dolor magna commodo veniam laboris sint minim Lorem pariatur do. Do elit esse magna voluptate aute nisi cillum. Voluptate culpa aliquip ea quis sunt cillum dolore cupidatat.", + "longText": "Lorem exercitation et mollit tempor Lorem consectetur irure anim. Irure officia elit tempor consequat irure non qui labore id consequat nisi cupidatat. Voluptate labore id adipisicing mollit consequat nulla mollit aute ut occaecat sint incididunt est irure. Tempor irure eiusmod commodo cillum. Officia quis reprehenderit quis elit mollit ea pariatur eu aliquip non aute. Incididunt amet consequat ad velit consequat dolore elit velit qui ea. In qui non adipisicing id anim eiusmod commodo qui Lorem deserunt culpa adipisicing.\r\n", + "address": "2 Bogart Street", + "city": "Shrewsbury", + "state": "Connecticut", + "zip": 80957, + "country": "New Zealand", + "email": "dunlapmcclure@scentric.com", + "phone": "(913) 592-3075", + "color": "rgb(208,154,61)" + }, + { + "index": 234, + "name": "Livingston Osborn", + "first": "Mathis", + "last": "Webster", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/aaronalfred/73.jpg", + "boolean": true, + "guid": "c008efb7-14cd-4e64-96a7-2ea18524bdcd", + "integer": 54, + "date": "Sat Mar 01 1986 18:24:28 GMT-0800 (PST)", + "shortText": "ut eiusmod", + "mediumText": "Do mollit cupidatat nostrud esse ex velit esse adipisicing elit labore laboris enim anim. Magna dolore nulla cillum qui laborum et sint anim culpa non aute et. Tempor nisi eiusmod laboris ex aliquip commodo id. Eiusmod aliqua aliqua sunt non ipsum veniam aliqua consequat.", + "longText": "Elit do reprehenderit eiusmod minim quis cillum ad culpa. Cupidatat eu laborum amet duis consectetur culpa fugiat dolore aute. Lorem veniam exercitation cupidatat veniam et nulla. Veniam occaecat exercitation minim nisi dolor proident adipisicing sit non. Occaecat dolore ea minim in deserunt.\r\nSint aliqua magna Lorem nostrud nisi consequat mollit. Labore Lorem amet consectetur reprehenderit duis est ullamco velit eu officia ut labore esse id. Deserunt officia ea est enim nisi elit amet deserunt do labore duis anim. Aliquip non dolore cillum dolore dolor ex tempor velit aliqua enim.\r\nIncididunt consectetur commodo irure et ut adipisicing proident velit. Qui quis consequat id irure. Mollit amet proident irure incididunt deserunt magna.\r\nLaboris ut sint incididunt sit proident officia ex non. Consequat laborum Lorem aute voluptate est laborum quis Lorem nulla. Id velit est cillum elit adipisicing aliquip occaecat nulla nulla pariatur incididunt. In veniam occaecat occaecat ad amet culpa tempor. Non cupidatat pariatur officia et cillum adipisicing veniam elit sint. In cillum minim in occaecat adipisicing. Exercitation labore in ipsum veniam non veniam amet quis.\r\n", + "address": "4 Beverly Road", + "city": "Greer", + "state": "South Carolina", + "zip": 53490, + "country": "Lebanon", + "email": "mathiswebster@scentric.com", + "phone": "(862) 466-2481", + "color": "rgb(99,84,116)" + }, + { + "index": 235, + "name": "Stephenson Blanchard", + "first": "Kirkland", + "last": "Washington", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mrebay007/73.jpg", + "boolean": false, + "guid": "8dc10004-46f6-432d-ad1a-b1e2ed707ea2", + "integer": 48, + "date": "Mon Feb 20 2012 00:23:49 GMT-0800 (PST)", + "shortText": "officia", + "mediumText": "Incididunt cupidatat non esse ut adipisicing mollit aliquip ipsum eiusmod ullamco id aute nostrud veniam. Labore ipsum sunt duis elit labore dolor incididunt et consequat enim veniam. Ullamco quis nulla culpa ad labore laborum reprehenderit enim aliqua sit ad duis laboris. Proident non voluptate amet pariatur veniam laborum culpa sint anim mollit.", + "longText": "Nostrud mollit aliquip consectetur voluptate cillum. Qui labore aute adipisicing exercitation officia sint ipsum pariatur consectetur magna ad ad proident. Aute commodo esse veniam deserunt elit. Quis magna occaecat culpa eiusmod ipsum elit occaecat culpa. Excepteur laborum tempor ad consequat consectetur quis tempor anim. Mollit ex magna mollit ad voluptate excepteur.\r\nAmet incididunt veniam sunt deserunt non dolor. Tempor duis laboris laboris amet ullamco labore culpa sit id veniam aliquip adipisicing sunt nisi. Laboris et irure veniam pariatur quis anim officia ad. Ullamco labore anim ipsum labore ex velit nisi fugiat. Ea aliquip sunt fugiat eiusmod ex ullamco id reprehenderit pariatur nulla non sunt ad ullamco. Aliqua enim occaecat tempor ex eu magna eu nulla ex exercitation aute.\r\nQui excepteur dolore aute sunt. Laborum ea do reprehenderit adipisicing ullamco sunt nulla deserunt labore. Adipisicing eiusmod consequat in velit proident voluptate cillum. Ipsum eu adipisicing dolore aute dolor fugiat id deserunt aute veniam. Labore irure sunt non aliqua ut est cupidatat eiusmod ipsum occaecat veniam amet ex fugiat. Consequat voluptate et dolor sint cupidatat anim eiusmod enim veniam.\r\nIncididunt quis non quis ea exercitation. Cupidatat sint duis est commodo sit nulla aliqua ut amet quis fugiat. Amet aliquip aliqua duis minim aute fugiat. Quis veniam sunt ipsum voluptate. Laborum fugiat officia reprehenderit aliqua ad do quis consectetur laboris in consectetur amet anim proident. Deserunt veniam ut pariatur sunt magna aute sit pariatur. Cupidatat dolor mollit aliqua est occaecat dolore laboris sint.\r\n", + "address": "3 Humboldt Street", + "city": "Bath", + "state": "Michigan", + "zip": 99644, + "country": "Armenia", + "email": "kirklandwashington@scentric.com", + "phone": "(927) 536-3348", + "color": "rgb(161,139,176)" + }, + { + "index": 236, + "name": "Mary Bolton", + "first": "Shawn", + "last": "Bean", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thisisgordon/73.jpg", + "boolean": true, + "guid": "9a1ae6b3-19d6-49d3-ade8-41d80ef9a7f9", + "integer": 89, + "date": "Tue Jan 23 1973 17:15:25 GMT-0800 (PST)", + "shortText": "sunt eu amet proident tempor", + "mediumText": "Commodo elit commodo sit sit consectetur excepteur ipsum id exercitation officia amet. Enim amet occaecat reprehenderit ipsum cillum tempor.", + "longText": "Eiusmod quis enim excepteur ipsum magna mollit adipisicing proident deserunt velit ea consequat. Cillum cillum commodo sit ipsum enim ullamco elit consequat non. Ullamco adipisicing occaecat ullamco duis enim velit voluptate eiusmod quis ipsum sunt eu.\r\nEiusmod consectetur id ea ut velit ad eu. Cillum adipisicing id nostrud qui aliquip excepteur anim. Non nulla dolor proident culpa. Adipisicing ea laborum minim occaecat cupidatat sint. Id commodo ipsum laboris ullamco esse excepteur. Duis deserunt consequat proident irure sit ad fugiat.\r\nEx ipsum amet minim cillum ut mollit minim ullamco. Dolor nostrud non dolor est tempor ad ipsum. Minim pariatur ut reprehenderit Lorem.\r\nUllamco eu tempor id fugiat officia in eu incididunt ut elit culpa. Amet eiusmod tempor eiusmod sunt. Nostrud eiusmod eiusmod exercitation sit voluptate dolore. Sint magna officia et consectetur aute nostrud qui. Officia est non non laborum aliqua eu nisi magna do id. Do amet sit culpa pariatur do sunt et eiusmod veniam. Laborum voluptate est ad est eiusmod do commodo aliqua proident id incididunt.\r\n", + "address": "2 Rapelye Street", + "city": "Steinhatchee", + "state": "Maine", + "zip": 24857, + "country": "Cayman Islands", + "email": "shawnbean@scentric.com", + "phone": "(881) 597-2110", + "color": "rgb(52,77,146)" + }, + { + "index": 237, + "name": "Jaime Horn", + "first": "Nina", + "last": "Larsen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rainfalls/73.jpg", + "boolean": true, + "guid": "2d358e80-f8a9-4f14-879c-3e0d6dc7d398", + "integer": 6, + "date": "Tue Jan 10 2006 08:17:15 GMT-0800 (PST)", + "shortText": "do pariatur irure laborum qui", + "mediumText": "Magna aliquip cupidatat laborum fugiat. Et consequat est magna minim veniam mollit nulla ipsum dolore anim adipisicing enim in. Sit veniam sint velit tempor dolor laboris aute deserunt laboris incididunt aute.", + "longText": "Irure fugiat consectetur velit dolor commodo voluptate aliquip irure incididunt veniam. Cillum ipsum cupidatat qui velit consequat. Dolor laboris voluptate irure exercitation aute fugiat. Eu reprehenderit eu Lorem ex. Sint non exercitation mollit non officia nostrud non pariatur cupidatat sit enim dolor in.\r\nId qui pariatur labore commodo ex irure amet. Ex eiusmod esse consequat consequat. Irure culpa occaecat id nostrud id laborum Lorem nulla nostrud nostrud. Velit nulla voluptate cupidatat laboris do. Nisi amet anim fugiat irure esse anim exercitation non. Incididunt in id sit Lorem anim consectetur tempor ex do. Lorem pariatur do consectetur non consectetur velit magna sit eiusmod fugiat irure veniam eiusmod.\r\nMinim consequat ad nostrud sint occaecat et ea non ad et. Nostrud Lorem laborum esse amet ad dolore dolore fugiat commodo consectetur. Fugiat sint et incididunt nulla et est laborum esse ad aliqua. Quis est cupidatat sit ad reprehenderit eu commodo. Id occaecat adipisicing excepteur proident proident aliquip duis ea nostrud consectetur. Ex amet velit ad ipsum minim commodo cillum aliqua magna aliquip eiusmod nisi anim.\r\nIrure reprehenderit non aute laboris ipsum nostrud adipisicing amet voluptate. Eiusmod laborum veniam aliqua laboris consectetur do esse et mollit laborum esse. Quis excepteur officia sunt eu eiusmod enim laboris in aute. Minim nisi ipsum labore laborum. Officia eiusmod nostrud qui consectetur.\r\n", + "address": "3 Grimes Road", + "city": "Stagecoach", + "state": "Kansas", + "zip": 54299, + "country": "Italy", + "email": "ninalarsen@scentric.com", + "phone": "(833) 427-3141", + "color": "rgb(238,80,95)" + }, + { + "index": 238, + "name": "Ewing Prince", + "first": "Burch", + "last": "Hinton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/eldelentes/73.jpg", + "boolean": false, + "guid": "c51adfad-516d-4572-a27b-d5029bf01030", + "integer": 70, + "date": "Sun Aug 28 2005 15:03:02 GMT-0700 (PDT)", + "shortText": "labore labore", + "mediumText": "Deserunt elit sint laborum occaecat qui mollit. In anim ad ea dolor enim nisi ut veniam. Adipisicing nisi dolore quis excepteur labore sit commodo officia qui irure elit. Ipsum commodo consectetur reprehenderit magna excepteur reprehenderit laborum culpa ullamco Lorem eu tempor eiusmod non.", + "longText": "Aliqua enim eu do veniam excepteur consequat non cillum elit consequat ipsum ea esse. Elit sit et nulla laboris ad consectetur minim ut tempor consequat do. Enim aute pariatur nostrud aliqua nulla amet adipisicing.\r\nCulpa nulla dolore exercitation dolore nulla officia. Consequat ut mollit eu cillum qui nisi consequat deserunt tempor ut fugiat. Commodo reprehenderit dolore mollit ut. Et irure consequat qui ad ipsum enim cillum in in. Aute exercitation in sunt exercitation consequat aliquip culpa ipsum deserunt esse cupidatat id.\r\nQuis deserunt quis deserunt reprehenderit sint do. Qui cillum ut minim officia amet ullamco eu nulla eu laborum ipsum excepteur. Enim aliqua occaecat commodo non anim pariatur sunt aute minim eiusmod nisi eu est. Minim esse duis nisi exercitation id dolor. Duis ullamco proident exercitation proident duis laborum irure enim ut amet.\r\n", + "address": "3 Downing Street", + "city": "Dyckesville", + "state": "Iowa", + "zip": 40075, + "country": "Lesotho", + "email": "burchhinton@scentric.com", + "phone": "(876) 448-2187", + "color": "rgb(251,248,74)" + }, + { + "index": 239, + "name": "Sharlene Bryan", + "first": "Celina", + "last": "Jimenez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/robinclediere/73.jpg", + "boolean": true, + "guid": "fc6767db-fb4a-4de3-bcc2-5a503cd8bbe6", + "integer": 40, + "date": "Mon Oct 02 1972 11:23:02 GMT-0700 (PDT)", + "shortText": "id", + "mediumText": "Exercitation exercitation exercitation proident adipisicing quis. Non aliquip dolore nostrud amet exercitation officia do elit duis nisi. Proident sit sunt magna pariatur commodo in culpa exercitation nostrud culpa adipisicing.", + "longText": "Officia adipisicing aliquip duis amet enim officia fugiat non aute exercitation. Elit ut cillum incididunt exercitation veniam id aliqua nulla voluptate reprehenderit sunt deserunt officia adipisicing. Sint ullamco eiusmod occaecat velit cupidatat ullamco pariatur ut duis fugiat. Non ullamco non aliqua cupidatat occaecat ipsum ea ut. Tempor enim ut voluptate laborum laborum reprehenderit cillum ea voluptate tempor magna ullamco enim amet. Dolor cupidatat sint do mollit.\r\n", + "address": "4 Putnam Avenue", + "city": "Fairfield", + "state": "Vermont", + "zip": 49521, + "country": "Mongolia", + "email": "celinajimenez@scentric.com", + "phone": "(853) 562-3172", + "color": "rgb(187,177,206)" + }, + { + "index": 240, + "name": "Anastasia Marquez", + "first": "Mcdonald", + "last": "Goff", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nerrsoft/73.jpg", + "boolean": true, + "guid": "356dd512-ac27-409d-a8ae-9a518b9f0d09", + "integer": 71, + "date": "Sun Aug 11 2013 06:10:11 GMT-0700 (PDT)", + "shortText": "eu esse tempor", + "mediumText": "Excepteur esse voluptate ut officia nulla excepteur minim enim. Dolore tempor dolore ex sunt pariatur irure.", + "longText": "Irure consequat qui labore nulla veniam. Adipisicing magna eiusmod quis anim et nostrud occaecat fugiat pariatur id esse commodo et ad. Sunt adipisicing tempor Lorem tempor eiusmod ut fugiat laboris voluptate sunt. Cillum ipsum voluptate duis veniam consequat nostrud pariatur commodo aute quis. Sit aute ex quis voluptate minim incididunt veniam. Excepteur nulla qui proident id est. Id aliquip excepteur proident culpa sunt enim non ad.\r\nNon nulla proident adipisicing non nulla adipisicing magna laboris ad duis occaecat duis velit. Sunt eiusmod nulla laboris quis adipisicing adipisicing excepteur. Ea ea labore magna labore consectetur eiusmod laboris qui dolore aliquip aliquip. Reprehenderit Lorem voluptate sunt tempor non reprehenderit officia duis quis tempor.\r\nEt laboris incididunt excepteur laborum ad eu aliqua commodo pariatur. Esse in fugiat elit voluptate ad excepteur magna cillum ipsum ipsum et non fugiat ipsum. Adipisicing ut ut ex in qui fugiat incididunt exercitation excepteur consequat adipisicing.\r\nExcepteur mollit amet enim dolore ad laborum esse exercitation. Aute deserunt ullamco culpa nostrud dolore sunt nisi laboris esse Lorem culpa irure. Irure consectetur nulla Lorem laborum enim ut ut incididunt id pariatur. Est eiusmod velit ad magna deserunt excepteur sunt ex tempor elit aliquip amet. Exercitation laborum sit commodo nostrud velit pariatur Lorem cupidatat exercitation.\r\nEiusmod ex mollit aute sint aliqua nulla ea irure eiusmod dolore proident aute officia voluptate. Ipsum consequat sunt ea aliquip ea enim sint irure Lorem. Incididunt enim consequat mollit amet et occaecat qui est cupidatat ad. Cupidatat voluptate consequat cupidatat et amet in. Cupidatat id laboris duis nostrud et reprehenderit fugiat. Sit laborum non duis et.\r\n", + "address": "3 Corbin Place", + "city": "Nadine", + "state": "Nebraska", + "zip": 41484, + "country": "Germany", + "email": "mcdonaldgoff@scentric.com", + "phone": "(891) 532-3564", + "color": "rgb(165,152,170)" + }, + { + "index": 241, + "name": "Faith Hayes", + "first": "Lessie", + "last": "Garza", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hsinyo23/73.jpg", + "boolean": false, + "guid": "97574a4a-fc23-4e79-add5-5296baa4336a", + "integer": 36, + "date": "Mon Oct 29 1984 10:50:51 GMT-0800 (PST)", + "shortText": "enim consequat velit occaecat", + "mediumText": "Exercitation aute eu cupidatat labore laboris ut incididunt voluptate quis sint sit. Enim id incididunt officia aliqua adipisicing ipsum. Et duis laboris tempor velit fugiat.", + "longText": "Magna do nisi exercitation qui. Amet nostrud magna magna deserunt Lorem consectetur consectetur. Laborum exercitation magna occaecat ex commodo. Proident reprehenderit Lorem et fugiat deserunt eiusmod proident pariatur aute sint dolor. Nisi deserunt labore mollit labore eiusmod. Culpa ad aute deserunt occaecat fugiat. Ad qui labore exercitation do sint aliquip culpa ex nulla enim laboris voluptate ad.\r\nLaborum proident sit laborum excepteur. Eiusmod id in dolore sunt pariatur laboris esse. Consectetur in officia non ea aute id occaecat adipisicing nulla velit. Qui reprehenderit cupidatat quis quis elit aute tempor amet incididunt incididunt qui pariatur.\r\nConsequat veniam labore laborum cillum nostrud. Aute sit enim tempor occaecat magna ea reprehenderit consectetur sint consectetur cillum. Qui proident eiusmod quis quis duis. Ex ex laboris elit culpa laborum laboris dolore nisi id ipsum pariatur quis cupidatat. Velit id fugiat Lorem veniam. Elit pariatur culpa incididunt eiusmod anim ullamco dolore. Magna deserunt cillum non cupidatat nulla exercitation ullamco ipsum adipisicing consequat pariatur.\r\n", + "address": "2 Billings Place", + "city": "Fowlerville", + "state": "Florida", + "zip": 63875, + "country": "Thailand", + "email": "lessiegarza@scentric.com", + "phone": "(853) 436-2778", + "color": "rgb(129,67,86)" + }, + { + "index": 242, + "name": "Berg Ray", + "first": "Greer", + "last": "Turner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/axel/73.jpg", + "boolean": true, + "guid": "0fbc2172-5658-40d0-babd-9610530bf605", + "integer": 78, + "date": "Thu Apr 29 2004 02:33:23 GMT-0700 (PDT)", + "shortText": "reprehenderit labore quis voluptate magna", + "mediumText": "Veniam et magna fugiat ut ex pariatur deserunt non. Ullamco dolor esse esse ut laboris reprehenderit eiusmod amet enim. Proident sit cupidatat est consequat ex excepteur fugiat cupidatat aliquip. Veniam non sit dolor ea proident consequat elit nulla elit incididunt labore ullamco. Ut proident incididunt laboris esse.", + "longText": "Dolor tempor duis veniam excepteur nulla nostrud. Officia consectetur est adipisicing do duis quis laborum. Tempor proident proident qui consequat eu. Voluptate magna adipisicing non nulla non dolor cupidatat fugiat irure. Pariatur Lorem culpa ex sunt cupidatat. Non incididunt cupidatat mollit esse Lorem. Est et laborum enim et laborum officia non amet aliquip deserunt.\r\nMinim cupidatat eiusmod cupidatat ad amet incididunt deserunt duis velit excepteur ipsum culpa qui. Tempor eiusmod incididunt voluptate dolore id dolor dolor. Eu enim deserunt eu laborum sunt excepteur excepteur aliquip exercitation occaecat nulla magna. Est officia proident irure quis consectetur. Ut magna veniam aliquip laborum fugiat ex ea ut sint laboris sint. Quis exercitation sit nostrud proident sint et do cillum sunt duis excepteur anim aute non.\r\n", + "address": "2 Schermerhorn Street", + "city": "Century", + "state": "New Jersey", + "zip": 72260, + "country": "Seychelles", + "email": "greerturner@scentric.com", + "phone": "(962) 538-2574", + "color": "rgb(215,92,57)" + }, + { + "index": 243, + "name": "Gates Bush", + "first": "Cohen", + "last": "Sweet", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/traneblow/73.jpg", + "boolean": true, + "guid": "6dd5c482-2b39-4e90-9158-ad1ef6027185", + "integer": 69, + "date": "Tue Nov 02 1982 15:17:04 GMT-0800 (PST)", + "shortText": "anim culpa culpa", + "mediumText": "Commodo et fugiat adipisicing voluptate est. Occaecat laborum ad reprehenderit in nulla dolore. Quis aute excepteur fugiat aute laboris. Ex sint consectetur dolore magna exercitation velit reprehenderit labore irure proident aliquip cupidatat aute. Ad eiusmod anim id magna elit aliqua.", + "longText": "Proident amet commodo elit sunt aliqua et irure officia. Eu quis pariatur dolore mollit esse cupidatat ut do. Officia laborum laboris quis ullamco minim adipisicing proident ullamco occaecat elit amet. Ad magna ea est dolore. Nulla irure nostrud et commodo veniam ad veniam culpa culpa adipisicing velit qui enim nostrud. Nostrud labore labore proident voluptate do quis deserunt aute ad minim velit amet ad cillum.\r\nIncididunt in fugiat incididunt tempor reprehenderit commodo ipsum aute labore laboris duis. Deserunt fugiat fugiat ipsum minim dolore ex excepteur sit cillum duis sint velit aute est. Adipisicing occaecat ut esse ullamco sint enim eu magna tempor laboris. Pariatur aute nisi id dolore mollit do occaecat ad. Consequat proident eiusmod tempor veniam incididunt commodo culpa eiusmod minim enim duis aliquip. Dolore irure eiusmod laboris nostrud ipsum laborum Lorem. Amet proident enim exercitation id duis dolor officia sunt.\r\nIn ea fugiat pariatur mollit proident fugiat do labore id Lorem aute. Nostrud sit duis minim duis laborum laboris adipisicing cillum veniam adipisicing commodo exercitation ex in. Aliqua enim velit consequat do tempor enim laborum dolore sit. Non quis irure laborum sunt cupidatat exercitation culpa reprehenderit id excepteur ullamco magna dolor aute. Nostrud nisi amet pariatur esse dolor elit aliquip dolore esse do dolor officia laboris officia. Anim voluptate sint quis sit veniam non aliqua ipsum proident qui nostrud mollit. Consectetur sunt duis ex tempor laborum eiusmod velit commodo aute laborum.\r\nAliqua commodo commodo non do occaecat esse culpa minim fugiat in labore consequat reprehenderit proident. Laboris pariatur proident ut et veniam cillum Lorem consequat qui eiusmod. Enim veniam nisi enim aliquip exercitation cillum fugiat.\r\nProident dolor ipsum aliqua amet sit do labore aute commodo. Laboris fugiat id laboris occaecat. Qui dolor id aliqua elit ex non adipisicing culpa tempor duis et laboris officia. Eu dolore pariatur est voluptate incididunt ea proident duis non incididunt minim et nulla ex. Exercitation excepteur incididunt fugiat id anim deserunt consequat nisi veniam laboris officia consectetur fugiat. Eu excepteur esse anim reprehenderit dolor enim reprehenderit aliqua consectetur cillum quis. Nisi sint quis incididunt commodo duis sit deserunt dolor laborum dolore labore ex commodo cillum.\r\n", + "address": "4 Hunterfly Place", + "city": "Osage", + "state": "Wisconsin", + "zip": 10229, + "country": "Chad", + "email": "cohensweet@scentric.com", + "phone": "(961) 506-3669", + "color": "rgb(223,99,51)" + }, + { + "index": 244, + "name": "Rosella Sharpe", + "first": "Hilary", + "last": "Jacobs", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thimo_cz/73.jpg", + "boolean": false, + "guid": "b8a9b448-8f16-4879-88a7-b438a45e7dcc", + "integer": 36, + "date": "Mon Feb 09 1998 12:55:02 GMT-0800 (PST)", + "shortText": "labore consectetur", + "mediumText": "Ullamco deserunt sunt consectetur irure adipisicing nostrud incididunt incididunt cillum. Amet aute dolor labore pariatur aliquip reprehenderit sunt.", + "longText": "Nisi ad esse nulla reprehenderit elit. Occaecat amet qui consectetur quis occaecat reprehenderit ea ad ex fugiat nulla. Voluptate et velit ullamco aliquip adipisicing qui pariatur deserunt deserunt minim. Amet elit ullamco ea adipisicing aute enim non culpa quis officia exercitation pariatur.\r\nMollit qui ut nulla elit. Consectetur qui mollit adipisicing aute ad irure culpa reprehenderit proident labore. Lorem aliquip consequat tempor laborum duis id dolore aliqua. Ullamco culpa culpa adipisicing duis labore irure proident qui elit proident dolor dolor sit. Nisi nisi velit dolore ipsum Lorem cillum aute occaecat excepteur labore enim exercitation mollit non.\r\nCillum consectetur deserunt duis nulla pariatur laborum adipisicing. Nisi magna duis irure aute irure proident tempor aliquip quis sunt amet. Veniam excepteur laborum culpa nostrud id et consequat ut aliqua velit. In quis enim sunt minim esse est proident elit consequat. Ipsum id ad pariatur officia pariatur cupidatat qui sunt. Irure ut officia magna mollit et quis labore amet esse deserunt tempor Lorem duis. Duis exercitation officia ea est ipsum sunt.\r\nEiusmod Lorem officia velit elit cupidatat aliqua occaecat non aute ut nulla do pariatur. Mollit enim ad officia eiusmod sint qui ex non incididunt. Eiusmod irure voluptate aliquip nisi dolore adipisicing incididunt Lorem aute minim ea labore aute. Occaecat fugiat esse velit sit cupidatat non occaecat ex laborum qui magna enim. Laboris eu nisi nostrud incididunt est. Id dolore in adipisicing non et velit exercitation Lorem elit excepteur deserunt.\r\n", + "address": "2 Emerald Street", + "city": "Basye", + "state": "Washington", + "zip": 84048, + "country": "Uruguay", + "email": "hilaryjacobs@scentric.com", + "phone": "(850) 481-3931", + "color": "rgb(175,197,147)" + }, + { + "index": 245, + "name": "Ballard Mason", + "first": "Nell", + "last": "Harper", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/majksner/73.jpg", + "boolean": true, + "guid": "4367e70e-505b-4a00-b33c-8ad5dbef5274", + "integer": 22, + "date": "Tue Feb 21 1995 19:57:05 GMT-0800 (PST)", + "shortText": "labore incididunt", + "mediumText": "Sit culpa ipsum eu nulla quis id in nostrud tempor officia tempor voluptate enim. Anim ut ullamco reprehenderit eu. Enim veniam do labore eiusmod enim elit dolor.", + "longText": "Duis do esse cillum ea esse ad. Quis incididunt nulla commodo eiusmod. Magna ipsum reprehenderit sit dolor non esse culpa anim aliquip. Esse adipisicing nostrud pariatur consectetur aliqua reprehenderit ad. Cupidatat incididunt cupidatat sit proident consequat enim duis consequat mollit elit deserunt qui. Deserunt dolor do nisi quis laboris dolor irure esse excepteur. Ex consequat incididunt id et in esse officia laboris nostrud.\r\nDolor labore nulla nisi ex sit nisi qui sit aliqua dolore elit dolore incididunt. Laboris qui do duis ipsum pariatur nulla magna. Elit reprehenderit veniam reprehenderit laboris proident amet mollit sunt minim et deserunt sint nulla minim. Nisi sunt eu aute ea ut pariatur est magna voluptate tempor anim. Do id laboris Lorem magna commodo voluptate nostrud magna cupidatat proident irure nostrud laboris sunt.\r\nQui occaecat excepteur ea magna quis enim magna consectetur nostrud consequat non veniam tempor nostrud. Mollit et ex aute aute consectetur veniam aute ut sunt culpa eu. Ullamco amet voluptate adipisicing nulla consectetur in. Minim excepteur enim aliquip nisi velit duis ea. Consectetur minim fugiat nostrud reprehenderit minim et proident id pariatur Lorem proident ipsum eiusmod. Ea nulla enim ullamco aute do. Laborum consequat sint ipsum consectetur.\r\nIrure ullamco dolore aute occaecat excepteur proident dolor. Nulla ut sunt adipisicing dolor elit duis sit laboris commodo do est. Do cillum est voluptate tempor mollit officia cupidatat ad pariatur elit officia ullamco. Eu esse aute officia est duis commodo aliquip ipsum officia cupidatat do magna Lorem. Cillum incididunt adipisicing minim aliquip ea esse adipisicing laborum proident deserunt. Deserunt Lorem excepteur enim id nisi pariatur tempor eiusmod proident nisi.\r\n", + "address": "2 Boynton Place", + "city": "Gerber", + "state": "Oregon", + "zip": 35064, + "country": "Burkina Faso", + "email": "nellharper@scentric.com", + "phone": "(978) 583-3962", + "color": "rgb(114,234,175)" + }, + { + "index": 246, + "name": "Alexis Kramer", + "first": "Koch", + "last": "Carpenter", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/angelcreative/73.jpg", + "boolean": false, + "guid": "27db3441-a52c-4633-9e2e-c1b68bbab9ab", + "integer": 18, + "date": "Wed May 05 2010 06:16:29 GMT-0700 (PDT)", + "shortText": "amet fugiat ut", + "mediumText": "Ad cupidatat amet ullamco ullamco officia cillum sit id duis non non. Eiusmod pariatur ea ipsum et exercitation enim minim eu nostrud voluptate. Reprehenderit nostrud nisi aliquip elit ea culpa laborum irure aliqua deserunt labore ea. Minim occaecat id quis consectetur irure nostrud exercitation laborum. Nostrud est nostrud anim reprehenderit enim dolore irure laborum enim est deserunt incididunt laboris magna.", + "longText": "Magna ex exercitation dolor ex et sit enim fugiat ad sint velit officia sunt. Sint officia dolor fugiat minim id amet dolore commodo reprehenderit aute veniam. Eu non do irure proident consequat velit pariatur amet voluptate dolor exercitation. Deserunt sunt sunt sunt eiusmod qui culpa irure anim dolor aute consequat adipisicing. Enim velit est esse ea laboris Lorem do.\r\nLabore est aliqua exercitation minim et. Proident occaecat eu aliquip minim sit mollit Lorem. Lorem aute consectetur incididunt ullamco ut et labore laboris labore. Exercitation aute ullamco velit duis.\r\nUt velit tempor proident ut. Laboris cillum enim ut aliqua amet minim et do cupidatat elit commodo veniam aliquip culpa. Duis minim consectetur proident excepteur aliquip sint quis ex sunt laboris veniam deserunt commodo aute. Commodo ipsum laborum quis exercitation nostrud aute ad laboris. Anim sint sit et minim amet officia. Pariatur labore exercitation proident veniam duis sit exercitation cupidatat cillum Lorem ea duis non.\r\nEa veniam ad voluptate labore dolore esse in. Occaecat et est sint sint tempor non culpa veniam proident elit eiusmod proident adipisicing. Proident cupidatat et nulla amet nulla.\r\nEx est duis consequat proident est. Adipisicing enim elit labore eu in ipsum qui consectetur do veniam labore. Nostrud ullamco mollit cillum Lorem labore labore mollit non amet voluptate ullamco magna. Ex id quis eiusmod eiusmod Lorem est. Velit Lorem velit pariatur fugiat irure ad est cillum cupidatat tempor sit exercitation. Lorem ea cillum aliqua nisi veniam nostrud excepteur. Magna cillum aliquip anim irure dolor.\r\n", + "address": "2 Hudson Avenue", + "city": "Hiseville", + "state": "Illinois", + "zip": 75977, + "country": "Greenland", + "email": "kochcarpenter@scentric.com", + "phone": "(912) 523-3269", + "color": "rgb(254,230,133)" + }, + { + "index": 247, + "name": "Larson Mcguire", + "first": "Earnestine", + "last": "Curry", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/marcus3de/73.jpg", + "boolean": false, + "guid": "0e87dcfe-dfe9-4c49-9da7-37fac49566fb", + "integer": 69, + "date": "Wed Apr 27 1977 14:45:51 GMT-0700 (PDT)", + "shortText": "aute quis minim laborum", + "mediumText": "Fugiat deserunt ea do sint pariatur anim.", + "longText": "Ex ullamco ut irure quis dolore aliqua ex reprehenderit culpa non do. Amet mollit dolore esse anim velit. Dolore et laborum excepteur voluptate deserunt voluptate occaecat officia consequat veniam ad aliquip. Nisi commodo in Lorem consequat ut irure fugiat quis deserunt dolore.\r\nEiusmod tempor in reprehenderit ut ut do in labore minim consectetur laboris sunt ullamco. Eu ut fugiat enim magna elit proident. Velit laborum ipsum pariatur laborum elit pariatur quis.\r\n", + "address": "3 Blake Court", + "city": "Riceville", + "state": "West Virginia", + "zip": 44569, + "country": "Fiji", + "email": "earnestinecurry@scentric.com", + "phone": "(947) 457-2441", + "color": "rgb(192,84,251)" + }, + { + "index": 248, + "name": "Elisa Gilbert", + "first": "Opal", + "last": "Rush", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lizpradal/73.jpg", + "boolean": false, + "guid": "af31a9db-6478-45f9-b053-48ea4d2c7ad2", + "integer": 12, + "date": "Sun Aug 17 1986 13:15:07 GMT-0700 (PDT)", + "shortText": "et nulla incididunt in in", + "mediumText": "Occaecat cupidatat proident cupidatat officia exercitation veniam exercitation nisi.", + "longText": "Ex enim magna pariatur eiusmod aliqua ad id sit in culpa adipisicing sint ut anim. Ex duis consequat non voluptate exercitation qui nostrud dolore quis ipsum esse. Exercitation nisi tempor ut labore fugiat incididunt cupidatat non sunt esse. Anim mollit nisi ut veniam amet voluptate labore eiusmod adipisicing fugiat ullamco aute amet duis. Ea fugiat dolore ipsum dolore ex velit laborum aliquip eu mollit minim. Eu non dolor adipisicing sint elit labore eiusmod et aliqua.\r\nIpsum cupidatat laborum consequat excepteur quis fugiat ex veniam sint tempor ullamco sit ut aliquip. Magna ex exercitation duis proident anim ipsum esse commodo in dolor irure. Ullamco occaecat culpa elit aliquip do.\r\n", + "address": "2 Belmont Avenue", + "city": "Manitou", + "state": "Mississippi", + "zip": 31901, + "country": "Viet Nam", + "email": "opalrush@scentric.com", + "phone": "(944) 429-3751", + "color": "rgb(73,188,227)" + }, + { + "index": 249, + "name": "Richardson Pena", + "first": "Lauri", + "last": "Macias", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mironcatalin/73.jpg", + "boolean": true, + "guid": "d2190b02-e2b9-47da-9a5d-43ab822a4242", + "integer": 1, + "date": "Sat Apr 25 1981 19:27:16 GMT-0800 (PST)", + "shortText": "dolor culpa", + "mediumText": "Veniam excepteur elit esse ex mollit. Aliquip adipisicing consectetur occaecat aliquip consectetur nisi ut est ipsum tempor cillum eiusmod excepteur.", + "longText": "Sint labore cillum sit elit consequat est sunt voluptate. Irure velit enim anim elit ea culpa ut consequat aute magna dolore. Sit reprehenderit elit eiusmod in enim. Sint elit officia laborum qui do eiusmod voluptate sunt et consequat. Duis laboris consequat culpa excepteur sunt qui irure est cupidatat eiusmod dolor mollit. Eiusmod est irure quis ut ad aliqua consectetur fugiat consectetur.\r\nDeserunt voluptate laboris occaecat pariatur elit. Ad eiusmod pariatur incididunt cillum irure duis labore labore. Nostrud nostrud minim aliquip nostrud eiusmod sunt ipsum reprehenderit labore enim ea tempor. Nostrud laboris mollit enim eu labore deserunt.\r\nOfficia non reprehenderit laborum quis cupidatat sit. Consectetur dolore est non tempor Lorem sint eu ea cupidatat occaecat dolor. Culpa sunt aliquip id dolore mollit aliquip esse qui culpa in amet sit incididunt. Ullamco est laborum aliqua incididunt. Aliquip id mollit minim proident sit.\r\nCulpa nostrud culpa deserunt culpa Lorem laborum minim sit sit. Ullamco qui do sunt est duis. Voluptate magna deserunt ipsum esse laborum dolor cillum. Magna cillum laborum sit veniam.\r\nQuis enim deserunt et mollit adipisicing. Eu sunt in esse adipisicing eu consequat magna dolore commodo labore culpa elit. Consequat elit fugiat ullamco in non dolor. Eu irure adipisicing laborum nisi commodo ipsum consequat officia ipsum in dolore laboris culpa.\r\n", + "address": "2 Atkins Avenue", + "city": "Bynum", + "state": "Rhode Island", + "zip": 45405, + "country": "France, Metropolitan", + "email": "laurimacias@scentric.com", + "phone": "(889) 487-2711", + "color": "rgb(140,77,221)" + }, + { + "index": 250, + "name": "James Christensen", + "first": "Atkinson", + "last": "White", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/michaelbowden3/73.jpg", + "boolean": true, + "guid": "5b8652f2-a3c4-4f58-b4ae-df90d92002f2", + "integer": 99, + "date": "Tue Jan 30 1979 23:03:56 GMT-0800 (PST)", + "shortText": "veniam mollit ad nisi", + "mediumText": "Labore veniam anim aliqua duis deserunt dolor aliquip. Excepteur est non labore eiusmod id duis. Exercitation occaecat occaecat excepteur sit sint sit nisi labore ex tempor consequat duis.", + "longText": "Excepteur laborum velit eu irure dolor magna sit proident. Sint minim cillum commodo pariatur anim reprehenderit laborum occaecat reprehenderit pariatur ullamco. Cupidatat consectetur est incididunt enim exercitation.\r\nDeserunt tempor aliqua velit laboris qui dolore nulla culpa. Minim exercitation ut minim laborum anim aliquip minim eu dolore veniam. Ut anim do elit fugiat fugiat ad dolor ea sit velit qui dolor. Excepteur voluptate ea anim ullamco labore tempor aliqua sunt cillum occaecat cupidatat irure tempor. Consectetur fugiat elit ullamco nisi reprehenderit exercitation. Ipsum adipisicing ullamco laboris pariatur consectetur eu amet reprehenderit. Veniam aliqua sit aute pariatur sit.\r\nAdipisicing esse ad non laboris irure dolore Lorem adipisicing. Voluptate pariatur sit et eiusmod. Est do aute elit ipsum. Non velit irure magna amet sunt ex.\r\nVeniam sint labore velit ad eu velit deserunt occaecat elit exercitation dolor. Aute proident sit nisi incididunt laborum consectetur ea minim nisi anim mollit do ipsum. Consectetur ullamco nulla eu elit non ex pariatur magna labore. Nisi reprehenderit Lorem quis commodo sit elit sunt eu occaecat ad velit excepteur irure. Exercitation reprehenderit aute consectetur velit dolore incididunt elit quis anim dolore aliqua laboris ex.\r\nDo ut in mollit sunt irure id enim cillum nulla elit cupidatat. Duis nulla enim mollit in in incididunt est anim occaecat commodo ea magna. Tempor enim excepteur nostrud nostrud non nostrud non esse. In id incididunt labore pariatur veniam ipsum Lorem.\r\n", + "address": "4 Kay Court", + "city": "Veyo", + "state": "Georgia", + "zip": 60806, + "country": "Uganda", + "email": "atkinsonwhite@scentric.com", + "phone": "(912) 432-3782", + "color": "rgb(177,214,156)" + }, + { + "index": 251, + "name": "Berry Greene", + "first": "Carey", + "last": "Hawkins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bermonpainter/73.jpg", + "boolean": true, + "guid": "6f4e5523-3a13-4b9c-98c4-99a1f8a24e7e", + "integer": 50, + "date": "Tue Sep 23 1980 15:29:12 GMT-0700 (PDT)", + "shortText": "id pariatur eu ut dolor", + "mediumText": "Mollit aute aliquip veniam irure do enim commodo excepteur culpa occaecat commodo eiusmod in reprehenderit. Non reprehenderit sint officia aliqua. Nostrud fugiat minim pariatur dolore in minim ea ut cillum do pariatur mollit proident.", + "longText": "Ad amet sunt ea aliqua incididunt ea non tempor cillum et et tempor. Esse ullamco consectetur tempor fugiat fugiat fugiat. Ex elit consequat nisi quis ut anim cillum sit ipsum esse. Tempor ex adipisicing ea culpa aute do ipsum et. Ipsum eu fugiat velit dolore exercitation sunt Lorem minim dolore quis ut nulla fugiat. Ut consectetur commodo aute nulla reprehenderit voluptate dolor fugiat ullamco.\r\nQui excepteur fugiat incididunt Lorem exercitation dolore dolore magna qui. Eiusmod non adipisicing sit et nisi occaecat pariatur sint elit esse et aute laborum pariatur. Commodo sit ut esse irure incididunt non veniam labore occaecat commodo aliquip.\r\nCommodo incididunt ex deserunt exercitation reprehenderit. Exercitation consequat amet cillum incididunt enim aute nostrud. Sit esse reprehenderit nulla Lorem magna in.\r\nTempor fugiat ipsum sint excepteur enim magna fugiat irure fugiat ad nulla anim minim. Exercitation et veniam exercitation aute nulla do quis reprehenderit sint nostrud duis Lorem qui enim. Cillum pariatur aliqua et ex irure exercitation elit id minim nostrud in. Eiusmod do fugiat veniam cupidatat deserunt amet velit enim adipisicing.\r\nCupidatat est et labore fugiat eu elit consectetur et culpa voluptate. Exercitation dolor excepteur veniam eiusmod ullamco laboris et deserunt velit proident aliquip. Adipisicing Lorem do amet sunt enim. Pariatur labore qui aliquip elit excepteur culpa nulla velit ea laborum consequat commodo ipsum proident. Est est reprehenderit incididunt sint officia ex quis dolor enim et veniam.\r\n", + "address": "2 Tillary Street", + "city": "Fivepointville", + "state": "New Mexico", + "zip": 85127, + "country": "Antarctica", + "email": "careyhawkins@scentric.com", + "phone": "(868) 519-2817", + "color": "rgb(74,226,202)" + }, + { + "index": 252, + "name": "Melva Frederick", + "first": "Haley", + "last": "Morris", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/parasenak/73.jpg", + "boolean": true, + "guid": "0280cd72-ee64-4c9c-aa16-67f76f572d10", + "integer": 13, + "date": "Thu Aug 27 1992 14:36:33 GMT-0700 (PDT)", + "shortText": "magna incididunt duis adipisicing consequat", + "mediumText": "Ea exercitation voluptate mollit consequat voluptate eu minim. Quis aute ullamco labore reprehenderit non elit laboris aute sunt mollit mollit sunt. Do velit ad enim nulla reprehenderit laboris mollit.", + "longText": "Ullamco eu cupidatat eiusmod aute. Ex non aute ea fugiat duis qui velit. Culpa est duis consequat pariatur ad dolor exercitation. Elit nostrud cillum officia esse incididunt. Excepteur et in ex nulla eiusmod anim aliqua qui Lorem do amet. Anim voluptate sint culpa aute esse exercitation ex proident ullamco elit deserunt duis. Qui culpa tempor exercitation anim ipsum.\r\nReprehenderit cupidatat est pariatur adipisicing ad laboris cillum aute laboris adipisicing exercitation fugiat. Nisi reprehenderit fugiat nulla et proident ut enim excepteur commodo. Laboris laborum quis fugiat consequat et do. Minim adipisicing reprehenderit tempor laborum voluptate occaecat incididunt in aliqua ipsum reprehenderit est duis deserunt. Mollit cillum cupidatat Lorem incididunt duis laborum aute incididunt do. Nisi ea amet excepteur sit aliqua nulla. Sunt fugiat consequat commodo nostrud deserunt sunt nostrud ad esse dolor.\r\n", + "address": "2 Anthony Street", + "city": "Vivian", + "state": "Arizona", + "zip": 87173, + "country": "Kiribati", + "email": "haleymorris@scentric.com", + "phone": "(914) 569-3745", + "color": "rgb(77,218,207)" + }, + { + "index": 253, + "name": "Moses Leach", + "first": "Margret", + "last": "Baird", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/duyvk/73.jpg", + "boolean": false, + "guid": "2da52347-1212-4146-ad5b-1d770195f05c", + "integer": 57, + "date": "Sat May 31 1980 05:14:11 GMT-0700 (PDT)", + "shortText": "veniam voluptate minim elit amet", + "mediumText": "Voluptate in elit laborum commodo quis do proident pariatur aliqua velit exercitation cupidatat consequat. Sint quis ex aliqua velit commodo non cillum amet magna velit laborum amet reprehenderit ipsum.", + "longText": "Mollit nostrud cillum duis do ipsum duis cillum sint veniam ipsum. Qui ad ex ad id do labore enim proident est aute. Lorem quis pariatur pariatur id dolore id. Nulla esse ullamco eu enim eu Lorem et adipisicing est nisi eiusmod proident. Nostrud deserunt duis qui ad ad. Adipisicing esse aute amet consectetur aliquip incididunt laboris id est quis.\r\nEsse sint cillum commodo deserunt elit anim excepteur elit nostrud exercitation consequat ad. Aliqua consequat ea minim sunt dolor nulla elit sunt. Ut id do culpa amet adipisicing aliqua ipsum. Reprehenderit velit ad aliquip ullamco mollit elit ea. Deserunt quis labore aliquip culpa id cupidatat irure duis aliqua nostrud tempor.\r\n", + "address": "2 Orange Street", + "city": "Rosine", + "state": "Texas", + "zip": 86725, + "country": "Ecuador", + "email": "margretbaird@scentric.com", + "phone": "(991) 577-2455", + "color": "rgb(212,247,87)" + }, + { + "index": 254, + "name": "Mindy Mendoza", + "first": "Valdez", + "last": "Mack", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/abdullindenis/73.jpg", + "boolean": true, + "guid": "c19cb89a-c62c-4a3b-a815-dc686df99a69", + "integer": 97, + "date": "Sun Sep 28 2008 12:27:09 GMT-0700 (PDT)", + "shortText": "aliqua laborum", + "mediumText": "Ea commodo et minim id consectetur ipsum ad sit dolor. Laborum laborum in irure ex cillum sunt officia. Ullamco quis cupidatat labore occaecat amet elit consequat aute aliquip esse.", + "longText": "Cillum eu mollit ex Lorem est duis sint incididunt est ullamco. Pariatur amet sit sunt et sint officia dolor elit aliqua laboris officia. Sunt duis non sint ea ut adipisicing ut Lorem ut velit do ad culpa mollit. Irure magna elit dolore do officia mollit commodo id aute. Culpa nostrud esse officia exercitation.\r\nAliqua aliqua aute reprehenderit aute cupidatat veniam. Aliquip sint veniam deserunt amet. Quis adipisicing tempor id officia non. Laborum tempor cupidatat reprehenderit ut reprehenderit quis proident veniam ipsum. Mollit voluptate officia exercitation proident enim nisi eiusmod veniam do id sint eu.\r\n", + "address": "3 Woodside Avenue", + "city": "Skyland", + "state": "District Of Columbia", + "zip": 24057, + "country": "Bulgaria", + "email": "valdezmack@scentric.com", + "phone": "(831) 594-3993", + "color": "rgb(223,79,247)" + }, + { + "index": 255, + "name": "Charles Sosa", + "first": "Ashley", + "last": "Adams", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/umutahmet29/73.jpg", + "boolean": true, + "guid": "26a576e9-cccf-480d-8ed3-bb6f7da211ef", + "integer": 89, + "date": "Thu Apr 03 1975 03:38:57 GMT-0700 (PDT)", + "shortText": "anim adipisicing", + "mediumText": "Do minim excepteur aliquip id sit non laboris sint reprehenderit. Consectetur eu pariatur et commodo velit Lorem labore consequat quis reprehenderit commodo nisi. Adipisicing deserunt consectetur non reprehenderit deserunt elit esse elit culpa sunt.", + "longText": "Et ea anim tempor labore magna tempor est deserunt eu ullamco ipsum elit. Dolore nulla ipsum do exercitation. Sit fugiat pariatur ullamco sit tempor amet reprehenderit consectetur magna.\r\nCommodo do exercitation amet deserunt eu ea mollit. Sint labore sint occaecat reprehenderit cillum sint qui pariatur et deserunt adipisicing. Mollit excepteur qui minim culpa tempor ea. Qui esse labore dolore occaecat. Cillum duis dolor id cupidatat veniam non pariatur voluptate deserunt laboris. Quis proident occaecat veniam nulla occaecat proident occaecat ullamco. Aliqua laborum aliqua enim mollit quis.\r\n", + "address": "3 Kensington Street", + "city": "Dana", + "state": "Virgin Islands", + "zip": 96003, + "country": "American Samoa", + "email": "ashleyadams@scentric.com", + "phone": "(903) 572-3575", + "color": "rgb(125,107,131)" + }, + { + "index": 256, + "name": "Turner Franco", + "first": "Norman", + "last": "George", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pinceladasdaweb/73.jpg", + "boolean": true, + "guid": "ab082048-531a-4b8d-8801-29979233e2c1", + "integer": 41, + "date": "Sun Nov 19 1989 19:54:28 GMT-0800 (PST)", + "shortText": "consequat mollit qui aute laboris", + "mediumText": "Sint in reprehenderit commodo ex cillum ipsum est Lorem dolore amet. Eu consequat nisi nostrud est velit et ex cupidatat quis sint duis do. Irure eiusmod amet esse occaecat proident occaecat sit laborum incididunt adipisicing amet enim. Ut ex ut sunt eu eu eiusmod duis do dolor occaecat commodo deserunt exercitation.", + "longText": "Aliqua sit tempor et consequat irure elit incididunt et id sint ex ad ipsum aliquip. Aliqua fugiat sint sint reprehenderit proident pariatur nostrud. Excepteur in do non minim sunt exercitation magna et sint quis aliqua eiusmod Lorem. Nostrud exercitation proident in velit aliqua dolore nisi irure veniam quis adipisicing et excepteur. Duis dolore dolor non et reprehenderit cillum commodo. Deserunt officia labore nostrud anim id fugiat anim ex voluptate dolore esse do commodo sit.\r\nEsse ut sunt commodo sint exercitation consequat ex ea exercitation reprehenderit. Nulla in laboris qui eiusmod adipisicing ex occaecat qui qui culpa aliquip magna quis. Fugiat reprehenderit exercitation ipsum reprehenderit et Lorem cillum. Lorem et dolor minim est et et.\r\nNisi ullamco ea minim ad nulla deserunt eu aute culpa ipsum ut voluptate. Ea cupidatat eiusmod est cillum amet velit aliqua esse sunt cupidatat eu aliqua reprehenderit. Voluptate voluptate proident duis ipsum minim qui. Id ex esse excepteur reprehenderit. Eiusmod adipisicing minim quis laboris aute nostrud irure officia velit fugiat. Ad minim tempor enim commodo exercitation elit cillum proident nulla cupidatat aliqua.\r\nLaboris amet aliqua nisi ut sint ex minim ullamco voluptate in. Sunt consequat ea proident occaecat aliquip est quis officia. Cillum Lorem laboris nostrud aliquip nulla laborum dolore quis aliqua nulla. Anim sint eiusmod ea in Lorem magna aliquip cillum velit.\r\nCommodo sunt nostrud deserunt id mollit do aliqua ullamco incididunt et et sunt sunt ad. Reprehenderit consequat consectetur aliquip non in. Eiusmod dolore id labore voluptate do aute ut et amet tempor tempor. Do irure laborum reprehenderit elit eiusmod cupidatat id sunt. Nisi cupidatat cillum eu sint duis et proident aliquip commodo id minim ullamco. Magna laborum exercitation elit minim dolore irure eu velit commodo Lorem.\r\n", + "address": "2 Fanchon Place", + "city": "Siglerville", + "state": "Puerto Rico", + "zip": 95024, + "country": "Angola", + "email": "normangeorge@scentric.com", + "phone": "(909) 404-3929", + "color": "rgb(236,187,197)" + }, + { + "index": 257, + "name": "Mandy Mann", + "first": "Mccoy", + "last": "Daniels", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/chris_gooley/73.jpg", + "boolean": true, + "guid": "119c0379-dc8c-4fdf-a4ca-4dd7e8367fcd", + "integer": 8, + "date": "Sat Jul 18 1970 18:24:18 GMT-0700 (PDT)", + "shortText": "pariatur nulla", + "mediumText": "Sint mollit amet elit consectetur culpa. Exercitation minim laboris culpa reprehenderit est ut deserunt in est eiusmod nostrud nostrud esse. Labore laboris incididunt sit voluptate id ut. In incididunt mollit reprehenderit ea dolor commodo anim aliquip.", + "longText": "In cupidatat enim aliquip velit nisi. Elit deserunt ad excepteur deserunt consectetur nisi proident ea exercitation laboris tempor sunt. Lorem sint incididunt proident mollit est et.\r\n", + "address": "2 Lamont Court", + "city": "Rew", + "state": "Maryland", + "zip": 15110, + "country": "Bhutan", + "email": "mccoydaniels@scentric.com", + "phone": "(912) 520-2618", + "color": "rgb(135,249,131)" + }, + { + "index": 258, + "name": "Arlene Dominguez", + "first": "Felecia", + "last": "Hines", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jodyferry/73.jpg", + "boolean": true, + "guid": "280bf6b0-99d1-4792-acc8-8dde2e0f0deb", + "integer": 34, + "date": "Sat Feb 15 1992 18:16:30 GMT-0800 (PST)", + "shortText": "do non", + "mediumText": "Qui velit nulla adipisicing mollit. Officia adipisicing laboris veniam dolor enim eu laboris eu nulla tempor. Id id velit magna anim sint tempor. Voluptate nostrud anim elit laborum ut labore anim reprehenderit. Dolore ipsum do proident quis nostrud fugiat.", + "longText": "Quis veniam reprehenderit nulla quis aute deserunt cillum mollit commodo voluptate consectetur. Officia nostrud nulla tempor nulla. Dolor ipsum eu magna cillum amet velit enim amet voluptate id Lorem velit qui.\r\nProident ex amet voluptate cupidatat laborum. Laboris sint reprehenderit in minim exercitation dolor cupidatat ut proident. Aute consectetur id sunt aute pariatur velit excepteur reprehenderit adipisicing pariatur labore ea nulla mollit. Anim nulla aliqua quis minim exercitation amet sunt nulla commodo est nostrud non tempor veniam. Mollit aliquip officia consequat ex minim voluptate cillum esse. Eu sint adipisicing proident eiusmod adipisicing non. Ut excepteur mollit cupidatat anim elit sint aute magna ullamco Lorem duis dolor ullamco occaecat.\r\nDeserunt esse reprehenderit ullamco cillum velit mollit. Duis aliquip aliquip id incididunt officia magna nisi deserunt laboris magna. Enim exercitation mollit do elit voluptate minim. Sint aute incididunt Lorem nulla.\r\nConsectetur consequat nostrud et voluptate est sint ullamco adipisicing laboris. Do cillum velit enim quis reprehenderit tempor. Enim commodo duis deserunt ex et in. Voluptate Lorem qui amet anim nulla enim. Nisi voluptate do ad ea minim laborum ullamco aute amet velit officia ad et. Consequat dolore pariatur nostrud nisi ut et consequat fugiat. Occaecat aute ea officia incididunt.\r\nConsequat mollit laborum reprehenderit sit minim sunt et. Elit mollit magna in mollit cupidatat enim magna exercitation elit pariatur quis. Amet cupidatat in reprehenderit elit consectetur cillum ea aute ad exercitation quis. Velit enim officia do pariatur ex eiusmod.\r\n", + "address": "3 Howard Alley", + "city": "Corinne", + "state": "Massachusetts", + "zip": 62986, + "country": "Dominica", + "email": "feleciahines@scentric.com", + "phone": "(800) 422-3688", + "color": "rgb(143,174,64)" + }, + { + "index": 259, + "name": "Hollie Boyer", + "first": "Steele", + "last": "Schwartz", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/reetajayendra/73.jpg", + "boolean": true, + "guid": "45ab7abb-8d65-4596-9843-554f49ed1ab3", + "integer": 87, + "date": "Sun Jun 06 1971 17:15:13 GMT-0700 (PDT)", + "shortText": "veniam exercitation do est laborum", + "mediumText": "Irure sunt voluptate esse minim dolor adipisicing fugiat occaecat in cupidatat do laborum. Sunt consequat nulla pariatur sit labore velit cillum cillum quis id laboris ipsum.", + "longText": "Adipisicing culpa excepteur excepteur labore. Duis esse occaecat pariatur velit qui fugiat occaecat magna et in duis. Pariatur consectetur dolore culpa esse anim cillum sint ad non adipisicing labore duis. Nisi eiusmod laboris adipisicing ea veniam cupidatat duis ad ut incididunt deserunt cupidatat. Incididunt aliqua cillum mollit dolor amet laboris dolor. Ea laborum qui Lorem duis ipsum deserunt dolore velit adipisicing minim veniam nostrud et. Irure officia Lorem labore irure ullamco.\r\nAdipisicing ullamco exercitation labore in ut. Sunt ex aliquip voluptate dolor qui ipsum est cillum magna. Dolore magna proident officia exercitation. Velit occaecat laborum laboris veniam excepteur nisi duis aliquip dolore. Consequat pariatur elit pariatur eiusmod. Minim occaecat aliquip exercitation sunt nisi dolor elit. Anim esse fugiat commodo minim.\r\nLorem incididunt aute exercitation enim qui aute. Dolore minim do proident laborum sit nulla ullamco excepteur quis sit consectetur dolore nisi. Voluptate Lorem aliqua enim aliqua mollit tempor et laborum ut aute dolor enim. Ipsum laborum anim deserunt aliquip occaecat nisi fugiat esse non cupidatat excepteur ut. Laboris velit Lorem quis aute nostrud elit dolor ullamco eiusmod exercitation. Exercitation eu ullamco cillum Lorem Lorem irure aliqua cillum anim. Adipisicing enim dolore id non enim reprehenderit voluptate velit voluptate Lorem officia.\r\n", + "address": "3 Thames Street", + "city": "Denio", + "state": "Oklahoma", + "zip": 28577, + "country": "Egypt", + "email": "steeleschwartz@scentric.com", + "phone": "(951) 401-2034", + "color": "rgb(203,161,146)" + }, + { + "index": 260, + "name": "Maxwell Levine", + "first": "Rutledge", + "last": "Vang", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/namankreative/73.jpg", + "boolean": false, + "guid": "ae81b7e2-6532-41e4-b7a5-0336231f8d86", + "integer": 22, + "date": "Tue Feb 28 1989 01:26:44 GMT-0800 (PST)", + "shortText": "id sunt eiusmod", + "mediumText": "Sunt nulla aliquip ex ullamco magna mollit laborum ea cillum. Ea ad voluptate excepteur dolor tempor nulla pariatur pariatur.", + "longText": "Dolor quis magna dolor id irure laborum cillum irure. Minim ea ipsum ipsum aute officia. Commodo adipisicing aliqua voluptate eiusmod ipsum incididunt quis dolor culpa velit. Id quis duis tempor ipsum cillum do velit adipisicing do excepteur culpa magna laboris. Voluptate enim do id laborum veniam. Excepteur do adipisicing eiusmod ea laboris laborum. Nostrud sunt fugiat ut velit ex magna nisi non magna sint pariatur eiusmod minim.\r\nElit dolore nulla ipsum ullamco deserunt deserunt amet incididunt. Reprehenderit eiusmod adipisicing commodo duis eu id ad esse dolor consequat cupidatat elit. Aliquip eu fugiat consequat non sit nisi quis est id. Proident amet culpa sunt irure nostrud do ad aliqua sunt. Ut amet eiusmod ea eu aute cupidatat minim laboris qui consequat deserunt consectetur quis reprehenderit. Occaecat id proident in amet adipisicing elit tempor esse veniam elit.\r\nAdipisicing qui fugiat nostrud et magna do eu commodo minim excepteur non qui. Magna do do fugiat sint irure elit tempor deserunt. Ullamco aliqua ullamco nostrud qui incididunt cupidatat. Nisi reprehenderit in cupidatat velit et tempor. Lorem ut Lorem elit quis deserunt ut. Aliquip do Lorem eu ipsum amet eu laborum pariatur aliquip minim. Id id eu exercitation consequat.\r\n", + "address": "4 Scholes Street", + "city": "Rodanthe", + "state": "Ohio", + "zip": 39404, + "country": "Chile", + "email": "rutledgevang@scentric.com", + "phone": "(827) 440-2145", + "color": "rgb(207,158,249)" + }, + { + "index": 261, + "name": "Jimenez Mullins", + "first": "Hines", + "last": "Cooley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/paulfarino/73.jpg", + "boolean": true, + "guid": "c3fd3b86-c437-427d-9f1d-0dd5cc03af2a", + "integer": 31, + "date": "Thu Jul 22 1999 00:58:27 GMT-0700 (PDT)", + "shortText": "nisi", + "mediumText": "Eiusmod enim irure cupidatat consectetur aliquip ut labore fugiat exercitation Lorem et irure.", + "longText": "Reprehenderit duis cupidatat duis commodo enim pariatur ut ea ex elit ut adipisicing consectetur. Fugiat fugiat veniam sit esse laborum commodo laboris ipsum magna pariatur. Ipsum laborum proident mollit exercitation labore. Laborum voluptate pariatur eiusmod ad excepteur minim tempor non adipisicing consectetur proident amet.\r\nAute occaecat excepteur voluptate reprehenderit ea. Officia consequat proident et quis aliqua. Dolor et et cupidatat sit consectetur. Aute sit cillum excepteur reprehenderit enim sint voluptate occaecat.\r\n", + "address": "2 Clay Street", + "city": "Lisco", + "state": "Nevada", + "zip": 95904, + "country": "Norfolk Island", + "email": "hinescooley@scentric.com", + "phone": "(871) 552-3958", + "color": "rgb(236,51,80)" + }, + { + "index": 262, + "name": "Lesley Ashley", + "first": "Williamson", + "last": "Glass", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/overcloacked/73.jpg", + "boolean": true, + "guid": "a3928300-14e0-42c0-9f8b-600a529a789b", + "integer": 17, + "date": "Wed May 25 2005 15:38:13 GMT-0700 (PDT)", + "shortText": "labore esse pariatur nulla excepteur", + "mediumText": "Eiusmod elit eiusmod deserunt enim irure Lorem sint culpa ea. Esse proident in dolor sit qui pariatur Lorem. Culpa consequat minim ullamco sit culpa voluptate occaecat consequat. Ex ex non voluptate excepteur irure ut consectetur tempor.", + "longText": "Ullamco ex id nostrud esse. Exercitation adipisicing eu est ipsum commodo. Aute aliqua exercitation eiusmod ex nulla. Enim cillum nisi tempor id. Irure proident ipsum commodo reprehenderit tempor eu ut officia labore tempor sit tempor.\r\nFugiat ut sit tempor ut aliquip ea irure. Ullamco irure nulla reprehenderit id amet fugiat. Anim Lorem ullamco ea elit esse nisi id elit occaecat. Elit voluptate aute dolore anim aliquip veniam laborum. Duis esse aliquip aute pariatur fugiat veniam velit anim irure ipsum laboris. Duis nostrud occaecat ipsum eu non mollit. Fugiat exercitation sunt ullamco sunt mollit.\r\nLabore eiusmod mollit voluptate sunt duis id enim excepteur eiusmod elit quis voluptate enim aliqua. Minim nostrud excepteur voluptate ipsum id aliqua esse pariatur consequat. Dolore aliqua Lorem veniam deserunt pariatur tempor do nisi veniam nulla voluptate. Ut velit consectetur deserunt eiusmod cupidatat. Non culpa pariatur enim eu et ut irure labore. Ut nisi aute voluptate excepteur sint culpa ad id adipisicing ut enim.\r\nQui do consectetur laborum laborum ipsum eu ex do fugiat duis est irure sunt sunt. Ullamco in velit minim veniam ea do veniam anim adipisicing in sunt occaecat in aliquip. Aliquip nisi elit fugiat cupidatat enim mollit ex mollit. Aute laborum consequat anim deserunt. Cillum est sint dolor irure laboris ad eiusmod. Lorem aliquip in est et deserunt nostrud est consequat duis ad minim. Magna qui est ullamco sit cillum cupidatat eu amet mollit commodo esse.\r\n", + "address": "4 Village Court", + "city": "Southmont", + "state": "Montana", + "zip": 63679, + "country": "Japan", + "email": "williamsonglass@scentric.com", + "phone": "(915) 505-2620", + "color": "rgb(119,251,208)" + }, + { + "index": 263, + "name": "Robertson Mcintosh", + "first": "Constance", + "last": "Sexton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/maysundays/73.jpg", + "boolean": false, + "guid": "0dd239a2-9d56-4eec-a3e1-94411aacdc3f", + "integer": 71, + "date": "Sat Aug 01 1970 03:44:02 GMT-0700 (PDT)", + "shortText": "excepteur ut labore", + "mediumText": "Incididunt proident mollit elit velit sit in ipsum dolor duis ex labore aliqua culpa. Cupidatat amet ea proident ad duis. Id occaecat aliquip quis fugiat dolor aliqua consectetur.", + "longText": "Sunt ullamco culpa quis cillum mollit. Exercitation amet magna magna velit pariatur aliquip laborum ad est cupidatat. Nostrud elit irure ullamco occaecat id. Anim elit laborum ad pariatur occaecat minim tempor ullamco. Deserunt exercitation elit commodo sint reprehenderit sit proident ut labore. Eu eu officia nulla labore aliquip ut ex.\r\nVeniam non tempor laborum ea dolor nostrud laboris cupidatat deserunt sit est. Reprehenderit aliquip sint nostrud eu pariatur laborum ea. Aute id laboris esse in in amet excepteur ea laborum. Cupidatat commodo minim nostrud in aute in aute culpa eiusmod.\r\nAmet dolore commodo aute commodo commodo non voluptate officia elit amet est sint sit. Nulla est occaecat elit magna elit esse mollit cillum anim exercitation. Adipisicing non occaecat nisi irure duis aliquip occaecat culpa consectetur ex mollit aute nostrud. Et mollit nisi ad culpa dolor tempor nisi Lorem culpa aliqua. Sunt ut minim dolore voluptate sit. Minim enim ex elit excepteur voluptate.\r\nProident proident esse commodo qui laboris. Enim laboris cillum fugiat exercitation elit. Nostrud ea labore sit culpa. Reprehenderit amet minim mollit ea nulla duis duis veniam est tempor enim ut proident. Tempor consectetur culpa occaecat exercitation id ea nulla ea. Duis culpa ea labore sint culpa consectetur eu proident esse.\r\nLaborum nulla excepteur commodo sint irure veniam nisi. Duis ex ad anim et anim voluptate commodo eiusmod ea magna ut do magna ut. Mollit anim nulla ullamco et aute excepteur qui aute. Exercitation aliquip proident labore tempor consequat aute officia esse ut dolor eu mollit. Veniam occaecat amet velit in irure Lorem excepteur aliquip sunt sit. Dolor nulla sit ad anim officia cillum minim ipsum ad dolor qui sint. Incididunt velit qui ea fugiat.\r\n", + "address": "3 Driggs Avenue", + "city": "Goldfield", + "state": "California", + "zip": 10392, + "country": "Saudi Arabia", + "email": "constancesexton@scentric.com", + "phone": "(923) 433-2666", + "color": "rgb(246,200,148)" + }, + { + "index": 264, + "name": "Audra Ortega", + "first": "Anne", + "last": "Crawford", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_iamnyasha/73.jpg", + "boolean": false, + "guid": "a1000f3b-0edd-4f94-8864-4f0567d089ef", + "integer": 74, + "date": "Thu Oct 19 1978 15:43:40 GMT-0700 (PDT)", + "shortText": "et voluptate", + "mediumText": "Quis nulla minim do deserunt commodo laborum laboris veniam sint pariatur voluptate ullamco eu. Laboris adipisicing ex dolore voluptate ea occaecat duis enim nulla eiusmod.", + "longText": "Voluptate velit duis reprehenderit est tempor dolor dolor deserunt ullamco. Sit proident eiusmod consectetur occaecat dolore in laborum in aliqua id sint. Aute aliqua eu est aliqua officia aliqua minim do sint ullamco voluptate tempor velit ex. Adipisicing mollit velit non cillum exercitation sunt sunt ipsum ex irure laboris ut. Fugiat aliquip aliquip ad deserunt minim minim nisi dolore ea et. Dolore magna fugiat commodo veniam commodo do deserunt. Irure sint reprehenderit nulla sunt est nostrud id do excepteur mollit nostrud ea.\r\nId pariatur nisi eu deserunt nisi minim in deserunt deserunt ex. Adipisicing excepteur officia sint exercitation mollit deserunt non velit ex fugiat laboris id. Sit eiusmod excepteur occaecat id dolore laborum fugiat ea. Commodo velit non incididunt enim aliquip magna irure. Nulla aute ipsum veniam fugiat duis cupidatat et exercitation laboris Lorem culpa. Do reprehenderit ullamco occaecat id veniam sunt non nulla excepteur exercitation.\r\n", + "address": "2 Wallabout Street", + "city": "Waikele", + "state": "Marshall Islands", + "zip": 86465, + "country": "Micronesia", + "email": "annecrawford@scentric.com", + "phone": "(986) 502-2226", + "color": "rgb(235,169,166)" + }, + { + "index": 265, + "name": "Francis Carver", + "first": "Gallagher", + "last": "Britt", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/culttm/73.jpg", + "boolean": false, + "guid": "0556fe07-8214-442d-9f9c-08231097de52", + "integer": 6, + "date": "Sun Nov 28 2010 03:23:33 GMT-0800 (PST)", + "shortText": "sint ex in aliquip excepteur", + "mediumText": "Laboris anim ad nulla tempor dolor quis tempor ipsum incididunt eiusmod aute. Ea irure ea laboris irure do et aliquip dolor exercitation excepteur. Exercitation sunt dolor excepteur sunt id quis velit esse non dolore ut nostrud officia.", + "longText": "Ad ipsum minim tempor velit Lorem irure cupidatat. Minim laborum laboris esse sunt voluptate amet amet nostrud sint esse. Irure incididunt et reprehenderit magna. Mollit esse non Lorem excepteur ad. In labore ad minim id commodo tempor non irure nisi.\r\nLaboris ut veniam cillum eiusmod ad ut reprehenderit. Ad pariatur ad ea culpa. Ad est irure enim ex Lorem nulla irure do adipisicing nulla non aute. Fugiat irure quis veniam consequat ea ullamco reprehenderit ipsum.\r\nTempor cillum culpa in sint enim sit irure consequat Lorem labore deserunt. Magna magna est sunt magna mollit laboris minim irure incididunt deserunt. Est pariatur adipisicing reprehenderit mollit ea aute dolor deserunt aute ut proident eiusmod.\r\nIrure in adipisicing culpa pariatur qui aliquip amet id. Veniam deserunt labore mollit in quis. Quis nostrud dolor ullamco ut reprehenderit nisi.\r\nCillum veniam laboris ut nulla commodo est nulla reprehenderit cupidatat. Voluptate adipisicing aute magna dolore consequat dolor enim veniam Lorem incididunt pariatur amet. Qui anim pariatur et voluptate labore incididunt. Amet duis velit eu in proident ipsum culpa et nulla eu Lorem aliquip ut. Lorem fugiat aute veniam Lorem ea sit. Nisi pariatur qui excepteur ad ullamco ea non culpa non incididunt sint ex. Et nulla velit elit adipisicing sit non irure et.\r\n", + "address": "2 Oakland Place", + "city": "Brookfield", + "state": "Indiana", + "zip": 53481, + "country": "Liberia", + "email": "gallagherbritt@scentric.com", + "phone": "(835) 444-3138", + "color": "rgb(204,219,96)" + }, + { + "index": 266, + "name": "Fischer Simmons", + "first": "Gertrude", + "last": "Stephens", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pollobrav0/73.jpg", + "boolean": false, + "guid": "829192ff-f636-4781-b023-9f3085717193", + "integer": 31, + "date": "Thu Nov 01 2007 09:01:49 GMT-0700 (PDT)", + "shortText": "et cupidatat ad", + "mediumText": "Ad esse officia proident adipisicing sunt excepteur. Culpa ad sint dolor aute aute est. Proident aliqua fugiat officia mollit. Minim sunt consequat irure ut tempor laborum dolor cupidatat est aliqua consequat et.", + "longText": "Officia non fugiat tempor ad enim dolor. In irure commodo culpa ut Lorem aliqua laborum. Qui in cupidatat consequat eiusmod Lorem occaecat consectetur fugiat quis sit pariatur proident. Lorem sint reprehenderit pariatur eiusmod veniam reprehenderit incididunt. Cupidatat reprehenderit in sit consectetur sint. Et excepteur sit do aliquip ea veniam eu reprehenderit deserunt non sunt magna mollit anim.\r\nAmet cupidatat culpa dolore elit minim adipisicing veniam laboris. Reprehenderit exercitation et et velit qui ea nostrud. Exercitation esse nostrud cupidatat dolor dolor fugiat cupidatat eu magna commodo velit ex.\r\nMagna sint voluptate veniam in occaecat aliquip duis nisi. Aliqua elit veniam ea nostrud nisi id cillum esse ullamco eiusmod reprehenderit culpa. Lorem velit id culpa aliquip voluptate dolore nulla officia dolore mollit in aliquip velit elit.\r\n", + "address": "4 Stoddard Place", + "city": "Whitmer", + "state": "Tennessee", + "zip": 27389, + "country": "Korea (South)", + "email": "gertrudestephens@scentric.com", + "phone": "(940) 497-2705", + "color": "rgb(171,153,217)" + }, + { + "index": 267, + "name": "Boyd Blake", + "first": "Delaney", + "last": "Anderson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/carlosblanco_eu/73.jpg", + "boolean": false, + "guid": "031a10d0-2fe9-4ef3-af8e-f7b7c611cb73", + "integer": 33, + "date": "Mon Aug 10 1970 14:35:08 GMT-0700 (PDT)", + "shortText": "adipisicing fugiat qui dolore aute", + "mediumText": "Sit sunt pariatur incididunt est aute consectetur quis laboris nisi cillum deserunt in dolore. Sit fugiat labore enim consequat amet elit aliquip adipisicing. In excepteur laboris irure dolor laborum esse id. Minim nulla adipisicing in eiusmod enim dolor pariatur mollit velit amet proident mollit sunt.", + "longText": "Nisi laboris culpa in sit veniam anim nisi pariatur pariatur adipisicing non occaecat reprehenderit ut. Laborum nulla occaecat laboris qui aliqua laborum excepteur excepteur commodo. Fugiat anim proident proident exercitation esse nulla aute. Adipisicing in laborum fugiat eu tempor ullamco qui qui Lorem cupidatat sint ipsum aliqua. Labore commodo amet consequat officia incididunt cillum proident deserunt sint excepteur. Enim nostrud occaecat ipsum sint adipisicing quis sunt pariatur et sunt eu. Veniam nulla cupidatat officia culpa.\r\n", + "address": "3 Branton Street", + "city": "Ada", + "state": "Palau", + "zip": 48926, + "country": "Pakistan", + "email": "delaneyanderson@scentric.com", + "phone": "(879) 508-2698", + "color": "rgb(181,108,214)" + }, + { + "index": 268, + "name": "Foreman Jennings", + "first": "Nieves", + "last": "Browning", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/giakodes/73.jpg", + "boolean": false, + "guid": "f3328487-a346-46cd-986a-180b1336ce46", + "integer": 34, + "date": "Thu Aug 18 1977 11:28:15 GMT-0700 (PDT)", + "shortText": "culpa laborum nostrud proident qui", + "mediumText": "Tempor sunt anim occaecat in irure occaecat enim cupidatat voluptate ex laboris enim. Exercitation fugiat ad eu culpa est pariatur ea laboris aliquip laboris exercitation proident consectetur. Enim officia laboris elit quis. Occaecat fugiat tempor ea labore exercitation irure sint elit sint elit reprehenderit. Cupidatat anim sit eu nulla exercitation Lorem ipsum veniam.", + "longText": "Esse aute reprehenderit enim officia culpa. Reprehenderit duis mollit voluptate exercitation officia Lorem laborum laborum irure pariatur. Exercitation ex laboris magna excepteur qui labore culpa. Ut esse incididunt aliqua incididunt dolor deserunt esse. Et magna magna quis ipsum cupidatat voluptate incididunt aute sint consectetur officia.\r\nConsequat elit nostrud laborum veniam. Pariatur id consectetur duis et id adipisicing velit et ipsum pariatur proident nostrud reprehenderit. Culpa ad amet eiusmod quis reprehenderit aute eiusmod.\r\nPariatur nulla veniam amet sit fugiat ipsum velit fugiat consequat eu irure est labore. Ut veniam excepteur excepteur nisi fugiat. Ipsum enim excepteur pariatur est laboris deserunt aliqua velit fugiat. Irure ut duis laboris culpa quis ad deserunt sunt fugiat adipisicing. Aute est consectetur ad minim deserunt do.\r\n", + "address": "3 Berriman Street", + "city": "Chaparrito", + "state": "Virginia", + "zip": 46246, + "country": "Guyana", + "email": "nievesbrowning@scentric.com", + "phone": "(876) 426-2122", + "color": "rgb(247,203,76)" + }, + { + "index": 269, + "name": "Corine Woodard", + "first": "Santana", + "last": "Everett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/komplexb/73.jpg", + "boolean": true, + "guid": "92e47eb5-8a17-4884-9c8b-2789bc456ed9", + "integer": 84, + "date": "Tue Dec 26 1978 20:05:16 GMT-0800 (PST)", + "shortText": "Lorem aute", + "mediumText": "Qui irure duis reprehenderit duis. Ut consectetur mollit sint sint occaecat id nulla sint aute consectetur anim laborum aliquip commodo.", + "longText": "Ea officia culpa cupidatat enim fugiat mollit in quis excepteur culpa. Tempor et nulla irure nostrud qui adipisicing nulla consequat dolor veniam. Ex qui et duis anim irure laboris.\r\nDo commodo aute ipsum ullamco. Velit pariatur est sit laboris reprehenderit nisi voluptate consequat voluptate laborum sunt dolor velit. Occaecat cillum ex ad anim sint. Voluptate cupidatat magna labore veniam. Cupidatat ea nostrud est ipsum in. Deserunt sint adipisicing incididunt sint labore duis minim velit tempor. Lorem sint anim sunt sunt ipsum esse ea reprehenderit elit dolore aute sint.\r\nMagna commodo cupidatat nisi aute. Qui consequat culpa enim elit minim exercitation qui amet in cillum officia. Amet amet nulla aute elit sit irure pariatur proident est sint labore.\r\nProident dolore ut mollit enim veniam aliqua minim ex voluptate Lorem ullamco amet enim. Officia laborum enim sit aute incididunt nisi nulla magna Lorem officia aute mollit. Ullamco commodo incididunt excepteur sunt. Tempor veniam commodo minim dolore eu dolore est deserunt veniam ullamco.\r\nMagna dolor voluptate sint dolor tempor anim dolore quis aute magna reprehenderit ad. Incididunt fugiat aliqua culpa ullamco quis duis pariatur ullamco consequat voluptate enim velit. Duis aute qui qui voluptate elit ut amet elit anim. Excepteur esse proident laborum occaecat.\r\n", + "address": "4 Melrose Street", + "city": "Chelsea", + "state": "Wyoming", + "zip": 81598, + "country": "Poland", + "email": "santanaeverett@scentric.com", + "phone": "(993) 537-2899", + "color": "rgb(144,158,112)" + }, + { + "index": 270, + "name": "Maria Stokes", + "first": "Chambers", + "last": "Riggs", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/migl40d/73.jpg", + "boolean": true, + "guid": "cacd37bf-31ec-400b-bc9e-7ecb3a35d9be", + "integer": 9, + "date": "Thu Feb 06 2003 08:01:13 GMT-0800 (PST)", + "shortText": "veniam magna enim ullamco", + "mediumText": "Eiusmod culpa laboris est consequat in proident eiusmod occaecat consequat sit et mollit. Dolor aliquip anim ex laboris id non occaecat nisi amet eu anim ipsum proident eiusmod. Consequat esse Lorem quis aliquip duis quis minim quis duis. Occaecat commodo nulla minim ipsum do velit laborum consectetur id.", + "longText": "Dolor anim velit labore duis sunt nostrud duis sint ex irure. Voluptate laboris ipsum deserunt nisi voluptate dolor magna. Voluptate veniam amet reprehenderit laborum amet incididunt elit voluptate minim pariatur incididunt aute. Nulla excepteur eiusmod ad amet magna velit eu ea sit do Lorem ex nulla qui. Officia labore ut sint nostrud quis consectetur labore. Et quis voluptate non duis adipisicing quis sunt veniam incididunt velit consectetur.\r\nAdipisicing sit non consequat qui consequat commodo pariatur tempor consectetur. Adipisicing dolore aliquip ipsum nulla in incididunt mollit nulla. Pariatur non cillum do voluptate aliqua non aliquip esse qui voluptate aliquip magna esse. Dolor aliquip esse deserunt velit adipisicing adipisicing. Veniam in dolore do mollit ad exercitation commodo veniam eu. Magna non nulla proident occaecat.\r\nOccaecat magna magna ex culpa. Aliquip commodo laboris amet anim cillum elit officia esse id. Dolor mollit adipisicing velit excepteur anim commodo aute proident sunt. Irure reprehenderit ullamco amet id minim commodo tempor aute exercitation laboris amet incididunt et. Nostrud laborum mollit aliquip non eiusmod sint exercitation eiusmod labore cillum duis enim aute occaecat. Amet aute ea eiusmod dolore. Magna sit veniam nisi ullamco culpa.\r\n", + "address": "4 Jamaica Avenue", + "city": "Lupton", + "state": "Colorado", + "zip": 55948, + "country": "Canada", + "email": "chambersriggs@scentric.com", + "phone": "(825) 422-3231", + "color": "rgb(211,239,230)" + }, + { + "index": 271, + "name": "Montoya Battle", + "first": "Susanne", + "last": "Stein", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/erwinhines/73.jpg", + "boolean": false, + "guid": "386137ac-8367-4191-bca0-0385b64defbc", + "integer": 1, + "date": "Tue Feb 18 1986 07:03:21 GMT-0800 (PST)", + "shortText": "aliqua amet", + "mediumText": "Enim aliqua minim ipsum amet incididunt labore nulla labore enim. Esse eu ea occaecat consectetur labore exercitation do ut consequat est dolor Lorem. Do dolor nostrud nostrud labore.", + "longText": "Officia qui tempor cupidatat nostrud sunt cillum qui commodo pariatur non. Aliqua consectetur commodo ad consequat in est nisi. Cupidatat in eiusmod deserunt veniam. Sunt incididunt enim ex sunt aliqua excepteur non quis deserunt magna eiusmod anim. Enim ex proident laborum excepteur ea anim sint. Consectetur anim esse et id ut incididunt sunt officia consectetur sunt anim do ea ipsum. Magna Lorem ullamco ad eu amet deserunt consectetur.\r\nEa consectetur aute laborum commodo irure excepteur ipsum cupidatat reprehenderit duis. Deserunt exercitation labore quis adipisicing amet reprehenderit ad minim esse eu esse. Qui adipisicing aliquip sunt laborum duis occaecat.\r\nPariatur eiusmod nostrud nostrud excepteur non ex anim non do voluptate. Nulla ut deserunt deserunt in aliqua duis laborum ex. Eiusmod eiusmod nostrud esse eiusmod deserunt ullamco adipisicing aute non nulla. Eiusmod eiusmod consequat proident culpa ullamco laborum.\r\nDo non veniam aliquip officia. Amet dolor excepteur qui exercitation voluptate laboris culpa laboris Lorem ullamco fugiat mollit exercitation excepteur. Esse occaecat magna reprehenderit in eiusmod magna fugiat sit occaecat consectetur velit consequat veniam aliquip. Excepteur aliquip ipsum duis sunt enim aliqua elit exercitation eu in cillum deserunt. Qui fugiat exercitation eu elit minim officia minim ex enim adipisicing incididunt ut.\r\n", + "address": "3 Porter Avenue", + "city": "Bentley", + "state": "Utah", + "zip": 67531, + "country": "US Minor Outlying Islands", + "email": "susannestein@scentric.com", + "phone": "(972) 556-2548", + "color": "rgb(176,88,163)" + }, + { + "index": 272, + "name": "Antoinette Cooper", + "first": "Stout", + "last": "Ferrell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/chelseabeachem/73.jpg", + "boolean": false, + "guid": "b2443100-77a3-48fc-825f-671f2f386da1", + "integer": 35, + "date": "Tue Sep 09 2008 23:36:55 GMT-0700 (PDT)", + "shortText": "tempor mollit", + "mediumText": "Eiusmod aliqua irure velit nostrud dolor nostrud.", + "longText": "Amet voluptate dolor sunt culpa eiusmod ipsum Lorem officia eiusmod est nulla. Ut minim veniam veniam sunt excepteur. Fugiat ut amet deserunt ex voluptate ex. Aute deserunt adipisicing ipsum eiusmod eiusmod duis eiusmod laborum voluptate ut commodo.\r\n", + "address": "2 Cortelyou Road", + "city": "Websterville", + "state": "Idaho", + "zip": 50360, + "country": "East Timor", + "email": "stoutferrell@scentric.com", + "phone": "(884) 588-3785", + "color": "rgb(207,67,59)" + }, + { + "index": 273, + "name": "Chavez Rhodes", + "first": "Jennifer", + "last": "Solomon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bouyghajden/73.jpg", + "boolean": true, + "guid": "cf0294a4-b641-4b2a-94ce-7db7921d670c", + "integer": 62, + "date": "Fri Oct 04 1996 10:43:24 GMT-0700 (PDT)", + "shortText": "nostrud id eiusmod", + "mediumText": "Qui dolore nisi ut eu ea duis elit ipsum aliquip aliqua. Sunt cupidatat ut reprehenderit sit nulla laborum consectetur fugiat magna elit esse nulla.", + "longText": "Sit irure nulla excepteur ad velit excepteur exercitation enim eu fugiat deserunt duis. Amet veniam adipisicing aliquip tempor irure. Mollit non culpa amet tempor magna sint esse ad proident. Duis cupidatat nostrud esse veniam pariatur voluptate cupidatat dolor ullamco occaecat magna aliquip sunt esse.\r\nNostrud deserunt proident velit tempor esse exercitation ex ipsum velit proident aute ullamco amet velit. Occaecat veniam sit ipsum do dolore nisi aute occaecat. Amet pariatur occaecat aliqua sint velit aliquip non consequat eiusmod occaecat qui aliquip enim exercitation. Id labore duis quis voluptate nulla aute occaecat. Sunt amet dolore ad minim laborum sit officia amet eu dolore Lorem quis adipisicing esse. Non quis consequat anim nostrud id in in. Sit et esse nostrud quis eu aute excepteur qui.\r\nIrure non sint sint Lorem occaecat quis aliquip exercitation adipisicing amet tempor Lorem sint consequat. Commodo tempor consectetur commodo labore et veniam sunt. Cupidatat commodo anim reprehenderit qui culpa aliqua aliquip enim dolor.\r\nDolore do nisi est exercitation nisi irure et et Lorem sint ullamco non enim duis. Sint nostrud ipsum veniam anim et dolor id amet id fugiat consequat non. Sunt laboris culpa ut deserunt ut ut irure fugiat dolore eiusmod fugiat quis.\r\nDeserunt qui veniam nostrud in nostrud adipisicing sunt veniam consequat consectetur duis esse magna ipsum. Deserunt anim dolore ullamco aute fugiat mollit adipisicing sit exercitation Lorem. Incididunt Lorem duis qui enim adipisicing sint anim. Ex velit ullamco commodo pariatur amet. Sit et voluptate occaecat mollit fugiat pariatur id elit.\r\n", + "address": "3 Ruby Street", + "city": "Goochland", + "state": "Arkansas", + "zip": 63056, + "country": "Denmark", + "email": "jennifersolomon@scentric.com", + "phone": "(852) 542-2938", + "color": "rgb(234,125,93)" + }, + { + "index": 274, + "name": "Sanchez Summers", + "first": "Osborne", + "last": "Buckley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/butusai/73.jpg", + "boolean": false, + "guid": "6afd5e1c-3a29-4134-b7a5-7196eb7798a4", + "integer": 76, + "date": "Sat Oct 07 1995 23:24:37 GMT-0700 (PDT)", + "shortText": "enim do voluptate quis sit", + "mediumText": "Quis amet id irure elit eu ad duis id veniam. Qui in mollit in consectetur reprehenderit ex est. Id non tempor minim aliqua commodo dolore do mollit Lorem eu non amet est.", + "longText": "Eiusmod non velit eiusmod adipisicing ut velit est adipisicing in. Eiusmod dolore et non dolore esse velit id anim proident nisi commodo. Amet fugiat magna cupidatat est esse duis et.\r\n", + "address": "3 Seigel Street", + "city": "Thatcher", + "state": "Delaware", + "zip": 98441, + "country": "Yemen", + "email": "osbornebuckley@scentric.com", + "phone": "(930) 530-3501", + "color": "rgb(53,175,123)" + }, + { + "index": 275, + "name": "Melinda Herrera", + "first": "Paula", + "last": "Clemons", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ainsleywagon/73.jpg", + "boolean": true, + "guid": "1d0ee711-59d7-4c1f-9420-3fab9a5b62f6", + "integer": 0, + "date": "Sun Aug 23 1970 02:12:34 GMT-0700 (PDT)", + "shortText": "proident laborum dolor magna laboris", + "mediumText": "Minim duis magna cillum dolore excepteur eiusmod eiusmod officia est laboris veniam. Officia amet occaecat esse non dolor. Esse quis labore ad occaecat adipisicing consequat nisi in et sunt excepteur aute consequat.", + "longText": "Mollit magna nulla exercitation commodo excepteur amet. Duis fugiat Lorem mollit adipisicing anim adipisicing adipisicing anim fugiat nulla anim. Eu adipisicing irure Lorem qui enim nisi velit exercitation duis. Aliquip ea labore commodo et nostrud. Aute sit consequat reprehenderit nulla aliquip ipsum esse esse qui exercitation pariatur cupidatat quis cillum. Do esse in ad id est id laboris incididunt.\r\nQui non quis ipsum qui fugiat pariatur. Dolore incididunt sunt eiusmod laboris nisi nulla. Qui fugiat irure consequat culpa ad non do labore commodo ut est velit nostrud. Cillum dolor aliquip elit est enim tempor consectetur. Id nostrud duis et irure nostrud do enim laboris fugiat fugiat eu eiusmod nisi.\r\nCommodo pariatur in officia cupidatat consequat eiusmod ad Lorem dolore enim aliquip elit. Ex in commodo enim sunt eiusmod. Labore consequat culpa quis voluptate aliqua. Fugiat reprehenderit cupidatat esse eiusmod duis consequat. Quis est veniam reprehenderit consectetur cupidatat aliquip in amet dolor.\r\nMagna est esse excepteur sint enim Lorem nisi deserunt pariatur non. Dolor enim officia dolore deserunt consequat quis ea adipisicing cillum aliqua anim laboris irure. In do consectetur est culpa. Sunt occaecat voluptate pariatur dolor id velit magna do veniam duis excepteur ut ad voluptate. Ut excepteur laboris ea ut.\r\nEu eiusmod excepteur reprehenderit duis ipsum commodo ullamco cillum officia incididunt esse eu nulla reprehenderit. Aliquip elit consequat dolor labore. Laborum proident ullamco excepteur dolor esse occaecat et aliqua. Commodo ad exercitation minim ad occaecat ullamco. Veniam id dolor aliquip cupidatat. Voluptate voluptate aliqua nulla aliquip adipisicing fugiat aute laboris quis amet officia magna Lorem labore.\r\n", + "address": "3 Beadel Street", + "city": "Thornport", + "state": "Federated States Of Micronesia", + "zip": 81284, + "country": "Laos", + "email": "paulaclemons@scentric.com", + "phone": "(807) 420-2457", + "color": "rgb(173,67,66)" + }, + { + "index": 276, + "name": "Mara Ortiz", + "first": "Pace", + "last": "Hunter", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/chadbercea/73.jpg", + "boolean": false, + "guid": "65b9988b-b552-44e7-8e59-7a490e0aa83b", + "integer": 45, + "date": "Wed Oct 25 2006 06:16:29 GMT-0700 (PDT)", + "shortText": "dolor ipsum", + "mediumText": "Dolore laborum non magna voluptate cillum irure ipsum ad eu aute. Proident mollit nostrud laboris ad sunt laboris aliquip quis aute duis id mollit. Commodo qui anim adipisicing anim. Eu deserunt dolor Lorem elit quis laboris nulla enim.", + "longText": "Sunt adipisicing ea dolore ea id veniam eiusmod consequat cupidatat nulla ullamco magna mollit. Excepteur qui do aliquip consequat incididunt fugiat nostrud pariatur eiusmod nostrud quis reprehenderit officia adipisicing. Consequat mollit esse eiusmod culpa qui in officia irure in enim veniam.\r\n", + "address": "2 Broome Street", + "city": "Hobucken", + "state": "Guam", + "zip": 15780, + "country": "Sierra Leone", + "email": "pacehunter@scentric.com", + "phone": "(929) 573-3129", + "color": "rgb(228,124,211)" + }, + { + "index": 277, + "name": "Hannah Mercado", + "first": "Velazquez", + "last": "Snider", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/devinhalladay/73.jpg", + "boolean": true, + "guid": "13ecf233-dc36-43ed-8b27-00fa6f367502", + "integer": 53, + "date": "Tue Dec 26 1995 12:29:11 GMT-0800 (PST)", + "shortText": "nulla cillum dolore amet", + "mediumText": "Sunt cillum deserunt ipsum est ea occaecat deserunt ex cillum ut magna do laboris minim.", + "longText": "Nostrud non aute culpa eu consectetur nisi incididunt deserunt deserunt laborum duis ad consequat. Ad tempor mollit duis deserunt anim voluptate reprehenderit proident non dolore anim dolor. Reprehenderit excepteur mollit culpa Lorem dolore. Exercitation incididunt id non esse magna qui nostrud ad.\r\n", + "address": "2 Thatford Avenue", + "city": "Rosburg", + "state": "Pennsylvania", + "zip": 18264, + "country": "Nigeria", + "email": "velazquezsnider@scentric.com", + "phone": "(948) 461-3658", + "color": "rgb(146,114,59)" + }, + { + "index": 278, + "name": "King Murray", + "first": "Lawrence", + "last": "Floyd", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mateaodviteza/73.jpg", + "boolean": false, + "guid": "48e5fed4-514a-4e9e-8842-57a2e92a654c", + "integer": 33, + "date": "Fri Aug 10 2012 11:19:30 GMT-0700 (PDT)", + "shortText": "consequat", + "mediumText": "Proident nisi exercitation amet reprehenderit cupidatat ad exercitation eu ad nostrud ex sunt.", + "longText": "Elit anim consequat minim officia reprehenderit ex voluptate incididunt Lorem. Incididunt qui incididunt Lorem do pariatur. Id aute anim elit amet labore non eiusmod sint culpa sunt ullamco irure. Adipisicing officia ea ad aliqua. Proident officia occaecat velit est amet pariatur duis esse cillum quis. Et mollit culpa ipsum ad do adipisicing sint amet.\r\nCulpa aliqua do sunt veniam laboris adipisicing pariatur mollit anim. Fugiat cupidatat labore eu eu do ea. Voluptate quis dolore ex quis culpa. Nostrud ea enim elit reprehenderit. Sint veniam commodo officia et quis laboris labore culpa quis ullamco ullamco. Labore occaecat nulla et incididunt consectetur.\r\nSit sit commodo amet cupidatat velit velit qui sint culpa magna magna proident. Adipisicing deserunt anim ullamco eiusmod aliqua laboris aliquip incididunt. Ipsum nisi velit nulla ex elit sit nostrud qui. Magna irure laboris quis Lorem enim culpa. Enim velit enim culpa nisi adipisicing officia voluptate cupidatat qui et. Sit deserunt incididunt ullamco deserunt non aliquip ut laborum Lorem dolor ullamco.\r\nAute esse dolore nisi ut sit fugiat dolore aute aliqua. Aliqua est voluptate enim dolor ullamco quis nisi qui esse nisi tempor do. Do deserunt veniam aliquip qui veniam ex nostrud incididunt culpa in magna non.\r\n", + "address": "3 Hunts Lane", + "city": "Ola", + "state": "New Hampshire", + "zip": 33769, + "country": "Netherlands", + "email": "lawrencefloyd@scentric.com", + "phone": "(813) 569-3499", + "color": "rgb(116,205,80)" + }, + { + "index": 279, + "name": "Camille Massey", + "first": "Short", + "last": "Hensley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/vickyshits/73.jpg", + "boolean": false, + "guid": "08757590-e154-4bf1-b5a4-3a8763c63417", + "integer": 8, + "date": "Tue Dec 26 1989 15:35:16 GMT-0800 (PST)", + "shortText": "officia", + "mediumText": "Sint excepteur adipisicing veniam consectetur incididunt nostrud duis nulla velit laborum. Eu incididunt qui duis deserunt veniam. Culpa mollit nostrud magna dolor reprehenderit esse in consequat irure ad.", + "longText": "Occaecat magna ex ex qui exercitation adipisicing ea aliqua laboris est est adipisicing Lorem dolore. Sunt cillum labore ea amet eiusmod sunt qui. Duis deserunt do irure sit quis voluptate eu duis eiusmod. Ad incididunt anim fugiat esse ipsum aliquip ut cillum tempor eiusmod.\r\nEt Lorem amet cillum ipsum laboris sit deserunt esse duis sit dolore dolor commodo. Labore nulla cillum ad minim proident reprehenderit eu in duis consectetur amet. Aliquip velit nisi culpa ipsum qui sint ut elit id pariatur Lorem anim labore.\r\n", + "address": "2 Greene Avenue", + "city": "Dragoon", + "state": "North Dakota", + "zip": 18599, + "country": "Morocco", + "email": "shorthensley@scentric.com", + "phone": "(959) 437-3887", + "color": "rgb(61,124,231)" + }, + { + "index": 280, + "name": "Etta Nicholson", + "first": "Sadie", + "last": "Johnson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kamal_chaneman/73.jpg", + "boolean": true, + "guid": "445d79d7-84ef-49ef-aaac-2e47925151d7", + "integer": 36, + "date": "Wed Jan 05 2011 12:47:59 GMT-0800 (PST)", + "shortText": "aliquip quis incididunt esse commodo", + "mediumText": "Aliquip ut reprehenderit laboris veniam ad laboris excepteur. Et ut qui fugiat consequat qui aliquip aute incididunt magna non.", + "longText": "Sint anim magna Lorem incididunt tempor esse voluptate commodo qui velit velit aliqua adipisicing. Officia enim excepteur proident non nostrud est quis non quis anim ut irure nulla. Culpa officia velit et magna non sunt culpa laboris nulla enim. Et dolor laborum amet quis occaecat irure. Labore proident ea nulla aute anim do.\r\n", + "address": "4 Chestnut Avenue", + "city": "Boling", + "state": "Northern Mariana Islands", + "zip": 79666, + "country": "Czech Republic", + "email": "sadiejohnson@scentric.com", + "phone": "(929) 469-3200", + "color": "rgb(61,210,234)" + }, + { + "index": 281, + "name": "Roxanne Munoz", + "first": "Marguerite", + "last": "Rodriguez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_yardenoon/73.jpg", + "boolean": false, + "guid": "b7b8e91a-c476-45fb-b728-78461ff01383", + "integer": 59, + "date": "Tue Nov 11 1997 21:52:13 GMT-0800 (PST)", + "shortText": "amet adipisicing dolore Lorem consequat", + "mediumText": "Laborum fugiat anim pariatur minim fugiat sit pariatur exercitation proident. Incididunt ea duis nisi et. Do eu consectetur cillum veniam laboris consequat sunt labore exercitation laborum ipsum do duis sint. Pariatur id tempor cupidatat cillum ad eiusmod. Aliqua dolore enim magna officia tempor consequat Lorem excepteur culpa excepteur.", + "longText": "Occaecat ullamco nisi occaecat consequat consectetur aute in amet. Duis exercitation et ea aliqua elit ipsum ea ipsum laboris aliqua Lorem labore minim pariatur. Amet aliqua nostrud officia ex commodo mollit ex mollit consectetur esse elit sint. Est pariatur irure occaecat aute labore cillum nisi id.\r\nFugiat cupidatat veniam in adipisicing sint sunt cillum consequat in. Quis excepteur ad mollit occaecat et anim voluptate cupidatat. Sunt sit nisi amet excepteur voluptate. Cupidatat do ea fugiat sint minim elit nostrud. Culpa dolore in fugiat pariatur excepteur minim ad incididunt Lorem anim consequat consectetur. Duis est nulla sit eu nulla culpa proident et nostrud nostrud quis laborum dolore. Aute tempor et culpa amet.\r\n", + "address": "3 Box Street", + "city": "Caledonia", + "state": "South Dakota", + "zip": 29414, + "country": "Cape Verde", + "email": "margueriterodriguez@scentric.com", + "phone": "(975) 555-3617", + "color": "rgb(217,168,93)" + }, + { + "index": 282, + "name": "Chandler Mclean", + "first": "Olsen", + "last": "Rollins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/daniloc/73.jpg", + "boolean": true, + "guid": "18eb19e2-f53c-42f3-b3c0-f92ba5058e72", + "integer": 86, + "date": "Mon Nov 05 2012 21:48:32 GMT-0800 (PST)", + "shortText": "sunt", + "mediumText": "Sit magna labore veniam eu dolor.", + "longText": "Laboris pariatur qui esse proident aute in in quis aliquip tempor est Lorem elit nulla. Irure est id cillum in dolore qui mollit ullamco occaecat aute cupidatat culpa. Voluptate est nostrud eu laborum veniam eiusmod culpa eiusmod minim voluptate. Cupidatat cillum eiusmod aute nostrud exercitation est do anim in. Aliquip elit ullamco voluptate incididunt. In minim laboris nostrud nisi est officia proident consequat consequat velit enim ut eiusmod.\r\nSunt ex sunt ipsum dolor proident mollit cillum. In proident eiusmod nostrud cillum occaecat excepteur enim incididunt pariatur incididunt velit deserunt. Ullamco voluptate quis Lorem id qui sit occaecat qui deserunt qui aute eiusmod.\r\nCupidatat eiusmod eiusmod non officia nisi aliquip nulla eiusmod deserunt voluptate qui voluptate magna ad. Duis sit pariatur sint ea enim do esse cillum sit proident sunt. Aliqua deserunt deserunt adipisicing laboris sint voluptate occaecat culpa ipsum ut aute. Nulla amet est et aliquip commodo nostrud in ut laborum qui ullamco id aliqua. Consectetur magna aute aliquip sunt anim occaecat id ex consectetur ipsum. Eiusmod occaecat culpa laborum fugiat. Minim in sunt occaecat eu ex velit sit eiusmod ad reprehenderit.\r\nMinim nulla commodo qui velit proident. Nisi reprehenderit ullamco in in non eu. Enim exercitation voluptate consequat duis non officia quis irure consequat eu anim. Minim Lorem irure eu pariatur aute in Lorem deserunt esse elit officia excepteur. Est eiusmod tempor incididunt consectetur ullamco elit aliquip eu sunt elit eu sint aliquip. Irure adipisicing veniam aliqua incididunt officia esse veniam veniam officia.\r\nOfficia velit nostrud eiusmod ex elit nostrud non veniam commodo exercitation amet. Enim non mollit cupidatat magna aute anim tempor. Consequat ea nostrud esse laboris minim commodo culpa laborum aliqua adipisicing cupidatat sit. Ullamco enim fugiat tempor minim officia ipsum duis et sunt sint.\r\n", + "address": "4 Neptune Court", + "city": "Fillmore", + "state": "Alaska", + "zip": 62131, + "country": "Madagascar", + "email": "olsenrollins@scentric.com", + "phone": "(936) 437-3569", + "color": "rgb(163,129,119)" + }, + { + "index": 283, + "name": "Clements Wynn", + "first": "Dollie", + "last": "Rowland", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jamesmbickerton/73.jpg", + "boolean": true, + "guid": "ecf696fd-aa3b-4bed-bdb1-b3b9a18f13f5", + "integer": 24, + "date": "Fri Jan 11 1974 07:17:27 GMT-0700 (PDT)", + "shortText": "consequat voluptate", + "mediumText": "Ut ullamco labore elit exercitation pariatur consequat quis proident. Tempor aute ex consectetur ut eu qui incididunt aliqua anim duis sit. Elit consequat nisi fugiat elit sit nisi eu laborum excepteur nulla proident ex. Eiusmod qui culpa quis velit elit consequat nulla.", + "longText": "Occaecat aliqua sunt velit deserunt mollit fugiat excepteur adipisicing pariatur non amet enim ad. Consectetur aliqua do sint cupidatat nostrud ipsum anim laborum nulla aliquip sit. Labore mollit amet Lorem quis. Ex cillum minim sit eu duis. Nulla sint esse nostrud nisi mollit irure commodo aute esse esse aliquip sunt ut. Ipsum et nulla cupidatat tempor consequat do occaecat ut.\r\nConsequat tempor et qui exercitation non in commodo. Aute minim nostrud laboris dolore reprehenderit. Adipisicing proident esse laborum cillum tempor veniam incididunt minim est adipisicing. Dolor nisi nisi dolore amet ea ipsum mollit amet.\r\n", + "address": "3 Minna Street", + "city": "Gratton", + "state": "Louisiana", + "zip": 90178, + "country": "Austria", + "email": "dollierowland@scentric.com", + "phone": "(992) 594-3916", + "color": "rgb(197,160,174)" + }, + { + "index": 284, + "name": "Cotton Newman", + "first": "Mccullough", + "last": "Oneil", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ddang33/73.jpg", + "boolean": true, + "guid": "da4451a9-1961-4257-87c6-19aa0c2780d9", + "integer": 24, + "date": "Fri Oct 26 1990 18:43:21 GMT-0700 (PDT)", + "shortText": "id nulla", + "mediumText": "In reprehenderit velit non aute ad mollit aliqua ullamco nostrud adipisicing dolore incididunt. Mollit et consequat eiusmod in laborum nulla in irure qui. Ex consequat est in laboris. Sunt ipsum eu eiusmod quis dolor nostrud sunt consectetur in ea ex commodo. Do enim occaecat labore et occaecat mollit consequat.", + "longText": "Nulla sunt aliqua ea laborum fugiat dolor reprehenderit nisi nulla pariatur minim. Duis aliquip in incididunt sunt sit nulla sunt cillum ut anim elit. Commodo excepteur dolore nisi labore exercitation commodo Lorem veniam anim nisi velit dolor aute.\r\nNulla labore laborum Lorem eu elit consequat eiusmod dolore irure ex. Occaecat enim ea nisi duis aliqua commodo sint sint enim consequat exercitation amet. Cupidatat Lorem culpa quis qui dolore. Proident non eu sint eiusmod id ullamco nisi nisi.\r\nAdipisicing nisi labore aliqua irure occaecat consectetur aute ut mollit ad excepteur. Magna et non laboris velit ipsum. Id et cillum aute nulla consectetur esse est quis culpa consequat. Veniam enim dolore dolore consequat pariatur aute elit consequat. Ipsum ullamco consectetur cillum dolor qui incididunt quis occaecat est proident eiusmod Lorem. Proident excepteur et mollit ipsum culpa duis ut fugiat tempor in ea.\r\n", + "address": "3 Troutman Street", + "city": "Roland", + "state": "Missouri", + "zip": 86860, + "country": "Venezuela", + "email": "mcculloughoneil@scentric.com", + "phone": "(823) 420-3250", + "color": "rgb(251,198,94)" + }, + { + "index": 285, + "name": "Gentry Ellis", + "first": "Bessie", + "last": "Mccarty", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/captnphilip/73.jpg", + "boolean": true, + "guid": "0c5c5f6a-c138-49a9-91a2-37523afe47ad", + "integer": 89, + "date": "Fri Jun 03 1983 21:40:24 GMT-0700 (PDT)", + "shortText": "in sint", + "mediumText": "Ullamco ex Lorem dolor cillum sint duis quis consequat consequat. Do ad proident ad deserunt do incididunt tempor qui anim tempor ullamco incididunt eiusmod Lorem. Et ex adipisicing esse sit velit excepteur reprehenderit proident enim. Magna exercitation ullamco commodo culpa fugiat laborum ipsum est ullamco occaecat nisi.", + "longText": "Ut veniam ad exercitation elit in anim nulla fugiat exercitation consequat officia enim. Sint id sunt sit Lorem veniam sint eu occaecat consequat consectetur nulla. Laboris incididunt aute esse duis magna proident cupidatat incididunt incididunt anim irure excepteur nostrud anim. Velit nisi officia pariatur pariatur enim veniam culpa ipsum nulla cupidatat id.\r\n", + "address": "4 Juliana Place", + "city": "Driftwood", + "state": "Kentucky", + "zip": 15926, + "country": "Hong Kong", + "email": "bessiemccarty@scentric.com", + "phone": "(873) 427-3409", + "color": "rgb(81,159,158)" + }, + { + "index": 286, + "name": "Walsh Joyce", + "first": "Antonia", + "last": "Wilder", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rangafangs/73.jpg", + "boolean": true, + "guid": "61dd3458-c773-4f4b-b2bb-3d301963acb2", + "integer": 63, + "date": "Thu Apr 03 2008 20:31:45 GMT-0700 (PDT)", + "shortText": "quis magna nisi", + "mediumText": "Pariatur ullamco mollit aliquip adipisicing dolore reprehenderit nulla in. Et do dolor pariatur est laboris ea amet proident elit proident est. Lorem et est nisi deserunt dolor consectetur cupidatat ea ex sunt. Qui amet veniam reprehenderit mollit adipisicing nulla in do voluptate. Fugiat irure esse proident esse anim Lorem et pariatur dolor.", + "longText": "Aute commodo incididunt eu consequat. Exercitation esse dolor id id in Lorem tempor laboris ex esse. Reprehenderit eiusmod consequat commodo consequat est. Ut magna mollit officia sint minim velit sunt magna commodo occaecat Lorem eu veniam nostrud.\r\nQui eu duis aliquip dolor dolor aliquip. Officia irure proident irure nulla non sint fugiat mollit sunt irure fugiat laborum. Labore non duis voluptate velit magna laborum aliquip officia ea reprehenderit ullamco ut eiusmod eiusmod. Velit sint esse eiusmod exercitation id voluptate veniam occaecat sit id eiusmod.\r\n", + "address": "3 Vandalia Avenue", + "city": "Haena", + "state": "American Samoa", + "zip": 29939, + "country": "Sri Lanka", + "email": "antoniawilder@scentric.com", + "phone": "(871) 452-2870", + "color": "rgb(215,69,234)" + }, + { + "index": 287, + "name": "Espinoza Sargent", + "first": "Lee", + "last": "Mccray", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/zachbruggeman/73.jpg", + "boolean": false, + "guid": "8d6ab343-c3b7-4878-abfd-02a4bd8c4aad", + "integer": 34, + "date": "Sat Nov 24 2012 16:55:52 GMT-0800 (PST)", + "shortText": "laboris", + "mediumText": "Tempor et laboris nisi in deserunt ea veniam nostrud proident mollit ex nostrud adipisicing minim. Aliqua commodo eiusmod laborum labore. Velit et occaecat laborum aliqua labore culpa elit aute.", + "longText": "Ex labore aliquip voluptate enim Lorem qui cupidatat ipsum velit irure ullamco reprehenderit ad ad. Est enim ullamco velit pariatur eiusmod exercitation minim ex eiusmod laboris irure elit occaecat ipsum. Occaecat culpa dolore id veniam in. Consequat deserunt proident sit ad consequat proident. Dolore do voluptate ipsum eiusmod elit culpa irure in laborum aute. Ad ad dolor deserunt veniam aliqua adipisicing aliqua magna non pariatur dolore qui.\r\nNon in duis aliquip in nostrud magna ipsum ullamco. Reprehenderit do officia ad magna culpa id eiusmod et quis adipisicing nisi sint. Ullamco tempor cupidatat quis aliquip anim velit.\r\nDo id dolore veniam voluptate voluptate in ullamco dolor aliqua. Culpa duis enim eiusmod anim ipsum dolore consectetur velit esse aliqua aliquip amet. Nulla sit nulla et veniam eu. Sint nostrud do irure reprehenderit nulla consectetur in eu est id minim. Incididunt consectetur sint non nisi do anim veniam laboris in ad. Ut commodo elit est et mollit velit sunt dolore enim fugiat nulla voluptate sit irure. Laborum fugiat pariatur ut dolore ut qui minim.\r\nCupidatat nulla elit non ex elit. Deserunt exercitation excepteur nisi enim nulla commodo cupidatat exercitation est incididunt ex aute laboris. Id mollit nostrud veniam eiusmod minim esse nisi amet reprehenderit cillum aute sit fugiat. Nulla ad laboris laborum tempor dolor enim ullamco adipisicing do ipsum. Non reprehenderit sunt consectetur est labore consequat cupidatat cillum voluptate voluptate aliquip. Voluptate consectetur duis ipsum do mollit. Aute deserunt anim tempor veniam exercitation ut.\r\n", + "address": "4 Lombardy Street", + "city": "Thynedale", + "state": "Minnesota", + "zip": 37944, + "country": "Turkmenistan", + "email": "leemccray@scentric.com", + "phone": "(948) 512-3677", + "color": "rgb(124,117,105)" + }, + { + "index": 288, + "name": "Lillie Hewitt", + "first": "Cecelia", + "last": "Roman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/orkuncaylar/73.jpg", + "boolean": true, + "guid": "fd80b277-7170-4ff2-ad97-36272ea38b7d", + "integer": 54, + "date": "Mon Jul 11 1977 01:50:59 GMT-0700 (PDT)", + "shortText": "excepteur", + "mediumText": "Incididunt reprehenderit Lorem mollit consectetur adipisicing tempor occaecat nulla irure. Non nulla id proident quis est laboris adipisicing id eu id incididunt enim. Elit cillum sit ut elit nisi ea.", + "longText": "Ex adipisicing irure occaecat exercitation excepteur amet est eiusmod elit ullamco. Non tempor sit Lorem laborum laboris veniam elit sunt consequat. Pariatur officia laborum exercitation nostrud esse culpa consequat minim eiusmod voluptate consequat quis ad. Deserunt duis et Lorem labore do irure nostrud sit. Ullamco ad id sint sint cupidatat labore.\r\nEiusmod elit dolor qui nostrud eiusmod. Tempor veniam officia do exercitation. Id Lorem elit aute pariatur nostrud fugiat velit exercitation laboris ullamco irure. Laborum mollit occaecat reprehenderit dolore elit aliqua. Labore irure dolore proident non nisi culpa amet est anim non. Excepteur id veniam cupidatat aliquip ipsum cupidatat voluptate mollit in ut quis. Duis aute sunt fugiat ad consequat aliqua ea dolore esse consectetur non officia minim minim.\r\n", + "address": "3 Chauncey Street", + "city": "Rosedale", + "state": "Hawaii", + "zip": 94656, + "country": "Burundi", + "email": "ceceliaroman@scentric.com", + "phone": "(989) 468-2742", + "color": "rgb(136,244,245)" + }, + { + "index": 289, + "name": "Travis Ballard", + "first": "Georgia", + "last": "Horne", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/adamnac/73.jpg", + "boolean": false, + "guid": "c91bf011-bcd9-47fd-98b4-255ed2431de0", + "integer": 16, + "date": "Fri Aug 21 1998 11:13:07 GMT-0700 (PDT)", + "shortText": "sint enim fugiat culpa irure", + "mediumText": "Enim mollit ex velit anim ad. Mollit nulla sit est in minim voluptate ea deserunt commodo excepteur.", + "longText": "Consectetur aute officia nisi sint ut enim consequat. Id culpa in velit tempor nulla officia culpa. Ipsum occaecat tempor laborum veniam cillum occaecat consequat veniam. Nostrud aute velit veniam pariatur sint nostrud Lorem ipsum. Occaecat esse ea excepteur consequat exercitation eiusmod exercitation consequat do esse irure deserunt voluptate ut.\r\nConsectetur irure nostrud nulla ipsum fugiat nisi ex eu. Dolor ea deserunt aute cupidatat duis exercitation dolor consectetur do aliquip. Excepteur in ea cupidatat quis fugiat. Voluptate labore id tempor veniam pariatur excepteur ipsum.\r\nMagna qui ad aliqua minim sunt. Non enim eu proident esse dolor dolore elit Lorem dolore labore tempor eu. Incididunt elit esse cupidatat proident do sunt culpa sit elit cupidatat proident. Culpa dolore esse irure magna quis magna officia nostrud culpa dolor do non id. Esse laborum ea consequat commodo fugiat duis. Pariatur enim proident minim cupidatat dolor occaecat irure do. Incididunt dolor magna enim non ipsum minim cillum quis cillum velit culpa eu.\r\nEst esse eu commodo ea sint. Labore adipisicing cupidatat fugiat ea nostrud adipisicing ipsum. Esse eiusmod do tempor cillum sint dolor cillum occaecat incididunt ipsum exercitation sunt. Minim est ex commodo amet id sunt elit ea amet dolor ad. Ad elit exercitation consectetur nostrud elit exercitation irure fugiat dolore occaecat aliqua laborum. Sint sint et cupidatat laboris sunt exercitation ut dolor laborum consectetur minim.\r\n", + "address": "3 Jackson Place", + "city": "Titanic", + "state": "Alabama", + "zip": 30613, + "country": "Western Sahara", + "email": "georgiahorne@scentric.com", + "phone": "(862) 588-3110", + "color": "rgb(87,132,165)" + }, + { + "index": 290, + "name": "Natalie Mclaughlin", + "first": "Christa", + "last": "Whitney", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jeremydowe/73.jpg", + "boolean": false, + "guid": "99003ea4-7908-4727-9909-1fc5a6e1b77d", + "integer": 38, + "date": "Wed Jun 18 2014 21:58:36 GMT-0700 (PDT)", + "shortText": "fugiat", + "mediumText": "Labore cillum ut voluptate laboris ipsum Lorem sint sit ut adipisicing ex occaecat aliquip nostrud. Deserunt officia minim sunt labore excepteur.", + "longText": "Voluptate cupidatat do eiusmod et ex magna nisi mollit veniam consequat fugiat. Velit culpa veniam sint nostrud aute aliquip id commodo consectetur. Reprehenderit aute consequat eu ullamco irure duis excepteur. Voluptate et aute culpa et pariatur sit ullamco deserunt cillum est magna reprehenderit tempor occaecat. Duis elit dolor id Lorem cupidatat sit aliquip. Pariatur aliqua occaecat sit sint in ullamco mollit duis aute proident. Et commodo pariatur nostrud est.\r\n", + "address": "3 Greenpoint Avenue", + "city": "Abiquiu", + "state": "North Carolina", + "zip": 97106, + "country": "Mozambique", + "email": "christawhitney@scentric.com", + "phone": "(882) 546-3928", + "color": "rgb(211,106,204)" + }, + { + "index": 291, + "name": "Sexton Phillips", + "first": "Ebony", + "last": "Riley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/adamawesomeface/73.jpg", + "boolean": false, + "guid": "79a69d1d-7c62-4f81-8cb4-2933233de8f0", + "integer": 31, + "date": "Mon Oct 28 1985 13:27:05 GMT-0800 (PST)", + "shortText": "duis", + "mediumText": "Duis do ullamco mollit reprehenderit proident labore laborum sint ipsum reprehenderit occaecat anim. Qui nostrud nostrud cillum in cupidatat duis sunt mollit et proident irure aliquip amet. Eiusmod amet elit occaecat ullamco in cillum proident exercitation nulla quis nisi. Velit qui ex nisi officia. Ullamco adipisicing irure sint excepteur aliquip consequat do cillum enim.", + "longText": "Ullamco labore amet est ullamco dolore quis tempor fugiat nulla eu aute duis. Pariatur officia sit Lorem occaecat aliquip nulla dolore incididunt id voluptate consequat sint ad. Tempor ipsum pariatur nisi laboris laboris id reprehenderit mollit est Lorem tempor fugiat dolore.\r\nAliqua et laborum amet proident ullamco velit minim est commodo culpa do ea excepteur anim. Sit qui nulla dolore laborum exercitation id qui id mollit consequat laboris adipisicing veniam anim. Pariatur reprehenderit id aliqua et pariatur nulla officia ex nostrud. Dolore ea do dolor nulla. Reprehenderit velit id eu nulla sunt ullamco eiusmod nulla consequat incididunt anim mollit enim.\r\n", + "address": "2 Moore Street", + "city": "Reno", + "state": "Connecticut", + "zip": 76313, + "country": "Grenada", + "email": "ebonyriley@scentric.com", + "phone": "(930) 448-2157", + "color": "rgb(79,135,188)" + }, + { + "index": 292, + "name": "Lynn Joyner", + "first": "Willis", + "last": "Wall", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/low_res/73.jpg", + "boolean": true, + "guid": "0b8fad6f-6113-46f5-b586-19015be0120b", + "integer": 74, + "date": "Mon Oct 24 1988 13:00:24 GMT-0700 (PDT)", + "shortText": "excepteur exercitation", + "mediumText": "In occaecat voluptate officia in fugiat velit proident consectetur nulla tempor.", + "longText": "Amet veniam ex eiusmod ex nulla consequat nulla non duis officia. Reprehenderit esse laborum laboris velit fugiat sint incididunt consectetur nisi Lorem voluptate Lorem tempor quis. Voluptate veniam ea dolor laborum ea nostrud voluptate qui. Deserunt aliqua dolor culpa tempor ex consequat in. Esse est incididunt exercitation ad ex ad est. Aute culpa Lorem cillum est sunt adipisicing tempor eu cupidatat. Reprehenderit velit exercitation sunt adipisicing consequat velit eiusmod.\r\nDuis ex minim Lorem aute labore exercitation ipsum do magna minim. Lorem ipsum dolor laboris non minim. Ex laborum tempor commodo irure cillum dolore est ut sunt dolor excepteur officia pariatur. Labore commodo non anim et pariatur quis officia fugiat duis non id consequat.\r\nTempor ullamco cillum mollit aute id ipsum minim sunt anim aliqua fugiat. Ut incididunt dolore magna duis veniam et elit deserunt ad proident ea ea occaecat duis. Nulla proident consectetur sunt sint ex voluptate incididunt consequat laborum commodo enim do et culpa. Aute consequat minim elit Lorem adipisicing excepteur culpa.\r\n", + "address": "2 Lenox Road", + "city": "Otranto", + "state": "South Carolina", + "zip": 25833, + "country": "Cote D'Ivoire (Ivory Coast)", + "email": "williswall@scentric.com", + "phone": "(927) 481-2476", + "color": "rgb(59,194,92)" + }, + { + "index": 293, + "name": "Ursula Pearson", + "first": "Miriam", + "last": "Beck", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tomas_janousek/73.jpg", + "boolean": false, + "guid": "376bb50b-cbec-450c-a0c5-400189bf6ebd", + "integer": 27, + "date": "Sat Dec 27 1986 23:08:28 GMT-0800 (PST)", + "shortText": "tempor nostrud", + "mediumText": "Pariatur ex amet nulla ut nisi non sint sint. Labore minim aute id id ex. Consectetur eu aute ad aute irure proident. Tempor tempor velit labore nulla culpa sunt aliquip.", + "longText": "Exercitation culpa do nisi elit sit. Et fugiat mollit incididunt dolor esse consequat. Ut culpa duis sit laboris in enim fugiat exercitation. Nostrud ex qui laboris Lorem magna ea non nostrud ad esse. Et irure esse deserunt reprehenderit incididunt consectetur consequat do sint sunt. Nostrud cillum adipisicing quis duis.\r\nMollit eu officia velit velit ea consectetur fugiat amet nisi. Eiusmod sit culpa tempor fugiat reprehenderit irure proident. Labore laboris occaecat qui laboris ipsum irure sit consectetur consectetur laboris culpa. Minim ad aliquip enim Lorem qui culpa. Minim proident ipsum et ea sunt. Nulla et consectetur esse aute.\r\n", + "address": "2 Beayer Place", + "city": "Snelling", + "state": "Michigan", + "zip": 94691, + "country": "Philippines", + "email": "miriambeck@scentric.com", + "phone": "(829) 585-3891", + "color": "rgb(168,101,180)" + }, + { + "index": 294, + "name": "Hill Aguirre", + "first": "Kelley", + "last": "Myers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jghyllebert/73.jpg", + "boolean": true, + "guid": "34b624b3-92b6-4e5a-b477-c30521137ed1", + "integer": 85, + "date": "Tue Jun 01 2004 12:36:52 GMT-0700 (PDT)", + "shortText": "magna sit", + "mediumText": "Minim in cupidatat ullamco aliquip aliqua in nulla ullamco commodo esse quis sit. Ut aliquip elit cillum ad. Ex exercitation occaecat nulla nostrud elit aliquip nostrud commodo. Velit non cupidatat labore pariatur reprehenderit nulla anim deserunt mollit tempor ad nulla laboris qui. Exercitation aute fugiat quis anim aute.", + "longText": "Laboris id magna culpa aliquip anim nulla adipisicing mollit. Aute ad consequat ullamco in deserunt fugiat excepteur consectetur qui aliqua irure. Veniam ut in proident adipisicing dolore Lorem anim. Lorem veniam enim adipisicing nulla sint esse enim cupidatat. Sit ea ullamco laboris occaecat officia laborum ea do laboris duis velit minim.\r\nLaborum laborum sunt minim ex voluptate do elit ullamco reprehenderit mollit. Aliqua est esse magna aliqua laborum incididunt commodo aute velit esse sint irure tempor. Ut ut cupidatat quis exercitation exercitation. Proident aute id voluptate velit sint anim proident ea officia exercitation. Aliqua do labore veniam duis occaecat commodo. Anim duis elit esse non elit ut.\r\nVeniam minim excepteur consectetur enim ea enim ad nostrud exercitation enim deserunt. Fugiat cupidatat culpa dolore occaecat incididunt non aliquip sint ipsum. Duis velit ullamco consequat et nulla eu reprehenderit ut nostrud enim velit. Voluptate veniam et nulla incididunt aliqua nulla et consequat anim duis qui. Ullamco ipsum velit amet eu proident proident nisi qui aliquip sint. Minim do consectetur laborum laborum reprehenderit quis aliquip ut duis consectetur laboris reprehenderit mollit excepteur. Eiusmod aliquip deserunt aute ex.\r\n", + "address": "4 Garfield Place", + "city": "Enoree", + "state": "Maine", + "zip": 11286, + "country": "Bermuda", + "email": "kelleymyers@scentric.com", + "phone": "(843) 584-2383", + "color": "rgb(122,201,168)" + }, + { + "index": 295, + "name": "Roseann Bryant", + "first": "Jerry", + "last": "Hester", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gkaam/73.jpg", + "boolean": true, + "guid": "b860c080-a929-47e5-a0d0-71451a0c3af2", + "integer": 27, + "date": "Mon Feb 21 1977 02:23:49 GMT-0800 (PST)", + "shortText": "id commodo", + "mediumText": "Nulla reprehenderit laboris culpa aute laborum excepteur voluptate ullamco id. Consequat ut veniam occaecat officia dolore do. Laborum exercitation reprehenderit nostrud aute ut do. Esse laborum sit Lorem sint do mollit.", + "longText": "Dolore in cupidatat officia sunt. Sunt elit labore nisi est laboris dolore veniam. Esse pariatur in ex magna veniam aute.\r\nReprehenderit dolor nostrud amet reprehenderit sit nulla veniam ea id irure sit cupidatat laborum. Consectetur labore eiusmod magna ea esse ut exercitation voluptate eiusmod do. Ut cupidatat officia fugiat irure anim eu eu cillum minim ex ullamco.\r\nLabore reprehenderit culpa laboris irure cillum aliqua. Labore velit esse officia duis Lorem veniam fugiat laboris exercitation reprehenderit anim est incididunt qui. Cillum velit excepteur duis ullamco officia amet. Velit reprehenderit Lorem est pariatur culpa in amet quis nostrud nisi proident ex ex. Laboris aliquip nulla anim mollit mollit ea amet quis amet nisi et culpa nostrud. Magna esse in sit cillum eu sunt anim sit officia culpa ea aliqua ipsum. Excepteur ex ullamco quis in reprehenderit ex id sint commodo dolor tempor.\r\n", + "address": "2 Classon Avenue", + "city": "Harmon", + "state": "Kansas", + "zip": 61846, + "country": "Benin", + "email": "jerryhester@scentric.com", + "phone": "(890) 533-3064", + "color": "rgb(137,53,240)" + }, + { + "index": 296, + "name": "Darlene Brady", + "first": "Cindy", + "last": "Aguilar", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ahmetalpbalkan/73.jpg", + "boolean": false, + "guid": "1701f080-0b5d-4b9b-b030-9e4c5f307453", + "integer": 65, + "date": "Thu Aug 06 1981 04:50:44 GMT-0700 (PDT)", + "shortText": "minim", + "mediumText": "Reprehenderit aliquip consequat ut aliqua exercitation dolor ipsum cillum elit pariatur. Pariatur nisi laborum cupidatat eiusmod cillum exercitation pariatur magna eu sunt. Dolore culpa ut non occaecat.", + "longText": "Do occaecat do quis qui laboris veniam. Non minim eiusmod est do exercitation eu commodo irure sint deserunt nisi anim. Aute ex ea culpa fugiat sit labore ut incididunt tempor et aliqua culpa sint. Duis cillum laborum officia eiusmod qui veniam laborum incididunt. Cillum ullamco sint nostrud reprehenderit velit consectetur nostrud exercitation aute elit nisi velit occaecat ex.\r\n", + "address": "4 Fountain Avenue", + "city": "Bennett", + "state": "Iowa", + "zip": 74097, + "country": "Lithuania", + "email": "cindyaguilar@scentric.com", + "phone": "(812) 401-3316", + "color": "rgb(232,141,62)" + }, + { + "index": 297, + "name": "Patty Barr", + "first": "Ferguson", + "last": "Estrada", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/Silveredge9/73.jpg", + "boolean": false, + "guid": "fd87de9f-318b-4a1a-81e7-568f64e7c526", + "integer": 98, + "date": "Thu May 21 2009 02:11:35 GMT-0700 (PDT)", + "shortText": "excepteur excepteur esse culpa", + "mediumText": "Duis quis id elit culpa aute occaecat occaecat mollit culpa commodo ad labore laborum. Aliqua ea dolor Lorem ad laboris deserunt.", + "longText": "Ex in occaecat enim voluptate ex nisi officia. Id nostrud adipisicing sint commodo do proident minim sint tempor Lorem. Fugiat aliquip quis anim tempor laborum nisi voluptate minim non incididunt sint in. Aliqua dolore deserunt qui id eu cillum cillum ex nulla laboris nostrud eiusmod dolore. Qui dolor ullamco dolore proident aliqua.\r\nMagna consequat ex sunt occaecat enim deserunt dolor. Proident deserunt enim nulla eiusmod esse ea. Laborum aliquip nulla ipsum elit non pariatur nisi anim veniam amet aliqua. Ullamco cillum deserunt ex consectetur. Esse ex fugiat dolor ea ullamco dolor sit non. Esse eu occaecat dolore quis ipsum. Labore sint qui veniam fugiat est laboris sit.\r\nEst sint do veniam cillum occaecat aliqua ut sit Lorem consequat irure nostrud excepteur. Veniam dolore Lorem et nostrud quis esse est. Reprehenderit cillum laborum occaecat anim Lorem culpa sit aliquip consectetur ut enim eiusmod irure. Qui eu non eiusmod enim cillum sint in laborum sunt ipsum eiusmod enim est. Et labore occaecat dolor aliquip anim esse pariatur. Labore sit incididunt deserunt dolore ad deserunt. Lorem deserunt ex cillum qui amet adipisicing dolor eiusmod culpa id.\r\nEnim fugiat excepteur in ut ex pariatur pariatur sunt deserunt Lorem proident. Ipsum eu enim fugiat est ut ipsum do sint proident ipsum esse deserunt. Culpa minim duis ut aliquip sint sunt velit dolore amet. Consectetur enim enim velit velit non commodo velit nulla cupidatat laborum. Aliqua duis sint cupidatat excepteur adipisicing. Laboris proident irure aliqua esse irure aliqua ex consectetur.\r\n", + "address": "4 Monitor Street", + "city": "Clarksburg", + "state": "Vermont", + "zip": 44637, + "country": "Virgin Islands (British)", + "email": "fergusonestrada@scentric.com", + "phone": "(896) 548-2171", + "color": "rgb(100,112,105)" + }, + { + "index": 298, + "name": "Cunningham Flores", + "first": "Barbra", + "last": "Weiss", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_rennerlisa/73.jpg", + "boolean": false, + "guid": "c5081ce2-b967-4d87-9edd-e1b2d4d029cb", + "integer": 58, + "date": "Wed Nov 21 2001 11:50:05 GMT-0800 (PST)", + "shortText": "duis deserunt voluptate", + "mediumText": "Ea enim eu sit eu officia esse sunt. Consequat consequat exercitation officia incididunt consequat exercitation veniam do aute duis eiusmod irure velit. Anim labore ut exercitation excepteur irure incididunt laborum. Adipisicing et pariatur sit officia dolor laboris. Duis ipsum amet ipsum sit labore ipsum elit aliqua eiusmod.", + "longText": "Labore esse consectetur dolor veniam tempor incididunt ipsum aliqua velit laborum dolore Lorem in. Duis proident occaecat Lorem eu officia labore ullamco duis Lorem. Eu deserunt amet laboris aliqua anim sunt aliqua. Occaecat pariatur proident fugiat officia in dolore mollit consectetur dolore officia fugiat esse. Proident culpa veniam sit commodo. Quis sunt in velit id magna tempor est. Velit veniam aliquip cupidatat sunt quis veniam et minim.\r\nLorem ut fugiat in sit eiusmod officia in ad ad culpa culpa. Sit occaecat qui laboris labore amet magna irure ut ut anim esse incididunt ut velit. Dolor minim id reprehenderit reprehenderit labore. Dolore sint ipsum esse ut ex. Dolor esse est Lorem Lorem commodo veniam minim. Eu laborum amet labore nostrud cillum sint aliqua pariatur laborum ullamco consequat do. Quis proident in sunt laborum officia qui aliquip.\r\nIn cillum do cupidatat qui sint. Irure aliqua dolor proident esse tempor cupidatat laborum cillum. Culpa laboris nostrud esse eiusmod.\r\nReprehenderit non duis amet dolore excepteur ad et. Officia magna quis ipsum fugiat eu in nostrud labore culpa. Ullamco ullamco duis irure sit dolore amet aute non dolor adipisicing.\r\n", + "address": "2 River Street", + "city": "Wedgewood", + "state": "Nebraska", + "zip": 20486, + "country": "Jordan", + "email": "barbraweiss@scentric.com", + "phone": "(828) 488-2896", + "color": "rgb(86,115,171)" + }, + { + "index": 299, + "name": "Bobbi Salas", + "first": "Ines", + "last": "Howell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kulturpessimist/73.jpg", + "boolean": false, + "guid": "3bfa3d64-c2c0-4ea1-9111-2f9ca46c2a87", + "integer": 81, + "date": "Mon Jan 06 2014 11:35:59 GMT-0800 (PST)", + "shortText": "elit nostrud", + "mediumText": "In anim nulla tempor Lorem sunt in enim fugiat eiusmod occaecat aliquip eiusmod aute.", + "longText": "Consectetur excepteur pariatur officia esse cupidatat duis do excepteur nostrud id deserunt. Veniam ad consequat nostrud id fugiat cupidatat sint sunt cillum aute commodo dolore adipisicing. Eu dolor exercitation ullamco enim consequat ad pariatur incididunt. Nisi dolor eiusmod reprehenderit non. Culpa ex labore cupidatat mollit incididunt veniam qui ipsum commodo sunt. In qui aliqua tempor excepteur ut ea cillum.\r\n", + "address": "2 Cypress Court", + "city": "Kiskimere", + "state": "Florida", + "zip": 33788, + "country": "Nicaragua", + "email": "ineshowell@scentric.com", + "phone": "(959) 501-3404", + "color": "rgb(139,215,118)" + }, + { + "index": 300, + "name": "Alice Cooke", + "first": "Dillon", + "last": "Goodwin", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/picard102/73.jpg", + "boolean": true, + "guid": "b536f301-48d7-4e68-90a9-c9d3caf00547", + "integer": 95, + "date": "Mon Jan 13 1992 21:08:29 GMT-0800 (PST)", + "shortText": "amet dolor ut consequat", + "mediumText": "Laborum excepteur esse qui sint. Enim ullamco amet anim commodo sunt incididunt dolore. Pariatur mollit esse consectetur fugiat ex esse voluptate enim.", + "longText": "Occaecat duis sit labore magna. Aute veniam ex reprehenderit irure dolor. Aliquip dolor quis sint eu do sunt commodo nulla cillum. Non minim fugiat nulla amet ullamco ipsum ex. Nulla incididunt proident labore veniam aliquip duis fugiat fugiat laboris nisi anim. Aliqua aliqua aliqua elit excepteur magna esse non ipsum mollit qui sint irure magna labore.\r\nId commodo sunt officia sit aute dolor consectetur et eiusmod deserunt mollit est magna laboris. Est laborum nulla in ex adipisicing veniam. Nisi anim ut dolore cupidatat fugiat eu. Eiusmod et culpa ex quis fugiat nostrud culpa. Excepteur ipsum enim excepteur minim esse aliquip elit amet aliquip incididunt Lorem. Quis laboris officia pariatur nisi ad sunt pariatur mollit cillum eu nostrud nulla. Ad ea excepteur est sint aliqua minim sint voluptate magna tempor nostrud pariatur duis.\r\nEu laboris ea esse adipisicing est veniam sint elit eiusmod. Consectetur voluptate eiusmod do anim reprehenderit pariatur aliqua ullamco voluptate nulla commodo aliqua id. Voluptate deserunt irure Lorem velit amet consectetur amet deserunt. Excepteur id esse eiusmod cupidatat laborum fugiat. Ea labore et amet non.\r\nAmet ea aute magna tempor. Duis voluptate culpa voluptate culpa ut irure. Adipisicing laborum deserunt nulla amet magna velit est nisi do pariatur nulla culpa laboris. Amet proident voluptate cillum ullamco cupidatat. Elit est incididunt sint fugiat tempor.\r\nEiusmod exercitation voluptate laborum laboris laborum aliquip magna esse mollit cupidatat magna excepteur do. Magna tempor excepteur ex dolor. Pariatur sunt duis minim duis aute cupidatat qui in anim qui. Do nulla anim reprehenderit deserunt nostrud enim dolore ad eu eu eiusmod irure duis culpa.\r\n", + "address": "4 Vanderbilt Street", + "city": "Disautel", + "state": "New Jersey", + "zip": 93269, + "country": "South Africa", + "email": "dillongoodwin@scentric.com", + "phone": "(884) 433-3460", + "color": "rgb(218,70,51)" + }, + { + "index": 301, + "name": "Bianca Miles", + "first": "Eddie", + "last": "Lambert", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/e_zrra/73.jpg", + "boolean": false, + "guid": "d469f64f-4779-4372-ae48-a5c5546cc282", + "integer": 69, + "date": "Sat Feb 23 1974 14:20:00 GMT-0700 (PDT)", + "shortText": "proident mollit ad ipsum eu", + "mediumText": "Id sint adipisicing nostrud nulla velit amet ullamco Lorem adipisicing sit in ipsum. Ad ex ut nostrud exercitation pariatur proident ullamco esse ex quis id aliqua elit. Culpa et laborum enim laboris.", + "longText": "Consectetur reprehenderit qui velit proident ipsum voluptate Lorem. Nisi sit consectetur irure do occaecat tempor cupidatat dolor deserunt excepteur velit. Culpa incididunt veniam consequat veniam ex nisi nulla deserunt. Reprehenderit aliqua nisi enim in fugiat magna consectetur officia aute elit commodo mollit. Quis ipsum eiusmod fugiat ut consequat amet do eu.\r\nExcepteur magna deserunt qui ut esse duis commodo nostrud magna adipisicing culpa ullamco proident enim. Laboris aliquip non dolor in enim quis eu. Ex non cupidatat nostrud sit ut ea et ex irure tempor sint excepteur sit fugiat. Id cupidatat elit amet sit ullamco sint tempor sit tempor. Incididunt Lorem magna veniam occaecat duis aute minim duis sint.\r\nCillum pariatur non esse amet incididunt. Consectetur veniam aliquip consequat id consectetur enim excepteur dolore ullamco enim sunt elit ea eiusmod. Eiusmod aute veniam nostrud irure sunt pariatur irure magna exercitation irure adipisicing consequat enim. In et ex occaecat occaecat velit. In id qui aliquip nisi nostrud anim laborum nulla magna exercitation esse aliquip culpa amet. Exercitation tempor adipisicing culpa sit eu est fugiat consequat. Laboris minim nulla nisi labore enim sint consequat pariatur.\r\nPariatur occaecat culpa voluptate exercitation velit esse excepteur. Exercitation eiusmod et enim labore. Sunt sunt qui non ipsum nostrud nostrud veniam dolor velit velit qui. Anim qui reprehenderit ut quis mollit cillum. Eu dolor reprehenderit excepteur do ipsum eu. Proident veniam cillum qui in ex cupidatat duis anim deserunt consectetur Lorem eu. Incididunt consectetur eiusmod mollit dolor cupidatat adipisicing adipisicing est.\r\nVeniam ad ipsum fugiat occaecat laborum est culpa mollit ipsum Lorem. Ut ullamco quis amet adipisicing pariatur fugiat qui labore labore consectetur tempor adipisicing proident. Proident tempor reprehenderit ut ea dolor Lorem nisi. Labore adipisicing commodo ad eu sit nulla cillum. Adipisicing veniam Lorem ex nulla labore ad excepteur aliquip cillum Lorem. Ea incididunt proident ullamco incididunt tempor esse est. Incididunt quis nostrud deserunt irure sit do.\r\n", + "address": "2 Oriental Boulevard", + "city": "Cobbtown", + "state": "Wisconsin", + "zip": 11605, + "country": "Mexico", + "email": "eddielambert@scentric.com", + "phone": "(946) 553-2155", + "color": "rgb(90,142,67)" + }, + { + "index": 302, + "name": "Gracie Fuentes", + "first": "Cecilia", + "last": "Page", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/voldy333/73.jpg", + "boolean": false, + "guid": "55c8f54a-2927-4fc0-b0c6-4f8f5ef1107c", + "integer": 93, + "date": "Wed Aug 26 2009 01:27:46 GMT-0700 (PDT)", + "shortText": "culpa est", + "mediumText": "Aliquip consequat exercitation est sit magna sunt cillum occaecat. Nulla qui aute non eu exercitation.", + "longText": "Amet elit in ullamco aliqua proident dolore quis excepteur tempor ut. Lorem aliqua ipsum labore fugiat voluptate duis anim sunt dolor enim do proident non. Magna aliqua exercitation cupidatat fugiat non deserunt qui laborum cupidatat nisi.\r\nCommodo ullamco incididunt est dolore ad sint culpa sunt dolor enim. Esse consequat consectetur eiusmod dolore Lorem eu aliquip minim id exercitation incididunt. Fugiat aliquip non in commodo ex consectetur eiusmod reprehenderit exercitation aute. Aliqua ut occaecat adipisicing sint duis mollit cillum id sunt pariatur tempor proident aliqua. Culpa exercitation non dolor id laborum labore duis dolore ex duis mollit veniam sit. Ut id est ipsum anim labore do ex tempor anim laboris consequat eu commodo. Cillum do Lorem aliqua Lorem in sunt non ullamco velit aliquip.\r\nUllamco minim quis eu consequat. Et labore irure adipisicing cillum fugiat in in. Pariatur amet in dolore ipsum amet consectetur veniam commodo esse dolore. Nostrud sit aliquip ipsum incididunt enim commodo qui irure. Occaecat nostrud consequat aliquip ex labore excepteur nostrud velit labore et amet nulla dolor. Ea exercitation nulla sint magna aute aute enim labore enim exercitation. Est dolor ipsum mollit aliquip sunt voluptate amet veniam ullamco.\r\nEiusmod ea aute pariatur pariatur et tempor. Veniam eiusmod incididunt ullamco nulla. Esse excepteur culpa veniam sunt. Aliquip duis amet laboris qui est nostrud consequat. Fugiat incididunt laboris aute Lorem ea laboris consequat nostrud mollit duis. Reprehenderit consequat dolore labore nostrud non eiusmod tempor consequat nostrud ipsum adipisicing.\r\nTempor cillum reprehenderit consectetur elit incididunt exercitation. Sint anim eu enim ullamco adipisicing nostrud et sunt sit nulla quis et non quis. Ut eiusmod elit dolor ea commodo reprehenderit non. Sint duis commodo excepteur ad ad laboris exercitation dolore proident quis. Eu laborum exercitation consequat mollit esse. Aute tempor ipsum veniam exercitation labore culpa duis qui.\r\n", + "address": "2 Lloyd Court", + "city": "Roy", + "state": "Washington", + "zip": 84762, + "country": "Sudan", + "email": "ceciliapage@scentric.com", + "phone": "(834) 596-3524", + "color": "rgb(96,136,83)" + }, + { + "index": 303, + "name": "Marion Mcleod", + "first": "Valerie", + "last": "Snow", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jasonmarkjones/73.jpg", + "boolean": false, + "guid": "c9e129b1-7fdd-4a79-82ea-ec24bd138ccb", + "integer": 3, + "date": "Sun Dec 28 2008 07:30:23 GMT-0800 (PST)", + "shortText": "incididunt culpa anim officia", + "mediumText": "Eiusmod laborum aute culpa incididunt reprehenderit quis sunt minim culpa proident non proident ex. Ea mollit pariatur in voluptate Lorem ullamco ea fugiat deserunt laboris magna quis commodo Lorem. Irure sunt commodo proident id adipisicing irure deserunt ad ullamco eiusmod deserunt tempor sint labore. Eiusmod fugiat commodo aliquip excepteur nisi irure deserunt esse.", + "longText": "Est consectetur adipisicing est officia. Fugiat esse dolor qui aliquip aute est eu irure excepteur incididunt. Consectetur qui nulla culpa ea cupidatat labore adipisicing. Consectetur aliquip reprehenderit anim magna nulla Lorem proident consectetur mollit consectetur fugiat et deserunt magna. Incididunt culpa Lorem velit ut fugiat irure dolore enim nulla ut. Commodo elit enim incididunt deserunt incididunt officia.\r\nNostrud sit ipsum non elit proident fugiat aliqua culpa aute nostrud. Occaecat amet duis enim aliquip dolor aute anim nulla duis duis commodo sunt nisi. Amet ex eiusmod commodo veniam aliquip Lorem enim irure elit pariatur esse.\r\nEiusmod et ea aute elit ea ullamco consectetur adipisicing adipisicing sit anim. Cillum ipsum deserunt irure do incididunt tempor aliqua sit tempor sunt sit nisi officia est. Incididunt aliquip amet ex est ea ullamco consequat tempor voluptate ex anim quis officia. Pariatur commodo velit amet deserunt. Aliquip irure ullamco laboris laborum ea duis ea aute elit culpa sit deserunt ad.\r\nDolor veniam Lorem reprehenderit nostrud culpa excepteur pariatur eiusmod tempor. Amet nisi excepteur id laborum minim veniam. Nisi laborum aliqua pariatur laboris qui eiusmod nisi deserunt reprehenderit cillum nulla non reprehenderit.\r\n", + "address": "2 Wyckoff Street", + "city": "Brantleyville", + "state": "Oregon", + "zip": 70507, + "country": "Papua New Guinea", + "email": "valeriesnow@scentric.com", + "phone": "(998) 544-3267", + "color": "rgb(187,108,144)" + }, + { + "index": 304, + "name": "Jimmie Rutledge", + "first": "Robbie", + "last": "Morton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/r_oy/73.jpg", + "boolean": true, + "guid": "d8dded94-1c64-4d63-b175-e22679a649ea", + "integer": 98, + "date": "Wed Aug 22 1990 18:30:41 GMT-0700 (PDT)", + "shortText": "labore fugiat exercitation cupidatat ex", + "mediumText": "Cupidatat aliquip reprehenderit officia eu est fugiat deserunt. Fugiat labore do elit quis et nisi culpa. Exercitation labore laborum ad irure deserunt consequat. Commodo do dolor nulla anim aliqua consectetur cupidatat excepteur non minim commodo.", + "longText": "Qui incididunt reprehenderit veniam eu fugiat aute enim ipsum. Quis aliquip ea commodo proident exercitation tempor duis. Non commodo in duis id cillum excepteur eu elit. Deserunt Lorem proident in laboris quis ea et. Cupidatat irure veniam sit incididunt. Dolor ut dolor labore ullamco enim. Qui deserunt ullamco ex aute elit nulla officia sit exercitation.\r\nDo commodo officia esse sint. Aliqua est reprehenderit anim fugiat sunt esse tempor dolor officia dolore veniam ex mollit. Ad ea culpa laboris ea anim commodo. Incididunt sunt reprehenderit non laboris aute magna laborum aute labore aliqua. Esse nulla nostrud id occaecat pariatur laborum ut voluptate. Ex cillum officia cupidatat duis ex Lorem laboris fugiat aliquip in est et incididunt. Veniam laboris commodo nostrud consequat sunt dolore.\r\n", + "address": "3 Hornell Loop", + "city": "Aguila", + "state": "Illinois", + "zip": 50667, + "country": "Romania", + "email": "robbiemorton@scentric.com", + "phone": "(980) 409-3469", + "color": "rgb(235,114,85)" + }, + { + "index": 305, + "name": "Sweet Humphrey", + "first": "Duke", + "last": "Vargas", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/boericke/73.jpg", + "boolean": true, + "guid": "e9257b10-4071-40be-a831-77dc11b731e5", + "integer": 25, + "date": "Sun Oct 19 2008 14:12:07 GMT-0700 (PDT)", + "shortText": "duis deserunt ex ad", + "mediumText": "Anim duis quis amet laboris id adipisicing magna. Lorem ullamco magna consequat adipisicing dolor magna.", + "longText": "Velit mollit pariatur fugiat cupidatat veniam est. Laborum non reprehenderit qui in labore nisi. Reprehenderit officia est culpa fugiat dolore non sint consequat duis velit enim do laboris. Cillum reprehenderit consectetur minim nisi consectetur sint culpa pariatur reprehenderit incididunt.\r\nDolore cillum sit enim pariatur sunt duis deserunt nostrud occaecat sit. Aliqua do ut cillum aliquip adipisicing qui. Pariatur culpa velit dolor ut aliqua elit sunt non anim magna deserunt et anim. Irure non aute velit cupidatat labore esse non duis sit qui amet officia voluptate. Deserunt et proident amet anim duis consectetur commodo mollit. Commodo voluptate deserunt eiusmod sit.\r\n", + "address": "4 Carroll Street", + "city": "Sehili", + "state": "West Virginia", + "zip": 80913, + "country": "Bangladesh", + "email": "dukevargas@scentric.com", + "phone": "(978) 506-3898", + "color": "rgb(226,72,213)" + }, + { + "index": 306, + "name": "Rivas Mcmillan", + "first": "Kelley", + "last": "Gamble", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/phanalpha/73.jpg", + "boolean": false, + "guid": "bd339242-0db1-4838-9a8f-198fefcd1392", + "integer": 97, + "date": "Thu Mar 09 1972 11:02:38 GMT-0800 (PST)", + "shortText": "reprehenderit exercitation consectetur officia", + "mediumText": "Id culpa aliqua ullamco ad. Dolor eu cillum minim officia quis occaecat. Labore nulla ea dolore aliquip exercitation enim. Non ipsum dolore Lorem esse incididunt tempor culpa nulla.", + "longText": "Id do duis dolore cupidatat culpa aliquip Lorem cupidatat mollit proident minim sint duis. Reprehenderit dolor incididunt cillum elit esse irure aliquip fugiat ex officia ad cupidatat velit. Ex ea aliquip ea labore id non occaecat mollit nostrud consequat irure cillum minim. Officia quis nostrud dolore quis nostrud esse laborum id magna nulla qui id commodo. Nisi mollit elit elit velit minim cillum sit eiusmod fugiat eiusmod et cillum eiusmod pariatur.\r\nNulla pariatur enim mollit sunt ad excepteur exercitation minim culpa adipisicing. Anim qui adipisicing pariatur aliquip. Proident cupidatat veniam in et est magna labore reprehenderit in. Qui Lorem reprehenderit in in.\r\n", + "address": "4 Fleet Street", + "city": "Nile", + "state": "Mississippi", + "zip": 85536, + "country": "Monaco", + "email": "kelleygamble@scentric.com", + "phone": "(880) 406-2442", + "color": "rgb(60,94,167)" + }, + { + "index": 307, + "name": "Arline Cantrell", + "first": "Maldonado", + "last": "Kaufman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/miguellagran/73.jpg", + "boolean": false, + "guid": "8b28f57b-1d99-4094-a3a5-8ca8bdc0ebac", + "integer": 83, + "date": "Mon Jan 21 1974 10:44:50 GMT-0700 (PDT)", + "shortText": "cillum mollit irure id cillum", + "mediumText": "Duis aliqua fugiat deserunt ad veniam veniam esse fugiat commodo tempor. Non consectetur commodo eu dolore eu veniam. Mollit ullamco ut minim mollit. Qui enim aliqua nisi officia. Ipsum dolore ut adipisicing ea aliqua et ea incididunt consectetur laborum dolore qui fugiat ut.", + "longText": "Excepteur adipisicing cupidatat et aliquip commodo voluptate aute pariatur culpa occaecat reprehenderit nostrud. Reprehenderit occaecat eiusmod ut elit magna occaecat. Et aute duis consectetur dolor ut consequat ad.\r\nProident ad cillum sit ullamco. Labore eu laborum enim adipisicing nisi sunt ipsum in non excepteur quis officia in. Anim anim eu consectetur est sint et quis. Amet amet cupidatat reprehenderit aliquip. Elit voluptate ad anim dolore anim tempor nostrud tempor.\r\n", + "address": "4 Hinckley Place", + "city": "Swartzville", + "state": "Rhode Island", + "zip": 72582, + "country": "Martinique", + "email": "maldonadokaufman@scentric.com", + "phone": "(902) 553-3658", + "color": "rgb(87,176,75)" + }, + { + "index": 308, + "name": "Ortega Terry", + "first": "Muriel", + "last": "Pickett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dustinlamont/73.jpg", + "boolean": true, + "guid": "46a75489-56ac-4c3a-88c3-1bc1b2260321", + "integer": 79, + "date": "Thu Dec 20 2012 17:16:17 GMT-0800 (PST)", + "shortText": "quis laborum", + "mediumText": "Eu eu occaecat esse ad aliquip occaecat tempor dolor veniam sint ut mollit.", + "longText": "Elit labore ex culpa ad consectetur mollit. Dolore velit nostrud consectetur officia pariatur dolore do laboris deserunt cillum id consequat occaecat aliqua. Mollit est sit aute cillum tempor laborum officia. Eiusmod in aliquip est consequat excepteur sunt voluptate do deserunt ea. Tempor non laborum aliqua ad sit culpa consequat laborum.\r\nAmet tempor ipsum et laborum adipisicing non nulla ad. Nostrud in ex incididunt minim et ullamco velit. Voluptate aliquip est culpa exercitation fugiat proident ex elit enim aute excepteur in dolore duis. Cillum consectetur fugiat eiusmod consequat cupidatat commodo aliqua consectetur excepteur mollit voluptate sint. Deserunt ad dolor elit reprehenderit deserunt esse nisi in deserunt est eiusmod exercitation fugiat.\r\n", + "address": "4 Alice Court", + "city": "Whitewater", + "state": "Georgia", + "zip": 58312, + "country": "Kuwait", + "email": "murielpickett@scentric.com", + "phone": "(848) 468-2790", + "color": "rgb(99,60,211)" + }, + { + "index": 309, + "name": "Rosie Beasley", + "first": "Cora", + "last": "Vaughan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mrzero158/73.jpg", + "boolean": true, + "guid": "94799d19-471d-4d23-9c9f-44ee2cb25c6f", + "integer": 96, + "date": "Tue Nov 09 1982 16:08:56 GMT-0800 (PST)", + "shortText": "do ea aute", + "mediumText": "Ex aliquip duis quis dolore adipisicing mollit excepteur aliquip consectetur id. Adipisicing eu ipsum cupidatat ullamco voluptate. Duis occaecat occaecat mollit incididunt cillum ipsum id tempor. Officia ex eiusmod pariatur dolore fugiat aute ad. Sit ad non ipsum nulla.", + "longText": "Officia officia ad non commodo anim. Anim ad non ut excepteur voluptate amet consequat Lorem sunt ad. Deserunt enim ad nisi in amet anim anim culpa et officia aute reprehenderit sint eiusmod. Anim laborum occaecat culpa aute ipsum do. Officia irure sit nostrud nulla laborum reprehenderit laboris est ex culpa. Cillum exercitation aute Lorem enim amet commodo amet anim sunt mollit pariatur in consequat.\r\nCupidatat occaecat ex ex pariatur dolore fugiat incididunt velit qui reprehenderit. Ullamco enim nisi deserunt laborum aute. Aliquip duis do enim adipisicing cupidatat. Consequat aute sint non laborum quis laboris reprehenderit aliqua non culpa. Enim est amet nostrud ullamco minim duis eu labore ut magna excepteur.\r\nAmet sint pariatur ad nostrud irure qui do eiusmod irure id ea. Veniam cillum minim excepteur ut quis tempor et officia consequat ut in. Laboris exercitation ad proident esse in tempor exercitation aliqua veniam aute minim.\r\nConsectetur fugiat duis adipisicing dolore et exercitation reprehenderit. Eu nostrud qui veniam non. Voluptate quis nisi reprehenderit non adipisicing amet ipsum irure velit labore nostrud reprehenderit.\r\n", + "address": "3 Canton Court", + "city": "Glendale", + "state": "New Mexico", + "zip": 99043, + "country": "Ukraine", + "email": "coravaughan@scentric.com", + "phone": "(961) 557-2273", + "color": "rgb(111,160,125)" + }, + { + "index": 310, + "name": "Olivia Becker", + "first": "Wyatt", + "last": "Mcneil", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/donaldjohns/73.jpg", + "boolean": true, + "guid": "4c1be78a-e176-445f-93d3-f818ae0d96b0", + "integer": 31, + "date": "Thu Sep 18 1980 04:25:22 GMT-0700 (PDT)", + "shortText": "excepteur labore sint in", + "mediumText": "Sint consectetur anim tempor ea pariatur cillum sit do in exercitation. Aliqua nisi esse laborum voluptate consectetur et amet magna consequat irure anim. Adipisicing veniam veniam id veniam laboris Lorem cupidatat quis pariatur voluptate.", + "longText": "Non et officia eu do eu deserunt tempor dolore velit commodo cillum sint. Consectetur aliqua sunt pariatur sint. Quis esse aliqua elit labore sunt velit officia consequat anim consequat quis mollit id reprehenderit.\r\n", + "address": "2 Menahan Street", + "city": "Lorraine", + "state": "Arizona", + "zip": 11066, + "country": "Guatemala", + "email": "wyattmcneil@scentric.com", + "phone": "(888) 600-2767", + "color": "rgb(65,51,174)" + }, + { + "index": 311, + "name": "Aguirre Mendez", + "first": "Dona", + "last": "Kane", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ah_lice/73.jpg", + "boolean": true, + "guid": "5c63b545-e732-43bc-af3f-32e0c68ad484", + "integer": 76, + "date": "Wed Oct 10 2007 23:01:28 GMT-0700 (PDT)", + "shortText": "voluptate eu cillum anim", + "mediumText": "Culpa voluptate laborum pariatur consectetur sit esse ullamco cupidatat elit adipisicing qui culpa ex. Ut ad tempor ipsum ut quis ipsum. Non officia enim do tempor ad do excepteur velit sit duis mollit aliquip. Dolore aliqua eiusmod commodo nostrud amet cillum dolore.", + "longText": "Ullamco laborum esse mollit aliqua aute deserunt Lorem. Officia eiusmod fugiat exercitation esse consequat commodo veniam. Cupidatat amet non cillum mollit do ut excepteur reprehenderit consectetur eiusmod ut exercitation sit. Sint id irure ullamco quis anim labore. Culpa duis aliquip qui elit ex laborum.\r\nAdipisicing et est culpa deserunt irure. Ullamco ut sit do fugiat. Enim nulla laborum ea anim Lorem eiusmod incididunt eiusmod velit enim incididunt id sit. Consectetur magna ut minim ipsum est commodo cillum cupidatat excepteur. Nostrud minim veniam veniam laborum anim. Nulla consectetur ea nostrud et culpa dolor est.\r\n", + "address": "2 Losee Terrace", + "city": "Fedora", + "state": "Texas", + "zip": 18483, + "country": "Argentina", + "email": "donakane@scentric.com", + "phone": "(876) 594-2112", + "color": "rgb(134,128,159)" + }, + { + "index": 312, + "name": "Holden Shaffer", + "first": "Dana", + "last": "Raymond", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/enda/73.jpg", + "boolean": true, + "guid": "2f0136bc-47e0-4206-b4f4-d87b45b44a4a", + "integer": 94, + "date": "Thu Jul 04 2002 17:43:16 GMT-0700 (PDT)", + "shortText": "quis ex cillum enim", + "mediumText": "Sit incididunt reprehenderit velit elit laborum sint est nulla. Ipsum dolore sit laborum eu occaecat dolor reprehenderit adipisicing nisi. Et aliquip officia fugiat consequat aliquip exercitation.", + "longText": "Deserunt veniam veniam fugiat eu proident aute aute cupidatat pariatur qui non nostrud qui nulla. Consequat quis enim consequat ea minim ex est duis commodo qui exercitation. Ex et mollit ea adipisicing aliqua occaecat nostrud elit minim sint esse. Magna deserunt nulla voluptate aute. Duis ullamco tempor voluptate adipisicing eu veniam ad quis quis enim. Ea adipisicing veniam eu nostrud amet laborum.\r\n", + "address": "2 Lawton Street", + "city": "Durham", + "state": "District Of Columbia", + "zip": 20487, + "country": "Mauritius", + "email": "danaraymond@scentric.com", + "phone": "(836) 540-2790", + "color": "rgb(187,110,242)" + }, + { + "index": 313, + "name": "Cherie Lynn", + "first": "Johnston", + "last": "Head", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/guillogo/73.jpg", + "boolean": true, + "guid": "72ab6b5a-bd21-4563-b6b0-ab24cff5caed", + "integer": 80, + "date": "Fri May 10 1974 03:24:27 GMT-0700 (PDT)", + "shortText": "ad enim", + "mediumText": "Ut adipisicing excepteur ex Lorem cupidatat esse ipsum deserunt nisi irure in ut. Quis reprehenderit sunt non amet consectetur Lorem ut sit. Culpa ex laboris pariatur nisi quis qui. Amet in aliquip occaecat quis eiusmod nostrud occaecat consequat consequat.", + "longText": "Adipisicing esse occaecat sint quis nostrud. Sint incididunt elit mollit excepteur dolore. Lorem tempor excepteur occaecat cupidatat voluptate sit officia exercitation laborum. Cupidatat id reprehenderit deserunt minim.\r\n", + "address": "4 Surf Avenue", + "city": "Cleary", + "state": "Virgin Islands", + "zip": 76947, + "country": "St. Helena", + "email": "johnstonhead@scentric.com", + "phone": "(925) 538-2973", + "color": "rgb(59,239,155)" + }, + { + "index": 314, + "name": "Alvarez Byrd", + "first": "Cristina", + "last": "Bullock", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iboldurev/73.jpg", + "boolean": true, + "guid": "11934487-0dbb-4d2a-bf49-4f9e5938f248", + "integer": 88, + "date": "Fri Mar 12 1993 09:02:34 GMT-0800 (PST)", + "shortText": "veniam ad ullamco", + "mediumText": "Quis labore cillum magna incididunt. Nisi enim magna et tempor voluptate amet aute proident.", + "longText": "Laborum proident non sint cupidatat pariatur occaecat adipisicing voluptate aliquip. Mollit elit ut voluptate eu labore Lorem. Ullamco aliquip commodo do duis labore do aliquip in aliquip reprehenderit occaecat exercitation. Duis cillum voluptate ipsum minim sit commodo occaecat ex ipsum ex. Anim et Lorem ex elit fugiat.\r\n", + "address": "3 Ross Street", + "city": "Dola", + "state": "Puerto Rico", + "zip": 69951, + "country": "Suriname", + "email": "cristinabullock@scentric.com", + "phone": "(847) 528-3630", + "color": "rgb(146,84,109)" + }, + { + "index": 315, + "name": "Gonzalez Freeman", + "first": "Sampson", + "last": "Smith", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/smalonso/73.jpg", + "boolean": true, + "guid": "62c47315-656a-41e7-b9b4-7ee380ad77e8", + "integer": 58, + "date": "Sat Feb 15 2003 14:30:07 GMT-0800 (PST)", + "shortText": "sint", + "mediumText": "Excepteur tempor magna eiusmod pariatur anim consequat mollit excepteur nulla duis ut eu esse pariatur. Deserunt cillum amet incididunt nisi ut laboris quis enim labore. Eiusmod cupidatat qui officia ex dolor sint occaecat elit fugiat ex.", + "longText": "Do consequat voluptate duis aliqua Lorem cillum labore. Reprehenderit commodo esse anim aliqua exercitation qui. Elit nostrud officia esse aliquip in eiusmod ipsum duis ullamco. Elit deserunt magna voluptate mollit. Quis dolore esse reprehenderit sunt dolore nulla sunt duis fugiat.\r\n", + "address": "4 Hutchinson Court", + "city": "Utting", + "state": "Maryland", + "zip": 69064, + "country": "Greece", + "email": "sampsonsmith@scentric.com", + "phone": "(829) 445-2244", + "color": "rgb(246,63,201)" + }, + { + "index": 316, + "name": "Wheeler Zamora", + "first": "Bush", + "last": "Dickerson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/taherrapee/73.jpg", + "boolean": true, + "guid": "a91485a2-e0b1-4e16-afa8-afb990283828", + "integer": 25, + "date": "Mon Jun 05 2006 06:35:22 GMT-0700 (PDT)", + "shortText": "sit pariatur", + "mediumText": "Officia minim occaecat nostrud dolor eiusmod. Reprehenderit aliquip esse sint qui deserunt do nostrud proident id est quis minim. Consectetur ad ut tempor anim elit dolore reprehenderit consectetur do culpa minim.", + "longText": "Exercitation officia est aute sunt nisi. Et officia irure eu deserunt enim est nulla. Commodo commodo consequat dolor eiusmod dolor. Aliqua qui consequat cillum velit et minim consectetur duis et culpa velit nostrud laborum. Labore id cillum nulla excepteur voluptate eu velit pariatur anim nulla. Ut qui tempor officia dolore anim enim veniam tempor ex exercitation eiusmod commodo ex ut. Non aute veniam sunt esse culpa non aliqua quis elit culpa elit.\r\nCommodo ut cillum quis laboris aliquip in. Mollit nisi amet cillum nisi laboris est officia. Non laborum fugiat ea non nisi. Et velit incididunt enim magna. Aute anim aute occaecat consequat ipsum Lorem et laboris esse aliquip proident pariatur. Consectetur non consectetur labore laboris ea est.\r\nAdipisicing laborum officia esse reprehenderit nostrud Lorem cillum magna. Labore ad ullamco pariatur irure. Sit ea aliquip ad Lorem ut consequat quis. Eiusmod consequat anim dolor in aliquip est laborum adipisicing incididunt excepteur excepteur laborum duis qui. Sunt consequat voluptate sunt cupidatat nostrud nisi. Ullamco reprehenderit anim est laboris et nulla.\r\nAmet ut dolor nostrud voluptate laboris nisi reprehenderit culpa ea velit mollit nulla. Esse qui sint anim ut incididunt. Nisi mollit ut nisi laborum ut deserunt magna dolor eiusmod. Elit enim sit reprehenderit cupidatat et. Aliqua dolore id fugiat occaecat occaecat ipsum.\r\nEsse fugiat amet quis adipisicing tempor deserunt tempor exercitation excepteur dolore incididunt ex. Laborum adipisicing dolore enim veniam non ut consectetur Lorem ut cupidatat duis id. Incididunt laboris cupidatat adipisicing deserunt fugiat veniam tempor. Fugiat officia eu ullamco magna sunt fugiat consectetur. Occaecat irure proident do officia. Laborum nulla quis non incididunt velit.\r\n", + "address": "4 Campus Road", + "city": "Bethpage", + "state": "Massachusetts", + "zip": 23000, + "country": "New Caledonia", + "email": "bushdickerson@scentric.com", + "phone": "(914) 557-2160", + "color": "rgb(106,245,89)" + }, + { + "index": 317, + "name": "Nadine Heath", + "first": "Dee", + "last": "Burnett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ismailmayat/73.jpg", + "boolean": false, + "guid": "315f838f-f59d-4c6c-bae4-f431576cf508", + "integer": 59, + "date": "Wed Aug 06 1980 08:47:43 GMT-0700 (PDT)", + "shortText": "nostrud labore culpa sint occaecat", + "mediumText": "Dolore irure officia consequat commodo exercitation non et consectetur minim fugiat.", + "longText": "Velit ipsum enim laboris cillum qui quis deserunt laborum. Nostrud voluptate commodo nisi ipsum adipisicing aliqua laborum culpa excepteur minim ex sint. Non minim voluptate pariatur consectetur. Dolor minim aute sint anim exercitation id laborum laborum.\r\nExercitation est ullamco culpa ut cillum commodo minim ipsum qui cupidatat et cillum mollit. Incididunt anim esse veniam veniam. Nulla ullamco ea eu proident laboris voluptate laboris ad in excepteur excepteur qui. Incididunt aute nisi irure quis commodo aute. Elit nisi labore qui sunt est velit anim cupidatat nostrud.\r\nCulpa anim consequat occaecat sunt. Velit commodo deserunt duis proident exercitation ullamco esse fugiat. Ullamco velit elit pariatur ut qui ex. Tempor voluptate labore consectetur id elit. Deserunt occaecat occaecat aliqua ad laborum irure mollit officia fugiat aliqua aliqua irure do. Sit id duis occaecat cupidatat ullamco nulla. Sit laborum eu tempor magna laborum mollit aliquip proident aute anim magna.\r\n", + "address": "4 Bay Parkway", + "city": "Gila", + "state": "Oklahoma", + "zip": 89518, + "country": "Syria", + "email": "deeburnett@scentric.com", + "phone": "(995) 481-3920", + "color": "rgb(158,55,147)" + }, + { + "index": 318, + "name": "Cash Baker", + "first": "Tanya", + "last": "Patton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/carlyson/73.jpg", + "boolean": true, + "guid": "4f3b7c6f-78ec-4074-b24d-b1e0788829a9", + "integer": 17, + "date": "Mon Jun 19 1972 16:40:48 GMT-0700 (PDT)", + "shortText": "proident duis eiusmod pariatur", + "mediumText": "Ullamco qui dolore fugiat id ad non.", + "longText": "Sint irure officia do magna eu deserunt non laborum ut qui incididunt est irure voluptate. Amet eiusmod eiusmod ut occaecat reprehenderit sunt irure do aute reprehenderit pariatur laborum consectetur. Proident quis ex reprehenderit aliquip non ullamco ullamco sunt commodo. Nostrud proident adipisicing laborum voluptate sit cillum ad magna id adipisicing cillum fugiat. Anim sit do quis cupidatat reprehenderit tempor pariatur deserunt. Tempor culpa reprehenderit adipisicing ea.\r\n", + "address": "2 Garnet Street", + "city": "Crawfordsville", + "state": "Ohio", + "zip": 65388, + "country": "Rwanda", + "email": "tanyapatton@scentric.com", + "phone": "(912) 427-3358", + "color": "rgb(122,127,173)" + }, + { + "index": 319, + "name": "Sears Conley", + "first": "Boyle", + "last": "Schmidt", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thewillbeard/73.jpg", + "boolean": true, + "guid": "17ce3452-2b9d-4fe3-b1db-7009a74b7e32", + "integer": 69, + "date": "Sat May 18 1996 00:26:16 GMT-0700 (PDT)", + "shortText": "amet consequat", + "mediumText": "Nulla non deserunt elit nostrud dolore elit Lorem sit qui aliqua aute aliquip elit. Mollit aliqua enim velit ea consectetur dolor duis minim ea. Ipsum aute ut labore duis labore nostrud labore. Aliqua proident cillum id cupidatat elit anim nostrud culpa aliquip enim irure nisi qui. Magna sint exercitation ullamco commodo labore sunt ipsum anim nostrud voluptate non et reprehenderit.", + "longText": "Labore irure est cillum sit exercitation nisi ex exercitation ea pariatur ipsum consectetur. Nisi ad qui eiusmod nulla deserunt eiusmod dolor officia magna labore deserunt aliqua. Consequat labore proident cupidatat qui fugiat magna voluptate esse ex nisi officia enim. Ipsum nisi fugiat in proident magna deserunt magna incididunt sint cupidatat Lorem. Sunt veniam consectetur ut ea. Nulla exercitation do deserunt consequat elit aliqua excepteur aliquip laborum mollit ex non. Commodo fugiat occaecat sint tempor dolore ut ex proident amet mollit fugiat.\r\nVeniam ex consequat consectetur incididunt. Qui enim eu incididunt anim. Reprehenderit eiusmod labore consequat pariatur adipisicing esse incididunt quis velit. Pariatur elit amet deserunt eu exercitation cupidatat aute eiusmod anim sit anim est. Adipisicing ea cupidatat sunt labore id amet magna anim pariatur cupidatat. Sint ex sunt nulla elit ut aute laboris deserunt cillum. Consectetur sunt aliqua minim eu commodo nulla tempor anim non cillum quis culpa occaecat.\r\nFugiat veniam qui ut sunt Lorem. Sint elit do deserunt laborum. Voluptate pariatur sit eiusmod labore elit aliqua sunt eu labore id sunt. Officia id non minim cillum. Laboris reprehenderit elit commodo esse exercitation minim aute aliqua esse. Dolor Lorem fugiat non reprehenderit occaecat dolore magna.\r\nMollit velit dolore mollit non consequat ullamco do incididunt nisi. Dolore ex eiusmod ex anim consequat deserunt qui. Culpa laborum laboris adipisicing pariatur duis elit sint consectetur duis. Ut ea consectetur dolore ullamco amet est irure Lorem. Aliqua do reprehenderit id incididunt amet fugiat id amet. Exercitation duis sit pariatur fugiat elit dolore do aliqua culpa anim adipisicing velit aliquip consectetur.\r\nElit ex excepteur do aute enim incididunt. Est eu aute occaecat quis dolor eiusmod quis ut quis fugiat enim id. Duis incididunt esse pariatur voluptate. Velit dolore ut aliqua culpa officia quis esse.\r\n", + "address": "3 Llama Court", + "city": "Murillo", + "state": "Nevada", + "zip": 82006, + "country": "Puerto Rico", + "email": "boyleschmidt@scentric.com", + "phone": "(938) 529-3967", + "color": "rgb(238,104,187)" + }, + { + "index": 320, + "name": "Regina Duke", + "first": "Pacheco", + "last": "Finch", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tgormtx/73.jpg", + "boolean": true, + "guid": "1cd2ce04-b8d2-4d31-8130-6c88fda8666e", + "integer": 28, + "date": "Sun Sep 22 1974 11:52:41 GMT-0700 (PDT)", + "shortText": "deserunt proident voluptate anim", + "mediumText": "Tempor eiusmod culpa incididunt esse mollit elit anim Lorem magna et occaecat. Quis exercitation aute laboris adipisicing excepteur non consectetur. Eu sunt esse velit sint ad voluptate cillum est. Et adipisicing sunt incididunt incididunt tempor nostrud aute eu occaecat ea.", + "longText": "Qui exercitation commodo sunt nostrud dolor elit labore in laboris. Minim cillum Lorem enim sunt nostrud culpa sint reprehenderit. Cillum reprehenderit occaecat non eu ea veniam aliquip occaecat quis et in eiusmod enim Lorem. Aliquip duis cupidatat aliqua aliquip commodo qui aliqua excepteur ipsum. Lorem labore tempor nisi ut deserunt. Excepteur est sint nulla dolor officia ex ex est in duis magna consectetur. Occaecat anim irure pariatur sit fugiat.\r\nFugiat nulla mollit quis ex deserunt non id anim proident. Officia sint fugiat eiusmod qui fugiat consequat ut magna Lorem. Officia cillum ipsum reprehenderit laboris proident et minim consectetur laboris cupidatat do ea aliqua deserunt. Ullamco tempor elit velit sunt qui in et amet irure aliqua eiusmod reprehenderit. Quis mollit consectetur veniam est ad esse quis nostrud esse magna id minim qui eu. Occaecat elit ullamco in aliqua aute sint. Incididunt qui esse ad voluptate nisi.\r\n", + "address": "2 Fillmore Avenue", + "city": "Riverton", + "state": "Montana", + "zip": 10495, + "country": "Korea (North)", + "email": "pachecofinch@scentric.com", + "phone": "(935) 574-3165", + "color": "rgb(231,59,64)" + }, + { + "index": 321, + "name": "Watts Forbes", + "first": "Crystal", + "last": "Holman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/andresenfredrik/73.jpg", + "boolean": true, + "guid": "78f69b15-a996-41aa-be22-2350d747a215", + "integer": 37, + "date": "Sat Oct 27 2001 01:47:57 GMT-0700 (PDT)", + "shortText": "duis", + "mediumText": "Sit sint ut incididunt esse irure do tempor esse est velit aliqua consectetur consectetur fugiat.", + "longText": "Dolore sunt mollit nisi adipisicing esse laboris. Cillum quis mollit voluptate consequat qui cillum sunt incididunt voluptate velit ea. Enim id ut duis minim pariatur. Nulla esse aliqua exercitation aute enim elit proident et ipsum et tempor eiusmod do esse.\r\nAnim id nisi ex occaecat eu ipsum nulla non pariatur sunt ut esse duis do. Exercitation est anim sit eiusmod qui pariatur dolore. Fugiat eu mollit consectetur occaecat duis exercitation deserunt aliqua cupidatat nostrud. Deserunt cillum duis officia nostrud non tempor cillum mollit enim sit. Ad commodo nostrud adipisicing mollit culpa non dolore. Amet pariatur sunt officia irure enim minim ea. Nulla qui id laborum velit cillum incididunt cupidatat duis exercitation tempor tempor sit.\r\n", + "address": "2 Beekman Place", + "city": "Advance", + "state": "California", + "zip": 50813, + "country": "Bosnia and Herzegovina", + "email": "crystalholman@scentric.com", + "phone": "(886) 454-2038", + "color": "rgb(212,198,57)" + }, + { + "index": 322, + "name": "Janelle Leblanc", + "first": "Velma", + "last": "Stone", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mwarkentin/73.jpg", + "boolean": true, + "guid": "84151da3-43cb-4cb5-ac3f-dce5eac66594", + "integer": 10, + "date": "Wed Mar 15 1995 04:06:56 GMT-0800 (PST)", + "shortText": "sit duis", + "mediumText": "Sint incididunt in ex officia cupidatat consectetur fugiat eiusmod labore.", + "longText": "Ullamco non sunt duis duis commodo ipsum ipsum nulla eiusmod irure adipisicing eu tempor. Elit labore magna incididunt est. Officia id incididunt minim pariatur officia consequat sunt. Non ut voluptate proident ipsum. Irure nulla cillum aute exercitation. Aliqua sit eu occaecat minim.\r\nAd excepteur qui est culpa. Mollit in adipisicing duis deserunt minim Lorem tempor nisi tempor enim. Nulla ex aliqua nostrud id. Adipisicing officia nulla amet aliqua non ipsum eiusmod elit ad pariatur labore eiusmod consectetur. Duis sint et aliqua commodo dolor veniam in eiusmod occaecat consectetur.\r\nConsectetur ea voluptate ullamco tempor nisi in. Lorem anim mollit fugiat tempor. Consectetur adipisicing deserunt consequat exercitation reprehenderit exercitation cillum ad anim do. Commodo occaecat ad do et laborum veniam aliqua cupidatat. Et velit ullamco cupidatat nostrud exercitation aute sint ea adipisicing culpa aliquip. Aliquip consectetur dolor ut adipisicing laborum id est magna pariatur amet.\r\n", + "address": "2 Albemarle Terrace", + "city": "Knowlton", + "state": "Marshall Islands", + "zip": 80538, + "country": "France", + "email": "velmastone@scentric.com", + "phone": "(910) 600-2666", + "color": "rgb(84,227,83)" + }, + { + "index": 323, + "name": "Holman Atkinson", + "first": "Myra", + "last": "Ellison", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/herkulano/73.jpg", + "boolean": false, + "guid": "51f45fc6-fc94-4be1-8769-ac78341d3d69", + "integer": 13, + "date": "Mon Jan 24 2011 03:20:14 GMT-0800 (PST)", + "shortText": "labore sit eiusmod sit", + "mediumText": "Qui ipsum tempor occaecat ullamco Lorem officia voluptate. Consequat cillum ea sunt cupidatat est quis quis pariatur.", + "longText": "Eiusmod fugiat ullamco sunt ea sint eiusmod aute excepteur eiusmod ullamco non nostrud aliqua. Pariatur pariatur aute aliqua nisi nisi amet. Non officia ipsum eu do veniam excepteur ea sit sint consequat. Do sint minim culpa enim ullamco excepteur officia mollit Lorem id commodo culpa est. Laborum ex anim Lorem et. Cupidatat mollit esse do adipisicing.\r\nEu velit ipsum officia ex. Deserunt esse et tempor magna duis ex ut sunt dolore do. Elit labore excepteur aliqua culpa cillum deserunt nulla veniam veniam commodo do mollit.\r\n", + "address": "3 Nova Court", + "city": "Hoehne", + "state": "Indiana", + "zip": 44523, + "country": "Guinea", + "email": "myraellison@scentric.com", + "phone": "(892) 546-2971", + "color": "rgb(252,153,180)" + }, + { + "index": 324, + "name": "Carson Glover", + "first": "Annabelle", + "last": "Reid", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jonny_moon/73.jpg", + "boolean": false, + "guid": "560ce64c-d4a7-43a1-a119-c815a7d0eddc", + "integer": 43, + "date": "Sun Oct 21 1979 10:07:45 GMT-0700 (PDT)", + "shortText": "qui reprehenderit", + "mediumText": "Ullamco incididunt minim ullamco id exercitation.", + "longText": "In veniam fugiat laboris incididunt excepteur ad proident. Consequat nisi mollit nostrud excepteur sunt laboris mollit voluptate exercitation exercitation tempor velit dolore. Sunt amet aute pariatur tempor adipisicing Lorem consequat pariatur exercitation sit cupidatat Lorem duis culpa. Aute velit exercitation occaecat cillum incididunt fugiat ipsum ut labore tempor mollit velit ad adipisicing. Tempor nisi elit est culpa tempor eiusmod velit enim occaecat tempor excepteur ut veniam. Culpa eiusmod nisi officia quis nulla ipsum laboris magna elit esse exercitation nostrud occaecat amet. Esse anim culpa est esse elit ad velit ad eu do exercitation occaecat adipisicing.\r\nIn duis enim Lorem id ullamco cillum veniam. Nulla sint laboris sint non ad mollit incididunt tempor ea voluptate sint eiusmod. Mollit nisi labore est labore anim laboris irure qui Lorem nulla veniam velit et non. Do occaecat excepteur aliqua in ea pariatur elit incididunt.\r\nDolore eiusmod commodo do commodo sit incididunt deserunt ullamco fugiat eiusmod consectetur ipsum. Fugiat eiusmod consectetur elit aliquip tempor labore cillum. Duis ullamco qui sit consectetur nulla qui amet Lorem occaecat esse tempor eiusmod aute.\r\n", + "address": "4 Lexington Avenue", + "city": "Canoochee", + "state": "Tennessee", + "zip": 16359, + "country": "Senegal", + "email": "annabellereid@scentric.com", + "phone": "(833) 494-3476", + "color": "rgb(56,217,233)" + }, + { + "index": 325, + "name": "Gibbs Good", + "first": "Hendrix", + "last": "Lyons", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/alyssalowww/73.jpg", + "boolean": false, + "guid": "2a5302bc-b0dd-4ccc-8688-7df77439ace5", + "integer": 21, + "date": "Thu Jan 01 1976 12:47:48 GMT-0800 (PST)", + "shortText": "aliqua tempor", + "mediumText": "Commodo pariatur enim velit ut reprehenderit in culpa. Culpa nulla ipsum velit est occaecat elit et laborum reprehenderit eu minim do.", + "longText": "Qui quis do nulla sit velit non elit duis exercitation do laboris cillum sit. Eiusmod reprehenderit sit aliqua qui dolor sunt qui commodo. Tempor aute Lorem labore aliqua ea minim duis irure sint non veniam. Ad ex aute reprehenderit nulla aliqua nostrud ullamco Lorem esse aliquip do qui velit. Nostrud elit esse ad duis occaecat culpa. Aliqua officia quis mollit ipsum velit cupidatat sit quis quis ea veniam sit aute ullamco. Laboris et ad cillum veniam nulla fugiat.\r\nFugiat in incididunt minim consequat sit pariatur occaecat reprehenderit aliquip incididunt ullamco eu. Nostrud qui nostrud laboris magna. Aute ullamco veniam consequat nulla aute nulla culpa. Fugiat id mollit ullamco eu enim velit reprehenderit sunt ut est elit fugiat sint veniam. Reprehenderit amet ea anim veniam consectetur proident commodo. Aliquip Lorem amet occaecat cupidatat dolor officia quis pariatur. Sit ea exercitation minim deserunt elit sit excepteur id reprehenderit.\r\nIpsum in tempor culpa esse fugiat mollit esse. Incididunt consequat dolor duis aute cillum ut veniam commodo do fugiat eu culpa fugiat. Enim pariatur reprehenderit elit ex proident aute aliqua. Elit do veniam fugiat in qui quis ullamco esse exercitation tempor non commodo nulla anim. Non Lorem sunt cupidatat aliquip dolor labore laboris Lorem fugiat. Do velit et ipsum pariatur duis sit id consectetur officia occaecat culpa reprehenderit. Nulla est in commodo nostrud ea deserunt duis culpa.\r\n", + "address": "4 Cranberry Street", + "city": "Belgreen", + "state": "Palau", + "zip": 13045, + "country": "Yugoslavia", + "email": "hendrixlyons@scentric.com", + "phone": "(884) 521-3084", + "color": "rgb(234,55,208)" + }, + { + "index": 326, + "name": "Reba Horton", + "first": "Ochoa", + "last": "Reed", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rafelorden/73.jpg", + "boolean": false, + "guid": "b51d4b79-1289-46e1-9874-cac40d2a3f4c", + "integer": 89, + "date": "Mon Sep 06 2010 03:05:58 GMT-0700 (PDT)", + "shortText": "sint reprehenderit", + "mediumText": "Consectetur velit id fugiat amet aliquip laboris deserunt. Pariatur officia non Lorem consectetur officia ipsum occaecat sint commodo laboris amet minim ullamco officia.", + "longText": "Deserunt consequat eiusmod commodo qui adipisicing et. Occaecat elit occaecat ullamco eu ea minim cupidatat veniam veniam aliquip tempor laboris. Exercitation duis cupidatat ullamco magna incididunt cupidatat reprehenderit consequat laborum.\r\nOfficia occaecat quis quis fugiat aliquip et. In laborum et pariatur qui consectetur ullamco cillum excepteur voluptate fugiat. Eiusmod nulla elit qui in irure. Nulla enim consectetur proident nostrud.\r\nVeniam sit tempor laboris aute dolor officia laborum. Deserunt ad consequat non nulla dolor eiusmod elit veniam tempor. Esse sint amet nisi et ea labore amet. Officia aliquip pariatur dolore anim dolore culpa esse elit amet aliqua voluptate. Esse elit ex ipsum proident occaecat deserunt non amet reprehenderit. Voluptate anim sunt fugiat consectetur ut quis esse sit.\r\nCillum incididunt sint sit nostrud magna minim anim labore elit adipisicing est ipsum. Laborum ut officia ullamco labore non dolore veniam labore dolor et sint ex duis. Excepteur irure exercitation Lorem occaecat exercitation in consequat. Nulla est excepteur elit qui magna quis nulla laboris amet. Laborum nisi ex enim consequat mollit ullamco magna aliquip occaecat occaecat et elit sunt. Consectetur reprehenderit magna officia do aliquip proident minim. Aute qui officia deserunt labore id in esse aliqua do anim pariatur dolore consequat.\r\nAmet pariatur veniam cupidatat deserunt voluptate aliquip fugiat occaecat eu sit pariatur. Consectetur eu quis proident reprehenderit nisi. Voluptate aliquip quis culpa proident anim culpa esse. Mollit eiusmod magna cupidatat nostrud non ad duis. Laboris reprehenderit amet cupidatat duis sint qui deserunt excepteur amet. Consectetur reprehenderit Lorem esse nisi aliquip incididunt ipsum aute occaecat esse occaecat. Laboris sit Lorem incididunt laborum in.\r\n", + "address": "2 Montauk Avenue", + "city": "Wildwood", + "state": "Virginia", + "zip": 44321, + "country": "Uzbekistan", + "email": "ochoareed@scentric.com", + "phone": "(873) 450-2072", + "color": "rgb(87,106,105)" + }, + { + "index": 327, + "name": "Newton Townsend", + "first": "Cara", + "last": "Armstrong", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/wim1k/73.jpg", + "boolean": false, + "guid": "396fee22-8931-4acb-9aa0-ef4e3d463f65", + "integer": 32, + "date": "Sun Feb 20 2011 09:27:11 GMT-0800 (PST)", + "shortText": "magna", + "mediumText": "Magna aute elit cupidatat ipsum velit reprehenderit. Occaecat qui fugiat nostrud quis excepteur commodo. Voluptate id consequat laborum mollit exercitation proident voluptate cillum voluptate in. Amet culpa consequat ullamco dolore incididunt consequat aliqua est nulla quis proident culpa.", + "longText": "Enim esse anim veniam est sunt labore ut qui magna cillum fugiat. Labore cupidatat ullamco deserunt veniam elit irure elit quis qui tempor anim et magna. Ex commodo ex adipisicing non laborum. Aliquip ex consequat dolor ut non consequat excepteur. Laboris laborum adipisicing cupidatat est. Id est aliqua laborum mollit incididunt excepteur. Enim commodo in culpa Lorem.\r\nLaborum sunt et exercitation mollit ut nulla aliqua nulla fugiat dolor. Deserunt commodo Lorem eu id adipisicing amet qui reprehenderit eu consectetur aliquip mollit eiusmod. Ad sit anim qui irure et ipsum laboris qui consectetur.\r\n", + "address": "4 School Lane", + "city": "Garfield", + "state": "Wyoming", + "zip": 38497, + "country": "Estonia", + "email": "caraarmstrong@scentric.com", + "phone": "(824) 554-2497", + "color": "rgb(82,224,190)" + }, + { + "index": 328, + "name": "Jenkins Short", + "first": "Castaneda", + "last": "Padilla", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rpeezy/73.jpg", + "boolean": true, + "guid": "bf4be80d-f135-468d-adab-23bf03ffb166", + "integer": 12, + "date": "Thu Sep 22 1994 12:13:32 GMT-0700 (PDT)", + "shortText": "et duis Lorem occaecat deserunt", + "mediumText": "Voluptate sint non minim elit. Est tempor tempor tempor nisi id cupidatat sunt.", + "longText": "In esse voluptate velit dolore ullamco in. Deserunt anim fugiat laboris sunt pariatur. Magna veniam ad eu labore aliquip non quis do adipisicing. Quis esse ad nostrud commodo. Non non aliquip sit laboris quis commodo laboris.\r\nPariatur laborum ad in ut et deserunt labore aute sint eiusmod. Voluptate eiusmod est enim quis id culpa aute eiusmod magna deserunt quis sint deserunt tempor. Deserunt quis deserunt enim elit. Esse duis irure eu officia ut tempor in velit in pariatur. Ea aute enim occaecat amet enim nisi excepteur consequat qui ut laboris incididunt tempor.\r\nIpsum enim dolore irure esse incididunt. Voluptate elit qui mollit aliquip ex proident ad adipisicing ipsum. Tempor dolore minim esse esse sint irure pariatur esse.\r\nMagna sunt labore Lorem do laboris duis exercitation aliqua fugiat eiusmod incididunt. Dolor mollit sunt commodo occaecat dolor eu sunt id occaecat sint. Et sunt esse eiusmod veniam nisi magna culpa voluptate nisi esse.\r\n", + "address": "2 Elton Street", + "city": "Gouglersville", + "state": "Colorado", + "zip": 96057, + "country": "Gambia", + "email": "castanedapadilla@scentric.com", + "phone": "(911) 571-2320", + "color": "rgb(80,137,178)" + }, + { + "index": 329, + "name": "Deborah Klein", + "first": "Sandoval", + "last": "Miranda", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sectronov/73.jpg", + "boolean": true, + "guid": "9daaa0e4-d04c-4232-a637-24e733f0b9ac", + "integer": 76, + "date": "Sun Aug 14 1994 19:32:54 GMT-0700 (PDT)", + "shortText": "exercitation mollit reprehenderit dolore deserunt", + "mediumText": "Quis sint eu occaecat ex ex amet pariatur deserunt ea magna excepteur. Laborum in fugiat eiusmod amet sunt nostrud officia qui magna id et. Non fugiat eu consectetur veniam tempor. Nostrud proident reprehenderit sint aute nisi aliqua anim enim deserunt id. Labore excepteur sit dolor nisi occaecat velit pariatur id aliquip.", + "longText": "Labore officia tempor adipisicing amet. Aliqua amet deserunt dolore nisi commodo velit aliqua. Eu nisi fugiat minim duis ipsum esse adipisicing eu nulla ex ad.\r\n", + "address": "2 Olive Street", + "city": "Fairview", + "state": "Utah", + "zip": 99892, + "country": "Nepal", + "email": "sandovalmiranda@scentric.com", + "phone": "(808) 578-2445", + "color": "rgb(234,209,129)" + }, + { + "index": 330, + "name": "Tricia Moss", + "first": "Dickson", + "last": "Houston", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/starburst1977/73.jpg", + "boolean": true, + "guid": "f41db055-f748-45e3-9ce3-4d867e00f776", + "integer": 9, + "date": "Mon Jun 15 1992 12:38:40 GMT-0700 (PDT)", + "shortText": "esse consectetur", + "mediumText": "Non nisi ut aliqua ipsum consequat excepteur culpa labore labore. Incididunt adipisicing qui mollit elit eiusmod aliqua aute. Laboris ut consequat consectetur elit aliquip irure enim aute cupidatat. Laboris incididunt id laborum reprehenderit duis nisi consectetur laboris nostrud.", + "longText": "Occaecat mollit reprehenderit tempor veniam consectetur non officia. Laboris consequat velit mollit in quis. Qui dolore excepteur in esse magna cupidatat incididunt eiusmod magna do. Laboris consectetur adipisicing occaecat cillum mollit duis. Officia excepteur exercitation quis consequat deserunt magna officia voluptate officia sint magna quis officia voluptate. Ullamco qui nostrud id incididunt veniam eu Lorem ad voluptate.\r\nConsequat cupidatat laborum sint consectetur. Anim do anim reprehenderit excepteur occaecat duis eu ea ipsum anim non nostrud nulla minim. Voluptate eu id officia consequat minim. Proident nulla qui amet qui veniam mollit non.\r\n", + "address": "3 Russell Street", + "city": "Fruitdale", + "state": "Idaho", + "zip": 49478, + "country": "Falkland Islands (Malvinas)", + "email": "dicksonhouston@scentric.com", + "phone": "(904) 444-3745", + "color": "rgb(237,192,112)" + }, + { + "index": 331, + "name": "Mclaughlin Spence", + "first": "Vicky", + "last": "Montoya", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mocabyte/73.jpg", + "boolean": true, + "guid": "b76384d1-fb6b-4500-ad6a-f266c0a380ce", + "integer": 95, + "date": "Tue Apr 18 1995 21:15:18 GMT-0700 (PDT)", + "shortText": "aute aliqua", + "mediumText": "Aliquip ea ad aute pariatur exercitation ex elit.", + "longText": "Labore veniam officia officia dolore. Ea quis et incididunt irure. Ut exercitation proident nostrud eiusmod quis ad. Laboris et Lorem qui quis ullamco dolore minim do incididunt. Lorem dolor fugiat consectetur eu qui nulla est voluptate veniam eu reprehenderit laboris dolore ex.\r\nUllamco Lorem voluptate deserunt ut et nulla cupidatat non et exercitation elit est. Mollit esse aute excepteur eiusmod commodo pariatur. Aute exercitation exercitation duis cupidatat ad pariatur minim anim adipisicing minim esse eu sit laborum. Laboris excepteur eu commodo dolor amet eiusmod. Officia quis reprehenderit dolor laborum non amet pariatur sit. Minim anim minim minim nulla minim ut non adipisicing consequat esse.\r\n", + "address": "2 Carlton Avenue", + "city": "Bend", + "state": "Arkansas", + "zip": 21354, + "country": "Peru", + "email": "vickymontoya@scentric.com", + "phone": "(808) 516-2094", + "color": "rgb(156,150,201)" + }, + { + "index": 332, + "name": "Montgomery Farrell", + "first": "Hayden", + "last": "Maldonado", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iamasifmirza/73.jpg", + "boolean": false, + "guid": "098a567c-1dc4-4f48-aa95-7c039f017b7e", + "integer": 99, + "date": "Sat Jul 30 2005 17:18:13 GMT-0700 (PDT)", + "shortText": "do culpa elit magna tempor", + "mediumText": "Non esse aliqua dolor irure cillum labore excepteur. Amet labore dolor tempor duis quis ullamco proident enim anim incididunt nulla pariatur sit eiusmod.", + "longText": "Cupidatat anim anim cupidatat fugiat Lorem id pariatur excepteur et nisi. Commodo pariatur proident id fugiat consectetur irure velit consectetur ipsum non velit aute adipisicing irure. Do aliqua aute id esse Lorem. Lorem minim incididunt et labore pariatur Lorem ex enim ipsum cupidatat exercitation. Amet aliquip nisi cupidatat laboris eu officia aute velit. Dolor non sit consequat elit eu ut qui occaecat. Proident ut reprehenderit commodo ipsum deserunt ex quis elit.\r\nEsse Lorem deserunt adipisicing esse tempor ad officia sit do officia laborum voluptate. Do voluptate voluptate eiusmod magna in quis minim consectetur. Officia fugiat cillum aliquip et magna esse elit voluptate ea ad officia dolor sint. Ad velit aliqua reprehenderit consectetur quis incididunt nisi.\r\nAute pariatur pariatur aliquip incididunt ut enim id dolor aute sit aute. Elit occaecat labore nostrud enim veniam. Eu laborum mollit quis sit ut incididunt et. Nulla Lorem excepteur culpa ullamco adipisicing est irure reprehenderit cillum tempor cillum culpa ad.\r\n", + "address": "2 Folsom Place", + "city": "Edmund", + "state": "Delaware", + "zip": 95338, + "country": "Tonga", + "email": "haydenmaldonado@scentric.com", + "phone": "(891) 403-3020", + "color": "rgb(131,136,141)" + }, + { + "index": 333, + "name": "Mavis Sanchez", + "first": "Ginger", + "last": "Dale", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/benoitboucart/73.jpg", + "boolean": true, + "guid": "ba039378-7a45-4b1c-8ec3-cb2714651e82", + "integer": 67, + "date": "Sun Dec 13 1992 23:12:22 GMT-0800 (PST)", + "shortText": "adipisicing sint", + "mediumText": "Pariatur minim ipsum aliquip nulla qui voluptate irure irure est anim culpa laboris cupidatat. Enim adipisicing exercitation eiusmod sunt ex ad irure id labore. Aute labore voluptate amet eu. Dolor ea non enim nostrud elit aliqua qui amet aliqua et.", + "longText": "Occaecat mollit pariatur ea nisi veniam. Dolore incididunt dolore commodo incididunt ad ex dolore officia et ea aliqua magna. Ad sunt est proident nostrud consectetur. Ullamco laboris incididunt sit aute aliquip dolor proident tempor duis adipisicing esse pariatur.\r\nDo quis ea proident quis ea aliquip cupidatat culpa elit deserunt consectetur sunt. Anim excepteur aliquip culpa amet minim nostrud laborum proident eiusmod labore culpa est dolor. Amet et fugiat irure nisi commodo tempor irure aliqua nostrud nostrud. Dolore tempor sit laborum anim.\r\nOfficia commodo dolore duis officia do. Eu fugiat quis voluptate sunt excepteur nulla irure quis cupidatat sit quis. Ex irure non cupidatat ex. Sunt qui sit excepteur occaecat mollit velit eiusmod esse dolore aliqua laborum ullamco.\r\n", + "address": "4 Brown Street", + "city": "Comptche", + "state": "Federated States Of Micronesia", + "zip": 91514, + "country": "Tunisia", + "email": "gingerdale@scentric.com", + "phone": "(883) 563-2014", + "color": "rgb(163,218,120)" + }, + { + "index": 334, + "name": "Terrie Peters", + "first": "Adeline", + "last": "Franklin", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/markwienands/73.jpg", + "boolean": false, + "guid": "7eb5d929-28c8-4d9e-8728-a158423e70eb", + "integer": 69, + "date": "Thu Mar 20 1986 06:50:48 GMT-0800 (PST)", + "shortText": "commodo", + "mediumText": "Nisi nulla enim ad deserunt proident qui. Aliqua duis id ea deserunt. Ut amet adipisicing sint consequat qui ut nisi et sit cillum amet. Velit laboris nulla nisi laborum cillum laborum qui minim velit aute sunt elit culpa aliqua. Adipisicing aliqua nulla proident sit sit laborum ea eu.", + "longText": "Fugiat dolor cupidatat sunt ex quis labore proident esse. Cupidatat exercitation elit do commodo ex Lorem tempor pariatur consequat laboris in elit. Ea cupidatat culpa elit officia nulla pariatur consequat magna incididunt tempor sunt voluptate. Voluptate nisi eiusmod fugiat nostrud dolore occaecat labore esse esse incididunt Lorem aliquip et.\r\nCupidatat consectetur dolor culpa cillum cupidatat occaecat. Dolor mollit nostrud cupidatat aliqua enim cupidatat consequat dolor labore ex nisi excepteur. Elit aliqua quis aliquip magna. Nostrud excepteur officia tempor laboris sunt voluptate proident pariatur. Consequat laboris Lorem id dolore in est sunt cillum irure exercitation id adipisicing minim aliquip. Non est dolore duis deserunt commodo elit amet esse sint reprehenderit. Aliqua quis fugiat elit duis minim exercitation consectetur.\r\n", + "address": "3 Desmond Court", + "city": "Fredericktown", + "state": "Guam", + "zip": 17881, + "country": "Guadeloupe", + "email": "adelinefranklin@scentric.com", + "phone": "(814) 430-3138", + "color": "rgb(186,245,118)" + }, + { + "index": 335, + "name": "Reed Banks", + "first": "Frost", + "last": "Velez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/menghe/73.jpg", + "boolean": true, + "guid": "0ea4f50e-f8d5-4d36-b794-5124c98c0103", + "integer": 38, + "date": "Fri Feb 13 1981 04:31:25 GMT-0800 (PST)", + "shortText": "do adipisicing", + "mediumText": "Sit dolor occaecat sint ipsum. Velit nostrud ea ex officia id minim do minim dolore occaecat duis laborum.", + "longText": "Aute ullamco eu ad quis voluptate dolore qui. Laborum deserunt consectetur dolore ut deserunt amet Lorem ut est duis eiusmod Lorem in. Dolor voluptate aliqua aute cillum exercitation sit deserunt ut cillum cupidatat cillum aliquip mollit voluptate. Aute anim ad nulla minim deserunt dolor ut dolore adipisicing anim laborum deserunt do eiusmod. Id excepteur nisi enim ullamco sunt esse minim velit dolore aliqua. Elit adipisicing laborum est est Lorem quis est.\r\n", + "address": "2 Osborn Street", + "city": "Orviston", + "state": "Pennsylvania", + "zip": 73473, + "country": "Australia", + "email": "frostvelez@scentric.com", + "phone": "(805) 408-3874", + "color": "rgb(61,142,146)" + }, + { + "index": 336, + "name": "Horton Howe", + "first": "Loretta", + "last": "Hudson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/heyanata/73.jpg", + "boolean": false, + "guid": "22d30b57-493f-4a7d-9b75-bb3a630d6a21", + "integer": 97, + "date": "Sat Oct 11 1975 04:15:11 GMT-0700 (PDT)", + "shortText": "do enim", + "mediumText": "Ea magna cillum aliqua reprehenderit consequat velit laboris aliqua. Officia laboris nostrud ullamco magna mollit occaecat est velit ea minim veniam tempor esse id. Consequat dolore quis id pariatur velit mollit quis. Quis veniam consectetur ad esse sit amet Lorem anim irure occaecat laborum duis. Aute sunt fugiat anim cillum dolor elit consequat sint magna commodo fugiat laboris.", + "longText": "Ut elit do mollit tempor aliqua duis anim incididunt anim consectetur veniam deserunt enim aliquip. Ad velit ad cupidatat ad deserunt reprehenderit aliqua ut elit sit. Commodo reprehenderit eu do consequat irure enim nisi exercitation qui minim. Minim fugiat culpa excepteur duis ea laborum. Elit occaecat adipisicing fugiat consequat minim cillum commodo laborum labore sunt consequat ut reprehenderit. Veniam non exercitation nostrud magna magna ullamco dolor eiusmod officia enim nisi quis. Enim nisi eu velit excepteur et exercitation irure.\r\nAmet consequat ea proident anim minim sint consequat consectetur sunt nostrud proident ut. Aliquip proident aliqua consectetur occaecat esse magna sunt labore id quis officia pariatur officia excepteur. Occaecat Lorem ut esse irure. Ullamco eiusmod ipsum qui culpa eu esse exercitation ullamco irure elit.\r\nEu consectetur commodo sunt laborum consectetur nulla laboris in reprehenderit id. Culpa dolore deserunt nulla labore cillum enim enim do velit deserunt quis cupidatat tempor labore. Enim proident sunt aliquip dolor laborum labore sint eu cillum. Ut irure quis proident laboris cupidatat et anim anim qui. Nisi reprehenderit eu esse laboris qui excepteur sunt cupidatat eiusmod magna nostrud ipsum consectetur. Non ut amet velit non laboris fugiat duis.\r\nReprehenderit et incididunt sit consectetur qui non aliquip mollit pariatur nisi. Enim eu dolor id eu. Laborum laboris ex esse veniam Lorem exercitation exercitation nostrud officia. Exercitation ipsum dolor exercitation ullamco adipisicing anim non tempor laboris deserunt consequat amet tempor tempor. Cupidatat sunt non magna aute excepteur magna dolor in irure esse dolor pariatur. Eiusmod commodo minim ipsum elit. Ut reprehenderit veniam ex magna mollit duis magna.\r\n", + "address": "3 Hampton Avenue", + "city": "Brecon", + "state": "New Hampshire", + "zip": 11881, + "country": "Dominican Republic", + "email": "lorettahudson@scentric.com", + "phone": "(969) 542-2613", + "color": "rgb(245,143,237)" + }, + { + "index": 337, + "name": "Byrd Hopkins", + "first": "Charmaine", + "last": "Gibbs", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thibaut_re/73.jpg", + "boolean": false, + "guid": "bf3bdf33-82fb-4240-b2be-d215fbaff029", + "integer": 55, + "date": "Wed Sep 12 2001 15:08:00 GMT-0700 (PDT)", + "shortText": "esse", + "mediumText": "Minim culpa et ea labore labore ad do officia eiusmod. Incididunt duis elit sit cupidatat mollit qui ea. Dolor id adipisicing est tempor commodo.", + "longText": "Consequat consequat eiusmod sint esse ex. Nisi eu est magna esse cillum exercitation velit ea. Pariatur irure cupidatat est non anim do magna adipisicing eu aliqua Lorem.\r\nSunt tempor qui id aliqua minim culpa non adipisicing in id elit. Laborum laboris aliquip ea mollit excepteur aute. Culpa id sit quis cupidatat nostrud irure duis aliqua do laboris veniam. Ullamco aute cillum in excepteur enim. Ipsum amet voluptate aliqua mollit commodo sint.\r\nAmet aute pariatur cillum adipisicing ad culpa velit do commodo nulla consequat elit exercitation ad. Do nisi in laboris id proident deserunt. Dolor commodo do qui esse aliqua dolore duis officia adipisicing Lorem.\r\nTempor eu sit id occaecat nostrud esse non voluptate officia exercitation mollit. Aliqua elit commodo incididunt nulla labore nostrud est duis. Pariatur ut laboris laboris laborum mollit anim consequat. Veniam eu non nostrud elit amet incididunt mollit sint duis adipisicing voluptate duis fugiat qui. Velit labore nostrud anim ex laboris ullamco elit. Ad in adipisicing anim culpa. Aliqua ullamco quis cupidatat exercitation qui.\r\n", + "address": "2 Norfolk Street", + "city": "Beechmont", + "state": "North Dakota", + "zip": 44060, + "country": "Zaire", + "email": "charmainegibbs@scentric.com", + "phone": "(882) 485-2815", + "color": "rgb(52,73,103)" + }, + { + "index": 338, + "name": "Walter Hoffman", + "first": "John", + "last": "Arnold", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bluesix/73.jpg", + "boolean": true, + "guid": "775148e8-ce9f-4917-b50d-93d7d88dcc90", + "integer": 64, + "date": "Sat Oct 10 1992 03:41:40 GMT-0700 (PDT)", + "shortText": "culpa esse eiusmod amet nisi", + "mediumText": "Excepteur sunt fugiat dolor dolor cupidatat laboris esse sint incididunt elit fugiat reprehenderit aliqua dolor.", + "longText": "Proident aliquip eu incididunt nulla laboris deserunt dolore ipsum. Officia elit in laboris nulla nostrud. Voluptate dolore Lorem qui consectetur id amet qui esse est. Ipsum pariatur non id quis proident est exercitation culpa consectetur occaecat ut eiusmod minim. Nostrud dolore id nulla ullamco mollit aute minim ad quis.\r\n", + "address": "2 Madeline Court", + "city": "Coinjock", + "state": "Northern Mariana Islands", + "zip": 94228, + "country": "China", + "email": "johnarnold@scentric.com", + "phone": "(832) 506-2961", + "color": "rgb(124,211,144)" + }, + { + "index": 339, + "name": "Conner Santiago", + "first": "Geneva", + "last": "Cline", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/w8candice/73.jpg", + "boolean": true, + "guid": "42040b16-aa43-4862-94d5-186ca3462e87", + "integer": 42, + "date": "Sat Jan 30 1988 20:47:01 GMT-0800 (PST)", + "shortText": "pariatur enim fugiat", + "mediumText": "Pariatur voluptate mollit deserunt voluptate proident sit sint Lorem magna sunt deserunt ipsum. Exercitation nostrud proident consequat amet.", + "longText": "Occaecat nulla nulla labore laborum id est enim adipisicing proident commodo incididunt sit ex. Aute excepteur deserunt tempor quis sit deserunt eu velit elit veniam dolore dolore adipisicing consectetur. Consequat tempor nostrud excepteur laboris quis. Duis aute magna do mollit ullamco ex ipsum occaecat aute sunt.\r\nCupidatat nisi ullamco dolor incididunt magna nulla dolor amet consectetur laborum ex non cupidatat. Labore incididunt in anim anim quis sint sit consequat quis labore aute. Magna nisi sint nostrud ea esse voluptate.\r\nLorem ex cupidatat Lorem aute sunt consectetur proident. Labore dolor ipsum laboris laboris nulla enim ea excepteur aliqua incididunt incididunt et ipsum mollit. Dolor labore cillum dolor Lorem nulla voluptate reprehenderit fugiat dolor ad sint id commodo. Aliqua in fugiat laboris fugiat ea officia dolor magna labore laborum non commodo. In labore consequat incididunt ut minim. Lorem enim tempor mollit minim esse deserunt anim ex labore. Officia nulla reprehenderit dolore eu duis eu.\r\n", + "address": "2 Ford Street", + "city": "Buxton", + "state": "South Dakota", + "zip": 92541, + "country": "British Indian Ocean Territory", + "email": "genevacline@scentric.com", + "phone": "(945) 577-3780", + "color": "rgb(88,84,180)" + }, + { + "index": 340, + "name": "Rosales Cain", + "first": "Lucille", + "last": "Sims", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mbilderbach/73.jpg", + "boolean": false, + "guid": "05c0e183-2ebf-459b-8755-1581a4a5e362", + "integer": 66, + "date": "Thu Oct 16 1997 15:05:12 GMT-0700 (PDT)", + "shortText": "esse labore", + "mediumText": "Ipsum cillum sunt laboris reprehenderit quis nulla.", + "longText": "Enim adipisicing non occaecat dolore sunt qui magna do velit mollit. Adipisicing enim esse quis Lorem sit ut elit est. Nostrud ea sit duis ex esse tempor enim exercitation non exercitation sint. Occaecat ipsum ex id elit eu id occaecat ea pariatur nisi tempor velit. Amet duis do minim minim excepteur adipisicing elit reprehenderit do tempor do sint ex.\r\nElit eu laboris mollit ullamco. Reprehenderit sit elit ipsum ad aliqua nostrud sunt quis ut irure aliqua. Quis non in cillum aliquip laboris esse in aliquip laboris eu qui adipisicing consectetur. Magna tempor irure officia duis sunt.\r\nSit ad dolore mollit fugiat do culpa in anim aliqua. Ad adipisicing esse occaecat ullamco proident. Cillum consequat nostrud sit consequat ullamco do et aute dolore nulla ullamco. Occaecat aliquip ut et incididunt ex fugiat ea esse aute quis amet consequat dolore ex. Officia aute incididunt esse exercitation culpa.\r\n", + "address": "4 Bergen Place", + "city": "Neibert", + "state": "Alaska", + "zip": 90229, + "country": "Libya", + "email": "lucillesims@scentric.com", + "phone": "(881) 438-3457", + "color": "rgb(57,64,85)" + }, + { + "index": 341, + "name": "Jillian Puckett", + "first": "Bean", + "last": "Dyer", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/coreyweb/73.jpg", + "boolean": false, + "guid": "a5317fd0-0be0-41ea-bbe9-a86a56e64aee", + "integer": 79, + "date": "Fri Oct 22 2004 15:49:39 GMT-0700 (PDT)", + "shortText": "ipsum aliqua", + "mediumText": "Occaecat ut eu consectetur sit Lorem nulla incididunt magna mollit reprehenderit fugiat.", + "longText": "Ad non eiusmod ullamco consectetur. In incididunt officia ex irure id. Quis minim ut quis duis id adipisicing commodo consectetur ut voluptate eiusmod duis.\r\nCulpa aliquip amet esse tempor do adipisicing. Excepteur do amet duis ad labore exercitation do nulla minim do pariatur ea. Magna amet dolor Lorem do nostrud aliqua eiusmod ad ut aliquip irure ullamco deserunt ipsum. Eu enim amet ut ut tempor sit cupidatat magna dolore. Laborum magna irure sit incididunt quis duis ex.\r\n", + "address": "2 Throop Avenue", + "city": "Saddlebrooke", + "state": "Louisiana", + "zip": 90267, + "country": "Cook Islands", + "email": "beandyer@scentric.com", + "phone": "(996) 420-2363", + "color": "rgb(127,126,117)" + }, + { + "index": 342, + "name": "Imelda Barrera", + "first": "Ramos", + "last": "Burke", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jeremyshimko/73.jpg", + "boolean": true, + "guid": "7af4342e-1e1e-4807-8c51-aa37e8b7e551", + "integer": 25, + "date": "Thu Apr 19 2012 18:26:05 GMT-0700 (PDT)", + "shortText": "excepteur in culpa duis ullamco", + "mediumText": "In minim officia mollit veniam esse deserunt enim ullamco adipisicing ullamco deserunt quis.", + "longText": "Non cupidatat ipsum sint pariatur laborum ex in non aliquip est laborum. Aliquip fugiat proident sint in ea adipisicing dolor veniam consequat labore quis Lorem occaecat amet. Exercitation do commodo sunt nisi elit aliqua aliqua consectetur. Reprehenderit eu qui ea aliquip labore eiusmod cillum sunt.\r\n", + "address": "4 Cozine Avenue", + "city": "Sedley", + "state": "Missouri", + "zip": 43280, + "country": "Iran", + "email": "ramosburke@scentric.com", + "phone": "(800) 574-2091", + "color": "rgb(187,50,171)" + }, + { + "index": 343, + "name": "Witt Tyson", + "first": "Rebekah", + "last": "Kelly", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pavelbuben/73.jpg", + "boolean": false, + "guid": "81d76694-4ec9-4a0d-b1d2-87c3513414e3", + "integer": 92, + "date": "Thu Jul 31 1975 13:57:11 GMT-0700 (PDT)", + "shortText": "do quis", + "mediumText": "Reprehenderit veniam in sit magna nulla non ad ut enim culpa consequat in nisi id. Aute culpa ex laborum est cillum excepteur amet labore culpa nostrud magna. Enim deserunt aliquip eu et voluptate consequat culpa do minim occaecat voluptate sit.", + "longText": "Dolor excepteur minim magna tempor cillum duis voluptate reprehenderit veniam nulla anim tempor elit sint. Enim eu consectetur aliqua labore est non anim reprehenderit aliquip deserunt aute. Consequat et veniam id id ullamco amet adipisicing eiusmod. Ullamco fugiat quis ad sit consequat aliqua ipsum labore. Laboris magna est incididunt mollit magna voluptate velit duis aute ut. Laborum in proident nulla officia voluptate do in nostrud consectetur cupidatat est.\r\nLorem elit nulla tempor officia incididunt consequat aliqua. Voluptate anim labore esse veniam. Voluptate commodo occaecat minim duis qui enim veniam anim exercitation nulla laborum officia irure.\r\nNulla est eiusmod duis deserunt ea. Non deserunt ea nulla est quis occaecat cupidatat sit officia aliqua et nulla irure sint. Ea duis aliqua veniam reprehenderit culpa eiusmod sint. Quis et eu eu dolore. Nulla est officia adipisicing laborum est dolore duis culpa. Cupidatat eu aliqua adipisicing magna irure et deserunt eu magna Lorem tempor culpa.\r\nIrure cillum velit dolor duis dolore non sunt elit deserunt pariatur ut elit cupidatat. Qui irure sint duis ad nostrud dolore laborum. Labore esse amet et deserunt elit enim est duis in irure proident adipisicing irure. In laboris mollit eiusmod aliquip irure fugiat nulla commodo quis do eiusmod aute.\r\nIn voluptate aute ex qui ex adipisicing ea sint aliqua in mollit consequat. Duis sit adipisicing proident elit eu duis non dolor aliquip eiusmod duis nostrud reprehenderit. Amet et sint aliquip proident ea cillum veniam qui elit excepteur occaecat voluptate culpa. Mollit ea labore nulla mollit Lorem velit velit sit commodo nostrud. Ex deserunt laborum ea laborum culpa culpa sit eu dolor aute sunt amet. Est dolor tempor proident sint labore proident ipsum consectetur nostrud. Qui commodo qui aliqua commodo esse aute non enim.\r\n", + "address": "2 Kosciusko Street", + "city": "Zarephath", + "state": "Kentucky", + "zip": 42417, + "country": "Aruba", + "email": "rebekahkelly@scentric.com", + "phone": "(941) 590-3874", + "color": "rgb(228,211,182)" + }, + { + "index": 344, + "name": "Daphne Murphy", + "first": "Solis", + "last": "Norris", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hafeeskhan/73.jpg", + "boolean": true, + "guid": "aba2b0e9-cd59-410a-b0d2-70b43acabbc0", + "integer": 71, + "date": "Sun Apr 30 1972 14:07:42 GMT-0700 (PDT)", + "shortText": "aute consequat voluptate adipisicing ex", + "mediumText": "Dolore commodo sit ea sunt in consectetur fugiat laboris incididunt aliquip.", + "longText": "Sunt dolor duis fugiat voluptate veniam. In cillum irure nisi quis reprehenderit est ipsum. Dolore duis est ea duis labore laborum ea ex nisi minim. Velit eiusmod nulla laborum eu dolor aliqua sunt officia proident nulla sunt in pariatur. Pariatur sit do ullamco nostrud commodo ex et ex in. Labore excepteur tempor et qui nisi Lorem culpa eu. Incididunt esse Lorem ex ipsum aliquip sunt velit et voluptate consectetur duis.\r\nAdipisicing esse ipsum tempor eu. Voluptate aliqua laborum incididunt excepteur veniam. Laboris sunt id quis sint voluptate duis ex.\r\nQui dolore culpa reprehenderit est est do. Duis mollit consequat quis velit do dolore elit voluptate consequat deserunt aliquip culpa consequat. Laboris adipisicing qui nulla voluptate irure cillum velit eiusmod officia Lorem cillum pariatur tempor duis. Et magna consectetur laborum consectetur est culpa ipsum ullamco sunt aute dolor velit. Duis ipsum reprehenderit quis adipisicing voluptate do laborum.\r\nExcepteur minim est adipisicing ipsum id Lorem eu nisi ea mollit anim ut. Incididunt eu sint eu in ex ut voluptate consectetur ex consectetur aliquip exercitation labore. Proident amet labore sit laborum sit et officia est proident aliqua enim id id. Ea consectetur minim deserunt non. Eu in est labore aliqua non amet aliquip minim enim cupidatat veniam magna. Commodo occaecat dolore Lorem Lorem Lorem sint consequat proident ut duis enim magna. Aute occaecat nisi duis culpa velit sunt.\r\n", + "address": "3 Bushwick Avenue", + "city": "Farmington", + "state": "American Samoa", + "zip": 46996, + "country": "Faroe Islands", + "email": "solisnorris@scentric.com", + "phone": "(926) 567-2180", + "color": "rgb(195,76,204)" + }, + { + "index": 345, + "name": "Summer Sawyer", + "first": "Cheri", + "last": "Watts", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/timmillwood/73.jpg", + "boolean": false, + "guid": "edf13e03-caa7-418a-8781-3ec09c26861d", + "integer": 75, + "date": "Tue May 08 2012 18:10:55 GMT-0700 (PDT)", + "shortText": "incididunt excepteur", + "mediumText": "Ullamco adipisicing id culpa irure anim non fugiat. Quis laborum nisi cillum incididunt minim ad cupidatat eiusmod mollit. Et nostrud eiusmod dolor et Lorem aliquip deserunt. In minim ut pariatur commodo. Ullamco minim commodo velit labore commodo eiusmod magna ea officia ex.", + "longText": "Mollit irure non aute magna. Amet dolor dolore ipsum pariatur anim ipsum ipsum cupidatat voluptate. Veniam excepteur eiusmod labore voluptate. Ipsum cillum anim esse aliqua ex consequat. Tempor adipisicing aute laborum deserunt magna labore duis deserunt.\r\nEt fugiat amet esse aliquip veniam magna est ad. Veniam velit velit ipsum pariatur duis incididunt sunt consequat esse. Cillum eiusmod duis aliqua ullamco. Magna pariatur adipisicing magna reprehenderit tempor eiusmod cillum consequat ipsum mollit occaecat enim. Officia tempor aute eu elit aliquip anim voluptate minim cupidatat fugiat esse labore excepteur. Nulla ex aliqua ipsum irure minim. Consectetur dolor non quis consequat eiusmod reprehenderit fugiat eiusmod quis qui qui elit nisi.\r\nDo mollit dolor id occaecat pariatur sint nulla ea aliquip ullamco aliquip exercitation eiusmod ex. Duis magna nulla amet fugiat Lorem tempor duis nisi ex exercitation ex. Non irure ullamco reprehenderit nulla consectetur in.\r\nNisi proident cillum labore anim consectetur in. Amet ullamco magna laboris minim velit eu incididunt non elit sit eu est consequat. Duis consectetur in nulla anim elit in sint nostrud excepteur quis velit. Mollit proident enim voluptate irure officia cupidatat anim Lorem anim occaecat consectetur Lorem.\r\n", + "address": "2 Oxford Street", + "city": "Bordelonville", + "state": "Minnesota", + "zip": 67948, + "country": "Zambia", + "email": "cheriwatts@scentric.com", + "phone": "(854) 438-3356", + "color": "rgb(90,88,182)" + }, + { + "index": 346, + "name": "Anita Jacobson", + "first": "Lucile", + "last": "Roberts", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/butchewing/73.jpg", + "boolean": false, + "guid": "c88108ef-0dce-42ae-b03e-770b8b26ecf0", + "integer": 37, + "date": "Mon Apr 18 1977 02:05:21 GMT-0800 (PST)", + "shortText": "nostrud", + "mediumText": "Deserunt fugiat veniam minim ipsum consequat ipsum tempor voluptate ut. Elit tempor eu non ea pariatur dolore incididunt laboris quis eiusmod est qui.", + "longText": "Fugiat tempor dolore proident adipisicing fugiat minim. Sunt in veniam dolor anim non Lorem id proident in anim sint. Cupidatat et esse culpa sunt incididunt ex proident elit qui ad eu elit laboris cillum. Laboris culpa pariatur ea sit culpa et ea minim fugiat. Eu nulla est excepteur deserunt officia.\r\nSunt cupidatat do sunt anim ad ullamco veniam est tempor elit id ex sunt. Velit consectetur occaecat laborum do consequat dolore duis sint exercitation anim. Ad sunt aliqua culpa dolore fugiat excepteur elit magna labore. Nostrud cupidatat aliquip et officia aliquip incididunt. Fugiat excepteur pariatur officia magna. Ex id velit enim amet culpa.\r\n", + "address": "2 Adams Street", + "city": "Southview", + "state": "Hawaii", + "zip": 67415, + "country": "Albania", + "email": "lucileroberts@scentric.com", + "phone": "(826) 522-3183", + "color": "rgb(114,159,181)" + }, + { + "index": 347, + "name": "Beverly Ayala", + "first": "Teresa", + "last": "Serrano", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dotmariusz/73.jpg", + "boolean": false, + "guid": "e5824ea2-1204-42b5-8075-232d1e648cfc", + "integer": 47, + "date": "Mon Jul 24 2000 15:52:57 GMT-0700 (PDT)", + "shortText": "non cillum mollit enim ullamco", + "mediumText": "Amet do eu non culpa ea eiusmod culpa reprehenderit aute adipisicing duis nostrud in dolor. Do sint ex anim consectetur reprehenderit.", + "longText": "Et quis laboris ad ea do quis id enim. Ex culpa cupidatat velit nostrud cupidatat voluptate velit ipsum. Eu amet culpa aute officia non commodo irure fugiat. Qui sit consectetur labore exercitation officia cillum veniam enim.\r\n", + "address": "2 Quincy Street", + "city": "Vale", + "state": "Alabama", + "zip": 98150, + "country": "Panama", + "email": "teresaserrano@scentric.com", + "phone": "(898) 426-2065", + "color": "rgb(110,156,140)" + }, + { + "index": 348, + "name": "Golden Zimmerman", + "first": "Greta", + "last": "Gillespie", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/aaronbeashel/73.jpg", + "boolean": true, + "guid": "e4300d91-7791-4fcb-b61e-c551eeed9488", + "integer": 57, + "date": "Thu Sep 20 2007 17:36:22 GMT-0700 (PDT)", + "shortText": "cillum", + "mediumText": "Lorem duis adipisicing et ea dolore dolore non anim nisi exercitation enim. Ea incididunt velit quis mollit nisi dolor proident. Ipsum enim id eiusmod ex reprehenderit magna et reprehenderit deserunt aliqua. Qui mollit sit occaecat sunt ex veniam excepteur ex velit ea commodo ad.", + "longText": "Do dolore culpa cillum officia aliqua cillum. Fugiat nisi ipsum proident reprehenderit velit. Nulla proident aliqua proident velit incididunt consectetur quis ut adipisicing do aliqua. Amet laboris elit amet commodo adipisicing. Nisi esse minim ut elit. Est officia do minim mollit occaecat ipsum officia aliqua commodo in ipsum laborum labore.\r\nReprehenderit dolore irure dolore occaecat cillum minim quis non laborum ullamco tempor. Irure ut magna ad esse nostrud nostrud ut. Eiusmod sunt nulla commodo officia incididunt nisi aliqua. Eiusmod occaecat non do non qui eiusmod. Amet sit dolore fugiat aliquip.\r\n", + "address": "2 Foster Avenue", + "city": "Neahkahnie", + "state": "North Carolina", + "zip": 57285, + "country": "Turks and Caicos Islands", + "email": "gretagillespie@scentric.com", + "phone": "(907) 597-3902", + "color": "rgb(54,207,230)" + }, + { + "index": 349, + "name": "Sandra Taylor", + "first": "Schroeder", + "last": "Noel", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jina/73.jpg", + "boolean": false, + "guid": "10f56b06-75ab-4405-929b-533362c0fd8f", + "integer": 65, + "date": "Thu Jul 19 1979 21:31:02 GMT-0700 (PDT)", + "shortText": "laboris pariatur anim est", + "mediumText": "Velit nostrud voluptate labore eu irure laboris proident reprehenderit.", + "longText": "Ex irure sit ut quis exercitation enim voluptate laborum. Cillum deserunt amet est et. Nostrud consequat ullamco minim sit deserunt amet officia sit dolore. Incididunt laboris amet cupidatat exercitation enim enim veniam nostrud ipsum excepteur reprehenderit esse. Adipisicing esse do et est esse nulla duis nisi veniam sint.\r\nAmet incididunt est velit incididunt id consectetur ut eiusmod commodo nostrud do aliqua esse excepteur. Ullamco laborum proident ullamco aliqua nisi aliquip ex id. Irure voluptate non exercitation qui do enim incididunt incididunt esse dolor. Eiusmod aute id consectetur ullamco laboris cupidatat consequat.\r\nSunt commodo amet deserunt sit esse ad eiusmod tempor. Excepteur deserunt ea aliquip tempor nostrud nostrud labore eu et et. Dolore ex mollit officia voluptate non consequat. Tempor enim eiusmod est labore ut esse magna minim eu officia sit enim veniam. Quis do veniam magna elit enim amet est veniam irure.\r\nMollit sit incididunt sunt tempor adipisicing Lorem incididunt. Dolor veniam velit esse laboris fugiat eiusmod velit tempor ea pariatur nisi fugiat. Velit proident ex ipsum id cillum amet ad.\r\nCupidatat incididunt minim ex ipsum exercitation commodo aliquip excepteur. Voluptate labore reprehenderit quis in ex magna. Ad cillum adipisicing proident nostrud eu proident cupidatat consectetur adipisicing amet. Quis labore sunt sit ullamco deserunt amet ad occaecat cupidatat et pariatur fugiat commodo aute. Enim et veniam proident Lorem sint. Labore nisi in esse eiusmod laborum occaecat excepteur cillum incididunt esse in dolore. Aliqua eiusmod velit id occaecat sunt qui ex ea.\r\n", + "address": "2 Williams Court", + "city": "Davenport", + "state": "Connecticut", + "zip": 57031, + "country": "Christmas Island", + "email": "schroedernoel@scentric.com", + "phone": "(982) 532-3421", + "color": "rgb(240,238,143)" + }, + { + "index": 350, + "name": "Shelby Lott", + "first": "Maryanne", + "last": "Dixon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gu5taf/73.jpg", + "boolean": false, + "guid": "86ccb30c-436b-4e11-b33f-231007768e3c", + "integer": 16, + "date": "Wed Jan 07 1970 01:58:18 GMT-0800 (PST)", + "shortText": "anim officia nulla aliqua", + "mediumText": "Officia et eu enim esse veniam. Incididunt fugiat occaecat amet officia ad commodo aute amet reprehenderit reprehenderit nostrud non aute velit. Duis excepteur consectetur enim consequat labore exercitation irure nisi sint ullamco qui quis labore.", + "longText": "Tempor culpa mollit id anim labore sit Lorem cillum. Occaecat cupidatat sit ad voluptate tempor non do. Ullamco id laborum et ex esse. Do ex ad excepteur magna consequat. Qui proident qui occaecat ut aute nostrud.\r\n", + "address": "2 Quay Street", + "city": "Santel", + "state": "South Carolina", + "zip": 32917, + "country": "Botswana", + "email": "maryannedixon@scentric.com", + "phone": "(808) 502-2314", + "color": "rgb(150,72,230)" + }, + { + "index": 351, + "name": "Buck Reyes", + "first": "Meredith", + "last": "Kennedy", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/antonkudin/73.jpg", + "boolean": true, + "guid": "1836f1d4-6bef-4b29-8a27-b11d78119e5a", + "integer": 56, + "date": "Wed Jul 03 2013 04:17:00 GMT-0700 (PDT)", + "shortText": "cillum enim aute ea enim", + "mediumText": "Voluptate do Lorem veniam ullamco id excepteur. Mollit et occaecat ut amet nostrud dolore consectetur id minim. Eu esse nisi incididunt nulla occaecat sunt. Minim labore dolor do pariatur voluptate do nostrud irure tempor ipsum consectetur ea fugiat ut.", + "longText": "Et ex ipsum eu commodo aliquip sit officia id. Deserunt reprehenderit sunt dolore nisi veniam adipisicing esse exercitation velit anim ex. Eiusmod do aliquip magna cillum dolore cillum excepteur. Excepteur dolore quis nisi veniam quis eiusmod occaecat. Amet nulla ut excepteur duis officia dolor esse incididunt ipsum. Laboris est aliqua qui nostrud labore duis eu non do.\r\nDo id commodo et deserunt aliquip. Aliqua in ullamco ex consequat nisi laborum esse culpa ipsum mollit do occaecat occaecat incididunt. Tempor est irure irure ex incididunt laboris. Dolore veniam fugiat ea eiusmod cupidatat nostrud est reprehenderit sit id sunt consectetur eu irure. In laborum voluptate proident et dolor aute. Deserunt dolore dolor ad sit duis veniam.\r\n", + "address": "4 Herzl Street", + "city": "Sisquoc", + "state": "Michigan", + "zip": 13348, + "country": "Algeria", + "email": "meredithkennedy@scentric.com", + "phone": "(805) 554-3669", + "color": "rgb(179,239,148)" + }, + { + "index": 352, + "name": "Wooten Sloan", + "first": "Allen", + "last": "Wade", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/derekebradley/73.jpg", + "boolean": false, + "guid": "dc87dc7f-bf6e-4633-9a8e-2e7ce98a216b", + "integer": 94, + "date": "Fri Mar 13 1998 22:52:34 GMT-0800 (PST)", + "shortText": "consectetur ipsum eu velit", + "mediumText": "Lorem commodo sit nostrud culpa esse deserunt laboris magna. Elit esse id Lorem ut.", + "longText": "Sunt veniam est ex duis sit amet eiusmod ullamco cupidatat cillum Lorem. Deserunt ex do mollit consequat elit. Nostrud voluptate proident do commodo Lorem fugiat nostrud minim anim excepteur ad magna.\r\nQui et velit consequat Lorem occaecat irure anim esse. Labore veniam exercitation do excepteur velit pariatur excepteur consectetur aute voluptate enim exercitation non deserunt. Mollit irure magna id elit laborum. Elit pariatur aute pariatur nulla deserunt. Deserunt sit consectetur anim tempor duis laborum do quis enim.\r\nDolore dolore nostrud voluptate ipsum qui. Ea laboris culpa proident duis officia sit. Non do pariatur aute elit dolor aliqua cillum. Lorem ullamco eiusmod laboris mollit sint tempor consectetur laborum laboris deserunt exercitation. Eu fugiat nulla irure excepteur aliqua enim et consequat culpa. Amet dolor excepteur proident labore mollit mollit pariatur culpa incididunt occaecat dolor aliqua aliquip dolor.\r\nIn qui enim cupidatat quis magna do qui aliquip magna. Proident culpa nostrud nulla eiusmod occaecat sit id pariatur labore voluptate aute veniam. Eu amet labore labore aliqua amet adipisicing commodo. Non commodo est ea reprehenderit fugiat est ullamco voluptate excepteur ipsum sint est.\r\nCupidatat dolor aliqua amet ipsum incididunt non consectetur duis proident aliqua sit. Occaecat aliqua labore commodo qui consequat reprehenderit ut voluptate. Sint velit minim mollit elit occaecat laboris aliqua dolor enim do.\r\n", + "address": "2 Sandford Street", + "city": "Levant", + "state": "Maine", + "zip": 74609, + "country": "Switzerland", + "email": "allenwade@scentric.com", + "phone": "(971) 515-2074", + "color": "rgb(55,67,137)" + }, + { + "index": 353, + "name": "Luella Hogan", + "first": "Flores", + "last": "Wolfe", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/karachentsov/73.jpg", + "boolean": true, + "guid": "3e88723e-2180-4ee0-8c96-fd9c48538abd", + "integer": 65, + "date": "Thu Sep 03 1998 10:25:29 GMT-0700 (PDT)", + "shortText": "commodo reprehenderit anim", + "mediumText": "Magna in quis irure duis. Nisi duis non pariatur magna ipsum excepteur ea. Ea exercitation culpa commodo consectetur. Do cillum Lorem nisi ipsum nulla cupidatat officia sunt pariatur ea. Dolor deserunt enim reprehenderit in in.", + "longText": "Officia cillum proident consequat quis non dolor nisi id sit amet laborum sint. Elit enim ex laborum amet nulla qui. Ut amet eiusmod mollit id.\r\nEt fugiat laborum adipisicing laboris adipisicing. Sint ea est non ut laborum velit irure officia cupidatat excepteur. Eu cillum occaecat minim id proident incididunt.\r\nLaboris enim aliqua id et duis laborum dolore mollit proident. Culpa commodo dolor labore tempor minim nulla minim esse cupidatat do. Adipisicing ut non ullamco magna do commodo est dolore elit ea est eu. Est dolore duis Lorem culpa adipisicing. Tempor qui sunt qui et. Anim veniam esse consequat ut elit Lorem voluptate excepteur non culpa. Quis veniam Lorem aliqua culpa.\r\nNisi duis ex sunt magna enim proident et sint proident minim. In excepteur id pariatur ullamco. Nulla ea cupidatat sunt ut pariatur minim duis.\r\n", + "address": "2 Grafton Street", + "city": "Falconaire", + "state": "Kansas", + "zip": 39969, + "country": "S. Georgia and S. Sandwich Isls.", + "email": "floreswolfe@scentric.com", + "phone": "(961) 502-3921", + "color": "rgb(81,99,101)" + }, + { + "index": 354, + "name": "Mckee Tillman", + "first": "Patsy", + "last": "Odonnell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/emmeffess/73.jpg", + "boolean": true, + "guid": "3cc7cc1e-1856-4b5a-a9f7-0e938e0206e5", + "integer": 14, + "date": "Fri Jan 11 1985 09:25:30 GMT-0800 (PST)", + "shortText": "minim in proident", + "mediumText": "Duis eiusmod pariatur consectetur et laboris magna. Est aute cupidatat enim proident qui ea quis officia anim reprehenderit officia deserunt nostrud deserunt.", + "longText": "Qui occaecat irure veniam aliqua nisi Lorem exercitation in consequat nostrud fugiat. Magna cupidatat incididunt tempor in. Esse cillum ullamco minim et nisi tempor nostrud tempor. Fugiat duis veniam enim enim consequat. Incididunt anim fugiat in Lorem sunt sit fugiat. Do ut anim officia aliquip irure consectetur ipsum eu ex magna esse et exercitation. Reprehenderit irure velit sunt minim aute proident nisi ad enim tempor nostrud dolor.\r\n", + "address": "2 Dekalb Avenue", + "city": "Sattley", + "state": "Iowa", + "zip": 56105, + "country": "Brazil", + "email": "patsyodonnell@scentric.com", + "phone": "(991) 576-3320", + "color": "rgb(151,157,82)" + }, + { + "index": 355, + "name": "Tammy Mckenzie", + "first": "Araceli", + "last": "Villarreal", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bmovement/73.jpg", + "boolean": true, + "guid": "645a7c4c-a0cf-4361-9c6d-5d32d77d5500", + "integer": 69, + "date": "Sun Dec 24 2006 07:06:15 GMT-0800 (PST)", + "shortText": "anim laborum nisi", + "mediumText": "Incididunt consectetur culpa nisi Lorem eiusmod cillum non nisi tempor mollit irure nisi ut cupidatat. Proident non magna consectetur ut consequat occaecat est consectetur culpa aliqua cupidatat consequat ea. Commodo et veniam qui magna velit non deserunt exercitation proident Lorem eu non. Mollit eu laboris labore ipsum id nisi aute culpa dolore in magna ad cillum. Ea adipisicing Lorem ad irure exercitation amet aliqua esse.", + "longText": "Ea laboris in irure labore cillum. Lorem aliqua ut amet aliqua sint sunt officia adipisicing ipsum minim velit. Elit in reprehenderit occaecat et et elit sint. In consequat quis nulla cillum cillum sint ullamco do officia. Excepteur id fugiat ullamco elit adipisicing veniam deserunt tempor. Nisi dolor tempor amet irure in amet consequat ea. Sit tempor amet excepteur in tempor irure ut ipsum amet velit culpa dolor occaecat fugiat.\r\nLorem consequat deserunt irure veniam culpa fugiat incididunt eu sunt excepteur commodo sit adipisicing cillum. Magna ea mollit anim ullamco nisi do laboris duis aliquip excepteur labore reprehenderit dolor. Amet ea proident cupidatat cupidatat magna magna amet proident aute tempor. Officia non culpa tempor reprehenderit nostrud ut anim quis nisi laboris ipsum nostrud deserunt. Magna proident elit eiusmod et incididunt deserunt est ad anim occaecat enim tempor ex. Id veniam ad commodo ad proident reprehenderit. Veniam in culpa do dolore excepteur pariatur mollit.\r\nCupidatat ex occaecat nulla irure excepteur. Duis sit do nisi officia. Ea eu commodo magna aliquip ea sint aute dolor mollit laborum aute reprehenderit Lorem sit. Proident laboris incididunt sit in sint. Veniam nisi sunt laboris eu aliquip sunt reprehenderit irure ad reprehenderit. In ea ullamco ullamco amet cillum irure pariatur veniam.\r\nDolor deserunt sunt sunt aliqua consequat est deserunt culpa proident labore proident sit laborum. Cupidatat aute nostrud ad non consequat laboris. Cupidatat dolor magna et occaecat laboris. Ipsum magna id amet non consectetur adipisicing veniam. Aliqua anim pariatur nostrud anim in sint sit deserunt anim. Laborum dolor sunt anim sunt eiusmod consectetur do aliqua aute magna ad ea. Enim amet exercitation culpa deserunt proident.\r\nCommodo nisi officia commodo Lorem irure occaecat qui. Est eu Lorem et labore excepteur elit enim. Minim occaecat eu cupidatat labore ad deserunt irure officia quis enim. Consequat eiusmod labore minim ex ipsum velit ea veniam. Elit minim do non eiusmod cillum incididunt proident. In excepteur exercitation nisi aliquip adipisicing consequat qui.\r\n", + "address": "2 Richards Street", + "city": "Bancroft", + "state": "Vermont", + "zip": 63605, + "country": "Anguilla", + "email": "aracelivillarreal@scentric.com", + "phone": "(922) 535-2085", + "color": "rgb(123,74,237)" + }, + { + "index": 356, + "name": "Joyce Carney", + "first": "Vance", + "last": "Boyd", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/taiyab/73.jpg", + "boolean": true, + "guid": "0714e7c1-db9c-4bc9-ae14-47d72e9f36b2", + "integer": 29, + "date": "Sat Jan 18 1986 13:37:09 GMT-0800 (PST)", + "shortText": "Lorem non cillum laborum culpa", + "mediumText": "Laboris Lorem anim cillum et deserunt nostrud laborum ex laborum laboris laborum sint nostrud. In anim aliqua pariatur cupidatat adipisicing esse ex nulla pariatur sunt velit laborum cupidatat. Culpa irure elit occaecat ea in aliqua. Aliqua ex sint anim elit aute enim consectetur ea culpa pariatur. Reprehenderit culpa nisi nostrud cillum sint ullamco mollit sit velit ea officia pariatur.", + "longText": "Minim magna ipsum excepteur irure non qui pariatur excepteur. Minim velit ea ullamco irure quis est duis velit est enim do labore. Irure laboris mollit commodo fugiat. Elit dolor ipsum non veniam culpa id esse.\r\nAnim excepteur deserunt cillum fugiat quis dolor aliqua cillum occaecat. Occaecat deserunt incididunt voluptate cupidatat eu nulla do consequat laborum id veniam laborum. Laboris adipisicing cupidatat laboris sint elit fugiat ipsum mollit laboris sint proident dolore officia. Pariatur ut laboris aliquip culpa irure magna officia velit velit occaecat. Duis ipsum duis occaecat aute magna sunt ex veniam dolore laborum aliqua.\r\nUllamco deserunt minim et qui consequat esse. Cillum do elit magna culpa exercitation occaecat tempor reprehenderit nostrud ex do. Ex laborum irure aliquip ipsum. Excepteur cupidatat laboris consequat sint esse est aute voluptate est minim.\r\n", + "address": "3 Suydam Place", + "city": "Wiscon", + "state": "Nebraska", + "zip": 24690, + "country": "Mayotte", + "email": "vanceboyd@scentric.com", + "phone": "(950) 499-2028", + "color": "rgb(151,255,141)" + }, + { + "index": 357, + "name": "Briggs Cash", + "first": "Mason", + "last": "Norton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rigelstpierre/73.jpg", + "boolean": true, + "guid": "06751f30-d76a-46ef-a97a-3d8233acee4e", + "integer": 36, + "date": "Wed Oct 22 1997 23:32:22 GMT-0700 (PDT)", + "shortText": "qui aliquip laborum", + "mediumText": "Velit eiusmod est incididunt sint ipsum qui ullamco amet. Elit est velit adipisicing occaecat velit nisi irure tempor enim exercitation tempor sunt nulla elit. Incididunt ad quis officia nostrud aliqua incididunt commodo. Duis ex quis sint mollit laboris sint in ipsum enim.", + "longText": "Nisi excepteur culpa ipsum cillum aute cupidatat nisi. Culpa aliqua in excepteur et elit eu est irure laboris amet pariatur. Eiusmod culpa do nostrud sunt velit ea aliquip laboris nulla occaecat quis amet elit cupidatat. Excepteur sit mollit fugiat laborum nostrud sint pariatur. Officia ullamco consequat ex est quis. Dolor est laboris sint eu in laborum culpa.\r\n", + "address": "3 Williams Avenue", + "city": "Marbury", + "state": "Florida", + "zip": 96679, + "country": "Northern Mariana Islands", + "email": "masonnorton@scentric.com", + "phone": "(988) 478-3734", + "color": "rgb(122,225,185)" + }, + { + "index": 358, + "name": "Frank Vance", + "first": "Eva", + "last": "Christian", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/vlajki/73.jpg", + "boolean": false, + "guid": "90639571-dc94-4c8f-98c8-db8781d4d7e2", + "integer": 11, + "date": "Thu Jan 05 1984 02:00:59 GMT-0800 (PST)", + "shortText": "laboris non cillum laborum amet", + "mediumText": "Nulla consequat aute non non esse elit nostrud labore dolor consectetur. Fugiat culpa dolore commodo aute et enim exercitation reprehenderit. Mollit velit anim labore est dolor. Id fugiat proident qui in Lorem eiusmod. Officia labore reprehenderit nulla irure aute enim tempor sint mollit et.", + "longText": "Duis ad proident anim sint eu. Qui aute dolore minim nisi proident cillum consequat laboris. Aliquip sunt sunt irure eiusmod esse laboris amet ad nisi occaecat exercitation ullamco aliqua ex. Ipsum minim labore ut officia ut ut minim officia qui. Qui aliqua commodo nulla labore nulla aliqua sunt laboris ullamco anim. Enim exercitation labore excepteur et eiusmod Lorem fugiat sunt nulla enim aliquip magna. Excepteur esse et nisi in excepteur reprehenderit excepteur duis magna cupidatat labore exercitation adipisicing enim.\r\n", + "address": "2 Cypress Avenue", + "city": "Westwood", + "state": "New Jersey", + "zip": 64807, + "country": "Pitcairn", + "email": "evachristian@scentric.com", + "phone": "(933) 555-3019", + "color": "rgb(65,246,66)" + }, + { + "index": 359, + "name": "Bennett Fitzgerald", + "first": "Alyce", + "last": "Roth", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/leeiio/73.jpg", + "boolean": true, + "guid": "abc6eb23-4f14-4711-aaa1-0356ef6ac47e", + "integer": 79, + "date": "Mon Dec 15 1986 02:54:47 GMT-0800 (PST)", + "shortText": "veniam adipisicing velit magna deserunt", + "mediumText": "Laboris fugiat cupidatat ad aute laboris aliquip qui magna cupidatat cupidatat reprehenderit occaecat do.", + "longText": "Incididunt pariatur qui et ad adipisicing laborum. Aliqua eiusmod qui occaecat incididunt laboris sit. Amet ut commodo amet reprehenderit sit ex labore labore reprehenderit velit irure officia esse. Fugiat dolor ullamco sit ex ipsum aliqua irure aute dolore dolor.\r\n", + "address": "3 Howard Avenue", + "city": "Imperial", + "state": "Wisconsin", + "zip": 43410, + "country": "Saint Vincent and The Grenadines", + "email": "alyceroth@scentric.com", + "phone": "(930) 449-2969", + "color": "rgb(122,168,204)" + }, + { + "index": 360, + "name": "Garrett Lawson", + "first": "Marlene", + "last": "Hatfield", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/brad_frost/73.jpg", + "boolean": true, + "guid": "ea670adf-3aa0-4b5f-9ffc-4e448f9ad69b", + "integer": 63, + "date": "Sun Nov 16 1986 08:23:14 GMT-0800 (PST)", + "shortText": "aliqua sit aliquip id elit", + "mediumText": "Anim qui adipisicing enim est consequat duis qui aliquip. Elit excepteur tempor in eu ex exercitation. Dolor ex velit amet laboris. Sit non nisi anim ut et quis qui non irure elit pariatur nulla.", + "longText": "Ut pariatur magna duis cupidatat enim proident eiusmod tempor do aute Lorem non occaecat. Amet anim id quis cupidatat nulla exercitation nulla dolore eu irure Lorem anim incididunt. Laboris id dolore ullamco exercitation nostrud mollit pariatur Lorem. Consequat labore ea Lorem elit duis cupidatat nostrud do nulla. Elit amet proident fugiat commodo nostrud ipsum incididunt. Incididunt sunt qui laborum officia sit proident aute. Laboris laboris do est voluptate eu id officia labore amet aliquip eiusmod.\r\nLorem tempor elit nisi sunt. Laboris eu ea id id. Esse ad duis laboris elit tempor sint officia enim qui nulla elit aliquip cillum qui. Ex id culpa consequat laboris et voluptate esse irure.\r\nMollit sunt elit duis sunt reprehenderit aliquip id consequat elit ea amet Lorem non culpa. Et ad qui est mollit laboris mollit aute amet ut. Veniam occaecat mollit aliquip cillum consequat sit sint eu Lorem voluptate pariatur ad ad irure. Id aliquip velit eiusmod veniam anim duis proident do esse culpa non aliqua. Irure duis aute fugiat aliquip esse sint mollit aute non magna aliquip. Aliqua Lorem officia veniam cillum ad. Laboris reprehenderit adipisicing occaecat labore cupidatat cupidatat consectetur elit fugiat.\r\nUt amet tempor qui irure ex sunt nisi nostrud. Ipsum dolor cillum nisi mollit cupidatat adipisicing tempor ipsum veniam mollit anim aute nulla. Dolor aliqua occaecat aliqua eiusmod Lorem voluptate laborum. Aliquip sit quis culpa quis velit ut minim anim quis aliquip voluptate laborum. Sint qui exercitation elit occaecat consequat fugiat in nulla voluptate. Consequat fugiat culpa nulla qui Lorem cillum commodo elit aliqua proident enim dolore dolor excepteur. Voluptate pariatur ad culpa eiusmod ad nisi.\r\nSint eiusmod non reprehenderit proident Lorem anim nostrud id id. Adipisicing cupidatat magna commodo culpa quis amet sunt amet dolore veniam duis veniam duis occaecat. Cillum exercitation elit fugiat non. Consequat enim deserunt et nisi id. Ut occaecat est amet ea Lorem occaecat minim irure dolor nulla esse fugiat in aliqua. Commodo commodo occaecat duis consectetur sint ad ea exercitation adipisicing amet adipisicing aute duis.\r\n", + "address": "4 Elm Avenue", + "city": "Bluffview", + "state": "Washington", + "zip": 66639, + "country": "Iceland", + "email": "marlenehatfield@scentric.com", + "phone": "(944) 414-3916", + "color": "rgb(156,157,84)" + }, + { + "index": 361, + "name": "Rosalinda Barber", + "first": "Rosalind", + "last": "Little", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/alsobrooks/73.jpg", + "boolean": true, + "guid": "301b4435-b804-43a6-b90e-8b509a8d7482", + "integer": 30, + "date": "Mon Dec 21 2009 13:14:30 GMT-0800 (PST)", + "shortText": "ea veniam dolor enim", + "mediumText": "Excepteur et labore esse commodo in. In irure quis qui veniam cillum. Reprehenderit aliqua velit cillum fugiat velit eiusmod ad ex consectetur occaecat.", + "longText": "Aliquip minim ex adipisicing tempor labore qui deserunt laborum consequat. Cillum excepteur id cupidatat minim ex. Consequat officia voluptate aliqua cupidatat qui.\r\n", + "address": "4 Centre Street", + "city": "Efland", + "state": "Oregon", + "zip": 37697, + "country": "Andorra", + "email": "rosalindlittle@scentric.com", + "phone": "(912) 415-2087", + "color": "rgb(158,187,61)" + }, + { + "index": 362, + "name": "Krystal Lane", + "first": "Kitty", + "last": "Hodge", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thekishpatel/73.jpg", + "boolean": true, + "guid": "8918af69-f5ee-41e7-b442-d3e13fa03f20", + "integer": 88, + "date": "Tue Apr 11 1978 05:39:13 GMT-0800 (PST)", + "shortText": "adipisicing quis dolore ullamco exercitation", + "mediumText": "Nulla ipsum mollit sunt ad fugiat officia labore velit Lorem elit id. Tempor magna aliquip nulla laborum labore ea voluptate.", + "longText": "Nostrud culpa pariatur mollit nisi labore aliquip enim nulla reprehenderit. Laborum magna ut voluptate in occaecat irure non magna non aliqua sunt commodo anim. Consectetur officia irure proident enim. Sit amet nulla duis minim cillum consequat labore anim cillum. Cillum minim voluptate commodo ex aute duis nulla do. Incididunt cupidatat occaecat commodo labore pariatur eu sit commodo fugiat proident exercitation sint est.\r\nSunt voluptate sunt quis pariatur excepteur et. Id exercitation veniam cupidatat incididunt quis commodo duis cupidatat enim laboris elit. Consectetur irure reprehenderit consequat labore qui commodo quis excepteur irure nisi labore mollit Lorem voluptate. Aute dolore consectetur voluptate cillum anim qui incididunt.\r\n", + "address": "3 President Street", + "city": "Laurelton", + "state": "Illinois", + "zip": 32233, + "country": "Myanmar", + "email": "kittyhodge@scentric.com", + "phone": "(994) 498-3202", + "color": "rgb(139,225,83)" + }, + { + "index": 363, + "name": "Lorrie Carey", + "first": "Moran", + "last": "Bradshaw", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iqonicd/73.jpg", + "boolean": false, + "guid": "8040adde-26e1-416b-9053-e33e98a911a9", + "integer": 0, + "date": "Sat May 27 1972 21:40:25 GMT-0700 (PDT)", + "shortText": "culpa fugiat", + "mediumText": "Commodo cillum Lorem duis laborum minim cillum labore irure nostrud excepteur ut fugiat fugiat anim. Occaecat do eiusmod proident irure. Voluptate id nisi veniam tempor. Consequat non reprehenderit nulla esse irure magna pariatur occaecat minim nisi sunt velit. Labore reprehenderit ad consectetur et exercitation esse commodo.", + "longText": "Ad occaecat amet cillum nisi culpa pariatur sint Lorem ex. Ea ullamco Lorem officia exercitation pariatur cupidatat non mollit voluptate proident. Fugiat tempor irure pariatur eu minim nisi fugiat cupidatat. Ad anim ad qui occaecat. Do id veniam est cupidatat non proident occaecat deserunt fugiat incididunt.\r\nAliqua ea adipisicing elit est officia. Dolor voluptate ex labore proident aute laboris fugiat fugiat. Et fugiat enim qui et laborum sint. Aute excepteur ut ad duis. Voluptate duis adipisicing cupidatat ullamco magna.\r\nEu sint anim ea mollit ea labore pariatur velit adipisicing laborum velit. Irure eu ipsum consequat Lorem aute aliqua exercitation magna est anim commodo deserunt ea. Minim laboris adipisicing laboris in cillum culpa magna ea esse enim veniam. Non enim velit qui veniam commodo do incididunt. Aliqua quis reprehenderit consequat tempor ut excepteur fugiat ad tempor sit est ad est.\r\nUllamco quis et ea ex est deserunt ut. Adipisicing quis commodo laboris pariatur exercitation sit mollit labore. Dolore ut ad do magna incididunt ut adipisicing dolor eu eiusmod irure consectetur ipsum. Exercitation magna incididunt exercitation eiusmod. Esse veniam mollit Lorem qui eu officia aute.\r\n", + "address": "3 Hart Street", + "city": "Vandiver", + "state": "West Virginia", + "zip": 46407, + "country": "Saint Lucia", + "email": "moranbradshaw@scentric.com", + "phone": "(807) 537-3271", + "color": "rgb(54,143,210)" + }, + { + "index": 364, + "name": "Kirk Richard", + "first": "Delia", + "last": "Cervantes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iamlechev/73.jpg", + "boolean": false, + "guid": "42e322d1-8045-429a-8eeb-8c62ba84d618", + "integer": 75, + "date": "Sat Nov 22 2003 15:26:15 GMT-0800 (PST)", + "shortText": "eu in consequat qui", + "mediumText": "Ullamco elit eu id excepteur incididunt Lorem ipsum pariatur laboris incididunt Lorem ullamco. Veniam consequat id sunt commodo fugiat magna velit laborum do Lorem enim in sunt. In non non magna deserunt duis nisi exercitation cupidatat eiusmod fugiat ea ex do in. Reprehenderit non consequat sit nostrud.", + "longText": "Dolor excepteur exercitation et ullamco. Non nulla duis qui cillum aliqua nostrud elit sunt dolor. Ex excepteur voluptate do minim non ea sint Lorem incididunt laborum sint. Officia elit labore reprehenderit proident. Laborum eiusmod occaecat eu nulla nisi voluptate. Dolor id in ullamco laborum ut ea est laborum adipisicing tempor et. Incididunt laborum consequat quis anim proident irure amet do.\r\n", + "address": "3 Amboy Street", + "city": "Tuttle", + "state": "Mississippi", + "zip": 27056, + "country": "Equatorial Guinea", + "email": "deliacervantes@scentric.com", + "phone": "(829) 471-3065", + "color": "rgb(94,71,106)" + }, + { + "index": 365, + "name": "Tate Mcdowell", + "first": "Adrian", + "last": "Mccullough", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/elliotpopel/73.jpg", + "boolean": false, + "guid": "9e89b9c6-cf38-4f45-99ed-c7f3f5623d7c", + "integer": 86, + "date": "Sat Jul 23 1977 13:14:21 GMT-0700 (PDT)", + "shortText": "exercitation", + "mediumText": "In non excepteur est ex sunt laborum commodo esse ex. Elit officia laborum incididunt tempor consectetur ea incididunt duis aliqua culpa quis occaecat minim.", + "longText": "Aliquip nisi elit commodo quis exercitation aliquip et do magna quis aute excepteur tempor dolor. Laborum deserunt ullamco aute velit fugiat non labore aliquip. Non exercitation aliqua sunt eiusmod laborum occaecat cupidatat amet commodo enim occaecat amet. Duis laboris labore enim dolor nisi deserunt id cupidatat id. Deserunt esse Lorem minim proident laboris fugiat irure laborum consectetur cillum laborum proident ex. Nulla est excepteur nostrud eiusmod consectetur dolor magna nostrud elit dolore.\r\nElit magna do occaecat in ea elit reprehenderit cupidatat excepteur labore consequat est minim enim. Laborum culpa id commodo esse elit nulla. Irure nulla aliquip adipisicing deserunt nisi ut duis sint. Duis culpa id ex duis incididunt irure nostrud excepteur.\r\nDolor cillum nisi eiusmod ea Lorem sint. Aute duis proident aute in aliquip. Nostrud ut cupidatat ex sit pariatur tempor duis consequat quis quis mollit. Ullamco nostrud id consequat ut. Nostrud officia officia nostrud anim occaecat culpa laborum nostrud fugiat cupidatat irure ex aliqua tempor. Eiusmod pariatur adipisicing reprehenderit exercitation minim Lorem commodo deserunt velit dolor esse elit dolore. Mollit dolore ipsum eu do excepteur nulla magna ea aliquip ut velit aliquip exercitation.\r\nDuis dolor magna voluptate irure enim eu mollit commodo enim commodo nostrud. Laborum magna culpa aliqua aliquip consequat consequat incididunt sunt proident ex eu adipisicing. Sunt esse non exercitation excepteur quis quis fugiat. Qui anim sint nisi proident non quis cillum magna. Ipsum amet veniam anim esse sint et occaecat occaecat in.\r\nAdipisicing ad mollit consequat ut quis eiusmod exercitation quis elit veniam do. Lorem excepteur occaecat labore ex deserunt cupidatat irure officia dolor sunt adipisicing elit officia. Laboris labore aliqua aliqua dolore Lorem laboris ipsum in. Irure ut mollit adipisicing incididunt magna.\r\n", + "address": "2 Bedell Lane", + "city": "Chilton", + "state": "Rhode Island", + "zip": 97237, + "country": "Tanzania", + "email": "adrianmccullough@scentric.com", + "phone": "(810) 599-3339", + "color": "rgb(178,126,71)" + }, + { + "index": 366, + "name": "Terry Romero", + "first": "Barrett", + "last": "Burgess", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/diesellaws/73.jpg", + "boolean": true, + "guid": "f92c32bc-6e74-46d1-85b4-49fefcf41773", + "integer": 59, + "date": "Thu Mar 25 2004 20:56:10 GMT-0800 (PST)", + "shortText": "amet ex aliqua dolor", + "mediumText": "Ullamco mollit in excepteur et sit do ad nulla in ex. Deserunt dolore elit velit est cillum irure non dolor consectetur pariatur adipisicing aute qui officia. Quis minim cillum ex reprehenderit Lorem eu non consequat dolor nisi consequat qui. Ex do eu ad velit ad do ut dolor aliquip id. Aliqua ullamco elit cupidatat laborum laborum ut velit quis aliquip.", + "longText": "In duis aute elit nostrud sint ut veniam. Aute sunt tempor laborum et consectetur. Incididunt qui excepteur dolor proident in et aliqua anim nisi magna incididunt duis fugiat. Irure amet laboris excepteur consequat dolore est magna. Eu velit dolore velit eiusmod id mollit esse dolore ullamco enim aute reprehenderit commodo occaecat. Ea quis cillum cillum ea consequat dolor non ea aute ipsum.\r\nDolore qui consectetur Lorem deserunt cupidatat pariatur est magna consectetur veniam. Pariatur ullamco nostrud commodo cillum fugiat cillum id ipsum ad. Occaecat laboris irure est nostrud proident ipsum aliqua cillum fugiat nulla enim.\r\n", + "address": "2 Whitney Avenue", + "city": "Weeksville", + "state": "Georgia", + "zip": 31104, + "country": "Slovak Republic", + "email": "barrettburgess@scentric.com", + "phone": "(946) 534-2498", + "color": "rgb(219,133,212)" + }, + { + "index": 367, + "name": "Karen Collins", + "first": "Barton", + "last": "Diaz", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/juanpablob/73.jpg", + "boolean": true, + "guid": "98c26038-07d2-4135-bbd2-9a3f427c12e0", + "integer": 8, + "date": "Sat Sep 17 2005 00:39:48 GMT-0700 (PDT)", + "shortText": "aute aute nulla Lorem", + "mediumText": "Aliqua aliquip adipisicing veniam aliqua magna adipisicing dolor officia nisi nulla non voluptate ut.", + "longText": "Qui aliqua culpa sunt ea eu ipsum velit reprehenderit. Do eu veniam ad velit proident ea ea ut cupidatat elit sunt. Nisi cillum est tempor anim veniam. Sit nostrud exercitation veniam minim magna. Esse veniam amet est cillum dolore magna sunt ea minim aliqua incididunt reprehenderit est. Nulla pariatur consectetur officia aliqua veniam irure labore minim dolor amet cupidatat anim sint.\r\nCulpa id amet esse officia. Officia esse ex cillum velit. Cupidatat in in adipisicing exercitation deserunt. Amet id adipisicing ipsum deserunt.\r\n", + "address": "4 Garland Court", + "city": "Martinez", + "state": "New Mexico", + "zip": 87856, + "country": "Iraq", + "email": "bartondiaz@scentric.com", + "phone": "(915) 446-2455", + "color": "rgb(198,214,168)" + }, + { + "index": 368, + "name": "Carly Kirkland", + "first": "Malone", + "last": "West", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/whale/73.jpg", + "boolean": true, + "guid": "a0fe6dd2-da36-4fe8-9172-64d79b76016a", + "integer": 40, + "date": "Thu Sep 03 2009 05:16:20 GMT-0700 (PDT)", + "shortText": "dolor culpa", + "mediumText": "Incididunt nulla est do proident qui culpa ea non eu et velit.", + "longText": "Quis non exercitation in cupidatat ad. Irure pariatur anim magna est elit excepteur nulla elit est quis nisi tempor quis. Sint irure consectetur consequat nostrud. Excepteur officia eiusmod reprehenderit sit irure aliqua id minim esse consectetur dolore.\r\nIncididunt incididunt sint magna excepteur quis reprehenderit qui pariatur dolore magna est. Pariatur exercitation minim et culpa consequat eiusmod cillum nostrud Lorem cupidatat. Amet labore amet laborum qui qui id laborum. Officia magna ipsum proident mollit deserunt sit veniam nostrud reprehenderit do laborum voluptate. Excepteur laboris excepteur pariatur proident pariatur minim dolor. Fugiat veniam nostrud ut non duis fugiat ex culpa. Velit enim culpa voluptate culpa reprehenderit officia irure velit ad qui veniam non exercitation.\r\nLaborum fugiat ea ex sint. Veniam labore duis non sunt ad reprehenderit voluptate irure voluptate commodo elit non. Eiusmod labore elit magna irure dolor aliquip.\r\nDolore qui occaecat magna ex amet irure officia adipisicing consequat Lorem proident reprehenderit sint. Laboris esse eiusmod quis ex sunt dolor ipsum sunt Lorem labore laborum id eu. Quis dolore qui quis exercitation minim nostrud do aliquip qui deserunt commodo aute fugiat aliqua. Pariatur proident eiusmod pariatur sit esse eiusmod aliquip fugiat exercitation culpa duis eiusmod. Mollit pariatur commodo ex qui et incididunt.\r\n", + "address": "2 Livonia Avenue", + "city": "Bartley", + "state": "Arizona", + "zip": 65737, + "country": "Congo", + "email": "malonewest@scentric.com", + "phone": "(884) 560-3387", + "color": "rgb(203,128,144)" + }, + { + "index": 369, + "name": "Cline Porter", + "first": "Villarreal", + "last": "Berg", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kalmerrautam/73.jpg", + "boolean": true, + "guid": "bc0ae406-a0b0-46b8-a78c-e814bf6e352a", + "integer": 34, + "date": "Sat Dec 17 2011 17:11:11 GMT-0800 (PST)", + "shortText": "aliquip", + "mediumText": "Sit eu exercitation deserunt fugiat sunt. Duis amet Lorem sint fugiat aliquip sint nisi nulla officia. Mollit magna esse magna mollit ex aliquip sit voluptate occaecat. Sint ea reprehenderit pariatur ut proident consequat tempor do irure.", + "longText": "Sunt sunt culpa enim anim reprehenderit minim occaecat officia est exercitation exercitation. Magna irure consequat aliquip nisi sint. Ad excepteur et exercitation consectetur. Nulla magna pariatur commodo velit consectetur elit sunt voluptate laborum eiusmod sint cupidatat proident ex.\r\nConsectetur minim aute in eu tempor enim laboris deserunt. Proident laboris fugiat cupidatat ullamco ex. Laboris et eu qui tempor nisi non anim magna sunt est commodo qui et. In sint eu quis ea. Adipisicing ad nisi non mollit officia elit. Reprehenderit veniam aute consequat qui aliqua incididunt.\r\n", + "address": "4 Willmohr Street", + "city": "Russellville", + "state": "Texas", + "zip": 61324, + "country": "Cocos (Keeling Islands)", + "email": "villarrealberg@scentric.com", + "phone": "(934) 457-2444", + "color": "rgb(128,225,98)" + }, + { + "index": 370, + "name": "Davidson Parker", + "first": "George", + "last": "Pittman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nicoleglynn/73.jpg", + "boolean": true, + "guid": "4d0d0e84-953f-4ab2-819d-ae72aa4552f7", + "integer": 2, + "date": "Sat Jun 23 1979 15:10:33 GMT-0700 (PDT)", + "shortText": "adipisicing Lorem", + "mediumText": "Est ullamco qui est cupidatat magna velit cupidatat do sunt officia ad.", + "longText": "Velit enim nostrud et ut elit nostrud laboris mollit. Pariatur sit sint proident officia ea sunt consectetur occaecat esse velit. Nulla Lorem ad anim ut aute nostrud amet sit labore sint ullamco nisi ad.\r\nEsse proident in magna elit ex esse et consequat incididunt eiusmod officia. Occaecat labore ut aliqua sunt labore minim Lorem ut velit magna occaecat sit sunt. Commodo ut magna cillum minim.\r\nDolor cupidatat et ullamco velit elit labore. Sint dolore incididunt anim nisi aliquip. Ullamco id laboris cillum id enim cillum exercitation non.\r\nLaboris qui Lorem ipsum dolor proident exercitation consectetur commodo incididunt. Ad pariatur cillum et aute. Nulla cillum sint quis laboris fugiat do ullamco incididunt aliqua aliquip eu aute.\r\nLorem irure nisi magna ex do voluptate tempor consequat. Aliquip dolore ullamco laboris reprehenderit Lorem elit. Dolor esse minim veniam eu ex reprehenderit. Sit do irure anim ipsum id duis culpa laboris dolore velit cillum nulla amet dolor. Exercitation enim proident ut aliqua culpa ipsum. Aute ad irure ipsum exercitation fugiat ut. Labore non do incididunt nulla veniam ex exercitation nostrud enim fugiat.\r\n", + "address": "3 Stryker Court", + "city": "Bourg", + "state": "District Of Columbia", + "zip": 63976, + "country": "Saint Kitts and Nevis", + "email": "georgepittman@scentric.com", + "phone": "(812) 518-3391", + "color": "rgb(128,255,152)" + }, + { + "index": 371, + "name": "Ingram Ware", + "first": "Caitlin", + "last": "Hart", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/rickdt/73.jpg", + "boolean": true, + "guid": "b6de624e-cbfa-436a-9fcb-b5d584616793", + "integer": 24, + "date": "Thu Feb 14 1974 18:30:07 GMT-0700 (PDT)", + "shortText": "tempor reprehenderit nulla quis", + "mediumText": "Qui id adipisicing do deserunt laboris anim. Eiusmod magna dolor labore fugiat aute amet commodo ad sit. Esse occaecat labore qui culpa aute pariatur commodo velit laborum enim voluptate. Consequat sunt labore cupidatat ex labore id exercitation ad deserunt quis laboris et dolor.", + "longText": "Et consequat duis excepteur occaecat reprehenderit labore dolor nostrud. Aliqua irure ullamco reprehenderit incididunt dolore aliquip eiusmod. Et et in commodo quis.\r\nFugiat fugiat amet qui deserunt incididunt consequat ex anim culpa Lorem. Magna cillum incididunt ut consectetur esse quis veniam nulla aliqua esse velit consequat ipsum. Veniam ut amet officia tempor aliquip ad ad ad commodo ut et. Ad esse mollit adipisicing adipisicing cillum.\r\nUllamco dolore ullamco adipisicing in duis enim eiusmod sit. Proident nisi nostrud ea ipsum. Aliquip officia est ut Lorem ad incididunt qui tempor aliquip aute non esse. Id culpa ipsum proident duis eu sint elit eiusmod esse quis veniam nulla mollit. Elit mollit pariatur occaecat sunt duis et ipsum quis pariatur consequat ad culpa deserunt ex.\r\n", + "address": "2 Elliott Place", + "city": "Moscow", + "state": "Virgin Islands", + "zip": 16190, + "country": "Spain", + "email": "caitlinhart@scentric.com", + "phone": "(802) 458-3217", + "color": "rgb(245,222,100)" + }, + { + "index": 372, + "name": "Rodriguez Herring", + "first": "Blevins", + "last": "Richards", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/funwatercat/73.jpg", + "boolean": false, + "guid": "16027d94-5563-418b-b92e-879c2bfe66a2", + "integer": 27, + "date": "Thu Aug 04 1977 16:52:59 GMT-0700 (PDT)", + "shortText": "ea incididunt commodo", + "mediumText": "Fugiat culpa duis velit ullamco cupidatat esse pariatur deserunt laborum. Irure nostrud nulla culpa cupidatat est quis sunt veniam culpa. Aliqua anim mollit nulla aliquip quis dolore irure aliquip non est.", + "longText": "Anim laborum aliquip et culpa mollit eiusmod laboris. Consectetur tempor deserunt ullamco cillum elit sunt esse ut ullamco do aliquip. Irure pariatur occaecat id deserunt fugiat irure Lorem tempor excepteur ut dolor cupidatat reprehenderit adipisicing.\r\nIpsum sit ipsum aute ex sint magna commodo in anim enim consequat occaecat nisi. Qui do pariatur do ea. Consequat cupidatat sit aute fugiat qui laboris culpa elit irure excepteur. Duis ea elit et aliqua qui ipsum commodo proident adipisicing duis tempor. Duis ad nulla dolore minim anim dolore aute amet tempor.\r\nExercitation pariatur mollit cupidatat adipisicing deserunt pariatur incididunt. Sit deserunt consequat nisi do irure et duis quis. Cupidatat ea et ut velit ullamco ad dolore fugiat voluptate cillum.\r\nDolore ipsum anim nisi voluptate id ad non do dolor cupidatat duis dolor in. Excepteur esse aliquip ex dolor aute adipisicing duis dolore. Mollit amet deserunt occaecat qui cupidatat do et ea reprehenderit qui.\r\n", + "address": "2 Mill Street", + "city": "Sunriver", + "state": "Puerto Rico", + "zip": 60210, + "country": "Guinea-Bissau", + "email": "blevinsrichards@scentric.com", + "phone": "(880) 569-2358", + "color": "rgb(141,69,176)" + }, + { + "index": 373, + "name": "Larsen Petersen", + "first": "Kayla", + "last": "Wolf", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ssiskind/73.jpg", + "boolean": false, + "guid": "a7e99e07-e0c7-499a-a66b-a5b931143a55", + "integer": 25, + "date": "Fri Nov 24 1995 21:45:58 GMT-0800 (PST)", + "shortText": "elit exercitation", + "mediumText": "Minim in laboris culpa cupidatat ea nostrud sunt id dolore officia ea ipsum sit.", + "longText": "Id amet fugiat voluptate labore ea. Velit fugiat qui magna cillum ullamco duis eu qui pariatur. Do laboris irure nulla id. Minim enim commodo non ut sint. Consequat ut in consequat laborum pariatur commodo consectetur irure.\r\nDolor in aute mollit anim. Laboris incididunt occaecat ipsum Lorem velit nisi anim sunt consectetur. Occaecat aliquip ex irure adipisicing. Culpa elit dolore deserunt nisi. Laboris quis nulla in incididunt culpa proident culpa Lorem ea. Incididunt eiusmod culpa Lorem in cillum amet eu aute qui anim et qui sunt et.\r\nAmet veniam adipisicing minim minim proident sit commodo reprehenderit. Duis consequat do ex mollit minim consectetur. Nulla cillum enim esse sit commodo ad cupidatat ipsum veniam aliquip sunt. Ut dolore ullamco velit est minim laboris incididunt consequat.\r\nVoluptate excepteur Lorem ut id minim incididunt quis proident cupidatat consequat sunt magna dolor. Nostrud aliqua laborum exercitation dolor Lorem. Magna adipisicing cupidatat anim reprehenderit mollit aliquip esse nisi magna est. Laboris mollit consectetur ut tempor minim excepteur fugiat do consectetur tempor. Enim fugiat tempor labore occaecat elit est minim. Enim ex quis pariatur est eiusmod.\r\nDo velit nisi enim adipisicing qui consectetur reprehenderit aute occaecat exercitation consectetur. Cupidatat proident aute sit aliqua cupidatat velit adipisicing occaecat eu sint et proident ad quis. Qui laboris dolore id proident mollit labore aliqua sint aliquip. Minim reprehenderit consequat est voluptate proident irure aliqua reprehenderit do nisi. Nulla culpa culpa eu ea laborum minim ad culpa Lorem enim. Aliqua officia ut id et laboris quis eiusmod ex consequat aliquip voluptate.\r\n", + "address": "4 Sunnyside Avenue", + "city": "Jacksonwald", + "state": "Maryland", + "zip": 86841, + "country": "Cameroon", + "email": "kaylawolf@scentric.com", + "phone": "(905) 565-3468", + "color": "rgb(60,235,69)" + }, + { + "index": 374, + "name": "Holt Oconnor", + "first": "Newman", + "last": "Skinner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/the_purplebunny/73.jpg", + "boolean": true, + "guid": "b20aa0b1-320a-4487-8af0-78e7cbf30443", + "integer": 29, + "date": "Sun Apr 26 1981 19:50:41 GMT-0700 (PDT)", + "shortText": "non duis elit", + "mediumText": "Esse fugiat ut incididunt fugiat minim enim sit. Aliquip amet incididunt enim quis culpa et ut incididunt eu officia mollit adipisicing ex. Tempor velit magna deserunt voluptate occaecat id laborum occaecat labore id dolore.", + "longText": "Ut deserunt ut minim consequat. Non aute commodo minim proident ex ex id. Consectetur sunt reprehenderit consectetur Lorem eu sit ut reprehenderit aliqua eu occaecat.\r\nEiusmod occaecat dolor mollit adipisicing aute enim do. Aliqua ut sit tempor velit sunt. Minim eiusmod qui aute ea quis dolor et dolor excepteur qui sit eu incididunt qui. Ex id incididunt nisi sint dolore laboris reprehenderit officia velit.\r\nCupidatat dolor nostrud reprehenderit irure aliquip minim minim voluptate in Lorem labore eiusmod proident minim. Commodo reprehenderit eu velit magna fugiat ad cillum in deserunt elit tempor est commodo. Pariatur aliqua dolore proident cillum ex laboris culpa proident irure velit reprehenderit. Irure sit ad ipsum mollit ex. Reprehenderit nulla sit adipisicing excepteur dolore magna ullamco quis laborum minim enim ut.\r\nEnim sit Lorem nulla adipisicing ipsum cillum pariatur cillum aute culpa proident non Lorem dolor. Ea cupidatat anim labore duis nisi et ex id proident tempor. Qui sunt est aliqua in non do ea fugiat. Aute aliqua consectetur sunt culpa nisi sunt. Ipsum nulla quis ad ut elit proident ad culpa deserunt enim elit ea. Ea sint ea ipsum velit esse labore labore est ex aliquip nulla fugiat id dolor. Officia sunt ipsum est officia laborum in ea eiusmod irure laborum ea id magna non.\r\nAliquip nostrud nisi dolor aliquip commodo. Enim ex labore velit anim nisi consectetur excepteur labore reprehenderit. Lorem exercitation ut cillum et magna commodo labore esse nostrud duis Lorem. Cillum incididunt deserunt eu in cupidatat. Veniam cillum culpa voluptate irure cillum sit veniam elit velit labore. Dolore voluptate commodo labore nisi anim esse veniam deserunt sint anim amet velit.\r\n", + "address": "2 Neptune Avenue", + "city": "Croom", + "state": "Massachusetts", + "zip": 45897, + "country": "Niger", + "email": "newmanskinner@scentric.com", + "phone": "(895) 579-2625", + "color": "rgb(213,132,55)" + }, + { + "index": 375, + "name": "Ray Mcdonald", + "first": "Gladys", + "last": "Hamilton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/linkthief/73.jpg", + "boolean": true, + "guid": "129213d5-185b-462e-9d98-ec5d7ebbf584", + "integer": 29, + "date": "Fri Oct 24 2008 13:24:33 GMT-0700 (PDT)", + "shortText": "sit in", + "mediumText": "Sit ut sit ut ullamco pariatur.", + "longText": "Nulla veniam officia ipsum cupidatat est sit deserunt officia eiusmod. Ut aliquip mollit sint qui do laborum esse id. Cillum mollit Lorem laboris deserunt quis reprehenderit do deserunt excepteur ullamco cillum. Qui sit consequat velit ipsum elit non officia laborum eiusmod ad aliquip velit. Minim consectetur reprehenderit nisi irure ullamco occaecat ipsum.\r\nEu fugiat do in ad dolore reprehenderit aute ullamco sit non. Incididunt qui esse fugiat nisi excepteur eiusmod mollit non deserunt qui sunt do. Velit deserunt ex culpa sunt ipsum elit veniam aute. Dolor occaecat officia eiusmod sint sint non aute consectetur quis ea.\r\n", + "address": "4 Lacon Court", + "city": "Iberia", + "state": "Oklahoma", + "zip": 71131, + "country": "Malta", + "email": "gladyshamilton@scentric.com", + "phone": "(966) 483-3351", + "color": "rgb(155,104,148)" + }, + { + "index": 376, + "name": "Clay Langley", + "first": "Burris", + "last": "Randall", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ffbel/73.jpg", + "boolean": true, + "guid": "51f80793-c017-41ad-9079-d752d4d47d9e", + "integer": 53, + "date": "Mon Jun 07 1982 18:22:42 GMT-0700 (PDT)", + "shortText": "elit", + "mediumText": "Irure in cillum eiusmod do laboris. Magna sit consectetur elit quis dolore quis ea esse. Minim velit adipisicing consequat mollit veniam. Minim eiusmod laboris nisi mollit ea labore commodo ipsum et ullamco duis.", + "longText": "Sit est fugiat sit nostrud laboris veniam aliqua enim aliqua eu ex cillum. Incididunt occaecat minim consectetur duis eiusmod. Pariatur laborum nostrud dolore minim excepteur sunt pariatur aute. Do anim quis ad enim est sint minim dolore laboris in fugiat cupidatat mollit pariatur. Ipsum est dolor aliqua aute. Sunt proident duis pariatur qui veniam sunt. Ea anim consequat nostrud reprehenderit ea ad non.\r\n", + "address": "4 McClancy Place", + "city": "Nash", + "state": "Ohio", + "zip": 18742, + "country": "Antigua and Barbuda", + "email": "burrisrandall@scentric.com", + "phone": "(844) 495-2795", + "color": "rgb(161,56,157)" + }, + { + "index": 377, + "name": "Whitaker Duffy", + "first": "Consuelo", + "last": "Vaughn", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/labibjaffar/73.jpg", + "boolean": false, + "guid": "d79e9e47-4d77-47c0-9b13-a19147d76339", + "integer": 69, + "date": "Tue Apr 18 1989 16:24:01 GMT-0700 (PDT)", + "shortText": "adipisicing", + "mediumText": "Cillum mollit amet fugiat aliquip proident. Cillum veniam ut do anim eiusmod officia laborum enim voluptate commodo.", + "longText": "Aliquip labore non amet cillum ipsum ex non commodo enim eiusmod ea. Est non do nulla laborum minim nostrud esse exercitation fugiat eiusmod. Aliquip labore dolor ad duis velit nisi exercitation fugiat proident cupidatat Lorem elit ullamco dolore. Cupidatat enim sunt id veniam exercitation voluptate consectetur pariatur. Irure labore tempor sint adipisicing nisi anim. Proident officia minim amet sunt enim in officia dolor voluptate ea magna ullamco.\r\n", + "address": "4 Senator Street", + "city": "Emerald", + "state": "Nevada", + "zip": 95049, + "country": "Kazakhstan", + "email": "consuelovaughn@scentric.com", + "phone": "(820) 453-3820", + "color": "rgb(211,124,127)" + }, + { + "index": 378, + "name": "Millicent Brewer", + "first": "Carpenter", + "last": "French", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tnrzdmr/73.jpg", + "boolean": true, + "guid": "fc81e8c8-56bf-4cc7-9a99-bc5e5336cc44", + "integer": 10, + "date": "Mon Dec 20 2004 03:29:39 GMT-0800 (PST)", + "shortText": "cillum elit dolore id", + "mediumText": "Consectetur laboris velit culpa nisi est nostrud ea laboris et. Voluptate incididunt qui cillum velit occaecat nisi deserunt. Ut nisi do veniam sunt deserunt adipisicing nostrud nostrud eu nulla consectetur amet elit.", + "longText": "Enim aliquip ipsum voluptate ut adipisicing anim dolor. Est est nisi est ex fugiat labore aute proident nisi amet deserunt anim nisi dolore. Eiusmod elit Lorem et officia cillum in proident cillum sint do. Laboris dolore ad cupidatat anim et eu.\r\nIn aute eiusmod esse commodo officia culpa Lorem quis laboris. Ipsum pariatur pariatur dolore amet ipsum amet ex laboris laboris. Magna elit sunt Lorem magna ea laborum non voluptate eu velit irure id excepteur. Adipisicing non pariatur culpa sit tempor ea anim officia aute. Magna eu cupidatat sint nostrud veniam sunt irure non. Lorem mollit eiusmod ea magna qui consectetur quis aliqua nulla nulla. Ipsum deserunt cupidatat irure fugiat et commodo ut.\r\nVelit anim eiusmod Lorem incididunt id deserunt mollit voluptate. Commodo id excepteur id occaecat sit. Qui amet proident ipsum est aute culpa et mollit et nulla occaecat minim minim. Magna ut enim exercitation laborum deserunt occaecat enim sunt veniam aliquip exercitation elit et. Nulla enim tempor fugiat eiusmod qui laborum ad est minim incididunt reprehenderit voluptate ad reprehenderit. Officia exercitation reprehenderit aliquip in id Lorem laboris laboris ipsum laborum minim ullamco eiusmod.\r\nConsectetur consequat irure consectetur reprehenderit aliqua quis ea fugiat ullamco reprehenderit. Fugiat fugiat elit voluptate in aliqua qui excepteur duis ipsum veniam occaecat eu sint amet. Aliquip deserunt ea ipsum ea pariatur in magna dolore voluptate.\r\nEnim eiusmod laboris officia exercitation irure laboris sit adipisicing non tempor nostrud officia. Quis ut esse deserunt qui laborum do velit eu amet dolore. Consequat adipisicing nulla officia ipsum veniam eiusmod. Occaecat deserunt veniam tempor sint labore nisi irure. Ullamco ad eu pariatur commodo aute ea cupidatat et consequat do commodo tempor. Adipisicing eiusmod culpa nostrud commodo adipisicing irure dolore aliquip labore. Ullamco commodo mollit consequat incididunt ut in officia occaecat voluptate.\r\n", + "address": "3 Drew Street", + "city": "Enetai", + "state": "Montana", + "zip": 76072, + "country": "Bahrain", + "email": "carpenterfrench@scentric.com", + "phone": "(981) 464-3639", + "color": "rgb(116,120,98)" + }, + { + "index": 379, + "name": "Blanchard Solis", + "first": "Kristie", + "last": "Cabrera", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/jeremyjantz/73.jpg", + "boolean": false, + "guid": "c2c84ffa-4a75-48e1-998f-924681ab4240", + "integer": 1, + "date": "Sat Jul 09 1988 08:58:08 GMT-0700 (PDT)", + "shortText": "excepteur velit quis dolore amet", + "mediumText": "Culpa magna fugiat est consequat deserunt elit eiusmod ullamco. Non esse consectetur id amet excepteur magna culpa mollit ea veniam elit.", + "longText": "Nulla et laboris qui aute commodo sunt enim occaecat ad eu. Enim eu consequat in id irure minim. Id pariatur commodo duis ea aute deserunt. Cillum consequat ea nostrud cillum proident.\r\n", + "address": "3 Aitken Place", + "city": "Germanton", + "state": "California", + "zip": 10214, + "country": "India", + "email": "kristiecabrera@scentric.com", + "phone": "(870) 486-2499", + "color": "rgb(60,117,146)" + }, + { + "index": 380, + "name": "Armstrong Leon", + "first": "Wolfe", + "last": "Hansen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ibrahemaq/73.jpg", + "boolean": true, + "guid": "ae0fcdb0-49fc-4ff8-85f2-7414f67b99f6", + "integer": 60, + "date": "Fri Feb 27 1970 07:01:10 GMT-0800 (PST)", + "shortText": "velit", + "mediumText": "Laboris adipisicing consectetur qui do nostrud occaecat in consectetur sit. Esse nisi commodo voluptate magna eu nisi fugiat amet nostrud.", + "longText": "Sunt ut labore sint sint labore dolor ullamco cupidatat velit tempor ea cillum. Veniam sit ex dolor sint irure ut. Nulla culpa ullamco ut ullamco tempor consectetur pariatur adipisicing reprehenderit laborum nostrud sint.\r\nEnim nisi aliquip pariatur non laboris ea. Aute aute pariatur commodo tempor sint pariatur quis ad ea pariatur Lorem cupidatat aute consectetur. Laboris ad laboris in cillum proident nostrud mollit consectetur irure nisi magna. Dolor nisi amet anim esse voluptate ipsum minim officia ut ex laboris cillum sunt elit. Tempor quis ex ullamco pariatur officia. Ad excepteur enim ea laborum id officia aliquip cillum est. Do ut labore aliquip dolor sit commodo.\r\nMinim excepteur esse esse enim proident eiusmod reprehenderit proident qui amet. Lorem culpa proident reprehenderit officia tempor magna sunt deserunt qui velit voluptate sunt. Ad ex nulla dolore duis veniam exercitation enim dolore excepteur consequat laborum officia ea fugiat. Et proident eiusmod incididunt quis do fugiat consectetur consectetur esse culpa magna magna.\r\nIn excepteur eu esse duis et excepteur. Qui incididunt eu dolore tempor pariatur occaecat. Dolor ex voluptate ut incididunt est mollit mollit aliqua Lorem sunt est irure ullamco in. Id culpa amet voluptate do aliquip laborum sit duis anim occaecat ea adipisicing do.\r\n", + "address": "4 Kent Street", + "city": "Carlton", + "state": "Marshall Islands", + "zip": 34631, + "country": "Qatar", + "email": "wolfehansen@scentric.com", + "phone": "(834) 587-3684", + "color": "rgb(135,161,252)" + }, + { + "index": 381, + "name": "Kerry Emerson", + "first": "Hurst", + "last": "Gilliam", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/croakx/73.jpg", + "boolean": false, + "guid": "454852cf-301c-42cc-88a5-fef2dce8ac2d", + "integer": 54, + "date": "Mon Jan 15 1990 07:32:08 GMT-0800 (PST)", + "shortText": "amet ullamco", + "mediumText": "Sunt tempor irure nulla do esse aliqua. Velit fugiat incididunt aliqua voluptate nisi qui ut.", + "longText": "Do labore aute veniam voluptate reprehenderit Lorem cupidatat excepteur est cupidatat adipisicing irure. Veniam consectetur fugiat esse et. Excepteur magna dolore duis ea occaecat. Voluptate occaecat id occaecat velit nostrud.\r\nFugiat sint eiusmod reprehenderit magna consequat esse. Dolor sint officia aliquip occaecat occaecat qui ipsum magna cupidatat excepteur ad et est laborum. Ut consectetur ex proident elit.\r\nAdipisicing incididunt excepteur ea labore proident proident et id in reprehenderit ut occaecat et. Et aliquip incididunt enim ea enim ea minim ut eiusmod. Velit mollit sunt voluptate laboris aliquip incididunt. Duis laborum do adipisicing non tempor nisi minim do aliquip laboris irure tempor ad dolore. Aliqua amet adipisicing eu Lorem esse fugiat fugiat velit.\r\nSunt irure ex reprehenderit nostrud minim magna. Commodo nostrud mollit pariatur reprehenderit consequat occaecat aliqua. Reprehenderit id non magna nisi amet sunt incididunt deserunt dolor quis cupidatat adipisicing voluptate sunt. Tempor proident magna amet culpa est est. Mollit sint eiusmod reprehenderit est. Lorem do culpa ut enim quis enim cillum elit ullamco deserunt fugiat commodo dolor.\r\n", + "address": "3 Vandam Street", + "city": "Carlos", + "state": "Indiana", + "zip": 18552, + "country": "Vatican City State (Holy See)", + "email": "hurstgilliam@scentric.com", + "phone": "(883) 509-3820", + "color": "rgb(92,147,218)" + }, + { + "index": 382, + "name": "Rosanna Mercer", + "first": "Jeannie", + "last": "Harrington", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_dukex/73.jpg", + "boolean": true, + "guid": "81b02f40-06df-4e1f-bb59-400a488d75c1", + "integer": 9, + "date": "Thu Apr 29 1982 09:20:09 GMT-0700 (PDT)", + "shortText": "velit exercitation laborum excepteur nulla", + "mediumText": "Lorem minim consequat sunt eu commodo. Irure occaecat do irure ex dolore. Dolore consequat occaecat aliqua aliqua do incididunt consectetur in et eiusmod. Laboris incididunt esse magna aliquip excepteur sint quis ipsum consectetur aute labore. Et non consequat reprehenderit ipsum incididunt nisi do.", + "longText": "Dolor esse nostrud in culpa. Elit cillum cupidatat cillum aute nulla labore sint aliquip enim exercitation. Nulla do tempor labore sit adipisicing. Ex sint deserunt in pariatur veniam. Ea do do aliqua cillum id mollit duis elit aute eiusmod pariatur cupidatat duis anim.\r\nCulpa officia ea amet non non nulla occaecat quis ut Lorem eiusmod velit ad ut. Ex deserunt ut pariatur excepteur fugiat dolor ex aute elit officia amet consectetur consectetur excepteur. Dolor culpa pariatur proident anim reprehenderit velit laboris velit aliquip.\r\nSit velit amet laboris incididunt qui excepteur irure excepteur. Nulla adipisicing pariatur enim nisi. Dolore ea veniam adipisicing mollit eiusmod. Eu sit ea in consequat proident ex magna veniam pariatur quis aute aliquip sint. Ullamco irure nisi anim tempor.\r\n", + "address": "3 Brooklyn Road", + "city": "Northchase", + "state": "Tennessee", + "zip": 58954, + "country": "Malaysia", + "email": "jeannieharrington@scentric.com", + "phone": "(869) 440-3471", + "color": "rgb(54,179,184)" + }, + { + "index": 383, + "name": "Hudson Gill", + "first": "Erma", + "last": "Medina", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gregsqueeb/73.jpg", + "boolean": true, + "guid": "5cc52dab-f9b6-4d23-9718-12faaca42aaa", + "integer": 29, + "date": "Fri Nov 07 1975 23:03:48 GMT-0800 (PST)", + "shortText": "elit consequat", + "mediumText": "Exercitation aliqua fugiat Lorem fugiat amet est elit. Incididunt voluptate sunt sint ut veniam. Non velit deserunt duis est excepteur consectetur excepteur commodo non ex consequat. Non et ullamco ipsum eiusmod.", + "longText": "Sint ea duis commodo sunt elit ut nulla. Tempor consectetur id aliqua voluptate. Anim sint occaecat nisi eu commodo nisi magna deserunt commodo fugiat quis aliqua.\r\nEiusmod aliquip incididunt dolore elit et fugiat in ex. Qui cupidatat duis tempor amet aute. Nulla et cillum culpa irure consequat sit exercitation ex quis ex. Qui sit ipsum non laboris esse cupidatat eu excepteur. Incididunt tempor sit in fugiat tempor excepteur culpa veniam in incididunt reprehenderit. Ad quis enim cillum quis anim.\r\n", + "address": "2 Decatur Street", + "city": "Hardyville", + "state": "Palau", + "zip": 41443, + "country": "Belize", + "email": "ermamedina@scentric.com", + "phone": "(806) 595-3481", + "color": "rgb(144,140,116)" + }, + { + "index": 384, + "name": "Dominique Valenzuela", + "first": "Stacey", + "last": "Foreman", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/csmnng/73.jpg", + "boolean": true, + "guid": "11147a9a-0058-436d-96c3-f7ae0639677c", + "integer": 82, + "date": "Sat Jul 25 1992 11:14:15 GMT-0700 (PDT)", + "shortText": "excepteur", + "mediumText": "Enim aliqua aute nostrud ad veniam eiusmod Lorem occaecat sit magna aliqua. Ad ut ipsum dolore pariatur officia sunt tempor velit minim ea consequat commodo deserunt cupidatat. Aliqua ad nostrud aliqua officia mollit ut dolor aliqua est mollit elit ad in veniam. Dolor et nostrud elit ea proident dolore excepteur sit adipisicing cillum enim. Reprehenderit mollit do adipisicing excepteur ullamco exercitation culpa ipsum in eu aliqua.", + "longText": "Reprehenderit ullamco esse aute et laborum pariatur consectetur tempor. Consequat eiusmod fugiat commodo incididunt laborum. Et eiusmod cupidatat incididunt dolor cupidatat sint in nisi anim duis sit labore ex occaecat. Excepteur ipsum officia ut qui ad tempor eu ad cillum commodo.\r\nMagna quis nisi nostrud sint et eiusmod laborum laborum ut. In labore labore veniam anim labore laboris reprehenderit aliquip voluptate aute ullamco duis. Aute tempor magna elit elit aute adipisicing est consequat enim occaecat culpa.\r\nIn aliqua adipisicing aliquip do consequat ipsum Lorem. Nisi nulla velit mollit deserunt laboris elit magna ullamco sint magna anim ut ullamco. Aliquip commodo qui ipsum tempor amet nostrud sit aliquip qui eiusmod minim deserunt esse. Incididunt adipisicing irure excepteur reprehenderit id officia sit amet reprehenderit reprehenderit nostrud ut. Officia deserunt officia qui magna incididunt non cillum esse cupidatat dolor quis eiusmod. Cillum amet minim dolor ipsum anim officia velit aliqua adipisicing anim mollit. Irure enim laborum ex esse id magna dolore non nulla nisi excepteur ad nulla aute.\r\n", + "address": "3 McDonald Avenue", + "city": "Robbins", + "state": "Virginia", + "zip": 22185, + "country": "Singapore", + "email": "staceyforeman@scentric.com", + "phone": "(829) 412-3655", + "color": "rgb(214,140,189)" + }, + { + "index": 385, + "name": "Dolores Morgan", + "first": "Gaines", + "last": "Mullen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ogmenemre/73.jpg", + "boolean": false, + "guid": "ee76f873-95bb-4f4d-84fd-c7313d26386b", + "integer": 51, + "date": "Mon Feb 22 1999 15:26:58 GMT-0800 (PST)", + "shortText": "officia proident", + "mediumText": "Aliquip proident ad incididunt veniam.", + "longText": "Esse excepteur ex sunt id sit laborum. Ut ea qui esse esse qui aliqua ut ex in. Dolore magna laborum veniam magna non ad eiusmod et eiusmod deserunt tempor occaecat. Eiusmod voluptate ut do non. Deserunt est laborum eu aute deserunt eiusmod amet consectetur elit ullamco laboris elit.\r\nConsectetur aliquip reprehenderit est sunt do est sint ad deserunt dolor est. Pariatur id Lorem nostrud elit proident in nulla anim. Duis sunt veniam fugiat sunt aliquip ea eiusmod consectetur nulla consectetur quis.\r\n", + "address": "4 Village Road", + "city": "Springville", + "state": "Wyoming", + "zip": 48245, + "country": "Trinidad and Tobago", + "email": "gainesmullen@scentric.com", + "phone": "(832) 562-2069", + "color": "rgb(177,196,203)" + }, + { + "index": 386, + "name": "Washington Bates", + "first": "Mccray", + "last": "Davenport", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ionutmaxim/73.jpg", + "boolean": false, + "guid": "97224884-727c-4a89-b596-60fbca7914a7", + "integer": 34, + "date": "Thu Nov 13 1980 22:28:43 GMT-0800 (PST)", + "shortText": "enim nostrud", + "mediumText": "Sunt fugiat esse ad sint sint duis ex tempor enim excepteur ullamco. Dolor ipsum occaecat laborum enim. Nisi ex cillum ex culpa laborum proident esse minim incididunt anim est occaecat deserunt cillum. Excepteur aliqua dolore duis do non adipisicing anim excepteur. Sit aliquip ut nisi aliquip labore do officia proident amet esse deserunt laborum sunt veniam.", + "longText": "Aute magna amet irure mollit ex. Deserunt exercitation irure aute eiusmod aute occaecat mollit reprehenderit sit ea esse esse. Laborum cillum Lorem Lorem officia velit minim cillum reprehenderit tempor velit exercitation deserunt ad velit. Irure nulla aliqua ex cupidatat adipisicing cillum amet ex quis deserunt.\r\nVoluptate amet nisi incididunt eiusmod consequat et laboris consequat est voluptate sunt enim. Adipisicing nostrud pariatur aute commodo minim veniam. Anim mollit velit esse cupidatat aliquip exercitation est id est. Cillum incididunt nulla duis non incididunt dolore ipsum est culpa pariatur duis quis.\r\nAd commodo laborum ex voluptate commodo non fugiat ut. Id labore quis aute eiusmod deserunt cupidatat. Consequat irure eu velit aliqua reprehenderit consequat qui labore magna. Sunt ad ad sit irure laboris enim sint do eiusmod Lorem velit cupidatat labore enim. Exercitation veniam sint nulla excepteur id reprehenderit laboris qui et adipisicing. Anim occaecat duis cupidatat dolore labore id duis ad ipsum do.\r\nCulpa fugiat minim cupidatat nisi occaecat reprehenderit sit. Ipsum laboris incididunt tempor irure adipisicing veniam. Nisi laborum cupidatat anim quis fugiat velit ea ad commodo cupidatat. Aliquip esse eu deserunt sint.\r\n", + "address": "4 Lincoln Avenue", + "city": "Deercroft", + "state": "Colorado", + "zip": 53863, + "country": "Namibia", + "email": "mccraydavenport@scentric.com", + "phone": "(970) 600-2028", + "color": "rgb(55,74,60)" + }, + { + "index": 387, + "name": "Estela Dotson", + "first": "Brewer", + "last": "Barnett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/teylorfeliz/73.jpg", + "boolean": false, + "guid": "ec7da2db-8a36-430c-bb60-68be4ca38e6f", + "integer": 50, + "date": "Tue Sep 10 1985 22:13:34 GMT-0700 (PDT)", + "shortText": "pariatur do deserunt enim velit", + "mediumText": "Nulla consequat incididunt sint do. Mollit dolor veniam sunt nisi ex consectetur eu excepteur officia culpa.", + "longText": "Veniam proident laboris fugiat id. Ex ut consectetur tempor pariatur duis quis veniam eiusmod amet cupidatat amet enim. Est consectetur exercitation deserunt tempor laboris dolor velit dolore consectetur. Amet anim excepteur sunt sunt ut exercitation minim. Cillum velit aliqua enim magna sunt cillum exercitation esse.\r\nFugiat magna eu nulla anim est voluptate pariatur dolore tempor esse. Nostrud adipisicing laborum ea sint sint aliquip deserunt culpa ipsum sunt. Dolor deserunt ex quis duis dolor sint labore. Et tempor eu cillum est aliqua non. Proident dolore irure est labore duis. Cupidatat ullamco magna excepteur et ex adipisicing ullamco consectetur.\r\n", + "address": "4 Batchelder Street", + "city": "Unionville", + "state": "Utah", + "zip": 19511, + "country": "Paraguay", + "email": "brewerbarnett@scentric.com", + "phone": "(824) 468-3108", + "color": "rgb(251,142,227)" + }, + { + "index": 388, + "name": "Griffith Calhoun", + "first": "Elma", + "last": "Delaney", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/linux29/73.jpg", + "boolean": false, + "guid": "bcdb801c-da6b-4e33-8b60-cb63d7391110", + "integer": 26, + "date": "Thu Oct 07 2004 12:09:01 GMT-0700 (PDT)", + "shortText": "incididunt commodo est", + "mediumText": "Ullamco aliqua excepteur nisi veniam dolor veniam excepteur aute est. Sit in reprehenderit laborum non laboris incididunt esse quis veniam ex. In sit laboris enim ex mollit. Esse nisi ipsum sit adipisicing velit excepteur reprehenderit pariatur excepteur aute Lorem consequat. Aliquip culpa dolor commodo consectetur ad aute amet eu tempor velit eiusmod.", + "longText": "Do velit in aliqua id eu occaecat duis ex officia amet. Aliquip consectetur fugiat quis labore. Commodo commodo veniam incididunt aute sit in dolore excepteur eiusmod mollit sint nisi laborum incididunt.\r\n", + "address": "3 Willow Street", + "city": "Craig", + "state": "Idaho", + "zip": 23018, + "country": "Macau", + "email": "elmadelaney@scentric.com", + "phone": "(820) 569-3637", + "color": "rgb(73,159,77)" + }, + { + "index": 389, + "name": "Delgado Brennan", + "first": "Mercedes", + "last": "Livingston", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/S0ufi4n3/73.jpg", + "boolean": true, + "guid": "f39cc1c7-24fe-4b1d-a1ae-3a5b625510ee", + "integer": 14, + "date": "Wed May 28 2008 07:59:57 GMT-0700 (PDT)", + "shortText": "sint", + "mediumText": "Sit et labore aute exercitation cupidatat deserunt proident proident et ad occaecat. Sint occaecat adipisicing qui eiusmod id enim consectetur dolor qui dolore sunt ullamco. Laboris ex ad ad nostrud nisi laborum est sint occaecat elit. Ut ad anim aliquip voluptate aute eiusmod do minim ad do voluptate ullamco in occaecat. Irure deserunt culpa dolor consectetur eu ad magna officia nostrud ea.", + "longText": "Ex id adipisicing non ipsum sint tempor in anim. Fugiat consequat culpa dolor eu non sint quis velit nulla voluptate. Et commodo laborum laboris anim ut fugiat occaecat sunt pariatur. Commodo adipisicing cillum consectetur proident velit deserunt. Dolore veniam aute ipsum minim velit occaecat. Ut aute laborum quis in mollit. Quis labore sit sint elit deserunt nostrud deserunt elit ex cillum.\r\nElit incididunt cillum ad ullamco nisi eu esse nisi ipsum voluptate magna exercitation nisi sit. Adipisicing mollit dolore magna duis. Aliqua non Lorem voluptate nulla ad id excepteur ullamco magna id magna pariatur ea anim. Officia voluptate laborum reprehenderit consequat.\r\nMagna deserunt consequat dolor elit ullamco. Amet labore tempor esse ipsum excepteur officia ut irure reprehenderit dolor fugiat proident culpa. Enim eu eiusmod do ex sit ut aute sit dolore consequat et laboris labore sint. Elit elit laborum exercitation velit consectetur. Aute esse occaecat in nisi sunt veniam sint sit sunt dolor pariatur consectetur.\r\nConsectetur cupidatat amet id mollit dolore occaecat pariatur in ea proident consectetur. Minim eiusmod nulla proident ut pariatur incididunt ullamco mollit nulla occaecat excepteur fugiat eu. Sint veniam anim nostrud deserunt excepteur id labore aliquip consectetur.\r\n", + "address": "4 Summit Street", + "city": "Chloride", + "state": "Arkansas", + "zip": 87932, + "country": "Mauritania", + "email": "mercedeslivingston@scentric.com", + "phone": "(982) 574-2165", + "color": "rgb(166,233,208)" + }, + { + "index": 390, + "name": "Melanie Gilmore", + "first": "Michael", + "last": "Rodriquez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nepdud/73.jpg", + "boolean": false, + "guid": "7505cfd7-3696-48c3-8cb0-20a4ddd83340", + "integer": 30, + "date": "Sun Dec 27 1992 18:33:54 GMT-0800 (PST)", + "shortText": "cupidatat est in excepteur dolor", + "mediumText": "Consectetur est Lorem do dolore reprehenderit irure. Culpa et aliquip nulla pariatur aute sit aliqua incididunt enim. Elit nostrud excepteur nulla dolor aute ad sunt laboris sint reprehenderit est do. Irure irure reprehenderit adipisicing amet fugiat sunt ullamco nisi laborum non ad.", + "longText": "Voluptate officia eu dolore ullamco laborum enim id et adipisicing aute reprehenderit cillum. Incididunt et deserunt mollit elit incididunt qui dolore quis. Consectetur magna minim irure culpa sint tempor aliquip proident cillum elit velit. Elit pariatur aliquip cillum id enim.\r\n", + "address": "2 Havens Place", + "city": "Nettie", + "state": "Delaware", + "zip": 89009, + "country": "Ghana", + "email": "michaelrodriquez@scentric.com", + "phone": "(870) 537-3435", + "color": "rgb(69,106,81)" + }, + { + "index": 391, + "name": "Hamilton Sanford", + "first": "Quinn", + "last": "Deleon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/amir_hooseini/73.jpg", + "boolean": true, + "guid": "f4a9b5c2-7e54-4d86-ac2b-dd1367a2ddb7", + "integer": 84, + "date": "Mon Feb 27 2006 05:53:41 GMT-0800 (PST)", + "shortText": "consequat cupidatat dolore veniam", + "mediumText": "Do id aliquip esse Lorem anim mollit est velit laborum deserunt.", + "longText": "Quis commodo esse aute qui ea anim ex Lorem duis culpa ipsum. Nostrud sint et anim Lorem officia sit dolor ipsum voluptate fugiat proident incididunt. Deserunt magna eu aute aliquip culpa exercitation. Voluptate et sit non dolor reprehenderit non proident enim qui. Ea do labore nisi commodo deserunt qui esse incididunt mollit velit esse fugiat officia.\r\nVoluptate dolor Lorem cillum commodo esse adipisicing veniam est pariatur esse aliqua. Aliquip commodo tempor fugiat ea quis deserunt sint nostrud minim. Consequat occaecat reprehenderit deserunt nisi irure consectetur et veniam esse exercitation dolore quis enim. Lorem deserunt anim ut occaecat culpa. Magna reprehenderit quis sunt deserunt ipsum.\r\nLaboris ut labore aliqua ut in anim sint. Ex fugiat duis elit ullamco veniam excepteur laboris. Aliqua dolore consequat excepteur incididunt nisi laboris irure et adipisicing aliquip Lorem fugiat dolor. Irure magna do cupidatat qui sint cupidatat qui commodo aute nostrud incididunt.\r\nPariatur minim proident excepteur ad pariatur mollit ipsum. Id eu elit deserunt elit cupidatat duis cillum proident do voluptate commodo aliqua. Tempor deserunt eiusmod commodo officia est enim non fugiat excepteur. Laborum exercitation Lorem voluptate sit est esse laboris ea sunt nostrud ipsum. Elit nostrud exercitation ad consequat ipsum velit velit fugiat excepteur consequat exercitation qui. Fugiat ex aliqua officia velit occaecat sint dolore. Excepteur cupidatat sit dolor dolore et eu.\r\nQui laboris aute et exercitation elit sint pariatur ea nulla Lorem do laboris ipsum. Fugiat nostrud proident laboris laborum adipisicing. Eu consectetur in ad tempor nisi qui do ea Lorem id labore pariatur anim officia. Cillum commodo est ex commodo nostrud elit consequat est dolore enim minim cillum. Dolore tempor dolor irure cupidatat eiusmod magna sit pariatur occaecat. Consequat non sit pariatur consequat nulla dolore adipisicing.\r\n", + "address": "4 Gerald Court", + "city": "Wanship", + "state": "Federated States Of Micronesia", + "zip": 83910, + "country": "Moldova", + "email": "quinndeleon@scentric.com", + "phone": "(843) 402-3938", + "color": "rgb(178,174,101)" + }, + { + "index": 392, + "name": "Williams Wiggins", + "first": "Brooke", + "last": "Pitts", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kokikillara/73.jpg", + "boolean": true, + "guid": "4ed6c0c9-de4f-460e-807c-24402159047d", + "integer": 8, + "date": "Mon May 03 1976 22:14:52 GMT-0700 (PDT)", + "shortText": "velit elit", + "mediumText": "Voluptate ea officia laborum exercitation ullamco veniam aliquip mollit duis dolor eu et. Veniam exercitation fugiat aute ipsum cupidatat. Mollit ad id irure enim adipisicing. Ullamco aliqua voluptate laborum non commodo pariatur aliquip.", + "longText": "Dolor fugiat aliqua aliqua Lorem tempor proident elit cillum exercitation. Voluptate ipsum Lorem pariatur fugiat mollit exercitation occaecat consequat laborum enim Lorem. Elit exercitation tempor eu sint nostrud aliquip aliquip enim in. Anim incididunt ad laboris deserunt duis sit ut anim esse ea dolore ipsum nostrud. Id pariatur velit velit pariatur elit sunt aliqua excepteur. Enim commodo amet sunt id mollit adipisicing quis sunt incididunt aliqua eiusmod nostrud.\r\nOfficia id sunt nulla adipisicing laborum. Laborum laborum eiusmod velit commodo non labore eu. Non nostrud sint do Lorem. Excepteur ipsum est esse minim ullamco reprehenderit quis Lorem sit veniam magna cupidatat laboris. Incididunt est in officia qui sit sit dolore. Aute voluptate irure commodo ad mollit elit amet consequat elit cupidatat consectetur tempor.\r\nOccaecat Lorem aliquip amet sint enim. Ullamco sunt quis commodo cupidatat voluptate ea. Est sint commodo exercitation sunt duis duis mollit reprehenderit. Incididunt consectetur eu et esse et pariatur velit laborum tempor. Nulla ea ea est pariatur et non.\r\nIn irure pariatur non commodo est cillum ut esse. Amet aliquip proident culpa Lorem velit et nostrud amet. Esse Lorem anim nulla dolore cillum labore do irure est aliqua labore sint magna non. Quis consequat nulla ex deserunt ex. Eiusmod commodo magna voluptate qui ex. Ex anim exercitation deserunt duis proident ea voluptate non enim.\r\nAd fugiat dolor officia cupidatat aute dolor dolor consectetur sit. Aliqua magna occaecat nulla minim ea aute fugiat sint irure aliquip nostrud dolor. Amet et non duis fugiat enim excepteur ipsum nisi. Ex amet dolore ex reprehenderit elit consectetur sunt sint laboris et. Ad do consequat aliqua adipisicing tempor pariatur non excepteur nisi ipsum elit cupidatat. Aliqua exercitation pariatur ullamco sint exercitation irure cupidatat aliquip mollit elit veniam ex reprehenderit.\r\n", + "address": "3 Portal Street", + "city": "Berwind", + "state": "Guam", + "zip": 84129, + "country": "Costa Rica", + "email": "brookepitts@scentric.com", + "phone": "(951) 474-2640", + "color": "rgb(210,98,96)" + }, + { + "index": 393, + "name": "Lucia Maynard", + "first": "Moore", + "last": "Bass", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/christianoliff/73.jpg", + "boolean": false, + "guid": "044b1bae-19f0-48c3-a675-b3840c1f0350", + "integer": 13, + "date": "Sun Jun 29 2008 08:11:07 GMT-0700 (PDT)", + "shortText": "eiusmod", + "mediumText": "Est ullamco aute deserunt minim duis sunt dolore cillum tempor exercitation sit. Laboris voluptate labore sit eu adipisicing in occaecat excepteur elit ipsum in eu. Eiusmod est minim veniam do excepteur laborum amet aute. Laboris tempor deserunt cillum ipsum.", + "longText": "Laboris ad excepteur eiusmod non dolor sunt in proident velit. Incididunt laborum eiusmod enim pariatur exercitation ut. Laboris culpa fugiat consequat qui. Do aliquip incididunt et labore minim ex mollit. Occaecat id duis velit velit occaecat laborum ex officia. Veniam irure fugiat cillum dolore nostrud. Amet ea consectetur incididunt ut minim.\r\nAdipisicing quis consectetur consectetur adipisicing eiusmod excepteur ullamco nostrud sit tempor labore ad. Ea incididunt commodo occaecat qui ea veniam nulla sunt ex. Non aliquip incididunt aute cillum magna nisi. Aliqua culpa deserunt nulla ad fugiat. Enim non consectetur pariatur voluptate enim qui consectetur aliquip irure nisi. Minim eu commodo aliquip laboris elit sint quis.\r\nMagna commodo laborum fugiat commodo voluptate quis. Adipisicing laborum in anim exercitation proident. Magna est cillum voluptate consectetur reprehenderit. Velit veniam laboris fugiat anim est esse aliquip. Cupidatat aliquip excepteur voluptate laboris.\r\nOfficia anim laborum anim velit adipisicing et. Velit magna quis culpa ipsum. Id et culpa eu dolore ullamco aute ut cupidatat pariatur commodo anim nostrud qui sit. Qui nulla veniam quis elit sint et exercitation exercitation aute cupidatat nostrud. Aliquip fugiat aute nostrud magna amet dolore adipisicing elit ipsum sint labore nisi.\r\nPariatur aute voluptate veniam eu eu id tempor exercitation ipsum eu cillum velit. Elit fugiat commodo officia in. Laboris do sunt excepteur ut deserunt aliquip. Adipisicing commodo ipsum quis proident voluptate reprehenderit sint ea magna ipsum anim est occaecat. Aliqua do eu elit aute dolor culpa nisi cupidatat incididunt. Id eu veniam adipisicing veniam qui sint velit voluptate. Laborum amet ea minim minim nulla sint sit labore dolor pariatur.\r\n", + "address": "4 Newton Street", + "city": "Harviell", + "state": "Pennsylvania", + "zip": 25300, + "country": "El Salvador", + "email": "moorebass@scentric.com", + "phone": "(913) 577-3866", + "color": "rgb(103,233,105)" + }, + { + "index": 394, + "name": "Walker Workman", + "first": "Howard", + "last": "Fleming", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/andrey_maxim/73.jpg", + "boolean": true, + "guid": "ec870357-2a02-4dff-b9c5-a4574e39ddcf", + "integer": 73, + "date": "Sun Jun 02 1974 13:38:40 GMT-0700 (PDT)", + "shortText": "officia dolore consequat", + "mediumText": "Aliqua ex nisi adipisicing tempor elit pariatur voluptate cillum dolore duis excepteur commodo do eiusmod. Exercitation nulla sint officia voluptate ut ipsum esse fugiat quis sint reprehenderit irure. Voluptate voluptate deserunt sit aliqua Lorem et labore. Magna qui eu nisi do cupidatat eu ea. Nulla sint eiusmod in ipsum est dolor qui.", + "longText": "Magna elit sunt qui ut dolor et. Enim adipisicing aliquip dolore ex consectetur dolor ut. Ex culpa fugiat id sunt sunt incididunt Lorem adipisicing nostrud magna dolore mollit enim est.\r\nPariatur ea magna anim sit incididunt veniam occaecat pariatur ullamco nulla. Sit commodo cupidatat elit commodo eu do officia nostrud. Eu consequat ipsum amet eiusmod elit commodo ut enim ex.\r\nIrure ipsum ipsum ullamco magna deserunt pariatur in consectetur. Mollit nisi mollit reprehenderit et laboris in esse irure minim. Ipsum culpa nostrud nisi fugiat sint culpa consequat incididunt nostrud culpa occaecat aliquip sit. Commodo cupidatat nulla qui cupidatat sint anim. Ad quis cillum magna adipisicing ad qui ex fugiat velit velit amet aliqua. Ea laboris laborum dolor amet sunt. Fugiat sit dolor ipsum ut.\r\nElit labore fugiat commodo reprehenderit nostrud culpa qui cupidatat deserunt eiusmod tempor est excepteur laboris. Aliqua aliqua elit occaecat magna ullamco nisi commodo enim. Reprehenderit et mollit mollit aliqua ex tempor sint minim magna eu. Voluptate ullamco voluptate excepteur ullamco ea consectetur non do. Officia deserunt duis ullamco Lorem officia esse. Consequat et quis cupidatat officia.\r\nDo esse reprehenderit incididunt quis voluptate sunt eu amet ad incididunt. Do occaecat amet in culpa anim id. Fugiat est fugiat Lorem enim adipisicing do qui officia. Proident elit labore consectetur Lorem eiusmod cupidatat mollit sit fugiat magna ex commodo minim. Ea nisi amet non enim culpa veniam aliqua ad labore.\r\n", + "address": "3 Exeter Street", + "city": "Wakulla", + "state": "New Hampshire", + "zip": 85378, + "country": "Oman", + "email": "howardfleming@scentric.com", + "phone": "(844) 545-2412", + "color": "rgb(126,110,68)" + }, + { + "index": 395, + "name": "Harper Chase", + "first": "Glenda", + "last": "Burns", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/muringa/73.jpg", + "boolean": false, + "guid": "d6866e9e-6cc1-4021-9e8e-c0657bd2f64c", + "integer": 36, + "date": "Sun Dec 12 1971 00:30:23 GMT-0800 (PST)", + "shortText": "ad aliquip consequat", + "mediumText": "Consectetur exercitation commodo ut labore incididunt velit laborum labore velit aute. Aliquip velit id enim sit. Nostrud magna est veniam excepteur commodo irure. Sunt ex sint irure nisi anim. Nisi dolore veniam tempor cupidatat irure incididunt culpa veniam sunt aute.", + "longText": "Duis enim ex officia reprehenderit consectetur esse. Adipisicing ea velit labore officia sint nisi do anim ex incididunt irure. Laborum amet fugiat laboris proident. Ex duis dolor dolor nisi Lorem do qui sunt incididunt exercitation nulla do deserunt pariatur.\r\nOfficia et dolor incididunt elit non quis. Deserunt ad esse enim tempor aliquip officia excepteur magna esse deserunt. Excepteur dolore veniam commodo non quis. Do Lorem ex est exercitation sit consectetur exercitation duis duis laborum. Aliquip elit ea nulla elit quis deserunt eu adipisicing id pariatur non occaecat. Irure dolore nulla nisi irure qui tempor quis ut minim.\r\nAnim officia et laboris culpa velit consectetur do voluptate ad voluptate Lorem. Nostrud fugiat ut ad amet est elit duis consequat cupidatat. Ad minim cillum dolore incididunt sunt enim deserunt. Dolor aliqua qui nulla aliquip enim magna incididunt. Minim enim occaecat dolor in aliqua. Laborum eu quis culpa in voluptate commodo culpa sint dolor Lorem duis elit. Incididunt sint et enim sit laboris pariatur laboris eu sit eu anim.\r\nEa elit minim tempor ut id ut ea et tempor aute magna eiusmod adipisicing exercitation. Culpa elit esse tempor proident sint duis consequat. Sint ullamco ex veniam aliquip aute labore anim adipisicing est magna velit nisi. Ipsum dolore labore proident id irure qui velit anim. Incididunt Lorem nisi ut amet in enim laboris labore proident fugiat officia irure. Occaecat dolor Lorem qui nulla. Aliqua officia ipsum et cillum aliquip adipisicing ex.\r\nEu incididunt deserunt cupidatat ex laborum in voluptate excepteur ea consectetur est incididunt. Occaecat qui aliqua consequat nostrud in ex labore dolor eiusmod. Enim duis eu laboris consectetur culpa aliquip commodo. Elit ullamco reprehenderit consequat proident et ex veniam ea consectetur aute minim. Voluptate ut in laborum exercitation laboris irure culpa esse deserunt adipisicing sunt.\r\n", + "address": "4 Hinsdale Street", + "city": "Belva", + "state": "North Dakota", + "zip": 11729, + "country": "Belgium", + "email": "glendaburns@scentric.com", + "phone": "(856) 471-3316", + "color": "rgb(157,180,79)" + }, + { + "index": 396, + "name": "Lynch Dillard", + "first": "Marta", + "last": "Trujillo", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ahmedelgabri/73.jpg", + "boolean": true, + "guid": "66702f6f-a19b-4e41-8b5c-0df08d432b1b", + "integer": 55, + "date": "Mon Nov 21 1983 17:47:19 GMT-0800 (PST)", + "shortText": "culpa qui ullamco", + "mediumText": "Lorem dolor esse veniam minim culpa aliquip dolore occaecat Lorem quis.", + "longText": "Ea est sunt et duis dolor irure voluptate. Nostrud esse do irure exercitation officia magna proident irure deserunt magna. Dolore minim exercitation qui exercitation proident. Excepteur ea occaecat irure qui ea et duis minim voluptate id culpa enim ad dolor. Enim anim aliquip sint aliqua veniam Lorem id.\r\n", + "address": "3 Eckford Street", + "city": "Savage", + "state": "Northern Mariana Islands", + "zip": 46157, + "country": "Kyrgyzstan", + "email": "martatrujillo@scentric.com", + "phone": "(867) 559-3000", + "color": "rgb(184,176,151)" + }, + { + "index": 397, + "name": "Blake Wilkins", + "first": "Lara", + "last": "Gentry", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/bobbytwoshoes/73.jpg", + "boolean": false, + "guid": "e4e03f54-413f-4638-be7c-12175f24c458", + "integer": 5, + "date": "Sun Oct 10 1971 04:19:14 GMT-0700 (PDT)", + "shortText": "ex", + "mediumText": "Ullamco ut ex tempor est irure proident.", + "longText": "Labore id reprehenderit elit velit adipisicing amet voluptate exercitation adipisicing. Eiusmod anim officia sint Lorem ullamco cupidatat. Consectetur culpa nostrud elit nisi aute velit amet Lorem esse laborum sint exercitation.\r\nNon labore proident adipisicing duis veniam. Mollit ad irure Lorem minim ullamco elit aliqua occaecat excepteur. Veniam elit eiusmod quis minim enim ad Lorem est ut nulla voluptate amet Lorem ad. In dolore irure magna elit officia. Non velit anim Lorem eiusmod fugiat nostrud in reprehenderit officia commodo culpa ea sunt. Enim ut exercitation deserunt laborum laboris fugiat pariatur incididunt officia deserunt consectetur Lorem. Dolor nisi culpa dolor anim id laborum aute qui elit est quis occaecat esse id.\r\nEu ullamco aliquip enim qui cillum non anim reprehenderit. Nulla et tempor enim nulla consectetur. Reprehenderit nulla velit sunt consectetur exercitation consequat cupidatat. Anim dolor qui enim ex do labore dolore commodo voluptate ut laborum. Ut aute sint adipisicing reprehenderit est aliquip laborum esse dolore commodo aute excepteur fugiat est. Ex cupidatat commodo sit mollit veniam sint ex magna adipisicing occaecat laborum occaecat.\r\n", + "address": "4 Schenck Place", + "city": "Greenwich", + "state": "South Dakota", + "zip": 61210, + "country": "Swaziland", + "email": "laragentry@scentric.com", + "phone": "(909) 447-3849", + "color": "rgb(209,112,163)" + }, + { + "index": 398, + "name": "Lawson Peck", + "first": "Mullen", + "last": "Keller", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/milovanovicdu/73.jpg", + "boolean": false, + "guid": "27329629-6fcc-48e1-a7b9-e3158f75ea79", + "integer": 2, + "date": "Wed Jul 31 1974 10:57:47 GMT-0700 (PDT)", + "shortText": "ut", + "mediumText": "Irure ut velit ea nisi enim est fugiat magna non duis pariatur. Sint voluptate irure incididunt incididunt exercitation id magna culpa.", + "longText": "Ex labore ut aliquip magna. Laborum consectetur anim voluptate commodo Lorem nisi veniam incididunt dolor aliqua irure fugiat nostrud. Amet aliquip elit in sint. Proident voluptate nisi nulla culpa tempor. Fugiat dolor minim elit dolor elit ex incididunt Lorem non eu. Ad ex laboris ut magna eu sunt veniam excepteur velit officia ipsum reprehenderit commodo.\r\nEu irure ullamco aute qui ex mollit. Officia anim proident non officia. Aute in voluptate mollit eiusmod voluptate. Culpa esse deserunt nostrud culpa consectetur mollit. Minim fugiat amet cillum anim eu velit qui non et duis ut.\r\nDo labore enim tempor in ipsum dolore veniam consequat aliqua deserunt excepteur duis. Sunt ad elit in aliquip officia veniam tempor ad velit consectetur Lorem. Voluptate sint commodo ullamco nisi sunt minim enim labore labore. In sit laboris officia exercitation labore minim ex velit ullamco. Adipisicing ex consectetur mollit occaecat id. Officia minim dolore qui do magna exercitation. Nisi in ipsum aliqua adipisicing ad sit ad anim dolore ipsum officia elit.\r\n", + "address": "2 Rugby Road", + "city": "Kirk", + "state": "Alaska", + "zip": 73560, + "country": "Slovenia", + "email": "mullenkeller@scentric.com", + "phone": "(964) 598-3707", + "color": "rgb(210,88,176)" + }, + { + "index": 399, + "name": "Rosario Camacho", + "first": "Trina", + "last": "Perez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/imughal7/73.jpg", + "boolean": true, + "guid": "2f75ea28-cf05-4abd-8600-a3f69265392c", + "integer": 41, + "date": "Mon Jul 19 1993 06:30:42 GMT-0700 (PDT)", + "shortText": "est fugiat tempor", + "mediumText": "Irure cupidatat et officia velit ut ipsum exercitation. Aliquip pariatur enim enim duis labore duis. Excepteur Lorem eu in id exercitation eu enim dolore occaecat deserunt consequat. Aute commodo amet incididunt cillum ipsum adipisicing in. Aute sunt consequat fugiat cillum qui velit deserunt nisi nisi cupidatat.", + "longText": "Minim elit nisi enim pariatur tempor consequat et voluptate. Proident officia ipsum aliqua esse deserunt ex id nisi. Labore reprehenderit sint fugiat duis Lorem consectetur enim labore nostrud sit commodo id anim sint.\r\nEa labore et consectetur in aliqua consectetur exercitation labore dolor laborum id labore irure irure. Commodo elit ex culpa amet ex velit eiusmod consequat. Nostrud consequat id excepteur consequat et ad labore. Tempor sint consequat exercitation consectetur ex ad laboris et. Laboris fugiat consequat minim commodo veniam cillum nostrud dolore voluptate minim aute.\r\nAdipisicing commodo aliquip occaecat incididunt consequat aliqua dolor in nulla aliquip veniam aliqua aute. Incididunt ex ut minim aute mollit fugiat proident voluptate Lorem minim. Ipsum eiusmod ullamco consectetur sint in. Qui magna occaecat cillum eu et consectetur. Cillum duis occaecat cillum ipsum aliquip fugiat laborum et eiusmod consectetur id deserunt. Minim minim qui ea cillum sit quis duis non anim.\r\nVelit mollit aute ex exercitation sit consequat incididunt voluptate. Non eu laboris nulla cillum anim eu minim elit eu occaecat culpa reprehenderit consectetur. Tempor cupidatat est aute cupidatat laboris culpa qui aute veniam cillum ut incididunt esse dolor. Laboris irure ex ad ut labore dolore irure mollit irure aliquip eu tempor proident Lorem. Lorem sit eiusmod do Lorem consequat quis id minim cupidatat ex sunt magna. Laboris tempor adipisicing adipisicing et sint cupidatat ad dolor exercitation et qui occaecat laborum et.\r\nDuis incididunt anim proident dolore tempor voluptate nulla sunt aliquip voluptate dolor enim. Laborum anim sunt anim adipisicing exercitation commodo eu esse. Proident labore nostrud et excepteur sit eiusmod exercitation culpa eu in id adipisicing voluptate. Pariatur officia aute mollit amet et nisi aute sit. Aute eiusmod consectetur excepteur magna quis enim sint velit velit excepteur fugiat. Non Lorem nostrud eu voluptate anim reprehenderit et aliquip nostrud ipsum Lorem. Magna fugiat laborum culpa anim sunt laboris consectetur culpa quis pariatur minim minim minim.\r\n", + "address": "4 Ridge Boulevard", + "city": "Crown", + "state": "Louisiana", + "zip": 12286, + "country": "Mali", + "email": "trinaperez@scentric.com", + "phone": "(848) 593-3474", + "color": "rgb(121,115,73)" + }, + { + "index": 400, + "name": "Savannah Nieves", + "first": "Sutton", + "last": "Oneill", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/creative_px/73.jpg", + "boolean": true, + "guid": "2a23bf3c-f5ec-4e78-90bc-ace28f8f2bab", + "integer": 2, + "date": "Thu Apr 23 1992 13:29:05 GMT-0700 (PDT)", + "shortText": "excepteur", + "mediumText": "Et aute minim non exercitation ut in aliqua officia consequat.", + "longText": "Elit officia excepteur aliqua deserunt est. Exercitation magna culpa ut aute. Laborum Lorem aliquip labore enim velit in. Dolore in do do dolor do do qui.\r\nLabore sunt laborum id sit esse pariatur amet ea. Nostrud irure excepteur Lorem ea duis adipisicing est ea voluptate. Ea consectetur dolor duis anim. Non laborum incididunt aliquip mollit pariatur. Amet laborum esse enim velit aute sit fugiat sit laborum commodo. In nulla veniam adipisicing et velit dolore culpa mollit ad dolore dolor commodo proident dolore.\r\nPariatur nisi eu sint ullamco proident elit dolore officia quis mollit nisi. Do officia cillum minim occaecat duis. Exercitation adipisicing reprehenderit esse aliqua non elit eiusmod deserunt qui.\r\nMinim culpa aliqua sit id ex. Qui do ea in sint cillum Lorem non. Consequat Lorem sunt est nulla Lorem exercitation culpa esse ex. Veniam dolor in Lorem cillum amet esse eiusmod minim voluptate aute ipsum ex ad. Elit magna laboris id occaecat aute sit tempor fugiat velit incididunt consectetur minim. Sint est dolore occaecat aliquip in sint amet eiusmod esse exercitation quis duis dolore adipisicing.\r\n", + "address": "2 Ridgewood Place", + "city": "Ventress", + "state": "Missouri", + "zip": 37064, + "country": "Cyprus", + "email": "suttononeill@scentric.com", + "phone": "(957) 407-3116", + "color": "rgb(163,237,93)" + }, + { + "index": 401, + "name": "Faye Graves", + "first": "Mildred", + "last": "Branch", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gabrielizalo/73.jpg", + "boolean": true, + "guid": "12b69605-f47d-4b63-b96d-48e2e24c1031", + "integer": 82, + "date": "Wed Feb 04 1981 06:07:39 GMT-0800 (PST)", + "shortText": "tempor occaecat ullamco", + "mediumText": "Velit aute non nisi elit laborum. Id nisi reprehenderit culpa incididunt eu labore est excepteur aute laborum officia enim. Qui proident deserunt voluptate commodo elit id irure voluptate. Consequat quis dolor id ea tempor ipsum culpa.", + "longText": "Velit sit eu nulla sunt nulla veniam velit mollit nostrud reprehenderit cillum velit. Nostrud non deserunt culpa Lorem quis. Sit elit ex tempor amet officia cupidatat. Dolore laboris et est consectetur elit dolor. Exercitation consectetur qui pariatur laborum pariatur aliquip irure veniam dolore laboris.\r\nLabore incididunt cupidatat elit nostrud ipsum aliquip ipsum commodo incididunt reprehenderit exercitation ipsum. Voluptate et ipsum qui nisi irure esse cillum ut. Tempor culpa et excepteur incididunt adipisicing laboris aliqua mollit minim incididunt. Dolor dolor fugiat anim culpa culpa id reprehenderit voluptate laboris occaecat. Esse Lorem sit cillum non consequat mollit minim non tempor aliquip culpa. Pariatur velit amet ad reprehenderit esse cillum veniam in ad. Nisi dolore irure dolore deserunt.\r\nNon amet elit pariatur nisi id dolor in adipisicing nisi elit sit. Adipisicing cillum sint tempor deserunt aute exercitation do pariatur. Nulla et eiusmod do dolore elit ullamco magna mollit. Irure deserunt consectetur Lorem ex elit consequat consequat laboris.\r\nDuis aute sint nisi tempor in ipsum laboris. Cillum magna exercitation mollit eu amet proident reprehenderit cupidatat irure. Ea minim dolor magna id aliquip. Ex commodo proident adipisicing sint velit non eiusmod sit in exercitation non laboris. Consequat nulla laborum sint qui dolor sint amet non. Qui sint dolore occaecat cillum proident ullamco ipsum incididunt duis sit duis fugiat consequat.\r\nQuis occaecat nulla officia quis nulla sunt reprehenderit nostrud. Cillum anim duis irure do nulla id. Sunt eiusmod quis dolor aliqua occaecat non. Sit velit elit sit laborum et cupidatat est veniam aliqua enim. In dolore veniam amet duis incididunt. Elit est quis minim nisi consectetur consequat sunt enim culpa eiusmod ea elit cupidatat. Officia reprehenderit in do consequat.\r\n", + "address": "4 Farragut Place", + "city": "Grayhawk", + "state": "Kentucky", + "zip": 53142, + "country": "Georgia", + "email": "mildredbranch@scentric.com", + "phone": "(888) 489-2923", + "color": "rgb(206,181,98)" + }, + { + "index": 402, + "name": "England Cameron", + "first": "Heath", + "last": "Roach", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/xtr1mal2/73.jpg", + "boolean": false, + "guid": "7eecdcf4-46f8-401c-aff2-9c22abf751ae", + "integer": 92, + "date": "Mon Jul 02 1990 04:55:35 GMT-0700 (PDT)", + "shortText": "velit", + "mediumText": "Cillum minim qui ex officia magna velit sunt nisi. Non reprehenderit sint pariatur minim elit commodo reprehenderit proident elit occaecat non duis voluptate. Aliquip ullamco ut duis officia do magna minim cupidatat in. Ex irure officia occaecat laboris tempor velit reprehenderit quis anim ipsum sit.", + "longText": "Cupidatat excepteur officia veniam id tempor sit amet. Deserunt mollit aliquip labore cupidatat sint laboris velit voluptate aute consectetur exercitation sit sint. Labore et pariatur laboris quis labore. Irure consectetur labore sit et. Aute consectetur veniam veniam id nulla pariatur deserunt. Deserunt nulla proident id nulla.\r\nUt nostrud tempor et laborum laboris aliquip ullamco exercitation exercitation elit culpa non culpa in. Cupidatat consectetur exercitation ea excepteur culpa sint eiusmod culpa reprehenderit Lorem fugiat laboris. Veniam sint mollit dolor consequat sunt officia. Irure ipsum culpa et non. Aliqua nisi amet Lorem nisi enim commodo aliquip occaecat duis aute eu cupidatat ut. Pariatur Lorem tempor consequat in irure pariatur mollit sunt reprehenderit dolore officia.\r\n", + "address": "2 Maujer Street", + "city": "Morningside", + "state": "American Samoa", + "zip": 87621, + "country": "Djibouti", + "email": "heathroach@scentric.com", + "phone": "(947) 435-3218", + "color": "rgb(247,200,211)" + }, + { + "index": 403, + "name": "Michele Reynolds", + "first": "Mayo", + "last": "Gray", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/eugenerifan/73.jpg", + "boolean": false, + "guid": "826af78f-bd69-4f81-a45e-1a38d5afb1a8", + "integer": 54, + "date": "Mon Nov 02 2009 06:31:46 GMT-0800 (PST)", + "shortText": "exercitation adipisicing et", + "mediumText": "Aliqua ex amet anim proident nostrud et id Lorem aliqua. Quis reprehenderit veniam cupidatat fugiat.", + "longText": "Ipsum ullamco commodo aliqua non consectetur culpa in. Et nulla nulla adipisicing sit sunt irure ea commodo ex cupidatat enim excepteur. Aliqua eu dolore commodo culpa est nostrud velit exercitation irure. Ad est fugiat duis ipsum non Lorem deserunt esse.\r\nAliquip reprehenderit id voluptate ullamco anim sunt aliquip veniam proident esse magna officia eiusmod. Nostrud nostrud cillum sunt fugiat incididunt irure pariatur veniam incididunt irure Lorem irure velit velit. Eiusmod occaecat proident culpa Lorem labore culpa ad. Eu dolor ad cupidatat sunt fugiat sint. Ea sunt quis amet nulla labore dolor occaecat consequat ea nulla. Sint magna qui et veniam cillum.\r\nOccaecat sunt aliqua adipisicing non consequat in ipsum esse sunt elit reprehenderit. Enim adipisicing cupidatat voluptate deserunt aliqua reprehenderit aliquip excepteur dolore non Lorem est do. Dolor ipsum non ex id tempor tempor mollit. Consequat cupidatat ad elit nulla ex nostrud nisi dolor nulla cillum labore dolor dolor.\r\nFugiat exercitation nulla irure aliqua id. Laboris reprehenderit cillum quis cillum Lorem exercitation Lorem ipsum deserunt. Velit sint aute adipisicing aliquip voluptate et culpa ullamco aliqua.\r\nNon cillum magna elit sunt aliqua ea. Veniam eu esse in est proident non reprehenderit nulla enim. Nisi non sunt et laborum minim non qui nisi nisi elit excepteur nisi. Ex excepteur consequat mollit sunt proident velit et deserunt sint excepteur et. Ullamco qui ipsum labore culpa aliquip. Qui pariatur veniam non velit qui nisi non veniam incididunt Lorem laboris occaecat. Ut duis qui labore anim amet dolor.\r\n", + "address": "4 Eagle Street", + "city": "Allentown", + "state": "Minnesota", + "zip": 44111, + "country": "Tokelau", + "email": "mayogray@scentric.com", + "phone": "(992) 459-3031", + "color": "rgb(215,198,143)" + }, + { + "index": 404, + "name": "Dorthy Simon", + "first": "Gena", + "last": "Calderon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/imcoding/73.jpg", + "boolean": false, + "guid": "6afa8867-330b-419e-b186-df524f163ef0", + "integer": 1, + "date": "Mon Jun 09 2014 19:43:18 GMT-0700 (PDT)", + "shortText": "esse", + "mediumText": "Incididunt ea id eu id mollit eu. Culpa fugiat dolor minim mollit.", + "longText": "Dolor exercitation dolor minim cillum anim ut ex elit sunt laborum voluptate est ea non. Sunt tempor deserunt aute ut aliqua. Nostrud eu ullamco in est eu ea mollit qui. Ad mollit fugiat quis ex elit. Proident duis cupidatat ex amet sint dolore laboris elit. Excepteur cupidatat minim id consequat dolor.\r\nTempor ipsum eu commodo ipsum ut. Elit elit eiusmod fugiat ullamco labore. Mollit est ea nulla ea cupidatat excepteur.\r\nDeserunt duis ipsum adipisicing in laboris sit. Esse incididunt in aliqua non anim esse consectetur. Exercitation dolor deserunt eiusmod incididunt et ea culpa. Mollit anim non mollit adipisicing est. Pariatur aliqua dolore ullamco aliqua.\r\nEt id laboris sit adipisicing adipisicing eu occaecat et quis sint. Proident voluptate ad et velit. Quis aliqua elit deserunt consectetur sunt. Incididunt sit qui ex excepteur et culpa et. Non occaecat ea amet commodo Lorem. Minim mollit eu eiusmod id ipsum esse ut mollit do do.\r\n", + "address": "3 Vermont Court", + "city": "Williston", + "state": "Hawaii", + "zip": 55240, + "country": "San Marino", + "email": "genacalderon@scentric.com", + "phone": "(888) 431-2447", + "color": "rgb(169,113,77)" + }, + { + "index": 405, + "name": "Estella Bird", + "first": "Candice", + "last": "Grant", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/madhan4uu/73.jpg", + "boolean": true, + "guid": "acee6de8-e101-4121-92a2-004058e99752", + "integer": 82, + "date": "Sat Sep 14 2002 06:24:28 GMT-0700 (PDT)", + "shortText": "id pariatur in tempor", + "mediumText": "Reprehenderit nulla consectetur minim minim ut consequat id tempor anim labore. Occaecat reprehenderit in consequat velit occaecat Lorem.", + "longText": "Nulla tempor et esse nostrud minim aliqua mollit ullamco elit consectetur cupidatat. Non non aliqua labore aute Lorem magna excepteur tempor. Velit exercitation veniam elit proident do nostrud et adipisicing et consectetur est dolore. Quis minim cupidatat occaecat Lorem aute labore ea et do nisi nisi consectetur. Do aute commodo labore elit laboris. In ipsum quis voluptate nulla est officia eu.\r\n", + "address": "4 Wythe Avenue", + "city": "Rivera", + "state": "Alabama", + "zip": 33941, + "country": "Vanuatu", + "email": "candicegrant@scentric.com", + "phone": "(991) 536-3705", + "color": "rgb(157,106,60)" + }, + { + "index": 406, + "name": "Clarissa Bray", + "first": "Rojas", + "last": "Robles", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/tirsope/73.jpg", + "boolean": false, + "guid": "bfc3f083-ca88-443f-8639-1467b45a7b5e", + "integer": 54, + "date": "Fri Jul 03 1970 19:21:58 GMT-0700 (PDT)", + "shortText": "consectetur duis ullamco est", + "mediumText": "Excepteur qui sint nulla pariatur reprehenderit ex fugiat anim ut. Id voluptate quis incididunt sint sint aliqua aliquip excepteur sit officia ad dolore. Aute eu elit tempor laborum eu voluptate ipsum duis sunt. Reprehenderit fugiat ex Lorem aute quis nostrud commodo Lorem.", + "longText": "Labore ad nostrud ad eu dolor pariatur sit exercitation tempor voluptate do eu deserunt. Consectetur culpa culpa veniam nisi eu elit minim est est. Mollit cillum sit pariatur quis. Cupidatat ex reprehenderit ad eu ad amet id esse aliqua. Adipisicing sint adipisicing ex consectetur magna quis sint culpa irure pariatur laboris exercitation ea ex. Elit fugiat proident dolor amet minim cillum et sint. Non nostrud nulla ipsum eu.\r\n", + "address": "4 Clifton Place", + "city": "Walton", + "state": "North Carolina", + "zip": 22683, + "country": "Somalia", + "email": "rojasrobles@scentric.com", + "phone": "(829) 530-3596", + "color": "rgb(58,225,142)" + }, + { + "index": 407, + "name": "Jody Schultz", + "first": "Baird", + "last": "Robinson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lorenzosinisi/73.jpg", + "boolean": false, + "guid": "7a26e07a-6210-47eb-8a15-d60b73f0b0ba", + "integer": 34, + "date": "Sat Oct 25 1980 07:30:41 GMT-0700 (PDT)", + "shortText": "dolor qui", + "mediumText": "Aliqua sunt magna esse aute veniam occaecat tempor aliquip aliquip adipisicing aliquip qui deserunt incididunt.", + "longText": "Laboris dolore anim pariatur laboris in veniam irure. Lorem laborum nulla amet dolore cupidatat. Dolor est reprehenderit eiusmod labore excepteur duis mollit veniam ipsum sunt magna. Minim ut aliquip sunt ut irure voluptate voluptate duis ea. Exercitation occaecat mollit cupidatat sint dolore aliquip cupidatat aute minim exercitation ipsum occaecat. Consequat sit tempor esse ut culpa tempor duis irure duis quis. Enim incididunt sint consequat adipisicing veniam fugiat eiusmod.\r\nMinim mollit voluptate amet laborum fugiat eiusmod duis esse aute ea tempor. Ea minim ipsum sint pariatur amet voluptate ipsum. Excepteur magna pariatur esse culpa ipsum do. Ad deserunt excepteur aliquip cillum non eiusmod excepteur non labore ut nostrud fugiat. Minim sunt duis dolor ex ipsum reprehenderit. Magna incididunt reprehenderit tempor reprehenderit voluptate. Irure magna non minim quis sunt laboris ut velit velit eu consequat ad.\r\nEst et sunt consequat adipisicing elit non pariatur nostrud reprehenderit sit. Pariatur irure veniam veniam aliquip velit fugiat adipisicing. Consectetur ex mollit tempor cillum commodo ad magna dolore Lorem. Consectetur non esse ex esse irure consectetur ullamco proident eu ex ullamco. Ipsum ut tempor Lorem exercitation et voluptate nulla aute commodo. Adipisicing nostrud laboris quis elit minim.\r\nProident ea irure ex qui qui deserunt ex consequat est ex et elit consequat ut. Sunt deserunt tempor dolor esse reprehenderit excepteur est. Mollit eu occaecat anim voluptate.\r\n", + "address": "4 Montieth Street", + "city": "Lowell", + "state": "Connecticut", + "zip": 26397, + "country": "Maldives", + "email": "bairdrobinson@scentric.com", + "phone": "(881) 497-3274", + "color": "rgb(109,107,114)" + }, + { + "index": 408, + "name": "Sullivan Singleton", + "first": "Lupe", + "last": "Shields", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/celikovic/73.jpg", + "boolean": false, + "guid": "77364f56-0bf3-44a2-b715-57adc5471291", + "integer": 76, + "date": "Sun Jan 30 2000 05:01:36 GMT-0800 (PST)", + "shortText": "eiusmod enim officia", + "mediumText": "Deserunt sunt nulla ex reprehenderit nulla laborum fugiat consectetur aliqua est. Dolor qui laborum non anim in. Nisi amet commodo ullamco id excepteur ipsum veniam. Id quis nulla amet sint pariatur. Velit irure exercitation ut excepteur pariatur anim amet deserunt.", + "longText": "Ullamco labore cupidatat qui ad consequat consequat incididunt ullamco non. Id tempor est laboris non. Pariatur incididunt veniam irure Lorem aute. Eu reprehenderit do adipisicing adipisicing officia est consectetur laboris ut et et consequat duis ut.\r\nFugiat excepteur dolore culpa excepteur excepteur laboris Lorem non esse do ad. Duis consectetur aliqua voluptate veniam velit culpa incididunt incididunt ad anim. Quis id elit officia in ut.\r\nCupidatat dolor excepteur in mollit proident nostrud duis consequat in. Duis ullamco eu qui culpa. Nostrud culpa eu cupidatat occaecat. Eu reprehenderit ex nisi voluptate aliqua aute.\r\n", + "address": "4 Knickerbocker Avenue", + "city": "Alafaya", + "state": "South Carolina", + "zip": 66270, + "country": "Israel", + "email": "lupeshields@scentric.com", + "phone": "(945) 571-2010", + "color": "rgb(61,207,100)" + }, + { + "index": 409, + "name": "Bullock Harrell", + "first": "Morse", + "last": "Haynes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_kshitish/73.jpg", + "boolean": false, + "guid": "4176d27b-2ff0-44dd-9f1e-17963821d222", + "integer": 45, + "date": "Sat Feb 20 1999 17:08:27 GMT-0800 (PST)", + "shortText": "id nostrud fugiat irure culpa", + "mediumText": "Reprehenderit quis elit id amet laborum labore.", + "longText": "Nulla pariatur in cupidatat qui fugiat. Id incididunt ad aute consequat velit anim ad velit fugiat labore. Sunt magna do dolore ullamco Lorem Lorem enim et aliquip mollit esse id sunt. Nisi reprehenderit magna sit non officia Lorem eu fugiat. Elit non occaecat laborum in sunt consequat amet in non.\r\nSit ipsum mollit proident pariatur ea esse. Culpa magna aliqua ipsum excepteur ea esse laborum aliquip occaecat reprehenderit nostrud ex ea. Non esse exercitation nulla nostrud esse in sunt. Esse tempor aliqua sit veniam proident aute sint nulla do velit eiusmod. Qui duis occaecat tempor do aliquip irure cillum elit. Culpa Lorem et est nisi ut qui consequat exercitation magna nisi ad officia magna voluptate.\r\nTempor enim sit deserunt do nisi amet enim ipsum ea dolore eu. Proident excepteur aliqua sit sit qui duis ad nostrud adipisicing qui. Exercitation eiusmod velit aliquip officia voluptate anim laborum anim duis in enim qui consectetur. Ad est occaecat occaecat do ex esse ipsum ipsum Lorem veniam. Minim et et sunt non sit irure ad amet minim in et anim reprehenderit voluptate. Irure anim id nisi eiusmod eu eiusmod proident aute sunt. Consequat et aute ipsum ullamco do aute ad do Lorem ipsum in minim.\r\n", + "address": "4 Louise Terrace", + "city": "Blodgett", + "state": "Michigan", + "zip": 68968, + "country": "Reunion", + "email": "morsehaynes@scentric.com", + "phone": "(933) 478-3987", + "color": "rgb(127,118,223)" + }, + { + "index": 410, + "name": "Tammi Gordon", + "first": "Cooke", + "last": "Chandler", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/2fockus/73.jpg", + "boolean": true, + "guid": "c65f8ce1-2436-4ef2-9dc8-74fcc3a09b55", + "integer": 7, + "date": "Wed Jan 12 2005 21:50:12 GMT-0800 (PST)", + "shortText": "laboris est ipsum", + "mediumText": "Id dolore quis voluptate dolor ullamco enim velit cillum mollit dolor occaecat officia.", + "longText": "Laborum est amet mollit esse exercitation exercitation culpa commodo laborum irure enim commodo aliquip amet. Eu ea commodo occaecat cupidatat velit adipisicing reprehenderit amet. Reprehenderit in Lorem voluptate amet consectetur id incididunt reprehenderit in quis commodo est deserunt non. Pariatur pariatur in elit labore ut esse esse irure. Tempor mollit labore laborum voluptate ut. Ut occaecat mollit mollit cillum aliquip ipsum quis voluptate veniam. Cillum ad exercitation incididunt culpa ex in reprehenderit eiusmod deserunt voluptate.\r\nDo eiusmod esse aliquip eiusmod veniam deserunt do non dolor pariatur. Occaecat dolore minim irure proident laborum in nostrud sit. Ipsum deserunt duis reprehenderit duis occaecat fugiat voluptate aute aliquip consectetur consequat eiusmod. Qui laborum sunt incididunt id quis eu consectetur adipisicing mollit commodo eiusmod ipsum amet.\r\nCulpa anim officia ea occaecat occaecat occaecat occaecat mollit ipsum commodo dolore laboris. Ut anim velit amet laboris velit et aliqua aliquip incididunt consectetur culpa aliquip sint cupidatat. Enim eu adipisicing ut non. Amet duis nostrud est ad dolore non cupidatat veniam in. Voluptate nostrud sint aliqua voluptate culpa qui Lorem tempor.\r\nCommodo Lorem officia aute ut do mollit sint labore ex fugiat ullamco eu ut consectetur. Nulla nisi laborum anim et qui ullamco est dolore enim pariatur ex velit. Sit ullamco aliqua reprehenderit ea anim aliquip velit ut amet culpa eiusmod cillum. Aute eu sit aute proident Lorem dolor ea pariatur. Nisi pariatur consequat tempor occaecat consectetur deserunt irure magna adipisicing anim.\r\n", + "address": "3 Bergen Avenue", + "city": "Tolu", + "state": "Maine", + "zip": 88956, + "country": "Taiwan", + "email": "cookechandler@scentric.com", + "phone": "(975) 467-3292", + "color": "rgb(138,124,136)" + }, + { + "index": 411, + "name": "Jeanine Shaw", + "first": "Kasey", + "last": "Guerrero", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dnevozhai/73.jpg", + "boolean": false, + "guid": "be3a2408-087f-4d1d-ba80-0cffdd225a29", + "integer": 82, + "date": "Sun May 13 2001 01:14:30 GMT-0700 (PDT)", + "shortText": "sint", + "mediumText": "Non quis officia mollit labore velit est in Lorem culpa laboris voluptate et. Exercitation dolor non sit magna Lorem consequat.", + "longText": "Labore ea elit irure eiusmod deserunt aliqua. Aliqua velit esse voluptate sunt duis dolor ad in nostrud consectetur proident. Amet aliquip excepteur veniam commodo dolore do voluptate non. Lorem sunt duis anim officia sunt culpa laborum dolor occaecat.\r\nOfficia cillum est enim labore minim esse voluptate culpa consectetur Lorem aliquip. Quis incididunt esse dolor Lorem nulla nostrud aliquip duis aliqua laboris ut. Qui nisi proident voluptate nostrud anim. Sunt culpa est elit exercitation magna sint.\r\nEst mollit quis fugiat deserunt quis ullamco dolore enim exercitation occaecat nulla aute anim ullamco. Nisi consequat consequat consequat pariatur nostrud ad nostrud voluptate irure anim adipisicing ex in sint. Sunt culpa incididunt laborum laborum in adipisicing excepteur dolor tempor ad. Reprehenderit et mollit sint duis irure sit enim ex dolore est duis sunt incididunt. Eiusmod deserunt et est laborum est ipsum reprehenderit pariatur sunt duis. Sunt minim magna consectetur do occaecat. Duis ut tempor ullamco sunt dolor sit deserunt nisi amet.\r\n", + "address": "3 Conduit Boulevard", + "city": "Itmann", + "state": "Kansas", + "zip": 88741, + "country": "Cuba", + "email": "kaseyguerrero@scentric.com", + "phone": "(807) 548-3703", + "color": "rgb(77,230,193)" + }, + { + "index": 412, + "name": "Mcmahon Reeves", + "first": "Amanda", + "last": "Holloway", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sebasribas/73.jpg", + "boolean": false, + "guid": "d7d7d64e-e5c2-426c-b930-5d2e09aba244", + "integer": 32, + "date": "Thu May 08 1986 15:44:35 GMT-0700 (PDT)", + "shortText": "ut", + "mediumText": "Dolor aute Lorem irure occaecat. Dolore culpa eu ex id eu ad ad quis.", + "longText": "Nisi officia commodo consequat consequat aliquip. Eu non esse sit sit ipsum duis exercitation tempor. Voluptate officia eiusmod consequat sunt esse exercitation sint tempor nulla cillum ad Lorem qui ea. Id dolore elit ullamco ex ea commodo reprehenderit consequat. Anim dolore id ullamco laborum commodo dolore proident ex.\r\nEnim minim elit adipisicing occaecat occaecat veniam. Dolor culpa occaecat adipisicing proident ex id. Incididunt ullamco aute ex anim est ullamco magna nisi. Occaecat duis mollit id duis ipsum reprehenderit proident ut elit consectetur non deserunt eiusmod commodo.\r\nIrure do nulla consequat fugiat. Aliqua proident est voluptate consectetur culpa reprehenderit labore aute voluptate aliqua anim laborum. Voluptate consectetur commodo et enim enim sint eiusmod ut consectetur quis ipsum. Proident dolor ipsum duis cillum sunt.\r\nEsse culpa non esse consectetur mollit reprehenderit commodo velit esse nulla sit ad. Ex ad amet exercitation irure velit reprehenderit. Qui officia incididunt commodo minim fugiat exercitation ut magna amet voluptate ullamco.\r\nEnim occaecat consequat officia ad incididunt magna nulla ea laborum in consectetur laborum Lorem laboris. Deserunt esse cillum nulla anim. Ea laborum amet ex aliquip aliquip.\r\n", + "address": "3 Kingston Avenue", + "city": "Herlong", + "state": "Iowa", + "zip": 83835, + "country": "Turkey", + "email": "amandaholloway@scentric.com", + "phone": "(818) 520-3833", + "color": "rgb(198,210,85)" + }, + { + "index": 413, + "name": "Fox Patterson", + "first": "Samantha", + "last": "Frazier", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/cepreygolubev/73.jpg", + "boolean": true, + "guid": "24f589f7-f6f9-4cab-9292-d754c16d9e45", + "integer": 63, + "date": "Fri Mar 16 2007 14:40:33 GMT-0700 (PDT)", + "shortText": "adipisicing velit Lorem", + "mediumText": "Anim amet dolore eiusmod sit ea officia duis aliqua ipsum ea consequat Lorem. Lorem sunt non amet ullamco elit. Aliquip reprehenderit pariatur mollit officia irure irure dolor incididunt voluptate qui sit duis esse amet. Tempor aliqua magna excepteur ad aliqua. In fugiat et aliqua irure excepteur dolore ipsum voluptate.", + "longText": "Consequat sit pariatur exercitation esse tempor adipisicing labore amet nulla elit elit fugiat. Laborum id in ad laborum officia nulla id cillum occaecat. Esse consectetur fugiat veniam ex minim eiusmod nostrud.\r\nExercitation officia velit officia occaecat voluptate ipsum ipsum et fugiat id enim laboris veniam. Commodo eu velit reprehenderit cupidatat. Do incididunt anim irure laborum ut voluptate est aute elit anim. Duis dolor dolore ex sit adipisicing ipsum voluptate voluptate anim. Non adipisicing aute nostrud anim magna id qui quis.\r\nEst sint irure eu pariatur elit id non cupidatat. Exercitation nisi ea commodo in nulla pariatur anim sunt adipisicing culpa esse sint. Quis et culpa ad anim cillum mollit excepteur. Cillum fugiat amet reprehenderit nisi ullamco. In ipsum commodo nisi ut reprehenderit. Deserunt eiusmod labore enim consequat.\r\nSit eu est irure excepteur ea esse magna minim adipisicing consequat ad ut esse. Laboris ut duis culpa nulla cillum sunt sint velit. Excepteur aute aliquip aute id adipisicing aute nulla ex incididunt consequat occaecat cillum. In consectetur aute veniam adipisicing et non dolor aliqua qui eiusmod ea aliquip elit. Ut fugiat aliqua nisi deserunt excepteur eu aute minim culpa aute mollit.\r\nQui et laborum deserunt proident dolore mollit fugiat labore. Dolore et ullamco laboris sit adipisicing do voluptate ullamco nulla amet eu voluptate. Mollit nisi officia nisi incididunt minim culpa commodo irure elit quis in.\r\n", + "address": "2 Roosevelt Court", + "city": "Mammoth", + "state": "Vermont", + "zip": 32042, + "country": "Solomon Islands", + "email": "samanthafrazier@scentric.com", + "phone": "(831) 425-2424", + "color": "rgb(239,229,222)" + }, + { + "index": 414, + "name": "Gloria Mcclain", + "first": "Marisol", + "last": "Marshall", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/iamphilipjoyce/73.jpg", + "boolean": true, + "guid": "0eb44c61-37e0-4715-9356-2231abd957a0", + "integer": 93, + "date": "Thu Nov 03 2005 21:43:21 GMT-0800 (PST)", + "shortText": "quis nisi ad ut commodo", + "mediumText": "Consequat tempor ad id sint consectetur officia aliqua excepteur duis. Voluptate cupidatat id est eu velit id voluptate aute sunt cillum elit minim nulla tempor.", + "longText": "Magna tempor elit reprehenderit aliquip laboris eu commodo et consectetur laborum officia magna. Veniam fugiat minim ut occaecat incididunt nisi. Sunt adipisicing quis aliqua sit in aliquip eiusmod laborum.\r\n", + "address": "2 Scott Avenue", + "city": "Emison", + "state": "Nebraska", + "zip": 11179, + "country": "Malawi", + "email": "marisolmarshall@scentric.com", + "phone": "(850) 423-2670", + "color": "rgb(179,133,229)" + }, + { + "index": 415, + "name": "Mcintyre Cochran", + "first": "Courtney", + "last": "Faulkner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/russell_baylis/73.jpg", + "boolean": true, + "guid": "07e7e322-9ff5-428a-a8d7-1d9e39a2bc7c", + "integer": 19, + "date": "Tue Aug 26 1975 19:13:06 GMT-0700 (PDT)", + "shortText": "ullamco fugiat", + "mediumText": "Ipsum veniam commodo consectetur occaecat. Aliqua velit dolor aliqua pariatur eu proident enim do eu mollit proident consectetur ipsum.", + "longText": "Sunt in veniam dolor anim cupidatat Lorem proident pariatur culpa. Pariatur ipsum consectetur nostrud officia dolor magna esse anim aliqua. Exercitation ex nisi enim irure veniam eiusmod et ipsum sint do. Consectetur eu minim minim aute aliquip consequat laborum exercitation commodo ex adipisicing culpa.\r\nNulla anim velit amet laboris. Commodo deserunt et duis consectetur consequat aute est pariatur consequat do tempor. Voluptate reprehenderit irure esse minim. Qui tempor id eiusmod id aliquip sit quis quis anim exercitation nulla. Laborum cillum veniam cupidatat incididunt adipisicing magna non laboris labore aliquip. Minim sit sint id ea in adipisicing et ex cillum reprehenderit. Pariatur tempor ea fugiat in irure.\r\nEa culpa proident aliquip officia sint irure Lorem consectetur. Ad reprehenderit adipisicing mollit nostrud ad amet ipsum aliqua dolore dolor eiusmod in. Lorem sit in aliquip esse aute sunt id nostrud ex culpa reprehenderit mollit. Qui laboris anim culpa id fugiat veniam. Reprehenderit exercitation sint pariatur mollit sint sunt. Velit excepteur consectetur proident non labore non aute incididunt duis. Excepteur amet occaecat occaecat commodo ut do velit tempor aliqua laborum.\r\nMinim veniam dolor id id culpa cillum enim sunt qui esse pariatur pariatur aliquip. Esse et ad dolor aliquip. Adipisicing fugiat do elit exercitation eiusmod fugiat ea ullamco mollit non. Minim occaecat ipsum dolore elit anim velit occaecat cupidatat. Irure irure reprehenderit fugiat ad mollit ullamco esse sit. Fugiat veniam reprehenderit amet ullamco nostrud irure ea reprehenderit.\r\n", + "address": "4 Nassau Street", + "city": "Bowden", + "state": "Florida", + "zip": 14172, + "country": "Samoa", + "email": "courtneyfaulkner@scentric.com", + "phone": "(861) 587-3003", + "color": "rgb(87,119,212)" + }, + { + "index": 416, + "name": "Sheppard Pacheco", + "first": "Shepard", + "last": "Hopper", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kijanmaharjan/73.jpg", + "boolean": false, + "guid": "25a22dc2-f676-4e38-b172-8b3d6598cafd", + "integer": 98, + "date": "Thu Jun 19 2003 12:30:27 GMT-0700 (PDT)", + "shortText": "incididunt ad ad nulla elit", + "mediumText": "Consectetur magna dolore consequat consectetur officia labore culpa aute deserunt officia laboris exercitation. Duis labore consectetur ex id id ullamco voluptate commodo ut ea cillum.", + "longText": "Ea do adipisicing enim mollit cillum officia sunt amet exercitation esse. Incididunt deserunt dolore deserunt sunt ut tempor. Quis magna consectetur commodo nisi eiusmod cupidatat ea velit. Consectetur Lorem cillum laborum velit enim esse et officia ipsum consectetur sit.\r\nDo cillum irure aliqua nostrud elit proident sunt deserunt pariatur sunt ad. Esse adipisicing fugiat sunt irure duis eu non officia eiusmod fugiat. Quis ut officia commodo elit ad veniam ut eu amet do. Mollit eiusmod Lorem adipisicing officia cillum culpa deserunt ullamco reprehenderit eu labore voluptate. Irure reprehenderit consequat tempor laboris exercitation aliquip velit nulla. Tempor quis adipisicing et esse. Lorem ea nulla consequat culpa aliquip tempor amet.\r\n", + "address": "4 Buffalo Avenue", + "city": "Tampico", + "state": "New Jersey", + "zip": 90074, + "country": "United Kingdom", + "email": "shepardhopper@scentric.com", + "phone": "(985) 565-3301", + "color": "rgb(103,234,218)" + }, + { + "index": 417, + "name": "Hobbs Chapman", + "first": "Byers", + "last": "Craig", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/marcoramires/73.jpg", + "boolean": true, + "guid": "355ebabb-a1d0-4ed7-adfb-e8a0515d4ee5", + "integer": 3, + "date": "Fri Mar 26 2010 15:05:55 GMT-0700 (PDT)", + "shortText": "cupidatat", + "mediumText": "Aute sit fugiat nostrud enim proident ad quis reprehenderit irure. Enim esse ex sunt dolore id occaecat proident fugiat cillum non ex dolore.", + "longText": "Nisi excepteur cillum incididunt ipsum ullamco esse do sit duis deserunt pariatur. Eiusmod commodo veniam excepteur deserunt veniam aliquip aute nisi dolore ut do cupidatat. Aliqua tempor occaecat amet sit do laboris ea dolor mollit duis laborum dolore aute deserunt. Nulla non duis sunt do eiusmod sunt labore dolore excepteur cillum reprehenderit veniam elit reprehenderit. Occaecat Lorem incididunt amet ad ullamco minim ullamco enim nostrud aute occaecat duis Lorem. Ea labore in nostrud pariatur ea fugiat deserunt. Laborum eu enim officia amet sint et qui in id.\r\nFugiat minim adipisicing anim duis eiusmod id deserunt ea minim esse est nostrud laboris cupidatat. Ex ut reprehenderit commodo veniam. Aliquip duis incididunt proident ut sit aliquip occaecat commodo reprehenderit qui. Enim enim dolor non quis magna esse aliqua labore labore officia ut ut anim. Ex dolor velit aliqua pariatur.\r\nDolor enim ad non dolor do qui nulla exercitation eiusmod cillum elit minim non. Esse sint voluptate ullamco et sit esse. Ut ullamco non eiusmod anim quis anim ullamco irure amet. Amet ut pariatur ad mollit eu occaecat aliqua adipisicing. Dolore et sint veniam qui ad veniam fugiat aliqua dolor. Deserunt eiusmod et reprehenderit consequat enim quis deserunt dolor.\r\nCillum amet aliquip laborum eiusmod. Consequat commodo aliquip velit quis fugiat velit. Lorem nulla nostrud deserunt aliquip Lorem sunt et. Ea sunt duis officia Lorem elit do commodo. Tempor nostrud incididunt sunt nisi fugiat ex eu. Commodo nisi do duis non culpa consectetur ut exercitation ad in. Laborum laborum tempor sit laborum labore reprehenderit voluptate.\r\n", + "address": "2 Aberdeen Street", + "city": "Maplewood", + "state": "Wisconsin", + "zip": 44000, + "country": "French Guiana", + "email": "byerscraig@scentric.com", + "phone": "(830) 519-3986", + "color": "rgb(189,244,220)" + }, + { + "index": 418, + "name": "Lisa Yates", + "first": "Lea", + "last": "Underwood", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/noufalibrahim/73.jpg", + "boolean": true, + "guid": "dc5b7819-35b2-4a5e-b228-74fa3c7bdf7a", + "integer": 38, + "date": "Mon Nov 07 2011 03:37:10 GMT-0800 (PST)", + "shortText": "laborum ipsum enim et quis", + "mediumText": "Nulla proident ut aliquip consectetur occaecat aliqua laboris incididunt. Reprehenderit labore laborum sint non mollit reprehenderit amet ullamco proident dolore cupidatat ad adipisicing. Cupidatat consectetur mollit enim sit ipsum sunt consequat.", + "longText": "Lorem adipisicing velit in ipsum aliqua ad anim nulla tempor id eu laboris. Sunt velit minim elit laboris tempor irure culpa laboris laborum qui pariatur est. Ea laboris id nostrud exercitation non. Aute irure do eiusmod in. Anim pariatur proident enim ex commodo cupidatat nisi dolore non est cupidatat reprehenderit. Id deserunt amet aliquip in quis do ipsum duis ipsum deserunt commodo culpa incididunt irure. Deserunt aliquip incididunt eiusmod laboris et culpa qui Lorem ad magna voluptate ad est.\r\nMollit velit ut eu magna non proident ullamco. Aliquip incididunt consectetur nostrud sunt sint eu labore magna ex. Reprehenderit labore cupidatat voluptate eiusmod pariatur consequat proident aliquip. Ea irure ad aliqua eu exercitation ullamco laborum duis. Ea et quis esse magna sunt quis tempor irure elit veniam sunt nulla irure nisi.\r\nIrure consequat veniam esse ea nostrud excepteur ipsum. Dolore minim tempor in ad ex aliquip amet. Sint id excepteur commodo ipsum ullamco consequat ut nisi nulla.\r\nQuis sunt reprehenderit ad quis. Fugiat commodo adipisicing ex irure consectetur ullamco ullamco culpa ullamco aliqua laborum aliquip duis incididunt. Lorem Lorem est fugiat ex veniam minim amet magna minim quis incididunt ullamco nostrud. Qui nostrud reprehenderit sint non sint irure adipisicing mollit mollit proident consequat nostrud esse pariatur. Ex aute velit magna enim veniam enim id eiusmod. Adipisicing Lorem eiusmod ea minim anim do deserunt pariatur aliquip qui ullamco velit qui.\r\nMollit occaecat voluptate sint ea dolor non ullamco nostrud enim minim duis sit amet. Enim ex reprehenderit nisi ipsum deserunt. Aliqua sit Lorem esse qui et deserunt esse.\r\n", + "address": "4 Apollo Street", + "city": "Gilgo", + "state": "Washington", + "zip": 82570, + "country": "Latvia", + "email": "leaunderwood@scentric.com", + "phone": "(828) 506-3671", + "color": "rgb(157,198,63)" + }, + { + "index": 419, + "name": "Casey Long", + "first": "Ella", + "last": "Ingram", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/avclarkey/73.jpg", + "boolean": false, + "guid": "9594164f-bed6-4350-84a7-8006ac0ac9a1", + "integer": 72, + "date": "Sun Nov 13 1988 09:05:46 GMT-0800 (PST)", + "shortText": "irure labore", + "mediumText": "Esse aliquip est ullamco velit. Amet tempor est consectetur consequat voluptate. Tempor ipsum fugiat enim et. Id officia cupidatat magna ullamco enim occaecat exercitation in sunt enim do nisi culpa cupidatat.", + "longText": "Eiusmod in et sit voluptate culpa sit velit et irure minim tempor ipsum. Aliqua elit consectetur ea aliqua excepteur eiusmod cillum dolor in ullamco. Commodo quis qui laborum labore minim. Ipsum est do proident labore incididunt nisi. Adipisicing magna velit sit consequat mollit proident commodo quis. Laboris quis elit adipisicing labore consectetur incididunt in reprehenderit enim. Magna cillum enim id veniam velit aliquip amet deserunt ea.\r\nReprehenderit ea ullamco do id tempor in duis nulla pariatur. Eiusmod adipisicing in consectetur exercitation. Fugiat enim veniam occaecat esse exercitation eu ullamco cillum quis consequat.\r\nAliqua non enim sunt amet cillum id proident do nulla eiusmod eu. Fugiat in nisi incididunt irure enim. Occaecat culpa tempor culpa anim laborum dolore consectetur Lorem eu.\r\nOfficia et aliqua aliqua ex occaecat est magna officia enim. Commodo officia dolor officia esse aute eiusmod. Velit quis reprehenderit reprehenderit laborum occaecat voluptate. Eiusmod dolor culpa irure do mollit excepteur ullamco aute est culpa. Ad ullamco incididunt minim eu mollit irure esse adipisicing laborum mollit cupidatat dolore.\r\n", + "address": "2 Dorchester Road", + "city": "Kersey", + "state": "Oregon", + "zip": 52838, + "country": "Netherlands Antilles", + "email": "ellaingram@scentric.com", + "phone": "(939) 546-2501", + "color": "rgb(50,99,109)" + }, + { + "index": 420, + "name": "Kent Fitzpatrick", + "first": "Lara", + "last": "Vinson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/arindam_/73.jpg", + "boolean": true, + "guid": "8c5b6ef8-755b-48a6-9d5c-2fbfc73015b9", + "integer": 94, + "date": "Wed Nov 13 1991 18:16:19 GMT-0800 (PST)", + "shortText": "labore", + "mediumText": "Esse ipsum culpa magna consequat fugiat magna aute.", + "longText": "Elit dolore incididunt non anim cupidatat magna exercitation quis ut eiusmod adipisicing mollit excepteur ut. Voluptate sunt velit cupidatat consectetur occaecat est sint eiusmod. Ullamco sint do magna quis culpa sit id pariatur reprehenderit reprehenderit cupidatat aliqua reprehenderit. Et cillum est nisi laborum nisi officia sint ut deserunt eiusmod in. Incididunt dolore duis eiusmod eiusmod officia.\r\nEiusmod occaecat sint mollit aliqua dolore velit ea laboris cupidatat adipisicing ullamco duis commodo. Laborum commodo officia tempor ea id eu aliquip quis veniam Lorem nostrud in duis fugiat. Quis aliquip esse cupidatat cillum quis sint. Aute sunt qui dolore laboris.\r\nTempor sunt tempor minim fugiat cupidatat occaecat aute adipisicing eu minim mollit fugiat exercitation. Tempor occaecat sint ad enim sit occaecat Lorem nisi. Sunt sunt occaecat nisi nisi eiusmod fugiat labore adipisicing sit sint ut.\r\nConsequat minim ad laboris et est. Voluptate cupidatat amet dolore consectetur deserunt nulla laboris proident consectetur nulla. Ex voluptate magna velit ex cillum do. Adipisicing adipisicing esse magna amet consectetur pariatur aute cupidatat eiusmod velit. Fugiat sint occaecat tempor qui cillum ad nulla. Aliquip aliqua in aute dolor laborum cupidatat adipisicing mollit excepteur tempor do sunt adipisicing in. Ipsum ex dolore cupidatat non minim ullamco velit cillum irure aute irure occaecat.\r\n", + "address": "2 Reeve Place", + "city": "Grahamtown", + "state": "Illinois", + "zip": 69832, + "country": "Colombia", + "email": "laravinson@scentric.com", + "phone": "(965) 578-3210", + "color": "rgb(152,231,185)" + }, + { + "index": 421, + "name": "Claudia Ochoa", + "first": "Maynard", + "last": "Giles", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/emmakardaras/73.jpg", + "boolean": true, + "guid": "97fdeebe-aaf9-4f67-a240-254056b3fbc4", + "integer": 43, + "date": "Thu Oct 04 2007 14:11:47 GMT-0700 (PDT)", + "shortText": "commodo nostrud", + "mediumText": "Consectetur aliquip reprehenderit magna id ex sint nostrud aute aliquip adipisicing. Laboris mollit aute ad ea pariatur proident laborum in sint consectetur velit anim.", + "longText": "Ea sint id dolore in enim non nulla tempor dolor excepteur non quis minim occaecat. Velit eu nostrud in eiusmod irure ea nulla in dolore Lorem consectetur ex in tempor. Ad duis ullamco dolor elit Lorem est dolore irure et non enim. Tempor laborum dolor velit consequat incididunt.\r\n", + "address": "2 Dikeman Street", + "city": "Wawona", + "state": "West Virginia", + "zip": 90747, + "country": "Wallis and Futuna Islands", + "email": "maynardgiles@scentric.com", + "phone": "(868) 426-2611", + "color": "rgb(82,210,230)" + }, + { + "index": 422, + "name": "Deleon Madden", + "first": "Jeri", + "last": "Roy", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/georgespillman/73.jpg", + "boolean": true, + "guid": "0eeed2b0-573c-4b2a-8cf7-24f3929d42f6", + "integer": 3, + "date": "Mon Jul 24 2006 08:25:36 GMT-0700 (PDT)", + "shortText": "tempor", + "mediumText": "Veniam mollit ut veniam anim ex proident nostrud. Qui dolore aute velit non voluptate sit ad reprehenderit sunt mollit. Reprehenderit fugiat occaecat duis mollit.", + "longText": "Reprehenderit exercitation nisi consequat veniam duis quis id aliqua ut ex aliqua sunt ipsum. Ad ad amet qui mollit officia Lorem exercitation dolore nulla. Quis commodo mollit sunt labore aliquip ipsum. Excepteur nisi non esse duis aliqua commodo officia consequat amet aliqua voluptate exercitation in nulla.\r\nConsectetur aute sit quis qui laboris. Laboris anim nulla in voluptate. Commodo magna nisi nisi commodo consectetur enim est do exercitation nisi. Mollit aliquip sint ea qui laborum.\r\nConsectetur eiusmod magna nisi mollit sint sunt id nostrud dolor eu. Exercitation mollit fugiat anim nisi nisi irure ipsum tempor eu. Est nisi consequat occaecat voluptate ad velit mollit amet. Elit est quis laboris culpa proident occaecat adipisicing officia cillum ea reprehenderit. Do quis ex aliqua culpa.\r\nIn minim proident enim nisi quis consequat. Deserunt veniam occaecat laborum laborum ex ipsum cupidatat commodo commodo adipisicing dolor in. Ex et est irure irure consequat ut sint in voluptate laborum eu nulla officia aute. Non enim magna nostrud deserunt minim pariatur irure elit ex qui minim. Exercitation nostrud dolore cupidatat dolore excepteur excepteur ad qui ex. Enim non occaecat ea enim officia exercitation proident irure nulla occaecat reprehenderit elit nostrud id. Culpa pariatur fugiat mollit labore non officia magna exercitation anim esse et.\r\n", + "address": "2 Lafayette Walk", + "city": "Kennedyville", + "state": "Mississippi", + "zip": 49852, + "country": "Bouvet Island", + "email": "jeriroy@scentric.com", + "phone": "(840) 457-2791", + "color": "rgb(127,95,131)" + }, + { + "index": 423, + "name": "Alexander Carroll", + "first": "Spears", + "last": "Obrien", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/fireupman/73.jpg", + "boolean": false, + "guid": "36236dec-3738-49d8-befd-946c2774fd1e", + "integer": 88, + "date": "Tue Jul 01 1986 19:56:06 GMT-0700 (PDT)", + "shortText": "aute non ex Lorem", + "mediumText": "Proident Lorem aliqua laboris adipisicing ullamco velit consequat exercitation nisi. Laborum enim duis nulla reprehenderit est eu ad laboris ad.", + "longText": "Adipisicing tempor commodo nulla sint tempor veniam deserunt do eiusmod. Do tempor voluptate cillum ipsum veniam voluptate occaecat enim cillum anim mollit ad adipisicing. Consequat consequat aute dolor anim ut. Incididunt Lorem mollit anim esse veniam.\r\nCillum consequat proident consectetur ex proident ad cupidatat laboris do officia. Amet deserunt eu eiusmod aliquip esse ipsum laboris. Do dolor nostrud dolore sint quis nulla pariatur quis adipisicing. Culpa exercitation incididunt ullamco culpa sit.\r\nDolore irure sunt eiusmod tempor. Esse deserunt ex elit Lorem et nulla esse officia ipsum culpa. Lorem sunt duis tempor nostrud enim ea excepteur ad. Ea ut commodo minim et adipisicing veniam exercitation ad et dolor et tempor et. Minim duis Lorem excepteur ipsum ipsum ea esse velit voluptate dolore tempor sunt nulla incididunt. Excepteur est est consectetur in. Aliquip nisi ipsum deserunt nulla.\r\n", + "address": "3 Doone Court", + "city": "Fulford", + "state": "Rhode Island", + "zip": 83826, + "country": "Niue", + "email": "spearsobrien@scentric.com", + "phone": "(832) 502-3659", + "color": "rgb(138,211,151)" + }, + { + "index": 424, + "name": "Debora Gibson", + "first": "Crane", + "last": "Lawrence", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kylefrost/73.jpg", + "boolean": false, + "guid": "0a2de76d-c5db-4e74-89e0-3ff39bf504ad", + "integer": 29, + "date": "Fri Apr 01 1977 03:54:28 GMT-0800 (PST)", + "shortText": "reprehenderit", + "mediumText": "Esse veniam veniam in do incididunt non culpa laborum.", + "longText": "Ullamco exercitation deserunt enim est ea. Ullamco irure ipsum dolore labore do nisi in minim occaecat irure reprehenderit sit. Elit culpa officia ut labore nulla duis ullamco magna culpa veniam. Cupidatat irure esse voluptate amet sit aliquip est pariatur ut deserunt enim labore. Nulla occaecat cupidatat et ex amet qui esse. Eu ullamco adipisicing aliquip consectetur voluptate officia magna incididunt officia reprehenderit.\r\nNon id magna esse tempor commodo reprehenderit quis culpa dolore mollit cupidatat non. Ullamco sit aute consectetur aliquip et amet eu dolore dolor amet occaecat. Cillum labore cupidatat esse veniam irure dolor minim minim dolore excepteur do minim exercitation est. Tempor dolor Lorem ipsum cupidatat aliqua ea est velit excepteur excepteur anim magna esse consectetur. Labore fugiat laboris excepteur mollit qui esse aliquip aliqua tempor. Eiusmod magna eiusmod incididunt exercitation nostrud dolore consectetur sunt ullamco. Cillum aliquip et cillum officia est nostrud enim sit irure proident elit ipsum.\r\n", + "address": "3 Dean Street", + "city": "Freeburn", + "state": "Georgia", + "zip": 97509, + "country": "Sweden", + "email": "cranelawrence@scentric.com", + "phone": "(871) 449-2232", + "color": "rgb(249,221,142)" + }, + { + "index": 425, + "name": "Effie Witt", + "first": "Tamika", + "last": "Mcfarland", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/quser/73.jpg", + "boolean": false, + "guid": "24996c53-4fce-4e30-9a15-01ad7f8a690e", + "integer": 72, + "date": "Sun Nov 03 1991 09:36:14 GMT-0800 (PST)", + "shortText": "dolore ullamco do dolor", + "mediumText": "Ad ex aliquip minim exercitation ex incididunt adipisicing sit sit aliqua. Laboris voluptate sint Lorem officia pariatur nostrud non amet ea consectetur esse. Amet aliqua id est irure minim duis nostrud laboris laborum reprehenderit. Ea anim proident nisi adipisicing dolor. Magna mollit do irure do veniam minim proident.", + "longText": "Laboris aute duis aliquip pariatur adipisicing irure adipisicing sunt irure commodo nulla occaecat amet veniam. Nostrud ex voluptate elit nulla voluptate culpa dolore excepteur. Qui ea ex adipisicing proident sint adipisicing ea. Nulla consequat enim et consequat ad ullamco magna anim tempor excepteur. Amet officia irure adipisicing in eiusmod minim eu sunt in veniam culpa. Quis eu aliqua proident in aute proident ea. Adipisicing occaecat laborum consectetur elit aute velit ullamco ad cillum ipsum non aliquip.\r\nCommodo qui incididunt deserunt enim excepteur ut fugiat. Consectetur aliquip incididunt est minim nostrud irure officia enim occaecat quis minim pariatur. Cillum aliquip commodo excepteur incididunt officia tempor ea occaecat in tempor magna.\r\n", + "address": "4 Homecrest Avenue", + "city": "Tioga", + "state": "New Mexico", + "zip": 47382, + "country": "Bolivia", + "email": "tamikamcfarland@scentric.com", + "phone": "(822) 428-3372", + "color": "rgb(123,143,247)" + }, + { + "index": 426, + "name": "Marissa Winters", + "first": "Bradford", + "last": "Tate", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/maikelk/73.jpg", + "boolean": true, + "guid": "03ba235d-b8bd-446d-a82f-209ef1f02bc3", + "integer": 21, + "date": "Sat Feb 21 1987 11:19:00 GMT-0800 (PST)", + "shortText": "deserunt mollit", + "mediumText": "Velit non amet irure dolore nisi proident nisi.", + "longText": "Et ad occaecat ipsum amet aliquip sit nisi. Adipisicing ut esse dolore aliquip ut. Aliqua sunt anim ullamco voluptate eiusmod est et nulla amet duis voluptate enim elit. Ea consequat ea aliquip nulla enim in enim mollit ea consequat.\r\n", + "address": "3 Bush Street", + "city": "Trinway", + "state": "Arizona", + "zip": 66056, + "country": "Barbados", + "email": "bradfordtate@scentric.com", + "phone": "(895) 532-2566", + "color": "rgb(254,114,222)" + }, + { + "index": 427, + "name": "Keri Holt", + "first": "Pate", + "last": "Ford", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ifarafonow/73.jpg", + "boolean": true, + "guid": "fe01b1c1-e14b-4167-92b2-6eef711b41a3", + "integer": 74, + "date": "Sun Jul 01 1979 19:51:30 GMT-0700 (PDT)", + "shortText": "eiusmod pariatur sunt sit", + "mediumText": "Tempor officia velit commodo aute laborum nostrud incididunt id id et. Esse cillum do deserunt sit tempor nisi ipsum sint proident sint. Aute officia esse voluptate pariatur ut. In consequat eiusmod exercitation nostrud reprehenderit et.", + "longText": "Voluptate pariatur eu eu voluptate enim cillum consequat proident pariatur esse est veniam. Qui nisi nulla laborum adipisicing irure occaecat. Mollit amet ullamco velit et reprehenderit amet. Ex ex quis do et anim fugiat exercitation nulla fugiat. Fugiat deserunt irure voluptate consequat reprehenderit Lorem sint ullamco. Ipsum non labore occaecat incididunt amet esse elit enim nostrud eu Lorem nisi.\r\nId culpa non enim aliquip dolore. Laborum nostrud minim deserunt excepteur exercitation voluptate eiusmod. Adipisicing pariatur occaecat voluptate reprehenderit aute. Aliquip incididunt non adipisicing veniam adipisicing occaecat do irure occaecat aliqua veniam laboris. Nulla veniam minim reprehenderit laboris in ut id nulla eiusmod dolor ut voluptate. Tempor enim nostrud ut velit eu cupidatat amet.\r\nAute ipsum ex nulla ut labore ex exercitation nulla anim. Pariatur sit voluptate reprehenderit enim amet. In duis sint excepteur anim proident elit proident non adipisicing exercitation aliquip. Reprehenderit occaecat duis ipsum eu et ad elit do sunt fugiat aliqua. Ea enim mollit dolore qui reprehenderit pariatur nostrud. Aliqua voluptate adipisicing ipsum occaecat cupidatat est do esse sunt enim aliquip sit adipisicing nulla.\r\nId ullamco amet ad deserunt. Pariatur duis ea excepteur proident ad cupidatat consectetur mollit et sint officia voluptate. Sunt et aliqua anim quis proident culpa cillum. Deserunt consequat dolore do anim eiusmod magna. Quis dolor adipisicing anim aliquip exercitation quis adipisicing. Culpa ipsum ea enim anim aliqua occaecat aliquip non reprehenderit dolor. Non proident labore enim est.\r\nProident reprehenderit sunt est aliqua. Dolor ex voluptate occaecat Lorem velit minim do voluptate aute in aliqua. Aute ut voluptate Lorem eu occaecat non deserunt nulla Lorem do minim magna. Duis sit nisi commodo aliquip enim pariatur. Cillum velit officia proident irure dolor.\r\n", + "address": "3 Aviation Road", + "city": "Baker", + "state": "Texas", + "zip": 94487, + "country": "Haiti", + "email": "pateford@scentric.com", + "phone": "(933) 513-2608", + "color": "rgb(74,250,221)" + }, + { + "index": 428, + "name": "Billie Dennis", + "first": "Noreen", + "last": "Chambers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ananya159/73.jpg", + "boolean": true, + "guid": "1277af24-5433-4c02-a123-9dbc3554824d", + "integer": 91, + "date": "Tue Jun 01 1999 05:28:24 GMT-0700 (PDT)", + "shortText": "anim consectetur minim esse", + "mediumText": "Sunt eu velit irure ipsum velit.", + "longText": "Culpa ipsum irure eiusmod et ad esse cillum. In ipsum qui dolor dolor. Ex deserunt incididunt duis exercitation quis est esse. Anim adipisicing ipsum aute qui mollit. Occaecat veniam excepteur velit nostrud cillum in nostrud ex magna ex.\r\nNostrud ipsum do deserunt ipsum consequat cupidatat elit fugiat duis duis consequat magna ea. Do labore ea do et cupidatat mollit et eiusmod. Exercitation exercitation aliqua ea irure duis. Lorem ipsum eu veniam ad nulla nisi ipsum in eu laborum pariatur ipsum cupidatat officia. Adipisicing pariatur velit commodo ipsum sint fugiat elit esse dolore ipsum ut exercitation officia excepteur.\r\n", + "address": "2 Jerome Street", + "city": "Fostoria", + "state": "District Of Columbia", + "zip": 51169, + "country": "Heard and McDonald Islands", + "email": "noreenchambers@scentric.com", + "phone": "(921) 600-2756", + "color": "rgb(240,228,68)" + }, + { + "index": 429, + "name": "Norris Henderson", + "first": "Rhea", + "last": "Velasquez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/horaciobella/73.jpg", + "boolean": true, + "guid": "f6c07756-a3f1-410c-a912-acb877dca497", + "integer": 10, + "date": "Thu Jul 17 2008 11:56:06 GMT-0700 (PDT)", + "shortText": "adipisicing irure cillum", + "mediumText": "Sint duis irure cupidatat aliqua nostrud magna aliquip do do quis mollit occaecat.", + "longText": "Dolor et duis nisi est elit dolore amet enim et ad officia duis. Pariatur adipisicing aliquip reprehenderit exercitation qui occaecat consequat excepteur anim est do mollit amet. In eu eiusmod ea elit. Laborum duis culpa reprehenderit reprehenderit.\r\nOccaecat culpa aliquip elit sunt proident mollit ad reprehenderit occaecat consequat. Id pariatur commodo consectetur cillum laboris et dolor ea voluptate. Laborum magna nisi sunt eu ut mollit amet esse consectetur sunt. Est qui ea cillum excepteur ullamco velit excepteur in ea incididunt ipsum. Tempor reprehenderit velit non adipisicing dolore non nisi proident consequat sit. Nulla est incididunt sint proident do sunt ipsum adipisicing Lorem ad.\r\nNulla excepteur enim ipsum est. Dolor magna consequat ex magna nostrud duis eiusmod enim nulla reprehenderit esse fugiat irure amet. Et officia voluptate aliqua dolore fugiat voluptate nisi mollit occaecat ipsum qui. Fugiat sint magna et cillum aliqua cupidatat deserunt cupidatat aute laboris.\r\nEiusmod consequat ea aute cillum do enim quis commodo excepteur magna labore elit. Voluptate nisi velit dolore consequat elit irure fugiat. Sunt veniam ea enim ullamco esse excepteur quis voluptate excepteur Lorem nostrud amet. Ad commodo labore excepteur velit sunt ut. Ullamco consectetur esse voluptate eu minim deserunt nulla ipsum reprehenderit deserunt laborum.\r\nDuis adipisicing reprehenderit enim qui. Sit duis fugiat dolore consequat mollit incididunt irure ullamco proident quis minim qui ex irure. Est magna laboris magna minim aute excepteur commodo ullamco duis duis nulla sunt deserunt. Irure sunt ea do ipsum aliquip nisi nulla ex ex nostrud. Elit amet voluptate commodo id minim ut est ut minim adipisicing in. Eu nostrud anim irure do eu consectetur anim esse eiusmod officia laboris.\r\n", + "address": "2 Fillmore Place", + "city": "Castleton", + "state": "Virgin Islands", + "zip": 22826, + "country": "United States", + "email": "rheavelasquez@scentric.com", + "phone": "(801) 444-3966", + "color": "rgb(186,114,65)" + }, + { + "index": 430, + "name": "Carrillo Park", + "first": "Ola", + "last": "Allison", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/thatdesigner/73.jpg", + "boolean": true, + "guid": "3a544cbd-1319-4b62-b664-89f96dc2d58f", + "integer": 79, + "date": "Wed Feb 03 1999 14:08:18 GMT-0800 (PST)", + "shortText": "tempor", + "mediumText": "Id et eiusmod ad sunt laborum. Veniam magna veniam ea incididunt occaecat quis veniam et laboris aliquip ea Lorem ut. Eu officia incididunt eu veniam.", + "longText": "Voluptate reprehenderit nostrud non adipisicing ad ex enim. Id incididunt veniam pariatur ut id qui fugiat reprehenderit laboris consequat officia. Aliquip exercitation excepteur elit aliqua esse tempor nulla laborum.\r\nIn mollit reprehenderit irure duis cupidatat ad velit irure ad. Est et laborum non reprehenderit. Est elit non aliquip pariatur do dolore Lorem enim exercitation tempor. Amet culpa ut nostrud dolor fugiat.\r\nNon duis aliquip laboris consequat nisi sunt ad velit ipsum eu deserunt sit labore. Qui velit ipsum cupidatat ad irure nisi adipisicing eu. Reprehenderit deserunt cillum ut exercitation labore enim deserunt elit. Incididunt sint reprehenderit aliquip eiusmod consectetur quis ad pariatur ea dolor ea minim ex. Non labore labore amet excepteur aliquip amet anim do in eiusmod sunt laboris nisi. Est qui qui laboris veniam elit elit sunt in. Tempor commodo ex ea laborum.\r\nDolore dolore dolore labore velit fugiat commodo consectetur. Ullamco qui quis labore velit exercitation irure voluptate nulla duis occaecat. Ad quis ullamco magna occaecat esse dolore et id reprehenderit enim nisi commodo irure.\r\nFugiat proident deserunt nulla et pariatur ullamco do. Enim cillum nulla sint in laboris cillum excepteur anim irure ad sint laboris tempor nostrud. Enim pariatur amet sint non nisi commodo. Cupidatat qui incididunt sit labore ex enim Lorem aute excepteur veniam consequat nisi labore. Proident dolor excepteur aute et proident. Veniam excepteur veniam laboris deserunt sint.\r\n", + "address": "3 Noel Avenue", + "city": "Seymour", + "state": "Puerto Rico", + "zip": 59608, + "country": "Jamaica", + "email": "olaallison@scentric.com", + "phone": "(813) 560-2883", + "color": "rgb(206,102,76)" + }, + { + "index": 431, + "name": "Aileen Manning", + "first": "Sophia", + "last": "House", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/snaphappydad/73.jpg", + "boolean": false, + "guid": "832335a5-d05a-4d43-8c98-091dad23386f", + "integer": 82, + "date": "Fri Feb 17 2012 22:56:46 GMT-0800 (PST)", + "shortText": "amet est Lorem velit tempor", + "mediumText": "Cupidatat incididunt do aliqua velit occaecat officia occaecat amet occaecat Lorem veniam eu ipsum cillum. Amet esse aliqua in qui excepteur commodo veniam ut velit.", + "longText": "Officia esse consectetur proident consequat. Ex eiusmod cupidatat labore velit anim fugiat amet ipsum labore. Ut velit id ullamco occaecat et. Labore amet consequat excepteur adipisicing ut nisi dolore consectetur tempor veniam mollit reprehenderit quis. Esse ad irure elit et.\r\n", + "address": "3 Cove Lane", + "city": "Mappsville", + "state": "Maryland", + "zip": 46354, + "country": "Sao Tome and Principe", + "email": "sophiahouse@scentric.com", + "phone": "(829) 411-2721", + "color": "rgb(188,234,157)" + }, + { + "index": 432, + "name": "Angeline Welch", + "first": "Riggs", + "last": "Albert", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/cristianovalim/73.jpg", + "boolean": true, + "guid": "ff60a0af-9800-4828-beec-cc4ad3e7a4f5", + "integer": 75, + "date": "Wed Oct 28 1992 15:16:43 GMT-0800 (PST)", + "shortText": "laborum aliquip minim", + "mediumText": "Minim est qui proident deserunt nostrud commodo nisi non in veniam duis. Nisi minim aliqua cupidatat est dolore consequat nisi. Proident ut incididunt aute ea qui id reprehenderit veniam commodo.", + "longText": "Eu velit exercitation id amet. Incididunt eu nulla occaecat sunt pariatur culpa magna incididunt mollit id consectetur exercitation. Dolor pariatur voluptate aliquip quis aliquip anim amet qui commodo elit fugiat. Non dolore Lorem laboris voluptate voluptate ex anim eiusmod quis id magna proident.\r\nElit aliqua velit consequat velit laboris officia ut cillum mollit nulla culpa. Ut ea qui minim deserunt aliquip cillum ea proident duis. Laborum fugiat consequat ex magna irure proident reprehenderit officia consectetur fugiat excepteur laborum et. Est veniam non elit nisi minim. Ex sunt elit minim incididunt eu officia excepteur mollit nisi ad. Do est nisi magna et tempor culpa. Elit irure ex ut cillum ipsum ipsum ex esse dolor.\r\n", + "address": "4 Irvington Place", + "city": "Kempton", + "state": "Massachusetts", + "zip": 55149, + "country": "Belarus", + "email": "riggsalbert@scentric.com", + "phone": "(964) 471-3289", + "color": "rgb(143,144,152)" + }, + { + "index": 433, + "name": "Wilder Parks", + "first": "Guzman", + "last": "Gay", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pmeissner/73.jpg", + "boolean": true, + "guid": "34d47442-340f-4017-a323-333b9d8966a7", + "integer": 46, + "date": "Sat May 01 1982 19:47:12 GMT-0700 (PDT)", + "shortText": "fugiat nisi fugiat", + "mediumText": "Lorem ipsum ipsum elit ad reprehenderit do culpa proident qui labore ea cillum tempor aute. Velit nisi anim excepteur commodo tempor. Id reprehenderit reprehenderit adipisicing exercitation aliqua ipsum dolore est cillum pariatur in quis est. Ad adipisicing irure qui ullamco eiusmod excepteur laborum.", + "longText": "Lorem id elit est velit veniam ullamco voluptate et do. Non ea ad minim Lorem in. Laborum amet enim magna et qui eu ullamco labore do minim in magna esse veniam. Incididunt nostrud nulla ut excepteur et et. Laborum labore qui adipisicing consectetur adipisicing incididunt excepteur Lorem eu nulla tempor ipsum. Ipsum labore dolore in qui irure pariatur proident laboris tempor ipsum culpa est ea cillum. Lorem sunt eu proident enim.\r\n", + "address": "4 Cumberland Street", + "city": "Enlow", + "state": "Oklahoma", + "zip": 93935, + "country": "Russian Federation", + "email": "guzmangay@scentric.com", + "phone": "(995) 459-2856", + "color": "rgb(54,118,212)" + }, + { + "index": 434, + "name": "Nash Valencia", + "first": "Leanne", + "last": "Stafford", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/akbarbobojonov/73.jpg", + "boolean": false, + "guid": "0594778f-1bb9-4338-88af-480e9dcce7ec", + "integer": 12, + "date": "Wed Aug 07 1985 09:48:17 GMT-0700 (PDT)", + "shortText": "exercitation", + "mediumText": "Incididunt commodo exercitation do eu laborum do fugiat aute dolore nostrud proident tempor. Aute laborum elit dolor sint aliquip mollit laboris tempor ea irure incididunt magna. Id aliquip sit do magna.", + "longText": "Consectetur voluptate duis cupidatat incididunt laborum. Magna non laboris reprehenderit duis consequat cupidatat aliquip ex aliquip pariatur. Adipisicing incididunt pariatur magna adipisicing amet dolore pariatur laboris nulla esse duis labore. Dolore est aute do do culpa pariatur. Consequat ea minim qui laborum culpa velit id fugiat nostrud sint. Ipsum irure cillum quis officia eu laboris.\r\nLorem ex duis eu deserunt minim cupidatat et non non et sunt. Pariatur ut culpa et non non voluptate ut velit sunt eu non. Cillum exercitation veniam nostrud est id laboris. Tempor do et consectetur reprehenderit ut dolor deserunt fugiat consectetur velit. Nulla elit deserunt dolor do cupidatat amet velit consectetur. Consectetur in nostrud sunt deserunt est aute cupidatat mollit aliquip sint cupidatat sit esse. Ut eu ut veniam sunt do proident cillum velit voluptate.\r\nCupidatat et aute tempor dolore. Aute exercitation sunt eiusmod ut consequat ut pariatur et excepteur. Tempor ea deserunt duis incididunt aute minim cupidatat veniam non elit.\r\nEiusmod occaecat culpa ipsum enim deserunt qui irure. Reprehenderit dolor quis dolor dolore culpa aliquip ipsum. Enim aliquip ullamco minim laboris do non laborum sint id incididunt voluptate. Do ea enim cupidatat deserunt ipsum nulla mollit ullamco laborum sint.\r\nElit minim et cupidatat voluptate aliqua proident mollit amet qui cupidatat. Enim cillum commodo consequat adipisicing dolore occaecat sit consectetur incididunt pariatur tempor. Ea eu do ea elit et.\r\n", + "address": "2 Hopkins Street", + "city": "Sunwest", + "state": "Ohio", + "zip": 99728, + "country": "Croatia (Hrvatska)", + "email": "leannestafford@scentric.com", + "phone": "(976) 400-2448", + "color": "rgb(172,121,148)" + }, + { + "index": 435, + "name": "Mann Lindsey", + "first": "Angelita", + "last": "Holland", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pjnes/73.jpg", + "boolean": true, + "guid": "b158f0bc-58b6-497c-b8e9-827e2fd5adcb", + "integer": 86, + "date": "Tue Mar 30 1999 04:50:25 GMT-0800 (PST)", + "shortText": "nulla", + "mediumText": "Cupidatat sint laboris irure irure quis irure laborum anim ex aliquip ad. Ullamco anim cillum ex aliqua cillum reprehenderit ipsum exercitation ea non laborum nulla. Consectetur dolor duis anim irure duis dolor qui sint aliquip est pariatur ullamco.", + "longText": "Laboris minim commodo qui ad mollit non sunt laborum dolore irure ad dolore aliquip sit. Eu ullamco nulla magna velit non. Cupidatat nulla reprehenderit qui elit nisi mollit adipisicing anim. Irure laborum aute culpa nisi et voluptate esse minim.\r\nEt proident ipsum ex reprehenderit deserunt nostrud amet commodo nulla eu tempor culpa sit. Aute fugiat dolor commodo quis laboris nulla ea laboris. Et excepteur laborum aute et.\r\nPariatur et excepteur irure tempor duis consectetur nisi pariatur in ea ut commodo ad. Esse sint tempor qui consectetur ad nisi ut reprehenderit sit excepteur. Dolore mollit voluptate ipsum ad in aliqua nisi. Officia nulla aliquip tempor do culpa velit. Ut Lorem non cillum ipsum. Qui exercitation non velit elit quis voluptate ipsum adipisicing occaecat minim. Est consectetur duis minim irure reprehenderit.\r\nVoluptate deserunt duis ut elit ut cillum officia nulla sint do. Elit deserunt est mollit mollit et ullamco dolore. Amet consequat pariatur cupidatat velit. Eiusmod elit qui mollit nisi ipsum enim. Ullamco eu commodo est consequat. Voluptate excepteur adipisicing ad sit velit duis enim fugiat et sit nisi veniam ipsum occaecat.\r\nAnim exercitation mollit ullamco sunt pariatur excepteur anim exercitation velit ex enim fugiat. Ullamco excepteur ex sint nulla laboris qui anim sunt nisi. Esse ea exercitation dolore adipisicing. Quis amet aute consequat occaecat officia ea nulla.\r\n", + "address": "3 Williamsburg Street", + "city": "Hiwasse", + "state": "Nevada", + "zip": 20139, + "country": "Indonesia", + "email": "angelitaholland@scentric.com", + "phone": "(939) 494-2894", + "color": "rgb(245,81,217)" + }, + { + "index": 436, + "name": "Herring Barry", + "first": "Fanny", + "last": "Mills", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/balintorosz/73.jpg", + "boolean": true, + "guid": "80d4034b-37c2-4d36-8a84-8902d6dbd1e8", + "integer": 7, + "date": "Thu Feb 26 1987 04:22:07 GMT-0800 (PST)", + "shortText": "culpa veniam laborum", + "mediumText": "Eu culpa qui cillum nulla occaecat irure proident laboris. Enim Lorem eiusmod minim magna ea eu reprehenderit eu ea nulla aute. Et in laborum aliqua consectetur consectetur aute sint velit fugiat dolore.", + "longText": "Minim ea magna laboris commodo in fugiat qui non reprehenderit. Sint tempor labore qui ullamco nisi tempor consequat tempor quis. Aute dolore minim nulla magna ut ex commodo mollit dolor ipsum dolor. Eu eu labore deserunt et occaecat excepteur consectetur cupidatat mollit nisi.\r\nTempor aute culpa sit occaecat consequat. Culpa ullamco proident aliquip labore. Reprehenderit pariatur aute fugiat irure adipisicing sint anim anim occaecat adipisicing labore ipsum deserunt consectetur. Voluptate eiusmod eu pariatur proident nostrud sint labore. Sit adipisicing ipsum proident non incididunt mollit minim labore elit nulla elit et occaecat.\r\nSit culpa veniam id minim minim dolore elit culpa ut enim est. Ex adipisicing deserunt ex officia commodo sit nostrud labore aute est sit. Elit eu sint consequat cillum deserunt eu anim nostrud reprehenderit cupidatat occaecat consequat. Sint anim est ullamco non sint dolore excepteur.\r\n", + "address": "2 Grand Avenue", + "city": "Gasquet", + "state": "Montana", + "zip": 88459, + "country": "Nauru", + "email": "fannymills@scentric.com", + "phone": "(961) 418-2958", + "color": "rgb(207,161,63)" + }, + { + "index": 437, + "name": "Davenport Knowles", + "first": "Carol", + "last": "Acevedo", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/martinhn/73.jpg", + "boolean": true, + "guid": "20017740-0bff-43ce-a66b-b139bdd82fdf", + "integer": 10, + "date": "Sat Aug 12 1989 13:36:36 GMT-0700 (PDT)", + "shortText": "tempor fugiat ex do", + "mediumText": "Culpa quis minim eiusmod veniam ullamco cupidatat velit dolore cillum aute duis reprehenderit. Enim cupidatat dolore qui ex dolor magna mollit amet adipisicing dolor.", + "longText": "Voluptate ex duis culpa est ullamco magna ullamco id. Magna ullamco aliquip anim laborum velit deserunt consectetur sunt irure. Anim nulla ullamco veniam sint ex culpa eu minim dolor excepteur. Adipisicing ex tempor duis ea. Labore enim pariatur dolore irure et elit ad ipsum exercitation mollit aliqua deserunt. Minim labore ea dolor duis tempor veniam id incididunt occaecat non incididunt dolor sit.\r\nLaboris voluptate duis deserunt aute sunt et voluptate proident est nulla. Labore aute esse est nisi in excepteur laborum irure. Fugiat sint qui esse excepteur duis qui do labore. Non incididunt elit nulla ex officia cupidatat elit culpa id aliqua. Ex aute esse ex reprehenderit. Veniam excepteur aliquip irure laborum eiusmod. Elit qui sunt mollit dolor non fugiat est qui nostrud est do consequat aute officia.\r\nConsequat occaecat incididunt enim excepteur nostrud dolor amet duis ea irure sit. Veniam et reprehenderit labore officia ex ipsum officia consequat voluptate. Incididunt duis commodo deserunt aute deserunt dolore sunt Lorem. Veniam non ea laborum mollit aliquip qui eu fugiat duis. Fugiat id sunt aute mollit elit sit incididunt veniam tempor. Consectetur pariatur consectetur labore et non et commodo qui mollit minim enim esse. Et proident elit minim est occaecat.\r\nDo aliquip excepteur nulla elit. Laboris consequat do officia veniam laboris. Non quis velit velit ipsum sint amet ut aliqua quis laboris est pariatur ut officia. Eu esse consequat irure dolore quis in sit. Labore ipsum minim ad ut voluptate ea non. In voluptate magna esse est elit voluptate labore irure minim aliqua velit laborum et nulla. Ipsum nostrud est consequat tempor velit culpa sint fugiat dolor.\r\nLorem esse aliqua cillum excepteur labore proident ipsum dolor enim ut aliquip laboris ut. Ullamco aliqua pariatur enim dolore est irure. Quis nisi officia mollit nostrud consectetur pariatur ad id adipisicing aute laboris qui reprehenderit tempor. Nulla non nostrud excepteur duis excepteur quis. Ex do voluptate sit Lorem ea irure eu velit culpa.\r\n", + "address": "2 Lincoln Terrace", + "city": "Eggertsville", + "state": "California", + "zip": 49607, + "country": "Ireland", + "email": "carolacevedo@scentric.com", + "phone": "(873) 489-2712", + "color": "rgb(215,231,234)" + }, + { + "index": 438, + "name": "Sonia Moses", + "first": "Patel", + "last": "Thompson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/sasha_shestakov/73.jpg", + "boolean": false, + "guid": "e3a9a23d-000c-47aa-8039-4fce46c5565c", + "integer": 26, + "date": "Sun Jan 13 1991 10:21:14 GMT-0800 (PST)", + "shortText": "enim tempor ea", + "mediumText": "Deserunt consectetur velit proident ipsum aute sunt ullamco incididunt consequat aliqua sit mollit. Sit deserunt minim eu laborum quis cupidatat nulla id sit esse ea ad amet.", + "longText": "Dolor anim incididunt ullamco esse qui occaecat in dolore Lorem. Nisi eiusmod laboris ullamco quis consequat pariatur et cupidatat ad exercitation. In eu cillum occaecat amet tempor cillum. Exercitation id ullamco mollit non. Eiusmod culpa reprehenderit consectetur officia officia ad elit adipisicing est ut ea. Fugiat dolor nostrud occaecat consequat elit nulla ex. Ullamco pariatur incididunt nisi voluptate consequat deserunt proident exercitation ad labore ad.\r\nExcepteur tempor dolor eu duis Lorem deserunt elit ipsum. Cillum velit dolor esse Lorem commodo. Sint cupidatat ex deserunt voluptate adipisicing eiusmod sit proident aliqua excepteur. Consequat cillum irure sint ex reprehenderit incididunt est.\r\nCommodo minim cupidatat voluptate aliqua laborum deserunt sint elit nisi officia sit nostrud. Lorem exercitation laborum mollit adipisicing quis. Ad officia nisi cillum consequat non sunt sunt. Nulla id labore ut qui deserunt aute officia voluptate dolor laboris laboris reprehenderit do. Irure esse Lorem labore enim culpa eu amet ut aliquip esse exercitation elit. Nulla do id anim exercitation commodo pariatur nostrud incididunt aliquip irure. Deserunt ea do velit veniam duis culpa aliqua elit consequat amet aliqua qui.\r\nAliquip et nostrud tempor occaecat amet nulla duis non amet. Ipsum mollit mollit tempor nostrud sint aliqua ea aliquip non pariatur esse nulla cillum magna. Adipisicing excepteur Lorem cillum nisi sint magna laboris do ipsum aliquip eiusmod veniam ullamco.\r\n", + "address": "2 Prescott Place", + "city": "Norwood", + "state": "Marshall Islands", + "zip": 70002, + "country": "Luxembourg", + "email": "patelthompson@scentric.com", + "phone": "(883) 472-3011", + "color": "rgb(207,132,88)" + }, + { + "index": 439, + "name": "Gabrielle Black", + "first": "Holmes", + "last": "Valentine", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/vovkasolovev/73.jpg", + "boolean": false, + "guid": "4bc9e815-0354-4c95-b76c-945cd74c26d0", + "integer": 40, + "date": "Mon May 10 2010 09:38:40 GMT-0700 (PDT)", + "shortText": "Lorem", + "mediumText": "Eiusmod velit ea exercitation voluptate qui labore voluptate amet proident. Ullamco nulla cupidatat id in anim. Cupidatat nisi culpa nostrud laboris aute labore sunt elit in mollit aliquip. Incididunt incididunt consequat aliqua ullamco velit.", + "longText": "Consequat sint ad reprehenderit nisi quis aliqua laborum sint elit pariatur labore magna officia. Occaecat culpa do laboris amet mollit ex velit. Proident fugiat sint laborum nostrud aute ex in veniam fugiat. Adipisicing velit ex non aliqua ex amet ex adipisicing enim consequat mollit occaecat irure cillum. Ad eu eiusmod cupidatat consectetur commodo laborum duis in sit labore laborum cillum. Enim qui cupidatat amet non fugiat.\r\nPariatur mollit consequat eiusmod consectetur labore velit cupidatat mollit sit nostrud laborum. Aliquip occaecat sunt aute occaecat exercitation enim quis excepteur amet id. Ullamco sunt est consequat do voluptate. Incididunt do anim do voluptate do ut deserunt minim enim non. Occaecat proident aute officia fugiat do sint in reprehenderit. Duis incididunt labore nisi laboris reprehenderit tempor non adipisicing enim ad pariatur commodo consectetur minim.\r\nTempor elit est et esse. Sit sint culpa laborum id et cupidatat qui cupidatat. Veniam veniam pariatur dolore ipsum quis officia aliquip eiusmod amet aliqua occaecat tempor laboris irure. Aute in pariatur cillum irure. Fugiat in nisi Lorem sit sint amet amet. Proident eu voluptate irure ipsum cupidatat aliquip cupidatat tempor ea labore enim. Cupidatat duis velit irure eiusmod pariatur reprehenderit eu excepteur enim nostrud mollit commodo.\r\nVelit mollit Lorem enim ullamco nostrud exercitation. Enim occaecat Lorem aliquip nulla velit fugiat. Ullamco voluptate non fugiat non minim voluptate velit. Duis dolor laborum qui est enim ut. Nulla reprehenderit esse ea nisi sit et non nulla voluptate laboris ullamco. Labore in fugiat esse culpa dolor duis anim sunt duis do sint officia non. Laborum dolor pariatur consequat ullamco fugiat.\r\n", + "address": "3 Pleasant Place", + "city": "Fairforest", + "state": "Indiana", + "zip": 30882, + "country": "Afghanistan", + "email": "holmesvalentine@scentric.com", + "phone": "(990) 581-2101", + "color": "rgb(140,238,67)" + }, + { + "index": 440, + "name": "Lakisha Cross", + "first": "Pena", + "last": "Compton", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/urbanjahvier/73.jpg", + "boolean": false, + "guid": "cd35d1ad-004f-43fa-a754-2ab807d0ab4d", + "integer": 1, + "date": "Mon Feb 27 2012 17:16:59 GMT-0800 (PST)", + "shortText": "adipisicing anim velit esse", + "mediumText": "Dolor excepteur non id laboris. Consectetur in duis sint labore duis ut. Consequat elit adipisicing amet cillum non tempor pariatur.", + "longText": "Ipsum non enim aliqua culpa velit enim deserunt proident laboris sunt. Sunt esse officia qui est ut ad cillum eu est cupidatat Lorem proident incididunt. Officia duis culpa duis in exercitation irure officia quis aliquip. Tempor nulla consequat exercitation eu nulla.\r\nEu enim labore excepteur proident. Commodo aliqua Lorem aute dolore ullamco ipsum mollit exercitation veniam. Labore enim veniam ea aliquip esse non id aliqua aliquip nostrud aliquip eu voluptate. Do reprehenderit velit proident ad occaecat sit dolor. Occaecat proident tempor aute nisi ipsum commodo dolore ipsum labore do laborum ea in. Non esse ut qui anim sint cupidatat amet est in consequat aliqua eiusmod. Reprehenderit consectetur amet commodo incididunt do amet laboris.\r\nVeniam magna consequat consequat eiusmod aliqua nulla commodo aliquip magna aute. Excepteur culpa ea consectetur sint velit sunt nulla Lorem ex. Irure in amet cupidatat duis occaecat pariatur.\r\nUt commodo laboris incididunt amet exercitation consectetur adipisicing eu. Aliqua in ex cillum Lorem reprehenderit cillum esse non ut cupidatat. Dolore et dolore duis exercitation sunt fugiat. Irure commodo eiusmod est fugiat ipsum anim ullamco ut. Duis amet duis non sint. Fugiat excepteur dolore et aliqua veniam aute elit mollit sit eu. Eiusmod dolore in magna voluptate reprehenderit pariatur non qui in qui Lorem ipsum.\r\nConsequat mollit tempor do sunt Lorem do est reprehenderit. Lorem aliqua culpa irure duis laborum non ut elit ad. Ad ipsum cillum nisi est aute nisi ad et. Aliquip voluptate voluptate elit amet in laboris fugiat. Non voluptate amet ut cillum exercitation veniam. Ea Lorem nostrud aliquip ex.\r\n", + "address": "4 Belvidere Street", + "city": "Whitestone", + "state": "Tennessee", + "zip": 30601, + "country": "St. Pierre and Miquelon", + "email": "penacompton@scentric.com", + "phone": "(979) 573-3861", + "color": "rgb(191,149,118)" + }, + { + "index": 441, + "name": "Concetta Whitaker", + "first": "Lora", + "last": "Mccarthy", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/betraydan/73.jpg", + "boolean": false, + "guid": "4527d6de-ed39-4b47-8916-33b23feda2f9", + "integer": 64, + "date": "Tue Jul 24 2012 12:23:04 GMT-0700 (PDT)", + "shortText": "voluptate", + "mediumText": "Id pariatur aliqua ea id id duis qui sint mollit commodo.", + "longText": "Incididunt voluptate do id labore. Voluptate aliqua tempor quis anim magna quis pariatur et quis voluptate dolor occaecat. In veniam commodo sunt quis consectetur non minim. Laboris velit fugiat aliqua deserunt nostrud amet sint ad Lorem Lorem cupidatat cillum. Ullamco enim minim et eu non Lorem eu laborum magna duis velit esse reprehenderit laboris. Ad enim irure dolor laboris excepteur fugiat exercitation occaecat commodo aliqua ex.\r\nMinim ex est culpa ipsum cupidatat ullamco exercitation cupidatat exercitation veniam cillum. Proident enim elit cupidatat sunt aliqua non minim officia. Laboris veniam laboris id cillum labore occaecat quis cupidatat velit excepteur aute nostrud est anim. Non do ut dolore veniam dolor labore reprehenderit sunt velit officia.\r\n", + "address": "4 Remsen Avenue", + "city": "Northridge", + "state": "Palau", + "zip": 32997, + "country": "Montserrat", + "email": "loramccarthy@scentric.com", + "phone": "(878) 505-2614", + "color": "rgb(124,101,157)" + }, + { + "index": 442, + "name": "Tammie Juarez", + "first": "Liza", + "last": "Daniel", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/justme_timothyg/73.jpg", + "boolean": false, + "guid": "0ed69dca-4d57-43c4-835b-b4f0d9654df4", + "integer": 11, + "date": "Sun Jul 08 2012 11:35:08 GMT-0700 (PDT)", + "shortText": "cillum", + "mediumText": "Culpa nulla aliqua nulla adipisicing reprehenderit. Labore nisi non dolore deserunt ut elit anim ullamco ullamco eiusmod cupidatat. Nisi proident qui culpa deserunt velit aliquip cillum deserunt tempor exercitation dolore eu. Do non anim aliquip id dolore anim velit qui ut sunt consequat deserunt. Eiusmod ea proident culpa exercitation enim occaecat.", + "longText": "Minim ex labore Lorem eiusmod laboris voluptate irure est. Dolore occaecat excepteur commodo ullamco deserunt irure cillum. Nisi nostrud in sint sunt excepteur culpa sunt do eu aute deserunt. Irure pariatur proident sit proident exercitation ex aute aliquip eiusmod est Lorem adipisicing laborum officia. Aute consectetur dolor occaecat incididunt cillum eiusmod culpa anim cupidatat est exercitation est. Sunt culpa quis cillum et sint dolor pariatur enim non nostrud dolore sunt proident do.\r\nQui enim do qui aliqua velit ullamco irure culpa aliqua adipisicing velit in tempor aute. Amet consectetur officia do elit. Aute laborum esse ullamco dolore id ullamco velit Lorem. Fugiat dolore et velit velit ut.\r\nSunt non anim veniam proident id est magna ullamco exercitation consequat est. Laborum culpa eiusmod non eu ipsum occaecat excepteur minim occaecat velit magna. Voluptate aliquip tempor do excepteur est enim. Do tempor laboris ut laborum in tempor Lorem occaecat dolore. Est id veniam dolore dolor eiusmod enim ea adipisicing fugiat ad nostrud ullamco ex. Occaecat nisi et ea eiusmod duis Lorem labore enim non veniam labore.\r\nMagna occaecat dolor nisi sint est magna magna tempor sunt. Minim amet sunt exercitation incididunt ea dolore tempor tempor magna pariatur aliqua. Mollit amet et in veniam. Reprehenderit do ut cupidatat incididunt. Eu anim Lorem laboris qui cillum officia amet aute minim magna proident officia.\r\n", + "address": "2 Friel Place", + "city": "Waverly", + "state": "Virginia", + "zip": 15976, + "country": "Norway", + "email": "lizadaniel@scentric.com", + "phone": "(837) 444-2117", + "color": "rgb(169,145,105)" + }, + { + "index": 443, + "name": "Bettie Osborne", + "first": "Daugherty", + "last": "Randolph", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/justinteractive/73.jpg", + "boolean": true, + "guid": "3d66fd94-2bfe-43f5-9b83-14c609449f27", + "integer": 7, + "date": "Sat Jan 20 2007 20:48:29 GMT-0800 (PST)", + "shortText": "velit", + "mediumText": "Veniam quis ea ipsum adipisicing quis excepteur proident laboris fugiat id reprehenderit aute occaecat.", + "longText": "Sunt anim reprehenderit eu in sit culpa enim. Magna voluptate pariatur fugiat commodo fugiat ad voluptate ipsum ut elit ullamco dolor amet. Ut cupidatat consectetur velit velit est labore. Ex cillum ad duis excepteur irure officia eiusmod labore in culpa exercitation duis anim non. Deserunt ullamco consequat tempor tempor incididunt esse laboris.\r\nProident ex dolor anim laboris aliqua velit sit est. Aute aute velit eiusmod non irure nostrud pariatur anim tempor pariatur ipsum labore do. Lorem laborum ipsum minim eu nulla minim ullamco culpa in ex velit veniam aliqua cillum. Exercitation aliquip sit proident nostrud. Dolor ipsum aute nulla Lorem dolore amet dolor nisi enim irure.\r\nIpsum deserunt cupidatat ea nisi anim aliquip et excepteur pariatur nisi dolor. Quis exercitation ea pariatur eiusmod. Sint qui Lorem eu velit aute.\r\n", + "address": "3 Utica Avenue", + "city": "Glenbrook", + "state": "Wyoming", + "zip": 52525, + "country": "Guam", + "email": "daughertyrandolph@scentric.com", + "phone": "(978) 484-3479", + "color": "rgb(158,76,101)" + }, + { + "index": 444, + "name": "Valenzuela Swanson", + "first": "Buckner", + "last": "Dawson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/psdesignuk/73.jpg", + "boolean": true, + "guid": "4fe81672-768e-44ba-b3d5-c57fbb9c3507", + "integer": 27, + "date": "Mon Feb 03 1975 20:36:41 GMT-0800 (PST)", + "shortText": "fugiat fugiat", + "mediumText": "Eiusmod eu elit do in occaecat dolor consectetur non mollit. Officia eiusmod consectetur veniam laboris consequat velit commodo exercitation tempor officia commodo. Voluptate elit Lorem elit non elit. Dolor consequat exercitation cillum labore do cillum irure exercitation. Lorem et irure velit eiusmod sit ut.", + "longText": "Amet enim eiusmod anim culpa non ipsum dolor deserunt adipisicing fugiat. Ut irure ipsum et incididunt veniam proident ex veniam. Magna eu dolor do minim elit culpa labore. Commodo non amet qui nisi nisi anim ex. Sit ipsum nulla fugiat ea exercitation duis in sint ex ea. Minim est ut minim in laboris est esse culpa minim pariatur exercitation ex. Ex voluptate sint sunt velit in adipisicing.\r\n", + "address": "4 Bridge Street", + "city": "Byrnedale", + "state": "Colorado", + "zip": 22776, + "country": "Gibraltar", + "email": "bucknerdawson@scentric.com", + "phone": "(822) 533-3432", + "color": "rgb(72,149,99)" + }, + { + "index": 445, + "name": "Bernice Hood", + "first": "Dionne", + "last": "Russo", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/teclaro/73.jpg", + "boolean": true, + "guid": "604ff26f-12a6-4e76-bbcc-b8004c60fc12", + "integer": 25, + "date": "Sat Sep 15 2001 19:47:51 GMT-0700 (PDT)", + "shortText": "id commodo aute eu", + "mediumText": "Aliquip ut proident ad consequat proident velit magna. Non excepteur Lorem labore et fugiat quis laboris anim ut fugiat tempor consectetur laborum aute. Ullamco dolor nulla esse nisi aliquip fugiat fugiat dolor.", + "longText": "Elit ipsum voluptate laborum veniam cillum reprehenderit aliqua quis incididunt id excepteur. Reprehenderit qui fugiat nostrud quis. Ad nostrud amet do quis pariatur laborum in reprehenderit. Irure ipsum qui aute deserunt deserunt amet adipisicing eu dolor minim. Ad dolor aliquip quis sit nulla culpa nulla commodo aliqua non. Proident enim consequat elit tempor ut non est. Qui aliquip dolor ut consequat officia reprehenderit ea minim nisi cillum irure.\r\nCillum eu nisi consequat ipsum est aliqua cillum ad et laborum. Lorem incididunt occaecat ex ullamco et nostrud sint elit proident sunt adipisicing eu quis. Voluptate mollit sit sunt ad velit nisi commodo cupidatat. Nisi tempor nostrud minim magna id occaecat aliquip aute.\r\nEiusmod elit sit adipisicing reprehenderit nisi eiusmod incididunt eiusmod laboris mollit mollit do. Do aliqua adipisicing nostrud eu voluptate. Officia ut aliquip excepteur aute consequat sit pariatur amet id dolor.\r\nMagna cillum aliquip laborum anim aliquip in officia excepteur id dolore excepteur nostrud ullamco commodo. Excepteur enim anim esse occaecat quis cupidatat consectetur. Reprehenderit tempor fugiat laborum labore fugiat eiusmod quis.\r\n", + "address": "2 Verona Place", + "city": "Connerton", + "state": "Utah", + "zip": 18395, + "country": "Hungary", + "email": "dionnerusso@scentric.com", + "phone": "(890) 461-3250", + "color": "rgb(229,252,247)" + }, + { + "index": 446, + "name": "Schneider Small", + "first": "West", + "last": "Buckner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/eyronn/73.jpg", + "boolean": true, + "guid": "4fdfdfc4-3a77-47b8-acab-91a565572331", + "integer": 44, + "date": "Fri Jul 16 2004 09:13:39 GMT-0700 (PDT)", + "shortText": "sunt esse Lorem", + "mediumText": "Irure dolor minim dolore voluptate ut laborum Lorem nostrud nostrud voluptate nisi sunt culpa. Proident pariatur sit id occaecat do qui reprehenderit laboris exercitation qui ad.", + "longText": "Labore nostrud consequat laboris amet do sint pariatur. Commodo incididunt amet reprehenderit laboris enim eu nostrud ea velit. In nisi proident ullamco in deserunt elit labore. Irure exercitation ipsum officia sint magna tempor do et sit.\r\nMollit nulla aliquip pariatur excepteur dolore sint ipsum mollit qui consectetur id. In amet laborum ea deserunt duis ipsum dolor magna aliquip non ea reprehenderit proident. Excepteur labore dolore reprehenderit elit. Est commodo esse est ea. Amet cupidatat exercitation eiusmod id sit.\r\nAliqua dolor anim est in esse ex id ad incididunt mollit occaecat ad sint. Lorem dolore ipsum ad amet cillum excepteur sint anim pariatur. Ipsum consectetur irure dolore fugiat duis anim id. Esse non est id mollit quis proident qui ex labore sit. Consequat mollit veniam nisi irure cupidatat nostrud.\r\n", + "address": "2 Fuller Place", + "city": "Felt", + "state": "Idaho", + "zip": 83579, + "country": "Kenya", + "email": "westbuckner@scentric.com", + "phone": "(972) 592-3400", + "color": "rgb(90,160,183)" + }, + { + "index": 447, + "name": "Jones Fields", + "first": "Trujillo", + "last": "Morales", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/gulian/73.jpg", + "boolean": true, + "guid": "c09e1f92-8061-47f3-a5ae-13fe4589613e", + "integer": 97, + "date": "Wed Feb 14 2007 05:02:54 GMT-0800 (PST)", + "shortText": "tempor laborum commodo nostrud", + "mediumText": "Cillum nulla veniam ipsum exercitation nulla dolor anim in amet. Velit proident excepteur nisi et minim anim incididunt sit. Et sit eu eu est anim nulla. Ex consectetur fugiat cupidatat eiusmod in commodo cupidatat irure.", + "longText": "Aute ex exercitation nulla pariatur eu. Labore veniam amet voluptate occaecat consectetur consectetur nostrud laborum. Sit consequat nulla tempor culpa minim labore exercitation laboris incididunt sint. Dolor nisi quis id ullamco eu qui non ullamco esse amet irure dolor aute non. Ex exercitation irure ad laboris eiusmod non minim non anim ex in magna.\r\nCommodo ullamco excepteur culpa cillum incididunt. Ad nostrud est aliqua officia. Aliqua et laboris incididunt est. Irure reprehenderit ea ut minim culpa.\r\n", + "address": "3 Goodwin Place", + "city": "Lacomb", + "state": "Arkansas", + "zip": 64762, + "country": "Honduras", + "email": "trujillomorales@scentric.com", + "phone": "(908) 595-3540", + "color": "rgb(252,248,234)" + }, + { + "index": 448, + "name": "Ester Weber", + "first": "Eve", + "last": "Bonner", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/drebbits/73.jpg", + "boolean": true, + "guid": "daccfe7a-2e90-4485-b570-2ea85b7b196f", + "integer": 29, + "date": "Wed Aug 08 1979 00:51:20 GMT-0700 (PDT)", + "shortText": "qui", + "mediumText": "Magna dolore commodo aute ad excepteur ex proident non veniam proident irure dolore adipisicing deserunt. Anim mollit velit laboris velit labore pariatur. Non amet qui ut magna.", + "longText": "Cupidatat ea sit dolor eu sit tempor culpa magna. Ipsum excepteur nulla elit sit laboris dolor commodo. Deserunt aliquip officia minim sunt non sunt. Elit tempor consequat ullamco irure in ullamco. Ad do adipisicing sunt nisi eu veniam aliquip anim.\r\nAute ullamco incididunt dolore mollit fugiat deserunt adipisicing occaecat cupidatat sunt aute. Velit excepteur ullamco excepteur incididunt velit. Do adipisicing aute sint commodo qui adipisicing aliqua incididunt mollit. Adipisicing consectetur nulla consequat sunt nulla est sunt anim consequat ipsum ad dolor.\r\n", + "address": "4 Furman Avenue", + "city": "Devon", + "state": "Delaware", + "zip": 13560, + "country": "Eritrea", + "email": "evebonner@scentric.com", + "phone": "(993) 461-3721", + "color": "rgb(220,194,238)" + }, + { + "index": 449, + "name": "Jaclyn Bright", + "first": "Christy", + "last": "Graham", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/alexhaniotis/73.jpg", + "boolean": true, + "guid": "3d5752b1-b775-4866-9151-376be7d53cdd", + "integer": 47, + "date": "Fri Oct 07 1994 14:59:41 GMT-0700 (PDT)", + "shortText": "ut minim in laboris officia", + "mediumText": "Esse mollit ad sunt incididunt labore dolore exercitation nostrud commodo minim nisi sit. Enim tempor tempor veniam culpa laboris incididunt sunt ex magna fugiat. Quis veniam adipisicing est sunt proident aliquip enim commodo sunt duis sint est nulla Lorem.", + "longText": "Sint aliquip qui aliqua ipsum magna eiusmod non ea exercitation non duis cupidatat officia. Proident esse mollit culpa excepteur irure consectetur consequat amet ipsum sit ut officia amet. Deserunt non in qui sit aliquip et irure et commodo mollit esse ullamco consequat. Commodo ea mollit incididunt ex anim labore sint eu sint sunt deserunt commodo irure ex. Magna reprehenderit voluptate anim commodo et excepteur amet nulla sint. Qui laboris qui et veniam eiusmod pariatur voluptate eiusmod ea occaecat cillum dolore velit magna.\r\nNostrud in esse est tempor minim ex fugiat qui Lorem. Non enim tempor amet consequat pariatur irure voluptate enim aliqua tempor exercitation. Lorem reprehenderit et deserunt velit deserunt pariatur elit et consectetur irure. Culpa velit aliquip sit sunt adipisicing exercitation. Eiusmod mollit consequat laboris non nostrud pariatur laborum quis anim consectetur veniam amet culpa esse. Consequat irure aute commodo incididunt tempor elit aliqua est reprehenderit sunt ex veniam id.\r\nProident eu cillum est eiusmod sint quis in eiusmod occaecat adipisicing quis tempor adipisicing ea. Adipisicing reprehenderit exercitation eu reprehenderit elit cupidatat nostrud pariatur. Veniam officia quis Lorem magna reprehenderit esse ipsum minim quis laborum reprehenderit.\r\n", + "address": "3 Kathleen Court", + "city": "Groveville", + "state": "Federated States Of Micronesia", + "zip": 97417, + "country": "Tajikistan", + "email": "christygraham@scentric.com", + "phone": "(943) 493-3287", + "color": "rgb(201,124,187)" + }, + { + "index": 450, + "name": "Burton Valdez", + "first": "Aurora", + "last": "Morse", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/twahlin/73.jpg", + "boolean": true, + "guid": "7ea797c6-ef0a-49c2-b043-2ca76a30e148", + "integer": 66, + "date": "Mon Jul 09 1984 05:20:31 GMT-0700 (PDT)", + "shortText": "officia", + "mediumText": "Nulla ut eiusmod consequat sunt est proident mollit elit laboris nulla ex Lorem tempor culpa.", + "longText": "Laborum labore ad cupidatat fugiat laborum proident mollit elit Lorem elit. Voluptate ex magna voluptate ex incididunt eiusmod dolor anim sit. Aliquip sint reprehenderit officia ex irure veniam aliquip laborum eu exercitation magna veniam enim. Minim culpa Lorem et sit. Velit aute elit et incididunt do velit mollit qui.\r\n", + "address": "2 Sheffield Avenue", + "city": "Sheatown", + "state": "Guam", + "zip": 73715, + "country": "Brunei Darussalam", + "email": "auroramorse@scentric.com", + "phone": "(866) 493-3254", + "color": "rgb(60,132,78)" + }, + { + "index": 451, + "name": "Sharpe Mccall", + "first": "Leanna", + "last": "Day", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ntfblog/73.jpg", + "boolean": false, + "guid": "241e6ae2-b23e-44bc-b8ed-aeb9d50f0395", + "integer": 7, + "date": "Sun Oct 27 2002 01:07:01 GMT-0700 (PDT)", + "shortText": "sit", + "mediumText": "Commodo commodo nostrud deserunt nostrud velit tempor culpa exercitation occaecat. Officia officia fugiat consectetur deserunt eu sunt ullamco commodo elit veniam nostrud dolore. Aute duis occaecat nisi culpa nulla laborum deserunt aliquip irure.", + "longText": "Qui do ex nostrud qui officia velit. Quis laborum aute nulla sint excepteur magna nisi est eu. Commodo qui id ex pariatur est sit. Do quis mollit minim consectetur exercitation. Elit reprehenderit labore minim laboris laborum adipisicing incididunt adipisicing. Ad reprehenderit enim reprehenderit sit.\r\nIpsum veniam nulla et enim. Consectetur sint laborum voluptate nulla non non eiusmod. Incididunt laborum voluptate voluptate cupidatat amet minim culpa sint laborum commodo. Ad mollit ea culpa sit fugiat.\r\nEx ex incididunt eu dolore laboris duis culpa duis magna eu minim sint. Ea sunt sunt mollit ut voluptate duis. Magna sit irure voluptate Lorem tempor consectetur eu aute sunt eiusmod deserunt laboris anim. Ut aliqua irure pariatur cillum eiusmod Lorem cupidatat qui mollit laborum excepteur irure. Officia voluptate aute officia incididunt deserunt velit enim sint anim mollit aliqua deserunt. Excepteur dolor irure sint quis nulla ipsum sint duis consectetur. Eiusmod id cillum exercitation veniam in anim tempor velit id culpa in.\r\nLabore amet non culpa ea in ullamco duis dolore cillum commodo laborum. In et elit ex aliqua commodo labore dolor proident et mollit. Dolor Lorem deserunt ipsum adipisicing sunt enim nulla ullamco. Enim ullamco ea irure sit elit cillum reprehenderit mollit voluptate enim aliquip ad officia.\r\nLaborum eiusmod esse sit excepteur duis. Quis magna cillum proident tempor qui ex sunt amet ex cillum id elit. Lorem sit cillum exercitation eu reprehenderit ea ex. Fugiat commodo irure elit est esse labore laboris do ullamco dolor. Adipisicing excepteur et culpa occaecat. Ea aute et deserunt quis laborum eiusmod et exercitation mollit excepteur duis nulla.\r\n", + "address": "2 Sapphire Street", + "city": "Delco", + "state": "Pennsylvania", + "zip": 99885, + "country": "Macedonia", + "email": "leannaday@scentric.com", + "phone": "(926) 463-2373", + "color": "rgb(219,81,203)" + }, + { + "index": 452, + "name": "Richmond Clayton", + "first": "Sherrie", + "last": "Robertson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/commoncentssss/73.jpg", + "boolean": true, + "guid": "dd129f81-2042-434a-9563-8047b70bad0a", + "integer": 45, + "date": "Sat Apr 07 2001 06:49:07 GMT-0700 (PDT)", + "shortText": "in", + "mediumText": "Adipisicing excepteur ad proident id veniam consectetur sit.", + "longText": "Amet commodo do aliquip ipsum sunt dolor id magna officia officia commodo minim. Qui duis occaecat in cillum ipsum pariatur excepteur officia velit incididunt exercitation irure mollit quis. Et cillum id velit elit et fugiat qui nisi officia incididunt voluptate cupidatat duis. Ut fugiat dolore eiusmod non ad aliquip labore sit proident. Duis amet aliqua deserunt commodo do anim quis elit excepteur. Sunt dolore magna dolore enim labore minim do enim anim officia cupidatat cupidatat. Aliqua anim veniam tempor sit incididunt quis ex ex laboris reprehenderit Lorem.\r\nExercitation irure tempor proident culpa. Ut enim culpa nulla ipsum consectetur enim eu dolor fugiat occaecat pariatur ex. Fugiat aliqua anim veniam aliquip irure nostrud adipisicing id. Tempor laborum enim excepteur ipsum dolore pariatur anim sit id qui duis duis sit duis. Dolore deserunt do est irure consectetur consequat ea aliqua veniam enim qui Lorem. Ipsum et nulla eiusmod Lorem et id anim aliquip. Velit mollit dolor non ullamco do aliqua qui mollit excepteur qui amet.\r\n", + "address": "4 Opal Court", + "city": "Dawn", + "state": "New Hampshire", + "zip": 25154, + "country": "French Polynesia", + "email": "sherrierobertson@scentric.com", + "phone": "(950) 518-2372", + "color": "rgb(116,89,161)" + }, + { + "index": 453, + "name": "Small Church", + "first": "Sylvia", + "last": "Terrell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/anissa_anwar/73.jpg", + "boolean": true, + "guid": "5653dcb2-2ec5-4de9-93a5-534b963da42d", + "integer": 32, + "date": "Sat Mar 10 2001 07:02:05 GMT-0800 (PST)", + "shortText": "velit et non in sint", + "mediumText": "Commodo aute irure cillum laboris aliquip aute aliqua consequat qui esse do Lorem deserunt adipisicing. Velit esse nulla in do ut aliquip proident ut qui occaecat reprehenderit nisi. Velit tempor eu non in officia cupidatat fugiat culpa. Proident nostrud irure cupidatat quis enim nisi reprehenderit qui deserunt tempor eiusmod cupidatat nulla. Proident exercitation esse sint esse sunt qui ad magna eu do magna esse sunt nulla.", + "longText": "Consequat proident id laboris id labore ipsum officia officia non consectetur dolore esse cupidatat. In commodo et amet qui in et exercitation non eiusmod dolore sunt nostrud. Non quis fugiat Lorem amet voluptate excepteur. Proident officia labore aliquip sunt Lorem ex nulla fugiat incididunt. In dolore aute enim esse cupidatat commodo cupidatat commodo ipsum nulla. Officia dolore dolore eu reprehenderit.\r\nAd occaecat consequat adipisicing do eiusmod voluptate proident. Eu dolore aute aliqua cillum enim incididunt non adipisicing ipsum laborum sunt Lorem Lorem. Ex ad excepteur occaecat quis aliqua do nostrud irure in sunt aliqua amet. Commodo ea voluptate sit mollit nisi excepteur reprehenderit incididunt. Do cillum aliquip in eu.\r\n", + "address": "2 Wolcott Street", + "city": "Salix", + "state": "North Dakota", + "zip": 11231, + "country": "Bahamas", + "email": "sylviaterrell@scentric.com", + "phone": "(823) 424-2163", + "color": "rgb(216,232,199)" + }, + { + "index": 454, + "name": "Alyson Dudley", + "first": "Mckay", + "last": "Holmes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/btrig/73.jpg", + "boolean": false, + "guid": "c1a70e93-2f1c-402a-aafb-f66c1441b471", + "integer": 36, + "date": "Fri May 18 2001 01:24:33 GMT-0700 (PDT)", + "shortText": "veniam ipsum ullamco", + "mediumText": "Sunt culpa in consectetur tempor consectetur non eu ex elit aliquip incididunt eu cillum quis. Dolor laborum pariatur nulla nostrud culpa quis dolor ipsum deserunt fugiat non amet non. Magna sint sint ea voluptate nostrud consequat labore elit.", + "longText": "Enim ex consequat quis proident ipsum commodo labore dolore esse fugiat. Commodo sit eu ullamco incididunt ipsum. Qui officia eiusmod adipisicing dolor exercitation. Laborum occaecat proident deserunt dolore labore est in. Exercitation enim sunt reprehenderit est est. Ullamco dolor laborum ea quis aute aliqua.\r\nNulla sint in aliqua do minim aliqua voluptate enim deserunt occaecat esse excepteur. Qui est veniam proident anim fugiat velit qui aliqua eiusmod proident mollit. Qui velit est in consectetur ad esse consequat aute laborum. Amet cupidatat cupidatat et amet.\r\nDeserunt qui labore veniam irure eiusmod ad nisi anim non aliqua culpa ea consequat ea. Id sunt mollit minim qui sunt consequat in aliquip eu consectetur. Et nostrud velit excepteur in magna dolor elit. Reprehenderit nisi enim dolor amet ipsum in voluptate veniam voluptate consectetur aliquip. Quis sint duis ut dolor ea. Magna deserunt sunt aute quis veniam laboris aute ea ex velit irure cupidatat.\r\nQui qui labore voluptate velit ad eu mollit sit cillum non exercitation cillum aliqua. Quis tempor consectetur eiusmod aliqua id. Qui duis elit ut do nisi nostrud et ullamco mollit. Labore officia fugiat nisi dolore. Adipisicing in voluptate aliquip occaecat mollit anim pariatur occaecat sint aliqua. Anim esse adipisicing aliqua tempor sit elit deserunt sunt. Eiusmod consectetur anim ipsum est elit laborum magna consectetur id aliquip Lorem.\r\n", + "address": "3 Walker Court", + "city": "Wattsville", + "state": "Northern Mariana Islands", + "zip": 63152, + "country": "Palau", + "email": "mckayholmes@scentric.com", + "phone": "(951) 589-2723", + "color": "rgb(163,183,107)" + }, + { + "index": 455, + "name": "Curry Webb", + "first": "Sheena", + "last": "Wilkerson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/ug_rick/73.jpg", + "boolean": true, + "guid": "5fdb3b33-e4f6-42fd-9ef8-f5187a85f89a", + "integer": 86, + "date": "Sat Jun 12 1976 02:00:05 GMT-0700 (PDT)", + "shortText": "labore laborum", + "mediumText": "Nostrud nisi incididunt quis enim esse proident aliquip laboris. Velit officia quis amet cillum sint pariatur aliqua velit eiusmod. Adipisicing in nisi qui duis anim dolor laborum esse aute est ex amet sit.", + "longText": "Pariatur magna sit reprehenderit sint est non velit sint veniam. Laboris qui labore esse consequat tempor ut elit elit aliquip dolor duis tempor velit cupidatat. Consequat duis fugiat id excepteur. Duis veniam laboris est ut pariatur ullamco reprehenderit elit irure. Aute elit excepteur officia pariatur labore. Commodo sit officia ullamco reprehenderit sit exercitation ad consequat.\r\nEsse nostrud voluptate anim Lorem aute do tempor cupidatat do adipisicing magna commodo et dolore. Quis eiusmod velit est in laborum sit. Elit veniam ipsum id dolor. Labore eiusmod ex anim amet. Do velit cillum velit voluptate nostrud sint consequat ipsum ullamco do eiusmod sint. Reprehenderit minim reprehenderit et sunt aliqua nisi sint magna mollit aliquip. Esse esse labore minim cillum ut cupidatat dolor incididunt proident dolor.\r\nVoluptate aute anim commodo occaecat non voluptate magna. Laboris do quis laborum qui cillum qui commodo amet minim consectetur voluptate. Labore anim tempor sint ut. Tempor nisi sit officia Lorem.\r\nMinim consectetur ex velit nulla occaecat id sunt. Veniam laboris cupidatat reprehenderit ullamco eiusmod. Cupidatat velit non nulla amet aliqua fugiat aute ullamco nisi aliqua adipisicing exercitation quis proident. Ut ullamco dolor pariatur nisi excepteur occaecat commodo proident nisi minim est consequat.\r\nOccaecat aliquip duis duis deserunt cupidatat sint. Anim id et dolore labore nostrud ad Lorem sunt pariatur ad adipisicing. Qui enim nostrud officia adipisicing voluptate ea in nisi duis velit consectetur. Ut nisi voluptate dolor quis est anim in fugiat. Eu tempor dolore reprehenderit ut est aliqua elit in non velit velit. In adipisicing ullamco minim laboris incididunt enim voluptate ea minim sint dolor ut laborum amet. Aliquip est ut ipsum veniam.\r\n", + "address": "4 Lee Avenue", + "city": "Chamberino", + "state": "South Dakota", + "zip": 13592, + "country": "Tuvalu", + "email": "sheenawilkerson@scentric.com", + "phone": "(879) 403-2513", + "color": "rgb(118,194,142)" + }, + { + "index": 456, + "name": "Christian Snyder", + "first": "Lawanda", + "last": "Bradford", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/blakestevenson/73.jpg", + "boolean": true, + "guid": "bfb51aa2-d989-470d-97e5-64f04272b0ec", + "integer": 77, + "date": "Sat Jul 05 2014 23:12:53 GMT-0700 (PDT)", + "shortText": "quis ex et", + "mediumText": "Consectetur sit veniam excepteur Lorem commodo.", + "longText": "Qui dolor ut ipsum ex fugiat deserunt irure fugiat. Nisi anim culpa est non adipisicing ullamco dolore aute ex occaecat minim. Occaecat reprehenderit aliqua aute fugiat veniam officia cillum quis nostrud minim ullamco velit officia. Lorem ex labore magna qui velit commodo anim dolore veniam dolor et reprehenderit.\r\nDolor ad irure esse tempor commodo ullamco adipisicing dolore amet magna aliqua enim adipisicing. Laboris irure culpa est excepteur mollit magna consectetur id aliquip magna. Occaecat commodo elit pariatur reprehenderit eiusmod labore. Nisi aliquip minim est labore quis fugiat. Minim nulla Lorem dolore nostrud reprehenderit nulla mollit incididunt anim adipisicing.\r\n", + "address": "4 Newport Street", + "city": "Indio", + "state": "Alaska", + "zip": 48616, + "country": "Liechtenstein", + "email": "lawandabradford@scentric.com", + "phone": "(888) 481-3858", + "color": "rgb(247,122,60)" + }, + { + "index": 457, + "name": "Contreras Jenkins", + "first": "Lester", + "last": "Garrett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/karalek/73.jpg", + "boolean": true, + "guid": "0618babd-91c3-4050-8bf8-5d1f94383568", + "integer": 14, + "date": "Fri Mar 31 1972 00:34:05 GMT-0800 (PST)", + "shortText": "commodo aliqua", + "mediumText": "Ullamco commodo consequat id officia duis duis amet quis incididunt consectetur consequat laboris ex dolore. Aliquip dolore cupidatat sit aliqua dolore sit irure reprehenderit anim nulla adipisicing est. Cupidatat et fugiat minim exercitation eiusmod est esse eiusmod proident.", + "longText": "Qui cillum ipsum amet adipisicing veniam Lorem ullamco. Aute ea sunt veniam nisi laboris cupidatat officia minim. Consectetur deserunt cupidatat fugiat deserunt mollit mollit. Elit magna consequat qui tempor in non velit ea cillum tempor non. Consectetur est mollit aliqua adipisicing elit cillum consequat duis enim. Reprehenderit in et dolor nulla duis.\r\nEsse cillum Lorem veniam officia voluptate eu tempor. Consectetur dolore fugiat proident duis ullamco dolore occaecat dolore sit. Consequat commodo fugiat dolor minim elit elit laborum elit do. Exercitation occaecat exercitation cillum eu occaecat sit sit magna voluptate dolor aliqua ad commodo esse. Cillum fugiat excepteur sunt incididunt nisi.\r\nLabore aute eiusmod aute ullamco sunt sint nisi aute laboris reprehenderit duis qui incididunt labore. Sint occaecat sint id esse. Consectetur pariatur minim proident do magna mollit veniam dolore commodo et officia adipisicing commodo pariatur. Consequat eu id pariatur occaecat eu nostrud proident enim eu. Id cillum consequat aliquip reprehenderit. Adipisicing Lorem eu et veniam aliquip pariatur commodo culpa anim adipisicing commodo labore. Qui adipisicing incididunt in eiusmod.\r\n", + "address": "4 Morton Street", + "city": "Yonah", + "state": "Louisiana", + "zip": 53661, + "country": "Virgin Islands (US)", + "email": "lestergarrett@scentric.com", + "phone": "(972) 517-3113", + "color": "rgb(239,120,56)" + }, + { + "index": 458, + "name": "Holly Jackson", + "first": "Susie", + "last": "Watkins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/elusiveanmol/73.jpg", + "boolean": true, + "guid": "2a001ee1-bb06-41ce-ba9b-334ce428a78e", + "integer": 45, + "date": "Tue Aug 24 1993 08:13:13 GMT-0700 (PDT)", + "shortText": "qui ex deserunt veniam enim", + "mediumText": "Dolore deserunt proident ex non ullamco amet esse cillum adipisicing adipisicing tempor sunt dolore. Amet mollit velit enim qui elit nostrud duis quis duis deserunt ut quis minim incididunt. Proident duis laboris sunt esse laborum duis officia esse irure esse. Cupidatat incididunt labore pariatur mollit. Sint officia aliquip adipisicing sint id et officia nulla.", + "longText": "Officia labore fugiat tempor sint est labore aliqua quis nisi labore adipisicing. Deserunt occaecat occaecat cupidatat occaecat. Minim consequat nisi non reprehenderit tempor. Irure nulla minim veniam laboris ut duis adipisicing. Occaecat culpa cillum magna sint nisi sit ex. Reprehenderit quis aliqua officia ipsum dolor irure nulla ipsum ex.\r\nIpsum proident esse tempor in ut proident reprehenderit reprehenderit fugiat pariatur reprehenderit cillum. Ipsum ipsum velit labore id do sint. Ea velit tempor cillum officia qui elit id excepteur. Fugiat laboris amet ullamco et dolor. Enim ut id fugiat qui. Sunt anim pariatur nisi fugiat ex. In ipsum nulla officia ipsum ex aliquip ad cupidatat aliqua amet adipisicing anim in amet.\r\nMagna pariatur nisi occaecat veniam reprehenderit esse dolor aliqua culpa labore. Elit do aliquip est magna culpa officia id pariatur id commodo non officia incididunt proident. Quis consequat laborum consectetur nostrud magna amet irure do irure ipsum culpa reprehenderit. Exercitation elit magna irure mollit cillum velit ullamco tempor ex.\r\nIpsum mollit reprehenderit elit aliqua nulla laborum dolor voluptate commodo ipsum laboris. Elit ut enim tempor elit nisi tempor ipsum. Ullamco velit incididunt elit aliqua amet commodo amet dolore dolore fugiat id.\r\n", + "address": "3 Beard Street", + "city": "Sterling", + "state": "Missouri", + "zip": 70724, + "country": "Svalbard and Jan Mayen Islands", + "email": "susiewatkins@scentric.com", + "phone": "(837) 537-2963", + "color": "rgb(172,67,201)" + }, + { + "index": 459, + "name": "Josefina Gonzales", + "first": "Erickson", + "last": "Bennett", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/shoo7830/73.jpg", + "boolean": true, + "guid": "88320e02-8633-4df8-a096-8b6cd39d0786", + "integer": 31, + "date": "Tue Jul 27 2010 06:12:05 GMT-0700 (PDT)", + "shortText": "proident nostrud", + "mediumText": "Cupidatat officia duis do sunt veniam voluptate exercitation. Ea excepteur tempor magna fugiat Lorem adipisicing dolor sit amet sunt aute laboris. Ea sunt fugiat ad commodo amet elit elit minim nostrud occaecat magna. Incididunt ea do id id laboris magna do ea. Eu duis amet cupidatat proident culpa deserunt.", + "longText": "Lorem ipsum culpa voluptate labore consectetur reprehenderit anim duis fugiat anim consequat tempor officia. Occaecat culpa tempor ad ea excepteur ad enim incididunt. Adipisicing commodo elit nisi magna incididunt. Ea est occaecat et dolor reprehenderit fugiat est id dolore. Culpa commodo ullamco est voluptate ad mollit sunt deserunt. Pariatur tempor excepteur laborum ex ea ea consectetur enim ut ad sunt nulla.\r\n", + "address": "4 Malbone Street", + "city": "Eagletown", + "state": "Kentucky", + "zip": 72696, + "country": "Ethiopia", + "email": "ericksonbennett@scentric.com", + "phone": "(937) 528-2434", + "color": "rgb(132,110,89)" + }, + { + "index": 460, + "name": "Sybil Boyle", + "first": "Rosetta", + "last": "Joseph", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/oanacr/73.jpg", + "boolean": true, + "guid": "3cf8b3eb-9567-4dbe-ad09-b792ef4b7f81", + "integer": 86, + "date": "Thu Aug 06 1992 04:15:43 GMT-0700 (PDT)", + "shortText": "reprehenderit", + "mediumText": "Consectetur irure ut minim proident laboris. Ea est et mollit voluptate aliquip qui enim incididunt nisi magna sunt tempor nulla. Pariatur officia id velit laborum quis id tempor cillum aliquip dolore sunt eiusmod enim. Elit id cillum occaecat sit exercitation fugiat eiusmod fugiat sunt cillum. Incididunt magna aliqua cupidatat fugiat voluptate nostrud voluptate.", + "longText": "Qui sunt irure veniam occaecat commodo sint labore nostrud qui do mollit. Non enim anim elit aute incididunt. Voluptate qui ullamco in sit cillum consectetur voluptate commodo. Non laboris anim minim anim nisi duis consectetur ad aute nisi nostrud. Id quis dolor consequat consequat nostrud ullamco dolore enim labore ipsum ipsum do voluptate aute.\r\nNisi dolor dolor elit veniam sint nisi eu officia incididunt ut labore elit id eu. Fugiat magna ex esse consectetur excepteur occaecat deserunt eiusmod ullamco ullamco do incididunt. Labore ad anim occaecat ullamco pariatur proident duis commodo. Quis reprehenderit consectetur exercitation fugiat dolor anim laboris dolor eu cupidatat adipisicing adipisicing Lorem. Ad voluptate officia pariatur ipsum Lorem ex aute sit non officia officia sint. Veniam aliqua labore ut enim in incididunt sit aute culpa magna officia ex officia nisi.\r\nNostrud incididunt consectetur nulla voluptate pariatur qui excepteur amet incididunt cupidatat culpa laboris sint. Sunt Lorem aute proident in velit ipsum. Magna fugiat veniam excepteur esse eiusmod sint cillum aute deserunt. Mollit magna quis excepteur in ex irure sit ea proident magna enim.\r\nConsectetur nisi culpa mollit eu in do consectetur sunt ad aliqua. Esse laboris adipisicing Lorem aute reprehenderit Lorem excepteur nisi id cupidatat aliqua cupidatat occaecat sit. Lorem Lorem ad ullamco quis reprehenderit nostrud elit enim ullamco incididunt. Culpa tempor consectetur exercitation velit consequat consequat dolore excepteur elit qui tempor est excepteur.\r\n", + "address": "4 Harman Street", + "city": "Sylvanite", + "state": "American Samoa", + "zip": 13569, + "country": "Togo", + "email": "rosettajoseph@scentric.com", + "phone": "(981) 470-3813", + "color": "rgb(209,237,158)" + }, + { + "index": 461, + "name": "Case Decker", + "first": "Santos", + "last": "Rice", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/elamyr/73.jpg", + "boolean": false, + "guid": "bf49a638-bbff-435c-9756-52b76f67815d", + "integer": 66, + "date": "Tue Apr 29 2003 07:40:21 GMT-0700 (PDT)", + "shortText": "ullamco aliqua sunt fugiat", + "mediumText": "Mollit Lorem exercitation cupidatat occaecat eiusmod qui. Magna et reprehenderit labore in. Excepteur ad enim aliqua aute ullamco cupidatat esse. Officia quis qui sunt nisi ipsum eu deserunt nulla fugiat magna sunt et quis pariatur. Voluptate cillum nostrud aliqua minim nulla minim dolore labore magna.", + "longText": "Laboris amet irure aute ipsum anim irure quis elit Lorem enim non id officia. Qui quis fugiat do esse. Eiusmod anim quis magna deserunt labore proident ullamco consequat cupidatat velit laboris ut aute. Quis excepteur ullamco officia ad reprehenderit. Irure occaecat reprehenderit ad consequat id laborum amet nisi tempor eu laboris. Irure sit cillum proident occaecat in ipsum. Quis esse officia sunt sunt anim ullamco ad amet ullamco Lorem.\r\nReprehenderit excepteur est officia consequat ea cupidatat excepteur sunt id ad adipisicing occaecat magna minim. Exercitation quis irure nostrud irure eiusmod laborum pariatur fugiat commodo id velit culpa reprehenderit id. Commodo mollit aute esse laboris fugiat pariatur mollit voluptate nulla. Commodo esse proident anim aliqua et duis exercitation cupidatat incididunt est laborum incididunt laborum. Aliqua est aute qui ullamco sunt ut cillum commodo cupidatat. Est sint est id consectetur ad duis duis culpa fugiat sit sit id aute. Dolor occaecat non cillum amet proident cupidatat laboris.\r\nIn sit non nostrud labore laboris commodo sit ea nisi commodo irure reprehenderit nostrud reprehenderit. Nostrud ad velit enim magna esse adipisicing. Labore occaecat anim irure magna sit duis ullamco exercitation ipsum mollit. Laboris irure ipsum occaecat ea anim id sunt irure deserunt eu et. Incididunt ex fugiat Lorem aliquip. Anim ea duis duis aliquip ex. Qui Lorem officia cillum nisi irure Lorem.\r\n", + "address": "3 Suydam Street", + "city": "Waumandee", + "state": "Minnesota", + "zip": 74848, + "country": "Zimbabwe", + "email": "santosrice@scentric.com", + "phone": "(890) 599-3600", + "color": "rgb(95,54,177)" + }, + { + "index": 462, + "name": "Snider Monroe", + "first": "Jensen", + "last": "Atkins", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hmenchaca2/73.jpg", + "boolean": true, + "guid": "f24bb864-fe55-4bd6-9144-5bc756f08b1c", + "integer": 74, + "date": "Mon Sep 14 1981 09:51:33 GMT-0700 (PDT)", + "shortText": "eu", + "mediumText": "Laboris proident ullamco ipsum ea ullamco non minim id dolore ad labore. Culpa cillum nostrud deserunt ea in sunt eu ex. Est ullamco sint nulla irure anim velit in. Do sint id exercitation labore do adipisicing.", + "longText": "Non labore culpa laborum fugiat nostrud sunt labore id duis ullamco aliquip exercitation sint. Ex nisi duis nostrud consequat occaecat. Cupidatat dolore occaecat do ea ut ex amet duis mollit magna et commodo aliquip fugiat. Nostrud ut tempor est voluptate sunt enim. Labore commodo consequat ad fugiat.\r\nAute consequat enim ut esse laboris excepteur est nisi laboris veniam esse veniam Lorem Lorem. Aliquip aliquip laboris sit quis. Lorem id ipsum et eiusmod aliqua tempor ipsum cupidatat Lorem anim ipsum aute do consectetur.\r\n", + "address": "3 Boerum Street", + "city": "Crucible", + "state": "Hawaii", + "zip": 89416, + "country": "Azerbaijan", + "email": "jensenatkins@scentric.com", + "phone": "(839) 445-3763", + "color": "rgb(116,98,175)" + }, + { + "index": 463, + "name": "Calderon Pugh", + "first": "Monroe", + "last": "Travis", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dparrelli/73.jpg", + "boolean": true, + "guid": "c9c9f502-618c-4896-b09e-c4d5fb42384c", + "integer": 81, + "date": "Sat Jan 21 1978 16:37:46 GMT-0800 (PST)", + "shortText": "commodo aliqua ullamco mollit excepteur", + "mediumText": "Consequat et ad nulla id velit officia aliqua nulla eu anim sit magna. Enim in ad Lorem consequat amet nisi magna pariatur in in proident esse mollit sit.", + "longText": "In ut dolore enim ullamco non culpa ea voluptate. Enim Lorem est labore magna reprehenderit laboris amet aliqua sint eiusmod cupidatat amet. Non sit eu quis minim ut. Ex mollit qui aliqua quis adipisicing consectetur esse adipisicing sunt ex tempor. Ad mollit in laboris amet occaecat cupidatat eiusmod id. Aliqua sint pariatur proident ad laboris consequat nostrud quis dolore laborum. Excepteur ipsum ea veniam minim dolore nostrud veniam et voluptate cupidatat elit.\r\nEnim laborum dolore ullamco veniam. Mollit nostrud eu occaecat eu qui laborum sit reprehenderit excepteur amet magna tempor sunt et. Nostrud pariatur qui reprehenderit Lorem amet ullamco sint sint commodo cupidatat est sint officia ea. Ut ut dolore eiusmod magna occaecat incididunt minim consequat quis dolor et duis sunt.\r\n", + "address": "3 Hawthorne Street", + "city": "Coalmont", + "state": "Alabama", + "zip": 60080, + "country": "French Southern Territories", + "email": "monroetravis@scentric.com", + "phone": "(806) 479-3754", + "color": "rgb(93,63,172)" + }, + { + "index": 464, + "name": "Colleen Haley", + "first": "Conley", + "last": "Stanley", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/okansurreel/73.jpg", + "boolean": false, + "guid": "05acd8c3-414b-4b60-ac92-b0b7eba4e0c3", + "integer": 42, + "date": "Mon Mar 02 2009 03:09:26 GMT-0800 (PST)", + "shortText": "enim ad", + "mediumText": "Esse tempor voluptate aliqua culpa laborum pariatur cillum sint reprehenderit adipisicing. Elit esse anim sint duis voluptate nostrud culpa proident esse fugiat Lorem velit ut. Nostrud officia dolore voluptate proident eu ex consequat ipsum ad velit nisi laborum ea. Laboris in consequat elit et in ut. Qui ex ea reprehenderit sit dolor eiusmod minim deserunt.", + "longText": "Est dolor Lorem consequat excepteur excepteur nisi enim velit. Tempor velit veniam tempor cillum ea dolore est deserunt anim ex. Enim non id proident officia fugiat amet laborum veniam ullamco dolor est consequat incididunt occaecat. Enim culpa qui ipsum est. Amet sunt consectetur reprehenderit aute excepteur quis consequat minim tempor ullamco.\r\nEt ad aute non ut magna mollit sunt dolore laborum. Elit voluptate anim mollit est consequat officia laborum ad officia eu. Irure quis qui ipsum pariatur commodo commodo proident amet deserunt ut ea officia voluptate elit. Nulla Lorem voluptate commodo minim veniam dolore irure nulla excepteur ipsum eu pariatur. Ipsum amet commodo velit cillum. Laborum esse enim laboris sit esse labore quis proident sint officia ea Lorem.\r\nEnim quis enim consectetur elit ex duis. Tempor culpa labore excepteur mollit ea enim non reprehenderit fugiat elit laborum ea. Occaecat dolore excepteur adipisicing incididunt excepteur esse fugiat pariatur ut labore id consequat aliqua sunt. Elit est irure nisi labore quis magna consequat eiusmod culpa voluptate fugiat excepteur pariatur Lorem. Laboris magna irure consequat enim incididunt consectetur aute. Amet aliquip occaecat laboris ea. Fugiat ea non qui culpa pariatur quis nostrud commodo.\r\nDolore non do dolor culpa enim. Elit reprehenderit voluptate cupidatat fugiat. Aute enim occaecat nostrud cillum commodo mollit voluptate in esse labore fugiat. In nulla sit ullamco nisi velit. Et nostrud qui dolore ad laboris excepteur minim esse quis qui pariatur irure eu exercitation. Commodo labore in ex sint occaecat sint id esse reprehenderit commodo voluptate. Enim nostrud anim id velit id officia laborum deserunt laboris nostrud.\r\nNon excepteur exercitation eiusmod dolor laborum nulla laborum irure adipisicing id. Lorem cillum aliqua eu enim exercitation. Proident incididunt irure exercitation amet ad occaecat.\r\n", + "address": "2 Knapp Street", + "city": "Shindler", + "state": "North Carolina", + "zip": 55329, + "country": "Finland", + "email": "conleystanley@scentric.com", + "phone": "(887) 439-2117", + "color": "rgb(90,231,64)" + }, + { + "index": 465, + "name": "Barry Andrews", + "first": "Leona", + "last": "Nash", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lwilsonsmith/73.jpg", + "boolean": false, + "guid": "d6109791-de8e-41c5-9d94-00e69ae0b6e5", + "integer": 45, + "date": "Sun Jan 10 2010 12:46:09 GMT-0800 (PST)", + "shortText": "laborum", + "mediumText": "Commodo eiusmod do fugiat nostrud laborum id incididunt nulla. Tempor amet nostrud commodo id occaecat veniam. Ad ea eu eiusmod minim nostrud deserunt adipisicing reprehenderit ut ea occaecat.", + "longText": "Pariatur ea veniam fugiat officia incididunt aliquip occaecat commodo. Enim anim officia aliquip eu. Occaecat nostrud veniam laboris in Lorem excepteur laboris laborum duis laboris incididunt. Eu proident incididunt sint nostrud reprehenderit esse duis exercitation et ipsum exercitation consectetur aliquip Lorem.\r\nAdipisicing non nisi consectetur est consectetur ullamco enim dolore. Commodo eu Lorem consectetur esse. Cillum eiusmod incididunt exercitation elit labore duis esse. Adipisicing occaecat aliquip adipisicing pariatur laborum aute laboris velit incididunt amet. Nulla aliqua id ex velit consequat ex mollit minim Lorem. Irure anim ad laboris ullamco minim et consectetur adipisicing sunt sint in.\r\nEx magna excepteur esse consequat ex commodo commodo. Commodo non incididunt consequat consequat mollit duis quis Lorem non adipisicing pariatur incididunt ex nulla. Ex ut in laboris labore consequat mollit. Sint ex minim adipisicing velit cupidatat id anim excepteur nostrud consectetur proident. Commodo minim eiusmod veniam pariatur laboris cupidatat. Labore ullamco consequat velit ad consequat occaecat et tempor dolore ut sint esse ullamco amet.\r\nQui officia laborum laborum laborum. Ipsum Lorem ipsum sunt tempor exercitation dolore. Dolore reprehenderit do sit nulla dolor ea incididunt do id esse. Consectetur nulla enim ipsum velit reprehenderit non irure non.\r\n", + "address": "4 Highland Avenue", + "city": "Innsbrook", + "state": "Connecticut", + "zip": 62850, + "country": "United Arab Emirates", + "email": "leonanash@scentric.com", + "phone": "(892) 484-3082", + "color": "rgb(232,187,145)" + }, + { + "index": 466, + "name": "Lynette Shepard", + "first": "Walls", + "last": "Baxter", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/klimmka/73.jpg", + "boolean": false, + "guid": "f477123a-40c0-4cb9-8d64-cbf4c127e7bf", + "integer": 54, + "date": "Tue May 06 2008 02:57:35 GMT-0700 (PDT)", + "shortText": "officia ea ullamco", + "mediumText": "Do deserunt aute duis non proident commodo occaecat do reprehenderit eu aliqua est aliqua dolor. Culpa do laboris eiusmod do eiusmod enim irure ex nostrud. Dolor eiusmod enim pariatur duis non sunt quis dolor. Cupidatat aliqua ut cillum adipisicing non. Eiusmod labore in aliquip dolore magna cillum aliqua mollit irure.", + "longText": "Sunt consequat eiusmod qui irure ex excepteur culpa. Consectetur nostrud exercitation aliquip ex dolore quis. Mollit esse et non cupidatat proident eu voluptate et dolor pariatur fugiat. Amet qui ut quis do voluptate eu dolor enim tempor adipisicing.\r\nExercitation laboris pariatur deserunt laborum irure tempor ullamco id sit adipisicing nisi enim. Do amet consectetur ullamco culpa laborum dolor ut amet sit. Exercitation magna incididunt consectetur laborum excepteur. Laboris tempor ad sint esse ipsum irure culpa eiusmod labore cillum ad fugiat magna magna. Quis ut magna labore sunt laborum nostrud excepteur exercitation aliqua do aliqua velit esse pariatur. Aliqua Lorem qui proident aliqua culpa voluptate non officia.\r\nIncididunt do sunt ex dolor aute ut anim nisi nisi et fugiat. Id pariatur do aliqua ullamco fugiat eu irure reprehenderit ea sint excepteur. Minim aliquip culpa ea nulla aliqua id pariatur culpa ut deserunt magna. Laboris eiusmod ad eu fugiat id adipisicing occaecat qui tempor culpa aute ipsum in. Ea sit veniam dolore consectetur non cupidatat velit fugiat cillum. Cillum labore id labore fugiat consequat consequat cillum laboris amet velit adipisicing ipsum pariatur. Pariatur in irure ipsum consectetur laborum esse labore sint esse occaecat irure.\r\nDolore dolor esse esse ut labore anim deserunt tempor id reprehenderit irure veniam pariatur exercitation. Proident incididunt non ad Lorem est eiusmod aute elit qui Lorem enim. Mollit magna Lorem laboris excepteur occaecat consectetur tempor commodo irure. Sunt in eiusmod ullamco ad commodo laboris Lorem Lorem ullamco cupidatat. Lorem culpa ea do voluptate voluptate exercitation nulla. Officia adipisicing ullamco nisi officia laboris reprehenderit et ipsum. Dolor excepteur duis anim exercitation quis culpa culpa anim eiusmod ex laborum cillum.\r\nDo pariatur ad laborum occaecat labore occaecat amet non. Consequat non sit ullamco nulla cupidatat officia qui duis. Laborum duis ad velit eiusmod ea eu. Tempor incididunt tempor eiusmod duis.\r\n", + "address": "2 Forest Place", + "city": "Sabillasville", + "state": "South Carolina", + "zip": 36003, + "country": "Portugal", + "email": "wallsbaxter@scentric.com", + "phone": "(910) 431-2449", + "color": "rgb(74,195,121)" + }, + { + "index": 467, + "name": "Vega Dickson", + "first": "Bishop", + "last": "Stout", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/m_kalibry/73.jpg", + "boolean": true, + "guid": "c40dd867-a925-4993-a4f1-e7e411637845", + "integer": 69, + "date": "Sun May 04 2008 00:14:56 GMT-0700 (PDT)", + "shortText": "sit sunt", + "mediumText": "Adipisicing sit cillum nostrud nostrud commodo. Sunt labore veniam dolor enim nostrud deserunt. Consectetur est aute laboris aliqua. Sit velit ad dolore cupidatat nisi nisi nostrud minim in est.", + "longText": "Labore esse occaecat commodo pariatur consectetur Lorem. Et minim sint in laborum. Do laborum nulla culpa ex dolor ipsum ut excepteur id deserunt ad quis aliquip. Ipsum proident amet cupidatat labore veniam aliquip ipsum laboris. Incididunt sunt excepteur non ut pariatur aute. Duis exercitation cillum cillum do nostrud minim. Labore eiusmod eiusmod voluptate consectetur id.\r\n", + "address": "3 Seeley Street", + "city": "Westmoreland", + "state": "Michigan", + "zip": 41497, + "country": "Comoros", + "email": "bishopstout@scentric.com", + "phone": "(988) 498-2056", + "color": "rgb(228,157,219)" + }, + { + "index": 468, + "name": "Noelle Mosley", + "first": "Barnes", + "last": "Bowen", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/dhoot_amit/73.jpg", + "boolean": false, + "guid": "987c2384-3ee6-442a-859a-8839de50f5b6", + "integer": 90, + "date": "Thu Feb 26 2009 03:38:03 GMT-0800 (PST)", + "shortText": "voluptate", + "mediumText": "Lorem enim in incididunt proident commodo adipisicing laborum ut. Magna velit nostrud ipsum velit occaecat. Laborum duis reprehenderit reprehenderit id elit aute est occaecat nostrud exercitation reprehenderit esse. Reprehenderit adipisicing laborum laboris culpa magna commodo ullamco amet dolore.", + "longText": "Commodo occaecat magna consectetur esse culpa. Sunt ea adipisicing dolore laboris adipisicing officia proident culpa adipisicing et. Duis reprehenderit sunt proident sint exercitation enim irure esse voluptate mollit irure sint. Occaecat non amet nisi nisi Lorem duis aute incididunt nostrud elit veniam adipisicing proident. Fugiat id nostrud Lorem veniam aliquip Lorem occaecat ea nulla veniam. Sit amet laboris consequat esse excepteur dolore minim.\r\nAliqua ut dolor ex esse laboris consectetur incididunt. Dolore in commodo duis et enim consectetur eiusmod anim sit officia. Eu ut excepteur labore mollit sunt aliqua culpa sunt deserunt eiusmod.\r\nVeniam occaecat reprehenderit magna nisi elit deserunt. Dolore ullamco nisi aute excepteur aliquip aliquip duis eu laboris eu exercitation tempor. Lorem anim commodo esse fugiat enim aliquip aliqua consequat ullamco non aute magna veniam qui. Esse enim eu dolor aliqua pariatur culpa ea.\r\n", + "address": "2 Barwell Terrace", + "city": "Norvelt", + "state": "Maine", + "zip": 82709, + "country": "Central African Republic", + "email": "barnesbowen@scentric.com", + "phone": "(874) 465-2581", + "color": "rgb(201,251,62)" + }, + { + "index": 469, + "name": "Parrish Fowler", + "first": "Glenna", + "last": "Gaines", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/actionsmile/73.jpg", + "boolean": false, + "guid": "82d27516-08d2-4a84-9d5c-ed237bcbbee1", + "integer": 75, + "date": "Sun Oct 29 2000 13:21:37 GMT-0800 (PST)", + "shortText": "aliqua magna ad", + "mediumText": "In qui do velit aliquip voluptate duis eu in deserunt officia fugiat exercitation irure do.", + "longText": "Qui dolor nisi adipisicing mollit laboris velit ad sunt. Magna do esse nostrud excepteur aliqua duis ea cupidatat ut. Nostrud dolore laborum id incididunt duis consectetur sint amet aliqua aliquip elit laborum minim. Proident in anim sunt enim in commodo occaecat magna. Magna est excepteur duis laboris laborum anim esse aute Lorem adipisicing.\r\nAnim voluptate minim adipisicing irure sit ipsum. Dolor dolore velit quis eu. Ex sit ex consequat minim consequat nisi aliqua incididunt voluptate incididunt id anim irure. Velit sit aliquip incididunt do commodo officia enim excepteur ut nisi laborum culpa anim. Ea sint fugiat quis nulla do. Tempor deserunt reprehenderit veniam pariatur velit velit labore culpa ut consequat reprehenderit ipsum. Eu reprehenderit ut excepteur do velit occaecat duis.\r\n", + "address": "2 Dare Court", + "city": "Muse", + "state": "Kansas", + "zip": 37729, + "country": "Gabon", + "email": "glennagaines@scentric.com", + "phone": "(819) 430-2612", + "color": "rgb(196,125,143)" + }, + { + "index": 470, + "name": "Booth Goodman", + "first": "Kathrine", + "last": "Curtis", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/craftified/73.jpg", + "boolean": false, + "guid": "15c7abe9-175a-412b-b120-6bd621022908", + "integer": 6, + "date": "Sat Mar 28 1992 21:26:09 GMT-0800 (PST)", + "shortText": "proident reprehenderit", + "mediumText": "Deserunt id occaecat reprehenderit sint ea reprehenderit mollit eiusmod ea. Sint velit voluptate non Lorem deserunt dolore voluptate enim sunt laborum ad ullamco reprehenderit enim. Excepteur pariatur veniam amet qui in culpa magna. Commodo sit ad veniam deserunt excepteur aute laborum incididunt laborum ut.", + "longText": "Dolor do est occaecat ut ipsum nulla est anim minim voluptate incididunt officia dolor. Adipisicing in id sunt cillum nisi laborum cillum amet laborum aute consectetur. Officia sit dolor elit consequat adipisicing magna magna eu do non pariatur velit dolore ipsum.\r\nReprehenderit Lorem mollit irure laborum voluptate aute. Tempor enim nulla aliquip Lorem id dolor exercitation Lorem minim cupidatat irure et ipsum. Aliqua aute mollit culpa non ex labore quis eu do esse. In laborum adipisicing voluptate culpa pariatur ad et adipisicing. Ut eiusmod esse proident reprehenderit magna ut in nisi cillum sunt consequat pariatur. Consequat enim eiusmod fugiat magna nulla veniam nostrud veniam Lorem adipisicing amet consequat labore. Occaecat duis ad esse sint et cupidatat consequat culpa sint pariatur officia quis.\r\nCulpa id sit qui ea incididunt laboris laboris nisi voluptate nostrud. Enim in voluptate cillum dolore irure occaecat cupidatat pariatur ad elit excepteur. Lorem anim reprehenderit aliqua ipsum officia esse quis incididunt sint sunt esse. Deserunt culpa cillum nulla eiusmod incididunt est exercitation do ea. Voluptate magna occaecat excepteur incididunt tempor occaecat exercitation ad incididunt cupidatat dolor occaecat voluptate.\r\n", + "address": "3 Interborough Parkway", + "city": "Bethany", + "state": "Iowa", + "zip": 27481, + "country": "Cambodia", + "email": "kathrinecurtis@scentric.com", + "phone": "(857) 508-2561", + "color": "rgb(174,52,167)" + }, + { + "index": 471, + "name": "Benton Waters", + "first": "Marietta", + "last": "Cantu", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/aleksitappura/73.jpg", + "boolean": false, + "guid": "f166dfbf-b1f4-4bbf-8d31-7979b09bc29c", + "integer": 84, + "date": "Sat Aug 15 1970 03:51:29 GMT-0700 (PDT)", + "shortText": "ipsum", + "mediumText": "Commodo duis laborum ut aliqua et nostrud incididunt. Cillum et sint do pariatur quis non ex duis deserunt esse eiusmod nulla aliqua id. Consequat amet cupidatat ea non ea ipsum Lorem nulla ut ipsum aliqua eiusmod do nostrud. Quis elit est esse officia.", + "longText": "In magna quis duis et. Veniam consectetur dolor excepteur aute sit minim aute aute ipsum dolor id sint quis. Ex aute Lorem commodo sit et qui esse nulla excepteur tempor. Cillum consectetur nulla consequat nisi elit ex labore. Ex officia labore sunt exercitation aliquip culpa elit commodo fugiat aute ut. Id velit velit sunt qui aliquip laborum nulla ea sit in commodo.\r\nPariatur commodo excepteur aliquip voluptate esse do velit do deserunt. Laboris anim deserunt laborum duis cillum aliqua esse cillum sunt. Ad fugiat nostrud amet sunt ipsum. Laborum deserunt qui eiusmod consequat.\r\nIrure qui enim voluptate laboris ex ad esse irure sunt officia aliquip do elit esse. Eu do commodo in excepteur ad. Aliquip nulla Lorem nisi sunt quis ex in eu fugiat minim elit consectetur occaecat.\r\n", + "address": "3 Falmouth Street", + "city": "Manchester", + "state": "Vermont", + "zip": 34619, + "country": "New Zealand", + "email": "mariettacantu@scentric.com", + "phone": "(932) 598-2276", + "color": "rgb(156,114,200)" + }, + { + "index": 472, + "name": "Lambert Spears", + "first": "Harding", + "last": "Woodward", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/nicollerich/73.jpg", + "boolean": false, + "guid": "32d3c3aa-0997-4d88-b2e7-9b28713b91bd", + "integer": 85, + "date": "Fri Feb 10 2006 11:58:14 GMT-0800 (PST)", + "shortText": "ullamco enim aliquip amet veniam", + "mediumText": "Excepteur magna velit est et minim veniam.", + "longText": "Ut nostrud elit dolor eiusmod est id. Sit aliqua tempor incididunt quis magna aliquip irure in elit in. Exercitation pariatur deserunt irure ullamco laboris excepteur ea. Deserunt labore laboris fugiat reprehenderit laborum quis occaecat duis voluptate labore culpa nisi aliqua ea. Veniam ea duis sint quis anim do.\r\nFugiat reprehenderit proident minim irure aliqua sunt non quis sunt ut. Eiusmod et occaecat ad quis. Velit ipsum in amet qui aliquip consequat sit voluptate est consequat. Nostrud laborum proident incididunt proident voluptate do sint minim officia.\r\n", + "address": "3 Guernsey Street", + "city": "Magnolia", + "state": "Nebraska", + "zip": 56924, + "country": "Lebanon", + "email": "hardingwoodward@scentric.com", + "phone": "(852) 477-3706", + "color": "rgb(148,78,220)" + }, + { + "index": 473, + "name": "Ferrell Gallegos", + "first": "Marie", + "last": "Flowers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mrmartineau/73.jpg", + "boolean": true, + "guid": "3b7ed12d-4299-4fd6-a79a-42a27d171c9e", + "integer": 92, + "date": "Sun Jun 07 1992 13:29:12 GMT-0700 (PDT)", + "shortText": "sunt non veniam", + "mediumText": "Lorem officia duis consequat minim occaecat enim incididunt et labore consequat esse amet. Ea incididunt dolore eiusmod dolor mollit veniam laborum et cupidatat proident. Mollit sint fugiat tempor consectetur veniam ad cupidatat.", + "longText": "Do et sint pariatur in ex consectetur esse. Sit deserunt sit pariatur Lorem laboris duis ex est Lorem sunt. Qui id occaecat proident irure non aliquip tempor velit voluptate dolor adipisicing ullamco enim irure.\r\n", + "address": "4 Harden Street", + "city": "Worton", + "state": "Florida", + "zip": 87914, + "country": "Armenia", + "email": "marieflowers@scentric.com", + "phone": "(867) 463-2219", + "color": "rgb(245,149,165)" + }, + { + "index": 474, + "name": "Elena Hale", + "first": "Leola", + "last": "Byers", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kuldarkalvik/73.jpg", + "boolean": false, + "guid": "248816ef-ebc8-48b6-83b8-ddf059001caf", + "integer": 36, + "date": "Fri Nov 08 1974 22:54:38 GMT-0800 (PST)", + "shortText": "sint ea eu aliqua elit", + "mediumText": "Dolor velit ullamco ullamco dolor nostrud. Qui deserunt mollit ea id cillum eu. Consectetur dolor irure esse velit sunt nostrud nostrud voluptate cillum tempor ipsum mollit do. Laboris ea esse do laboris adipisicing nisi. Labore excepteur cupidatat nostrud sit aliqua ad labore Lorem do aliquip ea veniam veniam.", + "longText": "Et esse non incididunt sunt aliqua eiusmod. Enim id ullamco in ex dolor est non eiusmod reprehenderit. Quis velit pariatur irure labore id enim. Anim esse voluptate fugiat ipsum do amet nisi velit pariatur deserunt culpa. Duis ullamco anim quis deserunt labore id laboris. Minim laborum id ex ex. Nulla mollit id esse do reprehenderit eu velit eu dolor commodo dolore aute sit.\r\nMollit magna reprehenderit velit consequat pariatur officia dolore laborum. Do sit reprehenderit qui fugiat voluptate ut cupidatat sit magna mollit sit velit Lorem. Id anim veniam aliquip aliqua adipisicing.\r\n", + "address": "2 Elliott Walk", + "city": "Gwynn", + "state": "New Jersey", + "zip": 23849, + "country": "Cayman Islands", + "email": "leolabyers@scentric.com", + "phone": "(800) 419-2994", + "color": "rgb(62,183,119)" + }, + { + "index": 475, + "name": "Deloris Warren", + "first": "Lacy", + "last": "Elliott", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/erickmazer/73.jpg", + "boolean": true, + "guid": "75cda396-a179-4462-bd5f-c87f9cdcb07d", + "integer": 16, + "date": "Tue Mar 20 2012 21:38:59 GMT-0700 (PDT)", + "shortText": "labore fugiat et", + "mediumText": "Fugiat velit exercitation commodo dolor deserunt commodo cupidatat eiusmod excepteur ea. Voluptate est deserunt eiusmod nostrud.", + "longText": "Adipisicing qui esse voluptate aliqua magna aliquip esse. Tempor ad aliquip ullamco fugiat. Aliqua Lorem velit consectetur amet velit deserunt.\r\nIrure tempor anim cillum aliqua pariatur fugiat. Nostrud amet dolore nisi cillum qui sit excepteur magna fugiat aute fugiat. Irure culpa incididunt est velit non anim adipisicing culpa est qui. Pariatur est reprehenderit amet officia mollit eu.\r\nId anim exercitation ex culpa dolor amet culpa sint sint sint esse dolore ea cupidatat. Ut laborum ullamco elit proident. Sit aute id proident nulla et. Incididunt excepteur ut cupidatat reprehenderit. Labore qui laboris consequat pariatur do cillum.\r\n", + "address": "3 Ditmars Street", + "city": "Carrizo", + "state": "Wisconsin", + "zip": 21484, + "country": "Italy", + "email": "lacyelliott@scentric.com", + "phone": "(927) 422-3415", + "color": "rgb(69,169,92)" + }, + { + "index": 476, + "name": "Young Lee", + "first": "Kay", + "last": "Montgomery", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/guischmitt/73.jpg", + "boolean": true, + "guid": "c41e7a43-d02b-4c42-9d72-38d7ba926b78", + "integer": 99, + "date": "Wed Sep 26 1979 16:42:55 GMT-0700 (PDT)", + "shortText": "Lorem consequat esse occaecat irure", + "mediumText": "Ex velit deserunt veniam dolor et fugiat. Mollit excepteur occaecat cupidatat mollit ut magna et. Nostrud magna esse consectetur exercitation irure magna Lorem do nulla. Sit laboris cupidatat ullamco eiusmod nisi ex.", + "longText": "Enim cupidatat magna sint velit cupidatat Lorem sint est eiusmod irure officia ea occaecat. Laborum qui officia voluptate anim enim velit cillum ipsum. Irure labore irure eiusmod Lorem sint minim laboris deserunt irure dolor. Anim quis laborum cupidatat ex ex in. Dolor ipsum fugiat ad mollit proident labore consectetur dolore labore laborum cillum sint dolore. Et ex mollit sit est. Anim incididunt deserunt incididunt proident ea velit enim anim laboris adipisicing.\r\nEa officia laborum veniam duis irure labore. Aliquip velit et quis officia veniam cillum dolor nostrud non ipsum sint sint fugiat. Occaecat tempor ea consequat consequat voluptate.\r\nNostrud officia aliquip est eu quis ex dolor sint commodo commodo reprehenderit laborum. Do deserunt voluptate laboris do. Velit fugiat incididunt fugiat proident cillum ad excepteur aute aliqua minim. Nulla voluptate fugiat sint ea incididunt esse laboris sint incididunt dolor cillum irure magna. Tempor culpa anim duis qui adipisicing culpa enim magna duis. Nisi mollit qui nisi excepteur ut ut. Dolor laboris ad in reprehenderit enim sint excepteur laborum irure aliquip.\r\nLorem sit ad excepteur cillum ad consequat fugiat aliqua mollit veniam labore sit aliquip aute. Laborum dolore proident in aute labore ad dolore duis pariatur culpa mollit commodo esse. Enim occaecat officia ipsum ad eiusmod exercitation tempor nisi proident irure ut ut. Elit amet ad ex irure enim laboris elit ex anim magna sint sunt tempor in. Et magna ipsum laborum Lorem incididunt. Amet cillum ut magna dolore elit aute.\r\nSit nulla sint non velit aliquip occaecat sint laborum. Aliqua tempor dolore velit nisi tempor magna labore sunt elit et. Occaecat nisi commodo sunt et tempor ut ullamco. Sint tempor adipisicing consequat commodo tempor deserunt voluptate ea Lorem exercitation id culpa.\r\n", + "address": "4 India Street", + "city": "Elliott", + "state": "Washington", + "zip": 78397, + "country": "Lesotho", + "email": "kaymontgomery@scentric.com", + "phone": "(803) 429-2640", + "color": "rgb(217,203,52)" + }, + { + "index": 477, + "name": "Lynn Kim", + "first": "Ericka", + "last": "Todd", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/mariosmaselli/73.jpg", + "boolean": true, + "guid": "e055ce4f-15a9-429c-91eb-a66e77b390f4", + "integer": 98, + "date": "Tue Mar 14 1972 10:31:22 GMT-0800 (PST)", + "shortText": "ullamco excepteur", + "mediumText": "Tempor sunt aliqua aliquip labore nisi ad eu in et eu laboris deserunt commodo ex. Ipsum minim ex dolor reprehenderit magna ullamco eu quis.", + "longText": "Sint dolore ipsum eu nulla amet amet aute commodo exercitation duis sit occaecat id. Eiusmod ex occaecat consequat tempor fugiat non ad minim anim Lorem. Magna dolore duis exercitation cupidatat elit ipsum Lorem eu mollit sint nulla reprehenderit ullamco elit. Ea est ea commodo eu do. In dolor magna reprehenderit ad dolor dolor id amet tempor occaecat. In laboris do incididunt occaecat elit quis ad amet. Anim sint elit culpa ullamco enim anim officia reprehenderit sunt.\r\nOfficia mollit cupidatat aliquip in laborum consectetur ea. Exercitation voluptate sint labore sunt excepteur eiusmod nostrud voluptate quis pariatur nulla. Esse commodo excepteur pariatur sit tempor ea laborum reprehenderit irure ex tempor.\r\nQuis labore et ad fugiat nostrud id labore non excepteur ipsum elit. Ea nulla laboris dolore nostrud quis irure magna est. Eiusmod mollit voluptate non laborum nostrud voluptate nisi voluptate. Est veniam veniam ad elit nostrud proident adipisicing ullamco aliquip commodo aliquip laborum laborum ad. Amet incididunt esse consequat nisi et consectetur. Adipisicing sunt irure Lorem elit aliqua dolore quis nostrud. Ex magna nisi excepteur occaecat veniam non dolore minim nostrud.\r\n", + "address": "3 Irving Avenue", + "city": "Stonybrook", + "state": "Oregon", + "zip": 25156, + "country": "Mongolia", + "email": "erickatodd@scentric.com", + "phone": "(854) 460-2134", + "color": "rgb(88,191,173)" + }, + { + "index": 478, + "name": "Duran Rasmussen", + "first": "Irene", + "last": "Guy", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/m_ahmadyunus/73.jpg", + "boolean": false, + "guid": "ebebb8d9-3261-4d1f-b04c-580c3537cf32", + "integer": 5, + "date": "Mon Dec 14 1992 15:07:33 GMT-0800 (PST)", + "shortText": "excepteur", + "mediumText": "Aute ut nostrud cillum irure non veniam minim exercitation ex mollit sint veniam voluptate. Est culpa eiusmod aliquip anim. Nisi aliquip duis magna nulla est Lorem cupidatat nisi ut proident nostrud voluptate.", + "longText": "Aute consectetur qui sunt enim ad nulla velit et laborum culpa. Laboris officia exercitation nulla aute incididunt excepteur. Dolor et aliqua nulla mollit incididunt velit laborum nisi non ad excepteur. Exercitation ea dolore aliqua sunt minim dolore laboris Lorem culpa ex ut commodo.\r\nVoluptate occaecat et eu elit mollit commodo laboris eiusmod cillum mollit eiusmod est sunt labore. Ea commodo nisi culpa Lorem velit sit labore elit anim est sit sunt ex pariatur. Fugiat consectetur laborum deserunt sit excepteur exercitation qui veniam culpa sint.\r\nTempor aliquip excepteur consectetur commodo dolor magna. Aute elit esse mollit nisi dolore non laboris velit cillum cupidatat proident proident pariatur aute. Labore cillum ex magna anim voluptate esse deserunt consectetur anim est proident. Cillum Lorem sint aliqua fugiat eu qui. Aute eiusmod est qui aliqua incididunt cillum esse est laboris. Cillum et aute culpa excepteur nisi amet veniam incididunt do do sint esse in sint. Culpa ad ipsum ad nostrud id laborum.\r\n", + "address": "4 Dunham Place", + "city": "Vicksburg", + "state": "Illinois", + "zip": 21064, + "country": "Germany", + "email": "ireneguy@scentric.com", + "phone": "(895) 490-2069", + "color": "rgb(65,241,108)" + }, + { + "index": 479, + "name": "Gomez Kent", + "first": "Beverley", + "last": "Garrison", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/anggit_pradito/73.jpg", + "boolean": false, + "guid": "1f6414f6-bcb1-4a8e-9bd3-1f4bd3657fb8", + "integer": 52, + "date": "Sun Nov 21 1982 20:33:30 GMT-0800 (PST)", + "shortText": "sint cillum non dolore sit", + "mediumText": "Aliquip ad elit nulla veniam quis.", + "longText": "Incididunt in veniam laboris laboris. Ipsum laboris Lorem ea cupidatat laboris deserunt cillum esse. Elit qui id dolor mollit incididunt veniam aute in eiusmod. Occaecat est adipisicing dolor velit enim. Ipsum laboris nulla Lorem ex ut exercitation nulla commodo nisi occaecat excepteur et Lorem ex. Proident eu exercitation exercitation aliqua enim. Tempor magna excepteur enim aliqua.\r\nMollit fugiat veniam minim esse reprehenderit. Cillum exercitation qui elit anim proident. Aliquip ullamco irure aliqua sit commodo veniam cillum adipisicing proident ad aliquip dolore minim.\r\nQuis pariatur sint commodo mollit reprehenderit et incididunt commodo aliqua sint. Sunt nulla deserunt ad nulla in sit incididunt laborum nulla magna culpa excepteur. Deserunt ad non ullamco in amet do elit qui excepteur.\r\nQui ut do ex pariatur tempor. Anim qui labore sunt nisi amet laborum occaecat adipisicing incididunt fugiat labore. Laborum nisi duis minim pariatur labore ea consequat exercitation. Cillum reprehenderit eiusmod aute cillum laborum labore dolor aliqua in magna.\r\n", + "address": "4 Lafayette Avenue", + "city": "Esmont", + "state": "West Virginia", + "zip": 45346, + "country": "Thailand", + "email": "beverleygarrison@scentric.com", + "phone": "(923) 547-3876", + "color": "rgb(69,99,135)" + }, + { + "index": 480, + "name": "Bowers Benson", + "first": "Cannon", + "last": "Cunningham", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/saschamt/73.jpg", + "boolean": false, + "guid": "de1acbb3-f26f-4448-8284-168962e64357", + "integer": 18, + "date": "Sat Jan 23 1988 03:15:57 GMT-0800 (PST)", + "shortText": "tempor dolore pariatur laboris", + "mediumText": "Cillum proident sint eiusmod qui ullamco dolore. Elit sit nisi et laboris labore Lorem tempor nulla. Dolore incididunt deserunt aute dolor ad elit nisi magna ad tempor.", + "longText": "Eiusmod id tempor id officia aliqua aliquip cillum est minim in. Est reprehenderit pariatur reprehenderit laborum nulla. Proident sit do anim minim anim minim in proident laborum pariatur laborum magna est.\r\nDolor exercitation ad enim est dolore excepteur consequat non pariatur. Eiusmod do et cupidatat ad esse do cillum elit in laboris. Labore consequat cupidatat officia do commodo sit consectetur ipsum irure consectetur. Ullamco commodo cillum officia cupidatat Lorem id.\r\nId anim culpa ex et reprehenderit do proident laboris reprehenderit. Proident quis irure duis irure ex ut velit mollit consectetur anim Lorem. Id consectetur laborum enim consectetur eiusmod excepteur id excepteur. In sunt anim magna duis ad occaecat cillum amet tempor pariatur sunt Lorem et proident. Officia in ipsum sunt aute Lorem.\r\n", + "address": "3 Eldert Lane", + "city": "Torboy", + "state": "Mississippi", + "zip": 21587, + "country": "Seychelles", + "email": "cannoncunningham@scentric.com", + "phone": "(922) 457-2557", + "color": "rgb(214,152,137)" + }, + { + "index": 481, + "name": "Duffy Moreno", + "first": "Combs", + "last": "Lamb", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/anasnakawa/73.jpg", + "boolean": false, + "guid": "cc6e70c6-d769-4d53-94c3-3f39685f92b0", + "integer": 62, + "date": "Sat May 08 1971 07:47:14 GMT-0700 (PDT)", + "shortText": "ipsum in sint id amet", + "mediumText": "Voluptate sit occaecat velit elit culpa pariatur deserunt minim tempor. Ipsum sint ad voluptate ipsum.", + "longText": "Non ex consectetur nostrud et incididunt et tempor laborum fugiat aliqua ex sunt. Consectetur velit cillum ea elit anim ut qui velit sit. Dolore cillum eu sint dolore consequat est enim minim sunt dolore dolor est ut aliqua. Tempor ullamco eiusmod incididunt esse quis adipisicing ut et voluptate aliqua ullamco in. Adipisicing irure dolor irure esse velit dolore. Ea ullamco consectetur anim et in quis laboris nulla nisi sint ipsum. Enim aliquip deserunt voluptate quis sint.\r\nCommodo cupidatat occaecat elit Lorem dolor excepteur aliquip est incididunt. Sit minim aute non dolore voluptate nisi. Id non sit nostrud ad.\r\nExercitation deserunt officia nostrud occaecat qui et veniam laborum nostrud dolor dolore id. Ullamco enim esse ex aute ad incididunt aliquip. Tempor id voluptate fugiat ex fugiat dolor.\r\nAd ipsum voluptate ipsum cillum id. Exercitation labore velit occaecat adipisicing non excepteur aute amet. Culpa exercitation deserunt aute excepteur sit enim eiusmod esse Lorem anim aliqua laborum et. Dolore deserunt minim dolore nulla cupidatat proident commodo nisi. Qui exercitation sit elit aliquip mollit aliqua. Proident cupidatat labore culpa ea.\r\n", + "address": "4 Rutledge Street", + "city": "Waterford", + "state": "Rhode Island", + "zip": 58081, + "country": "Chad", + "email": "combslamb@scentric.com", + "phone": "(880) 495-3320", + "color": "rgb(104,242,253)" + }, + { + "index": 482, + "name": "Leach Middleton", + "first": "Molina", + "last": "Parsons", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/just_watt/73.jpg", + "boolean": false, + "guid": "e824a101-32db-4fdd-98bc-f68a09cc9790", + "integer": 36, + "date": "Mon May 13 1996 08:23:43 GMT-0700 (PDT)", + "shortText": "est irure exercitation reprehenderit tempor", + "mediumText": "Cupidatat amet id duis occaecat ad elit quis ea consectetur consequat nostrud qui fugiat. Ea cupidatat est nisi reprehenderit in et sit et ad veniam do elit adipisicing sit. Non Lorem anim consequat velit occaecat excepteur. Officia esse magna veniam dolore ullamco fugiat enim.", + "longText": "In sunt in velit ipsum laborum minim enim sunt duis. Ut duis elit occaecat voluptate eiusmod. Cupidatat dolor laboris aliquip officia magna voluptate incididunt.\r\nFugiat irure ad quis ea aliqua proident ipsum quis ut incididunt. Aliquip culpa velit magna exercitation nostrud. Minim cupidatat irure exercitation excepteur cupidatat dolore. Excepteur amet laborum nulla adipisicing minim aliquip minim cillum nulla officia ut. Nostrud quis eu laboris quis qui minim ad quis ea reprehenderit. Proident ipsum aliquip cupidatat nisi.\r\nConsectetur sint magna id est cupidatat minim. Non cillum aliqua amet commodo aute eiusmod dolor et ad ut non culpa duis incididunt. Sint aliquip excepteur aliqua aliquip mollit commodo amet mollit. Irure minim nisi eu ea sit. Voluptate esse culpa adipisicing excepteur laborum proident laborum proident. Excepteur duis eu fugiat eiusmod labore velit do qui esse dolore labore enim. Esse quis ipsum Lorem voluptate tempor est fugiat enim reprehenderit duis.\r\nVeniam magna qui velit nulla velit incididunt aliqua qui dolore esse ex ad. Fugiat do nostrud do magna excepteur eiusmod et adipisicing aute aliquip cupidatat fugiat irure. Aliqua officia qui anim esse duis est minim excepteur est esse dolor id deserunt.\r\n", + "address": "2 Woods Place", + "city": "Leyner", + "state": "Georgia", + "zip": 45379, + "country": "Uruguay", + "email": "molinaparsons@scentric.com", + "phone": "(825) 403-3345", + "color": "rgb(74,223,146)" + }, + { + "index": 483, + "name": "Della Gomez", + "first": "Lamb", + "last": "Pierce", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/caiifr/73.jpg", + "boolean": false, + "guid": "19a7f089-3845-4441-b5ad-2b14bf2ca81a", + "integer": 50, + "date": "Mon Sep 28 1998 02:00:36 GMT-0700 (PDT)", + "shortText": "proident", + "mediumText": "Cupidatat in duis aliquip nisi consequat enim. Consectetur velit et nostrud et ea exercitation et aliquip pariatur aliqua velit eu ipsum reprehenderit.", + "longText": "Nulla nostrud ex eiusmod adipisicing. Exercitation ad dolore excepteur laborum quis non nisi duis dolor incididunt veniam fugiat laboris. Occaecat officia et eu proident ullamco dolor exercitation non laborum ea aliquip duis laborum. Exercitation voluptate ex aute nisi magna non laboris ea consequat. Est enim do tempor enim aute esse duis voluptate dolor. Aute enim minim cillum id.\r\nMollit eiusmod excepteur nisi est enim labore amet. Enim proident labore mollit dolor do incididunt deserunt irure exercitation irure magna. Incididunt irure officia consectetur magna fugiat quis fugiat voluptate nulla voluptate eu velit. Cupidatat qui proident deserunt reprehenderit veniam sunt non magna velit. Laboris labore consectetur ea et et. Non ex commodo amet enim.\r\nVeniam ex consequat minim ea adipisicing aute elit ea in in pariatur. Consequat nostrud sit non eiusmod voluptate consectetur velit cupidatat qui consectetur esse. Eu laboris cillum quis mollit minim id commodo quis laboris esse sint est irure.\r\nDolore pariatur officia sint qui consequat sunt minim culpa cillum amet qui. Anim adipisicing enim voluptate non nulla anim cupidatat ullamco consectetur elit qui culpa excepteur. Ad enim labore aliqua nulla sint consectetur ipsum occaecat occaecat ut cupidatat ad id ex. Mollit magna qui reprehenderit officia irure nisi ullamco excepteur consequat esse. Dolore commodo laboris ad culpa cillum eu laborum consectetur non occaecat. Sunt magna voluptate occaecat sunt occaecat exercitation magna sint sunt ullamco Lorem labore aliquip. Excepteur pariatur mollit ex incididunt.\r\n", + "address": "2 Dwight Street", + "city": "Newkirk", + "state": "New Mexico", + "zip": 24042, + "country": "Burkina Faso", + "email": "lambpierce@scentric.com", + "phone": "(996) 559-3096", + "color": "rgb(154,210,165)" + }, + { + "index": 484, + "name": "Holder Barker", + "first": "Patrick", + "last": "Best", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/briandiazme/73.jpg", + "boolean": true, + "guid": "c45e5d59-d200-42b3-9f8f-4ecba7a5c540", + "integer": 99, + "date": "Fri Nov 12 1971 21:30:45 GMT-0800 (PST)", + "shortText": "ea", + "mediumText": "Velit in qui nisi cupidatat qui deserunt. Quis pariatur nulla non cupidatat ad magna. Eu anim velit eu qui Lorem officia esse irure magna nulla eiusmod. Do adipisicing minim ad nulla.", + "longText": "Amet id duis eu tempor. Proident nisi pariatur id sit non adipisicing ex nostrud commodo consectetur sint sunt sunt exercitation. Eiusmod sunt est in eiusmod. Enim ut consectetur anim ea qui enim id irure deserunt eu. Tempor aute id nulla velit nostrud dolor veniam esse sint laborum ea. Non aliquip sunt nulla cupidatat amet aliqua non non.\r\nNisi ex ad ad enim eu sit proident aliquip ut incididunt reprehenderit nostrud pariatur. Sint dolor in veniam excepteur enim qui sit sunt cupidatat. Sunt velit magna culpa consectetur quis consectetur veniam do quis irure. Cupidatat aute laborum aute adipisicing amet mollit cillum amet ut. Nostrud magna adipisicing culpa sint esse ex pariatur cupidatat reprehenderit reprehenderit anim deserunt elit sunt. Ullamco minim consequat id in tempor.\r\nAmet veniam anim ullamco eu ea eiusmod est nulla velit. Aliqua nostrud laborum esse commodo laborum dolore. Pariatur magna officia eiusmod velit velit anim ad magna ipsum aliquip.\r\n", + "address": "4 Strauss Street", + "city": "Muir", + "state": "Arizona", + "zip": 26765, + "country": "Greenland", + "email": "patrickbest@scentric.com", + "phone": "(824) 579-3730", + "color": "rgb(171,74,141)" + }, + { + "index": 485, + "name": "Pitts Soto", + "first": "Vincent", + "last": "Hughes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/productpeopletv/73.jpg", + "boolean": true, + "guid": "fe55de6c-660f-4642-8677-5fdea19e5504", + "integer": 34, + "date": "Mon Dec 20 1971 02:47:54 GMT-0800 (PST)", + "shortText": "dolore officia", + "mediumText": "Et in laboris tempor laborum eu nisi consequat adipisicing et eu aliqua anim sunt sint. Culpa est esse eu reprehenderit mollit dolore. Tempor esse laboris esse ea duis dolore in nulla excepteur sit veniam enim velit.", + "longText": "Quis nostrud exercitation ullamco eiusmod proident non officia do mollit laborum exercitation. Velit irure incididunt in nisi laboris consequat eu cupidatat velit cillum nisi pariatur nostrud. Laborum ex reprehenderit culpa dolor duis culpa ut amet deserunt tempor amet. Laborum labore officia dolor occaecat elit. Lorem ullamco consectetur commodo elit et commodo deserunt enim. Sunt consequat cillum proident irure. Pariatur adipisicing ad proident culpa pariatur in tempor irure id ex sint adipisicing nulla tempor.\r\nEu cupidatat culpa non Lorem minim aliqua qui. Non ex aliquip ut reprehenderit anim aute nulla duis sit sunt ut. Nulla cupidatat non commodo adipisicing. Nisi exercitation quis veniam velit cillum incididunt. Do exercitation ut nulla Lorem culpa qui minim laboris quis ipsum elit sunt irure nulla.\r\nEt aute aliquip adipisicing labore ad irure quis consequat occaecat sunt. Reprehenderit fugiat ea eiusmod pariatur Lorem laboris anim non quis labore nisi. Mollit exercitation pariatur incididunt consequat reprehenderit officia nostrud labore duis aute quis sint. Exercitation ipsum esse sit in nulla anim.\r\nIpsum minim tempor et culpa adipisicing nisi tempor nisi laborum anim. Labore enim in sint minim duis Lorem fugiat nisi adipisicing do est elit excepteur. Velit dolore ea aliqua quis qui sit aliquip anim quis velit occaecat. Officia adipisicing ipsum ullamco cillum pariatur ad officia consectetur voluptate aliquip. Est adipisicing incididunt exercitation sunt aliqua irure consectetur excepteur adipisicing sint. Aute non ut ea ea enim. Aliqua Lorem excepteur voluptate nostrud ad proident reprehenderit ad dolore labore sit excepteur excepteur.\r\nAd tempor et veniam consequat. Duis commodo labore eiusmod reprehenderit consectetur adipisicing sint cillum laboris aliquip laboris occaecat sit. Sunt officia mollit labore culpa ea ut. Sunt commodo ea non Lorem culpa incididunt incididunt esse labore et irure tempor ex. Dolor culpa ea amet laboris ad ad mollit qui.\r\n", + "address": "2 Battery Avenue", + "city": "Westphalia", + "state": "Texas", + "zip": 12235, + "country": "Fiji", + "email": "vincenthughes@scentric.com", + "phone": "(947) 521-2627", + "color": "rgb(241,60,119)" + }, + { + "index": 486, + "name": "Morrison Frye", + "first": "Mae", + "last": "Ramirez", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/darioalbini/73.jpg", + "boolean": true, + "guid": "03d96011-46bd-43a9-8186-6b5a9c45ef96", + "integer": 94, + "date": "Sat Dec 29 2012 13:16:12 GMT-0800 (PST)", + "shortText": "duis reprehenderit", + "mediumText": "Sit fugiat exercitation ut laborum.", + "longText": "Ea proident aliqua aute quis Lorem sunt ad. Qui irure fugiat aute dolore sint non sit magna. Nostrud tempor nulla eiusmod fugiat nostrud ad pariatur elit ea laboris.\r\nElit eiusmod mollit anim pariatur ea duis commodo sit eu consectetur non. Officia nisi sunt eu voluptate eu dolor laborum et irure aliquip aliquip consequat sint exercitation. Aliqua anim eiusmod laboris pariatur sit proident irure excepteur amet sint culpa dolor commodo nisi. Quis laborum est occaecat aute quis aliqua proident minim. Cillum tempor occaecat dolore irure labore nisi labore ut mollit proident eu. Eu adipisicing labore elit esse proident proident.\r\nDolore velit do ullamco ad occaecat veniam fugiat. Nulla excepteur aliqua sit magna ipsum pariatur. Anim magna esse laboris eiusmod Lorem ex. Quis mollit nostrud voluptate aliqua ea aliqua sunt non. Quis sint dolor do eu voluptate ad laborum. Eiusmod occaecat elit est labore qui ad ullamco. Esse sit nisi occaecat esse ullamco aliquip cupidatat mollit occaecat esse anim aliqua ea id.\r\nLaborum nostrud anim non excepteur aliqua ullamco minim sunt esse. Consequat ipsum aute id culpa quis minim incididunt. Dolor duis cupidatat ea cupidatat sunt magna consequat in ullamco aliqua eu voluptate. Pariatur proident esse consectetur Lorem id aliquip dolor quis occaecat eiusmod. Ad laboris reprehenderit fugiat amet excepteur. Sunt sit eu qui ad tempor cillum.\r\n", + "address": "4 Willow Place", + "city": "Biehle", + "state": "District Of Columbia", + "zip": 30874, + "country": "Viet Nam", + "email": "maeramirez@scentric.com", + "phone": "(866) 481-3384", + "color": "rgb(104,176,225)" + }, + { + "index": 487, + "name": "Diane Patrick", + "first": "Esperanza", + "last": "Rivera", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/_pandajs/73.jpg", + "boolean": false, + "guid": "7f120012-357d-44c7-8dbe-9cfee5ca1f70", + "integer": 30, + "date": "Fri Jun 30 2000 14:03:45 GMT-0700 (PDT)", + "shortText": "tempor elit cupidatat labore", + "mediumText": "Exercitation reprehenderit tempor tempor esse magna in voluptate ea. Incididunt quis voluptate pariatur irure. Aliquip duis duis velit ullamco consequat ullamco ut proident Lorem dolore proident. Est qui amet ut ad exercitation aute cillum. Pariatur sit ea in consectetur qui amet minim nisi eu.", + "longText": "Adipisicing sit ut duis est tempor incididunt fugiat deserunt ad do voluptate amet eu. Excepteur eiusmod in id amet minim. Anim non velit velit id. Consequat proident irure aliquip est mollit proident cillum commodo veniam exercitation irure nostrud non. Tempor aliquip id fugiat duis elit sint. Enim ea pariatur ex ipsum cupidatat. Nulla proident labore in irure qui.\r\n", + "address": "2 Monument Walk", + "city": "Newry", + "state": "Virgin Islands", + "zip": 40958, + "country": "France, Metropolitan", + "email": "esperanzarivera@scentric.com", + "phone": "(909) 486-2560", + "color": "rgb(164,161,80)" + }, + { + "index": 488, + "name": "Ellen Rich", + "first": "Chandra", + "last": "Cote", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/wellnext/73.jpg", + "boolean": true, + "guid": "02e9640e-9e9f-4b08-85b4-cb797b3b3a9b", + "integer": 71, + "date": "Sat May 01 2004 01:19:45 GMT-0700 (PDT)", + "shortText": "veniam", + "mediumText": "Irure labore ea ex culpa reprehenderit. Et ad irure aute ut quis elit. Proident magna qui sint fugiat culpa commodo aute duis proident. Officia do enim id proident occaecat fugiat eiusmod sint sint laborum ea.", + "longText": "Sunt duis est et magna excepteur laboris culpa anim pariatur officia veniam proident et. Quis tempor excepteur labore eiusmod enim. Ipsum fugiat nisi nulla minim consequat anim aliqua aliqua laboris est labore. Occaecat est qui labore ut fugiat est magna quis esse magna ex irure proident non. In dolore voluptate minim veniam anim qui reprehenderit sit irure sint duis veniam nulla qui. Sunt minim ex consequat incididunt sit ipsum cupidatat esse fugiat.\r\nExercitation magna anim adipisicing minim qui esse eiusmod. Excepteur minim Lorem pariatur in incididunt pariatur sit ipsum deserunt irure laborum. Cillum irure elit nisi dolor cupidatat eiusmod officia eu incididunt aliqua sint excepteur deserunt laboris. Non sint et velit et in aute do cupidatat nostrud sunt excepteur. Aliqua aute voluptate et exercitation exercitation tempor quis aute.\r\nLaboris ut voluptate nisi dolore fugiat. Nulla deserunt cupidatat do quis excepteur reprehenderit nostrud aute laboris Lorem eiusmod sunt. Aliquip voluptate voluptate Lorem non qui adipisicing magna occaecat ad duis.\r\nSit magna amet laboris qui deserunt eu aliquip. Eu ad nulla adipisicing occaecat eu Lorem officia magna nulla amet labore proident minim voluptate. Laboris consequat sint amet cupidatat aute aute sit aliquip excepteur minim ad reprehenderit. Et et sit amet laboris reprehenderit incididunt esse. Non ipsum sit qui anim eiusmod.\r\n", + "address": "4 Ashford Street", + "city": "Dunnavant", + "state": "Puerto Rico", + "zip": 54991, + "country": "Uganda", + "email": "chandracote@scentric.com", + "phone": "(964) 526-3818", + "color": "rgb(172,172,60)" + }, + { + "index": 489, + "name": "Adele Stanton", + "first": "Allison", + "last": "Maxwell", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/skylark64/73.jpg", + "boolean": false, + "guid": "94d8f372-ebe3-4cd7-8456-4b12af0dbc7f", + "integer": 45, + "date": "Sun Oct 28 1990 07:28:14 GMT-0800 (PST)", + "shortText": "reprehenderit", + "mediumText": "Exercitation excepteur nisi duis est laboris ipsum sint est laboris enim ex officia nostrud. Nisi pariatur dolor elit irure aliqua.", + "longText": "Lorem ea id veniam proident exercitation culpa dolor deserunt do cillum dolor ullamco cillum id. Esse sit tempor consectetur elit consequat laborum. Enim ea fugiat ad Lorem aliqua pariatur exercitation ipsum incididunt elit Lorem ipsum amet. Est nisi id adipisicing deserunt dolore aliquip proident commodo. Dolor qui quis excepteur eu proident.\r\nNostrud dolor fugiat nisi dolore qui sunt. Velit ullamco anim do eu. Culpa Lorem id excepteur nostrud culpa Lorem cupidatat culpa ea eiusmod laborum ex. Excepteur veniam voluptate tempor eu ex amet incididunt aute veniam magna.\r\nLabore velit dolor est consectetur ad non officia. Tempor pariatur dolor amet tempor amet eu non anim. Voluptate in fugiat est duis ad est. Id id sit fugiat sunt. Tempor ipsum nisi ea non proident id duis non exercitation ipsum minim proident. Do deserunt sit aute deserunt. Enim quis pariatur ad velit culpa dolor.\r\n", + "address": "2 Bedford Avenue", + "city": "Woodlake", + "state": "Maryland", + "zip": 25064, + "country": "Antarctica", + "email": "allisonmaxwell@scentric.com", + "phone": "(899) 448-3606", + "color": "rgb(240,230,119)" + }, + { + "index": 490, + "name": "Ilene Alston", + "first": "Cecile", + "last": "Woods", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lisekyle/73.jpg", + "boolean": false, + "guid": "1580bd0d-10e4-45df-8d7a-a7d5028512d8", + "integer": 95, + "date": "Sun Mar 29 2009 19:07:07 GMT-0700 (PDT)", + "shortText": "ullamco incididunt", + "mediumText": "Occaecat elit cillum laboris nulla culpa veniam sit non aliquip occaecat. Proident do aliquip exercitation quis proident culpa. Veniam et est incididunt reprehenderit reprehenderit sit elit eiusmod velit qui nulla tempor non. Eiusmod reprehenderit mollit non veniam nisi eiusmod mollit ullamco culpa.", + "longText": "Ea irure est pariatur est qui fugiat ut sit non enim mollit tempor. Aliquip sunt nulla pariatur dolore eu fugiat enim sunt est laboris. Aliquip reprehenderit exercitation id occaecat. Incididunt amet ex dolor sunt.\r\nDuis culpa occaecat deserunt dolore laborum. Sit non officia nisi exercitation do id minim. Voluptate esse velit do officia consectetur duis Lorem proident consequat duis laborum eiusmod officia amet.\r\nCupidatat adipisicing esse laborum sit nisi occaecat reprehenderit officia aute. Sit elit in nisi nulla ipsum mollit. Voluptate fugiat proident incididunt pariatur. Dolor consectetur occaecat est laborum id nisi minim consectetur occaecat. Minim duis occaecat commodo nulla pariatur ex.\r\n", + "address": "3 Gunnison Court", + "city": "Clara", + "state": "Massachusetts", + "zip": 31477, + "country": "Kiribati", + "email": "cecilewoods@scentric.com", + "phone": "(937) 412-3586", + "color": "rgb(218,151,77)" + }, + { + "index": 491, + "name": "Page Marsh", + "first": "Medina", + "last": "Wilson", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/zumwalt/73.jpg", + "boolean": false, + "guid": "4dfb0026-3202-4699-aba7-d815792762f2", + "integer": 42, + "date": "Mon Nov 03 1975 16:09:28 GMT-0800 (PST)", + "shortText": "commodo ex", + "mediumText": "Do ex ullamco eu id consectetur est.", + "longText": "Non consectetur est amet dolore pariatur adipisicing et exercitation pariatur. Duis cillum reprehenderit magna ex esse. Ex incididunt aute in dolore duis. Nisi deserunt quis ex ipsum officia. Esse ea consectetur amet aliquip sunt incididunt.\r\nConsectetur enim aute ad commodo do. Veniam fugiat culpa voluptate minim exercitation eiusmod dolore qui excepteur in laboris incididunt. Ad tempor dolore consectetur ullamco. Ad officia enim laborum minim voluptate fugiat. Laboris eu deserunt ex est. Incididunt est nulla excepteur do ipsum occaecat deserunt esse et. Officia fugiat eiusmod ut sint enim laborum pariatur dolor labore.\r\n", + "address": "4 Lewis Avenue", + "city": "Venice", + "state": "Oklahoma", + "zip": 93431, + "country": "Ecuador", + "email": "medinawilson@scentric.com", + "phone": "(915) 547-2479", + "color": "rgb(97,200,182)" + }, + { + "index": 492, + "name": "Raquel Torres", + "first": "Winters", + "last": "Moon", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/the_winslet/73.jpg", + "boolean": true, + "guid": "2b4cd0b5-6c14-4253-afd2-667d28e069e5", + "integer": 6, + "date": "Sat May 22 1993 08:02:57 GMT-0700 (PDT)", + "shortText": "commodo consectetur culpa aliquip", + "mediumText": "Anim voluptate Lorem laborum consequat ex cillum ipsum exercitation consectetur elit. Pariatur ex qui nostrud enim consectetur eu mollit qui esse irure magna. Reprehenderit aliquip magna sunt labore. Aliqua nisi Lorem ad cupidatat laborum commodo irure non. Ut cupidatat ipsum do adipisicing incididunt.", + "longText": "Magna dolor ut incididunt pariatur cupidatat ullamco. Nisi veniam nulla est est. Nulla ex minim non excepteur quis laborum excepteur ut deserunt eiusmod consequat adipisicing mollit excepteur. Duis id tempor et aliqua laborum.\r\nVoluptate aliquip commodo sit laboris ea nisi id minim consectetur qui. Magna culpa ullamco ea enim excepteur nisi. Anim cillum nostrud ex consectetur. Sint duis voluptate est voluptate eu eu.\r\nConsectetur eiusmod officia qui exercitation ad magna. Ipsum voluptate ex culpa qui fugiat irure magna mollit nisi duis. Non laboris sit adipisicing ipsum dolor eiusmod Lorem aliqua velit ea sit reprehenderit minim aliquip. Reprehenderit non esse voluptate non aute non. Exercitation ex cillum ex sunt incididunt reprehenderit ipsum deserunt ex aliquip. Consectetur esse ut minim duis tempor ex reprehenderit veniam in proident.\r\nLaboris magna labore sint irure. Sit amet cupidatat adipisicing exercitation deserunt sint ad incididunt. Fugiat culpa adipisicing magna est voluptate. Consequat consequat velit reprehenderit aliqua anim commodo fugiat adipisicing qui occaecat dolore sint proident. Ex et officia ullamco labore ipsum consequat magna labore laboris. Adipisicing laboris non non dolore magna tempor do dolore qui nostrud sint. Incididunt enim excepteur aliqua adipisicing culpa irure eiusmod ex ullamco aliquip id cillum commodo ex.\r\n", + "address": "2 Amber Street", + "city": "Masthope", + "state": "Ohio", + "zip": 34479, + "country": "Bulgaria", + "email": "wintersmoon@scentric.com", + "phone": "(812) 514-3427", + "color": "rgb(129,103,138)" + }, + { + "index": 493, + "name": "Sasha Kinney", + "first": "Nielsen", + "last": "Callahan", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/kikillo/73.jpg", + "boolean": false, + "guid": "8d605d34-eb11-4110-9917-e890666b46c9", + "integer": 25, + "date": "Sun Feb 25 1996 00:22:49 GMT-0800 (PST)", + "shortText": "dolor velit", + "mediumText": "Proident occaecat voluptate eiusmod nisi ea non duis. Nostrud fugiat aliquip est exercitation laboris ipsum in dolor nisi duis magna minim. Pariatur pariatur ipsum incididunt excepteur.", + "longText": "Ex duis tempor fugiat mollit sunt enim elit commodo. Laboris in velit magna dolor. Labore labore incididunt veniam eiusmod mollit irure proident voluptate incididunt quis deserunt ad. Eiusmod eiusmod non reprehenderit aute amet eiusmod consectetur magna ea.\r\nTempor ad in cupidatat sunt dolore consectetur sunt. Anim nostrud nulla nostrud consequat. Consequat ullamco enim reprehenderit eu eu ea do duis reprehenderit quis cillum laborum pariatur. Est laborum reprehenderit in commodo enim ullamco mollit. Aute laboris incididunt elit laborum incididunt id tempor.\r\nEt do nulla voluptate magna labore ea commodo ex deserunt. Nostrud pariatur ipsum voluptate do esse non aliqua sint elit laboris ad adipisicing Lorem. Ut fugiat officia nostrud reprehenderit nisi aliqua.\r\n", + "address": "3 Lorraine Street", + "city": "Kidder", + "state": "Nevada", + "zip": 69726, + "country": "American Samoa", + "email": "nielsencallahan@scentric.com", + "phone": "(897) 548-2921", + "color": "rgb(58,212,98)" + }, + { + "index": 494, + "name": "Justice Johnston", + "first": "Francis", + "last": "Walsh", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/hndragnwn/73.jpg", + "boolean": false, + "guid": "93cc4a8b-fe24-4849-a976-a91a2adabb91", + "integer": 60, + "date": "Fri Feb 24 2006 00:14:57 GMT-0800 (PST)", + "shortText": "mollit magna anim exercitation amet", + "mediumText": "Consectetur proident id adipisicing incididunt commodo fugiat tempor amet cupidatat enim nostrud laboris. Non do adipisicing proident id et voluptate enim magna exercitation ut est aliqua pariatur. Enim aute voluptate non elit id commodo commodo aliqua nisi.", + "longText": "Qui aute sunt sint mollit ullamco nisi sunt elit ut cupidatat quis reprehenderit. Amet ullamco sit esse fugiat aliqua proident ut. Nisi ea magna occaecat labore amet fugiat eiusmod cupidatat nulla nostrud mollit et laborum commodo. Lorem commodo anim magna anim in sunt cillum elit deserunt do exercitation labore nisi. Nostrud dolore consequat amet esse deserunt in fugiat non dolore magna laborum.\r\n", + "address": "3 Bethel Loop", + "city": "Williams", + "state": "Montana", + "zip": 30034, + "country": "Angola", + "email": "franciswalsh@scentric.com", + "phone": "(922) 539-3195", + "color": "rgb(80,154,75)" + }, + { + "index": 495, + "name": "Leonard Hess", + "first": "Kate", + "last": "Mccoy", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/fc987/73.jpg", + "boolean": true, + "guid": "0ef972c8-2eaa-4e56-baca-ec8204dee737", + "integer": 89, + "date": "Thu May 26 1988 06:59:06 GMT-0700 (PDT)", + "shortText": "tempor", + "mediumText": "Sunt quis minim magna consectetur ullamco.", + "longText": "Cupidatat incididunt minim laboris eiusmod et ex ad laboris ut commodo ex aliqua. Ea fugiat consectetur sit ut occaecat non est nostrud id in pariatur. Est amet Lorem reprehenderit adipisicing consectetur culpa sit sunt nisi.\r\n", + "address": "4 Caton Avenue", + "city": "Biddle", + "state": "California", + "zip": 25530, + "country": "Bhutan", + "email": "katemccoy@scentric.com", + "phone": "(843) 483-2519", + "color": "rgb(132,225,73)" + }, + { + "index": 496, + "name": "Weiss Malone", + "first": "Buchanan", + "last": "Austin", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/lettershoppe/73.jpg", + "boolean": false, + "guid": "cfc771a6-aeb0-47ec-a5a2-c5240c1b6768", + "integer": 6, + "date": "Fri Feb 14 2014 14:08:10 GMT-0800 (PST)", + "shortText": "id ipsum culpa occaecat reprehenderit", + "mediumText": "Fugiat pariatur in Lorem ipsum ex id. Ex commodo magna enim non ullamco nulla officia velit. Et et ipsum deserunt ex pariatur laboris aliqua in elit sunt excepteur quis exercitation consequat. Fugiat est eiusmod esse amet anim ex aliquip ipsum id aliquip dolor. Qui proident veniam enim enim exercitation deserunt ex voluptate consequat.", + "longText": "Fugiat consequat incididunt aute Lorem aliquip labore tempor consequat quis cillum. Incididunt sunt ullamco proident pariatur ad incididunt. Labore pariatur reprehenderit mollit duis proident incididunt do. Excepteur ullamco cupidatat nisi culpa Lorem sit ea ea sint et sint eu. Aliqua dolore amet nulla sit amet irure nostrud nulla non ex. Lorem deserunt sint commodo amet amet incididunt irure aliqua reprehenderit ea minim adipisicing proident. Irure duis enim non commodo ut adipisicing anim ad fugiat amet qui voluptate fugiat.\r\nEiusmod voluptate nulla anim tempor nulla est excepteur ut. Tempor sunt cillum et mollit mollit anim dolore laboris aute et duis consectetur. Proident quis aliqua nisi incididunt minim voluptate eiusmod id ea. Est labore pariatur nulla incididunt anim. Anim eu mollit voluptate pariatur cillum officia exercitation. Dolor amet mollit officia exercitation minim tempor do eu.\r\nProident est do aliqua eiusmod aliquip ex veniam culpa et occaecat. Et reprehenderit ad et nulla ullamco duis pariatur labore duis ex ea minim laboris nulla. Ex cillum nostrud consectetur dolor et esse.\r\n", + "address": "2 Stockholm Street", + "city": "Darrtown", + "state": "Marshall Islands", + "zip": 54123, + "country": "Dominica", + "email": "buchananaustin@scentric.com", + "phone": "(875) 459-2571", + "color": "rgb(115,116,180)" + }, + { + "index": 497, + "name": "Hawkins Parrish", + "first": "Sandy", + "last": "Poole", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/akashsharma39/73.jpg", + "boolean": true, + "guid": "00fdef08-9189-40f0-9960-6a59ab906f66", + "integer": 70, + "date": "Sun Apr 24 1994 02:10:50 GMT-0700 (PDT)", + "shortText": "deserunt non ex", + "mediumText": "Do eiusmod nostrud sint consectetur nulla elit est amet et qui voluptate consectetur ullamco elit. Voluptate enim nostrud consequat elit laboris non consequat. Consequat nulla veniam ea eiusmod nulla sunt consequat mollit.", + "longText": "Irure quis duis sint fugiat ut sunt proident esse ut. Aliquip aliqua ea ex magna mollit duis elit non elit labore veniam laborum. Deserunt ex cillum culpa qui non elit culpa ad laboris est.\r\nCillum exercitation ullamco adipisicing cillum irure ipsum sunt dolor irure ullamco. Lorem cupidatat cupidatat occaecat proident dolor sit irure quis do est non reprehenderit. Lorem elit dolore ea fugiat elit dolor. Excepteur est anim velit qui in. Minim sint adipisicing quis ullamco ipsum excepteur. Ullamco Lorem exercitation aute laboris fugiat incididunt.\r\nTempor aliqua cupidatat mollit anim Lorem irure exercitation magna non ullamco eu labore dolore velit. Aliqua enim reprehenderit consectetur est sunt labore aliqua consequat deserunt proident proident tempor mollit ad. Cupidatat velit culpa consequat ea incididunt. Pariatur irure dolore cillum voluptate ut amet sunt labore cillum laboris. Esse id aliquip labore consequat adipisicing culpa amet proident. Laborum voluptate nisi velit qui consectetur. Minim cillum duis pariatur est.\r\nCupidatat sunt consectetur laborum ex cupidatat quis ea ad sint aliqua non. Adipisicing ullamco voluptate mollit ullamco id irure proident ex culpa qui incididunt sint nostrud. Amet mollit occaecat non adipisicing tempor aliqua irure ex id. Velit dolore ea mollit fugiat velit elit eiusmod do exercitation.\r\n", + "address": "3 Manor Court", + "city": "Naomi", + "state": "Indiana", + "zip": 12933, + "country": "Egypt", + "email": "sandypoole@scentric.com", + "phone": "(945) 488-2696", + "color": "rgb(79,165,87)" + }, + { + "index": 498, + "name": "Dena Sweeney", + "first": "Kaitlin", + "last": "Brooks", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/fgin69/73.jpg", + "boolean": true, + "guid": "805425f6-7a36-4326-a622-fbd1a52bccca", + "integer": 37, + "date": "Thu Aug 03 1989 21:21:57 GMT-0700 (PDT)", + "shortText": "non in", + "mediumText": "Irure ullamco excepteur commodo aute magna dolore in reprehenderit commodo deserunt quis officia. Anim incididunt velit anim adipisicing dolore reprehenderit voluptate est nisi in amet.", + "longText": "Ea exercitation ipsum aliquip excepteur cillum ipsum cupidatat fugiat in do nostrud. Non culpa irure officia qui dolor esse velit. Sint officia proident occaecat laborum quis non ullamco dolor consectetur ipsum do nisi. Commodo adipisicing quis proident culpa.\r\nCupidatat adipisicing ipsum incididunt sunt consequat Lorem dolore. Aliquip adipisicing reprehenderit pariatur occaecat anim incididunt ad cillum. Voluptate cupidatat nostrud aliquip laborum esse irure duis ex culpa laborum laboris incididunt magna duis. Velit do commodo aute pariatur sunt ut voluptate quis minim. Eu mollit tempor excepteur nulla anim officia est dolor deserunt minim duis nostrud.\r\n", + "address": "4 Harrison Avenue", + "city": "Fairacres", + "state": "Tennessee", + "zip": 70961, + "country": "Chile", + "email": "kaitlinbrooks@scentric.com", + "phone": "(894) 591-3716", + "color": "rgb(131,63,152)" + }, + { + "index": 499, + "name": "Saundra Mcbride", + "first": "Rosemary", + "last": "Grimes", + "image": "https://s3.amazonaws.com/uifaces/faces/twitter/pdugan19/73.jpg", + "boolean": true, + "guid": "824a5e8d-254c-4041-8370-00c4d28ce820", + "integer": 65, + "date": "Mon Aug 28 2006 02:30:47 GMT-0700 (PDT)", + "shortText": "laborum", + "mediumText": "Aliqua magna proident exercitation elit occaecat ut duis. Ad ipsum duis aliqua qui pariatur cupidatat sint pariatur eiusmod do.", + "longText": "Amet sint officia anim officia nisi reprehenderit. Incididunt magna esse nisi nostrud ipsum. Dolor qui eu enim ipsum commodo deserunt ex ad reprehenderit. Commodo commodo amet ullamco aliquip deserunt excepteur aliqua minim ipsum eu. Culpa minim sunt do dolor excepteur dolore id et culpa id aliquip.\r\nNon excepteur culpa nulla consequat velit amet id. Cupidatat qui id aute reprehenderit adipisicing. Duis consectetur nostrud voluptate laboris culpa ipsum labore irure magna.\r\nLorem mollit cillum velit non proident ex ea esse anim nulla sunt ad laboris. Officia nisi culpa exercitation qui pariatur adipisicing ea incididunt consectetur Lorem. Amet minim labore aliqua nostrud. Eu cillum nulla qui enim non occaecat. Laboris exercitation ea sint cillum velit officia velit officia adipisicing do esse dolore aliqua mollit.\r\nCommodo minim sint excepteur aliquip ex consequat veniam ea culpa reprehenderit consequat est amet dolore. Eu ex amet minim quis dolore voluptate deserunt aliquip consectetur consectetur aliqua officia consequat sunt. Duis ut ex consectetur fugiat laborum duis Lorem cupidatat cupidatat excepteur amet. Id consequat dolor mollit elit pariatur dolor occaecat. Consequat ullamco excepteur cillum eu veniam aliqua ex cupidatat labore ex veniam. Dolore ad et veniam sint eiusmod anim minim.\r\nSint pariatur est enim veniam laboris eu occaecat duis. Ad veniam voluptate occaecat aliquip nostrud culpa aliquip duis proident dolor. Consectetur esse ut laborum elit sunt irure ex duis. Ex laborum eu esse incididunt laborum dolore non aute anim elit deserunt. Non Lorem deserunt culpa do ea exercitation fugiat.\r\n", + "address": "4 Chestnut Street", + "city": "Joes", + "state": "Palau", + "zip": 62428, + "country": "Norfolk Island", + "email": "rosemarygrimes@scentric.com", + "phone": "(923) 453-2279", + "color": "rgb(171,145,136)" + } +] \ No newline at end of file diff --git a/lib/app-layout/demo/sample-content.html b/lib/app-layout/demo/sample-content.html new file mode 100644 index 00000000..aea8865b --- /dev/null +++ b/lib/app-layout/demo/sample-content.html @@ -0,0 +1,102 @@ + + + + + + + + + diff --git a/lib/app-layout/docs.html b/lib/app-layout/docs.html new file mode 100644 index 00000000..4296757e --- /dev/null +++ b/lib/app-layout/docs.html @@ -0,0 +1,30 @@ + + + + + + + + + app-layout + + + + + + + + + + + + + diff --git a/lib/app-layout/helpers/helpers.html b/lib/app-layout/helpers/helpers.html index cc932dd6..f54c3f90 100644 --- a/lib/app-layout/helpers/helpers.html +++ b/lib/app-layout/helpers/helpers.html @@ -11,9 +11,11 @@ + + + + + + + + + + + + diff --git a/lib/app-layout/patterns/expand-card/index.html b/lib/app-layout/patterns/expand-card/index.html new file mode 100644 index 00000000..5b398b8e --- /dev/null +++ b/lib/app-layout/patterns/expand-card/index.html @@ -0,0 +1,73 @@ + + + + + + + Expand Card + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/lib/app-layout/patterns/transform-navigation/index.html b/lib/app-layout/patterns/transform-navigation/index.html new file mode 100644 index 00000000..07a694dd --- /dev/null +++ b/lib/app-layout/patterns/transform-navigation/index.html @@ -0,0 +1,39 @@ + + + + + + + Navigation transformation + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/app-layout/templates/getting-started/index.html b/lib/app-layout/templates/getting-started/index.html new file mode 100644 index 00000000..d088f244 --- /dev/null +++ b/lib/app-layout/templates/getting-started/index.html @@ -0,0 +1,39 @@ + + + + + + + + + Getting Started + + + + + + + + + + + + + + diff --git a/lib/app-layout/templates/landing-page/index.html b/lib/app-layout/templates/landing-page/index.html new file mode 100644 index 00000000..817c1f53 --- /dev/null +++ b/lib/app-layout/templates/landing-page/index.html @@ -0,0 +1,39 @@ + + + + + + + + + Landing Page + + + + + + + + + + + + + + diff --git a/lib/app-layout/templates/pesto/data/recipes.json b/lib/app-layout/templates/pesto/data/recipes.json new file mode 100644 index 00000000..5d71240f --- /dev/null +++ b/lib/app-layout/templates/pesto/data/recipes.json @@ -0,0 +1,402 @@ +[ + { + + "id": "1", + "name": "Pesto Bruchetta", + "author": "Peter Carlsson", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/image2-01.png", + "description": "Bask in greens this season by trying this delightful take on traditional bruschetta. Top with a dollop of homemade pesto, and season with freshly ground sea salt and pepper.", + "ingredients": [{ + "amount": "6 pieces", + "description": "Mozzarella cheese" + }, { + "amount": "6 pieces", + "description": "Toasts" + }, { + "amount": "⅔ cup", + "description": "Homemade pesto" + }, { + "amount": "1tbsp", + "description": "Freshly ground pepper" + }, { + "amount": "1 tsp", + "description": "Salt" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "2", + "name": "Rustic purple mash", + "author": "Trevor Hansen", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/blue-potato.jpg", + "description": "Abundant in color, and healthy, delicious goodness, cooking with these South American purple potatoes is a treat. Boil, mash, bake, or roast them. For taste cook with chicken stock, and a dash of extra virgin olive oil.", + "ingredients": [{ + "amount": "2 lbs", + "description": "Purple potatoes, skin on" + }, { + "amount": "1 tsp", + "description": "Salt" + }, { + "amount": "2 tsp", + "description": "Lemon" + }, { + "amount": "4 cups", + "description": "Chicken stock" + }, { + "amount": "1tbsp", + "description": "Extra virgin olive oil" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "3", + "name": "Bacon Sprouts", + "author": "Ali Connors", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/image1-01.png", + "description": "This beautiful sprouts recipe is the most glorious side dish on a cold winter’s night. Construct it with bacon or fake-on, but always make sure the sprouts are deliciously seasoned and appropriately sautéed.", + "ingredients": [{ + "amount": "2 lbs", + "description": "Brussel sprouts" + }, { + "amount": "3 lbs", + "description": "Bacon" + }, { + "amount": "⅔ cup", + "description": "Shaved parmesan cheese" + }, { + "amount": "1tbsp", + "description": "Extra virgin olive oil" + }, { + "amount": "1 tsp", + "description": "Lemon juice" + }, { + "amount": "1/2 cup", + "description": "Sun dried tomatoes" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "4", + "name": "Oven Sausage", + "author": "Sandra Adams", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/sausage.jpg", + "description": "Robust cuts of portuguese sausage add layers of flavour. Bake or fry until sausages are slightly browned and with a crispy skin. Serve warm and with cuts of pineapple for a delightful mix of sweet and savory flavour. This is the perfect dish after a swim in the sea.", + "ingredients": [{ + "amount": "1 1/2 lbs", + "description": "Linguisa" + }, { + "amount": "1 lbs", + "description": "Pineapple or other fresh citrus fruit" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "5", + "name": "Chicken tostadas", + "author": "Peter Carlsson", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/image5.png", + "description": "Crisp flavours and a bit of spice make this roasted chicken dish an easy go to when cooking for large groups. Top with Baja sauce for an extra kick of spice.", + "ingredients": [{ + "amount": "4-6", + "description": "Small corn tortillas" + }, { + "amount": "½ cup", + "description": "Chopped onion" + }, { + "amount": "⅔", + "description": "Cream" + }, { + "amount": "3-4oz", + "description": "Roasted, shredded chicken breast" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "6", + "name": "Coconut rice", + "author": "Ali Connors", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/white-rice.jpg", + "description": "This dish is a terrific pairing to almost any main. Bonus- it’s quick, easy to make, and turns even the simplest of dishes into a delicacy. Sweet coconut cream will leave your mouth watering, with yummy caramelized flecks of rice adding an extra bit of taste. Fluff with fork before serving for best results.", + "ingredients": [{ + "amount": "2 cups", + "description": "Jasmine rice" + }, { + "amount": "1 1/2 cups", + "description": "Water" + }, { + "amount": "1 cup", + "description": "Coconut milk" + }, { + "amount": "1 1/2 tbsp", + "description": "Sugar" + }, { + "amount": "1tsp", + "description": "Salt" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "7", + "name": "Gin basil cocktail", + "author": "Trevor Hansen", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/IMG_5447.jpg", + "description": "This mellow and herb filled blending of simple ingredients is easy enough to mix that a novice host will feel like a seasoned bartender. Top with crushed basil, shake or stir.", + "ingredients": [{ + "amount": "3 parts", + "description": "Gin" + }, { + "amount": "1 part", + "description": "Fresh lemon juice" + }, { + "amount": "½ part", + "description": "Simple syrup" + }, { + "amount": "5", + "description": "Basil leaves, crushed" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "8", + "name": "Seared sesame fish", + "author": "Ali Connors", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/fish-steaks.jpg", + "description": "Cuts of fish like this are perfect for simple searing with bright flavours. Try Sesame seeds on these fillets for crusty skin filled with crunch. For added flavour try dipping in a homemade ponzu sauce - delicious.", + "ingredients": [{ + "amount": "1 ½ lbs", + "description": "Thin fish fillets" + }, { + "amount": "1 lb", + "description": "Salt and black pepper to taste" + }, { + "amount": "3/4 cup", + "description": "Sesame seeds" + }, { + "amount": "2tbsp", + "description": "Sesame oil" + }, { + "amount": "1tbsp", + "description": "Lime juice" + }, { + "amount": "2 tbsp", + "description": "Soy sauce" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "9", + "name": "Herb artichoke", + "author": "Sandra Adams", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/IMG_5438.png", + "description": "This tasty and healthy veggie is a favorite. Artichoke like this can be paired with a hearty main or works well as a small meal with some white wine on the side. Simple and fresh, all foodies love tasty artichoke.", + "ingredients": [{ + "amount": "1", + "description": "Small garlic clove, peeled" + }, { + "amount": "2", + "description": "Whole artichokes" + }, { + "amount": "4 tbsp", + "description": "Fresh lemon juice" + }, { + "amount": "4 tbsp", + "description": "Unsalted butter" + }, { + "amount": "2 tbsp", + "description": "Extra-virgin olive oil" + }, { + "amount": "1⁄4 tsp", + "description": "Freshly ground black pepper" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "10", + "name": "Pesto bruschetta", + "author": "Trevor Hansen", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/IMG_5332.png", + "description": "Life is good when you add amazingly warm bread, fresh pesto sauce, and roasted tomatoes to the table. This a classic starter to break out in a pinch. It’s easy to make and extra tasty.", + "ingredients": [{ + "amount": "1 loaf", + "description": "Sliced French bread" + }, { + "amount": "½ cup", + "description": "Cheese" + }, { + "amount": "1 cup", + "description": "Heirloom tomatoes" + }, { + "amount": "1 cup", + "description": "Fresh basil" + }, { + "amount": "1 clove", + "description": "Garlic " + }, { + "amount": "½ tbsp", + "description": "Olive oil" + }, { + "amount": "3tsp", + "description": "White wine vinegar" + }, { + "amount": "¼ tsp", + "description": "Sea salt" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "11", + "name": "Garlic bok choy", + "author": "Sandra Adams", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/bok-choy.jpg", + "description": "Great stir-fried bok choy starts at the market. For me, nothing says tasty like garlic and baby bok choy. Choose fresh, crisp greens. Once home, wash, chop, and then ready for the wok. No family style spread is complete without these greens.", + "ingredients": [{ + "amount": "1/2 cup", + "description": "Chick broth" + }, { + "amount": "1 tbsp", + "description": "Soy sauce" + }, { + "amount": "¼ cup", + "description": "Sliced garlic" + }, { + "amount": "2-3 lbs", + "description": "Bok choy" + }, { + "amount": "2 tsp", + "description": "Sesame oil" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "12", + "name": "Fresh Fettuccine", + "author": "Ali Connors", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/pasta.png", + "description": "Satisfy a need for rich, creamy homemade goodness with this classic. Creamy fettuccine alfredo will have you hitting the gym the next day, but it’s so good it’s worth it.", + "ingredients": [{ + "amount": "¾ cup", + "description": "Milk" + }, { + "amount": "1 ½ tsp", + "description": "Salt" + }, { + "amount": "1 tbsp", + "description": "Olive oil" + }, { + "amount": "8oz", + "description": "Fettuccine" + }, { + "amount": "½ cup", + "description": "Fresh basil" + }, { + "amount": "½ cup", + "description": "Fresh ground pepper" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + }, + { + "id": "13", + "name": "Sicilian-Style sardines", + "author": "Peter Carlsson", + "imageUrl": "https://app-layout-assets.appspot.com/assets/pesto/food/IMG_0575.jpg", + "description": "My go to way to eat sardines is with a splash of tangy lemon and fresh fennel drizzled on top. The best thing about this dish is the flavour it packs. Prepaid with wild caught sardines or canned.", + "ingredients": [{ + "amount": "1/4 cup", + "description": "Dry white wine" + }, { + "amount": "1", + "description": "Finely chopped shallot" + }, { + "amount": "2 tbsp", + "description": "Fresh lemon juice" + }, { + "amount": "1 tbsp", + "description": "Fennel seeds, crushed" + }, { + "amount": "4 tbsp", + "description": "Extra virgin olive oil, to taste" + }, { + "amount": "2 cans", + "description": "Sardines in oil, drained" + }], + "steps": [{ + "duration": "3 min", + "description": "Stir" + }, { + "duration": "45 min", + "description": "Cook" + }] + } +] diff --git a/lib/app-layout/templates/pesto/manifest.json b/lib/app-layout/templates/pesto/manifest.json new file mode 100644 index 00000000..afb1283a --- /dev/null +++ b/lib/app-layout/templates/pesto/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "Pesto", + "name": "Pesto by Polymer", + "display": "standalone", + "icons": [{ + "src": "https://app-layout-assets.appspot.com/assets/pesto/icon-144.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "https://app-layout-assets.appspot.com/assets/pesto/icon-256.png", + "sizes": "256x256", + "type": "image/png" + }], + "start_url": "index.html" +} diff --git a/lib/app-layout/templates/pesto/src/app-icons.html b/lib/app-layout/templates/pesto/src/app-icons.html new file mode 100644 index 00000000..c3946e0c --- /dev/null +++ b/lib/app-layout/templates/pesto/src/app-icons.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-layout/templates/publishing/data/articles.json b/lib/app-layout/templates/publishing/data/articles.json new file mode 100644 index 00000000..e1eba51d --- /dev/null +++ b/lib/app-layout/templates/publishing/data/articles.json @@ -0,0 +1,111 @@ +[ + { + "name":"art", + "title":"Art", + "items":[ + { + "id": "1", + "title":"Tooling Up", + "author":"Amber Bravo", + "date":"June 14 2015", + "primaryColor":"#5a7785", + "secondaryColor":"#455a64", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/tooling-up-header-a13cfd9a.svg", + "desc":"How a new generation of prototyping tools at Google will help designers build better software.", + "content":"The road from design to production is often hard-won, filled with well-intended design detours, steep learning curves, and the occasional road block. Here’s a common scenario: A team of designers begins building wireframes for a new product. Several weeks, revisions, and pin-ups later, they emerge with a “final,” “shippable” file, which they hand off to the development team. The engineers poke holes in the design, deeming several elements “unbuildable,” and begin rendering out some semblance of the design in code. Several weeks later, they deliver a staging site. The designers are thrilled—this is the first time they’ve seen their design IRL—but are quickly deflated when they realize how much of the design has been lost in translation. The typography is wonky. The animations and interactive elements need to be re-tuned. A volley of annotated emails with screenshots ensues, until finally, the designer and developer sit side-by-side, and visually adjust the design directly in code." + }, + { + "id": "2", + "title":"Expressing Brand in Material", + "author":"Viktor Persson & Rachel Been", + "date":"July 4 2015", + "primaryColor":"#202226", + "secondaryColor":"#333", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/article_brand_2x1_202226-fc539618.svg", + "desc":"Material design offers a system for designing functional and elegant software. How does your brand fit into the framework? We’ve created a step-by-step guide to staying on-brand while going material.", + "content":"Nobody knows your brand better than you do. This is why when we set out to create the framework for material design, we were sensitive to the ways in which third-party developers might leverage the system. We wanted material design to give comprehensive guidance for designing effective and elegant UIs — taking a strong position on motion, dimensionality, color, and graphic hierarchy — but with enough latitude to allow for various levels of engagement. You don’t have to adopt every element of the material design system in order for it to be beneficial to your identity system. Whether it’s a custom font, a unique color story, or distinct voice, everything that provides stylistic distinction in a product should be celebrated and supported in the material design framework. We’ve laid out the top brand touchpoints to help illustrate the system’s flexibility and give designers and developers a road map for showcasing their brand identity." + }, + { + "id": "3", + "title":"New Design Tools", + "author":"Amber Bravo", + "date":"July 29 2015", + "primaryColor":"#3e50b4", + "secondaryColor":"#303fc3", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/150727_GD_Article_ToolingUpFurther_1x1Tile-01-86c8e03e.svg", + "desc":"See Also: (More) thoughts on design tools", + "content":"This week on Google Design, we published a roundtable discussion with Matias Duarte and the founders of Pixate and RelativeWave, Paul Colton and Max Wiesel. To prepare for the interview, I turned to my design brethren on Medium (and beyond!) to learn more about their experiences working with some of the more popular prototyping tools available today, as well as their hopes and dreams for the next generation of design software. Here are a few of the stories I found helpful for framing the discussion. A thorough account of using Form (pre 1.3) for the first time, from the perspective of a designer who is less familiar with Quarz Composer, with built prototypes to help synthesize the material covered in each section. Also worth reading: Ces’ great tutorial exploring material design in Origami." + } + ] + }, + { + "name":"film", + "title":"Film", + "items":[ + { + "id": "1", + "title":"Design from iOS to Android (and Back Again)", + "author":"Roman Nurik & Viltor Persson", + "date":"Aug 20 2015", + "primaryColor":"#3e50b4", + "secondaryColor":"#303F9F", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/renditions/Article_iOS_to_Android_Header_3e50b4-f064882f-1240.png", + "desc":"A practical guide to designing across platforms", + "content":"Designing and developing between platforms is a lot like traveling through different countries. You go through the same motions — sleeping, eating, sightseeing, regardless of where you are — but the customs of the country you’re visiting dictate how you go about doing them. In some countries, it’s ok to push people into the train, or eat a burger with a knife and fork. Similarly, if you developed your product first for iOS, you shouldn’t simply expect that you can port it into Android without issue, because your app will feel lost in translation. It’s important to understand the idioms and behaviors of each platform before you start design and development. That way your users will be able to use and easily understand your app on the platform that is native to them, and you will have the most clear and true version of your product — no matter where it’s used. This guide will walk you through some practical tips for moving from iOS to Android (and back again) without suffering a cultural divide." + }, + { + "id": "2", + "title":"Demystifying Density", + "author":"Sebastien Gabriel", + "date":"July 10 2015", + "primaryColor":"#00ccb8", + "secondaryColor":"#00b7a5", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/article_dpi_00ccb8-34fdd39e.svg", + "desc":"Sebastien Gabriel takes one for the team with his exhaustive guide to DPI & PPI", + "content":"Dots Per Inch and Pixels Per Inch, DPI and PPI respectively, are units for measuring the tiny bits of color that come together to form a printed image or an image on a screen. The higher the density of those dots or pixels, the higher the resolution. For most, a rudimentary understanding of DPI or PPI amounts to knowing whether or not an image is clear but small enough to print, email, or post to social media. However, for designers, understanding screen density and ratio is essential to delivering delightful user experiences across devices. Designing for phones, tablets, laptops, watches, and hybrids without a proper knowledge of dpi and ratio is a lot like building a house using the wrong measurement — things are going to look very weird very quickly (and good luck getting through the door!)." + }, + { + "id": "3", + "title":"Pixate and Form 1.3", + "author":"Google Design", + "date":"May 30 2015", + "primaryColor":"#eeeeee", + "secondaryColor":"#9e9e9e", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/pixate-and-form-1-3-header-2061f19f.svg", + "desc":"Discover the latest features and start designing native prototypes on your device.", + "content":"We’re thrilled to announce that Pixate has joined Google! Pixate adds to our ongoing effort to develop new design and prototyping tools, including Form 1.3. Explore the latest features of both products below, and check out our roundtable conversation with Matias Duarte, VP Design at Google, and the the founders of Pixate and Form. A visual prototyping platform that allows designers to create sophisticated, fluid mobile prototypes that run natively on iOS and Android devices. Creating complete app prototypes or crafting carefully choreographed interactions that look and feel completely real, and sharing them so entire product teams or clients can experience them right on their device." + }, + { + "id": "4", + "title":"Welcome to the New Google Design", + "author":"Google Design", + "date":"Sep 10 2015", + "primaryColor":"#3367d6", + "secondaryColor":"#2755CC", + "image":"https://g-design.storage.googleapis.com/production/v5/assets/Article_Welcome_Header_2880-ce3ec22d.svg", + "desc":"More design, all the time", + "content":"Much has happened in the year since we launched Google Design and introduced our material design framework at Google I/O 2014. We hosted FORM, Google’s first-ever design conference in San Francisco and engaged in numerous outreach efforts through workshops, design sprints, and online discussions. We’ve continued to improve and expand on the material design guidelines and have witnessed countless teams both inside and outside Google adopt the framework and ship beautiful, materialized products across platforms. To better capture all this great design work happening at Google and around the community, we’ve completely reconceived Google Design. In addition to all the guidelines and resources you’ve come to rely on, we’ve also released guides for TV, Auto, and Cardboard, our virtual reality product. Our new Icon Library allows you to download our icon font and source from the over 800 material system icons. We’ve also added a whole new layer of written and video content — everything from tutorials, case-studies, interviews, and essays, to a listing of job opportunities and design-related events, like our upcoming FORM conference. The goal is to provide a new perspective on our design process and ample opportunity for cross pollination. Now you can watch an animated color tutorial before you dive into the nitty gritty details in our material design guidelines, or get some practical guidance around designing between platforms. Our Making Material Design series takes you behind-the-scenes to find out what it takes to create a new visual framework for Google. Additionally, we’ve launched new Dribbble and YouTube channels to complement our active Twitter and Google+ presence and can share even more real-time content from our design teams. We hope you enjoy the the new Google Design, and we look forward to hearing your feedback on Twitter and Google+. After all, good design is never done." + } + ] + }, + { + "name":"photography", + "title":"Photography", + "items":[] + }, + { + "name":"design", + "title":"Design", + "items":[] + }, + { + "name":"topten", + "title":"Top Ten", + "items":[] + }, + { + "name":"aday", + "title":"A Day in the Life", + "items":[] + } +] \ No newline at end of file diff --git a/lib/app-layout/templates/publishing/manifest.json b/lib/app-layout/templates/publishing/manifest.json new file mode 100644 index 00000000..2ccb9479 --- /dev/null +++ b/lib/app-layout/templates/publishing/manifest.json @@ -0,0 +1,21 @@ +{ + "name": "Zuperkülblog", + "short_name": "Zuperkülblog", + "icons": [{ + "src": "//app-layout-assets.appspot.com/assets/zuperkulblog/launcher-icon-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "//app-layout-assets.appspot.com/assets/zuperkulblog/launcher-icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + },{ + "src": "//app-layout-assets.appspot.com/assets/zuperkulblog/launcher-icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }], + "start_url": "index.html", + "background_color": "#fafafa", + "display": "standalone", + "theme_color": "#fafafa" +} diff --git a/lib/app-layout/templates/publishing/src/app-icons.html b/lib/app-layout/templates/publishing/src/app-icons.html new file mode 100644 index 00000000..94ef2c91 --- /dev/null +++ b/lib/app-layout/templates/publishing/src/app-icons.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/lib/app-layout/templates/shrine/data/featured.json b/lib/app-layout/templates/shrine/data/featured.json new file mode 100644 index 00000000..a2092b32 --- /dev/null +++ b/lib/app-layout/templates/shrine/data/featured.json @@ -0,0 +1,72 @@ +[ + { + "id": 16, + "title": "Green comfort chair", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/chair.png", + "storeName": "Ali’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/ali-connors.png", + "price": "$300", + "category": "Feature" + }, + { + "id": 12, + "title": "Beautiful little teapot", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/beachball.png", + "storeName": "Trevor’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/zach.jpg", + "price": "$300", + "category": "Latest" + }, + { + "id": 6, + "title": "Original Sunnies For U", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/chucks.png", + "storeName": "Sandra’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/sandra-adams.jpg", + "price": "$300", + "category": "Fashion" + }, + { + "id": 17, + "title": "Folding Chair", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/lawn_chair.png", + "storeName": "Stella’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/16c477b.jpg", + "price": "$300", + "category": "Furniture" + }, + { + "id": 18, + "title": "Better wearing heels", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/heels.png", + "storeName": "Peter’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/peter-carlsson.png", + "price": "$300", + "category": "Beauty" + }, + { + "id": 3, + "title": "Red Popsicle", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/popsicle.png", + "storeName": "Trevor’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/zach.jpg", + "price": "$300", + "category": "Food" + }, + { + "id": 10, + "title": "Best gift for the traveler", + "quote": "Leave the tunnel and the rain is fallin amazing things happen when you wait", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/backpack.png", + "storeName": "Sandra’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/sandra-adams.jpg", + "price": "$300", + "category": "Travel" + } +] \ No newline at end of file diff --git a/lib/app-layout/templates/shrine/data/items.json b/lib/app-layout/templates/shrine/data/items.json new file mode 100644 index 00000000..52e5af9c --- /dev/null +++ b/lib/app-layout/templates/shrine/data/items.json @@ -0,0 +1,192 @@ +[{ + "id": 0, + "title": "Vintage Bluetooth Radio", + "description": "Isn’t it cool when things look old, but their not. Looks Old But Not makes awesome vintage goods that are super smart. This ol’ radio just got an upgrade. Connect to it with an app and jam out to some top forty.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/radio.png", + "price": "$300", + "storeName": "Sandra’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/sandra-adams.jpg", + "storeDescription": "Sandra specializes in furniture, beauty and travel products with a classic vibe. Custom orders are available if you’re looking for a certain color or material.", + "featured": false +}, +{ + + "id": 1, + "title": "Sunglasses", + "description": "Be an optimist. Carry Sunglasses with you at all times. All Tints and Shades products come with polarized lenses and super duper UV protection so you can look at the sun for however long you want. Sunglasses make you look cool, wear them.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/sunnies.png", + "price": "$70", + "storeName": "Trevor’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/zach.jpg", + "storeDescription": "Trevor Hanson sources housewares and styles from just about everywhere. Super cool and extra awesome all of his shop’s goods are handmade with love.", + "featured": false +}, +{ + + "id": 2, + "title": "Clock", + "description": "Timekeeper Co makes clocks that tell time precisely. Clock is very simple to use, set the time using your phone, hang it, and viola! You’ll never be late again.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/clock.png", + "price": "$120", + "storeName": "Trevor’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/zach.jpg", + "storeDescription": "Trevor Hanson sources housewares and styles from just about everywhere. Super cool and extra awesome all of his shop’s goods are handmade with love.", + "featured": false +}, +{ + + "id": 3, + "title": "Red Popsicle", + "description": "Looks can be deceiving. This Red Popsicle comes in a wide variety of flavors, including strawberry, that burst as soon as it hits the mouth. Red Popsicles melt slow, so savor the flavor.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/popsicle.png", + "price": "$300", + "storeName": "Stella’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/16c477b.jpg", + "storeDescription": "Stella sells awesome stuff at lovely prices. made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 4, + "title": "Green Slip-ons", + "description": "Feetsy has been making extraordinary slip-ons for decades. With each pair of shoes purchased Feetsy donates a pair to those in need. Buy yourself a pair, buy someone else a pair. Very Comfortable.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/green-shoes.png", + "price": "$75", + "storeName": "Sandra’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/sandra-adams.jpg", + "storeDescription": "Sandra specializes in furniture, beauty and travel products with a classic vibe. Custom orders are available if you’re looking for a certain color or material.", + "featured": false +}, +{ + + "id": 5, + "title": "Teapot", + "description": "Impress your guests with Teapot by Kitchen Stuff. Teapot holds extremely hot liquids and pours them from the spout. Use the handle, shown on the left, so your fingers don’t get burnt while pouring.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/teapot.png", + "price": "$210", + "storeName": "Ali’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/ali-connors.png", + "storeDescription": "Ali Connor’s makes custom goods for folks of all shapes and sizes made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 6, + "title": "Blue suede shoes", + "description": "Who needs pants when you have shoes! Blue suede shoes were meant to go dancing in, so you may want to pick up a few of these. These things are stylish.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/chucks.png", + "price": "$89", + "storeName": "Trevor’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/zach.jpg", + "storeDescription": "Trevor Hanson sources housewares and styles from just about everywhere. Super cool and extra awesome all of his shop’s goods are handmade with love.", + "featured": true +}, +{ + + "id": 7, + "title": "Dipped Brush", + "description": "WeDipIt does it again. This handle dipped 4 inch brush is a perfect for painting 4 inch lines, or coloring in big areas with paint. Just be sure you don’t drop it in a bucket of red paint, then it won’t look dipped anymore.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/brush.png", + "price": "$25", + "storeName": "Stella’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/16c477b.jpg", + "storeDescription": "Stella sells awesome stuff at lovely prices. made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": true +}, +{ + + "id": 8, + "title": "Perfect Goldfish Bowl", + "description": "The Perfect Bowl Co makes the best bowls for just about anything you can think of. This Perfect Goldfish Bowl holds water and fish perfectly. Looks great in living rooms. Keep out of reach from cats.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/fish_bowl.png", + "price": "$25", + "storeName": "Ali’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/ali-connors.png", + "storeDescription": "Ali Connor’s makes custom goods for folks of all shapes and sizes made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 9, + "title": "Red Lipstick Set", + "description": "Trying to find the perfect shade to match your mood? Try no longer. Red Lipstick Set by StickLips has you covered for those nights when you need to get out, or even if you’re just headed to work.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/lipstick.png", + "price": "$25", + "storeName": "Sandra’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/sandra-adams.jpg", + "storeDescription": "Sandra specializes in furniture, beauty and travel products with a classic vibe. Custom orders are available if you’re looking for a certain color or material.", + "featured": false +}, +{ + + "id": 10, + "title": "Backpack", + "description": "This backpack by Bags ‘n’ stuff can hold just about anything: a laptop, a pen, a protractor, notebooks, small animals, plugs for your devices, sunglasses, gym clothes, shoes, gloves, two kittens, and even lunch!", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/backpack.png", + "price": "$25", + "storeName": "Peter’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/peter-carlsson.png", + "storeDescription": "Peter makes great stuff for awesome people like you. Super cool and extra awesome all of his shop’s goods are handmade with love. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 11, + "title": "Half Shield Helmet", + "description": "Half Shield is the right helmet for those warm summer days on the road. Dot approved, these helmets have been rigorously tested. Keep that noggin protected.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/helmet.png", + "price": "$25", + "storeName": "Ali’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/ali-connors.png", + "storeDescription": "Ali Connor’s makes custom goods for folks of all shapes and sizes made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 12, + "title": "Beachball", + "description": "Are you at a baseball game and feeling bored? At a pool party and looking for a laugh? Do you need something to take your anger out on? Beachball, by inflatable fun, is the perfect outlet.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/beachball.png", + "price": "$25", + "storeName": "Peter’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/peter-carlsson.png", + "storeDescription": "Peter makes great stuff for awesome people like you. Super cool and extra awesome all of his shop’s goods are handmade with love. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 13, + "title": "Old Binoculars", + "description": "These Binoculars by See Through are amazing and can make things that are really far away seem like they’re right in front of you. Bring them to the beach. Now you can buy the cheap seats at the big game and feel like you’re right in the action.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/binoculars.png", + "price": "$25", + "storeName": "Stella’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/16c477b.jpg", + "storeDescription": "Stella sells awesome stuff at lovely prices. made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": false +}, +{ + + "id": 14, + "title": "Lime Flippers", + "description": "Flippers are a nice tool to have when you’re being chased by an oversized sea turtle. Never get caught again with these fast water shoes. You’re like a fish, but more graceful.", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/flippers.png", + "price": "$25", + "storeName": "Peter’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/peter-carlsson.png", + "storeDescription": "Peter makes great stuff for awesome people like you. Super cool and extra awesome all of his shop’s goods are handmade with love. Custom orders are available upon request if you need something extra special.", + "featured": true +}, +{ + + "id": 15, + "title": "Surfboard", + "description": "Who says you can’t walk on water? With Surfboard, by Surfboard Supply, you can fly on water. This beast is fast and handles like a porsche. Hang Ten Bro!", + "imageUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/surfboard.png", + "price": "$25", + "storeName": "Stella’s shop", + "storeAvatarUrl": "https://www.gstatic.com/angular/material-adaptive/shrine/16c477b.jpg", + "storeDescription": "Stella sells awesome stuff at lovely prices. made by hand and sometimes by machine, but always with love and care. Custom orders are available upon request if you need something extra special.", + "featured": true +} +] \ No newline at end of file diff --git a/lib/app-layout/templates/shrine/manifest.json b/lib/app-layout/templates/shrine/manifest.json new file mode 100644 index 00000000..48f3cad3 --- /dev/null +++ b/lib/app-layout/templates/shrine/manifest.json @@ -0,0 +1,22 @@ +{ + "name": "Shrine", + "short_name": "Shrine by Polymer", + "icons": [{ + "src": "//app-layout-assets.appspot.com/assets/shrine/launcher-icon-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "//app-layout-assets.appspot.com/assets/shrine/launcher-icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + },{ + "src": "//app-layout-assets.appspot.com/assets/shrine/launcher-icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }], + "start_url": "index.html", + "background_color": "#fff", + "display": "standalone", + "theme_color": "#fff" +} + diff --git a/lib/app-layout/templates/shrine/src/shrine-featured-item.html b/lib/app-layout/templates/shrine/src/shrine-featured-item.html new file mode 100644 index 00000000..5ee22a2b --- /dev/null +++ b/lib/app-layout/templates/shrine/src/shrine-featured-item.html @@ -0,0 +1,210 @@ + + + + + + + + + + + diff --git a/lib/app-layout/templates/test-drive/index.html b/lib/app-layout/templates/test-drive/index.html new file mode 100644 index 00000000..ffe363c7 --- /dev/null +++ b/lib/app-layout/templates/test-drive/index.html @@ -0,0 +1,40 @@ + + + + + + + + + + Test Drive + + + + + + + + + + + + + + diff --git a/lib/app-localize-behavior/CONTRIBUTING.md b/lib/app-localize-behavior/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/app-localize-behavior/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/app-localize-behavior/demo/index.html b/lib/app-localize-behavior/demo/index.html new file mode 100644 index 00000000..2448d0e6 --- /dev/null +++ b/lib/app-localize-behavior/demo/index.html @@ -0,0 +1,34 @@ + + + + + app-localize-behavior demo + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-localize-behavior/demo/locales.json b/lib/app-localize-behavior/demo/locales.json new file mode 100644 index 00000000..f434899a --- /dev/null +++ b/lib/app-localize-behavior/demo/locales.json @@ -0,0 +1,22 @@ +{ + "en": { + "header_1": "Translation and localization", + "header_2": "Plurals and genders", + "greeting": "Hello!", + "intro": "My name is {name}", + "cats": "I have {numCats, number} cats. Almost {pctBlack, number, percent} of them are black.", + "sale": "Sale begins {start, date, medium}, at {time, time, short}. Everything is {price, number, USD}.", + "fruit": "{num, plural, =0 {no apples} =1 {one apple} other {# apples}}", + "bananas": "{name} ate {num, plural, =0 {no bananas} =1 {a banana} other {# bananas}} {gender, select, male {at his house.} female {at her house.} other {at their house.}}" + }, + "fr": { + "header_1": "Traduction et localisation", + "header_2": "Pluriels et les sexes", + "greeting": "Bonjour!", + "intro": "Je m'appelle {name}", + "cats": "J'ai {numCats, number} chats. Près de {pctBlack, number, percent} d'entre eux sont noirs.", + "sale": "La vente commence le {start, date, medium} à {time, time, short}. Tout est à {price, number, USD}.", + "fruit": "{num, plural, =0 {pas de pommes} =1 {une pomme} other {# pommes}}", + "bananas": "{name} {num, plural, =0 {ne} =1 {} other {}} mange {num, plural, =0 {pas de bananes} =1 {une banane} other {# bananes}} {gender, select, male {chez lui.} female {chez elle.} other {chez eux.}}" + } +} diff --git a/lib/app-localize-behavior/index.html b/lib/app-localize-behavior/index.html new file mode 100644 index 00000000..0b14f7c9 --- /dev/null +++ b/lib/app-localize-behavior/index.html @@ -0,0 +1,30 @@ + + + + + + + + + app-localize-behavior + + + + + + + + + + + + + diff --git a/lib/app-localize-behavior/test/locales.json b/lib/app-localize-behavior/test/locales.json new file mode 100644 index 00000000..30671875 --- /dev/null +++ b/lib/app-localize-behavior/test/locales.json @@ -0,0 +1,10 @@ +{ + "en": { + "greeting": "hello", + "intro": "my name is {name}. i have {numCats, number} cats." + }, + "fr": { + "greeting": "bonjour", + "intro": "je m'apelle {name}. j'ai {numCats, number} chats." + } +} diff --git a/lib/app-localize-behavior/test/locales2.json b/lib/app-localize-behavior/test/locales2.json new file mode 100644 index 00000000..8d8b33f4 --- /dev/null +++ b/lib/app-localize-behavior/test/locales2.json @@ -0,0 +1,10 @@ +{ + "en": { + "greeting": "hello!", + "intro": "my name is {name}! i have {numCats, number} cats!" + }, + "fr": { + "greeting": "bonjour!", + "intro": "je m'apelle {name}! j'ai {numCats, number} chats!" + } +} diff --git a/lib/app-localize-behavior/test/x-translate-only-imperative.html b/lib/app-localize-behavior/test/x-translate-only-imperative.html new file mode 100644 index 00000000..1c5e3f14 --- /dev/null +++ b/lib/app-localize-behavior/test/x-translate-only-imperative.html @@ -0,0 +1,47 @@ + + + + + + + + + + diff --git a/lib/app-localize-behavior/test/x-translate.html b/lib/app-localize-behavior/test/x-translate.html new file mode 100644 index 00000000..c88e9520 --- /dev/null +++ b/lib/app-localize-behavior/test/x-translate.html @@ -0,0 +1,49 @@ + + + + + + + + + + diff --git a/lib/app-localize-behavior/test/x-translate2.html b/lib/app-localize-behavior/test/x-translate2.html new file mode 100644 index 00000000..7983a203 --- /dev/null +++ b/lib/app-localize-behavior/test/x-translate2.html @@ -0,0 +1,48 @@ + + + + + + + + + + diff --git a/lib/app-pouchdb/.bower.json b/lib/app-pouchdb/.bower.json index eef79de4..3680f6fe 100644 --- a/lib/app-pouchdb/.bower.json +++ b/lib/app-pouchdb/.bower.json @@ -75,6 +75,6 @@ "commit": "bdcfb530a31eb8807bfb8eade45b1e2baee78af9" }, "_source": "https://github.com/PolymerElements/app-pouchdb.git", - "_target": "^2.0.0", + "_target": "^2.1.1", "_originalSource": "PolymerElements/app-pouchdb" } \ No newline at end of file diff --git a/lib/app-pouchdb/CONTRIBUTING.md b/lib/app-pouchdb/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/app-pouchdb/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/app-pouchdb/app-pouchdb-conflict-resolution.html b/lib/app-pouchdb/app-pouchdb-conflict-resolution.html new file mode 100644 index 00000000..3a7928d7 --- /dev/null +++ b/lib/app-pouchdb/app-pouchdb-conflict-resolution.html @@ -0,0 +1,116 @@ + + + + + diff --git a/lib/app-pouchdb/app-pouchdb-index.html b/lib/app-pouchdb/app-pouchdb-index.html new file mode 100644 index 00000000..fd7f906d --- /dev/null +++ b/lib/app-pouchdb/app-pouchdb-index.html @@ -0,0 +1,108 @@ + + + + + + + diff --git a/lib/app-pouchdb/app-pouchdb-query.html b/lib/app-pouchdb/app-pouchdb-query.html new file mode 100644 index 00000000..d8abf9fe --- /dev/null +++ b/lib/app-pouchdb/app-pouchdb-query.html @@ -0,0 +1,252 @@ + + + + + + + diff --git a/lib/app-pouchdb/app-pouchdb-sync.html b/lib/app-pouchdb/app-pouchdb-sync.html new file mode 100644 index 00000000..53e405a6 --- /dev/null +++ b/lib/app-pouchdb/app-pouchdb-sync.html @@ -0,0 +1,120 @@ + + + + + diff --git a/lib/app-pouchdb/index.html b/lib/app-pouchdb/index.html new file mode 100644 index 00000000..1fcdd8d4 --- /dev/null +++ b/lib/app-pouchdb/index.html @@ -0,0 +1,27 @@ + + + + + + app-pouchdb + + + + + + + + + + + + + diff --git a/lib/app-pouchdb/pouchdb.find.html b/lib/app-pouchdb/pouchdb.find.html new file mode 100644 index 00000000..6420991d --- /dev/null +++ b/lib/app-pouchdb/pouchdb.find.html @@ -0,0 +1,10 @@ + + diff --git a/lib/app-pouchdb/pouchdb.html b/lib/app-pouchdb/pouchdb.html new file mode 100644 index 00000000..b1b956e8 --- /dev/null +++ b/lib/app-pouchdb/pouchdb.html @@ -0,0 +1,10 @@ + + diff --git a/lib/app-route/.bower.json b/lib/app-route/.bower.json index 54006145..f1418f56 100644 --- a/lib/app-route/.bower.json +++ b/lib/app-route/.bower.json @@ -1,6 +1,6 @@ { "name": "app-route", - "version": "2.0.1", + "version": "2.0.3", "authors": [ "The Polymer Authors" ], @@ -31,7 +31,7 @@ "paper-styles": "PolymerElements/paper-styles#1 - 2", "paper-toggle-button": "polymerelements/paper-toggle-button#1 - 2", "url": "webcomponents/URL#^0.5.7", - "web-component-tester": "^4.0.0", + "web-component-tester": "^6.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" }, "variants": { @@ -52,7 +52,7 @@ "paper-spinner": "PolymerElements/paper-spinner#^1.1.1", "paper-styles": "polymerelements/paper-styles#^1.0.13", "paper-toggle-button": "polymerelements/paper-toggle-button#^1.0.0", - "web-component-tester": "^4.0.0", + "web-component-tester": "^6.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "resolutions": { @@ -63,13 +63,13 @@ "resolutions": { "webcomponentsjs": "^1.0.0" }, - "_release": "2.0.1", + "_release": "2.0.3", "_resolution": { "type": "version", - "tag": "v2.0.1", - "commit": "da2d1c251202bf0c76542a4cfdedec028ee3f33c" + "tag": "v2.0.3", + "commit": "951dc29dcf73583aee5e629bae3f1065107fd281" }, "_source": "https://github.com/PolymerElements/app-route.git", - "_target": "^2.0.0", + "_target": "^2.0.3", "_originalSource": "PolymerElements/app-route" } \ No newline at end of file diff --git a/lib/app-route/.github/ISSUE_TEMPLATE.md b/lib/app-route/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..0c018d64 --- /dev/null +++ b/lib/app-route/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/app-route/CONTRIBUTING.md b/lib/app-route/CONTRIBUTING.md new file mode 100644 index 00000000..34d61544 --- /dev/null +++ b/lib/app-route/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/hirore/edit?html,output](https://jsbin.com/hirore/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/app-route/README.md b/lib/app-route/README.md new file mode 100644 index 00000000..ee6bdd1d --- /dev/null +++ b/lib/app-route/README.md @@ -0,0 +1,217 @@ + + + +[![Build status](https://travis-ci.org/PolymerElements/app-route.svg?branch=master)](https://travis-ci.org/PolymerElements/app-route) + + +## <app-route> + +`app-route` is an element that enables declarative, self-describing routing +for a web app. + +> *n.b. app-route is still in beta. We expect it will need some changes. We're counting on your feedback!* + +In its typical usage, a `app-route` element consumes an object that describes +some state about the current route, via the `route` property. It then parses +that state using the `pattern` property, and produces two artifacts: some `data` +related to the `route`, and a `tail` that contains the rest of the `route` that +did not match. + +Here is a basic example, when used with `app-location`: + +```html + + + +``` + +In the above example, the `app-location` produces a `route` value. Then, the +`route.path` property is matched by comparing it to the `pattern` property. If +the `pattern` property matches `route.path`, the `app-route` will set or update +its `data` property with an object whose properties correspond to the parameters +in `pattern`. So, in the above example, if `route.path` was `'/about'`, the value +of `data` would be `{"page": "about"}`. + +The `tail` property represents the remaining part of the route state after the +`pattern` has been applied to a matching `route`. + +Here is another example, where `tail` is used: + +```html + + + + + +``` + +In the above example, there are two `app-route` elements. The first +`app-route` consumes a `route`. When the `route` is matched, the first +`app-route` also produces `routeData` from its `data`, and `subroute` from +its `tail`. The second `app-route` consumes the `subroute`, and when it +matches, it produces an object called `subrouteData` from its `data`. + +So, when `route.path` is `'/about'`, the `routeData` object will look like +this: `{ page: 'about' }` + +And `subrouteData` will be null. However, if `route.path` changes to +`'/article/123'`, the `routeData` object will look like this: +`{ page: 'article' }` + +And the `subrouteData` will look like this: `{ id: '123' }` + +`app-route` is responsive to bi-directional changes to the `data` objects +they produce. So, if `routeData.page` changed from `'article'` to `'about'`, +the `app-route` will update `route.path`. This in-turn will update the +`app-location`, and cause the global location bar to change its value. + + + +## <app-location> + +`app-location` is an element that provides synchronization between the +browser location bar and the state of an app. When created, `app-location` +elements will automatically watch the global location for changes. As changes +occur, `app-location` produces and updates an object called `route`. This +`route` object is suitable for passing into a `app-route`, and other similar +elements. + +An example of the public API of a route object that describes the URL +`https://elements.polymer-project.org/elements/app-location`: + +```css +{ + prefix: '', + path: '/elements/app-location' +} +``` + +Example Usage: + +```html + + +``` + +As you can see above, the `app-location` element produces a `route` and that +property is then bound into the `app-route` element. The bindings are two- +directional, so when changes to the `route` object occur within `app-route`, +they automatically reflect back to the global location. + +### Hashes vs Paths + +By default `app-location` routes using the pathname portion of the URL. This has +broad browser support but it does require cooperation of the backend server. An +`app-location` can be configured to use the hash part of a URL instead using +the `use-hash-as-path` attribute, like so: + +```html + +``` + +### Integrating with other routing code + +There is no standard event that is fired when window.location is modified. +`app-location` fires a `location-changed` event on `window` when it updates the +location. It also listens for that same event, and re-reads the URL when it's +fired. This makes it very easy to interop with other routing code. + +So for example if you want to navigate to `/new_path` imperatively you could +call `window.location.pushState` or `window.location.replaceState` followed by +firing a `location-changed` event on `window`. i.e. + +```javascript +window.history.pushState({}, null, '/new_path'); +window.dispatchEvent(new CustomEvent('location-changed')); +``` + + + +## <app-route-converter> + +`app-route-converter` provides a means to convert a path and query +parameters into a route object and vice versa. This produced route object +is to be fed into route-consuming elements such as `app-route`. + +> n.b. This element is intended to be a primitive of the routing system and for +creating bespoke routing solutions from scratch. To simply include routing in +an app, please refer to [app-location](https://github.com/PolymerElements/app-route/blob/master/app-location.html) +and [app-route](https://github.com/PolymerElements/app-route/blob/master/app-route.html). + +An example of a route object that describes +`https://elements.polymer-project.org/elements/app-route-converter?foo=bar&baz=qux` +and should be passed to other `app-route` elements: + +```css +{ + prefix: '', + path: '/elements/app-route-converter', + __queryParams: { + foo: 'bar', + baz: 'qux' + } +} +``` + +`__queryParams` is private to discourage directly data-binding to it. This is so +that routing elements like `app-route` can intermediate changes to the query +params and choose whether to propagate them upstream or not. `app-route` for +example will not propagate changes to its `queryParams` property if it is not +currently active. A public queryParams object will also be produced in which you +should perform data-binding operations. + +Example Usage: + +```html + + + + + + + +``` + +This is a simplified implementation of the `app-location` element. Here the +`iron-location` produces a path and a query, the `iron-query-params` consumes +the query and produces a queryParams object, and the `app-route-converter` +consumes the path and the query params and converts it into a route which is in +turn is consumed by the `app-route`. + + + +## Polymer.AppRouteConverterBehavior + +Provides bidirectional mapping between `path` and `queryParams` and a +app-route compatible `route` object. + +For more information, see the docs for `app-route-converter`. + + diff --git a/lib/app-route/app-location.html b/lib/app-route/app-location.html index 48a9b60d..63fc3433 100644 --- a/lib/app-route/app-location.html +++ b/lib/app-route/app-location.html @@ -66,16 +66,16 @@ --> diff --git a/lib/app-route/app-route-converter.html b/lib/app-route/app-route-converter.html new file mode 100644 index 00000000..e16b653f --- /dev/null +++ b/lib/app-route/app-route-converter.html @@ -0,0 +1,79 @@ + + + + + + + + diff --git a/lib/app-route/app-route.html b/lib/app-route/app-route.html index 2165f848..9478f531 100644 --- a/lib/app-route/app-route.html +++ b/lib/app-route/app-route.html @@ -318,11 +318,8 @@ } if (this.setProperties) { - if (!this.active) { - this._setActive(true); - } // atomic update - this.setProperties(propertyUpdates); + this.setProperties(propertyUpdates, true); } else { this.__setMulti(propertyUpdates); } diff --git a/lib/app-route/bower.json b/lib/app-route/bower.json index 2513e4c5..ba6ffdef 100644 --- a/lib/app-route/bower.json +++ b/lib/app-route/bower.json @@ -1,6 +1,6 @@ { "name": "app-route", - "version": "2.0.1", + "version": "2.0.3", "authors": [ "The Polymer Authors" ], @@ -31,7 +31,7 @@ "paper-styles": "PolymerElements/paper-styles#1 - 2", "paper-toggle-button": "polymerelements/paper-toggle-button#1 - 2", "url": "webcomponents/URL#^0.5.7", - "web-component-tester": "^4.0.0", + "web-component-tester": "^6.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" }, "variants": { @@ -52,7 +52,7 @@ "paper-spinner": "PolymerElements/paper-spinner#^1.1.1", "paper-styles": "polymerelements/paper-styles#^1.0.13", "paper-toggle-button": "polymerelements/paper-toggle-button#^1.0.0", - "web-component-tester": "^4.0.0", + "web-component-tester": "^6.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "resolutions": { diff --git a/lib/app-route/demo/data-loading-demo.html b/lib/app-route/demo/data-loading-demo.html new file mode 100644 index 00000000..20797f7f --- /dev/null +++ b/lib/app-route/demo/data-loading-demo.html @@ -0,0 +1,35 @@ + + + + + + + + + carbon-route data loading example + + + + + + + + + + + + + + + + + diff --git a/lib/app-route/demo/data-loading-demo/flickr-search-demo.html b/lib/app-route/demo/data-loading-demo/flickr-search-demo.html new file mode 100644 index 00000000..b13fc7bf --- /dev/null +++ b/lib/app-route/demo/data-loading-demo/flickr-search-demo.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + diff --git a/lib/app-route/demo/youtube-demo/youtube-lite.html b/lib/app-route/demo/youtube-demo/youtube-lite.html new file mode 100644 index 00000000..24f1a7b7 --- /dev/null +++ b/lib/app-route/demo/youtube-demo/youtube-lite.html @@ -0,0 +1,204 @@ + + + + + + + + + diff --git a/lib/app-route/index.html b/lib/app-route/index.html new file mode 100644 index 00000000..5b354f51 --- /dev/null +++ b/lib/app-route/index.html @@ -0,0 +1,27 @@ + + + + + + app-router + + + + + + + + + + + + + diff --git a/lib/app-route/test/app-example-1.html b/lib/app-route/test/app-example-1.html new file mode 100644 index 00000000..e86a7038 --- /dev/null +++ b/lib/app-route/test/app-example-1.html @@ -0,0 +1,45 @@ + + + + + + + + + diff --git a/lib/app-route/test/app-route-converter.html b/lib/app-route/test/app-route-converter.html new file mode 100644 index 00000000..b5b8c559 --- /dev/null +++ b/lib/app-route/test/app-route-converter.html @@ -0,0 +1,58 @@ + + + + + app-route-converter + + + + + + + + + + + + + + diff --git a/lib/app-route/test/app-route.html b/lib/app-route/test/app-route.html index de44b701..9e0fcf07 100644 --- a/lib/app-route/test/app-route.html +++ b/lib/app-route/test/app-route.html @@ -195,6 +195,22 @@ }); suite('propagating data', function() { + test('data is defined when active is true', function(done) { + var chainedRoutes = fixture('ChainedRoutes'); + + chainedRoutes.$.foo.addEventListener('active-changed', function(e) { + if (e.detail.value = true) { + expect(chainedRoutes.$.foo.data.foo).to.be.equal('bar'); + done(); + } + }); + + chainedRoutes.$.foo.route = { + prefix: '', + path: '/foo/bar', + __queryParams: {} + }; + }); test('data is empty if no routes in the tree have matched', function() { var routes = fixtureChainedRoutes({ path: '' }); diff --git a/lib/app-route/test/observer-tester.html b/lib/app-route/test/observer-tester.html new file mode 100644 index 00000000..95c4b22a --- /dev/null +++ b/lib/app-route/test/observer-tester.html @@ -0,0 +1,47 @@ + + + + + + + + + + diff --git a/lib/app-route/test/test-observer-app.html b/lib/app-route/test/test-observer-app.html new file mode 100644 index 00000000..d2bcf070 --- /dev/null +++ b/lib/app-route/test/test-observer-app.html @@ -0,0 +1,67 @@ + + + + + + app-route 0bserver Test + + + + + + + + + + + + + + + + diff --git a/lib/app-storage/.bower.json b/lib/app-storage/.bower.json index 77b09144..00f0fd4b 100644 --- a/lib/app-storage/.bower.json +++ b/lib/app-storage/.bower.json @@ -66,6 +66,6 @@ "commit": "120d8872839c7a3c798cda7e2f7ea86a8a739d43" }, "_source": "https://github.com/PolymerElements/app-storage.git", - "_target": "^2.0.0", + "_target": "^2.0.2", "_originalSource": "PolymerElements/app-storage" } \ No newline at end of file diff --git a/lib/app-storage/.github/ISSUE_TEMPLATE.md b/lib/app-storage/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..599fc438 --- /dev/null +++ b/lib/app-storage/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/app-storage/.gitignore b/lib/app-storage/.gitignore new file mode 100644 index 00000000..1996f7ca --- /dev/null +++ b/lib/app-storage/.gitignore @@ -0,0 +1,3 @@ +bower_components* +node_modules +bower-*.json \ No newline at end of file diff --git a/lib/app-storage/.travis.yml b/lib/app-storage/.travis.yml new file mode 100644 index 00000000..f86c6337 --- /dev/null +++ b/lib/app-storage/.travis.yml @@ -0,0 +1,25 @@ +dist: trusty +language: node_js +sudo: required +node_js: stable +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +before_script: + - npm install -g polymer-cli + - polymer install --variants +script: + - xvfb-run polymer test + - >- + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default'; + fi +env: + global: + - secure: >- + I6aEZebEmxr9TOJnN1i45lUb0EGeAgVdv4YbwDy3NkRotWEFVWIkLzfJaKh6RqNh6u8RUiOS4OaJznmJ6B6TlUvwxyLFKbNYmc9+7o5MjFIBv7Gr4WdXMZruPu1K08lCVupiAuuJNg9HB7FlxhLI8N0STz/1bZS/aJ6AugHp8qZaEyi9WtvW+aJEVyuS13mrLVEqUNkGOFvmjkrh7fvsSR1wgNmdhFjQKSxyDuLRM3Xe1WJN3vdfvBbk7VMp3ahttVqheFxhtumycHSX6GG1Zj8MKrwmkPMCYxW6Rl+6+FW+APxF2XzVqK0l3BBARFtODthgTjv+hZEUUbdMbE5Q5fP7OVcbRvhPbfjK/LgPb/f0uHa13gJQV2lvUAEoLdUo3SJbHM5TDej4A0WFgtc4nrhF8SL9P9DcsjCqxXzLK5h3sR6oKweYPkAltg33x2VYKLjony2qqxfHT4BK7jPKmGW/Rqk3acZ4btAZAkuLk53jtDQbnrd/4+8xUZ4J9CAPVNLy1F2aJeqCnRyXSS8q6wDmC2MjrbOWqF2qy5tImObZyRxW9PjYDvTeF3ayg8QvgMTw4o+RqdYenLEQXLTtQA0CUMi3Ma4z6gqmFcisFZBbBjpqDU7ssorHa37v29iBgb7JgvruJAJWkl4E0a76X3bH1lP4e6C7csnqUYvzYoc= + - secure: >- + HHgb8tnJoRa6bIbuAbv9w7rfxVWhIB3MIU+b8zpIlCKe/FDQdTiGWZ5woOl2+D39ALj1fbffScbLuASSzN0iiuYM+ddY8CQ1VTCLf1wvpXoplfVp7uNPSD9z4Oi6Q7wFMfks0Y74AXTJbH2/65Wh7YmphogeW5PSjItNEC/WqBwftJCbNQ8m7mer076DgeeiMIfHJbq7nemeViuIIwXdZn8LjZXKPy7d+wRZSlftbszgKxp4V1BKlxiMPEhOrGzapZ9nBeRaEjvFr/YpDhYWVviBUgvoSQ5p4yyy7geZvnWVnsUAalJMgevETfkj7flx1addshtdvkBSYcr0easzfXm+1jIt4Q5LzwODl3r7UEkxxMfTqxnbf4RyCy5bXS7Kf1ng455DpH9NSlPWqllAEnjpSUQht3KpfuIEAdmaUVQkWsaYoJRW+MBKbjM9etgn7eAtduJFDeWFba0ocEfR8CStAQvwjUsF62XnVpQ3MxkOb3NP3DjZWn9p9j0OViixl36k7t9fZSuOpF+/sKtMf5odsPczMU2B8kfLuLTZ5WY2O7dRQ4pMWMTxvPKqV65oJaqi7bOk89ec3azOWDVFLYrlet48X5HbKLvLyqfyP6G3sLMmqXP4MqHc/zxhJBdVSuZT8Ol5ettuiycO6LQLgHqwz35/GCnHZTImMx0Pfd4= diff --git a/lib/app-storage/CONTRIBUTING.md b/lib/app-storage/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/app-storage/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/app-storage/README.md b/lib/app-storage/README.md new file mode 100644 index 00000000..6a9cdb26 --- /dev/null +++ b/lib/app-storage/README.md @@ -0,0 +1,179 @@ + + +![status](https://travis-ci.org/PolymerElements/app-storage.svg?branch=2.0-preview) +## Changes in 2.0 +* Promise polyfill is no longer shipped with the element. It is now a dev dependency. + +## Polymer.AppStorageBehavior + +AppStorageBehavior is an abstract behavior that makes it easy to +synchronize in-memory data and a persistant storage system, such as +the browser's IndexedDB, or a remote database like Firebase. + +For examples of how to use this behavior to write your own app storage +elements see `` here, or check out +[polymerfire](https://github.com/Firebase/polymerfire) and +[app-pouchdb](https://github.com/PolymerElements/app-pouchdb). + + + +## <app-indexeddb-mirror> + +`app-indexeddb-mirror` is a purpose-built element to easily add read-only +offline access of application data that is typically only available when the +user is connected to the network. + +When an app using this element is connected to the network, the element acts as +a pass-through for live application data. Data is bound into the `data` +property, and consumers of the data can bind to the correlated `persistedData` +property. As live data changes, `app-indexeddb-mirror` caches a copy of the live +data in a local IndexedDB database. When the app is no longer connected to the +network, `app-indexeddb-mirror` toggles its `persistedData` property to refer +to a read-only copy of the corresponding data in IndexedDB. + +This element is particularly useful in cases where an API or storage layer (such +as Firebase, for example) does not support caching data for later use during +user sessions that begin while the user is disconnected from the network. + +Here is an example of using `app-indexeddb-mirror` with `iron-ajax`: + +```html + + + + + + +``` + +In the example above, `persistedData` will always be populated with +the most recently requested list of cats, even when the user is offline, and +even if the user refreshes the app, as long as the request as been made at +least once while connected to the network. + +Of course, in the case of `iron-ajax`, it's totally possible to selectively +cache network requests in a ServiceWorker for the same effect. However, this is +not the true for all data sources. For example, if a data source is provided +over a WebSocket, it will not be cacheable by a ServiceWorker. Cases like this +are where `app-indexeddb-mirror` really shines: + +```html + + + + + + +``` + +Firebase data is typically provided over a WebSocket connection, so it is very +tricky to cache it for offline access. With `app-indexeddb-mirror`, offline +access to Firebase data is trivially easy to implement. + +## User sessions + +`app-indexeddb-mirror` caches data in a local IndexedDB database. If your app +features user authentication, it is usually desireable to ensure that this data +does not leak across the sessions of different users on the same device. + +In support of this, each `app-indexeddb-mirror` is configured with a unique +session key. When the session key changes, it will automatically wipe the local +IndexedDB copy of any data that has been persisted. + +```html + + +``` + +When `someUniqueSessionKey` changes to a different value, `app-indexeddb-mirror` +will delete the local data it is persisting at the `"cats"` key. + +## Important considerations regarding WebWorkers + +In order to ensure that operations on IndexedDB block the main browser thread as +little as possible, `app-indexeddb-mirror` relies on a WebWorker to operate on +its corresponding IndexedDB database. If you are vulcanizing or otherwise +combining your source files before your app is deployed, make sure that you +include the corresponding worker script (`app-indexeddb-mirror-worker.js`) +among your deployable files. You can configure the path to the worker script +with the `worker-url` attribute. + +`app-indexeddb-mirror` will prefer SharedWorker if it is available in the +browser where the app is running. If SharedWorker is not available, it will +attempt to fall back to a standard WebWorker. When using a standard WebWorker, +all `app-indexeddb-mirror` instances with the same `workerUrl` will share the +same WebWorker instance. + +If WebWorkers are not supported in the browser, persisted offline data will not +be available through this element. + + + +## <app-localstorage-document> + +app-localstorage-document synchronizes storage between an in-memory +value and a location in the browser's localStorage system. + +localStorage is a simple and widely supported storage API that provides both +permanent and session-based storage options. Using app-localstorage-document +you can easily integrate localStorage into your app via normal Polymer +databinding. + +app-localstorage-document is the reference implementation of an element +that uses `AppStorageBehavior`. Reading its code is a good way to get +started writing your own storage element. + +Example use: + +```html + + + +``` + +app-localstorage-document automatically synchronizes changes to the +same key across multiple tabs. + +Only supports storing JSON-serializable values. + + + +## Polymer.AppNetworkStatusBehavior + +`Polymer.AppNetworkStatusBehavior` tracks the status of whether the browser +is online or offline. True if the browser is online, and false if the browser is +offline matching the HTML browser state spec. + + diff --git a/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-client.html b/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-client.html new file mode 100644 index 00000000..10185de8 --- /dev/null +++ b/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-client.html @@ -0,0 +1,178 @@ + + + + diff --git a/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-worker.js b/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-worker.js new file mode 100644 index 00000000..6e147540 --- /dev/null +++ b/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-worker.js @@ -0,0 +1,319 @@ +/** + * @license + * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ + +(function() { + 'use strict'; + + var INTERNAL_STORE_NAME = 'internal'; + var DB_VERSION = 2; + + var CLIENT_PORTS = '__clientPorts'; + var DB_NAME = '__dbName'; + var STORE_NAME = '__storeName'; + var DB_OPENS = '__dbOpens'; + + var MIGRATIONS = [ + // v1 + function(context) { + context.database.createObjectStore(context.storeName); + }, + // v2 + function(context) { + context.database.createObjectStore(INTERNAL_STORE_NAME); + } + ]; + + /** + * Class that implements a worker process negotiates connections from clients + * in other threads, and operates on an IndexedDB database object store. + * + * @param {string=} _dbName The name of the IndexedDB database to create and + * open. + * @param {string=} _storeName The name of the IndexedDB object store to use + * for storing values. + * + * @constructor + */ + function AppIndexedDBMirrorWorker(_dbName, _storeName) { + _dbName = _dbName || 'app-mirror'; + _storeName = _storeName || 'mirrored_data'; + + this[DB_NAME] = _dbName; + this[STORE_NAME] = _storeName; + // Maybe useful in case we want to notify clients of changes.. + this[CLIENT_PORTS] = new Array; + this[DB_OPENS] = null; + this.supportsIndexedDB = self.indexedDB != null; + if (!self.Promise || !this.supportsIndexedDB) { + console.error('Indexeddb Mirror is not supported'); + } + + this.openDb(); + + self.addEventListener( + 'unhandledrejection', function(error){ console.error(error); }); + self.addEventListener( + 'error', function(error) { console.error(error); }); + console.log('AppIndexedDBMirrorWorker started...'); + }; + + AppIndexedDBMirrorWorker.prototype = { + + openDb: function() { + this.__dbOpens = this.__dbOpens || new Promise(function(resolve, reject) { + console.log('Opening database..'); + + var request = self.indexedDB.open(this[DB_NAME], DB_VERSION); + + request.onupgradeneeded = function(event) { + console.log('Upgrade needed:', event.oldVersion, '=>', event.newVersion); + var context = { + database: request.result, + storeName: this[STORE_NAME], + dbName: this[DB_NAME] + }; + + for (var i = event.oldVersion; i < event.newVersion; ++i) { + MIGRATIONS[i] && MIGRATIONS[i].call(this, context); + } + }.bind(this); + + request.onsuccess = function() { + console.log('Database opened.'); + resolve(request.result); + }; + request.onerror = function() { + reject(request.error); + }; + }.bind(this)); + + return this.__dbOpens; + }, + + closeDb: function() { + if (this.__dbOpens == null) { + return Promise.resolve(); + } + + return this.openDb().then(function(db) { + this.__dbOpens = null; + console.log('Closing database..'); + db.close(); + }.bind(this)); + }, + + /** + * Perform a transaction on an IndexedDB object store. + * + * @param {string} operation The name of the method to call on the object + * store instance. + * @param {string} storeName The name of the object store to operate on. + * @param {string} mode The mode of the transaction that will be performed. + * @param {...*} operationArgs The arguments to call the method named by + * the operation parameter. + * @return {Promise} A promise that resolves when the transaction completes, + * with the result of the transaction, or rejects if the transaction fails + * with the error reported by the transaction. + */ + operateOnStore: function(operation, storeName, mode) { + if (!self.Promise || !this.supportsIndexedDB) { + return; + } + + var operationArgs = Array.from(arguments).slice(3); + + return this.openDb().then(function(db) { + + console.log('Store operation:', operation, storeName, mode, operationArgs); + + return new Promise(function(resolve, reject) { + try { + var transaction = db.transaction(storeName, mode); + var store = transaction.objectStore(storeName); + var request = store[operation].apply(store, operationArgs); + } catch (e) { + return reject(e); + } + + transaction.oncomplete = function() { resolve(request.result); }; + transaction.onabort = function() { reject(transaction.error); }; + }); + }); + }, + + /** + * Perform a "get" operation on an IndexedDB object store. + * + * @param {string} storeName The name of the object store to operate on. + * @param {string} key The key in the object store that corresponds to the + * value that should be got. + * @return {Promise} A promise that resolves with the outcome of the + * operation. + */ + get: function(storeName, key) { + return this.operateOnStore('get', storeName, 'readonly', key); + }, + + /** + * Perform a "put" operation on an IndexedDB object store. + * + * @param {string} storeName The name of the object store to operate on. + * @param {string} key The key in the object store that corresponds to the + * value that should be put. + * @param {*} value The value to be put in the object store at the given key. + * @return {Promise} A promise that resolves with the outcome of the + * operation. + */ + set: function(storeName, key, value) { + return this.operateOnStore('put', storeName, 'readwrite', value, key); + }, + + /** + * Perform a "clear" operation on an IndexedDB object store. + * + * @param {string} storeName The name of the object store to operate on. + * @return {Promise} A promise that resolves with the outcome of the + * operation. + */ + clear: function(storeName) { + return this.operateOnStore('clear', storeName, 'readwrite'); + }, + + /** + * Performs a transaction (in the parlance of the the client). + * + * @param {string} method The method of the transaction. Supported methods + * are `"get"` and `"set"`. + * @param {string} key The key to get or set. + * @param {Object} value The value to set, when the method is `"set"`. + * @return {Promise} A promise that resolves with the outcome of the + * transaction, or rejects if an unsupported method is attempted. + */ + transaction: function(method, key, value) { + value = value || null; + + switch(method) { + case 'get': + return this.get(this[STORE_NAME], key); + case 'set': + return this.set(this[STORE_NAME], key, value); + } + + return Promise.reject(new Error('Method not supported: ' + method)); + }, + + /** + * Compares the currently stored session value to a provided session. If + * the provided session does not match the current session, the database + * is cleared and the provided session becomes the current session. + * + * @param {string} session A session to compare to the current session. + * @return {Promise} A promise that resolves with the validation process + * has completed and the session has been updated (if necessary). + */ + validateSession: function(session) { + return Promise.all([ + this.openDb(), + this.get(INTERNAL_STORE_NAME, 'session') + ]).then(function(results) { + var db = results[0]; + var currentSession = results[1]; + var operations = []; + + if (session !== currentSession) { + if (currentSession != null) { + operations.push(this.clear(this[STORE_NAME])); + } + + operations.push(this.set(INTERNAL_STORE_NAME, 'session', session)); + } + }.bind(this)); + }, + + /** + * Registers a client, represented by a MessagePort. The port is + * presumed to be a direct, unshared channel to the client being registerd. + * + * @param {MessagePort} port The port that represents the client being + * registered. + */ + registerClient: function(port) { + port.addEventListener('message', function(event) { + this.handleClientMessage(event, port) + }.bind(this)); + var isPortInClient = port.toString() in this[CLIENT_PORTS]; + if (!isPortInClient) { + this[CLIENT_PORTS].push(port); + } + + port.start(); + port.postMessage({ + 'type': 'app-mirror-connected', + 'supportsIndexedDB': this.supportsIndexedDB + }); + + console.log('New client connected.'); + }, + + /** + * Triages messages received from a specific client, dispatches their + * data to the appropriate methods and responds to the client if applicable. + * + * @param {MessageEvent} event The event that contains the message sent by + * the client. + * @param {MessagePort} port The port the represents the client the sent the + * message. + */ + handleClientMessage: function(event, port) { + if (!event.data) { + return null; + } + + var id = event.data['id']; + + switch (event.data['type']) { + case 'app-mirror-close-db': + this.closeDb().then(function() { + port.postMessage({'type': 'app-mirror-db-closed', 'id': id}); + }); + case 'app-mirror-validate-session': + this.validateSession(event.data['session']).then(function() { + port.postMessage( + {'type': 'app-mirror-session-validated', 'id': id}); + }); + break; + case 'app-mirror-transaction': + this.transaction( + event.data['method'], event.data['key'], event.data['value']) + .then(function(result) { + port.postMessage({ + 'type': 'app-mirror-transaction-result', + 'id': id, + 'result': result + }); + }); + break; + case 'app-mirror-disconnect': + var index = this[CLIENT_PORTS].indexOf(port); + + if (index !== -1) { + this[CLIENT_PORTS].splice(index, 1); + } + break; + } + } + }; + + self.appIndexedDBMirrorWorker = new AppIndexedDBMirrorWorker(); + + self.addEventListener('connect', function(event) { + self.appIndexedDBMirrorWorker.registerClient(event.ports[0]) + }); +})(); diff --git a/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror.html b/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror.html new file mode 100644 index 00000000..9f871f95 --- /dev/null +++ b/lib/app-storage/app-indexeddb-mirror/app-indexeddb-mirror.html @@ -0,0 +1,266 @@ + + + + + + + + + + + + diff --git a/lib/app-storage/app-indexeddb-mirror/common-worker-scope.js b/lib/app-storage/app-indexeddb-mirror/common-worker-scope.js new file mode 100644 index 00000000..2efa5e08 --- /dev/null +++ b/lib/app-storage/app-indexeddb-mirror/common-worker-scope.js @@ -0,0 +1,54 @@ +/** + * @license + * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ + +(function() { + 'use strict'; + + /** + * This file is a light-weight shim around the current Worker scope. It is + * assumed that this file is only ever loaded in a standard WebWorker scope. + * The location of the current worker is parsed, and the query string value + * is treated as the URL for a secondary script payload to import into the + * current scope. + * + * The shim listens for messages, and if it receives one with data of the form + * `{"type":"common-worker-connect"}`, it dispatches a global "connect" event + * (intended to be semantically similar to the same event in a `SharedWorker` + * scope), echoing the original `MessageEvent`'s ports. + * + * This allows a category of worker scripts that would ordinarilly expect to + * be running in a `SharedWorker` scope to run with similar expectations + * inside of a normal `WebWorker` scope. + */ + var workerScript = self.location.search.slice(1); + + if (!workerScript) { + return; + } + + self.addEventListener('message', function(event) { + var data = event.data; + + if (data && data['type'] === 'common-worker-connect') { + var EventConstructor = + self.CustomEvent || + self.Event || + // NOTE(cdata): Have mercy on my soul.. + event.__proto__.__proto__.constructor; + + var connectEvent = new EventConstructor('connect'); + connectEvent.ports = event.ports; + + self.dispatchEvent(connectEvent); + } + }.bind(this)); + + self.importScripts(workerScript); +})(); diff --git a/lib/app-storage/app-indexeddb-mirror/common-worker.html b/lib/app-storage/app-indexeddb-mirror/common-worker.html new file mode 100644 index 00000000..ff1e756b --- /dev/null +++ b/lib/app-storage/app-indexeddb-mirror/common-worker.html @@ -0,0 +1,124 @@ + + diff --git a/lib/app-storage/app-localstorage/app-localstorage-document.html b/lib/app-storage/app-localstorage/app-localstorage-document.html new file mode 100644 index 00000000..623b5d56 --- /dev/null +++ b/lib/app-storage/app-localstorage/app-localstorage-document.html @@ -0,0 +1,217 @@ + + + + + + diff --git a/lib/app-storage/app-network-status-behavior.html b/lib/app-storage/app-network-status-behavior.html new file mode 100644 index 00000000..1cbfb4f4 --- /dev/null +++ b/lib/app-storage/app-network-status-behavior.html @@ -0,0 +1,72 @@ + + + diff --git a/lib/app-storage/app-storage-behavior.html b/lib/app-storage/app-storage-behavior.html new file mode 100644 index 00000000..d2a1a46b --- /dev/null +++ b/lib/app-storage/app-storage-behavior.html @@ -0,0 +1,480 @@ + + + diff --git a/lib/app-storage/bower.json b/lib/app-storage/bower.json new file mode 100644 index 00000000..8b2a5869 --- /dev/null +++ b/lib/app-storage/bower.json @@ -0,0 +1,62 @@ +{ + "name": "app-storage", + "authors": [ + "The Polymer Authors" + ], + "version": "2.0.2", + "description": "Web Components for managing user data in web apps", + "main": [ + "app-storage-behavior.html", + "app-network-status-behavior.html", + "app-localstorage/app-localstorage-document.html", + "app-indexeddb-mirror/app-indexeddb-mirror.html" + ], + "moduleType": [], + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#1.9 - 2" + }, + "devDependencies": { + "font-roboto": "polymerelements/font-roboto#^1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#1 - 2", + "iron-icon": "polymerelements/iron-icon#1 - 2", + "iron-icons": "polymerelements/iron-icons#1 - 2", + "moment": "^2.12.0", + "paper-button": "polymerelements/paper-button#1 - 2", + "paper-fab": "polymerelements/paper-fab#1 - 2", + "paper-input": "polymerelements/paper-input#1 - 2", + "paper-styles": "polymerelements/paper-styles#1 - 2", + "promise-polyfill": "polymerlabs/promise-polyfill#1 - 2", + "web-component-tester": "^6.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" + }, + "variants": { + "1.x": { + "dependencies": { + "polymer": "Polymer/polymer#^1.9" + }, + "devDependencies": { + "font-roboto": "polymerelements/font-roboto#^1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "moment": "^2.12.0", + "paper-button": "polymerelements/paper-button#^1.0.0", + "paper-fab": "polymerelements/paper-fab#^1.0.0", + "paper-input": "polymerelements/paper-input#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0", + "web-component-tester": "Polymer/web-component-tester#^4.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.24" + }, + "resolutions": { + "webcomponentsjs": "^0.7" + } + } + }, + "resolutions": { + "webcomponentsjs": "^1.0.0" + } +} diff --git a/lib/app-storage/index.html b/lib/app-storage/index.html new file mode 100644 index 00000000..bf7fb0ba --- /dev/null +++ b/lib/app-storage/index.html @@ -0,0 +1,27 @@ + + + + + + app-storage + + + + + + + + + + + + + diff --git a/lib/app-storage/test/app-indexeddb-mirror/app-indexeddb-mirror.html b/lib/app-storage/test/app-indexeddb-mirror/app-indexeddb-mirror.html new file mode 100644 index 00000000..658ce490 --- /dev/null +++ b/lib/app-storage/test/app-indexeddb-mirror/app-indexeddb-mirror.html @@ -0,0 +1,223 @@ + + + + + + app-indexeddb-mirror tests + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-storage/test/app-indexeddb-mirror/helpers.js b/lib/app-storage/test/app-indexeddb-mirror/helpers.js new file mode 100644 index 00000000..01e5ae55 --- /dev/null +++ b/lib/app-storage/test/app-indexeddb-mirror/helpers.js @@ -0,0 +1,100 @@ +/** +@license +Copyright (c) 2016 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +(function() { + + var navigatorOnLineDescriptor = + Object.getOwnPropertyDescriptor(Navigator.prototype, 'onLine'); + var hasNativePrototype = navigatorOnLineDescriptor != null; + + if (!hasNativePrototype) { + navigatorOnLineDescriptor = Object.getOwnPropertyDescriptor(navigator, 'onLine'); + } + + function restoreNavigatorOnLine() { + var target = hasNativePrototype ? Navigator.prototype : navigator; + Object.defineProperty(target, 'onLine', navigatorOnLineDescriptor); + if (window.navigator.onLine) { + window.dispatchEvent(new CustomEvent('online')); + } + } + + function goOffline() { + var target = hasNativePrototype ? Navigator.prototype : navigator; + Object.defineProperty( + target, 'onLine', { value: false }); + window.dispatchEvent(new CustomEvent('offline')); + } + + function getIdbObjectStoreValue(dbName, dbVersion, storeName, key) { + return new Promise(function(resolve, reject) { + var request = window.indexedDB.open(dbName, dbVersion); + request.onerror = reject; + request.onsuccess = function() { + var db = request.result; + var transaction = db.transaction(storeName, 'readonly'); + var store = transaction.objectStore(storeName); + + request = store.get(key); + + transaction.oncomplete = function() { + resolve(request.result); + db.close(); + }; + transaction.onabort = transaction.onerror = function(e) { + reject(e); + db.close(); + }; + }; + }); + } + + function setIdbObjectStoreValue(dbName, dbVersion, storeName, key, value) { + return new Promise(function(resolve, reject) { + var request = window.indexedDB.open(dbName, dbVersion); + request.onerror = reject; + request.onsuccess = function() { + var db = request.result; + var transaction = db.transaction(storeName, 'readwrite'); + var store = transaction.objectStore(storeName); + + request = store.put(value, key); + + transaction.oncomplete = function() { + resolve(request.result); + db.close(); + }; + transaction.onabort = transaction.onerror = function(e) { + reject(e); + db.close(); + }; + }; + }); + } + + function deleteIdbDatabase(dbName) { + return new Promise(function(resolve, reject) { + var request = window.indexedDB.deleteDatabase(dbName); + request.onsuccess = resolve; + request.onerror = reject; + request.onblocked = function() { + console.warn('Deleting database blocked. Is there a connection leak?'); + resolve(); + }; + }); + } + + window.appStorageTestHelpers = { + restoreNavigatorOnLine: restoreNavigatorOnLine, + goOffline: goOffline, + getIdbObjectStoreValue: getIdbObjectStoreValue, + setIdbObjectStoreValue: setIdbObjectStoreValue, + deleteIdbDatabase: deleteIdbDatabase + }; +})(); diff --git a/lib/app-storage/test/app-localstorage/app-localstorage-document.html b/lib/app-storage/test/app-localstorage/app-localstorage-document.html new file mode 100644 index 00000000..377cdbd7 --- /dev/null +++ b/lib/app-storage/test/app-localstorage/app-localstorage-document.html @@ -0,0 +1,59 @@ + + + + + + app-localstorage tests + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/app-storage/test/app-storage-compatibility-suite.html b/lib/app-storage/test/app-storage-compatibility-suite.html new file mode 100644 index 00000000..dcd21ab9 --- /dev/null +++ b/lib/app-storage/test/app-storage-compatibility-suite.html @@ -0,0 +1,299 @@ + + + diff --git a/lib/app-storage/test/feature-detect.js b/lib/app-storage/test/feature-detect.js new file mode 100644 index 00000000..511bd3b7 --- /dev/null +++ b/lib/app-storage/test/feature-detect.js @@ -0,0 +1,37 @@ +(function(){ + + onmessage = function(e) { + if (e.data != 'featureDetect') { + return; + } + + if (self.indexedDB == null || self.indexedDB === undefined || + self.Promise === undefined) { + self.postMessage('fail'); + return; + } + + var timeout = self.setTimeout(function() { self.postMessage('fail'); }, + 1000); + + self.addEventListener('testWorkerEvents', function() { + self.postMessage('pass'); + self.clearTimeout(timeout); + }); + + try { + var EventConstructor = + self.CustomEvent || + self.Event || + // NOTE(cdata): Have mercy on my soul.. + event.__proto__.__proto__.constructor; + + var testWorkerEvents = new EventConstructor('testWorkerEvents'); + self.dispatchEvent(testWorkerEvents); + return; + + } catch(e) { + self.postMessage('fail'); + } + } +}()) \ No newline at end of file diff --git a/lib/app-storage/test/index.html b/lib/app-storage/test/index.html new file mode 100644 index 00000000..11cddf13 --- /dev/null +++ b/lib/app-storage/test/index.html @@ -0,0 +1,28 @@ + + + + + + + app-storage tests + + + + + + diff --git a/lib/firebase/.bower.json b/lib/firebase/.bower.json index 822c2283..61b54d55 100644 --- a/lib/firebase/.bower.json +++ b/lib/firebase/.bower.json @@ -1,6 +1,6 @@ { "name": "firebase", - "version": "4.2.0", + "version": "4.6.1", "homepage": "https://firebase.google.com", "authors": [ "Firebase " @@ -23,11 +23,11 @@ "test", "tests" ], - "_release": "4.2.0", + "_release": "4.6.1", "_resolution": { "type": "version", - "tag": "v4.2.0", - "commit": "d371e711900c37803ac791e773bc06deca276df0" + "tag": "v4.6.1", + "commit": "5c931ec738fb8d2ace0a092b2d7f388e8981b7d6" }, "_source": "https://github.com/firebase/firebase-bower.git", "_target": "^4.1.1", diff --git a/lib/firebase/README.md b/lib/firebase/README.md new file mode 100644 index 00000000..133f1ec6 --- /dev/null +++ b/lib/firebase/README.md @@ -0,0 +1,13 @@ +# firebase-bower + +To use Firebase via Bower, do: + +```bash +$ bower install firebase --save +``` + +NOTE: This repo is automatically generated and is not monitored for issues / +pull requests. Please contact [Firebase support](https://firebase.google.com/support/) +for any bugs / feature suggestions on Firebase or the Bower module. + +LICENSE - Refer to: https://developers.google.com/terms diff --git a/lib/firebase/bower.json b/lib/firebase/bower.json index 767c7a14..0712cd1f 100644 --- a/lib/firebase/bower.json +++ b/lib/firebase/bower.json @@ -1,6 +1,6 @@ { "name": "firebase", - "version": "4.2.0", + "version": "4.6.1", "homepage": "https://firebase.google.com", "authors": [ "Firebase " diff --git a/lib/firebase/firebase-app-externs.js b/lib/firebase/firebase-app-externs.js index 96a6e921..8453cb46 100644 --- a/lib/firebase/firebase-app-externs.js +++ b/lib/firebase/firebase-app-externs.js @@ -1,25 +1,21 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ */ - /** -* Copyright 2017 Google Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * @fileoverview Firebase namespace and Firebase App API. - * Version: 4.2.0 + * Version: ${JSCORE_VERSION} * * Copyright 2017 Google Inc. All Rights Reserved. * diff --git a/lib/firebase/firebase-app.js b/lib/firebase/firebase-app.js index f0e3fd90..ed3f1230 100644 --- a/lib/firebase/firebase-app.js +++ b/lib/firebase/firebase-app.js @@ -1,6 +1,7 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ */ - -var firebase=function(){var e=void 0===e?self:e;return function(t){function n(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var r=e.webpackJsonpFirebase;e.webpackJsonpFirebase=function(e,o,c){for(var s,a,u,f=0,l=[];f"}),n=this.serviceName+": "+n+" ("+o+").";var c=new i(o,n);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(c[s]=t[s]);return c},e}()},,,function(e,t,n){"use strict";function r(e,t){var n=new a(e,t);return n.subscribe.bind(n)}function o(e,t){if("object"!==(void 0===e?"undefined":s(e))||null===e)return!1;for(var n=0,r=t;n1)for(var n=1;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o=0&&(e.x=setTimeout(function(){e.S&&e.S()},t))},r(22),n.setImmediate=setImmediate,n.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=Function(""+e));for(var t=Array(arguments.length-1),n=0;n1)for(var r=1;r255;)t[r++]=255&o,o>>=8;t[r++]=o}return t},o=function(e){if(e.length<8192)return String.fromCharCode.apply(null,e);for(var t="",r=0;r>2,l=(3&i)<<4|c>>4,h=(15&c)<<2|u>>6,p=63&u;s||(p=64,a||(h=64)),n.push(r[f],r[l],r[h],r[p])}return n.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(n(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):o(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.O();for(var r=t?this.g:this.b,n=[],o=0;o>4;if(n.push(h),64!=u){var p=c<<4&240|u>>2;if(n.push(p),64!=l){var d=u<<6&192|l;n.push(d)}}}return n},O:function(){if(!this.y){this.y={},this.b={},this._={},this.g={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.b[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.g[this.ENCODED_VALS.charAt(e)]=e)}}},t.base64Encode=function(e){var r=n(e);return t.base64.encodeByteArray(r,!0)},t.base64Decode=function(e){try{return t.base64.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}},function(e,t,r){"use strict";function n(e){return JSON.parse(e)}function o(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonEval=n,t.stringify=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.forEach=function(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(r,e[r])},t.extend=function(e,r){return t.forEach(r,function(t,r){e[t]=r}),e},t.clone=function(e){return t.extend({},e)},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.getCount=function(e){var t=0;for(var r in e)t++;return t},t.map=function(e,t,r){var n={};for(var o in e)n[o]=t.call(r,e[o],o,e);return n},t.findKey=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return n},t.findValue=function(e,r,n){var o=t.findKey(e,r,n);return o&&e[o]},t.getAnyKey=function(e){for(var t in e)return t},t.getValues=function(e){var t=[],r=0;for(var n in e)t[r++]=e[n];return t},t.every=function(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&!t(r,e[r]))return!1;return!0}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){r(58),e.exports=r(6).default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(59),o=(r.n(n),r(63)),i=(r.n(o),r(64));r.n(i)},function(t,r,n){(function(t){var r=function(){if(void 0!==t)return t;if(void 0!==e)return e;if("undefined"!=typeof self)return self;throw Error("unable to locate global object")}();"undefined"==typeof Promise&&(r.Promise=Promise=n(60))}).call(r,n(19))},function(e,t,r){(function(t){!function(r){function n(){}function o(e,t){return function(){e.apply(t,arguments)}}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this.T=[],l(e,this)}function a(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e.T.push(t);e._handled=!0,i.A(function(){var r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)return void(1===e._state?c:s)(t.promise,e._value);var n;try{n=r(e._value)}catch(e){return void s(t.promise,e)}c(t.promise,n)})}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof i)return e._state=3,e._value=t,void u(e);if("function"==typeof r)return void l(o(r,t),e)}e._state=1,e._value=t,u(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e.T.length&&i.A(function(){e._handled||i.j(e._value)});for(var t=0,r=e.T.length;t=0&&(e.N=setTimeout(function(){e.M&&e.M()},t))},n(62),r.setImmediate=setImmediate,r.clearImmediate=clearImmediate},function(e,t,r){(function(e,t){!function(e,r){"use strict";function n(e){"function"!=typeof e&&(e=Function(""+e));for(var t=Array(arguments.length-1),r=0;r>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o"}),r=this.serviceName+": "+r+" ("+o+").";var i=new a(o,r);for(var c in t)t.hasOwnProperty(c)&&"_"!==c.slice(-1)&&(i[c]=t[c]);return i},e}();t.ErrorFactory=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(29),o=r(30);t.decode=function(e){var t={},r={},i={},a="";try{var c=e.split(".");t=o.jsonEval(n.base64Decode(c[0])||""),r=o.jsonEval(n.base64Decode(c[1])||""),a=c[2],i=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:i,signature:a}},t.isValidTimestamp=function(e){var r,n,o=t.decode(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof o&&(o.hasOwnProperty("nbf")?r=o.nbf:o.hasOwnProperty("iat")&&(r=o.iat),n=o.hasOwnProperty("exp")?o.exp:r+86400),i&&r&&n&&i>=r&&i<=n},t.issuedAtTime=function(e){var r=t.decode(e).claims;return"object"==typeof r&&r.hasOwnProperty("iat")?r.iat:null},t.isValidFormat=function(e){var r=t.decode(e),n=r.claims;return!!r.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},t.isAdmin=function(e){var r=t.decode(e).claims;return"object"==typeof r&&!0===r.admin}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(31);t.querystring=function(e){var t=[];return n.forEach(e,function(e,r){Array.isArray(r)?r.forEach(function(r){t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var r=e.split("=");t[r[0]]=r[1]}}),t}},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(72),i=function(e){function t(){var t=e.call(this)||this;t.D=[],t.I=[],t.x=[],t.F=[],t.L=0,t.R=0,t.blockSize=64,t.F[0]=128;for(var r=1;r>>31)}for(var i,a,c=this.D[0],s=this.D[1],u=this.D[2],f=this.D[3],l=this.D[4],n=0;n<80;n++){n<40?n<20?(i=f^s&(u^f),a=1518500249):(i=s^u^f,a=1859775393):n<60?(i=s&u|f&(s|u),a=2400959708):(i=s^u^f,a=3395469782);var o=(c<<5|c>>>27)+i+l+a+r[n]&4294967295;l=f,f=u,u=4294967295&(s<<30|s>>>2),s=c,c=o}this.D[0]=this.D[0]+c&4294967295,this.D[1]=this.D[1]+s&4294967295,this.D[2]=this.D[2]+u&4294967295,this.D[3]=this.D[3]+f&4294967295,this.D[4]=this.D[4]+l&4294967295},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,n=0,o=this.I,i=this.L;n=56;r--)this.I[r]=255&t,t/=256;this.B(this.I);for(var n=0,r=0;r<5;r++)for(var o=24;o>=0;o-=8)e[n]=this.D[r]>>o&255,++n;return e},t}(o.Hash);t.Sha1=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.blockSize=-1}return e}();t.Hash=n},function(e,t,r){"use strict";function n(e,t){var r=new c(e,t);return r.subscribe.bind(r)}function o(e,t){return function(){for(var r=[],n=0;n 4. Need to update it?")}var o=e+" failed: ";return o+=n+" argument "}function o(e,t,r,o){if((!o||r)&&"string"!=typeof r)throw Error(n(e,t,o)+"must be a valid firebase namespace.")}function i(e,t,r,o){if((!o||r)&&"function"!=typeof r)throw Error(n(e,t,o)+"must be a valid function.")}function a(e,t,r,o){if((!o||r)&&("object"!=typeof r||null===r))throw Error(n(e,t,o)+"must be a valid context object.")}Object.defineProperty(t,"__esModule",{value:!0}),t.validateArgCount=function(e,t,r,n){var o;if(nr&&(o=0===r?"none":"no more than "+r),o){var i=e+" failed: Was called with "+n+(1===n?" argument.":" arguments.")+" Expects "+o+".";throw Error(i)}},t.errorPrefix=n,t.validateNamespace=o,t.validateCallback=i,t.validateContextObject=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(28);t.stringToByteArray=function(e){for(var t=[],r=0,o=0;o=55296&&i<=56319){var a=i-55296;o++,n.assert(o>6|192,t[r++]=63&i|128):i<65536?(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},t.stringLength=function(e){for(var t=0,r=0;r=55296&&n<=56319?(t+=4,r++):t+=3}return t}}])}().default; //# sourceMappingURL=firebase-app.js.map \ No newline at end of file diff --git a/lib/firebase/firebase-app.js.map b/lib/firebase/firebase-app.js.map index ce0e5d5e..90a9db41 100644 --- a/lib/firebase/firebase-app.js.map +++ b/lib/firebase/firebase-app.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///firebase-app.js","webpack:///webpack/bootstrap fef9b2274b3ac5efdbf8","webpack:///./src/utils/promise.ts","webpack:///./src/app/firebase_app.ts","webpack:///./src/app.ts","webpack:///./src/app/errors.ts","webpack:///./src/app/subscribe.ts","webpack:///./src/utils/globalScope.ts","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/process/browser.js","webpack:///./src/utils/deep_copy.ts","webpack:///./src/utils/shims.ts","webpack:///./node_modules/promise-polyfill/promise.js","webpack:///./node_modules/timers-browserify/main.js","webpack:///./node_modules/setimmediate/setImmediate.js"],"names":["firebase","window","self","modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","parentJsonpFunction","chunkIds","moreModules","executeModules","chunkId","result","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","shift","s","3","e","onScriptComplete","script","onerror","onload","clearTimeout","timeout","chunk","Error","undefined","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","createElement","type","charset","async","nc","setAttribute","src","p","setTimeout","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error","__webpack_exports__","PromiseImpl","Deferred","attachDummyErrorHandler","__WEBPACK_IMPORTED_MODULE_0__utils_globalScope__","this","wrapCallback","opt_nodeCallback","meta","opt_value","catch","createFirebaseNamespace","removeApp","callAppHooks","apps_","app","DEFAULT_ENTRY_NAME","contains","initializeApp","options","FirebaseAppImpl","namespace","getApps","keys","map","registerService","createService","serviceProperties","appHook","allowMultipleInstances","factories","appHooks","forEach","serviceNamespace","appArg","__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__","args","_i","arguments","_getService","bind","apply","extendNamespace","props","eventName","serviceName","factoryName","useAsService","useService","t","apps","__WEBPACK_IMPORTED_MODULE_2__utils_promise__","SDK_VERSION","INTERNAL","createSubscribe","__WEBPACK_IMPORTED_MODULE_0__subscribe__","ErrorFactory","__WEBPACK_IMPORTED_MODULE_1__errors__","deepExtend","code","appErrors","create","value","obj","key","tokenListeners","firebase_","isDeleted_","services_","name_","options_","getUid","getToken","addAuthTokenListener","callback","removeAuthTokenListener","filter","listener","checkDestroyed_","delete","_this","then","services","serviceKey","instanceKey","all","service","instanceIdentifier","instanceSpecifier","extendApp","log","errors","no-app","bad-app-name","duplicate-app","app-deleted","duplicate-service","sa-not-supported","invalid-app-argument","__WEBPACK_IMPORTED_MODULE_0__utils_shims__","ERROR_NAME","captureStackTrace","FirebaseError","message","err_1","stack","constructor","pattern","data","template","fullCode","replace","match","prop","slice","executor","onNoObservers","proxy","ObserverProxy","subscribe","implementsAnyMethods","methods","_typeof","methods_1","method","noop","__WEBPACK_IMPORTED_MODULE_0__utils_promise__","Symbol","iterator","observers","unsubscribes","observerCount","task","finalized","next","forEachObserver","observer","close","complete","nextOrObserver","unsub","unsubscribeOne","finalError","fn","sendOne","global","globalScope","scope","Function","g","eval","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","len","run","Item","array","process","nextTick","Array","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","deepCopy","target","source","Date","dateValue","getTime","patchProperty","findIndex","predicate","TypeError","thisArg","k","kValue","find","setImmediate","root","_state","_handled","_value","_deferreds","doResolve","handle","deferred","_immediateFn","cb","onFulfilled","onRejected","ret","newValue","finale","_unhandledRejectionFn","Handler","done","reason","ex","setTimeoutFunc","prom","arr","res","val","remaining","race","values","warn","_setImmediateFn","_setUnhandledRejectionFn","Timeout","id","clearFn","_id","_clearFn","setInterval","clearInterval","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","tasksByHandle","nextHandle","registerImmediate","runIfPresent","currentlyRunningATask","doc","attachTo","getPrototypeOf","toString","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","messagePrefix","Math","random","onGlobalMessage","event","indexOf","addEventListener","attachEvent","MessageChannel","channel","port1","port2","html","documentElement","onreadystatechange","removeChild","default"],"mappings":"AAAA,GAAIA,UAAW,WACH,GAAIC,OAA2B,KAAXA,EAAyBC,KAAOD,CACtD,OAAgB,UAAUE,GCqCpC,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QA1DA,GAAAK,GAAAX,EAAA,oBACAA,GAAA,8BAAAY,EAAAC,EAAAC,GAIA,IADA,GAAAV,GAAAW,EAAAC,EAAAR,EAAA,EAAAS,KACQT,EAAAI,EAAAM,OAAoBV,IAC5BO,EAAAH,EAAAJ,GACAW,EAAAJ,IACAE,EAAAG,KAAAD,EAAAJ,GAAA,IAEAI,EAAAJ,GAAA,CAEA,KAAAX,IAAAS,GACAQ,OAAAC,UAAAC,eAAAb,KAAAG,EAAAT,KACAF,EAAAE,GAAAS,EAAAT,GAIA,KADAO,KAAAC,EAAAC,EAAAC,GACAG,EAAAC,QACAD,EAAAO,SAEA,IAAAV,EACA,IAAAN,EAAA,EAAYA,EAAAM,EAAAI,OAA2BV,IACvCQ,EAAAb,IAAAsB,EAAAX,EAAAN,GAGA,OAAAQ,GAIA,IAAAX,MAGAc,GACAO,EAAA,EAiHA,OApFAvB,GAAAwB,EAAA,SAAAZ,GA+BA,QAAAa,KAEAC,EAAAC,QAAAD,EAAAE,OAAA,KACAC,aAAAC,EACA,I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AAA,WACAF,GAAA,GAEA7H,EAAA2H,YAAA,QACA3H,EAAA+H,UAAAD,EACAD,MAIA,WAKA,GAAAG,GAAA,gBAAAC,KAAAC,SAAA,IACAC,EAAA,SAAAC,GACAA,EAAAjF,SAAAnD,GACA,gBAAAoI,GAAAzK,MACA,IAAAyK,EAAAzK,KAAA0K,QAAAL,IACAX,GAAAe,EAAAzK,KAAAM,MAAA+J,EAAAxU,SAIAwM,GAAAsI,iBACAtI,EAAAsI,iBAAA,UAAAH,GAAA,GAEAnI,EAAAuI,YAAA,YAAAJ,GAGAf,EAAA,SAAA9C,GACAtE,EAAA2H,YAAAK,EAAA1D,EAAA,SAmDKtE,EAAAwI,eA/CL,WACA,GAAAC,GAAA,GAAAD,eACAC,GAAAC,MAAAX,UAAA,SAAAK,GAEAf,EADAe,EAAAzK,OAIAyJ,EAAA,SAAA9C,GACAmE,EAAAE,MAAAhB,YAAArD,OA2CKiD,GAAA,sBAAAA,GAAApS,cAAA,UAvCL,WACA,GAAAyT,GAAArB,EAAAsB,eACAzB,GAAA,SAAA9C,GAGA,GAAAnQ,GAAAoT,EAAApS,cAAA,SACAhB,GAAA2U,mBAAA,WACAzB,EAAA/C,GACAnQ,EAAA2U,mBAAA,KACAF,EAAAG,YAAA5U,GACAA,EAAA,MAEAyU,EAAAhT,YAAAzB,OAIA,WACAiT,EAAA,SAAA9C,GACA3O,WAAA0R,EAAA,EAAA/C,OA8BAkD,EAAAzD,eACAyD,EAAAP,mBACC,mBAAA1U,UAAA,KAAAyN,EAAA5I,KAAA4I,EAAAzN,Qd6oD4BS,KAAKJ,EAASH,EAAoB,IAAKA,EAAoB,WAIzEuW","file":"firebase-app.js","sourcesContent":["var firebase = (function() {\n var window = typeof window === 'undefined' ? self : window;\n return /******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonpFirebase\"];\n/******/ \twindow[\"webpackJsonpFirebase\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId]) {\n/******/ \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n/******/ \t\t\t}\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n/******/ \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n/******/ \t\twhile(resolves.length) {\n/******/ \t\t\tresolves.shift()();\n/******/ \t\t}\n/******/ \t\tif(executeModules) {\n/******/ \t\t\tfor(i=0; i < executeModules.length; i++) {\n/******/ \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\treturn result;\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// objects to store loaded and loading chunks\n/******/ \tvar installedChunks = {\n/******/ \t\t3: 0\n/******/ \t};\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/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\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.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId) {\n/******/ \t\tvar installedChunkData = installedChunks[chunkId];\n/******/ \t\tif(installedChunkData === 0) {\n/******/ \t\t\treturn new Promise(function(resolve) { resolve(); });\n/******/ \t\t}\n/******/\n/******/ \t\t// a Promise means \"currently loading\".\n/******/ \t\tif(installedChunkData) {\n/******/ \t\t\treturn installedChunkData[2];\n/******/ \t\t}\n/******/\n/******/ \t\t// setup Promise in chunk cache\n/******/ \t\tvar promise = new Promise(function(resolve, reject) {\n/******/ \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n/******/ \t\t});\n/******/ \t\tinstalledChunkData[2] = promise;\n/******/\n/******/ \t\t// start chunk loading\n/******/ \t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\tvar script = document.createElement('script');\n/******/ \t\tscript.type = 'text/javascript';\n/******/ \t\tscript.charset = 'utf-8';\n/******/ \t\tscript.async = true;\n/******/ \t\tscript.timeout = 120000;\n/******/\n/******/ \t\tif (__webpack_require__.nc) {\n/******/ \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n/******/ \t\t}\n/******/ \t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".js\";\n/******/ \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n/******/ \t\tscript.onerror = script.onload = onScriptComplete;\n/******/ \t\tfunction onScriptComplete() {\n/******/ \t\t\t// avoid mem leaks in IE.\n/******/ \t\t\tscript.onerror = script.onload = null;\n/******/ \t\t\tclearTimeout(timeout);\n/******/ \t\t\tvar chunk = installedChunks[chunkId];\n/******/ \t\t\tif(chunk !== 0) {\n/******/ \t\t\t\tif(chunk) {\n/******/ \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n/******/ \t\t\t\t}\n/******/ \t\t\t\tinstalledChunks[chunkId] = undefined;\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\thead.appendChild(script);\n/******/\n/******/ \t\treturn promise;\n/******/ \t};\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// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// on error function for async loading\n/******/ \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return PromiseImpl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Deferred; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return attachDummyErrorHandler; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_globalScope__ = __webpack_require__(14);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\nvar PromiseImpl = __WEBPACK_IMPORTED_MODULE_0__utils_globalScope__[\"a\" /* globalScope */].Promise || __webpack_require__(20);\n/**\r\n * A deferred promise implementation.\r\n */\nvar Deferred = function () {\n /** @constructor */\n function Deferred() {\n var self = this;\n this.resolve = null;\n this.reject = null;\n this.promise = new PromiseImpl(function (resolve, reject) {\n self.resolve = resolve;\n self.reject = reject;\n });\n }\n /**\r\n * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around\r\n * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n * @param {((?function(?(Error)): (?|undefined))| (?function(?(Error),?=): (?|undefined)))=} opt_nodeCallback\r\n * @return {!function(?(Error), ?=)}\r\n */\n Deferred.prototype.wrapCallback = function (opt_nodeCallback) {\n var self = this;\n /**\r\n * @param {?Error} error\r\n * @param {?=} opt_value\r\n */\n function meta(error, opt_value) {\n if (error) {\n self.reject(error);\n } else {\n self.resolve(opt_value);\n }\n if (typeof opt_nodeCallback === 'function') {\n attachDummyErrorHandler(self.promise);\n // Some of our callbacks don't expect a value and our own tests\n // assert that the parameter length is 1\n if (opt_nodeCallback.length === 1) {\n opt_nodeCallback(error);\n } else {\n opt_nodeCallback(error, opt_value);\n }\n }\n }\n return meta;\n };\n return Deferred;\n}();\n\n/**\r\n * Chrome (and maybe other browsers) report an Error in the console if you reject a promise\r\n * and nobody handles the error. This is normally a good thing, but this will confuse devs who\r\n * never intended to use promises in the first place. So in some cases (in particular, if the\r\n * developer attached a callback), we should attach a dummy resolver to the promise to suppress\r\n * this error.\r\n *\r\n * Note: We can't do this all the time, since it breaks the Promise spec (though in the obscure\r\n * 3.3.3 section related to upgrading non-compliant promises).\r\n * @param {!firebase.Promise} promise\r\n */\nvar attachDummyErrorHandler = function attachDummyErrorHandler(promise) {\n promise.catch(function () {});\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// CONCATENATED MODULE: ./src/app/firebase_app.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__subscribe__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__errors__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_promise__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__ = __webpack_require__(17);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\nvar contains = function contains(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\n// An array to capture listeners before the true auth functions\n// exist\nvar tokenListeners = [];\n/**\r\n * Global context object for a collection of services using\r\n * a shared authentication state.\r\n */\nvar FirebaseAppImpl = function () {\n function FirebaseAppImpl(options, name, firebase_) {\n this.firebase_ = firebase_;\n this.isDeleted_ = false;\n this.services_ = {};\n this.name_ = name;\n this.options_ = Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"a\" /* deepCopy */])(options);\n this.INTERNAL = {\n getUid: function getUid() {\n return null;\n },\n getToken: function getToken() {\n return __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */].resolve(null);\n },\n addAuthTokenListener: function addAuthTokenListener(callback) {\n tokenListeners.push(callback);\n // Make sure callback is called, asynchronously, in the absence of the auth module\n setTimeout(function () {\n return callback(null);\n }, 0);\n },\n removeAuthTokenListener: function removeAuthTokenListener(callback) {\n tokenListeners = tokenListeners.filter(function (listener) {\n return listener !== callback;\n });\n }\n };\n }\n Object.defineProperty(FirebaseAppImpl.prototype, \"name\", {\n get: function get() {\n this.checkDestroyed_();\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"options\", {\n get: function get() {\n this.checkDestroyed_();\n return this.options_;\n },\n enumerable: true,\n configurable: true\n });\n FirebaseAppImpl.prototype.delete = function () {\n var _this = this;\n return new __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */](function (resolve) {\n _this.checkDestroyed_();\n resolve();\n }).then(function () {\n _this.firebase_.INTERNAL.removeApp(_this.name_);\n var services = [];\n Object.keys(_this.services_).forEach(function (serviceKey) {\n Object.keys(_this.services_[serviceKey]).forEach(function (instanceKey) {\n services.push(_this.services_[serviceKey][instanceKey]);\n });\n });\n return __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */].all(services.map(function (service) {\n return service.INTERNAL.delete();\n }));\n }).then(function () {\n _this.isDeleted_ = true;\n _this.services_ = {};\n });\n };\n /**\r\n * Return a service instance associated with this app (creating it\r\n * on demand), identified by the passed instanceIdentifier.\r\n *\r\n * NOTE: Currently storage is the only one that is leveraging this\r\n * functionality. They invoke it by calling:\r\n *\r\n * ```javascript\r\n * firebase.app().storage('STORAGE BUCKET ID')\r\n * ```\r\n *\r\n * The service name is passed to this already\r\n * @internal\r\n */\n FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) {\n if (instanceIdentifier === void 0) {\n instanceIdentifier = DEFAULT_ENTRY_NAME;\n }\n this.checkDestroyed_();\n if (!this.services_[name]) {\n this.services_[name] = {};\n }\n if (!this.services_[name][instanceIdentifier]) {\n /**\r\n * If a custom instance has been defined (i.e. not '[DEFAULT]')\r\n * then we will pass that instance on, otherwise we pass `null`\r\n */\n var instanceSpecifier = instanceIdentifier !== DEFAULT_ENTRY_NAME ? instanceIdentifier : undefined;\n var service = this.firebase_.INTERNAL.factories[name](this, this.extendApp.bind(this), instanceSpecifier);\n this.services_[name][instanceIdentifier] = service;\n }\n return this.services_[name][instanceIdentifier];\n };\n /**\r\n * Callback function used to extend an App instance at the time\r\n * of service instance creation.\r\n */\n FirebaseAppImpl.prototype.extendApp = function (props) {\n var _this = this;\n // Copy the object onto the FirebaseAppImpl prototype\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */])(this, props);\n /**\r\n * If the app has overwritten the addAuthTokenListener stub, forward\r\n * the active token listeners on to the true fxn.\r\n *\r\n * TODO: This function is required due to our current module\r\n * structure. Once we are able to rely strictly upon a single module\r\n * implementation, this code should be refactored and Auth should\r\n * provide these stubs and the upgrade logic\r\n */\n if (props.INTERNAL && props.INTERNAL.addAuthTokenListener) {\n tokenListeners.forEach(function (listener) {\n _this.INTERNAL.addAuthTokenListener(listener);\n });\n tokenListeners = [];\n }\n };\n /**\r\n * This function will throw an Error if the App has already been deleted -\r\n * use before performing API actions on the App.\r\n */\n FirebaseAppImpl.prototype.checkDestroyed_ = function () {\n if (this.isDeleted_) {\n error('app-deleted', { name: this.name_ });\n }\n };\n return FirebaseAppImpl;\n}();\n// Prevent dead-code elimination of these methods w/o invalid property\n// copying.\nFirebaseAppImpl.prototype.name && FirebaseAppImpl.prototype.options || FirebaseAppImpl.prototype.delete || console.log('dc');\n/**\r\n * Return a firebase namespace object.\r\n *\r\n * In production, this will be called exactly once and the result\r\n * assigned to the 'firebase' global. It may be called multiple times\r\n * in unit tests.\r\n */\nfunction createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */],\n SDK_VERSION: '4.2.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__subscribe__[\"a\" /* createSubscribe */],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_1__errors__[\"a\" /* ErrorFactory */],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */],\n deepExtend: __WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"c\" /* patchProperty */])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"c\" /* patchProperty */])(app, 'App', FirebaseAppImpl);\n /**\r\n * Create a new App instance (name must be unique).\r\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}\nfunction error(code, args) {\n throw appErrors.create(code, args);\n}\n// TypeScript does not support non-string indexes!\n// let errors: {[code: AppError: string} = {\nvar errors = {\n 'no-app': \"No Firebase App '{$name}' has been created - \" + 'call Firebase App.initializeApp()',\n 'bad-app-name': \"Illegal App name: '{$name}\",\n 'duplicate-app': \"Firebase App named '{$name}' already exists\",\n 'app-deleted': \"Firebase App named '{$name}' already deleted\",\n 'duplicate-service': \"Firebase service named '{$name}' already registered\",\n 'sa-not-supported': 'Initializing the Firebase SDK with a service ' + 'account is only allowed in a Node.js environment. On client ' + 'devices, you should instead initialize the SDK with an api key and ' + 'auth domain',\n 'invalid-app-argument': 'firebase.{$name}() takes either no argument or a ' + 'Firebase App instance.'\n};\nvar appErrors = new __WEBPACK_IMPORTED_MODULE_1__errors__[\"a\" /* ErrorFactory */]('app', 'Firebase', errors);\n// CONCATENATED MODULE: ./src/app.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_shims__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_shims___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__utils_shims__);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n// Import the needed shims\n\n// Import the createFirebaseNamespace function\n\n// Export a single instance of firebase app\nvar firebase = createFirebaseNamespace();\n/* harmony default export */ __webpack_exports__[\"default\"] = (firebase);\n\n/***/ }),\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */,\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export patchCapture */\n/* unused harmony export FirebaseError */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ErrorFactory; });\nvar ERROR_NAME = 'FirebaseError';\nvar captureStackTrace = Error.captureStackTrace;\n// Export for faking in tests\nfunction patchCapture(captureFake) {\n var result = captureStackTrace;\n captureStackTrace = captureFake;\n return result;\n}\nvar FirebaseError = function () {\n function FirebaseError(code, message) {\n this.code = code;\n this.message = message;\n var stack;\n // We want the stack value, if implemented by Error\n if (captureStackTrace) {\n // Patches this.stack, omitted calls above ErrorFactory#create\n captureStackTrace(this, ErrorFactory.prototype.create);\n } else {\n var err_1 = Error.apply(this, arguments);\n this.name = ERROR_NAME;\n // Make non-enumerable getter for the property.\n Object.defineProperty(this, 'stack', {\n get: function get() {\n return err_1.stack;\n }\n });\n }\n }\n return FirebaseError;\n}();\n\n// Back-door inheritance\nFirebaseError.prototype = Object.create(Error.prototype);\nFirebaseError.prototype.constructor = FirebaseError;\nFirebaseError.prototype.name = ERROR_NAME;\nvar ErrorFactory = function () {\n function ErrorFactory(service, serviceName, errors) {\n this.service = service;\n this.serviceName = serviceName;\n this.errors = errors;\n // Matches {$name}, by default.\n this.pattern = /\\{\\$([^}]+)}/g;\n // empty\n }\n ErrorFactory.prototype.create = function (code, data) {\n if (data === undefined) {\n data = {};\n }\n var template = this.errors[code];\n var fullCode = this.service + '/' + code;\n var message;\n if (template === undefined) {\n message = 'Error';\n } else {\n message = template.replace(this.pattern, function (match, key) {\n var value = data[key];\n return value !== undefined ? value.toString() : '<' + key + '?>';\n });\n }\n // Service: Error message (service/code).\n message = this.serviceName + ': ' + message + ' (' + fullCode + ').';\n var err = new FirebaseError(fullCode, message);\n // Populate the Error object with message parts for programmatic\n // accesses (e.g., e.file).\n for (var prop in data) {\n if (!data.hasOwnProperty(prop) || prop.slice(-1) === '_') {\n continue;\n }\n err[prop] = data[prop];\n }\n return err;\n };\n return ErrorFactory;\n}();\n\n\n/***/ }),\n/* 11 */,\n/* 12 */,\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createSubscribe;\n/* unused harmony export async */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_promise__ = __webpack_require__(4);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\nfunction createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\nvar ObserverProxy = function () {\n /**\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\n function ObserverProxy(executor, onNoObservers) {\n var _this = this;\n this.observers = [];\n this.unsubscribes = [];\n this.observerCount = 0;\n // Micro-task scheduling by calling task.then().\n this.task = __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].resolve();\n this.finalized = false;\n this.onNoObservers = onNoObservers;\n // Call the executor asynchronously so subscribers that are called\n // synchronously after the creation of the subscribe function\n // can still receive the very first value generated in the executor.\n this.task.then(function () {\n executor(_this);\n }).catch(function (e) {\n _this.error(e);\n });\n }\n ObserverProxy.prototype.next = function (value) {\n this.forEachObserver(function (observer) {\n observer.next(value);\n });\n };\n ObserverProxy.prototype.error = function (error) {\n this.forEachObserver(function (observer) {\n observer.error(error);\n });\n this.close(error);\n };\n ObserverProxy.prototype.complete = function () {\n this.forEachObserver(function (observer) {\n observer.complete();\n });\n this.close();\n };\n /**\r\n * Subscribe function that can be used to add an Observer to the fan-out list.\r\n *\r\n * - We require that no event is sent to a subscriber sychronously to their\r\n * call to subscribe().\r\n */\n ObserverProxy.prototype.subscribe = function (nextOrObserver, error, complete) {\n var _this = this;\n var observer;\n if (nextOrObserver === undefined && error === undefined && complete === undefined) {\n throw new Error('Missing Observer.');\n }\n // Assemble an Observer object when passed as callback functions.\n if (implementsAnyMethods(nextOrObserver, ['next', 'error', 'complete'])) {\n observer = nextOrObserver;\n } else {\n observer = {\n next: nextOrObserver,\n error: error,\n complete: complete\n };\n }\n if (observer.next === undefined) {\n observer.next = noop;\n }\n if (observer.error === undefined) {\n observer.error = noop;\n }\n if (observer.complete === undefined) {\n observer.complete = noop;\n }\n var unsub = this.unsubscribeOne.bind(this, this.observers.length);\n // Attempt to subscribe to a terminated Observable - we\n // just respond to the Observer with the final error or complete\n // event.\n if (this.finalized) {\n this.task.then(function () {\n try {\n if (_this.finalError) {\n observer.error(_this.finalError);\n } else {\n observer.complete();\n }\n } catch (e) {\n // nothing\n }\n return;\n });\n }\n this.observers.push(observer);\n return unsub;\n };\n // Unsubscribe is synchronous - we guarantee that no events are sent to\n // any unsubscribed Observer.\n ObserverProxy.prototype.unsubscribeOne = function (i) {\n if (this.observers === undefined || this.observers[i] === undefined) {\n return;\n }\n delete this.observers[i];\n this.observerCount -= 1;\n if (this.observerCount === 0 && this.onNoObservers !== undefined) {\n this.onNoObservers(this);\n }\n };\n ObserverProxy.prototype.forEachObserver = function (fn) {\n if (this.finalized) {\n // Already closed by previous event....just eat the additional values.\n return;\n }\n // Since sendOne calls asynchronously - there is no chance that\n // this.observers will become undefined.\n for (var i = 0; i < this.observers.length; i++) {\n this.sendOne(i, fn);\n }\n };\n // Call the Observer via one of it's callback function. We are careful to\n // confirm that the observe has not been unsubscribed since this asynchronous\n // function had been queued.\n ObserverProxy.prototype.sendOne = function (i, fn) {\n var _this = this;\n // Execute the callback asynchronously\n this.task.then(function () {\n if (_this.observers !== undefined && _this.observers[i] !== undefined) {\n try {\n fn(_this.observers[i]);\n } catch (e) {\n // Ignore exceptions raised in Observers or missing methods of an\n // Observer.\n // Log error to console. b/31404806\n if (typeof console !== 'undefined' && console.error) {\n console.error(e);\n }\n }\n }\n });\n };\n ObserverProxy.prototype.close = function (err) {\n var _this = this;\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n if (err !== undefined) {\n this.finalError = err;\n }\n // Proxy is no longer needed - garbage collect references\n this.task.then(function () {\n _this.observers = undefined;\n _this.onNoObservers = undefined;\n });\n };\n return ObserverProxy;\n}();\n/** Turn synchronous function into one called asynchronously. */\nfunction async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\nfunction implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}\nfunction noop() {\n // do nothing\n}\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return globalScope; });\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar scope;\nif (typeof global !== 'undefined') {\n scope = global;\n} else if (typeof self !== 'undefined') {\n scope = self;\n} else {\n try {\n scope = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n}\nvar globalScope = scope;\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(15)))\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = deepCopy;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = deepExtend;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = patchProperty;\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\nfunction deepCopy(value) {\n return deepExtend(undefined, value);\n}\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays). Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n */\nfunction deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}\n// TODO: Really needed (for JSCompiler type checking)?\nfunction patchProperty(obj, prop, value) {\n obj[prop] = value;\n}\n\n/***/ }),\n/* 18 */,\n/* 19 */\n/***/ (function(module, exports) {\n\n/**\r\n * This is the Array.prototype.findIndex polyfill from MDN\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\r\n * https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\r\n */\nif (!Array.prototype.findIndex) {\n Object.defineProperty(Array.prototype, 'findIndex', {\n value: function value(predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n var o = Object(this);\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n var len = o.length >>> 0;\n // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n var thisArg = arguments[1];\n // 5. Let k be 0.\n var k = 0;\n // 6. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return k.\n var kValue = o[k];\n if (predicate.call(thisArg, kValue, k, o)) {\n return k;\n }\n // e. Increase k by 1.\n k++;\n }\n // 7. Return -1.\n return -1;\n }\n });\n}\n/**\r\n * This is the Array.prototype.find polyfill from MDN\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\r\n * https://tc39.github.io/ecma262/#sec-array.prototype.find\r\n */\nif (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, 'find', {\n value: function value(predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n var o = Object(this);\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n var len = o.length >>> 0;\n // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n var thisArg = arguments[1];\n // 5. Let k be 0.\n var k = 0;\n // 6. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return kValue.\n var kValue = o[k];\n if (predicate.call(thisArg, kValue, k, o)) {\n return kValue;\n }\n // e. Increase k by 1.\n k++;\n }\n // 7. Return undefined.\n return undefined;\n }\n });\n}\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(setImmediate) {(function (root) {\n\n // Store setTimeout reference so promise-polyfill will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var setTimeoutFunc = setTimeout;\n\n function noop() {}\n \n // Polyfill for Function.prototype.bind\n function bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n }\n\n function Promise(fn) {\n if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n\n doResolve(fn, this);\n }\n\n function handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n }\n\n function resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n }\n\n function reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n }\n\n function finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n }\n\n function Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n }\n\n /**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\n function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }\n\n Promise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n };\n\n Promise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new (this.constructor)(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n };\n\n Promise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n };\n\n Promise.resolve = function (value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function (resolve) {\n resolve(value);\n });\n };\n\n Promise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n };\n\n Promise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n };\n\n // Use polyfill for setImmediate for performance gains\n Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\n function (fn) {\n setTimeoutFunc(fn, 0);\n };\n\n Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n };\n\n /**\n * Set the immediate function to execute callbacks\n * @param fn {function} Function to execute\n * @deprecated\n */\n Promise._setImmediateFn = function _setImmediateFn(fn) {\n Promise._immediateFn = fn;\n };\n\n /**\n * Change the function to execute on unhandled rejection\n * @param {function} fn Function to execute on unhandled rejection\n * @deprecated\n */\n Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n Promise._unhandledRejectionFn = fn;\n };\n \n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Promise;\n } else if (!root.Promise) {\n root.Promise = Promise;\n }\n\n})(this);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21).setImmediate))\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(22);\nexports.setImmediate = setImmediate;\nexports.clearImmediate = clearImmediate;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a ';\n }\n var iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n } catch (e) {\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])('frame writing exception');\n if (e.stack) {\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])(e.stack);\n }\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])(e);\n }\n } else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n /**\r\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\r\n * actually use.\r\n * @private\r\n * @return {Element}\r\n */\n FirebaseIFrameScriptHolder.createIFrame_ = function () {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n var a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])('No IE domain setting required');\n }\n } catch (e) {\n var domain = document.domain;\n iframe.src = \"javascript:void((function(){document.open();document.domain='\" + domain + \"';document.close();})())\";\n }\n } else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n iframe.doc = iframe.contentDocument; // Firefox, Opera, Safari\n } else if (iframe.contentWindow) {\n iframe.doc = iframe.contentWindow.document; // Internet Explorer\n } else if (iframe.document) {\n iframe.doc = iframe.document; //others?\n }\n return iframe;\n };\n /**\r\n * Cancel all outstanding queries and remove the frame.\r\n */\n FirebaseIFrameScriptHolder.prototype.close = function () {\n var _this = this;\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(function () {\n if (_this.myIFrame !== null) {\n document.body.removeChild(_this.myIFrame);\n _this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_environment__[\"b\" /* isNodeSdk */])() && this.myID) {\n var urlParams = {};\n urlParams[FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n var theURL = this.urlFn(urlParams);\n FirebaseIFrameScriptHolder.nodeRestRequest(theURL);\n }\n // Protect from being called recursively.\n var onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n };\n /**\r\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\r\n * @param {!string} id - The ID of this connection\r\n * @param {!string} pw - The password for this connection\r\n */\n FirebaseIFrameScriptHolder.prototype.startLongPoll = function (id, pw) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) {}\n };\n /**\r\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\r\n * too many outstanding requests and we are still alive.\r\n *\r\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\r\n * needed.\r\n */\n FirebaseIFrameScriptHolder.prototype.newRequest_ = function () {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (this.alive && this.sendNewPolls && this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)) {\n //construct our url\n this.currentSerial++;\n var urlParams = {};\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n var theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n var curDataString = '';\n var i = 0;\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n var nextSeg = this.pendingSegs[0];\n if (nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <= MAX_URL_DATA_SIZE) {\n //great, the segment will fit. Lets append it.\n var theSeg = this.pendingSegs.shift();\n curDataString = curDataString + '&' + FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM + i + '=' + theSeg.seg + '&' + FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET + i + '=' + theSeg.ts + '&' + FIREBASE_LONGPOLL_DATA_PARAM + i + '=' + theSeg.d;\n i++;\n } else {\n break;\n }\n }\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n return true;\n } else {\n return false;\n }\n };\n /**\r\n * Queue a packet for transmission to the server.\r\n * @param segnum - A sequential id for this packet segment used for reassembly\r\n * @param totalsegs - The total number of segments in this packet\r\n * @param data - The data for this segment.\r\n */\n FirebaseIFrameScriptHolder.prototype.enqueueSegment = function (segnum, totalsegs, data) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n };\n /**\r\n * Add a script tag for a regular long-poll request.\r\n * @param {!string} url - The URL of the script tag.\r\n * @param {!number} serial - The serial number of the request.\r\n * @private\r\n */\n FirebaseIFrameScriptHolder.prototype.addLongPollTag_ = function (url, serial) {\n var _this = this;\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n var doNewRequest = function doNewRequest() {\n _this.outstandingRequests.remove(serial);\n _this.newRequest_();\n };\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n var keepaliveTimeout = setTimeout(doNewRequest, Math.floor(KEEPALIVE_REQUEST_INTERVAL));\n var readyStateCB = function readyStateCB() {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n this.addTag(url, readyStateCB);\n };\n /**\r\n * Add an arbitrary script tag to the iframe.\r\n * @param {!string} url - The URL for the script tag source.\r\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\r\n */\n FirebaseIFrameScriptHolder.prototype.addTag = function (url, loadCB) {\n var _this = this;\n if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_environment__[\"b\" /* isNodeSdk */])()) {\n this.doNodeLongPoll(url, loadCB);\n } else {\n setTimeout(function () {\n try {\n // if we're already closed, don't add this poll\n if (!_this.sendNewPolls) return;\n var newScript_1 = _this.myIFrame.doc.createElement('script');\n newScript_1.type = 'text/javascript';\n newScript_1.async = true;\n newScript_1.src = url;\n newScript_1.onload = newScript_1.onreadystatechange = function () {\n var rstate = newScript_1.readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript_1.onload = newScript_1.onreadystatechange = null;\n if (newScript_1.parentNode) {\n newScript_1.parentNode.removeChild(newScript_1);\n }\n loadCB();\n }\n };\n newScript_1.onerror = function () {\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])('Long-poll script failed to load: ' + url);\n _this.sendNewPolls = false;\n _this.close();\n };\n _this.myIFrame.doc.body.appendChild(newScript_1);\n } catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n };\n return FirebaseIFrameScriptHolder;\n}();\n\n// CONCATENATED MODULE: ./src/database/realtime/TransportManager.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__ = __webpack_require__(18);\n/* harmony import */ var TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__ = __webpack_require__(1);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n/**\r\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\r\n * lifecycle.\r\n *\r\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\r\n * they are available.\r\n * @constructor\r\n */\nvar TransportManager_TransportManager = function () {\n /**\r\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\r\n */\n function TransportManager(repoInfo) {\n this.initTransports_(repoInfo);\n }\n Object.defineProperty(TransportManager, \"ALL_TRANSPORTS\", {\n /**\r\n * @const\r\n * @type {!Array.}\r\n */\n get: function get() {\n return [BrowserPollConnection_BrowserPollConnection, __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */]];\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @param {!RepoInfo} repoInfo\r\n * @private\r\n */\n TransportManager.prototype.initTransports_ = function (repoInfo) {\n var isWebSocketsAvailable = __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */] && __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */]['isAvailable']();\n var isSkipPollConnection = isWebSocketsAvailable && !__WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */].previouslyFailed();\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable) Object(TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__[\"B\" /* warn */])(\"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\");\n isSkipPollConnection = true;\n }\n if (isSkipPollConnection) {\n this.transports_ = [__WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */]];\n } else {\n var transports_1 = this.transports_ = [];\n Object(TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__[\"i\" /* each */])(TransportManager.ALL_TRANSPORTS, function (i, transport) {\n if (transport && transport['isAvailable']()) {\n transports_1.push(transport);\n }\n });\n }\n };\n /**\r\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\r\n * initial transport to use\r\n */\n TransportManager.prototype.initialTransport = function () {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n } else {\n throw new Error('No transports available');\n }\n };\n /**\r\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\r\n * transport, or null\r\n */\n TransportManager.prototype.upgradeTransport = function () {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n } else {\n return null;\n }\n };\n return TransportManager;\n}();\n\n// CONCATENATED MODULE: ./src/database/realtime/Connection.ts\n/* harmony import */ var Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_storage_storage__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants__ = __webpack_require__(9);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n// Abort upgrade attempt if it takes longer than 60s.\nvar UPGRADE_TIMEOUT = 60000;\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nvar DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nvar BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nvar BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\nvar MESSAGE_TYPE = 't';\nvar MESSAGE_DATA = 'd';\nvar CONTROL_SHUTDOWN = 's';\nvar CONTROL_RESET = 'r';\nvar CONTROL_ERROR = 'e';\nvar CONTROL_PONG = 'o';\nvar SWITCH_ACK = 'a';\nvar END_TRANSMISSION = 'n';\nvar PING = 'p';\nvar SERVER_HELLO = 'h';\n/**\r\n * Creates a new real-time connection to the server using whichever method works\r\n * best in the current browser.\r\n *\r\n * @constructor\r\n */\nvar Connection_Connection = function () {\n /**\r\n * @param {!string} id - an id for this connection\r\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\r\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\r\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\r\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\r\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\r\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\r\n */\n function Connection(id, repoInfo_, onMessage_, onReady_, onDisconnect_, onKill_, lastSessionId) {\n this.id = id;\n this.repoInfo_ = repoInfo_;\n this.onMessage_ = onMessage_;\n this.onReady_ = onReady_;\n this.onDisconnect_ = onDisconnect_;\n this.onKill_ = onKill_;\n this.lastSessionId = lastSessionId;\n this.connectionCount = 0;\n this.pendingDataMessages = [];\n this.state_ = 0 /* CONNECTING */;\n this.log_ = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"t\" /* logWrapper */])('c:' + this.id + ':');\n this.transportManager_ = new TransportManager_TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n /**\r\n * Starts a connection attempt\r\n * @private\r\n */\n Connection.prototype.start_ = function () {\n var _this = this;\n var conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(this.nextTransportId_(), this.repoInfo_, undefined, this.lastSessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessageReceived = this.connReceiver_(this.conn_);\n var onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n /*\r\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\r\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\r\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\r\n * still have the context of your originating frame.\r\n */\n setTimeout(function () {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n _this.conn_ && _this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n var healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"x\" /* setTimeoutNonBlocking */])(function () {\n _this.healthyTimeout_ = null;\n if (!_this.isHealthy_) {\n if (_this.conn_ && _this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has received ' + _this.conn_.bytesReceived + ' bytes. Marking connection healthy.');\n _this.isHealthy_ = true;\n _this.conn_.markConnectionHealthy();\n } else if (_this.conn_ && _this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has sent ' + _this.conn_.bytesSent + ' bytes. Leaving connection alive.');\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n } else {\n _this.log_('Closing unhealthy connection after timeout.');\n _this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms));\n }\n };\n /**\r\n * @return {!string}\r\n * @private\r\n */\n Connection.prototype.nextTransportId_ = function () {\n return 'c:' + this.id + ':' + this.connectionCount++;\n };\n Connection.prototype.disconnReceiver_ = function (conn) {\n var _this = this;\n return function (everConnected) {\n if (conn === _this.conn_) {\n _this.onConnectionLost_(everConnected);\n } else if (conn === _this.secondaryConn_) {\n _this.log_('Secondary connection lost.');\n _this.onSecondaryConnectionLost_();\n } else {\n _this.log_('closing an old connection');\n }\n };\n };\n Connection.prototype.connReceiver_ = function (conn) {\n var _this = this;\n return function (message) {\n if (_this.state_ != 2 /* DISCONNECTED */) {\n if (conn === _this.rx_) {\n _this.onPrimaryMessageReceived_(message);\n } else if (conn === _this.secondaryConn_) {\n _this.onSecondaryMessageReceived_(message);\n } else {\n _this.log_('message on old connection');\n }\n }\n };\n };\n /**\r\n *\r\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\r\n */\n Connection.prototype.sendRequest = function (dataMsg) {\n // wrap in a data message envelope and send it on\n var msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n };\n Connection.prototype.tryCleanupConnection = function () {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_('cleaning up and promoting a connection: ' + this.secondaryConn_.connId);\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n };\n Connection.prototype.onSecondaryControl_ = function (controlData) {\n if (MESSAGE_TYPE in controlData) {\n var cmd = controlData[MESSAGE_TYPE];\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n } else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (this.tx_ === this.secondaryConn_ || this.rx_ === this.secondaryConn_) {\n this.close();\n }\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n };\n Connection.prototype.onSecondaryMessageReceived_ = function (parsedData) {\n var layer = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('t', parsedData);\n var data = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n } else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n } else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n };\n Connection.prototype.upgradeIfSecondaryHealthy_ = function () {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n } else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.proceedWithUpgrade_ = function () {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n this.tryCleanupConnection();\n };\n Connection.prototype.onPrimaryMessageReceived_ = function (parsedData) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n var layer = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('t', parsedData);\n var data = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n } else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n };\n Connection.prototype.onDataMessage_ = function (message) {\n this.onPrimaryResponse_();\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n };\n Connection.prototype.onPrimaryResponse_ = function () {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n };\n Connection.prototype.onControl_ = function (controlData) {\n var cmd = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n var payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n } else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (var i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n } else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n } else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n } else if (cmd === CONTROL_ERROR) {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"k\" /* error */])('Server Error: ' + payload);\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n } else {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"k\" /* error */])('Unknown control packet command: ' + cmd);\n }\n }\n };\n /**\r\n *\r\n * @param {Object} handshake The handshake data returned from the server\r\n * @private\r\n */\n Connection.prototype.onHandshake_ = function (handshake) {\n var timestamp = handshake.ts;\n var version = handshake.v;\n var host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == 0 /* CONNECTING */) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (__WEBPACK_IMPORTED_MODULE_2__Constants__[\"e\" /* PROTOCOL_VERSION */] !== version) {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"B\" /* warn */])('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n };\n Connection.prototype.tryStartUpgrade_ = function () {\n var conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n };\n Connection.prototype.startUpgrade_ = function (conn) {\n var _this = this;\n this.secondaryConn_ = new conn(this.nextTransportId_(), this.repoInfo_, this.sessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessage = this.connReceiver_(this.secondaryConn_);\n var onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"x\" /* setTimeoutNonBlocking */])(function () {\n if (_this.secondaryConn_) {\n _this.log_('Timed out trying to upgrade.');\n _this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n };\n Connection.prototype.onReset_ = function (host) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === 1 /* CONNECTED */) {\n this.close();\n } else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n };\n Connection.prototype.onConnectionEstablished_ = function (conn, timestamp) {\n var _this = this;\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = 1 /* CONNECTED */;\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n } else {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"x\" /* setTimeoutNonBlocking */])(function () {\n _this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n };\n Connection.prototype.sendPingOnPrimaryIfNecessary_ = function () {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === 1 /* CONNECTED */) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.onSecondaryConnectionLost_ = function () {\n var conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n };\n /**\r\n *\r\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\r\n * we should flush the host cache\r\n * @private\r\n */\n Connection.prototype.onConnectionLost_ = function (everConnected) {\n this.conn_ = null;\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === 0 /* CONNECTING */) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n __WEBPACK_IMPORTED_MODULE_1__core_storage_storage__[\"a\" /* PersistentStorage */].remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n } else if (this.state_ === 1 /* CONNECTED */) {\n this.log_('Realtime connection lost.');\n }\n this.close();\n };\n /**\r\n *\r\n * @param {string} reason\r\n * @private\r\n */\n Connection.prototype.onConnectionShutdown_ = function (reason) {\n this.log_('Connection shutdown command received. Shutting down...');\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n this.close();\n };\n Connection.prototype.sendData_ = function (data) {\n if (this.state_ !== 1 /* CONNECTED */) {\n throw 'Connection is not connected';\n } else {\n this.tx_.send(data);\n }\n };\n /**\r\n * Cleans up this connection, calling the appropriate callbacks\r\n */\n Connection.prototype.close = function () {\n if (this.state_ !== 2 /* DISCONNECTED */) {\n this.log_('Closing realtime connection.');\n this.state_ = 2 /* DISCONNECTED */;\n this.closeConnections_();\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n };\n /**\r\n *\r\n * @private\r\n */\n Connection.prototype.closeConnections_ = function () {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n };\n return Connection;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/ServerActions.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * Interface defining the set of actions that can be performed against the Firebase server\r\n * (basically corresponds to our wire protocol).\r\n *\r\n * @interface\r\n */\nvar ServerActions = function () {\n function ServerActions() {}\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, string)=} onComplete\r\n * @param {string=} hash\r\n */\n ServerActions.prototype.put = function (pathString, data, onComplete, hash) {};\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, ?string)} onComplete\r\n * @param {string=} hash\r\n */\n ServerActions.prototype.merge = function (pathString, data, onComplete, hash) {};\n /**\r\n * Refreshes the auth token for the current connection.\r\n * @param {string} token The authentication token\r\n */\n ServerActions.prototype.refreshAuthToken = function (token) {};\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, string)=} onComplete\r\n */\n ServerActions.prototype.onDisconnectPut = function (pathString, data, onComplete) {};\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, string)=} onComplete\r\n */\n ServerActions.prototype.onDisconnectMerge = function (pathString, data, onComplete) {};\n /**\r\n * @param {string} pathString\r\n * @param {function(string, string)=} onComplete\r\n */\n ServerActions.prototype.onDisconnectCancel = function (pathString, onComplete) {};\n /**\r\n * @param {Object.} stats\r\n */\n ServerActions.prototype.reportStats = function (stats) {};\n return ServerActions;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/PersistentConnection.ts\n/* harmony import */ var PersistentConnection___WEBPACK_IMPORTED_MODULE_0__app__ = __webpack_require__(5);\n/* harmony import */ var PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_json__ = __webpack_require__(3);\n/* harmony import */ var PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_constants__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_environment__ = __webpack_require__(6);\nvar PersistentConnection__typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar PersistentConnection___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar RECONNECT_MIN_DELAY = 1000;\nvar RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nvar RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nvar RECONNECT_DELAY_MULTIPLIER = 1.3;\nvar RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nvar SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nvar INVALID_AUTH_TOKEN_THRESHOLD = 3;\n/**\r\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\r\n *\r\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\r\n * in quotes to make sure the closure compiler does not minify them.\r\n */\nvar PersistentConnection_PersistentConnection = function (_super) {\n PersistentConnection___extends(PersistentConnection, _super);\n /**\r\n * @implements {ServerActions}\r\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\r\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\r\n * @param onConnectStatus_\r\n * @param onServerInfoUpdate_\r\n * @param authTokenProvider_\r\n * @param authOverride_\r\n */\n function PersistentConnection(repoInfo_, onDataUpdate_, onConnectStatus_, onServerInfoUpdate_, authTokenProvider_, authOverride_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.onConnectStatus_ = onConnectStatus_;\n _this.onServerInfoUpdate_ = onServerInfoUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n _this.authOverride_ = authOverride_;\n // Used for diagnostic logging.\n _this.id = PersistentConnection.nextPersistentConnectionId_++;\n _this.log_ = Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"t\" /* logWrapper */])('p:' + _this.id + ':');\n /** @private {Object} */\n _this.interruptReasons_ = {};\n _this.listens_ = {};\n _this.outstandingPuts_ = [];\n _this.outstandingPutCount_ = 0;\n _this.onDisconnectRequestQueue_ = [];\n _this.connected_ = false;\n _this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n _this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n _this.securityDebugCallback_ = null;\n _this.lastSessionId = null;\n /** @private {number|null} */\n _this.establishConnectionTimer_ = null;\n /** @private {boolean} */\n _this.visible_ = false;\n // Before we get connected, we keep a queue of pending messages to send.\n _this.requestCBHash_ = {};\n _this.requestNumber_ = 0;\n /** @private {?{\r\n * sendRequest(Object),\r\n * close()\r\n * }} */\n _this.realtime_ = null;\n /** @private {string|null} */\n _this.authToken_ = null;\n _this.forceTokenRefresh_ = false;\n _this.invalidAuthTokenCount_ = 0;\n _this.firstConnection_ = true;\n _this.lastConnectionAttemptTime_ = null;\n _this.lastConnectionEstablishedTime_ = null;\n if (authOverride_ && !Object(__WEBPACK_IMPORTED_MODULE_11__utils_environment__[\"b\" /* isNodeSdk */])()) {\n throw new Error('Auth override specified in options, but not supported on non Node.js platforms');\n }\n _this.scheduleConnect_(0);\n VisibilityMonitor.getInstance().on('visible', _this.onVisible_, _this);\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor.getInstance().on('online', _this.onOnline_, _this);\n }\n return _this;\n }\n /**\r\n * @param {!string} action\r\n * @param {*} body\r\n * @param {function(*)=} onResponse\r\n * @protected\r\n */\n PersistentConnection.prototype.sendRequest = function (action, body, onResponse) {\n var curReqNum = ++this.requestNumber_;\n var msg = { r: curReqNum, a: action, b: body };\n this.log_(Object(__WEBPACK_IMPORTED_MODULE_2__utils_json__[\"b\" /* stringify */])(msg));\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(this.connected_, \"sendRequest call when we're not connected not allowed.\");\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var queryId = query.queryIdentifier();\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(query.getQueryParams().isDefault() || !query.getQueryParams().loadsAllData(), 'listen() called for non-default but complete query');\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(!this.listens_[pathString][queryId], 'listen() called twice for same path/queryId.');\n var listenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n };\n /**\r\n * @param {!{onComplete(),\r\n * hashFn():!string,\r\n * query: !Query,\r\n * tag: ?number}} listenSpec\r\n * @private\r\n */\n PersistentConnection.prototype.sendListen_ = function (listenSpec) {\n var _this = this;\n var query = listenSpec.query;\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n var req = { /*path*/p: pathString };\n var action = 'q';\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n req['h'] = listenSpec.hashFn();\n this.sendRequest(action, req, function (message) {\n var payload = message['d'];\n var status = message['s'];\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n var currentListenSpec = _this.listens_[pathString] && _this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n _this.log_('listen response', message);\n if (status !== 'ok') {\n _this.removeListen_(pathString, queryId);\n }\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n };\n /**\r\n * @param {*} payload\r\n * @param {!Query} query\r\n * @private\r\n */\n PersistentConnection.warnOnListenWarnings_ = function (payload, query) {\n if (payload && (typeof payload === 'undefined' ? 'undefined' : PersistentConnection__typeof(payload)) === 'object' && Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"b\" /* contains */])(payload, 'w')) {\n var warnings = Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"l\" /* safeGet */])(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n var indexSpec = '\".indexOn\": \"' + query.getQueryParams().getIndex().toString() + '\"';\n var indexPath = query.path.toString();\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"B\" /* warn */])('Using an unspecified index. Consider adding ' + indexSpec + ' at ' + indexPath + ' to your security rules for better performance');\n }\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.refreshAuthToken = function (token) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n } else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, function () {});\n }\n }\n this.reduceReconnectDelayIfAdminCredential_(token);\n };\n /**\r\n * @param {!string} credential\r\n * @private\r\n */\n PersistentConnection.prototype.reduceReconnectDelayIfAdminCredential_ = function (credential) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n var isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || isAdmin(credential)) {\n this.log_('Admin auth credential detected. Reducing max reconnect time.');\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n };\n /**\r\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\r\n * a auth revoked (the connection is closed).\r\n */\n PersistentConnection.prototype.tryAuth = function () {\n var _this = this;\n if (this.connected_ && this.authToken_) {\n var token_1 = this.authToken_;\n var authMethod = isValidFormat(token_1) ? 'auth' : 'gauth';\n var requestData = { cred: token_1 };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n } else if (PersistentConnection__typeof(this.authOverride_) === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, function (res) {\n var status = res['s'];\n var data = res['d'] || 'error';\n if (_this.authToken_ === token_1) {\n if (status === 'ok') {\n _this.invalidAuthTokenCount_ = 0;\n } else {\n // Triggers reconnect and force refresh for auth token\n _this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.unlisten = function (query, tag) {\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(query.getQueryParams().isDefault() || !query.getQueryParams().loadsAllData(), 'unlisten() called for non-default but complete query');\n var listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n };\n PersistentConnection.prototype.sendUnlisten_ = function (pathString, queryId, queryObj, tag) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n var req = { /*path*/p: pathString };\n var action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n this.sendRequest(action, req);\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.onDisconnectPut = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'o',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.onDisconnectMerge = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'om',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.onDisconnectCancel = function (pathString, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'oc',\n data: null,\n onComplete: onComplete\n });\n }\n };\n PersistentConnection.prototype.sendOnDisconnect_ = function (action, pathString, data, onComplete) {\n var request = { /*path*/p: pathString, /*data*/d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, function (response) {\n if (onComplete) {\n setTimeout(function () {\n onComplete(response['s'], response['d']);\n }, Math.floor(0));\n }\n });\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.put = function (pathString, data, onComplete, hash) {\n this.putInternal('p', pathString, data, onComplete, hash);\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.merge = function (pathString, data, onComplete, hash) {\n this.putInternal('m', pathString, data, onComplete, hash);\n };\n PersistentConnection.prototype.putInternal = function (action, pathString, data, onComplete, hash) {\n var request = {\n /*path*/p: pathString,\n /*data*/d: data\n };\n if (hash !== undefined) request['h'] = hash;\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action: action,\n request: request,\n onComplete: onComplete\n });\n this.outstandingPutCount_++;\n var index = this.outstandingPuts_.length - 1;\n if (this.connected_) {\n this.sendPut_(index);\n } else {\n this.log_('Buffering put: ' + pathString);\n }\n };\n PersistentConnection.prototype.sendPut_ = function (index) {\n var _this = this;\n var action = this.outstandingPuts_[index].action;\n var request = this.outstandingPuts_[index].request;\n var onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n this.sendRequest(action, request, function (message) {\n _this.log_(action + ' response', message);\n delete _this.outstandingPuts_[index];\n _this.outstandingPutCount_--;\n // Clean up array occasionally.\n if (_this.outstandingPutCount_ === 0) {\n _this.outstandingPuts_ = [];\n }\n if (onComplete) onComplete(message['s'], message['d']);\n });\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.reportStats = function (stats) {\n var _this = this;\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n var request = { /*counters*/c: stats };\n this.log_('reportStats', request);\n this.sendRequest( /*stats*/'s', request, function (result) {\n var status = result['s'];\n if (status !== 'ok') {\n var errorReason = result['d'];\n _this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n };\n /**\r\n * @param {*} message\r\n * @private\r\n */\n PersistentConnection.prototype.onDataMessage_ = function (message) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + Object(__WEBPACK_IMPORTED_MODULE_2__utils_json__[\"b\" /* stringify */])(message));\n var reqNum = message['r'];\n var onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message['b']);\n }\n } else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n } else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n };\n PersistentConnection.prototype.onDataPush_ = function (action, body) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd') this.onDataUpdate_(body['p'], body['d'],\n /*isMerge*/false, body['t']);else if (action === 'm') this.onDataUpdate_(body['p'], body['d'],\n /*isMerge=*/true, body['t']);else if (action === 'c') this.onListenRevoked_(body['p'], body['q']);else if (action === 'ac') this.onAuthRevoked_(body['s'], body['d']);else if (action === 'sd') this.onSecurityDebugPacket_(body);else Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"k\" /* error */])('Unrecognized action received from server: ' + Object(__WEBPACK_IMPORTED_MODULE_2__utils_json__[\"b\" /* stringify */])(action) + '\\nAre you using the latest client?');\n };\n PersistentConnection.prototype.onReady_ = function (timestamp, sessionId) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n };\n PersistentConnection.prototype.scheduleConnect_ = function (timeout) {\n var _this = this;\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(!this.realtime_, \"Scheduling a connect when we're already connected/ing?\");\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n this.establishConnectionTimer_ = setTimeout(function () {\n _this.establishConnectionTimer_ = null;\n _this.establishConnection_();\n }, Math.floor(timeout));\n };\n /**\r\n * @param {boolean} visible\r\n * @private\r\n */\n PersistentConnection.prototype.onVisible_ = function (visible) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (visible && !this.visible_ && this.reconnectDelay_ === this.maxReconnectDelay_) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n };\n PersistentConnection.prototype.onOnline_ = function (online) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n } else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n };\n PersistentConnection.prototype.onRealtimeDisconnect_ = function () {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n } else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n var timeSinceLastConnectSucceeded = new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT) this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n var timeSinceLastConnectAttempt = new Date().getTime() - this.lastConnectionAttemptTime_;\n var reconnectDelay = Math.max(0, this.reconnectDelay_ - timeSinceLastConnectAttempt);\n reconnectDelay = Math.random() * reconnectDelay;\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(this.maxReconnectDelay_, this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER);\n }\n this.onConnectStatus_(false);\n };\n PersistentConnection.prototype.establishConnection_ = function () {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n var onDataMessage_1 = this.onDataMessage_.bind(this);\n var onReady_1 = this.onReady_.bind(this);\n var onDisconnect_1 = this.onRealtimeDisconnect_.bind(this);\n var connId_1 = this.id + ':' + PersistentConnection.nextConnectionId_++;\n var self_1 = this;\n var lastSessionId_1 = this.lastSessionId;\n var canceled_1 = false;\n var connection_1 = null;\n var closeFn_1 = function closeFn_1() {\n if (connection_1) {\n connection_1.close();\n } else {\n canceled_1 = true;\n onDisconnect_1();\n }\n };\n var sendRequestFn = function sendRequestFn(msg) {\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(connection_1, \"sendRequest call when we're not connected not allowed.\");\n connection_1.sendRequest(msg);\n };\n this.realtime_ = {\n close: closeFn_1,\n sendRequest: sendRequestFn\n };\n var forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_.getToken(forceRefresh).then(function (result) {\n if (!canceled_1) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('getToken() completed. Creating connection.');\n self_1.authToken_ = result && result.accessToken;\n connection_1 = new Connection_Connection(connId_1, self_1.repoInfo_, onDataMessage_1, onReady_1, onDisconnect_1,\n /* onKill= */function (reason) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"B\" /* warn */])(reason + ' (' + self_1.repoInfo_.toString() + ')');\n self_1.interrupt(SERVER_KILL_INTERRUPT_REASON);\n }, lastSessionId_1);\n } else {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('getToken() completed but was canceled');\n }\n }).then(null, function (error) {\n self_1.log_('Failed to get token: ' + error);\n if (!canceled_1) {\n if (__WEBPACK_IMPORTED_MODULE_10__utils_constants__[\"a\" /* CONSTANTS */].NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"B\" /* warn */])(error);\n }\n closeFn_1();\n }\n });\n }\n };\n /**\r\n * @param {string} reason\r\n */\n PersistentConnection.prototype.interrupt = function (reason) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n } else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n };\n /**\r\n * @param {string} reason\r\n */\n PersistentConnection.prototype.resume = function (reason) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"j\" /* isEmpty */])(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n };\n PersistentConnection.prototype.handleTimestamp_ = function (timestamp) {\n var delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n };\n PersistentConnection.prototype.cancelSentTransactions_ = function () {\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n var put = this.outstandingPuts_[i];\n if (put && 'h' in put.request && put.queued) {\n if (put.onComplete) put.onComplete('disconnect');\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0) this.outstandingPuts_ = [];\n };\n /**\r\n * @param {!string} pathString\r\n * @param {Array.<*>=} query\r\n * @private\r\n */\n PersistentConnection.prototype.onListenRevoked_ = function (pathString, query) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n var queryId;\n if (!query) {\n queryId = 'default';\n } else {\n queryId = query.map(function (q) {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"d\" /* ObjectToUniqueKey */])(q);\n }).join('$');\n }\n var listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete) listen.onComplete('permission_denied');\n };\n /**\r\n * @param {!string} pathString\r\n * @param {!string} queryId\r\n * @return {{queries:Array., onComplete:function(string)}}\r\n * @private\r\n */\n PersistentConnection.prototype.removeListen_ = function (pathString, queryId) {\n var normalizedPathString = new Path(pathString).toString(); // normalize path.\n var listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"h\" /* getCount */])(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n } else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n };\n PersistentConnection.prototype.onAuthRevoked_ = function (statusCode, explanation) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n };\n PersistentConnection.prototype.onSecurityDebugPacket_ = function (body) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n } else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n };\n PersistentConnection.prototype.restoreState_ = function () {\n var _this = this;\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"f\" /* forEach */])(this.listens_, function (pathString, queries) {\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"f\" /* forEach */])(queries, function (key, listenSpec) {\n _this.sendListen_(listenSpec);\n });\n });\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i]) this.sendPut_(i);\n }\n while (this.onDisconnectRequestQueue_.length) {\n var request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(request.action, request.pathString, request.data, request.onComplete);\n }\n };\n /**\r\n * Sends client stats for first connection\r\n * @private\r\n */\n PersistentConnection.prototype.sendConnectStats_ = function () {\n var stats = {};\n var clientName = 'js';\n if (__WEBPACK_IMPORTED_MODULE_10__utils_constants__[\"a\" /* CONSTANTS */].NODE_ADMIN) {\n clientName = 'admin_node';\n } else if (__WEBPACK_IMPORTED_MODULE_10__utils_constants__[\"a\" /* CONSTANTS */].NODE_CLIENT) {\n clientName = 'node';\n }\n stats['sdk.' + clientName + '.' + PersistentConnection___WEBPACK_IMPORTED_MODULE_0__app__[\"default\"].SDK_VERSION.replace(/\\./g, '-')] = 1;\n if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_environment__[\"a\" /* isMobileCordova */])()) {\n stats['framework.cordova'] = 1;\n } else if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_environment__[\"c\" /* isReactNative */])()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n };\n /**\r\n * @return {boolean}\r\n * @private\r\n */\n PersistentConnection.prototype.shouldReconnect_ = function () {\n var online = OnlineMonitor.getInstance().currentlyOnline();\n return Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"j\" /* isEmpty */])(this.interruptReasons_) && online;\n };\n /**\r\n * @private\r\n */\n PersistentConnection.nextPersistentConnectionId_ = 0;\n /**\r\n * Counter for number of connections created. Mainly used for tagging in the logs\r\n * @type {number}\r\n * @private\r\n */\n PersistentConnection.nextConnectionId_ = 0;\n return PersistentConnection;\n}(ServerActions);\n\n// CONCATENATED MODULE: ./src/utils/util.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__obj__ = __webpack_require__(2);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a params\r\n * object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n *\r\n * @param {!Object} querystringParams\r\n * @return {string}\r\n */\nvar querystring = function querystring(querystringParams) {\n var params = [];\n Object(__WEBPACK_IMPORTED_MODULE_0__obj__[\"f\" /* forEach */])(querystringParams, function (key, value) {\n if (Array.isArray(value)) {\n value.forEach(function (arrayVal) {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\n });\n } else {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n });\n return params.length ? '&' + params.join('&') : '';\n};\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object (e.g. {arg: 'val', arg2: 'val2'})\r\n *\r\n * @param {string} querystring\r\n * @return {!Object}\r\n */\nvar querystringDecode = function querystringDecode(querystring) {\n var obj = {};\n var tokens = querystring.replace(/^\\?/, '').split('&');\n tokens.forEach(function (token) {\n if (token) {\n var key = token.split('=');\n obj[key[0]] = key[1];\n }\n });\n return obj;\n};\n// CONCATENATED MODULE: ./src/database/core/ReadonlyRestClient.ts\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(1);\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_2__utils_json__ = __webpack_require__(3);\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_3__utils_obj__ = __webpack_require__(2);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar ReadonlyRestClient___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\n/**\r\n * An implementation of ServerActions that communicates with the server via REST requests.\r\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\r\n * persistent connection (using WebSockets or long-polling)\r\n */\nvar ReadonlyRestClient_ReadonlyRestClient = function (_super) {\n ReadonlyRestClient___extends(ReadonlyRestClient, _super);\n /**\r\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\r\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\r\n * @param {AuthTokenProvider} authTokenProvider_\r\n * @implements {ServerActions}\r\n */\n function ReadonlyRestClient(repoInfo_, onDataUpdate_, authTokenProvider_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n /** @private {function(...[*])} */\n _this.log_ = Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__[\"t\" /* logWrapper */])('p:rest:');\n /**\r\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\r\n * that's been removed. :-/\r\n *\r\n * @private {!Object.}\r\n */\n _this.listens_ = {};\n return _this;\n }\n ReadonlyRestClient.prototype.reportStats = function (stats) {\n throw new Error('Method not implemented.');\n };\n /**\r\n * @param {!Query} query\r\n * @param {?number=} tag\r\n * @return {string}\r\n * @private\r\n */\n ReadonlyRestClient.getListenId_ = function (query, tag) {\n if (tag !== undefined) {\n return 'tag$' + tag;\n } else {\n Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(query.getQueryParams().isDefault(), \"should have a tag if it's not a default query.\");\n return query.path.toString();\n }\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var _this = this;\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + query.queryIdentifier());\n // Mark this listener so we can tell if it's removed.\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n var thisListen = {};\n this.listens_[listenId] = thisListen;\n var queryStringParamaters = query.getQueryParams().toRestQueryStringParameters();\n this.restRequest_(pathString + '.json', queryStringParamaters, function (error, result) {\n var data = result;\n if (error === 404) {\n data = null;\n error = null;\n }\n if (error === null) {\n _this.onDataUpdate_(pathString, data, /*isMerge=*/false, tag);\n }\n if (Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_3__utils_obj__[\"l\" /* safeGet */])(_this.listens_, listenId) === thisListen) {\n var status_1;\n if (!error) {\n status_1 = 'ok';\n } else if (error == 401) {\n status_1 = 'permission_denied';\n } else {\n status_1 = 'rest_error:' + error;\n }\n onComplete(status_1, null);\n }\n });\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.unlisten = function (query, tag) {\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.refreshAuthToken = function (token) {\n // no-op since we just always call getToken.\n };\n /**\r\n * Performs a REST request to the given path, with the provided query string parameters,\r\n * and any auth credentials we have.\r\n *\r\n * @param {!string} pathString\r\n * @param {!Object.} queryStringParameters\r\n * @param {?function(?number, *=)} callback\r\n * @private\r\n */\n ReadonlyRestClient.prototype.restRequest_ = function (pathString, queryStringParameters, callback) {\n var _this = this;\n if (queryStringParameters === void 0) {\n queryStringParameters = {};\n }\n queryStringParameters['format'] = 'export';\n this.authTokenProvider_.getToken( /*forceRefresh=*/false).then(function (authTokenData) {\n var authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n var url = (_this.repoInfo_.secure ? 'https://' : 'http://') + _this.repoInfo_.host + pathString + '?' + querystring(queryStringParameters);\n _this.log_('Sending REST request for ' + url);\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (callback && xhr.readyState === 4) {\n _this.log_('REST Response for ' + url + ' received. status:', xhr.status, 'response:', xhr.responseText);\n var res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_2__utils_json__[\"a\" /* jsonEval */])(xhr.responseText);\n } catch (e) {\n Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__[\"B\" /* warn */])('Failed to parse JSON response for ' + url + ': ' + xhr.responseText);\n }\n callback(null, res);\n } else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__[\"B\" /* warn */])('Got unsuccessful REST response for ' + url + ' Status: ' + xhr.status);\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n xhr.open('GET', url, /*asynchronous=*/true);\n xhr.send();\n });\n };\n return ReadonlyRestClient;\n}(ServerActions);\n\n// CONCATENATED MODULE: ./src/database/core/Repo.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_json__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_obj__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__ = __webpack_require__(12);\nvar Repo__typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar INTERRUPT_REASON = 'repo_interrupt';\n/**\r\n * A connection to a single data repository.\r\n */\nvar Repo_Repo = function () {\n /**\r\n * @param {!RepoInfo} repoInfo_\r\n * @param {boolean} forceRestClient\r\n * @param {!FirebaseApp} app\r\n */\n function Repo(repoInfo_, forceRestClient, app) {\n var _this = this;\n this.repoInfo_ = repoInfo_;\n this.app = app;\n this.dataUpdateCount = 0;\n this.statsListener_ = null;\n this.eventQueue_ = new EventQueue();\n this.nextWriteId_ = 1;\n this.interceptServerDataCallback_ = null;\n // A list of data pieces and paths to be set when this client disconnects.\n this.onDisconnect_ = new SparseSnapshotTree_SparseSnapshotTree();\n /**\r\n * TODO: This should be @private but it's used by test_access.js and internal.js\r\n * @type {?PersistentConnection}\r\n */\n this.persistentConnection_ = null;\n /** @type {!AuthTokenProvider} */\n var authTokenProvider = new AuthTokenProvider(app);\n this.stats_ = __WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__[\"a\" /* StatsManager */].getCollection(repoInfo_);\n if (forceRestClient || Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"g\" /* beingCrawled */])()) {\n this.server_ = new ReadonlyRestClient_ReadonlyRestClient(this.repoInfo_, this.onDataUpdate_.bind(this), authTokenProvider);\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n } else {\n var authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if ((typeof authOverride === 'undefined' ? 'undefined' : Repo__typeof(authOverride)) !== 'object') {\n throw new Error('Only objects are supported for option databaseAuthVariableOverride');\n }\n try {\n Object(__WEBPACK_IMPORTED_MODULE_6__utils_json__[\"b\" /* stringify */])(authOverride);\n } catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n this.persistentConnection_ = new PersistentConnection_PersistentConnection(this.repoInfo_, this.onDataUpdate_.bind(this), this.onConnectStatus_.bind(this), this.onServerInfoUpdate_.bind(this), authTokenProvider, authOverride);\n this.server_ = this.persistentConnection_;\n }\n authTokenProvider.addTokenChangeListener(function (token) {\n _this.server_.refreshAuthToken(token);\n });\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = __WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__[\"a\" /* StatsManager */].getOrCreateReporter(repoInfo_, function () {\n return new StatsReporter_StatsReporter(_this.stats_, _this.server_);\n });\n this.transactions_init_();\n // Used for .info.\n this.infoData_ = new SnapshotHolder_SnapshotHolder();\n this.infoSyncTree_ = new SyncTree_SyncTree({\n startListening: function startListening(query, tag, currentHashFn, onComplete) {\n var infoEvents = [];\n var node = _this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = _this.infoSyncTree_.applyServerOverwrite(query.path, node);\n setTimeout(function () {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: function stopListening() {}\n });\n this.updateInfo_('connected', false);\n this.serverSyncTree_ = new SyncTree_SyncTree({\n startListening: function startListening(query, tag, currentHashFn, onComplete) {\n _this.server_.listen(query, currentHashFn, tag, function (status, data) {\n var events = onComplete(status, data);\n _this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: function stopListening(query, tag) {\n _this.server_.unlisten(query, tag);\n }\n });\n }\n /**\r\n * @return {string} The URL corresponding to the root of this Firebase.\r\n */\n Repo.prototype.toString = function () {\n return (this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host;\n };\n /**\r\n * @return {!string} The namespace represented by the repo.\r\n */\n Repo.prototype.name = function () {\n return this.repoInfo_.namespace;\n };\n /**\r\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\r\n */\n Repo.prototype.serverTime = function () {\n var offsetNode = this.infoData_.getNode(new Path('.info/serverTimeOffset'));\n var offset = offsetNode.val() || 0;\n return new Date().getTime() + offset;\n };\n /**\r\n * Generate ServerValues using some variables from the repo object.\r\n * @return {!Object}\r\n */\n Repo.prototype.generateServerValues = function () {\n return generateWithValues({\n timestamp: this.serverTime()\n });\n };\n /**\r\n * Called by realtime when we get new messages from the server.\r\n *\r\n * @private\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {boolean} isMerge\r\n * @param {?number} tag\r\n */\n Repo.prototype.onDataUpdate_ = function (pathString, data, isMerge, tag) {\n // For testing.\n this.dataUpdateCount++;\n var path = new Path(pathString);\n data = this.interceptServerDataCallback_ ? this.interceptServerDataCallback_(pathString, data) : data;\n var events = [];\n if (tag) {\n if (isMerge) {\n var taggedChildren = Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"k\" /* map */])(data, function (raw) {\n return nodeFromJSON_nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyTaggedQueryMerge(path, taggedChildren, tag);\n } else {\n var taggedSnap = nodeFromJSON_nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(path, taggedSnap, tag);\n }\n } else if (isMerge) {\n var changedChildren = Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"k\" /* map */])(data, function (raw) {\n return nodeFromJSON_nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n } else {\n var snap = nodeFromJSON_nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n var affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n };\n /**\r\n * TODO: This should be @private but it's used by test_access.js and internal.js\r\n * @param {?function(!string, *):*} callback\r\n * @private\r\n */\n Repo.prototype.interceptServerData_ = function (callback) {\n this.interceptServerDataCallback_ = callback;\n };\n /**\r\n * @param {!boolean} connectStatus\r\n * @private\r\n */\n Repo.prototype.onConnectStatus_ = function (connectStatus) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n };\n /**\r\n * @param {!Object} updates\r\n * @private\r\n */\n Repo.prototype.onServerInfoUpdate_ = function (updates) {\n var _this = this;\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"i\" /* each */])(updates, function (value, key) {\n _this.updateInfo_(key, value);\n });\n };\n /**\r\n *\r\n * @param {!string} pathString\r\n * @param {*} value\r\n * @private\r\n */\n Repo.prototype.updateInfo_ = function (pathString, value) {\n var path = new Path('/.info/' + pathString);\n var newNode = nodeFromJSON_nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n var events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n };\n /**\r\n * @return {!number}\r\n * @private\r\n */\n Repo.prototype.getNextWriteId_ = function () {\n return this.nextWriteId_++;\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} newVal\r\n * @param {number|string|null} newPriority\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.setWithPriority = function (path, newVal, newPriority, onComplete) {\n var _this = this;\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_nodeFromJSON(newVal, newPriority);\n var newNode = ServerValues_resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n var writeId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, writeId, true);\n this.eventQueue_.queueEvents(events);\n this.server_.put(path.toString(), newNodeUnresolved.val( /*export=*/true), function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"B\" /* warn */])('set at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId, !success);\n _this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n var affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n };\n /**\r\n * @param {!Path} path\r\n * @param {!Object} childrenToMerge\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.update = function (path, childrenToMerge, onComplete) {\n var _this = this;\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n // Start with our existing data and merge each child into it.\n var empty = true;\n var serverValues = this.generateServerValues();\n var changedChildren = {};\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(childrenToMerge, function (changedKey, changedValue) {\n empty = false;\n var newNodeUnresolved = nodeFromJSON_nodeFromJSON(changedValue);\n changedChildren[changedKey] = ServerValues_resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n });\n if (!empty) {\n var writeId_1 = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserMerge(path, changedChildren, writeId_1);\n this.eventQueue_.queueEvents(events);\n this.server_.merge(path.toString(), childrenToMerge, function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"B\" /* warn */])('update at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId_1, !success);\n var affectedPath = clearEvents.length > 0 ? _this.rerunTransactions_(path) : path;\n _this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(childrenToMerge, function (changedPath) {\n var affectedPath = _this.abortTransactions_(path.child(changedPath));\n _this.rerunTransactions_(affectedPath);\n });\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n } else {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"s\" /* log */])(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n };\n /**\r\n * Applies all of the changes stored up in the onDisconnect_ tree.\r\n * @private\r\n */\n Repo.prototype.runOnDisconnectEvents_ = function () {\n var _this = this;\n this.log_('onDisconnectEvents');\n var serverValues = this.generateServerValues();\n var resolvedOnDisconnectTree = ServerValues_resolveDeferredValueTree(this.onDisconnect_, serverValues);\n var events = [];\n resolvedOnDisconnectTree.forEachTree(Path.Empty, function (path, snap) {\n events = events.concat(_this.serverSyncTree_.applyServerOverwrite(path, snap));\n var affectedPath = _this.abortTransactions_(path);\n _this.rerunTransactions_(affectedPath);\n });\n this.onDisconnect_ = new SparseSnapshotTree_SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path.Empty, events);\n };\n /**\r\n * @param {!Path} path\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectCancel = function (path, onComplete) {\n var _this = this;\n this.server_.onDisconnectCancel(path.toString(), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.forget(path);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} value\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectSet = function (path, value, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_nodeFromJSON(value);\n this.server_.onDisconnectPut(path.toString(), newNode.val( /*export=*/true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} value\r\n * @param {*} priority\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectSetWithPriority = function (path, value, priority, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(path.toString(), newNode.val( /*export=*/true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} childrenToMerge\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectUpdate = function (path, childrenToMerge, onComplete) {\n var _this = this;\n if (Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"j\" /* isEmpty */])(childrenToMerge)) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"s\" /* log */])(\"onDisconnect().update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n this.server_.onDisconnectMerge(path.toString(), childrenToMerge, function (status, errorReason) {\n if (status === 'ok') {\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(childrenToMerge, function (childName, childNode) {\n var newChildNode = nodeFromJSON_nodeFromJSON(childNode);\n _this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Query} query\r\n * @param {!EventRegistration} eventRegistration\r\n */\n Repo.prototype.addEventCallbackForQuery = function (query, eventRegistration) {\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(query, eventRegistration);\n } else {\n events = this.serverSyncTree_.addEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n /**\r\n * @param {!Query} query\r\n * @param {?EventRegistration} eventRegistration\r\n */\n Repo.prototype.removeEventCallbackForQuery = function (query, eventRegistration) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(query, eventRegistration);\n } else {\n events = this.serverSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n Repo.prototype.interrupt = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n };\n Repo.prototype.resume = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n };\n Repo.prototype.stats = function (showDelta) {\n if (showDelta === void 0) {\n showDelta = false;\n }\n if (typeof console === 'undefined') return;\n var stats;\n if (showDelta) {\n if (!this.statsListener_) this.statsListener_ = new StatsListener(this.stats_);\n stats = this.statsListener_.get();\n } else {\n stats = this.stats_.get();\n }\n var longestName = Object.keys(stats).reduce(function (previousValue, currentValue) {\n return Math.max(currentValue.length, previousValue);\n }, 0);\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(stats, function (stat, value) {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (var i = stat.length; i < longestName + 2; i++) {\n stat += ' ';\n }console.log(stat + value);\n });\n };\n Repo.prototype.statsIncrementCounter = function (metric) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n };\n /**\r\n * @param {...*} var_args\r\n * @private\r\n */\n Repo.prototype.log_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n __WEBPACK_IMPORTED_MODULE_7__util_util__[\"s\" /* log */].apply(void 0, [prefix].concat(var_args));\n };\n /**\r\n * @param {?function(?Error, *=)} callback\r\n * @param {!string} status\r\n * @param {?string=} errorReason\r\n */\n Repo.prototype.callOnCompleteCallback = function (callback, status, errorReason) {\n if (callback) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"m\" /* exceptionGuard */])(function () {\n if (status == 'ok') {\n callback(null);\n } else {\n var code = (status || 'error').toUpperCase();\n var message = code;\n if (errorReason) message += ': ' + errorReason;\n var error = new Error(message);\n error.code = code;\n callback(error);\n }\n });\n }\n };\n Object.defineProperty(Repo.prototype, \"database\", {\n get: function get() {\n return this.__database || (this.__database = new Database_Database(this));\n },\n enumerable: true,\n configurable: true\n });\n return Repo;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/view/filter/RangedFilter.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n/**\r\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\r\n *\r\n * @constructor\r\n * @implements {NodeFilter}\r\n */\nvar RangedFilter_RangedFilter = function () {\n /**\r\n * @param {!QueryParams} params\r\n */\n function RangedFilter(params) {\n this.indexedFilter_ = new IndexedFilter_IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n /**\r\n * @return {!NamedNode}\r\n */\n RangedFilter.prototype.getStartPost = function () {\n return this.startPost_;\n };\n /**\r\n * @return {!NamedNode}\r\n */\n RangedFilter.prototype.getEndPost = function () {\n return this.endPost_;\n };\n /**\r\n * @param {!NamedNode} node\r\n * @return {boolean}\r\n */\n RangedFilter.prototype.matches = function (node) {\n return this.index_.compare(this.getStartPost(), node) <= 0 && this.index_.compare(node, this.getEndPost()) <= 0;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode_ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode_ChildrenNode.EMPTY_NODE;\n }\n var filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_ChildrenNode.EMPTY_NODE);\n var self = this;\n newSnap.forEachChild(PRIORITY_INDEX, function (key, childNode) {\n if (!self.matches(new NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode_ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.getIndexedFilter = function () {\n return this.indexedFilter_;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\r\n * @param {!QueryParams} params\r\n * @return {!NamedNode}\r\n * @private\r\n */\n RangedFilter.getStartPost_ = function (params) {\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n } else {\n return params.getIndex().minPost();\n }\n };\n /**\r\n * @param {!QueryParams} params\r\n * @return {!NamedNode}\r\n * @private\r\n */\n RangedFilter.getEndPost_ = function (params) {\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n } else {\n return params.getIndex().maxPost();\n }\n };\n return RangedFilter;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/view/filter/LimitedFilter.ts\n/* harmony import */ var LimitedFilter___WEBPACK_IMPORTED_MODULE_3__utils_assert__ = __webpack_require__(0);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n/**\r\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\r\n *\r\n * @constructor\r\n * @implements {NodeFilter}\r\n */\nvar LimitedFilter_LimitedFilter = function () {\n /**\r\n * @param {!QueryParams} params\r\n */\n function LimitedFilter(params) {\n this.rangedFilter_ = new RangedFilter_RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.rangedFilter_.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode_ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n } else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_.getIndexedFilter().updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n } else {\n return this.fullLimitUpdateChild_(snap, key, newChild, source, optChangeAccumulator);\n }\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n var filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode_ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n } else {\n if (this.limit_ * 2 < newSnap.numChildren() && newSnap.isIndexed(this.index_)) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode_ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n var iterator = void 0;\n if (this.reverse_) {\n iterator = newSnap.getReverseIteratorFrom(this.rangedFilter_.getEndPost(), this.index_);\n } else {\n iterator = newSnap.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_);\n }\n var count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n var next = iterator.getNext();\n var inRange = void 0;\n if (this.reverse_) {\n inRange = this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n } else {\n inRange = this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n } else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n } else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_ChildrenNode.EMPTY_NODE);\n var startPost = void 0;\n var endPost = void 0;\n var cmp = void 0;\n var iterator = void 0;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n var indexCompare_1 = this.index_.getCompare();\n cmp = function cmp(a, b) {\n return indexCompare_1(b, a);\n };\n } else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n var count = 0;\n var foundStartPost = false;\n while (iterator.hasNext()) {\n var next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n var inRange = foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n } else {\n filtered = filtered.updateImmediateChild(next.name, ChildrenNode_ChildrenNode.EMPTY_NODE);\n }\n }\n }\n }\n return this.rangedFilter_.getIndexedFilter().updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.getIndexedFilter = function () {\n return this.rangedFilter_.getIndexedFilter();\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\r\n * @param {!Node} snap\r\n * @param {string} childKey\r\n * @param {!Node} childSnap\r\n * @param {!CompleteChildSource} source\r\n * @param {?ChildChangeAccumulator} changeAccumulator\r\n * @return {!Node}\r\n * @private\r\n */\n LimitedFilter.prototype.fullLimitUpdateChild_ = function (snap, childKey, childSnap, source, changeAccumulator) {\n // TODO: rename all cache stuff etc to general snap terminology\n var cmp;\n if (this.reverse_) {\n var indexCmp_1 = this.index_.getCompare();\n cmp = function cmp(a, b) {\n return indexCmp_1(b, a);\n };\n } else {\n cmp = this.index_.getCompare();\n }\n var oldEventCache = snap;\n Object(LimitedFilter___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(oldEventCache.numChildren() == this.limit_, '');\n var newChildNamedNode = new NamedNode(childKey, childSnap);\n var windowBoundary = this.reverse_ ? oldEventCache.getFirstChild(this.index_) : oldEventCache.getLastChild(this.index_);\n var inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n var oldChildSnap = oldEventCache.getImmediateChild(childKey);\n var nextChild = source.getChildAfterChild(this.index_, windowBoundary, this.reverse_);\n while (nextChild != null && (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(this.index_, nextChild, this.reverse_);\n }\n var compareNext = nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n var remainsInWindow = inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childChangedChange(childKey, childSnap, oldChildSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n } else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childRemovedChange(childKey, oldChildSnap));\n }\n var newEventCache = oldEventCache.updateImmediateChild(childKey, ChildrenNode_ChildrenNode.EMPTY_NODE);\n var nextChildInRange = nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childAddedChange(nextChild.name, nextChild.node));\n }\n return newEventCache.updateImmediateChild(nextChild.name, nextChild.node);\n } else {\n return newEventCache;\n }\n }\n } else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n } else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childRemovedChange(windowBoundary.name, windowBoundary.node));\n changeAccumulator.trackChildChange(Change.childAddedChange(childKey, childSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap).updateImmediateChild(windowBoundary.name, ChildrenNode_ChildrenNode.EMPTY_NODE);\n } else {\n return snap;\n }\n } else {\n return snap;\n }\n };\n return LimitedFilter;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/view/QueryParams.ts\n/* harmony import */ var QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_json__ = __webpack_require__(3);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\n\n/**\r\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\r\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\r\n * user-facing API level, so it is not done here.\r\n * @constructor\r\n */\nvar QueryParams_QueryParams = function () {\n function QueryParams() {\n this.limitSet_ = false;\n this.startSet_ = false;\n this.startNameSet_ = false;\n this.endSet_ = false;\n this.endNameSet_ = false;\n this.limit_ = 0;\n this.viewFrom_ = '';\n this.indexStartValue_ = null;\n this.indexStartName_ = '';\n this.indexEndValue_ = null;\n this.indexEndName_ = '';\n this.index_ = PRIORITY_INDEX;\n }\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.hasStart = function () {\n return this.startSet_;\n };\n /**\r\n * @return {boolean} True if it would return from left.\r\n */\n QueryParams.prototype.isViewFromLeft = function () {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n } else {\n return this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n }\n };\n /**\r\n * Only valid to call if hasStart() returns true\r\n * @return {*}\r\n */\n QueryParams.prototype.getIndexStartValue = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n };\n /**\r\n * Only valid to call if hasStart() returns true.\r\n * Returns the starting key name for the range defined by these query parameters\r\n * @return {!string}\r\n */\n QueryParams.prototype.getIndexStartName = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n } else {\n return QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__[\"c\" /* MIN_NAME */];\n }\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.hasEnd = function () {\n return this.endSet_;\n };\n /**\r\n * Only valid to call if hasEnd() returns true.\r\n * @return {*}\r\n */\n QueryParams.prototype.getIndexEndValue = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n };\n /**\r\n * Only valid to call if hasEnd() returns true.\r\n * Returns the end key name for the range defined by these query parameters\r\n * @return {!string}\r\n */\n QueryParams.prototype.getIndexEndName = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n } else {\n return QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__[\"b\" /* MAX_NAME */];\n }\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.hasLimit = function () {\n return this.limitSet_;\n };\n /**\r\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\r\n */\n QueryParams.prototype.hasAnchoredLimit = function () {\n return this.limitSet_ && this.viewFrom_ !== '';\n };\n /**\r\n * Only valid to call if hasLimit() returns true\r\n * @return {!number}\r\n */\n QueryParams.prototype.getLimit = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n };\n /**\r\n * @return {!Index}\r\n */\n QueryParams.prototype.getIndex = function () {\n return this.index_;\n };\n /**\r\n * @return {!QueryParams}\r\n * @private\r\n */\n QueryParams.prototype.copy_ = function () {\n var copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n };\n /**\r\n * @param {!number} newLimit\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.limit = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n };\n /**\r\n * @param {!number} newLimit\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.limitToFirst = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n };\n /**\r\n * @param {!number} newLimit\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.limitToLast = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n };\n /**\r\n * @param {*} indexValue\r\n * @param {?string=} key\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.startAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n } else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n };\n /**\r\n * @param {*} indexValue\r\n * @param {?string=} key\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.endAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n } else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n };\n /**\r\n * @param {!Index} index\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.orderBy = function (index) {\n var newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n };\n /**\r\n * @return {!Object}\r\n */\n QueryParams.prototype.getQueryObject = function () {\n var WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n var obj = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n var viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n } else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.loadsAllData = function () {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.isDefault = function () {\n return this.loadsAllData() && this.index_ == PRIORITY_INDEX;\n };\n /**\r\n * @return {!NodeFilter}\r\n */\n QueryParams.prototype.getNodeFilter = function () {\n if (this.loadsAllData()) {\n return new IndexedFilter_IndexedFilter(this.getIndex());\n } else if (this.hasLimit()) {\n return new LimitedFilter_LimitedFilter(this);\n } else {\n return new RangedFilter_RangedFilter(this);\n }\n };\n /**\r\n * Returns a set of REST query string parameters representing this query.\r\n *\r\n * @return {!Object.} query string parameters\r\n */\n QueryParams.prototype.toRestQueryStringParameters = function () {\n var REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n var qs = {};\n if (this.isDefault()) {\n return qs;\n }\n var orderBy;\n if (this.index_ === PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n } else if (this.index_ === VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n } else if (this.index_ === KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n } else {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.index_ instanceof PathIndex_PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(orderBy);\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexStartName_);\n }\n }\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexEndName_);\n }\n }\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n } else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n return qs;\n };\n /**\r\n * Wire Protocol Constants\r\n * @const\r\n * @enum {string}\r\n * @private\r\n */\n QueryParams.WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n /**\r\n * REST Query Constants\r\n * @const\r\n * @enum {string}\r\n * @private\r\n */\n QueryParams.REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n /**\r\n * Default, empty query parameters\r\n * @type {!QueryParams}\r\n * @const\r\n */\n QueryParams.DEFAULT = new QueryParams();\n return QueryParams;\n}();\n\n// CONCATENATED MODULE: ./src/database/api/Reference.ts\n/* harmony import */ var Reference___WEBPACK_IMPORTED_MODULE_2__core_util_util__ = __webpack_require__(1);\n/* harmony import */ var Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__ = __webpack_require__(4);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar Reference___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\n\n\n\n\n\n\nvar Reference_Reference = function (_super) {\n Reference___extends(Reference, _super);\n /**\r\n * Call options:\r\n * new Reference(Repo, Path) or\r\n * new Reference(url: string, string|RepoManager)\r\n *\r\n * Externally - this is the firebase.database.Reference type.\r\n *\r\n * @param {!Repo} repo\r\n * @param {(!Path)} path\r\n * @extends {Query}\r\n */\n function Reference(repo, path) {\n var _this = this;\n if (!(repo instanceof Repo_Repo)) {\n throw new Error('new Reference() no longer supported - use app.database().');\n }\n // call Query's constructor, passing in the repo and path.\n _this = _super.call(this, repo, path, QueryParams_QueryParams.DEFAULT, false) || this;\n return _this;\n }\n /** @return {?string} */\n Reference.prototype.getKey = function () {\n validateArgCount('Reference.key', 0, 0, arguments.length);\n if (this.path.isEmpty()) return null;else return this.path.getBack();\n };\n /**\r\n * @param {!(string|Path)} pathString\r\n * @return {!Reference}\r\n */\n Reference.prototype.child = function (pathString) {\n validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n } else if (!(pathString instanceof Path)) {\n if (this.path.getFront() === null) validateRootPathString('Reference.child', 1, pathString, false);else validation_validatePathString('Reference.child', 1, pathString, false);\n }\n return new Reference(this.repo, this.path.child(pathString));\n };\n /** @return {?Reference} */\n Reference.prototype.getParent = function () {\n validateArgCount('Reference.parent', 0, 0, arguments.length);\n var parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n };\n /** @return {!Reference} */\n Reference.prototype.getRoot = function () {\n validateArgCount('Reference.root', 0, 0, arguments.length);\n var ref = this;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n };\n /** @return {!Database} */\n Reference.prototype.databaseProp = function () {\n return this.repo.database;\n };\n /**\r\n * @param {*} newVal\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.set = function (newVal, onComplete) {\n validateArgCount('Reference.set', 1, 2, arguments.length);\n validateWritablePath('Reference.set', this.path);\n validation_validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n validateCallback('Reference.set', 2, onComplete, true);\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.setWithPriority(this.path, newVal,\n /*priority=*/null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {!Object} objectToMerge\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.update = function (objectToMerge, onComplete) {\n validateArgCount('Reference.update', 1, 2, arguments.length);\n validateWritablePath('Reference.update', this.path);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n Object(Reference___WEBPACK_IMPORTED_MODULE_2__core_util_util__[\"B\" /* warn */])('Passing an Array to Firebase.update() is deprecated. ' + 'Use set() if you want to overwrite the existing data, or ' + 'an Object with integer keys if you really do want to ' + 'only update some of the children.');\n }\n validation_validateFirebaseMergeDataArg('Reference.update', 1, objectToMerge, this.path, false);\n validateCallback('Reference.update', 2, onComplete, true);\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.update(this.path, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {*} newVal\r\n * @param {string|number|null} newPriority\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.setWithPriority = function (newVal, newPriority, onComplete) {\n validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validateWritablePath('Reference.setWithPriority', this.path);\n validation_validateFirebaseDataArg('Reference.setWithPriority', 1, newVal, this.path, false);\n validation_validatePriority('Reference.setWithPriority', 2, newPriority, false);\n validateCallback('Reference.setWithPriority', 3, onComplete, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys') throw 'Reference.setWithPriority failed: ' + this.getKey() + ' is a read-only object.';\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.setWithPriority(this.path, newVal, newPriority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.remove = function (onComplete) {\n validateArgCount('Reference.remove', 0, 1, arguments.length);\n validateWritablePath('Reference.remove', this.path);\n validateCallback('Reference.remove', 1, onComplete, true);\n return this.set(null, onComplete);\n };\n /**\r\n * @param {function(*):*} transactionUpdate\r\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\r\n * @param {boolean=} applyLocally\r\n * @return {!Promise}\r\n */\n Reference.prototype.transaction = function (transactionUpdate, onComplete, applyLocally) {\n validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validateWritablePath('Reference.transaction', this.path);\n validateCallback('Reference.transaction', 1, transactionUpdate, false);\n validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validation_validateBoolean('Reference.transaction', 3, applyLocally, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys') throw 'Reference.transaction failed: ' + this.getKey() + ' is a read-only object.';\n if (applyLocally === undefined) applyLocally = true;\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n if (typeof onComplete === 'function') {\n Object(Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"c\" /* attachDummyErrorHandler */])(deferred.promise);\n }\n var promiseComplete = function promiseComplete(error, committed, snapshot) {\n if (error) {\n deferred.reject(error);\n } else {\n deferred.resolve(new TransactionResult_TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(this.path, transactionUpdate, promiseComplete, applyLocally);\n return deferred.promise;\n };\n /**\r\n * @param {string|number|null} priority\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.setPriority = function (priority, onComplete) {\n validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validateWritablePath('Reference.setPriority', this.path);\n validation_validatePriority('Reference.setPriority', 1, priority, false);\n validateCallback('Reference.setPriority', 2, onComplete, true);\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.setWithPriority(this.path.child('.priority'), priority, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {*=} value\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Reference}\r\n */\n Reference.prototype.push = function (value, onComplete) {\n validateArgCount('Reference.push', 0, 2, arguments.length);\n validateWritablePath('Reference.push', this.path);\n validation_validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n validateCallback('Reference.push', 2, onComplete, true);\n var now = this.repo.serverTime();\n var name = nextPushId(now);\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n var thennablePushRef = this.child(name);\n var pushRef = this.child(name);\n var promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(function () {\n return pushRef;\n });\n } else {\n promise = Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"b\" /* PromiseImpl */].resolve(pushRef);\n }\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n if (typeof onComplete === 'function') {\n Object(Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"c\" /* attachDummyErrorHandler */])(promise);\n }\n return thennablePushRef;\n };\n /**\r\n * @return {!OnDisconnect}\r\n */\n Reference.prototype.onDisconnect = function () {\n validateWritablePath('Reference.onDisconnect', this.path);\n return new onDisconnect_OnDisconnect(this.repo, this.path);\n };\n Object.defineProperty(Reference.prototype, \"database\", {\n get: function get() {\n return this.databaseProp();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"key\", {\n get: function get() {\n return this.getKey();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"parent\", {\n get: function get() {\n return this.getParent();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n get: function get() {\n return this.getRoot();\n },\n enumerable: true,\n configurable: true\n });\n return Reference;\n}(Query_Query);\n\n/**\r\n * Define reference constructor in various modules\r\n *\r\n * We are doing this here to avoid several circular\r\n * dependency issues\r\n */\nQuery_Query.__referenceConstructor = Reference_Reference;\nSyncPoint_SyncPoint.__referenceConstructor = Reference_Reference;\n// CONCATENATED MODULE: ./src/database/core/util/Tree.ts\n/* harmony import */ var Tree___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__ = __webpack_require__(2);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n/**\r\n * Node in a Tree.\r\n */\nvar TreeNode = function () {\n function TreeNode() {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n this.children = {};\n this.childCount = 0;\n this.value = null;\n }\n return TreeNode;\n}();\n\n/**\r\n * A light-weight tree, traversable by path. Nodes can have both values and children.\r\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\r\n * children.\r\n */\nvar Tree_Tree = function () {\n /**\r\n * @template T\r\n * @param {string=} name_ Optional name of the node.\r\n * @param {Tree=} parent_ Optional parent node.\r\n * @param {TreeNode=} node_ Optional node to wrap.\r\n */\n function Tree(name_, parent_, node_) {\n if (name_ === void 0) {\n name_ = '';\n }\n if (parent_ === void 0) {\n parent_ = null;\n }\n if (node_ === void 0) {\n node_ = new TreeNode();\n }\n this.name_ = name_;\n this.parent_ = parent_;\n this.node_ = node_;\n }\n /**\r\n * Returns a sub-Tree for the given path.\r\n *\r\n * @param {!(string|Path)} pathObj Path to look up.\r\n * @return {!Tree.} Tree for path.\r\n */\n Tree.prototype.subTree = function (pathObj) {\n // TODO: Require pathObj to be Path?\n var path = pathObj instanceof Path ? pathObj : new Path(pathObj);\n var child = this,\n next;\n while ((next = path.getFront()) !== null) {\n var childNode = Object(Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__[\"l\" /* safeGet */])(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n return child;\n };\n /**\r\n * Returns the data associated with this tree node.\r\n *\r\n * @return {?T} The data or null if no data exists.\r\n */\n Tree.prototype.getValue = function () {\n return this.node_.value;\n };\n /**\r\n * Sets data to this tree node.\r\n *\r\n * @param {!T} value Value to set.\r\n */\n Tree.prototype.setValue = function (value) {\n Object(Tree___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n };\n /**\r\n * Clears the contents of the tree node (its value and all children).\r\n */\n Tree.prototype.clear = function () {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n };\n /**\r\n * @return {boolean} Whether the tree has any children.\r\n */\n Tree.prototype.hasChildren = function () {\n return this.node_.childCount > 0;\n };\n /**\r\n * @return {boolean} Whether the tree is empty (no value or children).\r\n */\n Tree.prototype.isEmpty = function () {\n return this.getValue() === null && !this.hasChildren();\n };\n /**\r\n * Calls action for each child of this tree node.\r\n *\r\n * @param {function(!Tree.)} action Action to be called for each child.\r\n */\n Tree.prototype.forEachChild = function (action) {\n var _this = this;\n Object(Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__[\"f\" /* forEach */])(this.node_.children, function (child, childTree) {\n action(new Tree(child, _this, childTree));\n });\n };\n /**\r\n * Does a depth-first traversal of this node's descendants, calling action for each one.\r\n *\r\n * @param {function(!Tree.)} action Action to be called for each child.\r\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\r\n * false.\r\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\r\n * parent.\r\n */\n Tree.prototype.forEachDescendant = function (action, includeSelf, childrenFirst) {\n if (includeSelf && !childrenFirst) action(this);\n this.forEachChild(function (child) {\n child.forEachDescendant(action, /*includeSelf=*/true, childrenFirst);\n });\n if (includeSelf && childrenFirst) action(this);\n };\n /**\r\n * Calls action on each ancestor node.\r\n *\r\n * @param {function(!Tree.)} action Action to be called on each parent; return\r\n * true to abort.\r\n * @param {boolean=} includeSelf Whether to call action on this node as well.\r\n * @return {boolean} true if the action callback returned true.\r\n */\n Tree.prototype.forEachAncestor = function (action, includeSelf) {\n var node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n };\n /**\r\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\r\n * is found, action is called on it and traversal does not continue inside the node.\r\n * Action is *not* called on this node.\r\n *\r\n * @param {function(!Tree.)} action Action to be called for each child.\r\n */\n Tree.prototype.forEachImmediateDescendantWithValue = function (action) {\n this.forEachChild(function (child) {\n if (child.getValue() !== null) action(child);else child.forEachImmediateDescendantWithValue(action);\n });\n };\n /**\r\n * @return {!Path} The path of this tree node, as a Path.\r\n */\n Tree.prototype.path = function () {\n return new Path(this.parent_ === null ? this.name_ : this.parent_.path() + '/' + this.name_);\n };\n /**\r\n * @return {string} The name of the tree node.\r\n */\n Tree.prototype.name = function () {\n return this.name_;\n };\n /**\r\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\r\n */\n Tree.prototype.parent = function () {\n return this.parent_;\n };\n /**\r\n * Adds or removes this child from its parent based on whether it's empty or not.\r\n *\r\n * @private\r\n */\n Tree.prototype.updateParents_ = function () {\n if (this.parent_ !== null) this.parent_.updateChild_(this.name_, this);\n };\n /**\r\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\r\n *\r\n * @param {string} childName The name of the child to update.\r\n * @param {!Tree.} child The child to update.\r\n * @private\r\n */\n Tree.prototype.updateChild_ = function (childName, child) {\n var childEmpty = child.isEmpty();\n var childExists = Object(Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__[\"b\" /* contains */])(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n } else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n };\n return Tree;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/Repo_transaction.ts\n/* harmony import */ var Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_obj__ = __webpack_require__(2);\nvar Repo_transaction__typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n/**\r\n * @enum {number}\r\n */\nvar TransactionStatus;\n(function (TransactionStatus) {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n TransactionStatus[TransactionStatus[\"RUN\"] = 0] = \"RUN\";\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n TransactionStatus[TransactionStatus[\"SENT\"] = 1] = \"SENT\";\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n TransactionStatus[TransactionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n TransactionStatus[TransactionStatus[\"SENT_NEEDS_ABORT\"] = 3] = \"SENT_NEEDS_ABORT\";\n // Temporary state used to mark transactions that need to be aborted.\n TransactionStatus[TransactionStatus[\"NEEDS_ABORT\"] = 4] = \"NEEDS_ABORT\";\n})(TransactionStatus || (TransactionStatus = {}));\n/**\r\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\r\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\r\n * @type {number}\r\n * @const\r\n * @private\r\n */\nRepo_Repo.MAX_TRANSACTION_RETRIES_ = 25;\n/**\r\n * Setup the transaction data structures\r\n * @private\r\n */\nRepo_Repo.prototype.transactions_init_ = function () {\n /**\r\n * Stores queues of outstanding transactions for Firebase locations.\r\n *\r\n * @type {!Tree.>}\r\n * @private\r\n */\n this.transactionQueueTree_ = new Tree_Tree();\n};\n/**\r\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\r\n *\r\n * @param {!Path} path Path at which to do transaction.\r\n * @param {function(*):*} transactionUpdate Update callback.\r\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\r\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\r\n */\nRepo_Repo.prototype.startTransaction = function (path, transactionUpdate, onComplete, applyLocally) {\n this.log_('transaction on ' + path);\n // Add a watch to make sure we get server updates.\n var valueCallback = function valueCallback() {};\n var watchRef = new Reference_Reference(this, path);\n watchRef.on('value', valueCallback);\n var unwatcher = function unwatcher() {\n watchRef.off('value', valueCallback);\n };\n // Initialize transaction.\n var transaction = {\n path: path,\n update: transactionUpdate,\n onComplete: onComplete,\n // One of TransactionStatus enums.\n status: null,\n // Used when combining transactions at different locations to figure out which one goes first.\n order: Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"a\" /* LUIDGenerator */])(),\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n // Function to call to clean up our .on() listener.\n unwatcher: unwatcher,\n // Stores why a transaction was aborted.\n abortReason: null,\n currentWriteId: null,\n currentInputSnapshot: null,\n currentOutputSnapshotRaw: null,\n currentOutputSnapshotResolved: null\n };\n // Run transaction initially.\n var currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n var newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n var snapshot = new DataSnapshot_DataSnapshot(transaction.currentInputSnapshot, new Reference_Reference(this, transaction.path), PRIORITY_INDEX);\n transaction.onComplete(null, false, snapshot);\n }\n } else {\n validation_validateFirebaseData('transaction failed: Data returned ', newVal, transaction.path);\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n var queueNode = this.transactionQueueTree_.subTree(path);\n var nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n queueNode.setValue(nodeQueue);\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n var priorityForNode = void 0;\n if ((typeof newVal === 'undefined' ? 'undefined' : Repo_transaction__typeof(newVal)) === 'object' && newVal !== null && Object(__WEBPACK_IMPORTED_MODULE_9__utils_obj__[\"b\" /* contains */])(newVal, '.priority')) {\n priorityForNode = Object(__WEBPACK_IMPORTED_MODULE_9__utils_obj__[\"l\" /* safeGet */])(newVal, '.priority');\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(isValidPriority(priorityForNode), 'Invalid priority returned by transaction. ' + 'Priority must be a valid string, finite number, server value, or null.');\n } else {\n var currentNode = this.serverSyncTree_.calcCompleteEventCache(path) || ChildrenNode_ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_nodeFromJSON(newVal, priorityForNode);\n var newNode = ServerValues_resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, transaction.currentWriteId, transaction.applyLocally);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n this.sendReadyTransactions_();\n }\n};\n/**\r\n * @param {!Path} path\r\n * @param {Array.=} excludeSets A specific set to exclude\r\n * @return {Node}\r\n * @private\r\n */\nRepo_Repo.prototype.getLatestState_ = function (path, excludeSets) {\n return this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) || ChildrenNode_ChildrenNode.EMPTY_NODE;\n};\n/**\r\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\r\n * complete.\r\n *\r\n * Externally it's called with no arguments, but it calls itself recursively with a particular\r\n * transactionQueueTree node to recurse through the tree.\r\n *\r\n * @param {Tree.>=} node transactionQueueTree node to start at.\r\n * @private\r\n */\nRepo_Repo.prototype.sendReadyTransactions_ = function (node) {\n var _this = this;\n if (node === void 0) {\n node = this.transactionQueueTree_;\n }\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n if (node.getValue() !== null) {\n var queue = this.buildTransactionQueue_(node);\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(queue.length > 0, 'Sending zero length transaction queue');\n var allRun = queue.every(function (transaction) {\n return transaction.status === TransactionStatus.RUN;\n });\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n } else if (node.hasChildren()) {\n node.forEachChild(function (childNode) {\n _this.sendReadyTransactions_(childNode);\n });\n }\n};\n/**\r\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\r\n *\r\n * @param {!Path} path The location of the queue.\r\n * @param {!Array.} queue Queue of transactions under the specified location.\r\n * @private\r\n */\nRepo_Repo.prototype.sendTransactionQueue_ = function (path, queue) {\n var _this = this;\n // Mark transactions as sent and increment retry count!\n var setsToIgnore = queue.map(function (txn) {\n return txn.currentWriteId;\n });\n var latestState = this.getLatestState_(path, setsToIgnore);\n var snapToSend = latestState;\n var latestHash = latestState.hash();\n for (var i = 0; i < queue.length; i++) {\n var txn = queue[i];\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(txn.status === TransactionStatus.RUN, 'tryToSendTransactionQueue_: items in queue should all be run.');\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n var relativePath = Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(relativePath /**@type {!Node} */, txn.currentOutputSnapshotRaw);\n }\n var dataToSend = snapToSend.val(true);\n var pathToSend = path;\n // Send the put.\n this.server_.put(pathToSend.toString(), dataToSend, function (status) {\n _this.log_('transaction put response', {\n path: pathToSend.toString(),\n status: status\n });\n var events = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(_this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId));\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n var node = queue[i].currentOutputSnapshotResolved;\n var ref = new Reference_Reference(_this, queue[i].path);\n var snapshot = new DataSnapshot_DataSnapshot(node, ref, PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, true, snapshot));\n }\n queue[i].unwatcher();\n }\n // Now remove the completed transactions.\n _this.pruneCompletedTransactionsBelowNode_(_this.transactionQueueTree_.subTree(path));\n // There may be pending transactions that we can now send.\n _this.sendReadyTransactions_();\n _this.eventQueue_.raiseEventsForChangedPath(path, events);\n // Finally, trigger onComplete callbacks.\n for (var i = 0; i < callbacks.length; i++) {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"m\" /* exceptionGuard */])(callbacks[i]);\n }\n } else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) queue[i].status = TransactionStatus.NEEDS_ABORT;else queue[i].status = TransactionStatus.RUN;\n }\n } else {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"B\" /* warn */])('transaction at ' + pathToSend.toString() + ' failed: ' + status);\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n _this.rerunTransactions_(path);\n }\n }, latestHash);\n};\n/**\r\n * Finds all transactions dependent on the data at changedPath and reruns them.\r\n *\r\n * Should be called any time cached data changes.\r\n *\r\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\r\n * be raised for.\r\n *\r\n * @param {!Path} changedPath The path in mergedData that changed.\r\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\r\n * @private\r\n */\nRepo_Repo.prototype.rerunTransactions_ = function (changedPath) {\n var rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n var path = rootMostTransactionNode.path();\n var queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n return path;\n};\n/**\r\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\r\n *\r\n * @param {Array.} queue The queue of transactions to run.\r\n * @param {!Path} path The path the queue is for.\r\n * @private\r\n */\nRepo_Repo.prototype.rerunTransactionQueue_ = function (queue, path) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n var events = [];\n // Ignore all of the sets we're going to re-run.\n var txnsToRerun = queue.filter(function (q) {\n return q.status === TransactionStatus.RUN;\n });\n var setsToIgnore = txnsToRerun.map(function (q) {\n return q.currentWriteId;\n });\n for (var i = 0; i < queue.length; i++) {\n var transaction = queue[i];\n var relativePath = Path.relativePath(path, transaction.path);\n var abortTransaction = false,\n abortReason = void 0;\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(relativePath !== null, 'rerunTransactionsUnderNode_: relativePath should not be null.');\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n } else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= Repo_Repo.MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n } else {\n // This code reruns a transaction\n var currentNode = this.getLatestState_(transaction.path, setsToIgnore);\n transaction.currentInputSnapshot = currentNode;\n var newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validation_validateFirebaseData('transaction failed: Data returned ', newData, transaction.path);\n var newDataNode = nodeFromJSON_nodeFromJSON(newData);\n var hasExplicitPriority = (typeof newData === 'undefined' ? 'undefined' : Repo_transaction__typeof(newData)) === 'object' && newData != null && Object(__WEBPACK_IMPORTED_MODULE_9__utils_obj__[\"b\" /* contains */])(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n var oldWriteId = transaction.currentWriteId;\n var serverValues = this.generateServerValues();\n var newNodeResolved = ServerValues_resolveDeferredValueSnapshot(newDataNode, serverValues);\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(this.serverSyncTree_.applyUserOverwrite(transaction.path, newNodeResolved, transaction.currentWriteId, transaction.applyLocally));\n events = events.concat(this.serverSyncTree_.ackUserWrite(oldWriteId, true));\n } else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function (unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n var ref = new Reference_Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n var lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n var snapshot = new DataSnapshot_DataSnapshot(lastInput, ref, PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n } else {\n callbacks.push(queue[i].onComplete.bind(null, new Error(abortReason), false, null));\n }\n }\n }\n }\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n // Now fire callbacks, now that we're in a good, known state.\n for (var i = 0; i < callbacks.length; i++) {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"m\" /* exceptionGuard */])(callbacks[i]);\n }\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n/**\r\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\r\n * the node for the given path if there are no pending transactions on any ancestor.\r\n *\r\n * @param {!Path} path The location to start at.\r\n * @return {!Tree.>} The rootmost node with a transaction.\r\n * @private\r\n */\nRepo_Repo.prototype.getAncestorTransactionNode_ = function (path) {\n var front;\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n var transactionNode = this.transactionQueueTree_;\n while ((front = path.getFront()) !== null && transactionNode.getValue() === null) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n return transactionNode;\n};\n/**\r\n * Builds the queue of all transactions at or below the specified transactionNode.\r\n *\r\n * @param {!Tree.>} transactionNode\r\n * @return {Array.} The generated queue.\r\n * @private\r\n */\nRepo_Repo.prototype.buildTransactionQueue_ = function (transactionNode) {\n // Walk any child transaction queues and aggregate them into a single queue.\n var transactionQueue = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function (a, b) {\n return a.order - b.order;\n });\n return transactionQueue;\n};\n/**\r\n * @param {!Tree.>} node\r\n * @param {Array.} queue\r\n * @private\r\n */\nRepo_Repo.prototype.aggregateTransactionQueuesForNode_ = function (node, queue) {\n var _this = this;\n var nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (var i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n node.forEachChild(function (child) {\n _this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n/**\r\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\r\n *\r\n * @param {!Tree.>} node\r\n * @private\r\n */\nRepo_Repo.prototype.pruneCompletedTransactionsBelowNode_ = function (node) {\n var _this = this;\n var queue = node.getValue();\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n node.forEachChild(function (childNode) {\n _this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n/**\r\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\r\n * since we consider them incompatible with transactions.\r\n *\r\n * @param {!Path} path Path for which we want to abort related transactions.\r\n * @return {!Path}\r\n * @private\r\n */\nRepo_Repo.prototype.abortTransactions_ = function (path) {\n var _this = this;\n var affectedPath = this.getAncestorTransactionNode_(path).path();\n var transactionNode = this.transactionQueueTree_.subTree(path);\n transactionNode.forEachAncestor(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n this.abortTransactionsOnNode_(transactionNode);\n transactionNode.forEachDescendant(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n return affectedPath;\n};\n/**\r\n * Abort transactions stored in this transaction queue node.\r\n *\r\n * @param {!Tree.>} node Node to abort transactions for.\r\n * @private\r\n */\nRepo_Repo.prototype.abortTransactionsOnNode_ = function (node) {\n var queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n var events = [];\n var lastSent = -1;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n } else if (queue[i].status === TransactionStatus.SENT) {\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(lastSent === i - 1, 'All SENT items should be at beginning of queue.');\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n } else {\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(queue[i].status === TransactionStatus.RUN, 'Unexpected transaction status in abort');\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true));\n if (queue[i].onComplete) {\n var snapshot = null;\n callbacks.push(queue[i].onComplete.bind(null, new Error('set'), false, snapshot));\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n } else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (var i = 0; i < callbacks.length; i++) {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"m\" /* exceptionGuard */])(callbacks[i]);\n }\n }\n};\n// CONCATENATED MODULE: ./src/database/core/RepoManager.ts\n/* harmony import */ var RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__ = __webpack_require__(2);\n/* harmony import */ var RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__ = __webpack_require__(1);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n/** @const {string} */\nvar DATABASE_URL_OPTION = 'databaseURL';\nvar _staticInstance;\n/**\r\n * Creates and caches Repo instances.\r\n */\nvar RepoManager_RepoManager = function () {\n function RepoManager() {\n /**\r\n * @private {!Object.}\r\n */\n this.repos_ = {};\n /**\r\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\r\n * @private {boolean}\r\n */\n this.useRestClient_ = false;\n }\n RepoManager.getInstance = function () {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n };\n // TODO(koss): Remove these functions unless used in tests?\n RepoManager.prototype.interrupt = function () {\n for (var repo in this.repos_) {\n this.repos_[repo].interrupt();\n }\n };\n RepoManager.prototype.resume = function () {\n for (var repo in this.repos_) {\n this.repos_[repo].resume();\n }\n };\n /**\r\n * This function should only ever be called to CREATE a new database instance.\r\n *\r\n * @param {!FirebaseApp} app\r\n * @return {!Database}\r\n */\n RepoManager.prototype.databaseFromApp = function (app) {\n var dbUrl = app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])(\"Can't determine Firebase Database URL. Be sure to include \" + DATABASE_URL_OPTION + ' option when calling firebase.intializeApp().');\n }\n var parsedUrl = parser_parseRepoInfo(dbUrl);\n var repoInfo = parsedUrl.repoInfo;\n validation_validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])('Database URL must point to the root of a Firebase Database ' + '(not including a child path).');\n }\n var repo = this.createRepo(repoInfo, app);\n return repo.database;\n };\n /**\r\n * Remove the repo and make sure it is disconnected.\r\n *\r\n * @param {!Repo} repo\r\n */\n RepoManager.prototype.deleteRepo = function (repo) {\n // This should never happen...\n if (Object(RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__[\"l\" /* safeGet */])(this.repos_, repo.app.name) !== repo) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])('Database ' + repo.app.name + ' has already been deleted.');\n }\n repo.interrupt();\n delete this.repos_[repo.app.name];\n };\n /**\r\n * Ensures a repo doesn't already exist and then creates one using the\r\n * provided app.\r\n *\r\n * @param {!RepoInfo} repoInfo The metadata about the Repo\r\n * @param {!FirebaseApp} app\r\n * @return {!Repo} The Repo object for the specified server / repoName.\r\n */\n RepoManager.prototype.createRepo = function (repoInfo, app) {\n var repo = Object(RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__[\"l\" /* safeGet */])(this.repos_, app.name);\n if (repo) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])('FIREBASE INTERNAL ERROR: Database initialized multiple times.');\n }\n repo = new Repo_Repo(repoInfo, this.useRestClient_, app);\n this.repos_[app.name] = repo;\n return repo;\n };\n /**\r\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\r\n * @param {boolean} forceRestClient\r\n */\n RepoManager.prototype.forceRestClient = function (forceRestClient) {\n this.useRestClient_ = forceRestClient;\n };\n return RepoManager;\n}();\n\n// CONCATENATED MODULE: ./src/database/api/Database.ts\n/* harmony import */ var Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__ = __webpack_require__(1);\n/* harmony import */ var Database___WEBPACK_IMPORTED_MODULE_3__utils_promise__ = __webpack_require__(4);\n/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\n\n\n\n\n\n\n\n/**\r\n * Class representing a firebase database.\r\n * @implements {FirebaseService}\r\n */\nvar Database_Database = function () {\n /**\r\n * The constructor should not be called by users of our public API.\r\n * @param {!Repo} repo_\r\n */\n function Database(repo_) {\n this.repo_ = repo_;\n if (!(repo_ instanceof Repo_Repo)) {\n Object(Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"o\" /* fatal */])(\"Don't call new Database() directly - please use firebase.database().\");\n }\n /** @type {Reference} */\n this.root_ = new Reference_Reference(repo_, Path.Empty);\n this.INTERNAL = new Database_DatabaseInternals(this);\n }\n Object.defineProperty(Database.prototype, \"app\", {\n get: function get() {\n return this.repo_.app;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a reference to the root or the path specified in opt_pathString.\r\n * @param {string=} pathString\r\n * @return {!Reference} Firebase reference.\r\n */\n Database.prototype.ref = function (pathString) {\n this.checkDeleted_('ref');\n validateArgCount('database.ref', 0, 1, arguments.length);\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n };\n /**\r\n * Returns a reference to the root or the path specified in url.\r\n * We throw a exception if the url is not in the same domain as the\r\n * current repo.\r\n * @param {string} url\r\n * @return {!Reference} Firebase reference.\r\n */\n Database.prototype.refFromURL = function (url) {\n /** @const {string} */\n var apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n validateArgCount(apiName, 1, 1, arguments.length);\n var parsedURL = parser_parseRepoInfo(url);\n validation_validateUrl(apiName, 1, parsedURL);\n var repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== this.repo_.repoInfo_.host) {\n Object(Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"o\" /* fatal */])(apiName + ': Host name does not match the current database: ' + '(found ' + repoInfo.host + ' but expected ' + this.repo_.repoInfo_.host + ')');\n }\n return this.ref(parsedURL.path.toString());\n };\n /**\r\n * @param {string} apiName\r\n */\n Database.prototype.checkDeleted_ = function (apiName) {\n if (this.repo_ === null) {\n Object(Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"o\" /* fatal */])('Cannot call ' + apiName + ' on a deleted database.');\n }\n };\n // Make individual repo go offline.\n Database.prototype.goOffline = function () {\n validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n };\n Database.prototype.goOnline = function () {\n validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n };\n Database.ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n return Database;\n}();\n\nvar Database_DatabaseInternals = function () {\n /** @param {!Database} database */\n function DatabaseInternals(database) {\n this.database = database;\n }\n /** @return {Promise} */\n DatabaseInternals.prototype.delete = function () {\n this.database.checkDeleted_('delete');\n RepoManager_RepoManager.getInstance().deleteRepo(this.database.repo_);\n this.database.repo_ = null;\n this.database.root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return Database___WEBPACK_IMPORTED_MODULE_3__utils_promise__[\"b\" /* PromiseImpl */].resolve();\n };\n return DatabaseInternals;\n}();\n\n// CONCATENATED MODULE: ./src/database/api/internal.ts\nvar internal_namespaceObject = {};\n__webpack_require__.d(internal_namespaceObject, \"forceLongPolling\", function() { return internal_forceLongPolling; });\n__webpack_require__.d(internal_namespaceObject, \"forceWebSockets\", function() { return internal_forceWebSockets; });\n__webpack_require__.d(internal_namespaceObject, \"isWebSocketsAvailable\", function() { return isWebSocketsAvailable; });\n__webpack_require__.d(internal_namespaceObject, \"setSecurityDebugCallback\", function() { return setSecurityDebugCallback; });\n__webpack_require__.d(internal_namespaceObject, \"stats\", function() { return internal_stats; });\n__webpack_require__.d(internal_namespaceObject, \"statsIncrementCounter\", function() { return statsIncrementCounter; });\n__webpack_require__.d(internal_namespaceObject, \"dataUpdateCount\", function() { return dataUpdateCount; });\n__webpack_require__.d(internal_namespaceObject, \"interceptServerData\", function() { return interceptServerData; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__ = __webpack_require__(18);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/**\r\n * INTERNAL methods for internal-use only (tests, etc.).\r\n *\r\n * Customers shouldn't use these or else should be aware that they could break at any time.\r\n *\r\n * @const\r\n */\nvar internal_forceLongPolling = function forceLongPolling() {\n __WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__[\"a\" /* WebSocketConnection */].forceDisallow();\n BrowserPollConnection_BrowserPollConnection.forceAllow();\n};\nvar internal_forceWebSockets = function forceWebSockets() {\n BrowserPollConnection_BrowserPollConnection.forceDisallow();\n};\n/* Used by App Manager */\nvar isWebSocketsAvailable = function isWebSocketsAvailable() {\n return __WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__[\"a\" /* WebSocketConnection */]['isAvailable']();\n};\nvar setSecurityDebugCallback = function setSecurityDebugCallback(ref, callback) {\n ref.repo.persistentConnection_.securityDebugCallback_ = callback;\n};\nvar internal_stats = function stats(ref, showDelta) {\n ref.repo.stats(showDelta);\n};\nvar statsIncrementCounter = function statsIncrementCounter(ref, metric) {\n ref.repo.statsIncrementCounter(metric);\n};\nvar dataUpdateCount = function dataUpdateCount(ref) {\n return ref.repo.dataUpdateCount;\n};\nvar interceptServerData = function interceptServerData(ref, callback) {\n return ref.repo.interceptServerData_(callback);\n};\n// CONCATENATED MODULE: ./src/database/api/test_access.ts\nvar test_access_namespaceObject = {};\n__webpack_require__.d(test_access_namespaceObject, \"DataConnection\", function() { return DataConnection; });\n__webpack_require__.d(test_access_namespaceObject, \"RealTimeConnection\", function() { return RealTimeConnection; });\n__webpack_require__.d(test_access_namespaceObject, \"hijackHash\", function() { return test_access_hijackHash; });\n__webpack_require__.d(test_access_namespaceObject, \"ConnectionTarget\", function() { return ConnectionTarget; });\n__webpack_require__.d(test_access_namespaceObject, \"queryIdentifier\", function() { return queryIdentifier; });\n__webpack_require__.d(test_access_namespaceObject, \"listens\", function() { return listens; });\n__webpack_require__.d(test_access_namespaceObject, \"forceRestClient\", function() { return test_access_forceRestClient; });\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\nvar DataConnection = PersistentConnection_PersistentConnection;\n/**\r\n * @param {!string} pathString\r\n * @param {function(*)} onComplete\r\n */\nPersistentConnection_PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n/**\r\n * @param {*} data\r\n * @param {function(*)} onEcho\r\n */\nPersistentConnection_PersistentConnection.prototype.echo = function (data, onEcho) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n// RealTimeConnection properties that we use in tests.\nvar RealTimeConnection = Connection_Connection;\n/**\r\n * @param {function(): string} newHash\r\n * @return {function()}\r\n */\nvar test_access_hijackHash = function hijackHash(newHash) {\n var oldPut = PersistentConnection_PersistentConnection.prototype.put;\n PersistentConnection_PersistentConnection.prototype.put = function (pathString, data, opt_onComplete, opt_hash) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function () {\n PersistentConnection_PersistentConnection.prototype.put = oldPut;\n };\n};\n/**\r\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\r\n */\nvar ConnectionTarget = RepoInfo;\n/**\r\n * @param {!Query} query\r\n * @return {!string}\r\n */\nvar queryIdentifier = function queryIdentifier(query) {\n return query.queryIdentifier();\n};\n/**\r\n * @param {!Query} firebaseRef\r\n * @return {!Object}\r\n */\nvar listens = function listens(firebaseRef) {\n return firebaseRef.repo.persistentConnection_.listens_;\n};\n/**\r\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\r\n *\r\n * @param {boolean} forceRestClient\r\n */\nvar test_access_forceRestClient = function forceRestClient(_forceRestClient) {\n RepoManager_RepoManager.getInstance().forceRestClient(_forceRestClient);\n};\n// CONCATENATED MODULE: ./src/database.ts\n/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (immutable) */ __webpack_exports__[\"registerDatabase\"] = registerDatabase;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__database_core_util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_environment__ = __webpack_require__(6);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\nfunction registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app) {\n return RepoManager_RepoManager.getInstance().databaseFromApp(app);\n },\n // firebase.database namespace properties\n {\n Reference: Reference_Reference,\n Query: Query_Query,\n Database: Database_Database,\n enableLogging: __WEBPACK_IMPORTED_MODULE_4__database_core_util_util__[\"j\" /* enableLogging */],\n INTERNAL: internal_namespaceObject,\n ServerValue: Database_Database.ServerValue,\n TEST_ACCESS: test_access_namespaceObject\n });\n if (Object(__WEBPACK_IMPORTED_MODULE_8__utils_environment__[\"b\" /* isNodeSdk */])()) {\n module.exports = namespace;\n }\n}\nregisterDatabase(__WEBPACK_IMPORTED_MODULE_0__app__[\"default\"]);\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(26)(module)))\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(originalModule) {\r\n\tif(!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true,\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n/***/ })\n],[25]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-database.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-database.js","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CONSTANTS } from './constants';\n\n/**\n * Throws an error if the provided assertion is falsy\n * @param {*} assertion The assertion to be tested for falsiness\n * @param {!string} message The message to display if the check fails\n */\nexport const assert = function(assertion, message) {\n if (!assertion) {\n throw assertionError(message);\n }\n};\n\n/**\n * Returns an Error object suitable for throwing.\n * @param {string} message\n * @return {!Error}\n */\nexport const assertionError = function(message) {\n return new Error(\n 'Firebase Database (' +\n CONSTANTS.SDK_VERSION +\n ') INTERNAL ASSERT FAILED: ' +\n message\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/assert.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { globalScope } from './globalScope';\n\nconst stringToByteArray = function(str) {\n var output = [],\n p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n while (c > 255) {\n output[p++] = c & 255;\n c >>= 8;\n }\n output[p++] = c;\n }\n return output;\n};\n\n/**\n * Turns an array of numbers into the string given by the concatenation of the\n * characters to which the numbers correspond.\n * @param {Array} bytes Array of numbers representing characters.\n * @return {string} Stringification of the array.\n */\nconst byteArrayToString = function(bytes) {\n var CHUNK_SIZE = 8192;\n\n // Special-case the simple case for speed's sake.\n if (bytes.length < CHUNK_SIZE) {\n return String.fromCharCode.apply(null, bytes);\n }\n\n // The remaining logic splits conversion by chunks since\n // Function#apply() has a maximum parameter count.\n // See discussion: http://goo.gl/LrWmZ9\n\n var str = '';\n for (var i = 0; i < bytes.length; i += CHUNK_SIZE) {\n var chunk = bytes.slice(i, i + CHUNK_SIZE);\n str += String.fromCharCode.apply(null, chunk);\n }\n return str;\n};\n\n// Static lookup maps, lazily populated by init_()\nexport const base64 = {\n /**\n * Maps bytes to characters.\n * @type {Object}\n * @private\n */\n byteToCharMap_: null,\n\n /**\n * Maps characters to bytes.\n * @type {Object}\n * @private\n */\n charToByteMap_: null,\n\n /**\n * Maps bytes to websafe characters.\n * @type {Object}\n * @private\n */\n byteToCharMapWebSafe_: null,\n\n /**\n * Maps websafe characters to bytes.\n * @type {Object}\n * @private\n */\n charToByteMapWebSafe_: null,\n\n /**\n * Our default alphabet, shared between\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\n * @type {string}\n */\n ENCODED_VALS_BASE:\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\n\n /**\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\n * @type {string}\n */\n get ENCODED_VALS() {\n return this.ENCODED_VALS_BASE + '+/=';\n },\n\n /**\n * Our websafe alphabet.\n * @type {string}\n */\n get ENCODED_VALS_WEBSAFE() {\n return this.ENCODED_VALS_BASE + '-_.';\n },\n\n /**\n * Whether this browser supports the atob and btoa functions. This extension\n * started at Mozilla but is now implemented by many browsers. We use the\n * ASSUME_* variables to avoid pulling in the full useragent detection library\n * but still allowing the standard per-browser compilations.\n *\n * @type {boolean}\n */\n HAS_NATIVE_SUPPORT: typeof globalScope.atob === 'function',\n\n /**\n * Base64-encode an array of bytes.\n *\n * @param {Array|Uint8Array} input An array of bytes (numbers with\n * value in [0, 255]) to encode.\n * @param {boolean=} opt_webSafe Boolean indicating we should use the\n * alternative alphabet.\n * @return {string} The base64 encoded string.\n */\n encodeByteArray(input, opt_webSafe?) {\n if (!Array.isArray(input)) {\n throw Error('encodeByteArray takes an array as a parameter');\n }\n\n this.init_();\n\n var byteToCharMap = opt_webSafe\n ? this.byteToCharMapWebSafe_\n : this.byteToCharMap_;\n\n var output = [];\n\n for (var i = 0; i < input.length; i += 3) {\n var byte1 = input[i];\n var haveByte2 = i + 1 < input.length;\n var byte2 = haveByte2 ? input[i + 1] : 0;\n var haveByte3 = i + 2 < input.length;\n var byte3 = haveByte3 ? input[i + 2] : 0;\n\n var outByte1 = byte1 >> 2;\n var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\n var outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\n var outByte4 = byte3 & 0x3f;\n\n if (!haveByte3) {\n outByte4 = 64;\n\n if (!haveByte2) {\n outByte3 = 64;\n }\n }\n\n output.push(\n byteToCharMap[outByte1],\n byteToCharMap[outByte2],\n byteToCharMap[outByte3],\n byteToCharMap[outByte4]\n );\n }\n\n return output.join('');\n },\n\n /**\n * Base64-encode a string.\n *\n * @param {string} input A string to encode.\n * @param {boolean=} opt_webSafe If true, we should use the\n * alternative alphabet.\n * @return {string} The base64 encoded string.\n */\n encodeString(input, opt_webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !opt_webSafe) {\n return btoa(input);\n }\n return this.encodeByteArray(stringToByteArray(input), opt_webSafe);\n },\n\n /**\n * Base64-decode a string.\n *\n * @param {string} input to decode.\n * @param {boolean=} opt_webSafe True if we should use the\n * alternative alphabet.\n * @return {string} string representing the decoded value.\n */\n decodeString(input, opt_webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !opt_webSafe) {\n return atob(input);\n }\n return byteArrayToString(this.decodeStringToByteArray(input, opt_webSafe));\n },\n\n /**\n * Base64-decode a string.\n *\n * In base-64 decoding, groups of four characters are converted into three\n * bytes. If the encoder did not apply padding, the input length may not\n * be a multiple of 4.\n *\n * In this case, the last group will have fewer than 4 characters, and\n * padding will be inferred. If the group has one or two characters, it decodes\n * to one byte. If the group has three characters, it decodes to two bytes.\n *\n * @param {string} input Input to decode.\n * @param {boolean=} opt_webSafe True if we should use the web-safe alphabet.\n * @return {!Array} bytes representing the decoded value.\n */\n decodeStringToByteArray(input, opt_webSafe) {\n this.init_();\n\n var charToByteMap = opt_webSafe\n ? this.charToByteMapWebSafe_\n : this.charToByteMap_;\n\n var output = [];\n\n for (var i = 0; i < input.length; ) {\n var byte1 = charToByteMap[input.charAt(i++)];\n\n var haveByte2 = i < input.length;\n var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\n ++i;\n\n var haveByte3 = i < input.length;\n var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n\n var haveByte4 = i < input.length;\n var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n\n if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\n throw Error();\n }\n\n var outByte1 = (byte1 << 2) | (byte2 >> 4);\n output.push(outByte1);\n\n if (byte3 != 64) {\n var outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\n output.push(outByte2);\n\n if (byte4 != 64) {\n var outByte3 = ((byte3 << 6) & 0xc0) | byte4;\n output.push(outByte3);\n }\n }\n }\n\n return output;\n },\n\n /**\n * Lazy static initialization function. Called before\n * accessing any of the static map variables.\n * @private\n */\n init_() {\n if (!this.byteToCharMap_) {\n this.byteToCharMap_ = {};\n this.charToByteMap_ = {};\n this.byteToCharMapWebSafe_ = {};\n this.charToByteMapWebSafe_ = {};\n\n // We want quick mappings back and forth, so we precompute two maps.\n for (var i = 0; i < this.ENCODED_VALS.length; i++) {\n this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\n this.charToByteMap_[this.byteToCharMap_[i]] = i;\n this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\n this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\n\n // Be forgiving when decoding and correctly decode both encodings.\n if (i >= this.ENCODED_VALS_BASE.length) {\n this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\n this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\n }\n }\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/crypt.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n// Copyright 2011 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Abstract cryptographic hash interface.\n *\n * See Sha1 and Md5 for sample implementations.\n *\n */\n\n/**\n * Create a cryptographic hash instance.\n *\n * @constructor\n * @struct\n */\nexport class Hash {\n /**\n * The block size for the hasher.\n * @type {number}\n */\n blockSize: number = -1;\n\n constructor() {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/hash.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Hash } from './hash';\n\n/**\n * @fileoverview SHA-1 cryptographic hash.\n * Variable names follow the notation in FIPS PUB 180-3:\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\n *\n * Usage:\n * var sha1 = new sha1();\n * sha1.update(bytes);\n * var hash = sha1.digest();\n *\n * Performance:\n * Chrome 23: ~400 Mbit/s\n * Firefox 16: ~250 Mbit/s\n *\n */\n\n/**\n * SHA-1 cryptographic hash constructor.\n *\n * The properties declared here are discussed in the above algorithm document.\n * @constructor\n * @extends {Hash}\n * @final\n * @struct\n */\nexport class Sha1 extends Hash {\n /**\n * Holds the previous values of accumulated variables a-e in the compress_\n * function.\n * @type {!Array}\n * @private\n */\n private chain_: Array = [];\n\n /**\n * A buffer holding the partially computed hash result.\n * @type {!Array}\n * @private\n */\n private buf_: Array = [];\n\n /**\n * An array of 80 bytes, each a part of the message to be hashed. Referred to\n * as the message schedule in the docs.\n * @type {!Array}\n * @private\n */\n private W_: Array = [];\n\n /**\n * Contains data needed to pad messages less than 64 bytes.\n * @type {!Array}\n * @private\n */\n private pad_: Array = [];\n\n /**\n * @private {number}\n */\n private inbuf_: number = 0;\n\n /**\n * @private {number}\n */\n private total_: number = 0;\n\n constructor() {\n super();\n\n this.blockSize = 512 / 8;\n\n this.pad_[0] = 128;\n for (var i = 1; i < this.blockSize; ++i) {\n this.pad_[i] = 0;\n }\n\n this.reset();\n }\n\n reset() {\n this.chain_[0] = 0x67452301;\n this.chain_[1] = 0xefcdab89;\n this.chain_[2] = 0x98badcfe;\n this.chain_[3] = 0x10325476;\n this.chain_[4] = 0xc3d2e1f0;\n\n this.inbuf_ = 0;\n this.total_ = 0;\n }\n\n /**\n * Internal compress helper function.\n * @param {!Array|!Uint8Array|string} buf Block to compress.\n * @param {number=} opt_offset Offset of the block in the buffer.\n * @private\n */\n compress_(buf, opt_offset?) {\n if (!opt_offset) {\n opt_offset = 0;\n }\n\n var W = this.W_;\n\n // get 16 big endian words\n if (typeof buf === 'string') {\n for (var i = 0; i < 16; i++) {\n // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\n // have a bug that turns the post-increment ++ operator into pre-increment\n // during JIT compilation. We have code that depends heavily on SHA-1 for\n // correctness and which is affected by this bug, so I've removed all uses\n // of post-increment ++ in which the result value is used. We can revert\n // this change once the Safari bug\n // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\n // most clients have been updated.\n W[i] =\n (buf.charCodeAt(opt_offset) << 24) |\n (buf.charCodeAt(opt_offset + 1) << 16) |\n (buf.charCodeAt(opt_offset + 2) << 8) |\n buf.charCodeAt(opt_offset + 3);\n opt_offset += 4;\n }\n } else {\n for (var i = 0; i < 16; i++) {\n W[i] =\n (buf[opt_offset] << 24) |\n (buf[opt_offset + 1] << 16) |\n (buf[opt_offset + 2] << 8) |\n buf[opt_offset + 3];\n opt_offset += 4;\n }\n }\n\n // expand to 80 words\n for (var i = 16; i < 80; i++) {\n var t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n W[i] = ((t << 1) | (t >>> 31)) & 0xffffffff;\n }\n\n var a = this.chain_[0];\n var b = this.chain_[1];\n var c = this.chain_[2];\n var d = this.chain_[3];\n var e = this.chain_[4];\n var f, k;\n\n // TODO(user): Try to unroll this loop to speed up the computation.\n for (var i = 0; i < 80; i++) {\n if (i < 40) {\n if (i < 20) {\n f = d ^ (b & (c ^ d));\n k = 0x5a827999;\n } else {\n f = b ^ c ^ d;\n k = 0x6ed9eba1;\n }\n } else {\n if (i < 60) {\n f = (b & c) | (d & (b | c));\n k = 0x8f1bbcdc;\n } else {\n f = b ^ c ^ d;\n k = 0xca62c1d6;\n }\n }\n\n var t = (((a << 5) | (a >>> 27)) + f + e + k + W[i]) & 0xffffffff;\n e = d;\n d = c;\n c = ((b << 30) | (b >>> 2)) & 0xffffffff;\n b = a;\n a = t;\n }\n\n this.chain_[0] = (this.chain_[0] + a) & 0xffffffff;\n this.chain_[1] = (this.chain_[1] + b) & 0xffffffff;\n this.chain_[2] = (this.chain_[2] + c) & 0xffffffff;\n this.chain_[3] = (this.chain_[3] + d) & 0xffffffff;\n this.chain_[4] = (this.chain_[4] + e) & 0xffffffff;\n }\n\n update(bytes, opt_length?) {\n // TODO(johnlenz): tighten the function signature and remove this check\n if (bytes == null) {\n return;\n }\n\n if (opt_length === undefined) {\n opt_length = bytes.length;\n }\n\n var lengthMinusBlock = opt_length - this.blockSize;\n var n = 0;\n // Using local instead of member variables gives ~5% speedup on Firefox 16.\n var buf = this.buf_;\n var inbuf = this.inbuf_;\n\n // The outer while loop should execute at most twice.\n while (n < opt_length) {\n // When we have no data in the block to top up, we can directly process the\n // input buffer (assuming it contains sufficient data). This gives ~25%\n // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\n // the data is provided in large chunks (or in multiples of 64 bytes).\n if (inbuf == 0) {\n while (n <= lengthMinusBlock) {\n this.compress_(bytes, n);\n n += this.blockSize;\n }\n }\n\n if (typeof bytes === 'string') {\n while (n < opt_length) {\n buf[inbuf] = bytes.charCodeAt(n);\n ++inbuf;\n ++n;\n if (inbuf == this.blockSize) {\n this.compress_(buf);\n inbuf = 0;\n // Jump to the outer loop so we use the full-block optimization.\n break;\n }\n }\n } else {\n while (n < opt_length) {\n buf[inbuf] = bytes[n];\n ++inbuf;\n ++n;\n if (inbuf == this.blockSize) {\n this.compress_(buf);\n inbuf = 0;\n // Jump to the outer loop so we use the full-block optimization.\n break;\n }\n }\n }\n }\n\n this.inbuf_ = inbuf;\n this.total_ += opt_length;\n }\n\n /** @override */\n digest() {\n var digest = [];\n var totalBits = this.total_ * 8;\n\n // Add pad 0x80 0x00*.\n if (this.inbuf_ < 56) {\n this.update(this.pad_, 56 - this.inbuf_);\n } else {\n this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\n }\n\n // Add # bits.\n for (var i = this.blockSize - 1; i >= 56; i--) {\n this.buf_[i] = totalBits & 255;\n totalBits /= 256; // Don't use bit-shifting here!\n }\n\n this.compress_(this.buf_);\n\n var n = 0;\n for (var i = 0; i < 5; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n digest[n] = (this.chain_[i] >> j) & 255;\n ++n;\n }\n }\n return digest;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/Sha1.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Query } from '../../api/Query';\n\ndeclare const window: any;\ndeclare const Windows: any;\n\nimport { assert } from '../../../utils/assert';\nimport { forEach } from '../../../utils/obj';\nimport { base64 } from '../../../utils/crypt';\nimport { Sha1 } from '../../../utils/Sha1';\nimport { stringToByteArray } from '../../../utils/utf8';\nimport { stringify } from '../../../utils/json';\nimport { SessionStorage } from '../storage/storage';\nimport { isNodeSdk } from '../../../utils/environment';\n\n/**\n * Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).\n * @type {function(): number} Generated ID.\n */\nexport const LUIDGenerator: (() => number) = (function() {\n let id = 1;\n return function() {\n return id++;\n };\n})();\n\n/**\n * URL-safe base64 encoding\n * @param {!string} str\n * @return {!string}\n */\nexport const base64Encode = function(str: string): string {\n const utf8Bytes = stringToByteArray(str);\n return base64.encodeByteArray(utf8Bytes, /*useWebSafe=*/ true);\n};\n\nlet BufferImpl;\nexport function setBufferImpl(impl) {\n BufferImpl = impl;\n}\n/**\n * URL-safe base64 decoding\n *\n * NOTE: DO NOT use the global atob() function - it does NOT support the\n * base64Url variant encoding.\n *\n * @param {string} str To be decoded\n * @return {?string} Decoded result, if possible\n */\nexport const base64Decode = function(str: string): string | null {\n try {\n if (BufferImpl) {\n return new BufferImpl(str, 'base64').toString('utf8');\n } else {\n return base64.decodeString(str, /*useWebSafe=*/ true);\n }\n } catch (e) {\n log('base64Decode failed: ', e);\n }\n return null;\n};\n\n/**\n * Sha1 hash of the input string\n * @param {!string} str The string to hash\n * @return {!string} The resulting hash\n */\nexport const sha1 = function(str: string): string {\n const utf8Bytes = stringToByteArray(str);\n const sha1 = new Sha1();\n sha1.update(utf8Bytes);\n const sha1Bytes = sha1.digest();\n return base64.encodeByteArray(sha1Bytes);\n};\n\n/**\n * @param {...*} var_args\n * @return {string}\n * @private\n */\nconst buildLogMessage_ = function(...var_args: any[]): string {\n let message = '';\n for (let i = 0; i < var_args.length; i++) {\n if (\n Array.isArray(var_args[i]) ||\n (var_args[i] &&\n typeof var_args[i] === 'object' &&\n typeof var_args[i].length === 'number')\n ) {\n message += buildLogMessage_.apply(null, var_args[i]);\n } else if (typeof var_args[i] === 'object') {\n message += stringify(var_args[i]);\n } else {\n message += var_args[i];\n }\n message += ' ';\n }\n\n return message;\n};\n\n/**\n * Use this for all debug messages in Firebase.\n * @type {?function(string)}\n */\nexport let logger: ((a: string) => void) | null = null;\n\n/**\n * Flag to check for log availability on first log message\n * @type {boolean}\n * @private\n */\nlet firstLog_ = true;\n\n/**\n * The implementation of Firebase.enableLogging (defined here to break dependencies)\n * @param {boolean|?function(string)} logger_ A flag to turn on logging, or a custom logger\n * @param {boolean=} persistent Whether or not to persist logging settings across refreshes\n */\nexport const enableLogging = function(\n logger_?: boolean | ((a: string) => void) | null,\n persistent?: boolean\n) {\n assert(\n !persistent || (logger_ === true || logger_ === false),\n \"Can't turn on custom loggers persistently.\"\n );\n if (logger_ === true) {\n if (typeof console !== 'undefined') {\n if (typeof console.log === 'function') {\n logger = console.log.bind(console);\n } else if (typeof console.log === 'object') {\n // IE does this.\n logger = function(message) {\n console.log(message);\n };\n }\n }\n if (persistent) SessionStorage.set('logging_enabled', true);\n } else if (typeof logger_ === 'function') {\n logger = logger_;\n } else {\n logger = null;\n SessionStorage.remove('logging_enabled');\n }\n};\n\n/**\n *\n * @param {...(string|Arguments)} var_args\n */\nexport const log = function(...var_args: string[]) {\n if (firstLog_ === true) {\n firstLog_ = false;\n if (logger === null && SessionStorage.get('logging_enabled') === true)\n enableLogging(true);\n }\n\n if (logger) {\n const message = buildLogMessage_.apply(null, var_args);\n logger(message);\n }\n};\n\n/**\n * @param {!string} prefix\n * @return {function(...[*])}\n */\nexport const logWrapper = function(\n prefix: string\n): (...var_args: any[]) => void {\n return function(...var_args: any[]) {\n log(prefix, ...var_args);\n };\n};\n\n/**\n * @param {...string} var_args\n */\nexport const error = function(...var_args: string[]) {\n if (typeof console !== 'undefined') {\n const message = 'FIREBASE INTERNAL ERROR: ' + buildLogMessage_(...var_args);\n if (typeof console.error !== 'undefined') {\n console.error(message);\n } else {\n console.log(message);\n }\n }\n};\n\n/**\n * @param {...string} var_args\n */\nexport const fatal = function(...var_args: string[]) {\n const message = buildLogMessage_(...var_args);\n throw new Error('FIREBASE FATAL ERROR: ' + message);\n};\n\n/**\n * @param {...*} var_args\n */\nexport const warn = function(...var_args: any[]) {\n if (typeof console !== 'undefined') {\n const message = 'FIREBASE WARNING: ' + buildLogMessage_(...var_args);\n if (typeof console.warn !== 'undefined') {\n console.warn(message);\n } else {\n console.log(message);\n }\n }\n};\n\n/**\n * Logs a warning if the containing page uses https. Called when a call to new Firebase\n * does not use https.\n */\nexport const warnIfPageIsSecure = function() {\n // Be very careful accessing browser globals. Who knows what may or may not exist.\n if (\n typeof window !== 'undefined' &&\n window.location &&\n window.location.protocol &&\n window.location.protocol.indexOf('https:') !== -1\n ) {\n warn(\n 'Insecure Firebase access from a secure page. ' +\n 'Please use https in calls to new Firebase().'\n );\n }\n};\n\n/**\n * @param {!String} methodName\n */\nexport const warnAboutUnsupportedMethod = function(methodName: string) {\n warn(\n methodName +\n ' is unsupported and will likely change soon. ' +\n 'Please do not use.'\n );\n};\n\n/**\n * Returns true if data is NaN, or +/- Infinity.\n * @param {*} data\n * @return {boolean}\n */\nexport const isInvalidJSONNumber = function(data: any): boolean {\n return (\n typeof data === 'number' &&\n (data != data || // NaN\n data == Number.POSITIVE_INFINITY ||\n data == Number.NEGATIVE_INFINITY)\n );\n};\n\n/**\n * @param {function()} fn\n */\nexport const executeWhenDOMReady = function(fn: () => void) {\n if (isNodeSdk() || document.readyState === 'complete') {\n fn();\n } else {\n // Modeled after jQuery. Try DOMContentLoaded and onreadystatechange (which\n // fire before onload), but fall back to onload.\n\n let called = false;\n let wrappedFn = function() {\n if (!document.body) {\n setTimeout(wrappedFn, Math.floor(10));\n return;\n }\n\n if (!called) {\n called = true;\n fn();\n }\n };\n\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', wrappedFn, false);\n // fallback to onload.\n window.addEventListener('load', wrappedFn, false);\n } else if ((document as any).attachEvent) {\n // IE.\n (document as any).attachEvent('onreadystatechange', function() {\n if (document.readyState === 'complete') wrappedFn();\n });\n // fallback to onload.\n (window as any).attachEvent('onload', wrappedFn);\n\n // jQuery has an extra hack for IE that we could employ (based on\n // http://javascript.nwbox.com/IEContentLoaded/) But it looks really old.\n // I'm hoping we don't need it.\n }\n }\n};\n\n/**\n * Minimum key name. Invalid for actual data, used as a marker to sort before any valid names\n * @type {!string}\n */\nexport const MIN_NAME = '[MIN_NAME]';\n\n/**\n * Maximum key name. Invalid for actual data, used as a marker to sort above any valid names\n * @type {!string}\n */\nexport const MAX_NAME = '[MAX_NAME]';\n\n/**\n * Compares valid Firebase key names, plus min and max name\n * @param {!string} a\n * @param {!string} b\n * @return {!number}\n */\nexport const nameCompare = function(a: string, b: string): number {\n if (a === b) {\n return 0;\n } else if (a === MIN_NAME || b === MAX_NAME) {\n return -1;\n } else if (b === MIN_NAME || a === MAX_NAME) {\n return 1;\n } else {\n const aAsInt = tryParseInt(a),\n bAsInt = tryParseInt(b);\n\n if (aAsInt !== null) {\n if (bAsInt !== null) {\n return aAsInt - bAsInt == 0 ? a.length - b.length : aAsInt - bAsInt;\n } else {\n return -1;\n }\n } else if (bAsInt !== null) {\n return 1;\n } else {\n return a < b ? -1 : 1;\n }\n }\n};\n\n/**\n * @param {!string} a\n * @param {!string} b\n * @return {!number} comparison result.\n */\nexport const stringCompare = function(a: string, b: string): number {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else {\n return 1;\n }\n};\n\n/**\n * @param {string} key\n * @param {Object} obj\n * @return {*}\n */\nexport const requireKey = function(\n key: string,\n obj: { [k: string]: any }\n): any {\n if (obj && key in obj) {\n return obj[key];\n } else {\n throw new Error(\n 'Missing required key (' + key + ') in object: ' + stringify(obj)\n );\n }\n};\n\n/**\n * @param {*} obj\n * @return {string}\n */\nexport const ObjectToUniqueKey = function(obj: any): string {\n if (typeof obj !== 'object' || obj === null) return stringify(obj);\n\n const keys = [];\n for (let k in obj) {\n keys.push(k);\n }\n\n // Export as json, but with the keys sorted.\n keys.sort();\n let key = '{';\n for (let i = 0; i < keys.length; i++) {\n if (i !== 0) key += ',';\n key += stringify(keys[i]);\n key += ':';\n key += ObjectToUniqueKey(obj[keys[i]]);\n }\n\n key += '}';\n return key;\n};\n\n/**\n * Splits a string into a number of smaller segments of maximum size\n * @param {!string} str The string\n * @param {!number} segsize The maximum number of chars in the string.\n * @return {Array.} The string, split into appropriately-sized chunks\n */\nexport const splitStringBySize = function(\n str: string,\n segsize: number\n): string[] {\n const len = str.length;\n\n if (len <= segsize) {\n return [str];\n }\n\n const dataSegs = [];\n for (let c = 0; c < len; c += segsize) {\n if (c + segsize > len) {\n dataSegs.push(str.substring(c, len));\n } else {\n dataSegs.push(str.substring(c, c + segsize));\n }\n }\n return dataSegs;\n};\n\n/**\n * Apply a function to each (key, value) pair in an object or\n * apply a function to each (index, value) pair in an array\n * @param {!(Object|Array)} obj The object or array to iterate over\n * @param {function(?, ?)} fn The function to apply\n */\nexport const each = function(\n obj: Object | Array,\n fn: (v?: any, k?: any) => void\n) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; ++i) {\n fn(i, obj[i]);\n }\n } else {\n /**\n * in the conversion of code we removed the goog.object.forEach\n * function which did a value,key callback. We standardized on\n * a single impl that does a key, value callback. So we invert\n * to not have to touch the `each` code points\n */\n forEach(obj, (key: any, val: any) => fn(val, key));\n }\n};\n\n/**\n * Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.\n * @param {function(*)} callback Callback function.\n * @param {?Object=} context Optional context to bind to.\n * @return {function(*)}\n */\nexport const bindCallback = function(\n callback: (a: any) => void,\n context?: object | null\n): Function {\n return context ? callback.bind(context) : callback;\n};\n\n/**\n * Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)\n * I made one modification at the end and removed the NaN / Infinity\n * handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.\n * @param {!number} v A double\n * @return {string}\n */\nexport const doubleToIEEE754String = function(v: number): string {\n assert(!isInvalidJSONNumber(v), 'Invalid JSON number'); // MJL\n\n const ebits = 11,\n fbits = 52;\n let bias = (1 << (ebits - 1)) - 1,\n s,\n e,\n f,\n ln,\n i,\n bits,\n str;\n\n // Compute sign, exponent, fraction\n // Skip NaN / Infinity handling --MJL.\n if (v === 0) {\n e = 0;\n f = 0;\n s = 1 / v === -Infinity ? 1 : 0;\n } else {\n s = v < 0;\n v = Math.abs(v);\n\n if (v >= Math.pow(2, 1 - bias)) {\n // Normalized\n ln = Math.min(Math.floor(Math.log(v) / Math.LN2), bias);\n e = ln + bias;\n f = Math.round(v * Math.pow(2, fbits - ln) - Math.pow(2, fbits));\n } else {\n // Denormalized\n e = 0;\n f = Math.round(v / Math.pow(2, 1 - bias - fbits));\n }\n }\n\n // Pack sign, exponent, fraction\n bits = [];\n for (i = fbits; i; i -= 1) {\n bits.push(f % 2 ? 1 : 0);\n f = Math.floor(f / 2);\n }\n for (i = ebits; i; i -= 1) {\n bits.push(e % 2 ? 1 : 0);\n e = Math.floor(e / 2);\n }\n bits.push(s ? 1 : 0);\n bits.reverse();\n str = bits.join('');\n\n // Return the data as a hex string. --MJL\n let hexByteString = '';\n for (i = 0; i < 64; i += 8) {\n let hexByte = parseInt(str.substr(i, 8), 2).toString(16);\n if (hexByte.length === 1) hexByte = '0' + hexByte;\n hexByteString = hexByteString + hexByte;\n }\n return hexByteString.toLowerCase();\n};\n\n/**\n * Used to detect if we're in a Chrome content script (which executes in an\n * isolated environment where long-polling doesn't work).\n * @return {boolean}\n */\nexport const isChromeExtensionContentScript = function(): boolean {\n return !!(\n typeof window === 'object' &&\n window['chrome'] &&\n window['chrome']['extension'] &&\n !/^chrome/.test(window.location.href)\n );\n};\n\n/**\n * Used to detect if we're in a Windows 8 Store app.\n * @return {boolean}\n */\nexport const isWindowsStoreApp = function(): boolean {\n // Check for the presence of a couple WinRT globals\n return typeof Windows === 'object' && typeof Windows.UI === 'object';\n};\n\n/**\n * Converts a server error code to a Javascript Error\n * @param {!string} code\n * @param {!Query} query\n * @return {Error}\n */\nexport const errorForServerCode = function(code: string, query: Query): Error {\n let reason = 'Unknown Error';\n if (code === 'too_big') {\n reason =\n 'The data requested exceeds the maximum size ' +\n 'that can be accessed with a single request.';\n } else if (code == 'permission_denied') {\n reason = \"Client doesn't have permission to access the desired data.\";\n } else if (code == 'unavailable') {\n reason = 'The service is unavailable';\n }\n\n const error = new Error(\n code + ' at ' + query.path.toString() + ': ' + reason\n );\n (error as any).code = code.toUpperCase();\n return error;\n};\n\n/**\n * Used to test for integer-looking strings\n * @type {RegExp}\n * @private\n */\nexport const INTEGER_REGEXP_ = new RegExp('^-?\\\\d{1,10}$');\n\n/**\n * If the string contains a 32-bit integer, return it. Else return null.\n * @param {!string} str\n * @return {?number}\n */\nexport const tryParseInt = function(str: string): number | null {\n if (INTEGER_REGEXP_.test(str)) {\n const intVal = Number(str);\n if (intVal >= -2147483648 && intVal <= 2147483647) {\n return intVal;\n }\n }\n return null;\n};\n\n/**\n * Helper to run some code but catch any exceptions and re-throw them later.\n * Useful for preventing user callbacks from breaking internal code.\n *\n * Re-throwing the exception from a setTimeout is a little evil, but it's very\n * convenient (we don't have to try to figure out when is a safe point to\n * re-throw it), and the behavior seems reasonable:\n *\n * * If you aren't pausing on exceptions, you get an error in the console with\n * the correct stack trace.\n * * If you're pausing on all exceptions, the debugger will pause on your\n * exception and then again when we rethrow it.\n * * If you're only pausing on uncaught exceptions, the debugger will only pause\n * on us re-throwing it.\n *\n * @param {!function()} fn The code to guard.\n */\nexport const exceptionGuard = function(fn: () => void) {\n try {\n fn();\n } catch (e) {\n // Re-throw exception when it's safe.\n setTimeout(function() {\n // It used to be that \"throw e\" would result in a good console error with\n // relevant context, but as of Chrome 39, you just get the firebase.js\n // file/line number where we re-throw it, which is useless. So we log\n // e.stack explicitly.\n const stack = e.stack || '';\n warn('Exception was thrown by user callback.', stack);\n throw e;\n }, Math.floor(0));\n }\n};\n\n/**\n * Helper function to safely call opt_callback with the specified arguments. It:\n * 1. Turns into a no-op if opt_callback is null or undefined.\n * 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.\n *\n * @param {?Function=} callback Optional onComplete callback.\n * @param {...*} var_args Arbitrary args to be passed to opt_onComplete\n */\nexport const callUserCallback = function(\n callback?: Function | null,\n ...var_args: any[]\n) {\n if (typeof callback === 'function') {\n exceptionGuard(function() {\n callback(...var_args);\n });\n }\n};\n\n/**\n * @return {boolean} true if we think we're currently being crawled.\n */\nexport const beingCrawled = function(): boolean {\n const userAgent =\n (typeof window === 'object' &&\n window['navigator'] &&\n window['navigator']['userAgent']) ||\n '';\n\n // For now we whitelist the most popular crawlers. We should refine this to be the set of crawlers we\n // believe to support JavaScript/AJAX rendering.\n // NOTE: Google Webmaster Tools doesn't really belong, but their \"This is how a visitor to your website\n // would have seen the page\" is flaky if we don't treat it as a crawler.\n return (\n userAgent.search(\n /googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i\n ) >= 0\n );\n};\n\n/**\n * Export a property of an object using a getter function.\n *\n * @param {!Object} object\n * @param {string} name\n * @param {!function(): *} fnGet\n */\nexport const exportPropGetter = function(\n object: Object,\n name: string,\n fnGet: () => any\n) {\n Object.defineProperty(object, name, { get: fnGet });\n};\n\n/**\n * Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.\n *\n * It is removed with clearTimeout() as normal.\n *\n * @param {Function} fn Function to run.\n * @param {number} time Milliseconds to wait before running.\n * @return {number|Object} The setTimeout() return value.\n */\nexport const setTimeoutNonBlocking = function(\n fn: Function,\n time: number\n): number | Object {\n const timeout: number | Object = setTimeout(fn, time);\n if (typeof timeout === 'object' && (timeout as any)['unref']) {\n (timeout as any)['unref']();\n }\n return timeout;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/util.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n// See http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/\n\nexport const contains = function(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nexport const safeGet = function(obj, key) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) return obj[key];\n // else return undefined.\n};\n\n/**\n * Enumerates the keys/values in an object, excluding keys defined on the prototype.\n *\n * @param {?Object.} obj Object to enumerate.\n * @param {!function(K, V)} fn Function to call for each key and value.\n * @template K,V\n */\nexport const forEach = function(obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn(key, obj[key]);\n }\n }\n};\n\n/**\n * Copies all the (own) properties from one object to another.\n * @param {!Object} objTo\n * @param {!Object} objFrom\n * @return {!Object} objTo\n */\nexport const extend = function(objTo, objFrom) {\n forEach(objFrom, function(key, value) {\n objTo[key] = value;\n });\n return objTo;\n};\n\n/**\n * Returns a clone of the specified object.\n * @param {!Object} obj\n * @return {!Object} cloned obj.\n */\nexport const clone = function(obj) {\n return extend({}, obj);\n};\n\n/**\n * Returns true if obj has typeof \"object\" and is not null. Unlike goog.isObject(), does not return true\n * for functions.\n *\n * @param obj {*} A potential object.\n * @returns {boolean} True if it's an object.\n */\nexport const isNonNullObject = function(obj) {\n return typeof obj === 'object' && obj !== null;\n};\n\nexport const isEmpty = function(obj) {\n for (var key in obj) {\n return false;\n }\n return true;\n};\n\nexport const getCount = function(obj) {\n var rv = 0;\n for (var key in obj) {\n rv++;\n }\n return rv;\n};\n\nexport const map = function(obj, f, opt_obj?) {\n var res = {};\n for (var key in obj) {\n res[key] = f.call(opt_obj, obj[key], key, obj);\n }\n return res;\n};\n\nexport const findKey = function(obj, fn, opt_this?) {\n for (var key in obj) {\n if (fn.call(opt_this, obj[key], key, obj)) {\n return key;\n }\n }\n return undefined;\n};\n\nexport const findValue = function(obj, fn, opt_this?) {\n var key = findKey(obj, fn, opt_this);\n return key && obj[key];\n};\n\nexport const getAnyKey = function(obj) {\n for (var key in obj) {\n return key;\n }\n};\n\nexport const getValues = function(obj) {\n var res = [];\n var i = 0;\n for (var key in obj) {\n res[i++] = obj[key];\n }\n return res;\n};\n\n/**\n * Tests whether every key/value pair in an object pass the test implemented\n * by the provided function\n *\n * @param {?Object.} obj Object to test.\n * @param {!function(K, V)} fn Function to call for each key and value.\n * @template K,V\n */\nexport const every = function(\n obj: Object,\n fn: (k: string, v?: V) => boolean\n): boolean {\n for (let key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n if (!fn(key, obj[key])) {\n return false;\n }\n }\n }\n return true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/obj.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * Evaluates a JSON string into a javascript object.\n *\n * @param {string} str A string containing JSON.\n * @return {*} The javascript object representing the specified JSON.\n */\nexport const jsonEval = function(str) {\n return JSON.parse(str);\n};\n\n/**\n * Returns JSON representing a javascript object.\n * @param {*} data Javascript object to be stringified.\n * @return {string} The JSON contents of the object.\n */\nexport const stringify = function(data) {\n return JSON.stringify(data);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/json.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CONSTANTS } from './constants';\n\n/**\n * Returns navigator.userAgent string or '' if it's not defined.\n * @return {string} user agent string\n */\nexport const getUA = function() {\n if (\n typeof navigator !== 'undefined' &&\n typeof navigator['userAgent'] === 'string'\n ) {\n return navigator['userAgent'];\n } else {\n return '';\n }\n};\n\n/**\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\n *\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap in the Ripple emulator) nor\n * Cordova `onDeviceReady`, which would normally wait for a callback.\n *\n * @return {boolean} isMobileCordova\n */\nexport const isMobileCordova = function() {\n return (\n typeof window !== 'undefined' &&\n !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&\n /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA())\n );\n};\n\n/**\n * Detect React Native.\n *\n * @return {boolean} True if ReactNative environment is detected.\n */\nexport const isReactNative = function() {\n return (\n typeof navigator === 'object' && navigator['product'] === 'ReactNative'\n );\n};\n\n/**\n * Detect Node.js.\n *\n * @return {boolean} True if Node.js environment is detected.\n */\nexport const isNodeSdk = function() {\n return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/environment.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.\n */\n\nexport const CONSTANTS = {\n /**\n * @define {boolean} Whether this is the client Node.js SDK.\n */\n NODE_CLIENT: false,\n /**\n * @define {boolean} Whether this is the Admin Node.js SDK.\n */\n NODE_ADMIN: false,\n\n /**\n * Firebase SDK Version\n */\n SDK_VERSION: '4.2.0'\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/constants.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { jsonEval, stringify } from '../../../utils/json';\n\n/**\n * Wraps a DOM Storage object and:\n * - automatically encode objects as JSON strings before storing them to allow us to store arbitrary types.\n * - prefixes names with \"firebase:\" to avoid collisions with app data.\n *\n * We automatically (see storage.js) create two such wrappers, one for sessionStorage,\n * and one for localStorage.\n *\n * @constructor\n */\nexport class DOMStorageWrapper {\n // Use a prefix to avoid collisions with other stuff saved by the app.\n private prefix_ = 'firebase:';\n\n /**\n * @param {Storage} domStorage_ The underlying storage object (e.g. localStorage or sessionStorage)\n */\n constructor(private domStorage_: Storage) {}\n\n /**\n * @param {string} key The key to save the value under\n * @param {?Object} value The value being stored, or null to remove the key.\n */\n set(key: string, value: any | null) {\n if (value == null) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n } else {\n this.domStorage_.setItem(this.prefixedName_(key), stringify(value));\n }\n }\n\n /**\n * @param {string} key\n * @return {*} The value that was stored under this key, or null\n */\n get(key: string): any {\n const storedVal = this.domStorage_.getItem(this.prefixedName_(key));\n if (storedVal == null) {\n return null;\n } else {\n return jsonEval(storedVal);\n }\n }\n\n /**\n * @param {string} key\n */\n remove(key: string) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n }\n\n isInMemoryStorage: boolean;\n\n /**\n * @param {string} name\n * @return {string}\n */\n prefixedName_(name: string): string {\n return this.prefix_ + name;\n }\n\n toString(): string {\n return this.domStorage_.toString();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/storage/DOMStorageWrapper.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { contains } from '../../../utils/obj';\n\n/**\n * An in-memory storage implementation that matches the API of DOMStorageWrapper\n * (TODO: create interface for both to implement).\n *\n * @constructor\n */\nexport class MemoryStorage {\n private cache_: { [k: string]: any } = {};\n\n set(key: string, value: any | null) {\n if (value == null) {\n delete this.cache_[key];\n } else {\n this.cache_[key] = value;\n }\n }\n\n get(key: string): any {\n if (contains(this.cache_, key)) {\n return this.cache_[key];\n }\n return null;\n }\n\n remove(key: string) {\n delete this.cache_[key];\n }\n\n isInMemoryStorage = true;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/storage/MemoryStorage.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { DOMStorageWrapper } from './DOMStorageWrapper';\nimport { MemoryStorage } from './MemoryStorage';\n\ndeclare const window: any;\n\n/**\n* Helper to create a DOMStorageWrapper or else fall back to MemoryStorage.\n* TODO: Once MemoryStorage and DOMStorageWrapper have a shared interface this method annotation should change\n* to reflect this type\n*\n* @param {string} domStorageName Name of the underlying storage object\n* (e.g. 'localStorage' or 'sessionStorage').\n* @return {?} Turning off type information until a common interface is defined.\n*/\nconst createStoragefor = function(\n domStorageName: string\n): DOMStorageWrapper | MemoryStorage {\n try {\n // NOTE: just accessing \"localStorage\" or \"window['localStorage']\" may throw a security exception,\n // so it must be inside the try/catch.\n if (\n typeof window !== 'undefined' &&\n typeof window[domStorageName] !== 'undefined'\n ) {\n // Need to test cache. Just because it's here doesn't mean it works\n const domStorage = window[domStorageName];\n domStorage.setItem('firebase:sentinel', 'cache');\n domStorage.removeItem('firebase:sentinel');\n return new DOMStorageWrapper(domStorage);\n }\n } catch (e) {}\n\n // Failed to create wrapper. Just return in-memory storage.\n // TODO: log?\n return new MemoryStorage();\n};\n\n/** A storage object that lasts across sessions */\nexport const PersistentStorage = createStoragefor('localStorage');\n\n/** A storage object that only lasts one session */\nexport const SessionStorage = createStoragefor('sessionStorage');\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/storage/storage.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nexport const PROTOCOL_VERSION = '5';\n\nexport const VERSION_PARAM = 'v';\n\nexport const TRANSPORT_SESSION_PARAM = 's';\n\nexport const REFERER_PARAM = 'r';\n\nexport const FORGE_REF = 'f';\n\nexport const FORGE_DOMAIN = 'firebaseio.com';\n\nexport const LAST_SESSION_PARAM = 'ls';\n\nexport const WEBSOCKET = 'websocket';\n\nexport const LONG_POLLING = 'long_polling';\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/Constants.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from './assert';\n\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\n// so it's been modified.\n\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\n// use 2 characters in Javascript. All 4-byte UTF-8 characters begin with a first\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\n// pair).\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\n\n/**\n * @param {string} str\n * @return {Array}\n */\nexport const stringToByteArray = function(str) {\n var out = [],\n p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n\n // Is this the lead surrogate in a surrogate pair?\n if (c >= 0xd800 && c <= 0xdbff) {\n var high = c - 0xd800; // the high 10 bits.\n i++;\n assert(i < str.length, 'Surrogate pair missing trail surrogate.');\n var low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\n c = 0x10000 + (high << 10) + low;\n }\n\n if (c < 128) {\n out[p++] = c;\n } else if (c < 2048) {\n out[p++] = (c >> 6) | 192;\n out[p++] = (c & 63) | 128;\n } else if (c < 65536) {\n out[p++] = (c >> 12) | 224;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n } else {\n out[p++] = (c >> 18) | 240;\n out[p++] = ((c >> 12) & 63) | 128;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n }\n return out;\n};\n\n/**\n * Calculate length without actually converting; useful for doing cheaper validation.\n * @param {string} str\n * @return {number}\n */\nexport const stringLength = function(str) {\n var p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c < 128) {\n p++;\n } else if (c < 2048) {\n p += 2;\n } else if (c >= 0xd800 && c <= 0xdbff) {\n // Lead surrogate of a surrogate pair. The pair together will take 4 bytes to represent.\n p += 4;\n i++; // skip trail surrogate.\n } else {\n p += 3;\n }\n }\n return p;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/utf8.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { deepCopy } from '../../../utils/deep_copy';\nimport { contains } from '../../../utils/obj';\n\n/**\n * Tracks a collection of stats.\n *\n * @constructor\n */\nexport class StatsCollection {\n private counters_: { [k: string]: number } = {};\n\n incrementCounter(name: string, amount: number = 1) {\n if (!contains(this.counters_, name)) this.counters_[name] = 0;\n\n this.counters_[name] += amount;\n }\n\n get() {\n return deepCopy(this.counters_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsCollection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { StatsCollection } from './StatsCollection';\nimport { RepoInfo } from '../RepoInfo';\n\nexport class StatsManager {\n private static collections_: { [k: string]: StatsCollection } = {};\n private static reporters_: { [k: string]: any } = {};\n\n static getCollection(repoInfo: RepoInfo): StatsCollection {\n const hashString = repoInfo.toString();\n\n if (!this.collections_[hashString]) {\n this.collections_[hashString] = new StatsCollection();\n }\n\n return this.collections_[hashString];\n }\n\n static getOrCreateReporter(\n repoInfo: RepoInfo,\n creatorFunction: () => T\n ): T {\n const hashString = repoInfo.toString();\n\n if (!this.reporters_[hashString]) {\n this.reporters_[hashString] = creatorFunction();\n }\n\n return this.reporters_[hashString];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsManager.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { RepoInfo } from '../core/RepoInfo';\n\ndeclare const MozWebSocket: any;\n\nimport firebase from '../../app';\nimport { assert } from '../../utils/assert';\nimport { logWrapper, splitStringBySize } from '../core/util/util';\nimport { StatsManager } from '../core/stats/StatsManager';\nimport {\n FORGE_DOMAIN,\n FORGE_REF,\n LAST_SESSION_PARAM,\n PROTOCOL_VERSION,\n REFERER_PARAM,\n TRANSPORT_SESSION_PARAM,\n VERSION_PARAM,\n WEBSOCKET\n} from './Constants';\nimport { CONSTANTS as ENV_CONSTANTS } from '../../utils/constants';\nimport { PersistentStorage } from '../core/storage/storage';\nimport { jsonEval, stringify } from '../../utils/json';\nimport { isNodeSdk } from '../../utils/environment';\nimport { Transport } from './Transport';\nimport { StatsCollection } from '../core/stats/StatsCollection';\n\nconst WEBSOCKET_MAX_FRAME_SIZE = 16384;\nconst WEBSOCKET_KEEPALIVE_INTERVAL = 45000;\n\nlet WebSocketImpl = null;\nif (typeof MozWebSocket !== 'undefined') {\n WebSocketImpl = MozWebSocket;\n} else if (typeof WebSocket !== 'undefined') {\n WebSocketImpl = WebSocket;\n}\n\nexport function setWebSocketImpl(impl) {\n WebSocketImpl = impl;\n}\n\n/**\n * Create a new websocket connection with the given callbacks.\n * @constructor\n * @implements {Transport}\n */\nexport class WebSocketConnection implements Transport {\n keepaliveTimer: number | null = null;\n frames: string[] | null = null;\n totalFrames = 0;\n bytesSent = 0;\n bytesReceived = 0;\n connURL: string;\n onDisconnect: (a?: boolean) => void;\n onMessage: (msg: Object) => void;\n mySock: any | null;\n private log_: (...a: any[]) => void;\n private stats_: StatsCollection;\n private everConnected_: boolean;\n private isClosed_: boolean;\n\n /**\n * @param {string} connId identifier for this transport\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n */\n constructor(\n public connId: string,\n repoInfo: RepoInfo,\n transportSessionId?: string,\n lastSessionId?: string\n ) {\n this.log_ = logWrapper(this.connId);\n this.stats_ = StatsManager.getCollection(repoInfo);\n this.connURL = WebSocketConnection.connectionURL_(\n repoInfo,\n transportSessionId,\n lastSessionId\n );\n }\n\n /**\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n * @return {string} connection url\n * @private\n */\n private static connectionURL_(\n repoInfo: RepoInfo,\n transportSessionId?: string,\n lastSessionId?: string\n ): string {\n const urlParams: { [k: string]: string } = {};\n urlParams[VERSION_PARAM] = PROTOCOL_VERSION;\n\n if (\n !isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(FORGE_DOMAIN) !== -1\n ) {\n urlParams[REFERER_PARAM] = FORGE_REF;\n }\n if (transportSessionId) {\n urlParams[TRANSPORT_SESSION_PARAM] = transportSessionId;\n }\n if (lastSessionId) {\n urlParams[LAST_SESSION_PARAM] = lastSessionId;\n }\n return repoInfo.connectionURL(WEBSOCKET, urlParams);\n }\n\n /**\n *\n * @param onMessage Callback when messages arrive\n * @param onDisconnect Callback with connection lost.\n */\n open(onMessage: (msg: Object) => void, onDisconnect: (a?: boolean) => void) {\n this.onDisconnect = onDisconnect;\n this.onMessage = onMessage;\n\n this.log_('Websocket connecting to ' + this.connURL);\n\n this.everConnected_ = false;\n // Assume failure until proven otherwise.\n PersistentStorage.set('previous_websocket_failure', true);\n\n try {\n if (isNodeSdk()) {\n const device = ENV_CONSTANTS.NODE_ADMIN ? 'AdminNode' : 'Node';\n // UA Format: Firebase////\n const options: { [k: string]: object } = {\n headers: {\n 'User-Agent': `Firebase/${PROTOCOL_VERSION}/${firebase.SDK_VERSION}/${process.platform}/${device}`\n }\n };\n\n // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.\n const env = process['env'];\n const proxy =\n this.connURL.indexOf('wss://') == 0\n ? env['HTTPS_PROXY'] || env['https_proxy']\n : env['HTTP_PROXY'] || env['http_proxy'];\n\n if (proxy) {\n options['proxy'] = { origin: proxy };\n }\n\n this.mySock = new WebSocketImpl(this.connURL, [], options);\n } else {\n this.mySock = new WebSocketImpl(this.connURL);\n }\n } catch (e) {\n this.log_('Error instantiating WebSocket.');\n const error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n return;\n }\n\n this.mySock.onopen = () => {\n this.log_('Websocket connected.');\n this.everConnected_ = true;\n };\n\n this.mySock.onclose = () => {\n this.log_('Websocket connection was disconnected.');\n this.mySock = null;\n this.onClosed_();\n };\n\n this.mySock.onmessage = (m: object) => {\n this.handleIncomingFrame(m);\n };\n\n this.mySock.onerror = (e: any) => {\n this.log_('WebSocket error. Closing connection.');\n const error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n };\n }\n\n /**\n * No-op for websockets, we don't need to do anything once the connection is confirmed as open\n */\n start() {}\n\n static forceDisallow_: Boolean;\n\n static forceDisallow() {\n WebSocketConnection.forceDisallow_ = true;\n }\n\n static isAvailable(): boolean {\n let isOldAndroid = false;\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n const oldAndroidRegex = /Android ([0-9]{0,}\\.[0-9]{0,})/;\n const oldAndroidMatch = navigator.userAgent.match(oldAndroidRegex);\n if (oldAndroidMatch && oldAndroidMatch.length > 1) {\n if (parseFloat(oldAndroidMatch[1]) < 4.4) {\n isOldAndroid = true;\n }\n }\n }\n\n return (\n !isOldAndroid &&\n WebSocketImpl !== null &&\n !WebSocketConnection.forceDisallow_\n );\n }\n\n /**\n * Number of response before we consider the connection \"healthy.\"\n * @type {number}\n */\n static responsesRequiredToBeHealthy = 2;\n\n /**\n * Time to wait for the connection te become healthy before giving up.\n * @type {number}\n */\n static healthyTimeout = 30000;\n\n /**\n * Returns true if we previously failed to connect with this transport.\n * @return {boolean}\n */\n static previouslyFailed(): boolean {\n // If our persistent storage is actually only in-memory storage,\n // we default to assuming that it previously failed to be safe.\n return (\n PersistentStorage.isInMemoryStorage ||\n PersistentStorage.get('previous_websocket_failure') === true\n );\n }\n\n markConnectionHealthy() {\n PersistentStorage.remove('previous_websocket_failure');\n }\n\n private appendFrame_(data: string) {\n this.frames.push(data);\n if (this.frames.length == this.totalFrames) {\n const fullMess = this.frames.join('');\n this.frames = null;\n const jsonMess = jsonEval(fullMess);\n\n //handle the message\n this.onMessage(jsonMess);\n }\n }\n\n /**\n * @param {number} frameCount The number of frames we are expecting from the server\n * @private\n */\n private handleNewFrameCount_(frameCount: number) {\n this.totalFrames = frameCount;\n this.frames = [];\n }\n\n /**\n * Attempts to parse a frame count out of some text. If it can't, assumes a value of 1\n * @param {!String} data\n * @return {?String} Any remaining data to be process, or null if there is none\n * @private\n */\n private extractFrameCount_(data: string): string | null {\n assert(this.frames === null, 'We already have a frame buffer');\n // TODO: The server is only supposed to send up to 9999 frames (i.e. length <= 4), but that isn't being enforced\n // currently. So allowing larger frame counts (length <= 6). See https://app.asana.com/0/search/8688598998380/8237608042508\n if (data.length <= 6) {\n const frameCount = Number(data);\n if (!isNaN(frameCount)) {\n this.handleNewFrameCount_(frameCount);\n return null;\n }\n }\n this.handleNewFrameCount_(1);\n return data;\n }\n\n /**\n * Process a websocket frame that has arrived from the server.\n * @param mess The frame data\n */\n handleIncomingFrame(mess: { [k: string]: any }) {\n if (this.mySock === null) return; // Chrome apparently delivers incoming packets even after we .close() the connection sometimes.\n const data = mess['data'] as string;\n this.bytesReceived += data.length;\n this.stats_.incrementCounter('bytes_received', data.length);\n\n this.resetKeepAlive();\n\n if (this.frames !== null) {\n // we're buffering\n this.appendFrame_(data);\n } else {\n // try to parse out a frame count, otherwise, assume 1 and process it\n const remainingData = this.extractFrameCount_(data);\n if (remainingData !== null) {\n this.appendFrame_(remainingData);\n }\n }\n }\n\n /**\n * Send a message to the server\n * @param {Object} data The JSON object to transmit\n */\n send(data: Object) {\n this.resetKeepAlive();\n\n const dataStr = stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n\n //We can only fit a certain amount in each websocket frame, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n\n const dataSegs = splitStringBySize(dataStr, WEBSOCKET_MAX_FRAME_SIZE);\n\n //Send the length header\n if (dataSegs.length > 1) {\n this.sendString_(String(dataSegs.length));\n }\n\n //Send the actual data in segments.\n for (let i = 0; i < dataSegs.length; i++) {\n this.sendString_(dataSegs[i]);\n }\n }\n\n private shutdown_() {\n this.isClosed_ = true;\n if (this.keepaliveTimer) {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = null;\n }\n\n if (this.mySock) {\n this.mySock.close();\n this.mySock = null;\n }\n }\n\n private onClosed_() {\n if (!this.isClosed_) {\n this.log_('WebSocket is closing itself');\n this.shutdown_();\n\n // since this is an internal close, trigger the close listener\n if (this.onDisconnect) {\n this.onDisconnect(this.everConnected_);\n this.onDisconnect = null;\n }\n }\n }\n\n /**\n * External-facing close handler.\n * Close the websocket and kill the connection.\n */\n close() {\n if (!this.isClosed_) {\n this.log_('WebSocket is being closed');\n this.shutdown_();\n }\n }\n\n /**\n * Kill the current keepalive timer and start a new one, to ensure that it always fires N seconds after\n * the last activity.\n */\n resetKeepAlive() {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = setInterval(() => {\n //If there has been no websocket activity for a while, send a no-op\n if (this.mySock) {\n this.sendString_('0');\n }\n this.resetKeepAlive();\n }, Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL)) as any;\n }\n\n /**\n * Send a string over the websocket.\n *\n * @param {string} str String to send.\n * @private\n */\n private sendString_(str: string) {\n // Firefox seems to sometimes throw exceptions (NS_ERROR_UNEXPECTED) from websocket .send()\n // calls for some unknown reason. We treat these as an error and disconnect.\n // See https://app.asana.com/0/58926111402292/68021340250410\n try {\n this.mySock.send(str);\n } catch (e) {\n this.log_(\n 'Exception thrown from WebSocket.send():',\n e.message || e.data,\n 'Closing connection.'\n );\n setTimeout(this.onClosed_.bind(this), 0);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/WebSocketConnection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../Path';\nimport { RepoInfo } from '../../RepoInfo';\nimport { warnIfPageIsSecure, fatal } from '../util';\n\n/**\n * @param {!string} pathString\n * @return {string}\n */\nfunction decodePath(pathString: string): string {\n let pathStringDecoded = '';\n const pieces = pathString.split('/');\n for (let i = 0; i < pieces.length; i++) {\n if (pieces[i].length > 0) {\n let piece = pieces[i];\n try {\n piece = decodeURIComponent(piece.replace(/\\+/g, ' '));\n } catch (e) {}\n pathStringDecoded += '/' + piece;\n }\n }\n return pathStringDecoded;\n}\n\n/**\n *\n * @param {!string} dataURL\n * @return {{repoInfo: !RepoInfo, path: !Path}}\n */\nexport const parseRepoInfo = function(\n dataURL: string\n): { repoInfo: RepoInfo; path: Path } {\n const parsedUrl = parseURL(dataURL),\n namespace = parsedUrl.subdomain;\n\n if (parsedUrl.domain === 'firebase') {\n fatal(\n parsedUrl.host +\n ' is no longer supported. ' +\n 'Please use .firebaseio.com instead'\n );\n }\n\n // Catch common error of uninitialized namespace value.\n if (!namespace || namespace == 'undefined') {\n fatal(\n 'Cannot parse Firebase url. Please use https://.firebaseio.com'\n );\n }\n\n if (!parsedUrl.secure) {\n warnIfPageIsSecure();\n }\n\n const webSocketOnly = parsedUrl.scheme === 'ws' || parsedUrl.scheme === 'wss';\n\n return {\n repoInfo: new RepoInfo(\n parsedUrl.host,\n parsedUrl.secure,\n namespace,\n webSocketOnly\n ),\n path: new Path(parsedUrl.pathString)\n };\n};\n\n/**\n *\n * @param {!string} dataURL\n * @return {{host: string, port: number, domain: string, subdomain: string, secure: boolean, scheme: string, pathString: string}}\n */\nexport const parseURL = function(\n dataURL: string\n): {\n host: string;\n port: number;\n domain: string;\n subdomain: string;\n secure: boolean;\n scheme: string;\n pathString: string;\n} {\n // Default to empty strings in the event of a malformed string.\n let host = '',\n domain = '',\n subdomain = '',\n pathString = '';\n\n // Always default to SSL, unless otherwise specified.\n let secure = true,\n scheme = 'https',\n port = 443;\n\n // Don't do any validation here. The caller is responsible for validating the result of parsing.\n if (typeof dataURL === 'string') {\n // Parse scheme.\n let colonInd = dataURL.indexOf('//');\n if (colonInd >= 0) {\n scheme = dataURL.substring(0, colonInd - 1);\n dataURL = dataURL.substring(colonInd + 2);\n }\n\n // Parse host and path.\n let slashInd = dataURL.indexOf('/');\n if (slashInd === -1) {\n slashInd = dataURL.length;\n }\n host = dataURL.substring(0, slashInd);\n pathString = decodePath(dataURL.substring(slashInd));\n\n const parts = host.split('.');\n if (parts.length === 3) {\n // Normalize namespaces to lowercase to share storage / connection.\n domain = parts[1];\n subdomain = parts[0].toLowerCase();\n } else if (parts.length === 2) {\n domain = parts[0];\n }\n\n // If we have a port, use scheme for determining if it's secure.\n colonInd = host.indexOf(':');\n if (colonInd >= 0) {\n secure = scheme === 'https' || scheme === 'wss';\n port = parseInt(host.substring(colonInd + 1), 10);\n }\n }\n\n return {\n host,\n port,\n domain,\n subdomain,\n secure,\n scheme,\n pathString\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/libs/parser.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * Check to make sure the appropriate number of arguments are provided for a public function.\n * Throws an error if it fails.\n *\n * @param {!string} fnName The function name\n * @param {!number} minCount The minimum number of arguments to allow for the function call\n * @param {!number} maxCount The maximum number of argument to allow for the function call\n * @param {!number} argCount The actual number of arguments provided.\n */\nexport const validateArgCount = function(fnName, minCount, maxCount, argCount) {\n var argError;\n if (argCount < minCount) {\n argError = 'at least ' + minCount;\n } else if (argCount > maxCount) {\n argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\n }\n if (argError) {\n var error =\n fnName +\n ' failed: Was called with ' +\n argCount +\n (argCount === 1 ? ' argument.' : ' arguments.') +\n ' Expects ' +\n argError +\n '.';\n throw new Error(error);\n }\n};\n\n/**\n * Generates a string to prefix an error message about failed argument validation\n *\n * @param {!string} fnName The function name\n * @param {!number} argumentNumber The index of the argument\n * @param {boolean} optional Whether or not the argument is optional\n * @return {!string} The prefix to add to the error thrown for validation.\n */\nexport function errorPrefix(fnName, argumentNumber, optional) {\n var argName = '';\n switch (argumentNumber) {\n case 1:\n argName = optional ? 'first' : 'First';\n break;\n case 2:\n argName = optional ? 'second' : 'Second';\n break;\n case 3:\n argName = optional ? 'third' : 'Third';\n break;\n case 4:\n argName = optional ? 'fourth' : 'Fourth';\n break;\n default:\n throw new Error(\n 'errorPrefix called with argumentNumber > 4. Need to update it?'\n );\n }\n\n var error = fnName + ' failed: ';\n\n error += argName + ' argument ';\n return error;\n}\n\n/**\n * @param {!string} fnName\n * @param {!number} argumentNumber\n * @param {!string} namespace\n * @param {boolean} optional\n */\nexport const validateNamespace = function(\n fnName,\n argumentNumber,\n namespace,\n optional\n) {\n if (optional && !namespace) return;\n if (typeof namespace !== 'string') {\n //TODO: I should do more validation here. We only allow certain chars in namespaces.\n throw new Error(\n errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid firebase namespace.'\n );\n }\n};\n\nexport const validateCallback = function(\n fnName,\n argumentNumber,\n callback,\n optional\n) {\n if (optional && !callback) return;\n if (typeof callback !== 'function')\n throw new Error(\n errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid function.'\n );\n};\n\nexport const validateContextObject = function(\n fnName,\n argumentNumber,\n context,\n optional\n) {\n if (optional && !context) return;\n if (typeof context !== 'object' || context === null)\n throw new Error(\n errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid context object.'\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/validation.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { nameCompare } from '../util/util';\nimport { NamedNode } from './Node';\n\nexport function NAME_ONLY_COMPARATOR(left: NamedNode, right: NamedNode) {\n return nameCompare(left.name, right.name);\n}\n\nexport function NAME_COMPARATOR(left: string, right: string) {\n return nameCompare(left, right);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/comparators.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ChildrenNode } from './ChildrenNode';\nimport { LeafNode } from './LeafNode';\nimport { NamedNode, Node } from './Node';\nimport { forEach, contains } from '../../../utils/obj';\nimport { assert } from '../../../utils/assert';\nimport { buildChildSet } from './childSet';\nimport { NAME_COMPARATOR, NAME_ONLY_COMPARATOR } from './comparators';\nimport { IndexMap } from './IndexMap';\nimport { PRIORITY_INDEX, setNodeFromJSON } from './indexes/PriorityIndex';\nimport { SortedMap } from '../util/SortedMap';\n\nconst USE_HINZE = true;\n\n/**\n * Constructs a snapshot node representing the passed JSON and returns it.\n * @param {*} json JSON to create a node for.\n * @param {?string|?number=} priority Optional priority to use. This will be ignored if the\n * passed JSON contains a .priority property.\n * @return {!Node}\n */\nexport function nodeFromJSON(\n json: any | null,\n priority: string | number | null = null\n): Node {\n if (json === null) {\n return ChildrenNode.EMPTY_NODE;\n }\n\n if (typeof json === 'object' && '.priority' in json) {\n priority = json['.priority'];\n }\n\n assert(\n priority === null ||\n typeof priority === 'string' ||\n typeof priority === 'number' ||\n (typeof priority === 'object' && '.sv' in (priority as object)),\n 'Invalid priority type found: ' + typeof priority\n );\n\n if (typeof json === 'object' && '.value' in json && json['.value'] !== null) {\n json = json['.value'];\n }\n\n // Valid leaf nodes include non-objects or server-value wrapper objects\n if (typeof json !== 'object' || '.sv' in json) {\n const jsonLeaf = json as string | number | boolean | object;\n return new LeafNode(jsonLeaf, nodeFromJSON(priority));\n }\n\n if (!(json instanceof Array) && USE_HINZE) {\n const children: NamedNode[] = [];\n let childrenHavePriority = false;\n const hinzeJsonObj: { [k: string]: any } = json as object;\n forEach(hinzeJsonObj, (key: string, child: any) => {\n if (typeof key !== 'string' || key.substring(0, 1) !== '.') {\n // Ignore metadata nodes\n const childNode = nodeFromJSON(hinzeJsonObj[key]);\n if (!childNode.isEmpty()) {\n childrenHavePriority =\n childrenHavePriority || !childNode.getPriority().isEmpty();\n children.push(new NamedNode(key, childNode));\n }\n }\n });\n\n if (children.length == 0) {\n return ChildrenNode.EMPTY_NODE;\n }\n\n const childSet = buildChildSet(\n children,\n NAME_ONLY_COMPARATOR,\n namedNode => namedNode.name,\n NAME_COMPARATOR\n ) as SortedMap;\n if (childrenHavePriority) {\n const sortedChildSet = buildChildSet(\n children,\n PRIORITY_INDEX.getCompare()\n );\n return new ChildrenNode(\n childSet,\n nodeFromJSON(priority),\n new IndexMap(\n { '.priority': sortedChildSet },\n { '.priority': PRIORITY_INDEX }\n )\n );\n } else {\n return new ChildrenNode(\n childSet,\n nodeFromJSON(priority),\n IndexMap.Default\n );\n }\n } else {\n let node: Node = ChildrenNode.EMPTY_NODE;\n const jsonObj = json as object;\n forEach(jsonObj, (key: string, childData: any) => {\n if (contains(jsonObj, key)) {\n if (key.substring(0, 1) !== '.') {\n // ignore metadata nodes.\n const childNode = nodeFromJSON(childData);\n if (childNode.isLeafNode() || !childNode.isEmpty())\n node = node.updateImmediateChild(key, childNode);\n }\n }\n });\n\n return node.updatePriority(nodeFromJSON(priority));\n }\n}\n\nsetNodeFromJSON(nodeFromJSON);\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/nodeFromJSON.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Index } from './Index';\nimport { Node, NamedNode } from '../Node';\nimport { nameCompare, MAX_NAME } from '../../util/util';\nimport { assert, assertionError } from '../../../../utils/assert';\nimport { ChildrenNode } from '../ChildrenNode';\n\nlet __EMPTY_NODE: ChildrenNode;\n\nexport class KeyIndex extends Index {\n static get __EMPTY_NODE() {\n return __EMPTY_NODE;\n }\n\n static set __EMPTY_NODE(val) {\n __EMPTY_NODE = val;\n }\n\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n return nameCompare(a.name, b.name);\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n // We could probably return true here (since every node has a key), but it's never called\n // so just leaving unimplemented for now.\n throw assertionError('KeyIndex.isDefinedOn not expected to be called.');\n }\n\n /**\n * @inheritDoc\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n return false; // The key for a node never changes.\n }\n\n /**\n * @inheritDoc\n */\n minPost() {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n // TODO: This should really be created once and cached in a static property, but\n // NamedNode isn't defined yet, so I can't use it in a static. Bleh.\n return new NamedNode(MAX_NAME, __EMPTY_NODE);\n }\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n makePost(indexValue: string, name: string): NamedNode {\n assert(\n typeof indexValue === 'string',\n 'KeyIndex indexValue must always be a string.'\n );\n // We just use empty node, but it'll never be compared, since our comparator only looks at name.\n return new NamedNode(indexValue, __EMPTY_NODE);\n }\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n toString(): string {\n return '.key';\n }\n}\n\nexport const KEY_INDEX = new KeyIndex();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/KeyIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { doubleToIEEE754String } from '../util/util';\nimport { contains } from '../../../utils/obj';\nimport { Node } from './Node';\n\nlet MAX_NODE: Node;\n\nexport function setMaxNode(val: Node) {\n MAX_NODE = val;\n}\n\n/**\n * @param {(!string|!number)} priority\n * @return {!string}\n */\nexport const priorityHashText = function(priority: string | number): string {\n if (typeof priority === 'number')\n return 'number:' + doubleToIEEE754String(priority);\n else return 'string:' + priority;\n};\n\n/**\n * Validates that a priority snapshot Node is valid.\n *\n * @param {!Node} priorityNode\n */\nexport const validatePriorityNode = function(priorityNode: Node) {\n if (priorityNode.isLeafNode()) {\n const val = priorityNode.val();\n assert(\n typeof val === 'string' ||\n typeof val === 'number' ||\n (typeof val === 'object' && contains(val, '.sv')),\n 'Priority must be a string or number.'\n );\n } else {\n assert(\n priorityNode === MAX_NODE || priorityNode.isEmpty(),\n 'priority of unexpected type.'\n );\n }\n // Don't call getPriority() on MAX_NODE to avoid hitting assertion.\n assert(\n priorityNode === MAX_NODE || priorityNode.getPriority().isEmpty(),\n \"Priority nodes can't have a priority of their own.\"\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/snap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { doubleToIEEE754String, sha1 } from '../util/util';\nimport { priorityHashText, validatePriorityNode } from './snap';\nimport { Node } from './Node';\nimport { Path } from '../util/Path';\nimport { Index } from './indexes/Index';\nimport { ChildrenNodeConstructor } from './ChildrenNode';\n\nlet __childrenNodeConstructor: ChildrenNodeConstructor;\n\n/**\n * LeafNode is a class for storing leaf nodes in a DataSnapshot. It\n * implements Node and stores the value of the node (a string,\n * number, or boolean) accessible via getValue().\n */\nexport class LeafNode implements Node {\n static set __childrenNodeConstructor(val: ChildrenNodeConstructor) {\n __childrenNodeConstructor = val;\n }\n\n static get __childrenNodeConstructor() {\n return __childrenNodeConstructor;\n }\n\n /**\n * The sort order for comparing leaf nodes of different types. If two leaf nodes have\n * the same type, the comparison falls back to their value\n * @type {Array.}\n * @const\n */\n static VALUE_TYPE_ORDER = ['object', 'boolean', 'number', 'string'];\n\n private lazyHash_: string | null = null;\n\n /**\n * @implements {Node}\n * @param {!(string|number|boolean|Object)} value_ The value to store in this leaf node.\n * The object type is possible in the event of a deferred value\n * @param {!Node=} priorityNode_ The priority of this node.\n */\n constructor(\n private readonly value_: string | number | boolean | object,\n private priorityNode_: Node = LeafNode.__childrenNodeConstructor.EMPTY_NODE\n ) {\n assert(\n this.value_ !== undefined && this.value_ !== null,\n \"LeafNode shouldn't be created with null/undefined value.\"\n );\n\n validatePriorityNode(this.priorityNode_);\n }\n\n /** @inheritDoc */\n isLeafNode(): boolean {\n return true;\n }\n\n /** @inheritDoc */\n getPriority(): Node {\n return this.priorityNode_;\n }\n\n /** @inheritDoc */\n updatePriority(newPriorityNode: Node): Node {\n return new LeafNode(this.value_, newPriorityNode);\n }\n\n /** @inheritDoc */\n getImmediateChild(childName: string): Node {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.priorityNode_;\n } else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n }\n\n /** @inheritDoc */\n getChild(path: Path): Node {\n if (path.isEmpty()) {\n return this;\n } else if (path.getFront() === '.priority') {\n return this.priorityNode_;\n } else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n }\n\n /**\n * @inheritDoc\n */\n hasChild(): boolean {\n return false;\n }\n\n /** @inheritDoc */\n getPredecessorChildName(childName: String, childNode: Node): null {\n return null;\n }\n\n /** @inheritDoc */\n updateImmediateChild(childName: string, newChildNode: Node): Node {\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n } else if (newChildNode.isEmpty() && childName !== '.priority') {\n return this;\n } else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE\n .updateImmediateChild(childName, newChildNode)\n .updatePriority(this.priorityNode_);\n }\n }\n\n /** @inheritDoc */\n updateChild(path: Path, newChildNode: Node): Node {\n const front = path.getFront();\n if (front === null) {\n return newChildNode;\n } else if (newChildNode.isEmpty() && front !== '.priority') {\n return this;\n } else {\n assert(\n front !== '.priority' || path.getLength() === 1,\n '.priority must be the last token in a path'\n );\n\n return this.updateImmediateChild(\n front,\n LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateChild(\n path.popFront(),\n newChildNode\n )\n );\n }\n }\n\n /** @inheritDoc */\n isEmpty(): boolean {\n return false;\n }\n\n /** @inheritDoc */\n numChildren(): number {\n return 0;\n }\n\n /** @inheritDoc */\n forEachChild(index: Index, action: (s: string, n: Node) => void): any {\n return false;\n }\n\n /**\n * @inheritDoc\n */\n val(exportFormat?: boolean): Object {\n if (exportFormat && !this.getPriority().isEmpty())\n return {\n '.value': this.getValue(),\n '.priority': this.getPriority().val()\n };\n else return this.getValue();\n }\n\n /** @inheritDoc */\n hash(): string {\n if (this.lazyHash_ === null) {\n let toHash = '';\n if (!this.priorityNode_.isEmpty())\n toHash +=\n 'priority:' +\n priorityHashText(this.priorityNode_.val() as number | string) +\n ':';\n\n const type = typeof this.value_;\n toHash += type + ':';\n if (type === 'number') {\n toHash += doubleToIEEE754String(this.value_ as number);\n } else {\n toHash += this.value_;\n }\n this.lazyHash_ = sha1(toHash);\n }\n return this.lazyHash_;\n }\n\n /**\n * Returns the value of the leaf node.\n * @return {Object|string|number|boolean} The value of the node.\n */\n getValue(): object | string | number | boolean {\n return this.value_;\n }\n\n /**\n * @inheritDoc\n */\n compareTo(other: Node): number {\n if (other === LeafNode.__childrenNodeConstructor.EMPTY_NODE) {\n return 1;\n } else if (other instanceof LeafNode.__childrenNodeConstructor) {\n return -1;\n } else {\n assert(other.isLeafNode(), 'Unknown node type');\n return this.compareToLeafNode_(other as LeafNode);\n }\n }\n\n /**\n * Comparison specifically for two leaf nodes\n * @param {!LeafNode} otherLeaf\n * @return {!number}\n * @private\n */\n private compareToLeafNode_(otherLeaf: LeafNode): number {\n const otherLeafType = typeof otherLeaf.value_;\n const thisLeafType = typeof this.value_;\n const otherIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(otherLeafType);\n const thisIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(thisLeafType);\n assert(otherIndex >= 0, 'Unknown leaf type: ' + otherLeafType);\n assert(thisIndex >= 0, 'Unknown leaf type: ' + thisLeafType);\n if (otherIndex === thisIndex) {\n // Same type, compare values\n if (thisLeafType === 'object') {\n // Deferred value nodes are all equal, but we should also never get to this point...\n return 0;\n } else {\n // Note that this works because true > false, all others are number or string comparisons\n if (this.value_ < otherLeaf.value_) {\n return -1;\n } else if (this.value_ === otherLeaf.value_) {\n return 0;\n } else {\n return 1;\n }\n }\n } else {\n return thisIndex - otherIndex;\n }\n }\n\n /**\n * @inheritDoc\n */\n withIndex(): Node {\n return this;\n }\n\n /**\n * @inheritDoc\n */\n isIndexed(): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n equals(other: Node): boolean {\n /**\n * @inheritDoc\n */\n if (other === this) {\n return true;\n } else if (other.isLeafNode()) {\n const otherLeaf = other as LeafNode;\n return (\n this.value_ === otherLeaf.value_ &&\n this.priorityNode_.equals(otherLeaf.priorityNode_)\n );\n } else {\n return false;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/LeafNode.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Index } from './Index';\nimport { nameCompare, MAX_NAME } from '../../util/util';\nimport { NamedNode, Node } from '../Node';\nimport { LeafNode } from '../LeafNode';\n\nlet nodeFromJSON: (a: any) => Node;\nlet MAX_NODE: Node;\n\nexport function setNodeFromJSON(val: (a: any) => Node) {\n nodeFromJSON = val;\n}\n\nexport function setMaxNode(val: Node) {\n MAX_NODE = val;\n}\n\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nexport class PriorityIndex extends Index {\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n const aPriority = a.node.getPriority();\n const bPriority = b.node.getPriority();\n const indexCmp = aPriority.compareTo(bPriority);\n if (indexCmp === 0) {\n return nameCompare(a.name, b.name);\n } else {\n return indexCmp;\n }\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n return !node.getPriority().isEmpty();\n }\n\n /**\n * @inheritDoc\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n return !oldNode.getPriority().equals(newNode.getPriority());\n }\n\n /**\n * @inheritDoc\n */\n minPost(): NamedNode {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n return new NamedNode(MAX_NAME, new LeafNode('[PRIORITY-POST]', MAX_NODE));\n }\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n makePost(indexValue: any, name: string): NamedNode {\n const priorityNode = nodeFromJSON(indexValue);\n return new NamedNode(name, new LeafNode('[PRIORITY-POST]', priorityNode));\n }\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n toString(): string {\n return '.priority';\n }\n}\n\nexport const PRIORITY_INDEX = new PriorityIndex();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/PriorityIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { buildChildSet } from './childSet';\nimport { contains, clone, map, safeGet } from '../../../utils/obj';\nimport { NamedNode, Node } from './Node';\nimport { PRIORITY_INDEX } from './indexes/PriorityIndex';\nimport { KEY_INDEX } from './indexes/KeyIndex';\nimport { SortedMap } from '../util/SortedMap';\nimport { Index } from './indexes/Index';\n\nlet _defaultIndexMap: IndexMap;\n\nconst fallbackObject = {};\n\n/**\n *\n * @param {Object.>} indexes\n * @param {Object.} indexSet\n * @constructor\n */\nexport class IndexMap {\n /**\n * The default IndexMap for nodes without a priority\n * @type {!IndexMap}\n * @const\n */\n static get Default(): IndexMap {\n assert(\n fallbackObject && PRIORITY_INDEX,\n 'ChildrenNode.ts has not been loaded'\n );\n _defaultIndexMap =\n _defaultIndexMap ||\n new IndexMap(\n { '.priority': fallbackObject },\n { '.priority': PRIORITY_INDEX }\n );\n return _defaultIndexMap;\n }\n\n constructor(\n private indexes_: {\n [k: string]: SortedMap | /*FallbackType*/ object;\n },\n private indexSet_: { [k: string]: Index }\n ) {}\n\n /**\n *\n * @param {!string} indexKey\n * @return {?SortedMap.}\n */\n get(indexKey: string): SortedMap | null {\n const sortedMap = safeGet(this.indexes_, indexKey);\n if (!sortedMap) throw new Error('No index defined for ' + indexKey);\n\n if (sortedMap === fallbackObject) {\n // The index exists, but it falls back to just name comparison. Return null so that the calling code uses the\n // regular child map\n return null;\n } else {\n return sortedMap;\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n hasIndex(indexDefinition: Index): boolean {\n return contains(this.indexSet_, indexDefinition.toString());\n }\n\n /**\n * @param {!Index} indexDefinition\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n addIndex(\n indexDefinition: Index,\n existingChildren: SortedMap\n ): IndexMap {\n assert(\n indexDefinition !== KEY_INDEX,\n \"KeyIndex always exists and isn't meant to be added to the IndexMap.\"\n );\n const childList = [];\n let sawIndexedValue = false;\n const iter = existingChildren.getIterator(NamedNode.Wrap);\n let next = iter.getNext();\n while (next) {\n sawIndexedValue =\n sawIndexedValue || indexDefinition.isDefinedOn(next.node);\n childList.push(next);\n next = iter.getNext();\n }\n let newIndex;\n if (sawIndexedValue) {\n newIndex = buildChildSet(childList, indexDefinition.getCompare());\n } else {\n newIndex = fallbackObject;\n }\n const indexName = indexDefinition.toString();\n const newIndexSet = clone(this.indexSet_);\n newIndexSet[indexName] = indexDefinition;\n const newIndexes = clone(this.indexes_);\n newIndexes[indexName] = newIndex;\n return new IndexMap(newIndexes, newIndexSet);\n }\n\n /**\n * Ensure that this node is properly tracked in any indexes that we're maintaining\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n addToIndexes(\n namedNode: NamedNode,\n existingChildren: SortedMap\n ): IndexMap {\n const newIndexes = map(\n this.indexes_,\n (indexedChildren: SortedMap, indexName: string) => {\n const index = safeGet(this.indexSet_, indexName);\n assert(index, 'Missing index implementation for ' + indexName);\n if (indexedChildren === fallbackObject) {\n // Check to see if we need to index everything\n if (index.isDefinedOn(namedNode.node)) {\n // We need to build this index\n const childList = [];\n const iter = existingChildren.getIterator(NamedNode.Wrap);\n let next = iter.getNext();\n while (next) {\n if (next.name != namedNode.name) {\n childList.push(next);\n }\n next = iter.getNext();\n }\n childList.push(namedNode);\n return buildChildSet(childList, index.getCompare());\n } else {\n // No change, this remains a fallback\n return fallbackObject;\n }\n } else {\n const existingSnap = existingChildren.get(namedNode.name);\n let newChildren = indexedChildren;\n if (existingSnap) {\n newChildren = newChildren.remove(\n new NamedNode(namedNode.name, existingSnap)\n );\n }\n return newChildren.insert(namedNode, namedNode.node);\n }\n }\n );\n return new IndexMap(newIndexes, this.indexSet_);\n }\n\n /**\n * Create a new IndexMap instance with the given value removed\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n removeFromIndexes(\n namedNode: NamedNode,\n existingChildren: SortedMap\n ): IndexMap {\n const newIndexes = map(this.indexes_, function(\n indexedChildren: SortedMap\n ) {\n if (indexedChildren === fallbackObject) {\n // This is the fallback. Just return it, nothing to do in this case\n return indexedChildren;\n } else {\n const existingSnap = existingChildren.get(namedNode.name);\n if (existingSnap) {\n return indexedChildren.remove(\n new NamedNode(namedNode.name, existingSnap)\n );\n } else {\n // No record of this child\n return indexedChildren;\n }\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/IndexMap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { sha1, MAX_NAME, MIN_NAME } from '../util/util';\nimport { SortedMap, SortedMapIterator } from '../util/SortedMap';\nimport { Node, NamedNode } from './Node';\nimport { validatePriorityNode, priorityHashText, setMaxNode } from './snap';\nimport {\n PRIORITY_INDEX,\n setMaxNode as setPriorityMaxNode\n} from './indexes/PriorityIndex';\nimport { KEY_INDEX, KeyIndex } from './indexes/KeyIndex';\nimport { IndexMap } from './IndexMap';\nimport { LeafNode } from './LeafNode';\nimport { NAME_COMPARATOR } from './comparators';\nimport { Index } from './indexes/Index';\nimport { Path } from '../util/Path';\n\nexport interface ChildrenNodeConstructor {\n new (\n children_: SortedMap,\n priorityNode_: Node | null,\n indexMap_: IndexMap\n ): ChildrenNode;\n EMPTY_NODE: ChildrenNode;\n}\n\n// TODO: For memory savings, don't store priorityNode_ if it's empty.\n\nlet EMPTY_NODE: ChildrenNode;\n\n/**\n * ChildrenNode is a class for storing internal nodes in a DataSnapshot\n * (i.e. nodes with children). It implements Node and stores the\n * list of children in the children property, sorted by child name.\n *\n * @constructor\n * @implements {Node}\n */\nexport class ChildrenNode implements Node {\n private lazyHash_: string | null = null;\n\n static get EMPTY_NODE(): ChildrenNode {\n return (\n EMPTY_NODE ||\n (EMPTY_NODE = new ChildrenNode(\n new SortedMap(NAME_COMPARATOR),\n null,\n IndexMap.Default\n ))\n );\n }\n\n /**\n *\n * @param {!SortedMap.} children_ List of children\n * of this node..\n * @param {?Node} priorityNode_ The priority of this node (as a snapshot node).\n * @param {!IndexMap} indexMap_\n */\n constructor(\n private readonly children_: SortedMap,\n private readonly priorityNode_: Node | null,\n private indexMap_: IndexMap\n ) {\n /**\n * Note: The only reason we allow null priority is for EMPTY_NODE, since we can't use\n * EMPTY_NODE as the priority of EMPTY_NODE. We might want to consider making EMPTY_NODE its own\n * class instead of an empty ChildrenNode.\n */\n if (this.priorityNode_) {\n validatePriorityNode(this.priorityNode_);\n }\n\n if (this.children_.isEmpty()) {\n assert(\n !this.priorityNode_ || this.priorityNode_.isEmpty(),\n 'An empty node cannot have a priority'\n );\n }\n }\n\n /** @inheritDoc */\n isLeafNode(): boolean {\n return false;\n }\n\n /** @inheritDoc */\n getPriority(): Node {\n return this.priorityNode_ || EMPTY_NODE;\n }\n\n /** @inheritDoc */\n updatePriority(newPriorityNode: Node): Node {\n if (this.children_.isEmpty()) {\n // Don't allow priorities on empty nodes\n return this;\n } else {\n return new ChildrenNode(this.children_, newPriorityNode, this.indexMap_);\n }\n }\n\n /** @inheritDoc */\n getImmediateChild(childName: string): Node {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.getPriority();\n } else {\n const child = this.children_.get(childName);\n return child === null ? EMPTY_NODE : child;\n }\n }\n\n /** @inheritDoc */\n getChild(path: Path): Node {\n const front = path.getFront();\n if (front === null) return this;\n\n return this.getImmediateChild(front).getChild(path.popFront());\n }\n\n /** @inheritDoc */\n hasChild(childName: string): boolean {\n return this.children_.get(childName) !== null;\n }\n\n /** @inheritDoc */\n updateImmediateChild(childName: string, newChildNode: Node): Node {\n assert(newChildNode, 'We should always be passing snapshot nodes');\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n } else {\n const namedNode = new NamedNode(childName, newChildNode);\n let newChildren, newIndexMap, newPriority;\n if (newChildNode.isEmpty()) {\n newChildren = this.children_.remove(childName);\n newIndexMap = this.indexMap_.removeFromIndexes(\n namedNode,\n this.children_\n );\n } else {\n newChildren = this.children_.insert(childName, newChildNode);\n newIndexMap = this.indexMap_.addToIndexes(namedNode, this.children_);\n }\n\n newPriority = newChildren.isEmpty() ? EMPTY_NODE : this.priorityNode_;\n return new ChildrenNode(newChildren, newPriority, newIndexMap);\n }\n }\n\n /** @inheritDoc */\n updateChild(path: Path, newChildNode: Node): Node {\n const front = path.getFront();\n if (front === null) {\n return newChildNode;\n } else {\n assert(\n path.getFront() !== '.priority' || path.getLength() === 1,\n '.priority must be the last token in a path'\n );\n const newImmediateChild = this.getImmediateChild(front).updateChild(\n path.popFront(),\n newChildNode\n );\n return this.updateImmediateChild(front, newImmediateChild);\n }\n }\n\n /** @inheritDoc */\n isEmpty(): boolean {\n return this.children_.isEmpty();\n }\n\n /** @inheritDoc */\n numChildren(): number {\n return this.children_.count();\n }\n\n /**\n * @private\n * @type {RegExp}\n */\n private static INTEGER_REGEXP_ = /^(0|[1-9]\\d*)$/;\n\n /** @inheritDoc */\n val(exportFormat?: boolean): object {\n if (this.isEmpty()) return null;\n\n const obj: { [k: string]: Object } = {};\n let numKeys = 0,\n maxKey = 0,\n allIntegerKeys = true;\n this.forEachChild(PRIORITY_INDEX, function(key: string, childNode: Node) {\n obj[key] = childNode.val(exportFormat);\n\n numKeys++;\n if (allIntegerKeys && ChildrenNode.INTEGER_REGEXP_.test(key)) {\n maxKey = Math.max(maxKey, Number(key));\n } else {\n allIntegerKeys = false;\n }\n });\n\n if (!exportFormat && allIntegerKeys && maxKey < 2 * numKeys) {\n // convert to array.\n const array: Object[] = [];\n for (let key in obj) array[(key as any) as number] = obj[key];\n\n return array;\n } else {\n if (exportFormat && !this.getPriority().isEmpty()) {\n obj['.priority'] = this.getPriority().val();\n }\n return obj;\n }\n }\n\n /** @inheritDoc */\n hash(): string {\n if (this.lazyHash_ === null) {\n let toHash = '';\n if (!this.getPriority().isEmpty())\n toHash +=\n 'priority:' +\n priorityHashText(this.getPriority().val() as string | number) +\n ':';\n\n this.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n const childHash = childNode.hash();\n if (childHash !== '') toHash += ':' + key + ':' + childHash;\n });\n\n this.lazyHash_ = toHash === '' ? '' : sha1(toHash);\n }\n return this.lazyHash_;\n }\n\n /** @inheritDoc */\n getPredecessorChildName(\n childName: string,\n childNode: Node,\n index: Index\n ): string {\n const idx = this.resolveIndex_(index);\n if (idx) {\n const predecessor = idx.getPredecessorKey(\n new NamedNode(childName, childNode)\n );\n return predecessor ? predecessor.name : null;\n } else {\n return this.children_.getPredecessorKey(childName);\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n getFirstChildName(indexDefinition: Index): string | null {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n const minKey = idx.minKey();\n return minKey && minKey.name;\n } else {\n return this.children_.minKey();\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n getFirstChild(indexDefinition: Index): NamedNode | null {\n const minKey = this.getFirstChildName(indexDefinition);\n if (minKey) {\n return new NamedNode(minKey, this.children_.get(minKey));\n } else {\n return null;\n }\n }\n\n /**\n * Given an index, return the key name of the largest value we have, according to that index\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n getLastChildName(indexDefinition: Index): string | null {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n const maxKey = idx.maxKey();\n return maxKey && maxKey.name;\n } else {\n return this.children_.maxKey();\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n getLastChild(indexDefinition: Index): NamedNode | null {\n const maxKey = this.getLastChildName(indexDefinition);\n if (maxKey) {\n return new NamedNode(maxKey, this.children_.get(maxKey));\n } else {\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n forEachChild(index: Index, action: (key: string, node: Node) => void): any {\n const idx = this.resolveIndex_(index);\n if (idx) {\n return idx.inorderTraversal(function(wrappedNode) {\n return action(wrappedNode.name, wrappedNode.node);\n });\n } else {\n return this.children_.inorderTraversal(action);\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {SortedMapIterator}\n */\n getIterator(\n indexDefinition: Index\n ): SortedMapIterator {\n return this.getIteratorFrom(indexDefinition.minPost(), indexDefinition);\n }\n\n /**\n *\n * @param {!NamedNode} startPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n getIteratorFrom(\n startPost: NamedNode,\n indexDefinition: Index\n ): SortedMapIterator {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getIteratorFrom(startPost, key => key);\n } else {\n const iterator = this.children_.getIteratorFrom(\n startPost.name,\n NamedNode.Wrap\n );\n let next = iterator.peek();\n while (next != null && indexDefinition.compare(next, startPost) < 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n getReverseIterator(\n indexDefinition: Index\n ): SortedMapIterator {\n return this.getReverseIteratorFrom(\n indexDefinition.maxPost(),\n indexDefinition\n );\n }\n\n /**\n * @param {!NamedNode} endPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n getReverseIteratorFrom(\n endPost: NamedNode,\n indexDefinition: Index\n ): SortedMapIterator {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getReverseIteratorFrom(endPost, function(key) {\n return key;\n });\n } else {\n const iterator = this.children_.getReverseIteratorFrom(\n endPost.name,\n NamedNode.Wrap\n );\n let next = iterator.peek();\n while (next != null && indexDefinition.compare(next, endPost) > 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n }\n\n /**\n * @inheritDoc\n */\n compareTo(other: ChildrenNode): number {\n if (this.isEmpty()) {\n if (other.isEmpty()) {\n return 0;\n } else {\n return -1;\n }\n } else if (other.isLeafNode() || other.isEmpty()) {\n return 1;\n } else if (other === MAX_NODE) {\n return -1;\n } else {\n // Must be another node with children.\n return 0;\n }\n }\n\n /**\n * @inheritDoc\n */\n withIndex(indexDefinition: Index): Node {\n if (\n indexDefinition === KEY_INDEX ||\n this.indexMap_.hasIndex(indexDefinition)\n ) {\n return this;\n } else {\n const newIndexMap = this.indexMap_.addIndex(\n indexDefinition,\n this.children_\n );\n return new ChildrenNode(this.children_, this.priorityNode_, newIndexMap);\n }\n }\n\n /**\n * @inheritDoc\n */\n isIndexed(index: Index): boolean {\n return index === KEY_INDEX || this.indexMap_.hasIndex(index);\n }\n\n /**\n * @inheritDoc\n */\n equals(other: Node): boolean {\n if (other === this) {\n return true;\n } else if (other.isLeafNode()) {\n return false;\n } else {\n const otherChildrenNode = other as ChildrenNode;\n if (!this.getPriority().equals(otherChildrenNode.getPriority())) {\n return false;\n } else if (\n this.children_.count() === otherChildrenNode.children_.count()\n ) {\n const thisIter = this.getIterator(PRIORITY_INDEX);\n const otherIter = otherChildrenNode.getIterator(PRIORITY_INDEX);\n let thisCurrent = thisIter.getNext();\n let otherCurrent = otherIter.getNext();\n while (thisCurrent && otherCurrent) {\n if (\n thisCurrent.name !== otherCurrent.name ||\n !thisCurrent.node.equals(otherCurrent.node)\n ) {\n return false;\n }\n thisCurrent = thisIter.getNext();\n otherCurrent = otherIter.getNext();\n }\n return thisCurrent === null && otherCurrent === null;\n } else {\n return false;\n }\n }\n }\n\n /**\n * Returns a SortedMap ordered by index, or null if the default (by-key) ordering can be used\n * instead.\n *\n * @private\n * @param {!Index} indexDefinition\n * @return {?SortedMap.}\n */\n private resolveIndex_(\n indexDefinition: Index\n ): SortedMap | null {\n if (indexDefinition === KEY_INDEX) {\n return null;\n } else {\n return this.indexMap_.get(indexDefinition.toString());\n }\n }\n}\n\n/**\n * @constructor\n * @extends {ChildrenNode}\n * @private\n */\nexport class MaxNode extends ChildrenNode {\n constructor() {\n super(\n new SortedMap(NAME_COMPARATOR),\n ChildrenNode.EMPTY_NODE,\n IndexMap.Default\n );\n }\n\n compareTo(other: Node): number {\n if (other === this) {\n return 0;\n } else {\n return 1;\n }\n }\n\n equals(other: Node): boolean {\n // Not that we every compare it, but MAX_NODE is only ever equal to itself\n return other === this;\n }\n\n getPriority(): MaxNode {\n return this;\n }\n\n getImmediateChild(childName: string): ChildrenNode {\n return ChildrenNode.EMPTY_NODE;\n }\n\n isEmpty(): boolean {\n return false;\n }\n}\n\n/**\n * Marker that will sort higher than any other snapshot.\n * @type {!MAX_NODE}\n * @const\n */\nexport const MAX_NODE = new MaxNode();\n\n/**\n * Document NamedNode extensions\n */\ndeclare module './Node' {\n interface NamedNode {\n MIN: NamedNode;\n MAX: NamedNode;\n }\n}\n\nObject.defineProperties(NamedNode, {\n MIN: {\n value: new NamedNode(MIN_NAME, ChildrenNode.EMPTY_NODE)\n },\n MAX: {\n value: new NamedNode(MAX_NAME, MAX_NODE)\n }\n});\n\n/**\n * Reference Extensions\n */\nKeyIndex.__EMPTY_NODE = ChildrenNode.EMPTY_NODE;\nLeafNode.__childrenNodeConstructor = ChildrenNode;\nsetMaxNode(MAX_NODE);\nsetPriorityMaxNode(MAX_NODE);\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/ChildrenNode.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { nameCompare } from './util';\nimport { stringLength } from '../../../utils/utf8';\n/**\n * An immutable object representing a parsed path. It's immutable so that you\n * can pass them around to other functions without worrying about them changing\n * it.\n */\n\nexport class Path {\n private pieces_: string[];\n private pieceNum_: number;\n\n /**\n * Singleton to represent an empty path\n *\n * @const\n */\n static get Empty() {\n return new Path('');\n }\n\n /**\n * @param {string|Array.} pathOrString Path string to parse,\n * or another path, or the raw tokens array\n * @param {number=} pieceNum\n */\n constructor(pathOrString: string | string[], pieceNum?: number) {\n if (pieceNum === void 0) {\n this.pieces_ = (pathOrString as string).split('/');\n\n // Remove empty pieces.\n let copyTo = 0;\n for (let i = 0; i < this.pieces_.length; i++) {\n if (this.pieces_[i].length > 0) {\n this.pieces_[copyTo] = this.pieces_[i];\n copyTo++;\n }\n }\n this.pieces_.length = copyTo;\n\n this.pieceNum_ = 0;\n } else {\n this.pieces_ = pathOrString as string[];\n this.pieceNum_ = pieceNum;\n }\n }\n\n getFront(): string | null {\n if (this.pieceNum_ >= this.pieces_.length) return null;\n\n return this.pieces_[this.pieceNum_];\n }\n\n /**\n * @return {number} The number of segments in this path\n */\n getLength(): number {\n return this.pieces_.length - this.pieceNum_;\n }\n\n /**\n * @return {!Path}\n */\n popFront(): Path {\n let pieceNum = this.pieceNum_;\n if (pieceNum < this.pieces_.length) {\n pieceNum++;\n }\n return new Path(this.pieces_, pieceNum);\n }\n\n /**\n * @return {?string}\n */\n getBack(): string | null {\n if (this.pieceNum_ < this.pieces_.length)\n return this.pieces_[this.pieces_.length - 1];\n\n return null;\n }\n\n toString(): string {\n let pathString = '';\n for (let i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '') pathString += '/' + this.pieces_[i];\n }\n\n return pathString || '/';\n }\n\n toUrlEncodedString(): string {\n let pathString = '';\n for (let i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + encodeURIComponent(String(this.pieces_[i]));\n }\n\n return pathString || '/';\n }\n\n /**\n * Shallow copy of the parts of the path.\n *\n * @param {number=} begin\n * @return {!Array}\n */\n slice(begin: number = 0): string[] {\n return this.pieces_.slice(this.pieceNum_ + begin);\n }\n\n /**\n * @return {?Path}\n */\n parent(): Path | null {\n if (this.pieceNum_ >= this.pieces_.length) return null;\n\n const pieces = [];\n for (let i = this.pieceNum_; i < this.pieces_.length - 1; i++)\n pieces.push(this.pieces_[i]);\n\n return new Path(pieces, 0);\n }\n\n /**\n * @param {string|!Path} childPathObj\n * @return {!Path}\n */\n child(childPathObj: string | Path): Path {\n const pieces = [];\n for (let i = this.pieceNum_; i < this.pieces_.length; i++)\n pieces.push(this.pieces_[i]);\n\n if (childPathObj instanceof Path) {\n for (\n let i = childPathObj.pieceNum_;\n i < childPathObj.pieces_.length;\n i++\n ) {\n pieces.push(childPathObj.pieces_[i]);\n }\n } else {\n const childPieces = childPathObj.split('/');\n for (let i = 0; i < childPieces.length; i++) {\n if (childPieces[i].length > 0) pieces.push(childPieces[i]);\n }\n }\n\n return new Path(pieces, 0);\n }\n\n /**\n * @return {boolean} True if there are no segments in this path\n */\n isEmpty(): boolean {\n return this.pieceNum_ >= this.pieces_.length;\n }\n\n /**\n * @param {!Path} outerPath\n * @param {!Path} innerPath\n * @return {!Path} The path from outerPath to innerPath\n */\n static relativePath(outerPath: Path, innerPath: Path): Path {\n const outer = outerPath.getFront(),\n inner = innerPath.getFront();\n if (outer === null) {\n return innerPath;\n } else if (outer === inner) {\n return Path.relativePath(outerPath.popFront(), innerPath.popFront());\n } else {\n throw new Error(\n 'INTERNAL ERROR: innerPath (' +\n innerPath +\n ') is not within ' +\n 'outerPath (' +\n outerPath +\n ')'\n );\n }\n }\n\n /**\n * @param {!Path} left\n * @param {!Path} right\n * @return {number} -1, 0, 1 if left is less, equal, or greater than the right.\n */\n static comparePaths(left: Path, right: Path): number {\n const leftKeys = left.slice();\n const rightKeys = right.slice();\n for (let i = 0; i < leftKeys.length && i < rightKeys.length; i++) {\n const cmp = nameCompare(leftKeys[i], rightKeys[i]);\n if (cmp !== 0) return cmp;\n }\n if (leftKeys.length === rightKeys.length) return 0;\n return leftKeys.length < rightKeys.length ? -1 : 1;\n }\n\n /**\n *\n * @param {Path} other\n * @return {boolean} true if paths are the same.\n */\n equals(other: Path): boolean {\n if (this.getLength() !== other.getLength()) {\n return false;\n }\n\n for (\n let i = this.pieceNum_, j = other.pieceNum_;\n i <= this.pieces_.length;\n i++, j++\n ) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n *\n * @param {!Path} other\n * @return {boolean} True if this path is a parent (or the same as) other\n */\n contains(other: Path): boolean {\n let i = this.pieceNum_;\n let j = other.pieceNum_;\n if (this.getLength() > other.getLength()) {\n return false;\n }\n while (i < this.pieces_.length) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n ++i;\n ++j;\n }\n return true;\n }\n} // end Path\n\n/**\n * Dynamic (mutable) path used to count path lengths.\n *\n * This class is used to efficiently check paths for valid\n * length (in UTF8 bytes) and depth (used in path validation).\n *\n * Throws Error exception if path is ever invalid.\n *\n * The definition of a path always begins with '/'.\n */\nexport class ValidationPath {\n /** @type {!Array} */\n private parts_: string[];\n /** @type {number} Initialize to number of '/' chars needed in path. */\n private byteLength_: number;\n\n /**\n * @param {!Path} path Initial Path.\n * @param {string} errorPrefix_ Prefix for any error messages.\n */\n constructor(path: Path, private errorPrefix_: string) {\n /** @type {!Array} */\n this.parts_ = path.slice();\n /** @type {number} Initialize to number of '/' chars needed in path. */\n this.byteLength_ = Math.max(1, this.parts_.length);\n\n for (let i = 0; i < this.parts_.length; i++) {\n this.byteLength_ += stringLength(this.parts_[i]);\n }\n this.checkValid_();\n }\n\n /** @const {number} Maximum key depth. */\n static get MAX_PATH_DEPTH() {\n return 32;\n }\n\n /** @const {number} Maximum number of (UTF8) bytes in a Firebase path. */\n static get MAX_PATH_LENGTH_BYTES() {\n return 768;\n }\n\n /** @param {string} child */\n push(child: string) {\n // Count the needed '/'\n if (this.parts_.length > 0) {\n this.byteLength_ += 1;\n }\n this.parts_.push(child);\n this.byteLength_ += stringLength(child);\n this.checkValid_();\n }\n\n pop() {\n const last = this.parts_.pop();\n this.byteLength_ -= stringLength(last);\n // Un-count the previous '/'\n if (this.parts_.length > 0) {\n this.byteLength_ -= 1;\n }\n }\n\n private checkValid_() {\n if (this.byteLength_ > ValidationPath.MAX_PATH_LENGTH_BYTES) {\n throw new Error(\n this.errorPrefix_ +\n 'has a key path longer than ' +\n ValidationPath.MAX_PATH_LENGTH_BYTES +\n ' bytes (' +\n this.byteLength_ +\n ').'\n );\n }\n if (this.parts_.length > ValidationPath.MAX_PATH_DEPTH) {\n throw new Error(\n this.errorPrefix_ +\n 'path specified exceeds the maximum depth that can be written (' +\n ValidationPath.MAX_PATH_DEPTH +\n ') or object contains a cycle ' +\n this.toErrorString()\n );\n }\n }\n\n /**\n * String for use in error messages - uses '.' notation for path.\n *\n * @return {string}\n */\n toErrorString(): string {\n if (this.parts_.length == 0) {\n return '';\n }\n return \"in property '\" + this.parts_.join('.') + \"'\";\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/Path.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { forEach } from '../../utils/obj';\nimport { PersistentStorage } from './storage/storage';\nimport { LONG_POLLING, WEBSOCKET } from '../realtime/Constants';\n\n/**\n * A class that holds metadata about a Repo object\n *\n * @constructor\n */\nexport class RepoInfo {\n host: string;\n domain: string;\n internalHost: string;\n\n /**\n * @param {string} host Hostname portion of the url for the repo\n * @param {boolean} secure Whether or not this repo is accessed over ssl\n * @param {string} namespace The namespace represented by the repo\n * @param {boolean} webSocketOnly Whether to prefer websockets over all other transports (used by Nest).\n * @param {string=} persistenceKey Override the default session persistence storage key\n */\n constructor(\n host: string,\n public secure: boolean,\n public namespace: string,\n public webSocketOnly: boolean,\n public persistenceKey: string = ''\n ) {\n this.host = host.toLowerCase();\n this.domain = this.host.substr(this.host.indexOf('.') + 1);\n this.internalHost = PersistentStorage.get('host:' + host) || this.host;\n }\n\n needsQueryParam(): boolean {\n return this.host !== this.internalHost;\n }\n\n isCacheableHost(): boolean {\n return this.internalHost.substr(0, 2) === 's-';\n }\n\n isDemoHost() {\n return this.domain === 'firebaseio-demo.com';\n }\n\n isCustomHost() {\n return (\n this.domain !== 'firebaseio.com' && this.domain !== 'firebaseio-demo.com'\n );\n }\n\n updateHost(newHost: string) {\n if (newHost !== this.internalHost) {\n this.internalHost = newHost;\n if (this.isCacheableHost()) {\n PersistentStorage.set('host:' + this.host, this.internalHost);\n }\n }\n }\n\n /**\n * Returns the websocket URL for this repo\n * @param {string} type of connection\n * @param {Object} params list\n * @return {string} The URL for this repo\n */\n connectionURL(type: string, params: { [k: string]: string }): string {\n assert(typeof type === 'string', 'typeof type must == string');\n assert(typeof params === 'object', 'typeof params must == object');\n\n let connURL: string;\n if (type === WEBSOCKET) {\n connURL =\n (this.secure ? 'wss://' : 'ws://') + this.internalHost + '/.ws?';\n } else if (type === LONG_POLLING) {\n connURL =\n (this.secure ? 'https://' : 'http://') + this.internalHost + '/.lp?';\n } else {\n throw new Error('Unknown connection type: ' + type);\n }\n if (this.needsQueryParam()) {\n params['ns'] = this.namespace;\n }\n\n const pairs: string[] = [];\n\n forEach(params, (key: string, value: string) => {\n pairs.push(key + '=' + value);\n });\n\n return connURL + pairs.join('&');\n }\n\n /** @return {string} */\n toString(): string {\n let str = this.toURLString();\n if (this.persistenceKey) {\n str += '<' + this.persistenceKey + '>';\n }\n return str;\n }\n\n /** @return {string} */\n toURLString(): string {\n return (this.secure ? 'https://' : 'http://') + this.host;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/RepoInfo.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path, ValidationPath } from './Path';\nimport { forEach, contains, safeGet } from '../../../utils/obj';\nimport { isInvalidJSONNumber } from './util';\nimport { errorPrefix as errorPrefixFxn } from '../../../utils/validation';\nimport { stringLength } from '../../../utils/utf8';\nimport { RepoInfo } from '../RepoInfo';\n\n/**\n * True for invalid Firebase keys\n * @type {RegExp}\n * @private\n */\nexport const INVALID_KEY_REGEX_ = /[\\[\\].#$\\/\\u0000-\\u001F\\u007F]/;\n\n/**\n * True for invalid Firebase paths.\n * Allows '/' in paths.\n * @type {RegExp}\n * @private\n */\nexport const INVALID_PATH_REGEX_ = /[\\[\\].#$\\u0000-\\u001F\\u007F]/;\n\n/**\n * Maximum number of characters to allow in leaf value\n * @type {number}\n * @private\n */\nexport const MAX_LEAF_SIZE_ = 10 * 1024 * 1024;\n\n/**\n * @param {*} key\n * @return {boolean}\n */\nexport const isValidKey = function(key: any): boolean {\n return (\n typeof key === 'string' && key.length !== 0 && !INVALID_KEY_REGEX_.test(key)\n );\n};\n\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexport const isValidPathString = function(pathString: string): boolean {\n return (\n typeof pathString === 'string' &&\n pathString.length !== 0 &&\n !INVALID_PATH_REGEX_.test(pathString)\n );\n};\n\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexport const isValidRootPathString = function(pathString: string): boolean {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n\n return isValidPathString(pathString);\n};\n\n/**\n * @param {*} priority\n * @return {boolean}\n */\nexport const isValidPriority = function(priority: any): boolean {\n return (\n priority === null ||\n typeof priority === 'string' ||\n (typeof priority === 'number' && !isInvalidJSONNumber(priority)) ||\n (priority && typeof priority === 'object' && contains(priority, '.sv'))\n );\n};\n\n/**\n * Pre-validate a datum passed as an argument to Firebase function.\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexport const validateFirebaseDataArg = function(\n fnName: string,\n argumentNumber: number,\n data: any,\n path: Path,\n optional: boolean\n) {\n if (optional && data === undefined) return;\n\n validateFirebaseData(\n errorPrefixFxn(fnName, argumentNumber, optional),\n data,\n path\n );\n};\n\n/**\n * Validate a data object client-side before sending to server.\n *\n * @param {string} errorPrefix\n * @param {*} data\n * @param {!Path|!ValidationPath} path_\n */\nexport const validateFirebaseData = function(\n errorPrefix: string,\n data: any,\n path_: Path | ValidationPath\n) {\n const path =\n path_ instanceof Path ? new ValidationPath(path_, errorPrefix) : path_;\n\n if (data === undefined) {\n throw new Error(errorPrefix + 'contains undefined ' + path.toErrorString());\n }\n if (typeof data === 'function') {\n throw new Error(\n errorPrefix +\n 'contains a function ' +\n path.toErrorString() +\n ' with contents = ' +\n data.toString()\n );\n }\n if (isInvalidJSONNumber(data)) {\n throw new Error(\n errorPrefix + 'contains ' + data.toString() + ' ' + path.toErrorString()\n );\n }\n\n // Check max leaf size, but try to avoid the utf8 conversion if we can.\n if (\n typeof data === 'string' &&\n data.length > MAX_LEAF_SIZE_ / 3 &&\n stringLength(data) > MAX_LEAF_SIZE_\n ) {\n throw new Error(\n errorPrefix +\n 'contains a string greater than ' +\n MAX_LEAF_SIZE_ +\n ' utf8 bytes ' +\n path.toErrorString() +\n \" ('\" +\n data.substring(0, 50) +\n \"...')\"\n );\n }\n\n // TODO = Perf = Consider combining the recursive validation of keys into NodeFromJSON\n // to save extra walking of large objects.\n if (data && typeof data === 'object') {\n let hasDotValue = false,\n hasActualChild = false;\n forEach(data, function(key: string, value: any) {\n if (key === '.value') {\n hasDotValue = true;\n } else if (key !== '.priority' && key !== '.sv') {\n hasActualChild = true;\n if (!isValidKey(key)) {\n throw new Error(\n errorPrefix +\n ' contains an invalid key (' +\n key +\n ') ' +\n path.toErrorString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"'\n );\n }\n }\n\n path.push(key);\n validateFirebaseData(errorPrefix, value, path);\n path.pop();\n });\n\n if (hasDotValue && hasActualChild) {\n throw new Error(\n errorPrefix +\n ' contains \".value\" child ' +\n path.toErrorString() +\n ' in addition to actual children.'\n );\n }\n }\n};\n\n/**\n * Pre-validate paths passed in the firebase function.\n *\n * @param {string} errorPrefix\n * @param {Array} mergePaths\n */\nexport const validateFirebaseMergePaths = function(\n errorPrefix: string,\n mergePaths: Path[]\n) {\n let i, curPath;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n const keys = curPath.slice();\n for (let j = 0; j < keys.length; j++) {\n if (keys[j] === '.priority' && j === keys.length - 1) {\n // .priority is OK\n } else if (!isValidKey(keys[j])) {\n throw new Error(\n errorPrefix +\n 'contains an invalid key (' +\n keys[j] +\n ') in path ' +\n curPath.toString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"'\n );\n }\n }\n }\n\n // Check that update keys are not descendants of each other.\n // We rely on the property that sorting guarantees that ancestors come\n // right before descendants.\n mergePaths.sort(Path.comparePaths);\n let prevPath: Path | null = null;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n if (prevPath !== null && prevPath.contains(curPath)) {\n throw new Error(\n errorPrefix +\n 'contains a path ' +\n prevPath.toString() +\n ' that is ancestor of another path ' +\n curPath.toString()\n );\n }\n prevPath = curPath;\n }\n};\n\n/**\n * pre-validate an object passed as an argument to firebase function (\n * must be an object - e.g. for firebase.update()).\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexport const validateFirebaseMergeDataArg = function(\n fnName: string,\n argumentNumber: number,\n data: any,\n path: Path,\n optional: boolean\n) {\n if (optional && data === undefined) return;\n\n const errorPrefix = errorPrefixFxn(fnName, argumentNumber, optional);\n\n if (!(data && typeof data === 'object') || Array.isArray(data)) {\n throw new Error(\n errorPrefix + ' must be an object containing the children to replace.'\n );\n }\n\n const mergePaths: Path[] = [];\n forEach(data, function(key: string, value: any) {\n const curPath = new Path(key);\n validateFirebaseData(errorPrefix, value, path.child(curPath));\n if (curPath.getBack() === '.priority') {\n if (!isValidPriority(value)) {\n throw new Error(\n errorPrefix +\n \"contains an invalid value for '\" +\n curPath.toString() +\n \"', which must be a valid \" +\n 'Firebase priority (a string, finite number, server value, or null).'\n );\n }\n }\n mergePaths.push(curPath);\n });\n validateFirebaseMergePaths(errorPrefix, mergePaths);\n};\n\nexport const validatePriority = function(\n fnName: string,\n argumentNumber: number,\n priority: any,\n optional: boolean\n) {\n if (optional && priority === undefined) return;\n if (isInvalidJSONNumber(priority))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'is ' +\n priority.toString() +\n ', but must be a valid Firebase priority (a string, finite number, ' +\n 'server value, or null).'\n );\n // Special case to allow importing data with a .sv.\n if (!isValidPriority(priority))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid Firebase priority ' +\n '(a string, finite number, server value, or null).'\n );\n};\n\nexport const validateEventType = function(\n fnName: string,\n argumentNumber: number,\n eventType: string,\n optional: boolean\n) {\n if (optional && eventType === undefined) return;\n\n switch (eventType) {\n case 'value':\n case 'child_added':\n case 'child_removed':\n case 'child_changed':\n case 'child_moved':\n break;\n default:\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid event type = \"value\", \"child_added\", \"child_removed\", ' +\n '\"child_changed\", or \"child_moved\".'\n );\n }\n};\n\nexport const validateKey = function(\n fnName: string,\n argumentNumber: number,\n key: string,\n optional: boolean\n) {\n if (optional && key === undefined) return;\n if (!isValidKey(key))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'was an invalid key = \"' +\n key +\n '\". Firebase keys must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\").'\n );\n};\n\nexport const validatePathString = function(\n fnName: string,\n argumentNumber: number,\n pathString: string,\n optional: boolean\n) {\n if (optional && pathString === undefined) return;\n\n if (!isValidPathString(pathString))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'was an invalid path = \"' +\n pathString +\n '\". Paths must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\"'\n );\n};\n\nexport const validateRootPathString = function(\n fnName: string,\n argumentNumber: number,\n pathString: string,\n optional: boolean\n) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n\n validatePathString(fnName, argumentNumber, pathString, optional);\n};\n\nexport const validateWritablePath = function(fnName: string, path: Path) {\n if (path.getFront() === '.info') {\n throw new Error(fnName + \" failed = Can't modify data under /.info/\");\n }\n};\n\nexport const validateUrl = function(\n fnName: string,\n argumentNumber: number,\n parsedUrl: { repoInfo: RepoInfo; path: Path }\n) {\n // TODO = Validate server better.\n const pathString = parsedUrl.path.toString();\n if (\n !(typeof parsedUrl.repoInfo.host === 'string') ||\n parsedUrl.repoInfo.host.length === 0 ||\n !isValidKey(parsedUrl.repoInfo.namespace) ||\n (pathString.length !== 0 && !isValidRootPathString(pathString))\n ) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, false) +\n 'must be a valid firebase URL and ' +\n 'the path can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\".'\n );\n }\n};\n\nexport const validateCredential = function(\n fnName: string,\n argumentNumber: number,\n cred: any,\n optional: boolean\n) {\n if (optional && cred === undefined) return;\n if (!(typeof cred === 'string'))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid credential (a string).'\n );\n};\n\nexport const validateBoolean = function(\n fnName: string,\n argumentNumber: number,\n bool: any,\n optional: boolean\n) {\n if (optional && bool === undefined) return;\n if (typeof bool !== 'boolean')\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) + 'must be a boolean.'\n );\n};\n\nexport const validateString = function(\n fnName: string,\n argumentNumber: number,\n string: any,\n optional: boolean\n) {\n if (optional && string === undefined) return;\n if (!(typeof string === 'string')) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid string.'\n );\n }\n};\n\nexport const validateObject = function(\n fnName: string,\n argumentNumber: number,\n obj: any,\n optional: boolean\n) {\n if (optional && obj === undefined) return;\n if (!(obj && typeof obj === 'object') || obj === null) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid object.'\n );\n }\n};\n\nexport const validateObjectContainsKey = function(\n fnName: string,\n argumentNumber: number,\n obj: any,\n key: string,\n optional: boolean,\n opt_type?: string\n) {\n const objectContainsKey =\n obj && typeof obj === 'object' && contains(obj, key);\n\n if (!objectContainsKey) {\n if (optional) {\n return;\n } else {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\"'\n );\n }\n }\n\n if (opt_type) {\n const val = safeGet(obj, key);\n if (\n (opt_type === 'number' && !(typeof val === 'number')) ||\n (opt_type === 'string' && !(typeof val === 'string')) ||\n (opt_type === 'boolean' && !(typeof val === 'boolean')) ||\n (opt_type === 'function' && !(typeof val === 'function')) ||\n (opt_type === 'object' && !(typeof val === 'object') && val)\n ) {\n if (optional) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'contains invalid value for key \"' +\n key +\n '\" (must be of type \"' +\n opt_type +\n '\")'\n );\n } else {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\" with type \"' +\n opt_type +\n '\"'\n );\n }\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/validation.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { validateArgCount, validateCallback } from '../../utils/validation';\nimport {\n validateWritablePath,\n validateFirebaseDataArg,\n validatePriority,\n validateFirebaseMergeDataArg\n} from '../core/util/validation';\nimport { warn } from '../core/util/util';\nimport { Deferred } from '../../utils/promise';\nimport { Repo } from '../core/Repo';\nimport { Path } from '../core/util/Path';\n\n/**\n * @constructor\n */\nexport class OnDisconnect {\n /**\n * @param {!Repo} repo_\n * @param {!Path} path_\n */\n constructor(private repo_: Repo, private path_: Path) {}\n\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n cancel(onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('OnDisconnect.cancel', 0, 1, arguments.length);\n validateCallback('OnDisconnect.cancel', 1, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectCancel(\n this.path_,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n remove(onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('OnDisconnect.remove', 0, 1, arguments.length);\n validateWritablePath('OnDisconnect.remove', this.path_);\n validateCallback('OnDisconnect.remove', 1, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectSet(\n this.path_,\n null,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*} value\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n set(value: any, onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('OnDisconnect.set', 1, 2, arguments.length);\n validateWritablePath('OnDisconnect.set', this.path_);\n validateFirebaseDataArg('OnDisconnect.set', 1, value, this.path_, false);\n validateCallback('OnDisconnect.set', 2, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectSet(\n this.path_,\n value,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*} value\n * @param {number|string|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n setWithPriority(\n value: any,\n priority: number | string | null,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('OnDisconnect.setWithPriority', 2, 3, arguments.length);\n validateWritablePath('OnDisconnect.setWithPriority', this.path_);\n validateFirebaseDataArg(\n 'OnDisconnect.setWithPriority',\n 1,\n value,\n this.path_,\n false\n );\n validatePriority('OnDisconnect.setWithPriority', 2, priority, false);\n validateCallback('OnDisconnect.setWithPriority', 3, onComplete, true);\n\n const deferred = new Deferred();\n this.repo_.onDisconnectSetWithPriority(\n this.path_,\n value,\n priority,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n update(\n objectToMerge: object,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('OnDisconnect.update', 1, 2, arguments.length);\n validateWritablePath('OnDisconnect.update', this.path_);\n if (Array.isArray(objectToMerge)) {\n const newObjectToMerge: { [k: string]: any } = {};\n for (let i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n warn(\n 'Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the ' +\n 'existing data, or an Object with integer keys if you really do want to only update some of the children.'\n );\n }\n validateFirebaseMergeDataArg(\n 'OnDisconnect.update',\n 1,\n objectToMerge,\n this.path_,\n false\n );\n validateCallback('OnDisconnect.update', 2, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectUpdate(\n this.path_,\n objectToMerge,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/onDisconnect.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { DataSnapshot } from './DataSnapshot';\nimport { validateArgCount } from '../../utils/validation';\n\nexport class TransactionResult {\n /**\n * A type for the resolve value of Firebase.transaction.\n * @constructor\n * @dict\n * @param {boolean} committed\n * @param {DataSnapshot} snapshot\n */\n constructor(public committed: boolean, public snapshot: DataSnapshot) {}\n\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n toJSON(): object {\n validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);\n return { committed: this.committed, snapshot: this.snapshot.toJSON() };\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/TransactionResult.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\n\n/**\n * Fancy ID generator that creates 20-character string identifiers with the\n * following properties:\n *\n * 1. They're based on timestamp so that they sort *after* any existing ids.\n * 2. They contain 72-bits of random data after the timestamp so that IDs won't\n * collide with other clients' IDs.\n * 3. They sort *lexicographically* (so the timestamp is converted to characters\n * that will sort properly).\n * 4. They're monotonically increasing. Even if you generate more than one in\n * the same timestamp, the latter ones will sort after the former ones. We do\n * this by using the previous random bits but \"incrementing\" them by 1 (only\n * in the case of a timestamp collision).\n */\nexport const nextPushId = (function() {\n // Modeled after base64 web-safe chars, but ordered by ASCII.\n const PUSH_CHARS =\n '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n\n // Timestamp of last push, used to prevent local collisions if you push twice\n // in one ms.\n let lastPushTime = 0;\n\n // We generate 72-bits of randomness which get turned into 12 characters and\n // appended to the timestamp to prevent collisions with other clients. We\n // store the last characters we generated because in the event of a collision,\n // we'll use those same characters except \"incremented\" by one.\n const lastRandChars: number[] = [];\n\n return function(now: number) {\n const duplicateTime = now === lastPushTime;\n lastPushTime = now;\n\n let i;\n const timeStampChars = new Array(8);\n for (i = 7; i >= 0; i--) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n // NOTE: Can't use << here because javascript will convert to int and lose\n // the upper bits.\n now = Math.floor(now / 64);\n }\n assert(now === 0, 'Cannot push at time == 0');\n\n let id = timeStampChars.join('');\n\n if (!duplicateTime) {\n for (i = 0; i < 12; i++) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n } else {\n // If the timestamp hasn't changed since last push, use the same random\n // number, except incremented by 1.\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i--) {\n lastRandChars[i] = 0;\n }\n lastRandChars[i]++;\n }\n for (i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n assert(id.length === 20, 'nextPushId: Length should be 20.');\n\n return id;\n };\n})();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/NextPushId.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../util/Path';\nimport { Index } from './indexes/Index';\n\n/**\n * Node is an interface defining the common functionality for nodes in\n * a DataSnapshot.\n *\n * @interface\n */\nexport interface Node {\n /**\n * Whether this node is a leaf node.\n * @return {boolean} Whether this is a leaf node.\n */\n isLeafNode(): boolean;\n\n /**\n * Gets the priority of the node.\n * @return {!Node} The priority of the node.\n */\n getPriority(): Node;\n\n /**\n * Returns a duplicate node with the new priority.\n * @param {!Node} newPriorityNode New priority to set for the node.\n * @return {!Node} Node with new priority.\n */\n updatePriority(newPriorityNode: Node): Node;\n\n /**\n * Returns the specified immediate child, or null if it doesn't exist.\n * @param {string} childName The name of the child to retrieve.\n * @return {!Node} The retrieved child, or an empty node.\n */\n getImmediateChild(childName: string): Node;\n\n /**\n * Returns a child by path, or null if it doesn't exist.\n * @param {!Path} path The path of the child to retrieve.\n * @return {!Node} The retrieved child or an empty node.\n */\n getChild(path: Path): Node;\n\n /**\n * Returns the name of the child immediately prior to the specified childNode, or null.\n * @param {!string} childName The name of the child to find the predecessor of.\n * @param {!Node} childNode The node to find the predecessor of.\n * @param {!Index} index The index to use to determine the predecessor\n * @return {?string} The name of the predecessor child, or null if childNode is the first child.\n */\n getPredecessorChildName(\n childName: String,\n childNode: Node,\n index: Index\n ): string | null;\n\n /**\n * Returns a duplicate node, with the specified immediate child updated.\n * Any value in the node will be removed.\n * @param {string} childName The name of the child to update.\n * @param {!Node} newChildNode The new child node\n * @return {!Node} The updated node.\n */\n updateImmediateChild(childName: string, newChildNode: Node): Node;\n\n /**\n * Returns a duplicate node, with the specified child updated. Any value will\n * be removed.\n * @param {!Path} path The path of the child to update.\n * @param {!Node} newChildNode The new child node, which may be an empty node\n * @return {!Node} The updated node.\n */\n updateChild(path: Path, newChildNode: Node): Node;\n\n /**\n * True if the immediate child specified exists\n * @param {!string} childName\n * @return {boolean}\n */\n hasChild(childName: string): boolean;\n\n /**\n * @return {boolean} True if this node has no value or children.\n */\n isEmpty(): boolean;\n\n /**\n * @return {number} The number of children of this node.\n */\n numChildren(): number;\n\n /**\n * Calls action for each child.\n * @param {!Index} index\n * @param {function(string, !Node)} action Action to be called for\n * each child. It's passed the child name and the child node.\n * @return {*} The first truthy value return by action, or the last falsey one\n */\n forEachChild(index: Index, action: (a: string, b: Node) => void): any;\n\n /**\n * @param {boolean=} exportFormat True for export format (also wire protocol format).\n * @return {*} Value of this node as JSON.\n */\n val(exportFormat?: boolean): Object;\n\n /**\n * @return {string} hash representing the node contents.\n */\n hash(): string;\n\n /**\n * @param {!Node} other Another node\n * @return {!number} -1 for less than, 0 for equal, 1 for greater than other\n */\n compareTo(other: Node): number;\n\n /**\n * @param {!Node} other\n * @return {boolean} Whether or not this snapshot equals other\n */\n equals(other: Node): boolean;\n\n /**\n * @param {!Index} indexDefinition\n * @return {!Node} This node, with the specified index now available\n */\n withIndex(indexDefinition: Index): Node;\n\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n isIndexed(indexDefinition: Index): boolean;\n}\n\n/**\n *\n * @param {!string} name\n * @param {!Node} node\n * @constructor\n * @struct\n */\nexport class NamedNode {\n constructor(public name: string, public node: Node) {}\n\n /**\n *\n * @param {!string} name\n * @param {!Node} node\n * @return {NamedNode}\n */\n static Wrap(name: string, node: Node) {\n return new NamedNode(name, node);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/Node.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Node, NamedNode } from '../Node';\nimport { MIN_NAME, MAX_NAME } from '../../util/util';\nimport { Comparator } from '../../util/SortedMap';\n\n/**\n *\n * @constructor\n */\nexport abstract class Index {\n /**\n * @param {!NamedNode} a\n * @param {!NamedNode} b\n * @return {number}\n */\n abstract compare(a: NamedNode, b: NamedNode): number;\n\n /**\n * @param {!Node} node\n * @return {boolean}\n */\n abstract isDefinedOn(node: Node): boolean;\n\n /**\n * @return {function(!NamedNode, !NamedNode):number} A standalone comparison function for\n * this index\n */\n getCompare(): Comparator {\n return this.compare.bind(this);\n }\n\n /**\n * Given a before and after value for a node, determine if the indexed value has changed. Even if they are different,\n * it's possible that the changes are isolated to parts of the snapshot that are not indexed.\n *\n * @param {!Node} oldNode\n * @param {!Node} newNode\n * @return {boolean} True if the portion of the snapshot being indexed changed between oldNode and newNode\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n const oldWrapped = new NamedNode(MIN_NAME, oldNode);\n const newWrapped = new NamedNode(MIN_NAME, newNode);\n return this.compare(oldWrapped, newWrapped) !== 0;\n }\n\n /**\n * @return {!NamedNode} a node wrapper that will sort equal to or less than\n * any other node wrapper, using this index\n */\n minPost(): NamedNode {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @return {!NamedNode} a node wrapper that will sort greater than or equal to\n * any other node wrapper, using this index\n */\n abstract maxPost(): NamedNode;\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n abstract makePost(indexValue: any, name: string): NamedNode;\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n abstract toString(): string;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/Index.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Implementation of an immutable SortedMap using a Left-leaning\n * Red-Black Tree, adapted from the implementation in Mugs\n * (http://mads379.github.com/mugs/) by Mads Hartmann Jensen\n * (mads379@gmail.com).\n *\n * Original paper on Left-leaning Red-Black Trees:\n * http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf\n *\n * Invariant 1: No red node has a red child\n * Invariant 2: Every leaf path has the same number of black nodes\n * Invariant 3: Only the left child can be red (left leaning)\n */\n\n// TODO: There are some improvements I'd like to make to improve memory / perf:\n// * Create two prototypes, LLRedNode and LLBlackNode, instead of storing a\n// color property in every node.\n// TODO: It would also be good (and possibly necessary) to create a base\n// interface for LLRBNode and LLRBEmptyNode.\n\nexport type Comparator = (key1: K, key2: K) => number;\n\n/**\n * An iterator over an LLRBNode.\n */\nexport class SortedMapIterator {\n /** @private\n * @type {Array.}\n */\n private nodeStack_: (LLRBNode | LLRBEmptyNode)[] = [];\n\n /**\n * @template K, V, T\n * @param {LLRBNode|LLRBEmptyNode} node Node to iterate.\n * @param {?K} startKey\n * @param {function(K, K): number} comparator\n * @param {boolean} isReverse_ Whether or not to iterate in reverse\n * @param {(function(K, V):T)=} resultGenerator_\n */\n constructor(\n node: LLRBNode | LLRBEmptyNode,\n startKey: K | null,\n comparator: Comparator,\n private isReverse_: boolean,\n private resultGenerator_: ((k: K, v: V) => T) | null = null\n ) {\n let cmp = 1;\n while (!node.isEmpty()) {\n node = node as LLRBNode;\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse_) cmp *= -1;\n\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse_) {\n node = node.left;\n } else {\n node = node.right;\n }\n } else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack, but stop iterating;\n this.nodeStack_.push(node);\n break;\n } else {\n // This node is greater than our start key, add it to the stack and move to the next one\n this.nodeStack_.push(node);\n if (this.isReverse_) {\n node = node.right;\n } else {\n node = node.left;\n }\n }\n }\n }\n\n getNext(): T {\n if (this.nodeStack_.length === 0) return null;\n\n let node = this.nodeStack_.pop();\n let result: T;\n if (this.resultGenerator_)\n result = this.resultGenerator_(node.key, node.value);\n else result = { key: node.key, value: node.value } as any;\n\n if (this.isReverse_) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.right;\n }\n } else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.left;\n }\n }\n\n return result;\n }\n\n hasNext(): boolean {\n return this.nodeStack_.length > 0;\n }\n\n peek(): T {\n if (this.nodeStack_.length === 0) return null;\n\n const node = this.nodeStack_[this.nodeStack_.length - 1];\n if (this.resultGenerator_) {\n return this.resultGenerator_(node.key, node.value);\n } else {\n return { key: node.key, value: node.value } as any;\n }\n }\n}\n\n/**\n * Represents a node in a Left-leaning Red-Black tree.\n */\nexport class LLRBNode {\n color: boolean;\n left: LLRBNode | LLRBEmptyNode;\n right: LLRBNode | LLRBEmptyNode;\n\n /**\n * @template K, V\n * @param {!K} key Key associated with this node.\n * @param {!V} value Value associated with this node.\n * @param {?boolean} color Whether this node is red.\n * @param {?(LLRBNode|LLRBEmptyNode)=} left Left child.\n * @param {?(LLRBNode|LLRBEmptyNode)=} right Right child.\n */\n constructor(\n public key: K,\n public value: V,\n color: boolean | null,\n left?: LLRBNode | LLRBEmptyNode | null,\n right?: LLRBNode | LLRBEmptyNode | null\n ) {\n this.color = color != null ? color : LLRBNode.RED;\n this.left =\n left != null ? left : SortedMap.EMPTY_NODE as LLRBEmptyNode;\n this.right =\n right != null ? right : SortedMap.EMPTY_NODE as LLRBEmptyNode;\n }\n\n static RED = true;\n static BLACK = false;\n\n /**\n * Returns a copy of the current node, optionally replacing pieces of it.\n *\n * @param {?K} key New key for the node, or null.\n * @param {?V} value New value for the node, or null.\n * @param {?boolean} color New color for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} left New left child for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} right New right child for the node, or null.\n * @return {!LLRBNode} The node copy.\n */\n copy(\n key: K | null,\n value: V | null,\n color: boolean | null,\n left: LLRBNode | LLRBEmptyNode | null,\n right: LLRBNode | LLRBEmptyNode | null\n ): LLRBNode {\n return new LLRBNode(\n key != null ? key : this.key,\n value != null ? value : this.value,\n color != null ? color : this.color,\n left != null ? left : this.left,\n right != null ? right : this.right\n );\n }\n\n /**\n * @return {number} The total number of nodes in the tree.\n */\n count(): number {\n return this.left.count() + 1 + this.right.count();\n }\n\n /**\n * @return {boolean} True if the tree is empty.\n */\n isEmpty(): boolean {\n return false;\n }\n\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n inorderTraversal(action: (k: K, v: V) => any): boolean {\n return (\n this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action)\n );\n }\n\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!Object, !Object)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} True if traversal was aborted.\n */\n reverseTraversal(action: (k: K, v: V) => void): boolean {\n return (\n this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action)\n );\n }\n\n /**\n * @return {!Object} The minimum node in the tree.\n * @private\n */\n private min_(): LLRBNode {\n if (this.left.isEmpty()) {\n return this;\n } else {\n return (this.left as LLRBNode).min_();\n }\n }\n\n /**\n * @return {!K} The maximum key in the tree.\n */\n minKey(): K {\n return this.min_().key;\n }\n\n /**\n * @return {!K} The maximum key in the tree.\n */\n maxKey(): K {\n if (this.right.isEmpty()) {\n return this.key;\n } else {\n return this.right.maxKey();\n }\n }\n\n /**\n *\n * @param {!Object} key Key to insert.\n * @param {!Object} value Value to insert.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with the key/value added.\n */\n insert(key: K, value: V, comparator: Comparator): LLRBNode {\n let cmp, n;\n n = this;\n cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n } else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n } else {\n n = n.copy(\n null,\n null,\n null,\n null,\n n.right.insert(key, value, comparator)\n );\n }\n return n.fixUp_();\n }\n\n /**\n * @private\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the minimum key removed.\n */\n private removeMin_(): LLRBNode | LLRBEmptyNode {\n if (this.left.isEmpty()) {\n return SortedMap.EMPTY_NODE as LLRBEmptyNode;\n }\n let n: LLRBNode = this;\n if (!n.left.isRed_() && !n.left.left.isRed_()) n = n.moveRedLeft_();\n n = n.copy(null, null, null, (n.left as LLRBNode).removeMin_(), null);\n return n.fixUp_();\n }\n\n /**\n * @param {!Object} key The key of the item to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the specified item removed.\n */\n remove(\n key: K,\n comparator: Comparator\n ): LLRBNode | LLRBEmptyNode {\n let n, smallest;\n n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed_() && !n.left.left.isRed_()) {\n n = n.moveRedLeft_();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n } else {\n if (n.left.isRed_()) n = n.rotateRight_();\n if (!n.right.isEmpty() && !n.right.isRed_() && !n.right.left.isRed_()) {\n n = n.moveRedRight_();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return SortedMap.EMPTY_NODE as LLRBEmptyNode;\n } else {\n smallest = (n.right as LLRBNode).min_();\n n = n.copy(\n smallest.key,\n smallest.value,\n null,\n null,\n (n.right as LLRBNode).removeMin_()\n );\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp_();\n }\n\n /**\n * @private\n * @return {boolean} Whether this is a RED node.\n */\n isRed_(): boolean {\n return this.color;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree after performing any needed rotations.\n */\n private fixUp_(): LLRBNode {\n let n = this as any;\n if (n.right.isRed_() && !n.left.isRed_()) n = n.rotateLeft_();\n if (n.left.isRed_() && n.left.left.isRed_()) n = n.rotateRight_();\n if (n.left.isRed_() && n.right.isRed_()) n = n.colorFlip_();\n return n;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedLeft.\n */\n private moveRedLeft_(): LLRBNode {\n let n = this.colorFlip_();\n if (n.right.left.isRed_()) {\n n = n.copy(\n null,\n null,\n null,\n null,\n (n.right as LLRBNode).rotateRight_()\n );\n n = n.rotateLeft_();\n n = n.colorFlip_();\n }\n return n;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedRight.\n */\n private moveRedRight_(): LLRBNode {\n let n = this.colorFlip_();\n if (n.left.left.isRed_()) {\n n = n.rotateRight_();\n n = n.colorFlip_();\n }\n return n;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateLeft.\n */\n private rotateLeft_(): LLRBNode {\n const nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null) as LLRBNode;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateRight.\n */\n private rotateRight_(): LLRBNode {\n const nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr) as LLRBNode;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after colorFlip.\n */\n private colorFlip_(): LLRBNode {\n const left = this.left.copy(null, null, !this.left.color, null, null);\n const right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n }\n\n /**\n * For testing.\n *\n * @private\n * @return {boolean} True if all is well.\n */\n private checkMaxDepth_(): boolean {\n const blackDepth = this.check_();\n return Math.pow(2.0, blackDepth) <= this.count() + 1;\n }\n\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n check_(): number {\n let blackDepth;\n if (this.isRed_() && this.left.isRed_()) {\n throw new Error(\n 'Red node has red child(' + this.key + ',' + this.value + ')'\n );\n }\n if (this.right.isRed_()) {\n throw new Error(\n 'Right child of (' + this.key + ',' + this.value + ') is red'\n );\n }\n blackDepth = this.left.check_();\n if (blackDepth !== this.right.check_()) {\n throw new Error('Black depths differ');\n } else {\n return blackDepth + (this.isRed_() ? 0 : 1);\n }\n }\n}\n\n/**\n * Represents an empty node (a leaf node in the Red-Black Tree).\n */\nexport class LLRBEmptyNode {\n key: K;\n value: V;\n left: LLRBNode | LLRBEmptyNode;\n right: LLRBNode | LLRBEmptyNode;\n color: boolean;\n\n /**\n * Returns a copy of the current node.\n *\n * @return {!LLRBEmptyNode} The node copy.\n */\n copy(\n key: K | null,\n value: V | null,\n color: boolean | null,\n left: LLRBNode | LLRBEmptyNode | null,\n right: LLRBNode | LLRBEmptyNode | null\n ): LLRBEmptyNode {\n return this;\n }\n\n /**\n * Returns a copy of the tree, with the specified key/value added.\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with item added.\n */\n insert(key: K, value: V, comparator: Comparator): LLRBNode {\n return new LLRBNode(key, value, null);\n }\n\n /**\n * Returns a copy of the tree, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBEmptyNode} New tree, with item removed.\n */\n remove(key: K, comparator: Comparator): LLRBEmptyNode {\n return this;\n }\n\n /**\n * @return {number} The total number of nodes in the tree.\n */\n count(): number {\n return 0;\n }\n\n /**\n * @return {boolean} True if the tree is empty.\n */\n isEmpty(): boolean {\n return true;\n }\n\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n inorderTraversal(action: (k: K, v: V) => any): boolean {\n return false;\n }\n\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n reverseTraversal(action: (k: K, v: V) => void): boolean {\n return false;\n }\n\n /**\n * @return {null}\n */\n minKey(): null {\n return null;\n }\n\n /**\n * @return {null}\n */\n maxKey(): null {\n return null;\n }\n\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n check_(): number {\n return 0;\n }\n\n /**\n * @private\n * @return {boolean} Whether this node is red.\n */\n isRed_() {\n return false;\n }\n}\n\n/**\n * An immutable sorted map implementation, based on a Left-leaning Red-Black\n * tree.\n */\nexport class SortedMap {\n /**\n * Always use the same empty node, to reduce memory.\n * @const\n */\n static EMPTY_NODE = new LLRBEmptyNode();\n\n /**\n * @template K, V\n * @param {function(K, K):number} comparator_ Key comparator.\n * @param {LLRBNode=} root_ (Optional) Root node for the map.\n */\n constructor(\n private comparator_: Comparator,\n private root_:\n | LLRBNode\n | LLRBEmptyNode = SortedMap.EMPTY_NODE as LLRBEmptyNode\n ) {}\n\n /**\n * Returns a copy of the map, with the specified key/value added or replaced.\n * (TODO: We should perhaps rename this method to 'put')\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @return {!SortedMap.} New map, with item added.\n */\n insert(key: K, value: V): SortedMap {\n return new SortedMap(\n this.comparator_,\n this.root_\n .insert(key, value, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null)\n );\n }\n\n /**\n * Returns a copy of the map, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @return {!SortedMap.} New map, with item removed.\n */\n remove(key: K): SortedMap {\n return new SortedMap(\n this.comparator_,\n this.root_\n .remove(key, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null)\n );\n }\n\n /**\n * Returns the value of the node with the given key, or null.\n *\n * @param {!K} key The key to look up.\n * @return {?V} The value of the node with the given key, or null if the\n * key doesn't exist.\n */\n get(key: K): V | null {\n let cmp;\n let node = this.root_;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n return node.value;\n } else if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n }\n\n /**\n * Returns the key of the item *before* the specified key, or null if key is the first item.\n * @param {K} key The key to find the predecessor of\n * @return {?K} The predecessor key.\n */\n getPredecessorKey(key: K): K | null {\n let cmp,\n node = this.root_,\n rightParent = null;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty()) node = node.right;\n return node.key;\n } else if (rightParent) {\n return rightParent.key;\n } else {\n return null; // first item.\n }\n } else if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n\n throw new Error(\n 'Attempted to find predecessor key for a nonexistent key. What gives?'\n );\n }\n\n /**\n * @return {boolean} True if the map is empty.\n */\n isEmpty(): boolean {\n return this.root_.isEmpty();\n }\n\n /**\n * @return {number} The total number of nodes in the map.\n */\n count(): number {\n return this.root_.count();\n }\n\n /**\n * @return {?K} The minimum key in the map.\n */\n minKey(): K | null {\n return this.root_.minKey();\n }\n\n /**\n * @return {?K} The maximum key in the map.\n */\n maxKey(): K | null {\n return this.root_.maxKey();\n }\n\n /**\n * Traverses the map in key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!K, !V):*} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n inorderTraversal(action: (k: K, v: V) => any): boolean {\n return this.root_.inorderTraversal(action);\n }\n\n /**\n * Traverses the map in reverse key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!Object, !Object)} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} True if the traversal was aborted.\n */\n reverseTraversal(action: (k: K, v: V) => void): boolean {\n return this.root_.reverseTraversal(action);\n }\n\n /**\n * Returns an iterator over the SortedMap.\n * @template T\n * @param {(function(K, V):T)=} resultGenerator\n * @return {SortedMapIterator.} The iterator.\n */\n getIterator(\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n null,\n this.comparator_,\n false,\n resultGenerator\n );\n }\n\n getIteratorFrom(\n key: K,\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n key,\n this.comparator_,\n false,\n resultGenerator\n );\n }\n\n getReverseIteratorFrom(\n key: K,\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n key,\n this.comparator_,\n true,\n resultGenerator\n );\n }\n\n getReverseIterator(\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n null,\n this.comparator_,\n true,\n resultGenerator\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/SortedMap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { LLRBNode } from '../util/SortedMap';\nimport { SortedMap } from '../util/SortedMap';\nimport { NamedNode } from './Node';\n\nconst LOG_2 = Math.log(2);\n\n/**\n * @constructor\n */\nclass Base12Num {\n count: number;\n private current_: number;\n private bits_: number;\n\n /**\n * @param {number} length\n */\n constructor(length: number) {\n const logBase2 = (num: number) =>\n parseInt((Math.log(num) / LOG_2) as any, 10);\n const bitMask = (bits: number) => parseInt(Array(bits + 1).join('1'), 2);\n this.count = logBase2(length + 1);\n this.current_ = this.count - 1;\n const mask = bitMask(this.count);\n this.bits_ = (length + 1) & mask;\n }\n\n /**\n * @return {boolean}\n */\n nextBitIsOne(): boolean {\n //noinspection JSBitwiseOperatorUsage\n const result = !(this.bits_ & (0x1 << this.current_));\n this.current_--;\n return result;\n }\n}\n\n/**\n * Takes a list of child nodes and constructs a SortedSet using the given comparison\n * function\n *\n * Uses the algorithm described in the paper linked here:\n * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.1458\n *\n * @template K, V\n * @param {Array.} childList Unsorted list of children\n * @param {function(!NamedNode, !NamedNode):number} cmp The comparison method to be used\n * @param {(function(NamedNode):K)=} keyFn An optional function to extract K from a node wrapper, if K's\n * type is not NamedNode\n * @param {(function(K, K):number)=} mapSortFn An optional override for comparator used by the generated sorted map\n * @return {SortedMap.}\n */\nexport const buildChildSet = function(\n childList: NamedNode[],\n cmp: (a: NamedNode, b: NamedNode) => number,\n keyFn?: (a: NamedNode) => K,\n mapSortFn?: (a: K, b: K) => number\n): SortedMap {\n childList.sort(cmp);\n\n const buildBalancedTree = function(\n low: number,\n high: number\n ): LLRBNode | null {\n const length = high - low;\n let namedNode: NamedNode;\n let key: K;\n if (length == 0) {\n return null;\n } else if (length == 1) {\n namedNode = childList[low];\n key = keyFn ? keyFn(namedNode) : (namedNode as any) as K;\n return new LLRBNode(\n key,\n (namedNode.node as any) as V,\n LLRBNode.BLACK,\n null,\n null\n );\n } else {\n const middle = parseInt((length / 2) as any, 10) + low;\n const left = buildBalancedTree(low, middle);\n const right = buildBalancedTree(middle + 1, high);\n namedNode = childList[middle];\n key = keyFn ? keyFn(namedNode) : (namedNode as any) as K;\n return new LLRBNode(\n key,\n (namedNode.node as any) as V,\n LLRBNode.BLACK,\n left,\n right\n );\n }\n };\n\n const buildFrom12Array = function(base12: Base12Num): LLRBNode {\n let node: LLRBNode = null;\n let root = null;\n let index = childList.length;\n\n const buildPennant = function(chunkSize: number, color: boolean) {\n const low = index - chunkSize;\n const high = index;\n index -= chunkSize;\n const childTree = buildBalancedTree(low + 1, high);\n const namedNode = childList[low];\n const key: K = keyFn ? keyFn(namedNode) : (namedNode as any) as K;\n attachPennant(\n new LLRBNode(key, (namedNode.node as any) as V, color, null, childTree)\n );\n };\n\n const attachPennant = function(pennant: LLRBNode) {\n if (node) {\n node.left = pennant;\n node = pennant;\n } else {\n root = pennant;\n node = pennant;\n }\n };\n\n for (let i = 0; i < base12.count; ++i) {\n const isOne = base12.nextBitIsOne();\n // The number of nodes taken in each slice is 2^(arr.length - (i + 1))\n const chunkSize = Math.pow(2, base12.count - (i + 1));\n if (isOne) {\n buildPennant(chunkSize, LLRBNode.BLACK);\n } else {\n // current == 2\n buildPennant(chunkSize, LLRBNode.BLACK);\n buildPennant(chunkSize, LLRBNode.RED);\n }\n }\n return root;\n };\n\n const base12 = new Base12Num(childList.length);\n const root = buildFrom12Array(base12);\n\n return new SortedMap(mapSortFn || (cmp as any), root);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/childSet.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Index } from './Index';\nimport { NamedNode, Node } from '../Node';\nimport { nameCompare } from '../../util/util';\nimport { nodeFromJSON } from '../nodeFromJSON';\n\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nexport class ValueIndex extends Index {\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n const indexCmp = a.node.compareTo(b.node);\n if (indexCmp === 0) {\n return nameCompare(a.name, b.name);\n } else {\n return indexCmp;\n }\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n return !oldNode.equals(newNode);\n }\n\n /**\n * @inheritDoc\n */\n minPost(): NamedNode {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n return (NamedNode as any).MAX;\n }\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n makePost(indexValue: object, name: string): NamedNode {\n const valueNode = nodeFromJSON(indexValue);\n return new NamedNode(name, valueNode);\n }\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n toString(): string {\n return '.value';\n }\n}\n\nexport const VALUE_INDEX = new ValueIndex();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/ValueIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { KEY_INDEX } from '../core/snap/indexes/KeyIndex';\nimport { PRIORITY_INDEX } from '../core/snap/indexes/PriorityIndex';\nimport { VALUE_INDEX } from '../core/snap/indexes/ValueIndex';\nimport { PathIndex } from '../core/snap/indexes/PathIndex';\nimport { MIN_NAME, MAX_NAME, ObjectToUniqueKey } from '../core/util/util';\nimport { Path } from '../core/util/Path';\nimport {\n isValidPriority,\n validateEventType,\n validatePathString,\n validateFirebaseDataArg,\n validateKey\n} from '../core/util/validation';\nimport {\n errorPrefix,\n validateArgCount,\n validateCallback,\n validateContextObject\n} from '../../utils/validation';\nimport {\n ValueEventRegistration,\n ChildEventRegistration,\n EventRegistration\n} from '../core/view/EventRegistration';\nimport { Deferred, attachDummyErrorHandler } from '../../utils/promise';\nimport { Repo } from '../core/Repo';\nimport { QueryParams } from '../core/view/QueryParams';\nimport { Reference } from './Reference';\nimport { DataSnapshot } from './DataSnapshot';\n\nlet __referenceConstructor: new (repo: Repo, path: Path) => Query;\n\nexport interface SnapshotCallback {\n (a: DataSnapshot, b?: string): any;\n}\n\n/**\n * A Query represents a filter to be applied to a firebase location. This object purely represents the\n * query expression (and exposes our public API to build the query). The actual query logic is in ViewBase.js.\n *\n * Since every Firebase reference is a query, Firebase inherits from this object.\n */\nexport class Query {\n static set __referenceConstructor(val) {\n __referenceConstructor = val;\n }\n\n static get __referenceConstructor() {\n assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n }\n\n constructor(\n public repo: Repo,\n public path: Path,\n private queryParams_: QueryParams,\n private orderByCalled_: boolean\n ) {}\n\n /**\n * Validates start/end values for queries.\n * @param {!QueryParams} params\n * @private\n */\n private static validateQueryEndpoints_(params: QueryParams) {\n let startNode = null;\n let endNode = null;\n if (params.hasStart()) {\n startNode = params.getIndexStartValue();\n }\n if (params.hasEnd()) {\n endNode = params.getIndexEndValue();\n }\n\n if (params.getIndex() === KEY_INDEX) {\n const tooManyArgsError =\n 'Query: When ordering by key, you may only pass one argument to ' +\n 'startAt(), endAt(), or equalTo().';\n const wrongArgTypeError =\n 'Query: When ordering by key, the argument passed to startAt(), endAt(),' +\n 'or equalTo() must be a string.';\n if (params.hasStart()) {\n const startName = params.getIndexStartName();\n if (startName != MIN_NAME) {\n throw new Error(tooManyArgsError);\n } else if (typeof startNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n if (params.hasEnd()) {\n const endName = params.getIndexEndName();\n if (endName != MAX_NAME) {\n throw new Error(tooManyArgsError);\n } else if (typeof endNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n } else if (params.getIndex() === PRIORITY_INDEX) {\n if (\n (startNode != null && !isValidPriority(startNode)) ||\n (endNode != null && !isValidPriority(endNode))\n ) {\n throw new Error(\n 'Query: When ordering by priority, the first argument passed to startAt(), ' +\n 'endAt(), or equalTo() must be a valid priority value (null, a number, or a string).'\n );\n }\n } else {\n assert(\n params.getIndex() instanceof PathIndex ||\n params.getIndex() === VALUE_INDEX,\n 'unknown index type.'\n );\n if (\n (startNode != null && typeof startNode === 'object') ||\n (endNode != null && typeof endNode === 'object')\n ) {\n throw new Error(\n 'Query: First argument passed to startAt(), endAt(), or equalTo() cannot be ' +\n 'an object.'\n );\n }\n }\n }\n\n /**\n * Validates that limit* has been called with the correct combination of parameters\n * @param {!QueryParams} params\n * @private\n */\n private static validateLimit_(params: QueryParams) {\n if (\n params.hasStart() &&\n params.hasEnd() &&\n params.hasLimit() &&\n !params.hasAnchoredLimit()\n ) {\n throw new Error(\n \"Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.\"\n );\n }\n }\n\n /**\n * Validates that no other order by call has been made\n * @param {!string} fnName\n * @private\n */\n private validateNoPreviousOrderByCall_(fnName: string) {\n if (this.orderByCalled_ === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n }\n\n /**\n * @return {!QueryParams}\n */\n getQueryParams(): QueryParams {\n return this.queryParams_;\n }\n\n /**\n * @return {!Reference}\n */\n getRef(): Reference {\n validateArgCount('Query.ref', 0, 0, arguments.length);\n // This is a slight hack. We cannot goog.require('fb.api.Firebase'), since Firebase requires fb.api.Query.\n // However, we will always export 'Firebase' to the global namespace, so it's guaranteed to exist by the time this\n // method gets called.\n return new Query.__referenceConstructor(this.repo, this.path) as Reference;\n }\n\n /**\n * @param {!string} eventType\n * @param {!function(DataSnapshot, string=)} callback\n * @param {(function(Error)|Object)=} cancelCallbackOrContext\n * @param {Object=} context\n * @return {!function(DataSnapshot, string=)}\n */\n on(\n eventType: string,\n callback: SnapshotCallback,\n cancelCallbackOrContext?: ((a: Error) => any) | Object,\n context?: Object\n ): SnapshotCallback {\n validateArgCount('Query.on', 2, 4, arguments.length);\n validateEventType('Query.on', 1, eventType, false);\n validateCallback('Query.on', 2, callback, false);\n\n const ret = Query.getCancelAndContextArgs_(\n 'Query.on',\n cancelCallbackOrContext,\n context\n );\n\n if (eventType === 'value') {\n this.onValueEvent(callback, ret.cancel, ret.context);\n } else {\n const callbacks: { [k: string]: typeof callback } = {};\n callbacks[eventType] = callback;\n this.onChildEvent(callbacks, ret.cancel, ret.context);\n }\n return callback;\n }\n\n /**\n * @param {!function(!DataSnapshot)} callback\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n protected onValueEvent(\n callback: (a: DataSnapshot) => void,\n cancelCallback: ((a: Error) => void) | null,\n context: Object | null\n ) {\n const container = new ValueEventRegistration(\n callback,\n cancelCallback || null,\n context || null\n );\n this.repo.addEventCallbackForQuery(this, container);\n }\n\n /**\n * @param {!Object.} callbacks\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n onChildEvent(\n callbacks: { [k: string]: SnapshotCallback },\n cancelCallback: ((a: Error) => any) | null,\n context: Object | null\n ) {\n const container = new ChildEventRegistration(\n callbacks,\n cancelCallback,\n context\n );\n this.repo.addEventCallbackForQuery(this, container);\n }\n\n /**\n * @param {string=} eventType\n * @param {(function(!DataSnapshot, ?string=))=} callback\n * @param {Object=} context\n */\n off(eventType?: string, callback?: SnapshotCallback, context?: Object) {\n validateArgCount('Query.off', 0, 3, arguments.length);\n validateEventType('Query.off', 1, eventType, true);\n validateCallback('Query.off', 2, callback, true);\n validateContextObject('Query.off', 3, context, true);\n\n let container: EventRegistration | null = null;\n let callbacks: { [k: string]: typeof callback } | null = null;\n if (eventType === 'value') {\n const valueCallback = callback || null;\n container = new ValueEventRegistration(\n valueCallback,\n null,\n context || null\n );\n } else if (eventType) {\n if (callback) {\n callbacks = {};\n callbacks[eventType] = callback;\n }\n container = new ChildEventRegistration(callbacks, null, context || null);\n }\n this.repo.removeEventCallbackForQuery(this, container);\n }\n\n /**\n * Attaches a listener, waits for the first event, and then removes the listener\n * @param {!string} eventType\n * @param {!function(!DataSnapshot, string=)} userCallback\n * @param cancelOrContext\n * @param context\n * @return {!firebase.Promise}\n */\n once(\n eventType: string,\n userCallback?: SnapshotCallback,\n cancelOrContext?: ((a: Error) => void) | Object,\n context?: Object\n ): Promise {\n validateArgCount('Query.once', 1, 4, arguments.length);\n validateEventType('Query.once', 1, eventType, false);\n validateCallback('Query.once', 2, userCallback, true);\n\n const ret = Query.getCancelAndContextArgs_(\n 'Query.once',\n cancelOrContext,\n context\n );\n\n // TODO: Implement this more efficiently (in particular, use 'get' wire protocol for 'value' event)\n // TODO: consider actually wiring the callbacks into the promise. We cannot do this without a breaking change\n // because the API currently expects callbacks will be called synchronously if the data is cached, but this is\n // against the Promise specification.\n let firstCall = true;\n const deferred = new Deferred();\n attachDummyErrorHandler(deferred.promise);\n\n const onceCallback = (snapshot: DataSnapshot) => {\n // NOTE: Even though we unsubscribe, we may get called multiple times if a single action (e.g. set() with JSON)\n // triggers multiple events (e.g. child_added or child_changed).\n if (firstCall) {\n firstCall = false;\n this.off(eventType, onceCallback);\n\n if (userCallback) {\n userCallback.bind(ret.context)(snapshot);\n }\n deferred.resolve(snapshot);\n }\n };\n\n this.on(\n eventType,\n onceCallback,\n /*cancel=*/ err => {\n this.off(eventType, onceCallback);\n\n if (ret.cancel) ret.cancel.bind(ret.context)(err);\n deferred.reject(err);\n }\n );\n return deferred.promise;\n }\n\n /**\n * Set a limit and anchor it to the start of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n limitToFirst(limit: number): Query {\n validateArgCount('Query.limitToFirst', 1, 1, arguments.length);\n if (\n typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0\n ) {\n throw new Error(\n 'Query.limitToFirst: First argument must be a positive integer.'\n );\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error(\n 'Query.limitToFirst: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).'\n );\n }\n\n return new Query(\n this.repo,\n this.path,\n this.queryParams_.limitToFirst(limit),\n this.orderByCalled_\n );\n }\n\n /**\n * Set a limit and anchor it to the end of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n limitToLast(limit: number): Query {\n validateArgCount('Query.limitToLast', 1, 1, arguments.length);\n if (\n typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0\n ) {\n throw new Error(\n 'Query.limitToLast: First argument must be a positive integer.'\n );\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error(\n 'Query.limitToLast: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).'\n );\n }\n\n return new Query(\n this.repo,\n this.path,\n this.queryParams_.limitToLast(limit),\n this.orderByCalled_\n );\n }\n\n /**\n * Given a child path, return a new query ordered by the specified grandchild path.\n * @param {!string} path\n * @return {!Query}\n */\n orderByChild(path: string): Query {\n validateArgCount('Query.orderByChild', 1, 1, arguments.length);\n if (path === '$key') {\n throw new Error(\n 'Query.orderByChild: \"$key\" is invalid. Use Query.orderByKey() instead.'\n );\n } else if (path === '$priority') {\n throw new Error(\n 'Query.orderByChild: \"$priority\" is invalid. Use Query.orderByPriority() instead.'\n );\n } else if (path === '$value') {\n throw new Error(\n 'Query.orderByChild: \"$value\" is invalid. Use Query.orderByValue() instead.'\n );\n }\n validatePathString('Query.orderByChild', 1, path, false);\n this.validateNoPreviousOrderByCall_('Query.orderByChild');\n const parsedPath = new Path(path);\n if (parsedPath.isEmpty()) {\n throw new Error(\n 'Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.'\n );\n }\n const index = new PathIndex(parsedPath);\n const newParams = this.queryParams_.orderBy(index);\n Query.validateQueryEndpoints_(newParams);\n\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * Return a new query ordered by the KeyIndex\n * @return {!Query}\n */\n orderByKey(): Query {\n validateArgCount('Query.orderByKey', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByKey');\n const newParams = this.queryParams_.orderBy(KEY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * Return a new query ordered by the PriorityIndex\n * @return {!Query}\n */\n orderByPriority(): Query {\n validateArgCount('Query.orderByPriority', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByPriority');\n const newParams = this.queryParams_.orderBy(PRIORITY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * Return a new query ordered by the ValueIndex\n * @return {!Query}\n */\n orderByValue(): Query {\n validateArgCount('Query.orderByValue', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByValue');\n const newParams = this.queryParams_.orderBy(VALUE_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n startAt(\n value: number | string | boolean | null = null,\n name?: string | null\n ): Query {\n validateArgCount('Query.startAt', 0, 2, arguments.length);\n validateFirebaseDataArg('Query.startAt', 1, value, this.path, true);\n validateKey('Query.startAt', 2, name, true);\n\n const newParams = this.queryParams_.startAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasStart()) {\n throw new Error(\n 'Query.startAt: Starting point was already set (by another call to startAt ' +\n 'or equalTo).'\n );\n }\n\n // Calling with no params tells us to start at the beginning.\n if (value === undefined) {\n value = null;\n name = null;\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n }\n\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n endAt(\n value: number | string | boolean | null = null,\n name?: string | null\n ): Query {\n validateArgCount('Query.endAt', 0, 2, arguments.length);\n validateFirebaseDataArg('Query.endAt', 1, value, this.path, true);\n validateKey('Query.endAt', 2, name, true);\n\n const newParams = this.queryParams_.endAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasEnd()) {\n throw new Error(\n 'Query.endAt: Ending point was already set (by another call to endAt or ' +\n 'equalTo).'\n );\n }\n\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n }\n\n /**\n * Load the selection of children with exactly the specified value, and, optionally,\n * the specified name.\n * @param {number|string|boolean|null} value\n * @param {string=} name\n * @return {!Query}\n */\n equalTo(value: number | string | boolean | null, name?: string) {\n validateArgCount('Query.equalTo', 1, 2, arguments.length);\n validateFirebaseDataArg('Query.equalTo', 1, value, this.path, false);\n validateKey('Query.equalTo', 2, name, true);\n if (this.queryParams_.hasStart()) {\n throw new Error(\n 'Query.equalTo: Starting point was already set (by another call to startAt or ' +\n 'equalTo).'\n );\n }\n if (this.queryParams_.hasEnd()) {\n throw new Error(\n 'Query.equalTo: Ending point was already set (by another call to endAt or ' +\n 'equalTo).'\n );\n }\n return this.startAt(value, name).endAt(value, name);\n }\n\n /**\n * @return {!string} URL for this location.\n */\n toString(): string {\n validateArgCount('Query.toString', 0, 0, arguments.length);\n\n return this.repo.toString() + this.path.toUrlEncodedString();\n }\n\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users.\n toJSON() {\n // An optional spacer argument is unnecessary for a string.\n validateArgCount('Query.toJSON', 0, 1, arguments.length);\n return this.toString();\n }\n\n /**\n * An object representation of the query parameters used by this Query.\n * @return {!Object}\n */\n queryObject(): Object {\n return this.queryParams_.getQueryObject();\n }\n\n /**\n * @return {!string}\n */\n queryIdentifier(): string {\n const obj = this.queryObject();\n const id = ObjectToUniqueKey(obj);\n return id === '{}' ? 'default' : id;\n }\n\n /**\n * Return true if this query and the provided query are equivalent; otherwise, return false.\n * @param {Query} other\n * @return {boolean}\n */\n isEqual(other: Query): boolean {\n validateArgCount('Query.isEqual', 1, 1, arguments.length);\n if (!(other instanceof Query)) {\n const error =\n 'Query.isEqual failed: First argument must be an instance of firebase.database.Query.';\n throw new Error(error);\n }\n\n const sameRepo = this.repo === other.repo;\n const samePath = this.path.equals(other.path);\n const sameQueryIdentifier =\n this.queryIdentifier() === other.queryIdentifier();\n\n return sameRepo && samePath && sameQueryIdentifier;\n }\n\n /**\n * Helper used by .on and .once to extract the context and or cancel arguments.\n * @param {!string} fnName The function name (on or once)\n * @param {(function(Error)|Object)=} cancelOrContext\n * @param {Object=} context\n * @return {{cancel: ?function(Error), context: ?Object}}\n * @private\n */\n private static getCancelAndContextArgs_(\n fnName: string,\n cancelOrContext?: ((a: Error) => void) | Object,\n context?: Object\n ): { cancel: ((a: Error) => void) | null; context: Object | null } {\n const ret: {\n cancel: ((a: Error) => void) | null;\n context: Object | null;\n } = { cancel: null, context: null };\n if (cancelOrContext && context) {\n ret.cancel = cancelOrContext as (a: Error) => void;\n validateCallback(fnName, 3, ret.cancel, true);\n\n ret.context = context;\n validateContextObject(fnName, 4, ret.context, true);\n } else if (cancelOrContext) {\n // we have either a cancel callback or a context.\n if (typeof cancelOrContext === 'object' && cancelOrContext !== null) {\n // it's a context!\n ret.context = cancelOrContext;\n } else if (typeof cancelOrContext === 'function') {\n ret.cancel = cancelOrContext;\n } else {\n throw new Error(\n errorPrefix(fnName, 3, true) +\n ' must either be a cancel callback or a context object.'\n );\n }\n }\n return ret;\n }\n\n get ref(): Reference {\n return this.getRef();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/Query.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from '../util/Path';\n\n/**\n *\n * @enum\n */\nexport enum OperationType {\n OVERWRITE,\n MERGE,\n ACK_USER_WRITE,\n LISTEN_COMPLETE\n}\n\n/**\n * @interface\n */\nexport interface Operation {\n /**\n * @type {!OperationSource}\n */\n source: OperationSource;\n\n /**\n * @type {!OperationType}\n */\n type: OperationType;\n\n /**\n * @type {!Path}\n */\n path: Path;\n\n /**\n * @param {string} childName\n * @return {?Operation}\n */\n operationForChild(childName: string): Operation | null;\n}\n\n/**\n * @param {boolean} fromUser\n * @param {boolean} fromServer\n * @param {?string} queryId\n * @param {boolean} tagged\n * @constructor\n */\nexport class OperationSource {\n constructor(\n public fromUser: boolean,\n public fromServer: boolean,\n public queryId: string | null,\n public tagged: boolean\n ) {\n assert(!tagged || fromServer, 'Tagged queries must be from server.');\n }\n /**\n * @const\n * @type {!OperationSource}\n */\n static User = new OperationSource(\n /*fromUser=*/ true,\n false,\n null,\n /*tagged=*/ false\n );\n\n /**\n * @const\n * @type {!OperationSource}\n */\n static Server = new OperationSource(\n false,\n /*fromServer=*/ true,\n null,\n /*tagged=*/ false\n );\n\n /**\n * @param {string} queryId\n * @return {!OperationSource}\n */\n static forServerTaggedQuery = function(queryId: string): OperationSource {\n return new OperationSource(\n false,\n /*fromServer=*/ true,\n queryId,\n /*tagged=*/ true\n );\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/Operation.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../../utils/assert';\nimport { nameCompare, MAX_NAME } from '../../util/util';\nimport { Index } from './Index';\nimport { ChildrenNode, MAX_NODE } from '../ChildrenNode';\nimport { NamedNode, Node } from '../Node';\nimport { nodeFromJSON } from '../nodeFromJSON';\nimport { Path } from '../../util/Path';\n\n/**\n * @param {!Path} indexPath\n * @constructor\n * @extends {Index}\n */\nexport class PathIndex extends Index {\n constructor(private indexPath_: Path) {\n super();\n\n assert(\n !indexPath_.isEmpty() && indexPath_.getFront() !== '.priority',\n \"Can't create PathIndex with empty path or .priority key\"\n );\n }\n\n /**\n * @param {!Node} snap\n * @return {!Node}\n * @protected\n */\n protected extractChild(snap: Node): Node {\n return snap.getChild(this.indexPath_);\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n return !node.getChild(this.indexPath_).isEmpty();\n }\n\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n const aChild = this.extractChild(a.node);\n const bChild = this.extractChild(b.node);\n const indexCmp = aChild.compareTo(bChild);\n if (indexCmp === 0) {\n return nameCompare(a.name, b.name);\n } else {\n return indexCmp;\n }\n }\n\n /**\n * @inheritDoc\n */\n makePost(indexValue: object, name: string): NamedNode {\n const valueNode = nodeFromJSON(indexValue);\n const node = ChildrenNode.EMPTY_NODE.updateChild(\n this.indexPath_,\n valueNode\n );\n return new NamedNode(name, node);\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n const node = ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, MAX_NODE);\n return new NamedNode(MAX_NAME, node);\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return this.indexPath_.slice().join('/');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/PathIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { validateArgCount, validateCallback } from '../../utils/validation';\nimport { validatePathString } from '../core/util/validation';\nimport { Path } from '../core/util/Path';\nimport { PRIORITY_INDEX } from '../core/snap/indexes/PriorityIndex';\nimport { Node } from '../core/snap/Node';\nimport { Reference } from './Reference';\nimport { Index } from '../core/snap/indexes/Index';\nimport { ChildrenNode } from '../core/snap/ChildrenNode';\n\n/**\n * Class representing a firebase data snapshot. It wraps a SnapshotNode and\n * surfaces the public methods (val, forEach, etc.) we want to expose.\n */\nexport class DataSnapshot {\n /**\n * @param {!Node} node_ A SnapshotNode to wrap.\n * @param {!Reference} ref_ The ref of the location this snapshot came from.\n * @param {!Index} index_ The iteration order for this snapshot\n */\n constructor(\n private readonly node_: Node,\n private readonly ref_: Reference,\n private readonly index_: Index\n ) {}\n\n /**\n * Retrieves the snapshot contents as JSON. Returns null if the snapshot is\n * empty.\n *\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n val(): any {\n validateArgCount('DataSnapshot.val', 0, 0, arguments.length);\n return this.node_.val();\n }\n\n /**\n * Returns the snapshot contents as JSON, including priorities of node. Suitable for exporting\n * the entire node contents.\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n exportVal(): any {\n validateArgCount('DataSnapshot.exportVal', 0, 0, arguments.length);\n return this.node_.val(true);\n }\n\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n toJSON(): any {\n // Optional spacer argument is unnecessary because we're depending on recursion rather than stringifying the content\n validateArgCount('DataSnapshot.toJSON', 0, 1, arguments.length);\n return this.exportVal();\n }\n\n /**\n * Returns whether the snapshot contains a non-null value.\n *\n * @return {boolean} Whether the snapshot contains a non-null value, or is empty.\n */\n exists(): boolean {\n validateArgCount('DataSnapshot.exists', 0, 0, arguments.length);\n return !this.node_.isEmpty();\n }\n\n /**\n * Returns a DataSnapshot of the specified child node's contents.\n *\n * @param {!string} childPathString Path to a child.\n * @return {!DataSnapshot} DataSnapshot for child node.\n */\n child(childPathString: string): DataSnapshot {\n validateArgCount('DataSnapshot.child', 0, 1, arguments.length);\n // Ensure the childPath is a string (can be a number)\n childPathString = String(childPathString);\n validatePathString('DataSnapshot.child', 1, childPathString, false);\n\n const childPath = new Path(childPathString);\n const childRef = this.ref_.child(childPath);\n return new DataSnapshot(\n this.node_.getChild(childPath),\n childRef,\n PRIORITY_INDEX\n );\n }\n\n /**\n * Returns whether the snapshot contains a child at the specified path.\n *\n * @param {!string} childPathString Path to a child.\n * @return {boolean} Whether the child exists.\n */\n hasChild(childPathString: string): boolean {\n validateArgCount('DataSnapshot.hasChild', 1, 1, arguments.length);\n validatePathString('DataSnapshot.hasChild', 1, childPathString, false);\n\n const childPath = new Path(childPathString);\n return !this.node_.getChild(childPath).isEmpty();\n }\n\n /**\n * Returns the priority of the object, or null if no priority was set.\n *\n * @return {string|number|null} The priority.\n */\n getPriority(): string | number | null {\n validateArgCount('DataSnapshot.getPriority', 0, 0, arguments.length);\n\n // typecast here because we never return deferred values or internal priorities (MAX_PRIORITY)\n return this.node_.getPriority().val() as string | number | null;\n }\n\n /**\n * Iterates through child nodes and calls the specified action for each one.\n *\n * @param {function(!DataSnapshot)} action Callback function to be called\n * for each child.\n * @return {boolean} True if forEach was canceled by action returning true for\n * one of the child nodes.\n */\n forEach(action: (d: DataSnapshot) => void): boolean {\n validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);\n validateCallback('DataSnapshot.forEach', 1, action, false);\n\n if (this.node_.isLeafNode()) return false;\n\n const childrenNode = this.node_ as ChildrenNode;\n // Sanitize the return value to a boolean. ChildrenNode.forEachChild has a weird return type...\n return !!childrenNode.forEachChild(this.index_, (key, node) => {\n return action(\n new DataSnapshot(node, this.ref_.child(key), PRIORITY_INDEX)\n );\n });\n }\n\n /**\n * Returns whether this DataSnapshot has children.\n * @return {boolean} True if the DataSnapshot contains 1 or more child nodes.\n */\n hasChildren(): boolean {\n validateArgCount('DataSnapshot.hasChildren', 0, 0, arguments.length);\n\n if (this.node_.isLeafNode()) return false;\n else return !this.node_.isEmpty();\n }\n\n get key() {\n return this.ref_.getKey();\n }\n\n /**\n * Returns the number of children for this DataSnapshot.\n * @return {number} The number of children that this DataSnapshot contains.\n */\n numChildren(): number {\n validateArgCount('DataSnapshot.numChildren', 0, 0, arguments.length);\n\n return this.node_.numChildren();\n }\n\n /**\n * @return {Reference} The Firebase reference for the location this snapshot's data came from.\n */\n getRef(): Reference {\n validateArgCount('DataSnapshot.ref', 0, 0, arguments.length);\n\n return this.ref_;\n }\n\n get ref() {\n return this.getRef();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/DataSnapshot.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { stringify } from '../../../utils/json';\nimport { Path } from '../util/Path';\nimport { EventRegistration } from './EventRegistration';\nimport { DataSnapshot } from '../../api/DataSnapshot';\n\n/**\n * Encapsulates the data needed to raise an event\n * @interface\n */\nexport interface Event {\n /**\n * @return {!Path}\n */\n getPath(): Path;\n\n /**\n * @return {!string}\n */\n getEventType(): string;\n\n /**\n * @return {!function()}\n */\n getEventRunner(): () => void;\n\n /**\n * @return {!string}\n */\n toString(): string;\n}\n\n/**\n * Encapsulates the data needed to raise an event\n * @implements {Event}\n */\nexport class DataEvent implements Event {\n /**\n * @param {!string} eventType One of: value, child_added, child_changed, child_moved, child_removed\n * @param {!EventRegistration} eventRegistration The function to call to with the event data. User provided\n * @param {!DataSnapshot} snapshot The data backing the event\n * @param {?string=} prevName Optional, the name of the previous child for child_* events.\n */\n constructor(\n public eventType:\n | 'value'\n | ' child_added'\n | ' child_changed'\n | ' child_moved'\n | ' child_removed',\n public eventRegistration: EventRegistration,\n public snapshot: DataSnapshot,\n public prevName?: string | null\n ) {}\n\n /**\n * @inheritDoc\n */\n getPath(): Path {\n const ref = this.snapshot.getRef();\n if (this.eventType === 'value') {\n return ref.path;\n } else {\n return ref.getParent().path;\n }\n }\n\n /**\n * @inheritDoc\n */\n getEventType(): string {\n return this.eventType;\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(): () => void {\n return this.eventRegistration.getEventRunner(this);\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return (\n this.getPath().toString() +\n ':' +\n this.eventType +\n ':' +\n stringify(this.snapshot.exportVal())\n );\n }\n}\n\nexport class CancelEvent implements Event {\n /**\n * @param {EventRegistration} eventRegistration\n * @param {Error} error\n * @param {!Path} path\n */\n constructor(\n public eventRegistration: EventRegistration,\n public error: Error,\n public path: Path\n ) {}\n\n /**\n * @inheritDoc\n */\n getPath(): Path {\n return this.path;\n }\n\n /**\n * @inheritDoc\n */\n getEventType(): string {\n return 'cancel';\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(): () => void {\n return this.eventRegistration.getEventRunner(this);\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return this.path.toString() + ':cancel';\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/Event.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { DataSnapshot } from '../../api/DataSnapshot';\nimport { DataEvent, CancelEvent, Event } from './Event';\nimport { contains, getCount, getAnyKey, every } from '../../../utils/obj';\nimport { assert } from '../../../utils/assert';\nimport { Path } from '../util/Path';\nimport { Change } from './Change';\nimport { Query } from '../../api/Query';\n\n/**\n * An EventRegistration is basically an event type ('value', 'child_added', etc.) and a callback\n * to be notified of that type of event.\n *\n * That said, it can also contain a cancel callback to be notified if the event is canceled. And\n * currently, this code is organized around the idea that you would register multiple child_ callbacks\n * together, as a single EventRegistration. Though currently we don't do that.\n */\nexport interface EventRegistration {\n /**\n * True if this container has a callback to trigger for this event type\n * @param {!string} eventType\n * @return {boolean}\n */\n respondsTo(eventType: string): boolean;\n\n /**\n * @param {!Change} change\n * @param {!Query} query\n * @return {!Event}\n */\n createEvent(change: Change, query: Query): Event;\n\n /**\n * Given event data, return a function to trigger the user's callback\n * @param {!Event} eventData\n * @return {function()}\n */\n getEventRunner(eventData: Event): () => void;\n\n /**\n * @param {!Error} error\n * @param {!Path} path\n * @return {?CancelEvent}\n */\n createCancelEvent(error: Error, path: Path): CancelEvent | null;\n\n /**\n * @param {!EventRegistration} other\n * @return {boolean}\n */\n matches(other: EventRegistration): boolean;\n\n /**\n * False basically means this is a \"dummy\" callback container being used as a sentinel\n * to remove all callback containers of a particular type. (e.g. if the user does\n * ref.off('value') without specifying a specific callback).\n *\n * (TODO: Rework this, since it's hacky)\n *\n * @return {boolean}\n */\n hasAnyCallback(): boolean;\n}\n\n/**\n * Represents registration for 'value' events.\n */\nexport class ValueEventRegistration implements EventRegistration {\n /**\n * @param {?function(!DataSnapshot)} callback_\n * @param {?function(Error)} cancelCallback_\n * @param {?Object} context_\n */\n constructor(\n private callback_: ((d: DataSnapshot) => void) | null,\n private cancelCallback_: ((e: Error) => void) | null,\n private context_: Object | null\n ) {}\n\n /**\n * @inheritDoc\n */\n respondsTo(eventType: string): boolean {\n return eventType === 'value';\n }\n\n /**\n * @inheritDoc\n */\n createEvent(change: Change, query: Query): DataEvent {\n const index = query.getQueryParams().getIndex();\n return new DataEvent(\n 'value',\n this,\n new DataSnapshot(change.snapshotNode, query.getRef(), index)\n );\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(eventData: CancelEvent | DataEvent): () => void {\n const ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n assert(\n this.cancelCallback_,\n 'Raising a cancel event on a listener with no cancel callback'\n );\n const cancelCB = this.cancelCallback_;\n return function() {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB.call(ctx, (eventData as CancelEvent).error);\n };\n } else {\n const cb = this.callback_;\n return function() {\n cb.call(ctx, (eventData as DataEvent).snapshot);\n };\n }\n }\n\n /**\n * @inheritDoc\n */\n createCancelEvent(error: Error, path: Path): CancelEvent | null {\n if (this.cancelCallback_) {\n return new CancelEvent(this, error, path);\n } else {\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n matches(other: EventRegistration): boolean {\n if (!(other instanceof ValueEventRegistration)) {\n return false;\n } else if (!other.callback_ || !this.callback_) {\n // If no callback specified, we consider it to match any callback.\n return true;\n } else {\n return (\n other.callback_ === this.callback_ && other.context_ === this.context_\n );\n }\n }\n\n /**\n * @inheritDoc\n */\n hasAnyCallback(): boolean {\n return this.callback_ !== null;\n }\n}\n\n/**\n * Represents the registration of 1 or more child_xxx events.\n *\n * Currently, it is always exactly 1 child_xxx event, but the idea is we might let you\n * register a group of callbacks together in the future.\n *\n * @constructor\n * @implements {EventRegistration}\n */\nexport class ChildEventRegistration implements EventRegistration {\n /**\n * @param {?Object.} callbacks_\n * @param {?function(Error)} cancelCallback_\n * @param {Object=} context_\n */\n constructor(\n private callbacks_:\n | ({ [k: string]: (d: DataSnapshot, s?: string | null) => void })\n | null,\n private cancelCallback_: ((e: Error) => void) | null,\n private context_?: Object\n ) {}\n\n /**\n * @inheritDoc\n */\n respondsTo(eventType: string): boolean {\n let eventToCheck =\n eventType === 'children_added' ? 'child_added' : eventType;\n eventToCheck =\n eventToCheck === 'children_removed' ? 'child_removed' : eventToCheck;\n return contains(this.callbacks_, eventToCheck);\n }\n\n /**\n * @inheritDoc\n */\n createCancelEvent(error: Error, path: Path): CancelEvent | null {\n if (this.cancelCallback_) {\n return new CancelEvent(this, error, path);\n } else {\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n createEvent(change: Change, query: Query): DataEvent {\n assert(change.childName != null, 'Child events should have a childName.');\n const ref = query.getRef().child /** @type {!string} */(change.childName);\n const index = query.getQueryParams().getIndex();\n return new DataEvent(\n change.type as any,\n this,\n new DataSnapshot(change.snapshotNode, ref, index as any),\n change.prevName\n );\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(eventData: CancelEvent | DataEvent): () => void {\n const ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n assert(\n this.cancelCallback_,\n 'Raising a cancel event on a listener with no cancel callback'\n );\n const cancelCB = this.cancelCallback_;\n return function() {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB.call(ctx, (eventData as CancelEvent).error);\n };\n } else {\n const cb = this.callbacks_[(eventData as DataEvent).eventType];\n return function() {\n cb.call(\n ctx,\n (eventData as DataEvent).snapshot,\n (eventData as DataEvent).prevName\n );\n };\n }\n }\n\n /**\n * @inheritDoc\n */\n matches(other: EventRegistration): boolean {\n if (other instanceof ChildEventRegistration) {\n if (!this.callbacks_ || !other.callbacks_) {\n return true;\n } else if (this.context_ === other.context_) {\n const otherCount = getCount(other.callbacks_);\n const thisCount = getCount(this.callbacks_);\n if (otherCount === thisCount) {\n // If count is 1, do an exact match on eventType, if either is defined but null, it's a match.\n // If event types don't match, not a match\n // If count is not 1, exact match across all\n\n if (otherCount === 1) {\n const otherKey /** @type {!string} */ = getAnyKey(other.callbacks_);\n const thisKey /** @type {!string} */ = getAnyKey(this.callbacks_);\n return (\n thisKey === otherKey &&\n (!other.callbacks_[otherKey] ||\n !this.callbacks_[thisKey] ||\n other.callbacks_[otherKey] === this.callbacks_[thisKey])\n );\n } else {\n // Exact match on each key.\n return every(\n this.callbacks_,\n (eventType, cb) => other.callbacks_[eventType] === cb\n );\n }\n }\n }\n }\n\n return false;\n }\n\n /**\n * @inheritDoc\n */\n hasAnyCallback(): boolean {\n return this.callbacks_ !== null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/EventRegistration.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { isEmpty, getCount, forEach, contains } from '../../../utils/obj';\n\n/**\n * Implements a set with a count of elements.\n *\n * @template K, V\n */\nexport class CountedSet {\n set: { [k: string]: V } = {};\n\n /**\n * @param {!K} item\n * @param {V} val\n */\n add(item: K, val: V) {\n this.set[item as any] = val !== null ? val : true as any;\n }\n\n /**\n * @param {!K} key\n * @return {boolean}\n */\n contains(key: K) {\n return contains(this.set, key);\n }\n\n /**\n * @param {!K} item\n * @return {V}\n */\n get(item: K): V | void {\n return this.contains(item) ? this.set[item as any] : undefined;\n }\n\n /**\n * @param {!K} item\n */\n remove(item: K) {\n delete this.set[item as any];\n }\n\n /**\n * Deletes everything in the set\n */\n clear() {\n this.set = {};\n }\n\n /**\n * True if there's nothing in the set\n * @return {boolean}\n */\n isEmpty(): boolean {\n return isEmpty(this.set);\n }\n\n /**\n * @return {number} The number of items in the set\n */\n count(): number {\n return getCount(this.set);\n }\n\n /**\n * Run a function on each k,v pair in the set\n * @param {function(K, V)} fn\n */\n each(fn: (k: K, v: V) => void) {\n forEach(this.set, (k: K, v: V) => fn(k, v));\n }\n\n /**\n * Mostly for debugging\n * @return {Array.} The keys present in this CountedSet\n */\n keys(): K[] {\n const keys: K[] = [];\n forEach(this.set, (k: K) => {\n keys.push(k);\n });\n return keys;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/CountedSet.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from './util/Path';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { CountedSet } from './util/CountedSet';\nimport { Node } from './snap/Node';\n\n/**\n * Helper class to store a sparse set of snapshots.\n *\n * @constructor\n */\nexport class SparseSnapshotTree {\n /**\n * @private\n * @type {Node}\n */\n private value_: Node | null = null;\n\n /**\n * @private\n * @type {CountedSet}\n */\n private children_: CountedSet | null = null;\n\n /**\n * Gets the node stored at the given path if one exists.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {?Node} The retrieved node, or null.\n */\n find(path: Path): Node | null {\n if (this.value_ != null) {\n return this.value_.getChild(path);\n } else if (!path.isEmpty() && this.children_ != null) {\n const childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n const childTree = this.children_.get(childKey) as SparseSnapshotTree;\n return childTree.find(path);\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n\n /**\n * Stores the given node at the specified path. If there is already a node\n * at a shallower path, it merges the new data into that snapshot node.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @param {!Node} data The new data, or null.\n */\n remember(path: Path, data: Node) {\n if (path.isEmpty()) {\n this.value_ = data;\n this.children_ = null;\n } else if (this.value_ !== null) {\n this.value_ = this.value_.updateChild(path, data);\n } else {\n if (this.children_ == null) {\n this.children_ = new CountedSet();\n }\n\n const childKey = path.getFront();\n if (!this.children_.contains(childKey)) {\n this.children_.add(childKey, new SparseSnapshotTree());\n }\n\n const child = this.children_.get(childKey) as SparseSnapshotTree;\n path = path.popFront();\n child.remember(path, data);\n }\n }\n\n /**\n * Purge the data at path from the cache.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {boolean} True if this node should now be removed.\n */\n forget(path: Path): boolean {\n if (path.isEmpty()) {\n this.value_ = null;\n this.children_ = null;\n return true;\n } else {\n if (this.value_ !== null) {\n if (this.value_.isLeafNode()) {\n // We're trying to forget a node that doesn't exist\n return false;\n } else {\n const value = this.value_;\n this.value_ = null;\n\n const self = this;\n value.forEachChild(PRIORITY_INDEX, function(key, tree) {\n self.remember(new Path(key), tree);\n });\n\n return this.forget(path);\n }\n } else if (this.children_ !== null) {\n const childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n const safeToRemove = (this.children_.get(\n childKey\n ) as SparseSnapshotTree).forget(path);\n if (safeToRemove) {\n this.children_.remove(childKey);\n }\n }\n\n if (this.children_.isEmpty()) {\n this.children_ = null;\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }\n }\n\n /**\n * Recursively iterates through all of the stored tree and calls the\n * callback on each one.\n *\n * @param {!Path} prefixPath Path to look up node for.\n * @param {!Function} func The function to invoke for each tree.\n */\n forEachTree(prefixPath: Path, func: (a: Path, b: Node) => any) {\n if (this.value_ !== null) {\n func(prefixPath, this.value_);\n } else {\n this.forEachChild((key, tree) => {\n const path = new Path(prefixPath.toString() + '/' + key);\n tree.forEachTree(path, func);\n });\n }\n }\n\n /**\n * Iterates through each immediate child and triggers the callback.\n *\n * @param {!Function} func The function to invoke for each child.\n */\n forEachChild(func: (a: string, b: SparseSnapshotTree) => void) {\n if (this.children_ !== null) {\n this.children_.each((key, tree) => {\n func(key, tree);\n });\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SparseSnapshotTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from './Path';\nimport { SparseSnapshotTree } from '../SparseSnapshotTree';\nimport { LeafNode } from '../snap/LeafNode';\nimport { nodeFromJSON } from '../snap/nodeFromJSON';\nimport { PRIORITY_INDEX } from '../snap/indexes/PriorityIndex';\nimport { Node } from '../snap/Node';\nimport { ChildrenNode } from '../snap/ChildrenNode';\n\n/**\n * Generate placeholders for deferred values.\n * @param {?Object} values\n * @return {!Object}\n */\nexport const generateWithValues = function(values: {\n [k: string]: any;\n} | null): { [k: string]: any } {\n values = values || {};\n values['timestamp'] = values['timestamp'] || new Date().getTime();\n return values;\n};\n\n/**\n * Value to use when firing local events. When writing server values, fire\n * local events with an approximate value, otherwise return value as-is.\n * @param {(Object|string|number|boolean)} value\n * @param {!Object} serverValues\n * @return {!(string|number|boolean)}\n */\nexport const resolveDeferredValue = function(\n value: { [k: string]: any } | string | number | boolean,\n serverValues: { [k: string]: any }\n): string | number | boolean {\n if (!value || typeof value !== 'object') {\n return value as string | number | boolean;\n } else {\n assert('.sv' in value, 'Unexpected leaf node or priority contents');\n return serverValues[value['.sv']];\n }\n};\n\n/**\n * Recursively replace all deferred values and priorities in the tree with the\n * specified generated replacement values.\n * @param {!SparseSnapshotTree} tree\n * @param {!Object} serverValues\n * @return {!SparseSnapshotTree}\n */\nexport const resolveDeferredValueTree = function(\n tree: SparseSnapshotTree,\n serverValues: Object\n): SparseSnapshotTree {\n const resolvedTree = new SparseSnapshotTree();\n tree.forEachTree(new Path(''), function(path, node) {\n resolvedTree.remember(\n path,\n resolveDeferredValueSnapshot(node, serverValues)\n );\n });\n return resolvedTree;\n};\n\n/**\n * Recursively replace all deferred values and priorities in the node with the\n * specified generated replacement values. If there are no server values in the node,\n * it'll be returned as-is.\n * @param {!Node} node\n * @param {!Object} serverValues\n * @return {!Node}\n */\nexport const resolveDeferredValueSnapshot = function(\n node: Node,\n serverValues: Object\n): Node {\n const rawPri = node.getPriority().val() as\n | object\n | boolean\n | null\n | number\n | string;\n const priority = resolveDeferredValue(rawPri, serverValues);\n let newNode: Node;\n\n if (node.isLeafNode()) {\n const leafNode = node as LeafNode;\n const value = resolveDeferredValue(leafNode.getValue(), serverValues);\n if (\n value !== leafNode.getValue() ||\n priority !== leafNode.getPriority().val()\n ) {\n return new LeafNode(value, nodeFromJSON(priority));\n } else {\n return node;\n }\n } else {\n const childrenNode = node as ChildrenNode;\n newNode = childrenNode;\n if (priority !== childrenNode.getPriority().val()) {\n newNode = newNode.updatePriority(new LeafNode(priority));\n }\n childrenNode.forEachChild(PRIORITY_INDEX, function(childName, childNode) {\n const newChildNode = resolveDeferredValueSnapshot(\n childNode,\n serverValues\n );\n if (newChildNode !== childNode) {\n newNode = newNode.updateImmediateChild(childName, newChildNode);\n }\n });\n return newNode;\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/ServerValues.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { SortedMap } from './SortedMap';\nimport { Path } from './Path';\nimport { stringCompare } from './util';\nimport { forEach } from '../../../utils/obj';\n\nlet emptyChildrenSingleton: SortedMap>;\n\n/**\n * Singleton empty children collection.\n *\n * @const\n * @type {!SortedMap.>}\n */\nconst EmptyChildren = (): SortedMap> => {\n if (!emptyChildrenSingleton) {\n emptyChildrenSingleton = new SortedMap>(\n stringCompare\n );\n }\n return emptyChildrenSingleton;\n};\n\n/**\n * A tree with immutable elements.\n */\nexport class ImmutableTree {\n static Empty = new ImmutableTree(null);\n\n /**\n * @template T\n * @param {!Object.} obj\n * @return {!ImmutableTree.}\n */\n static fromObject(obj: { [k: string]: T }): ImmutableTree {\n let tree: ImmutableTree = ImmutableTree.Empty;\n forEach(obj, (childPath: string, childSnap: T) => {\n tree = tree.set(new Path(childPath), childSnap);\n });\n return tree;\n }\n\n /**\n * @template T\n * @param {?T} value\n * @param {SortedMap.>=} children\n */\n constructor(\n public readonly value: T | null,\n public readonly children: SortedMap<\n string,\n ImmutableTree\n > = EmptyChildren()\n ) {}\n\n /**\n * True if the value is empty and there are no children\n * @return {boolean}\n */\n isEmpty(): boolean {\n return this.value === null && this.children.isEmpty();\n }\n\n /**\n * Given a path and predicate, return the first node and the path to that node\n * where the predicate returns true.\n *\n * TODO Do a perf test -- If we're creating a bunch of {path: value:} objects\n * on the way back out, it may be better to pass down a pathSoFar obj.\n *\n * @param {!Path} relativePath The remainder of the path\n * @param {function(T):boolean} predicate The predicate to satisfy to return a\n * node\n * @return {?{path:!Path, value:!T}}\n */\n findRootMostMatchingPathAndValue(\n relativePath: Path,\n predicate: (a: T) => boolean\n ): { path: Path; value: T } | null {\n if (this.value != null && predicate(this.value)) {\n return { path: Path.Empty, value: this.value };\n } else {\n if (relativePath.isEmpty()) {\n return null;\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front);\n if (child !== null) {\n const childExistingPathAndValue = child.findRootMostMatchingPathAndValue(\n relativePath.popFront(),\n predicate\n );\n if (childExistingPathAndValue != null) {\n const fullPath = new Path(front).child(\n childExistingPathAndValue.path\n );\n return { path: fullPath, value: childExistingPathAndValue.value };\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n }\n }\n\n /**\n * Find, if it exists, the shortest subpath of the given path that points a defined\n * value in the tree\n * @param {!Path} relativePath\n * @return {?{path: !Path, value: !T}}\n */\n findRootMostValueAndPath(\n relativePath: Path\n ): { path: Path; value: T } | null {\n return this.findRootMostMatchingPathAndValue(relativePath, () => true);\n }\n\n /**\n * @param {!Path} relativePath\n * @return {!ImmutableTree.} The subtree at the given path\n */\n subtree(relativePath: Path): ImmutableTree {\n if (relativePath.isEmpty()) {\n return this;\n } else {\n const front = relativePath.getFront();\n const childTree = this.children.get(front);\n if (childTree !== null) {\n return childTree.subtree(relativePath.popFront());\n } else {\n return ImmutableTree.Empty;\n }\n }\n }\n\n /**\n * Sets a value at the specified path.\n *\n * @param {!Path} relativePath Path to set value at.\n * @param {?T} toSet Value to set.\n * @return {!ImmutableTree.} Resulting tree.\n */\n set(relativePath: Path, toSet: T | null): ImmutableTree {\n if (relativePath.isEmpty()) {\n return new ImmutableTree(toSet, this.children);\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front) || ImmutableTree.Empty;\n const newChild = child.set(relativePath.popFront(), toSet);\n const newChildren = this.children.insert(front, newChild);\n return new ImmutableTree(this.value, newChildren);\n }\n }\n\n /**\n * Removes the value at the specified path.\n *\n * @param {!Path} relativePath Path to value to remove.\n * @return {!ImmutableTree.} Resulting tree.\n */\n remove(relativePath: Path): ImmutableTree {\n if (relativePath.isEmpty()) {\n if (this.children.isEmpty()) {\n return ImmutableTree.Empty;\n } else {\n return new ImmutableTree(null, this.children);\n }\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front);\n if (child) {\n const newChild = child.remove(relativePath.popFront());\n let newChildren;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n } else {\n newChildren = this.children.insert(front, newChild);\n }\n if (this.value === null && newChildren.isEmpty()) {\n return ImmutableTree.Empty;\n } else {\n return new ImmutableTree(this.value, newChildren);\n }\n } else {\n return this;\n }\n }\n }\n\n /**\n * Gets a value from the tree.\n *\n * @param {!Path} relativePath Path to get value for.\n * @return {?T} Value at path, or null.\n */\n get(relativePath: Path): T | null {\n if (relativePath.isEmpty()) {\n return this.value;\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front);\n if (child) {\n return child.get(relativePath.popFront());\n } else {\n return null;\n }\n }\n }\n\n /**\n * Replace the subtree at the specified path with the given new tree.\n *\n * @param {!Path} relativePath Path to replace subtree for.\n * @param {!ImmutableTree} newTree New tree.\n * @return {!ImmutableTree} Resulting tree.\n */\n setTree(relativePath: Path, newTree: ImmutableTree): ImmutableTree {\n if (relativePath.isEmpty()) {\n return newTree;\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front) || ImmutableTree.Empty;\n const newChild = child.setTree(relativePath.popFront(), newTree);\n let newChildren;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n } else {\n newChildren = this.children.insert(front, newChild);\n }\n return new ImmutableTree(this.value, newChildren);\n }\n }\n\n /**\n * Performs a depth first fold on this tree. Transforms a tree into a single\n * value, given a function that operates on the path to a node, an optional\n * current value, and a map of child names to folded subtrees\n * @template V\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n */\n fold(fn: (path: Path, value: T, children: { [k: string]: V }) => V): V {\n return this.fold_(Path.Empty, fn);\n }\n\n /**\n * Recursive helper for public-facing fold() method\n * @template V\n * @param {!Path} pathSoFar\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n * @private\n */\n private fold_(\n pathSoFar: Path,\n fn: (path: Path, value: T | null, children: { [k: string]: V }) => V\n ): V {\n const accum: { [k: string]: V } = {};\n this.children.inorderTraversal(function(\n childKey: string,\n childTree: ImmutableTree\n ) {\n accum[childKey] = childTree.fold_(pathSoFar.child(childKey), fn);\n });\n return fn(pathSoFar, this.value, accum);\n }\n\n /**\n * Find the first matching value on the given path. Return the result of applying f to it.\n * @template V\n * @param {!Path} path\n * @param {!function(!Path, !T):?V} f\n * @return {?V}\n */\n findOnPath(path: Path, f: (path: Path, value: T) => V | null): V | null {\n return this.findOnPath_(path, Path.Empty, f);\n }\n\n private findOnPath_(\n pathToFollow: Path,\n pathSoFar: Path,\n f: (path: Path, value: T) => V | null\n ): V | null {\n const result = this.value ? f(pathSoFar, this.value) : false;\n if (result) {\n return result;\n } else {\n if (pathToFollow.isEmpty()) {\n return null;\n } else {\n const front = pathToFollow.getFront()!;\n const nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.findOnPath_(\n pathToFollow.popFront(),\n pathSoFar.child(front),\n f\n );\n } else {\n return null;\n }\n }\n }\n }\n\n /**\n *\n * @param {!Path} path\n * @param {!function(!Path, !T)} f\n * @returns {!ImmutableTree.}\n */\n foreachOnPath(\n path: Path,\n f: (path: Path, value: T) => void\n ): ImmutableTree {\n return this.foreachOnPath_(path, Path.Empty, f);\n }\n\n private foreachOnPath_(\n pathToFollow: Path,\n currentRelativePath: Path,\n f: (path: Path, value: T) => void\n ): ImmutableTree {\n if (pathToFollow.isEmpty()) {\n return this;\n } else {\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n const front = pathToFollow.getFront();\n const nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.foreachOnPath_(\n pathToFollow.popFront(),\n currentRelativePath.child(front),\n f\n );\n } else {\n return ImmutableTree.Empty;\n }\n }\n }\n\n /**\n * Calls the given function for each node in the tree that has a value.\n *\n * @param {function(!Path, !T)} f A function to be called with\n * the path from the root of the tree to a node, and the value at that node.\n * Called in depth-first order.\n */\n foreach(f: (path: Path, value: T) => void) {\n this.foreach_(Path.Empty, f);\n }\n\n private foreach_(\n currentRelativePath: Path,\n f: (path: Path, value: T) => void\n ) {\n this.children.inorderTraversal(function(childName, childTree) {\n childTree.foreach_(currentRelativePath.child(childName), f);\n });\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n }\n\n /**\n *\n * @param {function(string, !T)} f\n */\n foreachChild(f: (name: string, value: T) => void) {\n this.children.inorderTraversal(\n (childName: string, childTree: ImmutableTree) => {\n if (childTree.value) {\n f(childName, childTree.value);\n }\n }\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/ImmutableTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CacheNode } from './view/CacheNode';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { assert } from '../../utils/assert';\nimport { isEmpty, forEach, findValue, safeGet } from '../../utils/obj';\nimport { ViewCache } from './view/ViewCache';\nimport { View } from './view/View';\nimport { Operation } from './operation/Operation';\nimport { WriteTreeRef } from './WriteTree';\nimport { Query } from '../api/Query';\nimport { EventRegistration } from './view/EventRegistration';\nimport { Node } from './snap/Node';\nimport { Path } from './util/Path';\nimport { Event } from './view/Event';\nimport { Reference, ReferenceConstructor } from '../api/Reference';\n\nlet __referenceConstructor: ReferenceConstructor;\n\n/**\n * SyncPoint represents a single location in a SyncTree with 1 or more event registrations, meaning we need to\n * maintain 1 or more Views at this location to cache server data and raise appropriate events for server changes\n * and user writes (set, transaction, update).\n *\n * It's responsible for:\n * - Maintaining the set of 1 or more views necessary at this location (a SyncPoint with 0 views should be removed).\n * - Proxying user / server operations to the views as appropriate (i.e. applyServerOverwrite,\n * applyUserOverwrite, etc.)\n */\nexport class SyncPoint {\n static set __referenceConstructor(val: ReferenceConstructor) {\n assert(\n !__referenceConstructor,\n '__referenceConstructor has already been defined'\n );\n __referenceConstructor = val;\n }\n\n static get __referenceConstructor() {\n assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n }\n\n /**\n * The Views being tracked at this location in the tree, stored as a map where the key is a\n * queryId and the value is the View for that query.\n *\n * NOTE: This list will be quite small (usually 1, but perhaps 2 or 3; any more is an odd use case).\n *\n * @type {!Object.}\n * @private\n */\n private views_: { [k: string]: View } = {};\n\n /**\n * @return {boolean}\n */\n isEmpty(): boolean {\n return isEmpty(this.views_);\n }\n\n /**\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} optCompleteServerCache\n * @return {!Array.}\n */\n applyOperation(\n operation: Operation,\n writesCache: WriteTreeRef,\n optCompleteServerCache: Node | null\n ): Event[] {\n const queryId = operation.source.queryId;\n if (queryId !== null) {\n const view = safeGet(this.views_, queryId);\n assert(view != null, 'SyncTree gave us an op for an invalid query.');\n return view.applyOperation(\n operation,\n writesCache,\n optCompleteServerCache\n );\n } else {\n let events: Event[] = [];\n\n forEach(this.views_, function(key: string, view: View) {\n events = events.concat(\n view.applyOperation(operation, writesCache, optCompleteServerCache)\n );\n });\n\n return events;\n }\n }\n\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache Complete server cache, if we have it.\n * @param {boolean} serverCacheComplete\n * @return {!Array.} Events to raise.\n */\n addEventRegistration(\n query: Query,\n eventRegistration: EventRegistration,\n writesCache: WriteTreeRef,\n serverCache: Node | null,\n serverCacheComplete: boolean\n ): Event[] {\n const queryId = query.queryIdentifier();\n let view = safeGet(this.views_, queryId);\n if (!view) {\n // TODO: make writesCache take flag for complete server node\n let eventCache = writesCache.calcCompleteEventCache(\n serverCacheComplete ? serverCache : null\n );\n let eventCacheComplete = false;\n if (eventCache) {\n eventCacheComplete = true;\n } else if (serverCache instanceof ChildrenNode) {\n eventCache = writesCache.calcCompleteEventChildren(serverCache);\n eventCacheComplete = false;\n } else {\n eventCache = ChildrenNode.EMPTY_NODE;\n eventCacheComplete = false;\n }\n const viewCache = new ViewCache(\n new CacheNode /** @type {!Node} */(\n eventCache,\n eventCacheComplete,\n false\n ),\n new CacheNode /** @type {!Node} */(\n serverCache,\n serverCacheComplete,\n false\n )\n );\n view = new View(query, viewCache);\n this.views_[queryId] = view;\n }\n\n // This is guaranteed to exist now, we just created anything that was missing\n view.addEventRegistration(eventRegistration);\n return view.getInitialEvents(eventRegistration);\n }\n\n /**\n * Remove event callback(s). Return cancelEvents if a cancelError is specified.\n *\n * If query is the default query, we'll check all views for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified view(s).\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {{removed:!Array., events:!Array.}} removed queries and any cancel events\n */\n removeEventRegistration(\n query: Query,\n eventRegistration: EventRegistration | null,\n cancelError?: Error\n ): { removed: Query[]; events: Event[] } {\n const queryId = query.queryIdentifier();\n const removed: Query[] = [];\n let cancelEvents: Event[] = [];\n const hadCompleteView = this.hasCompleteView();\n if (queryId === 'default') {\n // When you do ref.off(...), we search all views for the registration to remove.\n const self = this;\n forEach(this.views_, function(viewQueryId: string, view: View) {\n cancelEvents = cancelEvents.concat(\n view.removeEventRegistration(eventRegistration, cancelError)\n );\n if (view.isEmpty()) {\n delete self.views_[viewQueryId];\n\n // We'll deal with complete views later.\n if (!view.getQuery().getQueryParams().loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n });\n } else {\n // remove the callback from the specific view.\n const view = safeGet(this.views_, queryId);\n if (view) {\n cancelEvents = cancelEvents.concat(\n view.removeEventRegistration(eventRegistration, cancelError)\n );\n if (view.isEmpty()) {\n delete this.views_[queryId];\n\n // We'll deal with complete views later.\n if (!view.getQuery().getQueryParams().loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n }\n }\n\n if (hadCompleteView && !this.hasCompleteView()) {\n // We removed our last complete view.\n removed.push(\n new SyncPoint.__referenceConstructor(query.repo, query.path)\n );\n }\n\n return { removed: removed, events: cancelEvents };\n }\n\n /**\n * @return {!Array.}\n */\n getQueryViews(): View[] {\n const values = Object.keys(this.views_).map(key => this.views_[key]);\n return values.filter(function(view) {\n return !view.getQuery().getQueryParams().loadsAllData();\n });\n }\n\n /**\n *\n * @param {!Path} path The path to the desired complete snapshot\n * @return {?Node} A complete cache, if it exists\n */\n getCompleteServerCache(path: Path): Node | null {\n let serverCache: Node | null = null;\n forEach(this.views_, (key: string, view: View) => {\n serverCache = serverCache || view.getCompleteServerCache(path);\n });\n return serverCache;\n }\n\n /**\n * @param {!Query} query\n * @return {?View}\n */\n viewForQuery(query: Query): View | null {\n const params = query.getQueryParams();\n if (params.loadsAllData()) {\n return this.getCompleteView();\n } else {\n const queryId = query.queryIdentifier();\n return safeGet(this.views_, queryId);\n }\n }\n\n /**\n * @param {!Query} query\n * @return {boolean}\n */\n viewExistsForQuery(query: Query): boolean {\n return this.viewForQuery(query) != null;\n }\n\n /**\n * @return {boolean}\n */\n hasCompleteView(): boolean {\n return this.getCompleteView() != null;\n }\n\n /**\n * @return {?View}\n */\n getCompleteView(): View | null {\n const completeView = findValue(this.views_, (view: View) =>\n view.getQuery().getQueryParams().loadsAllData()\n );\n return completeView || null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SyncPoint.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from '../util/Path';\nimport { Operation, OperationSource, OperationType } from './Operation';\nimport { ImmutableTree } from '../util/ImmutableTree';\n\nexport class AckUserWrite implements Operation {\n /** @inheritDoc */\n type = OperationType.ACK_USER_WRITE;\n\n /** @inheritDoc */\n source = OperationSource.User;\n\n /**\n *\n * @param {!Path} path\n * @param {!ImmutableTree} affectedTree A tree containing true for each affected path. Affected paths can't overlap.\n * @param {!boolean} revert\n */\n constructor(\n /**@inheritDoc */ public path: Path,\n /**@inheritDoc */ public affectedTree: ImmutableTree,\n /**@inheritDoc */ public revert: boolean\n ) {}\n\n /**\n * @inheritDoc\n */\n operationForChild(childName: string): AckUserWrite {\n if (!this.path.isEmpty()) {\n assert(\n this.path.getFront() === childName,\n 'operationForChild called for unrelated child.'\n );\n return new AckUserWrite(\n this.path.popFront(),\n this.affectedTree,\n this.revert\n );\n } else if (this.affectedTree.value != null) {\n assert(\n this.affectedTree.children.isEmpty(),\n 'affectedTree should not have overlapping affected paths.'\n );\n // All child locations are affected as well; just return same operation.\n return this;\n } else {\n const childTree = this.affectedTree.subtree(new Path(childName));\n return new AckUserWrite(Path.Empty, childTree, this.revert);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/AckUserWrite.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../util/Path';\nimport { Operation, OperationSource, OperationType } from './Operation';\n\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @constructor\n * @implements {Operation}\n */\nexport class ListenComplete implements Operation {\n /** @inheritDoc */\n type = OperationType.LISTEN_COMPLETE;\n\n constructor(public source: OperationSource, public path: Path) {}\n\n operationForChild(childName: string): ListenComplete {\n if (this.path.isEmpty()) {\n return new ListenComplete(this.source, Path.Empty);\n } else {\n return new ListenComplete(this.source, this.path.popFront());\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/ListenComplete.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Operation, OperationSource, OperationType } from './Operation';\nimport { Path } from '../util/Path';\nimport { Node } from '../snap/Node';\n\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!Node} snap\n * @constructor\n * @implements {Operation}\n */\nexport class Overwrite implements Operation {\n /** @inheritDoc */\n type = OperationType.OVERWRITE;\n\n constructor(\n public source: OperationSource,\n public path: Path,\n public snap: Node\n ) {}\n\n operationForChild(childName: string): Overwrite {\n if (this.path.isEmpty()) {\n return new Overwrite(\n this.source,\n Path.Empty,\n this.snap.getImmediateChild(childName)\n );\n } else {\n return new Overwrite(this.source, this.path.popFront(), this.snap);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/Overwrite.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Operation, OperationSource, OperationType } from './Operation';\nimport { Overwrite } from './Overwrite';\nimport { Path } from '../util/Path';\nimport { assert } from '../../../utils/assert';\nimport { ImmutableTree } from '../util/ImmutableTree';\nimport { Node } from '../snap/Node';\n\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!ImmutableTree.} children\n * @constructor\n * @implements {Operation}\n */\nexport class Merge implements Operation {\n /** @inheritDoc */\n type = OperationType.MERGE;\n\n constructor(\n /**@inheritDoc */ public source: OperationSource,\n /**@inheritDoc */ public path: Path,\n /**@inheritDoc */ public children: ImmutableTree\n ) {}\n\n /**\n * @inheritDoc\n */\n operationForChild(childName: string): Operation {\n if (this.path.isEmpty()) {\n const childTree = this.children.subtree(new Path(childName));\n if (childTree.isEmpty()) {\n // This child is unaffected\n return null;\n } else if (childTree.value) {\n // We have a snapshot for the child in question. This becomes an overwrite of the child.\n return new Overwrite(this.source, Path.Empty, childTree.value);\n } else {\n // This is a merge at a deeper level\n return new Merge(this.source, Path.Empty, childTree);\n }\n } else {\n assert(\n this.path.getFront() === childName,\n \"Can't get a merge for a child not on the path of the operation\"\n );\n return new Merge(this.source, this.path.popFront(), this.children);\n }\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return (\n 'Operation(' +\n this.path +\n ': ' +\n this.source.toString() +\n ' merge: ' +\n this.children.toString() +\n ')'\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/Merge.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Node } from '../snap/Node';\nimport { Path } from '../util/Path';\n\n/**\n * A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully\n * initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.\n * initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks\n * whether a node potentially had children removed due to a filter.\n */\nexport class CacheNode {\n /**\n * @param {!Node} node_\n * @param {boolean} fullyInitialized_\n * @param {boolean} filtered_\n */\n constructor(\n private node_: Node,\n private fullyInitialized_: boolean,\n private filtered_: boolean\n ) {}\n\n /**\n * Returns whether this node was fully initialized with either server data or a complete overwrite by the client\n * @return {boolean}\n */\n isFullyInitialized(): boolean {\n return this.fullyInitialized_;\n }\n\n /**\n * Returns whether this node is potentially missing children due to a filter applied to the node\n * @return {boolean}\n */\n isFiltered(): boolean {\n return this.filtered_;\n }\n\n /**\n * @param {!Path} path\n * @return {boolean}\n */\n isCompleteForPath(path: Path): boolean {\n if (path.isEmpty()) {\n return this.isFullyInitialized() && !this.filtered_;\n }\n\n const childKey = path.getFront();\n return this.isCompleteForChild(childKey);\n }\n\n /**\n * @param {!string} key\n * @return {boolean}\n */\n isCompleteForChild(key: string): boolean {\n return (\n (this.isFullyInitialized() && !this.filtered_) || this.node_.hasChild(key)\n );\n }\n\n /**\n * @return {!Node}\n */\n getNode(): Node {\n return this.node_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/CacheNode.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ChildrenNode } from '../snap/ChildrenNode';\nimport { CacheNode } from './CacheNode';\nimport { Node } from '../snap/Node';\n\n/**\n * Stores the data we have cached for a view.\n *\n * serverSnap is the cached server data, eventSnap is the cached event data (server data plus any local writes).\n *\n * @constructor\n */\nexport class ViewCache {\n /**\n *\n * @param {!CacheNode} eventCache_\n * @param {!CacheNode} serverCache_\n */\n constructor(\n private readonly eventCache_: CacheNode,\n private readonly serverCache_: CacheNode\n ) {}\n\n /**\n * @const\n * @type {ViewCache}\n */\n static Empty = new ViewCache(\n new CacheNode(\n ChildrenNode.EMPTY_NODE,\n /*fullyInitialized=*/ false,\n /*filtered=*/ false\n ),\n new CacheNode(\n ChildrenNode.EMPTY_NODE,\n /*fullyInitialized=*/ false,\n /*filtered=*/ false\n )\n );\n\n /**\n * @param {!Node} eventSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n updateEventSnap(\n eventSnap: Node,\n complete: boolean,\n filtered: boolean\n ): ViewCache {\n return new ViewCache(\n new CacheNode(eventSnap, complete, filtered),\n this.serverCache_\n );\n }\n\n /**\n * @param {!Node} serverSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n updateServerSnap(\n serverSnap: Node,\n complete: boolean,\n filtered: boolean\n ): ViewCache {\n return new ViewCache(\n this.eventCache_,\n new CacheNode(serverSnap, complete, filtered)\n );\n }\n\n /**\n * @return {!CacheNode}\n */\n getEventCache(): CacheNode {\n return this.eventCache_;\n }\n\n /**\n * @return {?Node}\n */\n getCompleteEventSnap(): Node | null {\n return this.eventCache_.isFullyInitialized()\n ? this.eventCache_.getNode()\n : null;\n }\n\n /**\n * @return {!CacheNode}\n */\n getServerCache(): CacheNode {\n return this.serverCache_;\n }\n\n /**\n * @return {?Node}\n */\n getCompleteServerSnap(): Node | null {\n return this.serverCache_.isFullyInitialized()\n ? this.serverCache_.getNode()\n : null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/ViewCache.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Node } from '../snap/Node';\n\n/**\n * @constructor\n * @struct\n * @param {!string} type The event type\n * @param {!Node} snapshotNode The data\n * @param {string=} childName The name for this child, if it's a child event\n * @param {Node=} oldSnap Used for intermediate processing of child changed events\n * @param {string=} prevName The name for the previous child, if applicable\n */\nexport class Change {\n constructor(\n public type: string,\n public snapshotNode: Node,\n public childName?: string,\n public oldSnap?: Node,\n public prevName?: string\n ) {}\n\n /**\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static valueChange(snapshot: Node): Change {\n return new Change(Change.VALUE, snapshot);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static childAddedChange(childKey: string, snapshot: Node): Change {\n return new Change(Change.CHILD_ADDED, snapshot, childKey);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static childRemovedChange(childKey: string, snapshot: Node): Change {\n return new Change(Change.CHILD_REMOVED, snapshot, childKey);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} newSnapshot\n * @param {!Node} oldSnapshot\n * @return {!Change}\n */\n static childChangedChange(\n childKey: string,\n newSnapshot: Node,\n oldSnapshot: Node\n ): Change {\n return new Change(Change.CHILD_CHANGED, newSnapshot, childKey, oldSnapshot);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static childMovedChange(childKey: string, snapshot: Node): Change {\n return new Change(Change.CHILD_MOVED, snapshot, childKey);\n }\n\n //event types\n /** Event type for a child added */\n static CHILD_ADDED = 'child_added';\n\n /** Event type for a child removed */\n static CHILD_REMOVED = 'child_removed';\n\n /** Event type for a child changed */\n static CHILD_CHANGED = 'child_changed';\n\n /** Event type for a child moved */\n static CHILD_MOVED = 'child_moved';\n\n /** Event type for a value change */\n static VALUE = 'value';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/Change.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../../utils/assert';\nimport { Change } from '../Change';\nimport { ChildrenNode } from '../../snap/ChildrenNode';\nimport { PRIORITY_INDEX } from '../../snap/indexes/PriorityIndex';\nimport { NodeFilter } from './NodeFilter';\nimport { Index } from '../../snap/indexes/Index';\nimport { Path } from '../../util/Path';\nimport { CompleteChildSource } from '../CompleteChildSource';\nimport { ChildChangeAccumulator } from '../ChildChangeAccumulator';\nimport { Node } from '../../snap/Node';\n\n/**\n * Doesn't really filter nodes but applies an index to the node and keeps track of any changes\n *\n * @constructor\n * @implements {NodeFilter}\n * @param {!Index} index\n */\nexport class IndexedFilter implements NodeFilter {\n constructor(private readonly index_: Index) {}\n\n updateChild(\n snap: Node,\n key: string,\n newChild: Node,\n affectedPath: Path,\n source: CompleteChildSource,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n assert(\n snap.isIndexed(this.index_),\n 'A node must be indexed if only a child is updated'\n );\n const oldChild = snap.getImmediateChild(key);\n // Check if anything actually changed.\n if (\n oldChild.getChild(affectedPath).equals(newChild.getChild(affectedPath))\n ) {\n // There's an edge case where a child can enter or leave the view because affectedPath was set to null.\n // In this case, affectedPath will appear null in both the old and new snapshots. So we need\n // to avoid treating these cases as \"nothing changed.\"\n if (oldChild.isEmpty() == newChild.isEmpty()) {\n // Nothing changed.\n\n // This assert should be valid, but it's expensive (can dominate perf testing) so don't actually do it.\n //assert(oldChild.equals(newChild), 'Old and new snapshots should be equal.');\n return snap;\n }\n }\n\n if (optChangeAccumulator != null) {\n if (newChild.isEmpty()) {\n if (snap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(\n Change.childRemovedChange(key, oldChild)\n );\n } else {\n assert(\n snap.isLeafNode(),\n 'A child remove without an old child only makes sense on a leaf node'\n );\n }\n } else if (oldChild.isEmpty()) {\n optChangeAccumulator.trackChildChange(\n Change.childAddedChange(key, newChild)\n );\n } else {\n optChangeAccumulator.trackChildChange(\n Change.childChangedChange(key, newChild, oldChild)\n );\n }\n }\n if (snap.isLeafNode() && newChild.isEmpty()) {\n return snap;\n } else {\n // Make sure the node is indexed\n return snap.updateImmediateChild(key, newChild).withIndex(this.index_);\n }\n }\n\n /**\n * @inheritDoc\n */\n updateFullNode(\n oldSnap: Node,\n newSnap: Node,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (optChangeAccumulator != null) {\n if (!oldSnap.isLeafNode()) {\n oldSnap.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n if (!newSnap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(\n Change.childRemovedChange(key, childNode)\n );\n }\n });\n }\n if (!newSnap.isLeafNode()) {\n newSnap.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n if (oldSnap.hasChild(key)) {\n const oldChild = oldSnap.getImmediateChild(key);\n if (!oldChild.equals(childNode)) {\n optChangeAccumulator.trackChildChange(\n Change.childChangedChange(key, childNode, oldChild)\n );\n }\n } else {\n optChangeAccumulator.trackChildChange(\n Change.childAddedChange(key, childNode)\n );\n }\n });\n }\n }\n return newSnap.withIndex(this.index_);\n }\n\n /**\n * @inheritDoc\n */\n updatePriority(oldSnap: Node, newPriority: Node): Node {\n if (oldSnap.isEmpty()) {\n return ChildrenNode.EMPTY_NODE;\n } else {\n return oldSnap.updatePriority(newPriority);\n }\n }\n\n /**\n * @inheritDoc\n */\n filtersNodes(): boolean {\n return false;\n }\n\n /**\n * @inheritDoc\n */\n getIndexedFilter(): IndexedFilter {\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getIndex(): Index {\n return this.index_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/filter/IndexedFilter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { getValues, safeGet } from '../../../utils/obj';\nimport { Change } from './Change';\nimport { assert, assertionError } from '../../../utils/assert';\n\n/**\n * @constructor\n */\nexport class ChildChangeAccumulator {\n private changeMap_: { [k: string]: Change } = {};\n\n /**\n * @param {!Change} change\n */\n trackChildChange(change: Change) {\n const type = change.type;\n const childKey /** @type {!string} */ = change.childName;\n assert(\n type == Change.CHILD_ADDED ||\n type == Change.CHILD_CHANGED ||\n type == Change.CHILD_REMOVED,\n 'Only child changes supported for tracking'\n );\n assert(\n childKey !== '.priority',\n 'Only non-priority child changes can be tracked.'\n );\n const oldChange = safeGet(this.changeMap_, childKey) as Change;\n if (oldChange) {\n const oldType = oldChange.type;\n if (type == Change.CHILD_ADDED && oldType == Change.CHILD_REMOVED) {\n this.changeMap_[childKey] = Change.childChangedChange(\n childKey,\n change.snapshotNode,\n oldChange.snapshotNode\n );\n } else if (\n type == Change.CHILD_REMOVED &&\n oldType == Change.CHILD_ADDED\n ) {\n delete this.changeMap_[childKey];\n } else if (\n type == Change.CHILD_REMOVED &&\n oldType == Change.CHILD_CHANGED\n ) {\n this.changeMap_[childKey] = Change.childRemovedChange(\n childKey,\n oldChange.oldSnap\n );\n } else if (\n type == Change.CHILD_CHANGED &&\n oldType == Change.CHILD_ADDED\n ) {\n this.changeMap_[childKey] = Change.childAddedChange(\n childKey,\n change.snapshotNode\n );\n } else if (\n type == Change.CHILD_CHANGED &&\n oldType == Change.CHILD_CHANGED\n ) {\n this.changeMap_[childKey] = Change.childChangedChange(\n childKey,\n change.snapshotNode,\n oldChange.oldSnap\n );\n } else {\n throw assertionError(\n 'Illegal combination of changes: ' +\n change +\n ' occurred after ' +\n oldChange\n );\n }\n } else {\n this.changeMap_[childKey] = change;\n }\n }\n\n /**\n * @return {!Array.}\n */\n getChanges(): Change[] {\n return getValues(this.changeMap_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/ChildChangeAccumulator.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CacheNode } from './CacheNode';\nimport { NamedNode, Node } from '../snap/Node';\nimport { Index } from '../snap/indexes/Index';\nimport { WriteTreeRef } from '../WriteTree';\nimport { ViewCache } from './ViewCache';\n\n/**\n * Since updates to filtered nodes might require nodes to be pulled in from \"outside\" the node, this interface\n * can help to get complete children that can be pulled in.\n * A class implementing this interface takes potentially multiple sources (e.g. user writes, server data from\n * other views etc.) to try it's best to get a complete child that might be useful in pulling into the view.\n *\n * @interface\n */\nexport interface CompleteChildSource {\n /**\n * @param {!string} childKey\n * @return {?Node}\n */\n getCompleteChild(childKey: string): Node | null;\n\n /**\n * @param {!Index} index\n * @param {!NamedNode} child\n * @param {boolean} reverse\n * @return {?NamedNode}\n */\n getChildAfterChild(\n index: Index,\n child: NamedNode,\n reverse: boolean\n ): NamedNode | null;\n}\n\n/**\n * An implementation of CompleteChildSource that never returns any additional children\n *\n * @private\n * @constructor\n * @implements CompleteChildSource\n */\nexport class NoCompleteChildSource_ implements CompleteChildSource {\n /**\n * @inheritDoc\n */\n getCompleteChild(childKey?: string): Node | null {\n return null;\n }\n\n /**\n * @inheritDoc\n */\n getChildAfterChild(\n index?: Index,\n child?: NamedNode,\n reverse?: boolean\n ): NamedNode | null {\n return null;\n }\n}\n\n/**\n * Singleton instance.\n * @const\n * @type {!CompleteChildSource}\n */\nexport const NO_COMPLETE_CHILD_SOURCE = new NoCompleteChildSource_();\n\n/**\n * An implementation of CompleteChildSource that uses a WriteTree in addition to any other server data or\n * old event caches available to calculate complete children.\n *\n *\n * @implements CompleteChildSource\n */\nexport class WriteTreeCompleteChildSource implements CompleteChildSource {\n /**\n * @param {!WriteTreeRef} writes_\n * @param {!ViewCache} viewCache_\n * @param {?Node} optCompleteServerCache_\n */\n constructor(\n private writes_: WriteTreeRef,\n private viewCache_: ViewCache,\n private optCompleteServerCache_: Node | null = null\n ) {}\n\n /**\n * @inheritDoc\n */\n getCompleteChild(childKey: string): Node | null {\n const node = this.viewCache_.getEventCache();\n if (node.isCompleteForChild(childKey)) {\n return node.getNode().getImmediateChild(childKey);\n } else {\n const serverNode =\n this.optCompleteServerCache_ != null\n ? new CacheNode(this.optCompleteServerCache_, true, false)\n : this.viewCache_.getServerCache();\n return this.writes_.calcCompleteChild(childKey, serverNode);\n }\n }\n\n /**\n * @inheritDoc\n */\n getChildAfterChild(\n index: Index,\n child: NamedNode,\n reverse: boolean\n ): NamedNode | null {\n const completeServerData =\n this.optCompleteServerCache_ != null\n ? this.optCompleteServerCache_\n : this.viewCache_.getCompleteServerSnap();\n const nodes = this.writes_.calcIndexedSlice(\n completeServerData,\n child,\n 1,\n reverse,\n index\n );\n if (nodes.length === 0) {\n return null;\n } else {\n return nodes[0];\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/CompleteChildSource.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Operation, OperationType } from '../operation/Operation';\nimport { assert, assertionError } from '../../../utils/assert';\nimport { ChildChangeAccumulator } from './ChildChangeAccumulator';\nimport { Change } from './Change';\nimport { ChildrenNode } from '../snap/ChildrenNode';\nimport { KEY_INDEX } from '../snap/indexes/KeyIndex';\nimport { ImmutableTree } from '../util/ImmutableTree';\nimport { Path } from '../util/Path';\nimport {\n WriteTreeCompleteChildSource,\n NO_COMPLETE_CHILD_SOURCE,\n CompleteChildSource\n} from './CompleteChildSource';\nimport { ViewCache } from './ViewCache';\nimport { NodeFilter } from './filter/NodeFilter';\nimport { WriteTreeRef } from '../WriteTree';\nimport { Overwrite } from '../operation/Overwrite';\nimport { Merge } from '../operation/Merge';\nimport { AckUserWrite } from '../operation/AckUserWrite';\nimport { Node } from '../snap/Node';\n\n/**\n * @constructor\n * @struct\n */\nexport class ProcessorResult {\n /**\n * @param {!ViewCache} viewCache\n * @param {!Array.} changes\n */\n constructor(\n public readonly viewCache: ViewCache,\n public readonly changes: Change[]\n ) {}\n}\n\n/**\n * @constructor\n */\nexport class ViewProcessor {\n /**\n * @param {!NodeFilter} filter_\n */\n constructor(private readonly filter_: NodeFilter) {}\n\n /**\n * @param {!ViewCache} viewCache\n */\n assertIndexed(viewCache: ViewCache) {\n assert(\n viewCache.getEventCache().getNode().isIndexed(this.filter_.getIndex()),\n 'Event snap not indexed'\n );\n assert(\n viewCache.getServerCache().getNode().isIndexed(this.filter_.getIndex()),\n 'Server snap not indexed'\n );\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @return {!ProcessorResult}\n */\n applyOperation(\n oldViewCache: ViewCache,\n operation: Operation,\n writesCache: WriteTreeRef,\n completeCache: Node | null\n ): ProcessorResult {\n const accumulator = new ChildChangeAccumulator();\n let newViewCache, filterServerNode;\n if (operation.type === OperationType.OVERWRITE) {\n const overwrite = operation as Overwrite;\n if (overwrite.source.fromUser) {\n newViewCache = this.applyUserOverwrite_(\n oldViewCache,\n overwrite.path,\n overwrite.snap,\n writesCache,\n completeCache,\n accumulator\n );\n } else {\n assert(overwrite.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered and the\n // update is not at the root in which case it is ok (and necessary) to mark the node unfiltered\n // again\n filterServerNode =\n overwrite.source.tagged ||\n (oldViewCache.getServerCache().isFiltered() &&\n !overwrite.path.isEmpty());\n newViewCache = this.applyServerOverwrite_(\n oldViewCache,\n overwrite.path,\n overwrite.snap,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n }\n } else if (operation.type === OperationType.MERGE) {\n const merge = operation as Merge;\n if (merge.source.fromUser) {\n newViewCache = this.applyUserMerge_(\n oldViewCache,\n merge.path,\n merge.children,\n writesCache,\n completeCache,\n accumulator\n );\n } else {\n assert(merge.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered\n filterServerNode =\n merge.source.tagged || oldViewCache.getServerCache().isFiltered();\n newViewCache = this.applyServerMerge_(\n oldViewCache,\n merge.path,\n merge.children,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n }\n } else if (operation.type === OperationType.ACK_USER_WRITE) {\n const ackUserWrite = operation as AckUserWrite;\n if (!ackUserWrite.revert) {\n newViewCache = this.ackUserWrite_(\n oldViewCache,\n ackUserWrite.path,\n ackUserWrite.affectedTree,\n writesCache,\n completeCache,\n accumulator\n );\n } else {\n newViewCache = this.revertUserWrite_(\n oldViewCache,\n ackUserWrite.path,\n writesCache,\n completeCache,\n accumulator\n );\n }\n } else if (operation.type === OperationType.LISTEN_COMPLETE) {\n newViewCache = this.listenComplete_(\n oldViewCache,\n operation.path,\n writesCache,\n accumulator\n );\n } else {\n throw assertionError('Unknown operation type: ' + operation.type);\n }\n const changes = accumulator.getChanges();\n ViewProcessor.maybeAddValueEvent_(oldViewCache, newViewCache, changes);\n return new ProcessorResult(newViewCache, changes);\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!ViewCache} newViewCache\n * @param {!Array.} accumulator\n * @private\n */\n private static maybeAddValueEvent_(\n oldViewCache: ViewCache,\n newViewCache: ViewCache,\n accumulator: Change[]\n ) {\n const eventSnap = newViewCache.getEventCache();\n if (eventSnap.isFullyInitialized()) {\n const isLeafOrEmpty =\n eventSnap.getNode().isLeafNode() || eventSnap.getNode().isEmpty();\n const oldCompleteSnap = oldViewCache.getCompleteEventSnap();\n if (\n accumulator.length > 0 ||\n !oldViewCache.getEventCache().isFullyInitialized() ||\n (isLeafOrEmpty &&\n !eventSnap.getNode().equals /** @type {!Node} */(oldCompleteSnap)) ||\n !eventSnap.getNode().getPriority().equals(oldCompleteSnap.getPriority())\n ) {\n accumulator.push(\n Change.valueChange(\n /** @type {!Node} */ newViewCache.getCompleteEventSnap()\n )\n );\n }\n }\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} changePath\n * @param {!WriteTreeRef} writesCache\n * @param {!CompleteChildSource} source\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private generateEventCacheAfterServerEvent_(\n viewCache: ViewCache,\n changePath: Path,\n writesCache: WriteTreeRef,\n source: CompleteChildSource,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldEventSnap = viewCache.getEventCache();\n if (writesCache.shadowingWrite(changePath) != null) {\n // we have a shadowing write, ignore changes\n return viewCache;\n } else {\n let newEventCache, serverNode;\n if (changePath.isEmpty()) {\n // TODO: figure out how this plays with \"sliding ack windows\"\n assert(\n viewCache.getServerCache().isFullyInitialized(),\n 'If change path is empty, we must have complete server data'\n );\n if (viewCache.getServerCache().isFiltered()) {\n // We need to special case this, because we need to only apply writes to complete children, or\n // we might end up raising events for incomplete children. If the server data is filtered deep\n // writes cannot be guaranteed to be complete\n const serverCache = viewCache.getCompleteServerSnap();\n const completeChildren =\n serverCache instanceof ChildrenNode\n ? serverCache\n : ChildrenNode.EMPTY_NODE;\n const completeEventChildren = writesCache.calcCompleteEventChildren(\n completeChildren\n );\n newEventCache = this.filter_.updateFullNode(\n viewCache.getEventCache().getNode(),\n completeEventChildren,\n accumulator\n );\n } else {\n const completeNode = writesCache.calcCompleteEventCache(\n viewCache.getCompleteServerSnap()\n );\n newEventCache = this.filter_.updateFullNode(\n viewCache.getEventCache().getNode(),\n completeNode,\n accumulator\n );\n }\n } else {\n const childKey = changePath.getFront();\n if (childKey == '.priority') {\n assert(\n changePath.getLength() == 1,\n \"Can't have a priority with additional path components\"\n );\n const oldEventNode = oldEventSnap.getNode();\n serverNode = viewCache.getServerCache().getNode();\n // we might have overwrites for this priority\n const updatedPriority = writesCache.calcEventCacheAfterServerOverwrite(\n changePath,\n oldEventNode,\n serverNode\n );\n if (updatedPriority != null) {\n newEventCache = this.filter_.updatePriority(\n oldEventNode,\n updatedPriority\n );\n } else {\n // priority didn't change, keep old node\n newEventCache = oldEventSnap.getNode();\n }\n } else {\n const childChangePath = changePath.popFront();\n // update child\n let newEventChild;\n if (oldEventSnap.isCompleteForChild(childKey)) {\n serverNode = viewCache.getServerCache().getNode();\n const eventChildUpdate = writesCache.calcEventCacheAfterServerOverwrite(\n changePath,\n oldEventSnap.getNode(),\n serverNode\n );\n if (eventChildUpdate != null) {\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey)\n .updateChild(childChangePath, eventChildUpdate);\n } else {\n // Nothing changed, just keep the old child\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey);\n }\n } else {\n newEventChild = writesCache.calcCompleteChild(\n childKey,\n viewCache.getServerCache()\n );\n }\n if (newEventChild != null) {\n newEventCache = this.filter_.updateChild(\n oldEventSnap.getNode(),\n childKey,\n newEventChild,\n childChangePath,\n source,\n accumulator\n );\n } else {\n // no complete child available or no change\n newEventCache = oldEventSnap.getNode();\n }\n }\n }\n return viewCache.updateEventSnap(\n newEventCache,\n oldEventSnap.isFullyInitialized() || changePath.isEmpty(),\n this.filter_.filtersNodes()\n );\n }\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n applyServerOverwrite_(\n oldViewCache: ViewCache,\n changePath: Path,\n changedSnap: Node,\n writesCache: WriteTreeRef,\n completeCache: Node | null,\n filterServerNode: boolean,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldServerSnap = oldViewCache.getServerCache();\n let newServerCache;\n const serverFilter = filterServerNode\n ? this.filter_\n : this.filter_.getIndexedFilter();\n if (changePath.isEmpty()) {\n newServerCache = serverFilter.updateFullNode(\n oldServerSnap.getNode(),\n changedSnap,\n null\n );\n } else if (serverFilter.filtersNodes() && !oldServerSnap.isFiltered()) {\n // we want to filter the server node, but we didn't filter the server node yet, so simulate a full update\n const newServerNode = oldServerSnap\n .getNode()\n .updateChild(changePath, changedSnap);\n newServerCache = serverFilter.updateFullNode(\n oldServerSnap.getNode(),\n newServerNode,\n null\n );\n } else {\n const childKey = changePath.getFront();\n if (\n !oldServerSnap.isCompleteForPath(changePath) &&\n changePath.getLength() > 1\n ) {\n // We don't update incomplete nodes with updates intended for other listeners\n return oldViewCache;\n }\n const childChangePath = changePath.popFront();\n const childNode = oldServerSnap.getNode().getImmediateChild(childKey);\n const newChildNode = childNode.updateChild(childChangePath, changedSnap);\n if (childKey == '.priority') {\n newServerCache = serverFilter.updatePriority(\n oldServerSnap.getNode(),\n newChildNode\n );\n } else {\n newServerCache = serverFilter.updateChild(\n oldServerSnap.getNode(),\n childKey,\n newChildNode,\n childChangePath,\n NO_COMPLETE_CHILD_SOURCE,\n null\n );\n }\n }\n const newViewCache = oldViewCache.updateServerSnap(\n newServerCache,\n oldServerSnap.isFullyInitialized() || changePath.isEmpty(),\n serverFilter.filtersNodes()\n );\n const source = new WriteTreeCompleteChildSource(\n writesCache,\n newViewCache,\n completeCache\n );\n return this.generateEventCacheAfterServerEvent_(\n newViewCache,\n changePath,\n writesCache,\n source,\n accumulator\n );\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n applyUserOverwrite_(\n oldViewCache: ViewCache,\n changePath: Path,\n changedSnap: Node,\n writesCache: WriteTreeRef,\n completeCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldEventSnap = oldViewCache.getEventCache();\n let newViewCache, newEventCache;\n const source = new WriteTreeCompleteChildSource(\n writesCache,\n oldViewCache,\n completeCache\n );\n if (changePath.isEmpty()) {\n newEventCache = this.filter_.updateFullNode(\n oldViewCache.getEventCache().getNode(),\n changedSnap,\n accumulator\n );\n newViewCache = oldViewCache.updateEventSnap(\n newEventCache,\n true,\n this.filter_.filtersNodes()\n );\n } else {\n const childKey = changePath.getFront();\n if (childKey === '.priority') {\n newEventCache = this.filter_.updatePriority(\n oldViewCache.getEventCache().getNode(),\n changedSnap\n );\n newViewCache = oldViewCache.updateEventSnap(\n newEventCache,\n oldEventSnap.isFullyInitialized(),\n oldEventSnap.isFiltered()\n );\n } else {\n const childChangePath = changePath.popFront();\n const oldChild = oldEventSnap.getNode().getImmediateChild(childKey);\n let newChild;\n if (childChangePath.isEmpty()) {\n // Child overwrite, we can replace the child\n newChild = changedSnap;\n } else {\n const childNode = source.getCompleteChild(childKey);\n if (childNode != null) {\n if (\n childChangePath.getBack() === '.priority' &&\n childNode.getChild(childChangePath.parent()).isEmpty()\n ) {\n // This is a priority update on an empty node. If this node exists on the server, the\n // server will send down the priority in the update, so ignore for now\n newChild = childNode;\n } else {\n newChild = childNode.updateChild(childChangePath, changedSnap);\n }\n } else {\n // There is no complete child node available\n newChild = ChildrenNode.EMPTY_NODE;\n }\n }\n if (!oldChild.equals(newChild)) {\n const newEventSnap = this.filter_.updateChild(\n oldEventSnap.getNode(),\n childKey,\n newChild,\n childChangePath,\n source,\n accumulator\n );\n newViewCache = oldViewCache.updateEventSnap(\n newEventSnap,\n oldEventSnap.isFullyInitialized(),\n this.filter_.filtersNodes()\n );\n } else {\n newViewCache = oldViewCache;\n }\n }\n }\n return newViewCache;\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {string} childKey\n * @return {boolean}\n * @private\n */\n private static cacheHasChild_(\n viewCache: ViewCache,\n childKey: string\n ): boolean {\n return viewCache.getEventCache().isCompleteForChild(childKey);\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private applyUserMerge_(\n viewCache: ViewCache,\n path: Path,\n changedChildren: ImmutableTree,\n writesCache: WriteTreeRef,\n serverCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n let curViewCache = viewCache;\n changedChildren.foreach((relativePath, childNode) => {\n const writePath = path.child(relativePath);\n if (ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = this.applyUserOverwrite_(\n curViewCache,\n writePath,\n childNode,\n writesCache,\n serverCache,\n accumulator\n );\n }\n });\n\n changedChildren.foreach((relativePath, childNode) => {\n const writePath = path.child(relativePath);\n if (!ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = this.applyUserOverwrite_(\n curViewCache,\n writePath,\n childNode,\n writesCache,\n serverCache,\n accumulator\n );\n }\n });\n\n return curViewCache;\n }\n\n /**\n * @param {!Node} node\n * @param {ImmutableTree.} merge\n * @return {!Node}\n * @private\n */\n private applyMerge_(node: Node, merge: ImmutableTree): Node {\n merge.foreach(function(relativePath, childNode) {\n node = node.updateChild(relativePath, childNode);\n });\n return node;\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private applyServerMerge_(\n viewCache: ViewCache,\n path: Path,\n changedChildren: ImmutableTree,\n writesCache: WriteTreeRef,\n serverCache: Node | null,\n filterServerNode: boolean,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n // If we don't have a cache yet, this merge was intended for a previously listen in the same location. Ignore it and\n // wait for the complete data update coming soon.\n if (\n viewCache.getServerCache().getNode().isEmpty() &&\n !viewCache.getServerCache().isFullyInitialized()\n ) {\n return viewCache;\n }\n\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n let curViewCache = viewCache;\n let viewMergeTree;\n if (path.isEmpty()) {\n viewMergeTree = changedChildren;\n } else {\n viewMergeTree = ImmutableTree.Empty.setTree(path, changedChildren);\n }\n const serverNode = viewCache.getServerCache().getNode();\n viewMergeTree.children.inorderTraversal((childKey, childTree) => {\n if (serverNode.hasChild(childKey)) {\n const serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n const newChild = this.applyMerge_(serverChild, childTree);\n curViewCache = this.applyServerOverwrite_(\n curViewCache,\n new Path(childKey),\n newChild,\n writesCache,\n serverCache,\n filterServerNode,\n accumulator\n );\n }\n });\n viewMergeTree.children.inorderTraversal((childKey, childMergeTree) => {\n const isUnknownDeepMerge =\n !viewCache.getServerCache().isCompleteForChild(childKey) &&\n childMergeTree.value == null;\n if (!serverNode.hasChild(childKey) && !isUnknownDeepMerge) {\n const serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n const newChild = this.applyMerge_(serverChild, childMergeTree);\n curViewCache = this.applyServerOverwrite_(\n curViewCache,\n new Path(childKey),\n newChild,\n writesCache,\n serverCache,\n filterServerNode,\n accumulator\n );\n }\n });\n\n return curViewCache;\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} ackPath\n * @param {!ImmutableTree} affectedTree\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private ackUserWrite_(\n viewCache: ViewCache,\n ackPath: Path,\n affectedTree: ImmutableTree,\n writesCache: WriteTreeRef,\n completeCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n if (writesCache.shadowingWrite(ackPath) != null) {\n return viewCache;\n }\n\n // Only filter server node if it is currently filtered\n const filterServerNode = viewCache.getServerCache().isFiltered();\n\n // Essentially we'll just get our existing server cache for the affected paths and re-apply it as a server update\n // now that it won't be shadowed.\n const serverCache = viewCache.getServerCache();\n if (affectedTree.value != null) {\n // This is an overwrite.\n if (\n (ackPath.isEmpty() && serverCache.isFullyInitialized()) ||\n serverCache.isCompleteForPath(ackPath)\n ) {\n return this.applyServerOverwrite_(\n viewCache,\n ackPath,\n serverCache.getNode().getChild(ackPath),\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n } else if (ackPath.isEmpty()) {\n // This is a goofy edge case where we are acking data at this location but don't have full data. We\n // should just re-apply whatever we have in our cache as a merge.\n let changedChildren = ImmutableTree.Empty;\n serverCache.getNode().forEachChild(KEY_INDEX, function(name, node) {\n changedChildren = changedChildren.set(new Path(name), node);\n });\n return this.applyServerMerge_(\n viewCache,\n ackPath,\n changedChildren,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n } else {\n return viewCache;\n }\n } else {\n // This is a merge.\n let changedChildren = ImmutableTree.Empty;\n affectedTree.foreach(function(mergePath, value) {\n const serverCachePath = ackPath.child(mergePath);\n if (serverCache.isCompleteForPath(serverCachePath)) {\n changedChildren = changedChildren.set(\n mergePath,\n serverCache.getNode().getChild(serverCachePath)\n );\n }\n });\n return this.applyServerMerge_(\n viewCache,\n ackPath,\n changedChildren,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n }\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private listenComplete_(\n viewCache: ViewCache,\n path: Path,\n writesCache: WriteTreeRef,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldServerNode = viewCache.getServerCache();\n const newViewCache = viewCache.updateServerSnap(\n oldServerNode.getNode(),\n oldServerNode.isFullyInitialized() || path.isEmpty(),\n oldServerNode.isFiltered()\n );\n return this.generateEventCacheAfterServerEvent_(\n newViewCache,\n path,\n writesCache,\n NO_COMPLETE_CHILD_SOURCE,\n accumulator\n );\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private revertUserWrite_(\n viewCache: ViewCache,\n path: Path,\n writesCache: WriteTreeRef,\n completeServerCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n let complete;\n if (writesCache.shadowingWrite(path) != null) {\n return viewCache;\n } else {\n const source = new WriteTreeCompleteChildSource(\n writesCache,\n viewCache,\n completeServerCache\n );\n const oldEventCache = viewCache.getEventCache().getNode();\n let newEventCache;\n if (path.isEmpty() || path.getFront() === '.priority') {\n let newNode;\n if (viewCache.getServerCache().isFullyInitialized()) {\n newNode = writesCache.calcCompleteEventCache(\n viewCache.getCompleteServerSnap()\n );\n } else {\n const serverChildren = viewCache.getServerCache().getNode();\n assert(\n serverChildren instanceof ChildrenNode,\n 'serverChildren would be complete if leaf node'\n );\n newNode = writesCache.calcCompleteEventChildren(\n serverChildren as ChildrenNode\n );\n }\n newNode = newNode as Node;\n newEventCache = this.filter_.updateFullNode(\n oldEventCache,\n newNode,\n accumulator\n );\n } else {\n const childKey = path.getFront();\n let newChild = writesCache.calcCompleteChild(\n childKey,\n viewCache.getServerCache()\n );\n if (\n newChild == null &&\n viewCache.getServerCache().isCompleteForChild(childKey)\n ) {\n newChild = oldEventCache.getImmediateChild(childKey);\n }\n if (newChild != null) {\n newEventCache = this.filter_.updateChild(\n oldEventCache,\n childKey,\n newChild,\n path.popFront(),\n source,\n accumulator\n );\n } else if (viewCache.getEventCache().getNode().hasChild(childKey)) {\n // No complete child available, delete the existing one, if any\n newEventCache = this.filter_.updateChild(\n oldEventCache,\n childKey,\n ChildrenNode.EMPTY_NODE,\n path.popFront(),\n source,\n accumulator\n );\n } else {\n newEventCache = oldEventCache;\n }\n if (\n newEventCache.isEmpty() &&\n viewCache.getServerCache().isFullyInitialized()\n ) {\n // We might have reverted all child writes. Maybe the old event was a leaf node\n complete = writesCache.calcCompleteEventCache(\n viewCache.getCompleteServerSnap()\n );\n if (complete.isLeafNode()) {\n newEventCache = this.filter_.updateFullNode(\n newEventCache,\n complete,\n accumulator\n );\n }\n }\n }\n complete =\n viewCache.getServerCache().isFullyInitialized() ||\n writesCache.shadowingWrite(Path.Empty) != null;\n return viewCache.updateEventSnap(\n newEventCache,\n complete,\n this.filter_.filtersNodes()\n );\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/ViewProcessor.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { NamedNode, Node } from '../snap/Node';\nimport { Change } from './Change';\nimport { assertionError } from '../../../utils/assert';\nimport { Query } from '../../api/Query';\nimport { Index } from '../snap/indexes/Index';\nimport { EventRegistration } from './EventRegistration';\nimport { Event } from './Event';\n\n/**\n * An EventGenerator is used to convert \"raw\" changes (Change) as computed by the\n * CacheDiffer into actual events (Event) that can be raised. See generateEventsForChanges()\n * for details.\n *\n * @constructor\n */\nexport class EventGenerator {\n private index_: Index;\n\n /**\n *\n * @param {!Query} query_\n */\n constructor(private query_: Query) {\n /**\n * @private\n * @type {!Index}\n */\n this.index_ = this.query_.getQueryParams().getIndex();\n }\n\n /**\n * Given a set of raw changes (no moved events and prevName not specified yet), and a set of\n * EventRegistrations that should be notified of these changes, generate the actual events to be raised.\n *\n * Notes:\n * - child_moved events will be synthesized at this time for any child_changed events that affect\n * our index.\n * - prevName will be calculated based on the index ordering.\n *\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {!Array.} eventRegistrations\n * @return {!Array.}\n */\n generateEventsForChanges(\n changes: Change[],\n eventCache: Node,\n eventRegistrations: EventRegistration[]\n ): Event[] {\n const events: Event[] = [];\n const moves: Change[] = [];\n\n changes.forEach(change => {\n if (\n change.type === Change.CHILD_CHANGED &&\n this.index_.indexedValueChanged(\n change.oldSnap as Node,\n change.snapshotNode\n )\n ) {\n moves.push(\n Change.childMovedChange(\n change.childName as string,\n change.snapshotNode\n )\n );\n }\n });\n\n this.generateEventsForType_(\n events,\n Change.CHILD_REMOVED,\n changes,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.CHILD_ADDED,\n changes,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.CHILD_MOVED,\n moves,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.CHILD_CHANGED,\n changes,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.VALUE,\n changes,\n eventRegistrations,\n eventCache\n );\n\n return events;\n }\n\n /**\n * Given changes of a single change type, generate the corresponding events.\n *\n * @param {!Array.} events\n * @param {!string} eventType\n * @param {!Array.} changes\n * @param {!Array.} registrations\n * @param {!Node} eventCache\n * @private\n */\n private generateEventsForType_(\n events: Event[],\n eventType: string,\n changes: Change[],\n registrations: EventRegistration[],\n eventCache: Node\n ) {\n const filteredChanges = changes.filter(change => change.type === eventType);\n\n filteredChanges.sort(this.compareChanges_.bind(this));\n filteredChanges.forEach(change => {\n const materializedChange = this.materializeSingleChange_(\n change,\n eventCache\n );\n registrations.forEach(registration => {\n if (registration.respondsTo(change.type)) {\n events.push(\n registration.createEvent(materializedChange, this.query_)\n );\n }\n });\n });\n }\n\n /**\n * @param {!Change} change\n * @param {!Node} eventCache\n * @return {!Change}\n * @private\n */\n private materializeSingleChange_(change: Change, eventCache: Node): Change {\n if (change.type === 'value' || change.type === 'child_removed') {\n return change;\n } else {\n change.prevName = eventCache.getPredecessorChildName(\n /** @type {!string} */\n change.childName,\n change.snapshotNode,\n this.index_\n );\n return change;\n }\n }\n\n /**\n * @param {!Change} a\n * @param {!Change} b\n * @return {number}\n * @private\n */\n private compareChanges_(a: Change, b: Change) {\n if (a.childName == null || b.childName == null) {\n throw assertionError('Should only compare child_ events.');\n }\n const aWrapped = new NamedNode(a.childName, a.snapshotNode);\n const bWrapped = new NamedNode(b.childName, b.snapshotNode);\n return this.index_.compare(aWrapped, bWrapped);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/EventGenerator.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { IndexedFilter } from './filter/IndexedFilter';\nimport { ViewProcessor } from './ViewProcessor';\nimport { ChildrenNode } from '../snap/ChildrenNode';\nimport { CacheNode } from './CacheNode';\nimport { ViewCache } from './ViewCache';\nimport { EventGenerator } from './EventGenerator';\nimport { assert } from '../../../utils/assert';\nimport { Operation, OperationType } from '../operation/Operation';\nimport { Change } from './Change';\nimport { PRIORITY_INDEX } from '../snap/indexes/PriorityIndex';\nimport { Query } from '../../api/Query';\nimport { EventRegistration } from './EventRegistration';\nimport { Node } from '../snap/Node';\nimport { Path } from '../util/Path';\nimport { WriteTreeRef } from '../WriteTree';\nimport { CancelEvent, Event } from './Event';\n\n/**\n * A view represents a specific location and query that has 1 or more event registrations.\n *\n * It does several things:\n * - Maintains the list of event registrations for this location/query.\n * - Maintains a cache of the data visible for this location/query.\n * - Applies new operations (via applyOperation), updates the cache, and based on the event\n * registrations returns the set of events to be raised.\n * @constructor\n */\nexport class View {\n private processor_: ViewProcessor;\n private viewCache_: ViewCache;\n private eventRegistrations_: EventRegistration[] = [];\n private eventGenerator_: EventGenerator;\n\n /**\n *\n * @param {!Query} query_\n * @param {!ViewCache} initialViewCache\n */\n constructor(private query_: Query, initialViewCache: ViewCache) {\n const params = this.query_.getQueryParams();\n\n const indexFilter = new IndexedFilter(params.getIndex());\n const filter = params.getNodeFilter();\n\n /**\n * @type {ViewProcessor}\n * @private\n */\n this.processor_ = new ViewProcessor(filter);\n\n const initialServerCache = initialViewCache.getServerCache();\n const initialEventCache = initialViewCache.getEventCache();\n\n // Don't filter server node with other filter than index, wait for tagged listen\n const serverSnap = indexFilter.updateFullNode(\n ChildrenNode.EMPTY_NODE,\n initialServerCache.getNode(),\n null\n );\n const eventSnap = filter.updateFullNode(\n ChildrenNode.EMPTY_NODE,\n initialEventCache.getNode(),\n null\n );\n const newServerCache = new CacheNode(\n serverSnap,\n initialServerCache.isFullyInitialized(),\n indexFilter.filtersNodes()\n );\n const newEventCache = new CacheNode(\n eventSnap,\n initialEventCache.isFullyInitialized(),\n filter.filtersNodes()\n );\n\n /**\n * @type {!ViewCache}\n * @private\n */\n this.viewCache_ = new ViewCache(newEventCache, newServerCache);\n\n /**\n * @type {!EventGenerator}\n * @private\n */\n this.eventGenerator_ = new EventGenerator(this.query_);\n }\n\n /**\n * @return {!Query}\n */\n getQuery(): Query {\n return this.query_;\n }\n\n /**\n * @return {?Node}\n */\n getServerCache(): Node | null {\n return this.viewCache_.getServerCache().getNode();\n }\n\n /**\n * @param {!Path} path\n * @return {?Node}\n */\n getCompleteServerCache(path: Path): Node | null {\n const cache = this.viewCache_.getCompleteServerSnap();\n if (cache) {\n // If this isn't a \"loadsAllData\" view, then cache isn't actually a complete cache and\n // we need to see if it contains the child we're interested in.\n if (\n this.query_.getQueryParams().loadsAllData() ||\n (!path.isEmpty() && !cache.getImmediateChild(path.getFront()).isEmpty())\n ) {\n return cache.getChild(path);\n }\n }\n return null;\n }\n\n /**\n * @return {boolean}\n */\n isEmpty(): boolean {\n return this.eventRegistrations_.length === 0;\n }\n\n /**\n * @param {!EventRegistration} eventRegistration\n */\n addEventRegistration(eventRegistration: EventRegistration) {\n this.eventRegistrations_.push(eventRegistration);\n }\n\n /**\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n removeEventRegistration(\n eventRegistration: EventRegistration | null,\n cancelError?: Error\n ): Event[] {\n const cancelEvents: CancelEvent[] = [];\n if (cancelError) {\n assert(\n eventRegistration == null,\n 'A cancel should cancel all event registrations.'\n );\n const path = this.query_.path;\n this.eventRegistrations_.forEach(function(registration) {\n cancelError /** @type {!Error} */ = cancelError;\n const maybeEvent = registration.createCancelEvent(cancelError, path);\n if (maybeEvent) {\n cancelEvents.push(maybeEvent);\n }\n });\n }\n\n if (eventRegistration) {\n let remaining = [];\n for (let i = 0; i < this.eventRegistrations_.length; ++i) {\n const existing = this.eventRegistrations_[i];\n if (!existing.matches(eventRegistration)) {\n remaining.push(existing);\n } else if (eventRegistration.hasAnyCallback()) {\n // We're removing just this one\n remaining = remaining.concat(this.eventRegistrations_.slice(i + 1));\n break;\n }\n }\n this.eventRegistrations_ = remaining;\n } else {\n this.eventRegistrations_ = [];\n }\n return cancelEvents;\n }\n\n /**\n * Applies the given Operation, updates our cache, and returns the appropriate events.\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @return {!Array.}\n */\n applyOperation(\n operation: Operation,\n writesCache: WriteTreeRef,\n completeServerCache: Node | null\n ): Event[] {\n if (\n operation.type === OperationType.MERGE &&\n operation.source.queryId !== null\n ) {\n assert(\n this.viewCache_.getCompleteServerSnap(),\n 'We should always have a full cache before handling merges'\n );\n assert(\n this.viewCache_.getCompleteEventSnap(),\n 'Missing event cache, even though we have a server cache'\n );\n }\n\n const oldViewCache = this.viewCache_;\n const result = this.processor_.applyOperation(\n oldViewCache,\n operation,\n writesCache,\n completeServerCache\n );\n this.processor_.assertIndexed(result.viewCache);\n\n assert(\n result.viewCache.getServerCache().isFullyInitialized() ||\n !oldViewCache.getServerCache().isFullyInitialized(),\n 'Once a server snap is complete, it should never go back'\n );\n\n this.viewCache_ = result.viewCache;\n\n return this.generateEventsForChanges_(\n result.changes,\n result.viewCache.getEventCache().getNode(),\n null\n );\n }\n\n /**\n * @param {!EventRegistration} registration\n * @return {!Array.}\n */\n getInitialEvents(registration: EventRegistration): Event[] {\n const eventSnap = this.viewCache_.getEventCache();\n const initialChanges: Change[] = [];\n if (!eventSnap.getNode().isLeafNode()) {\n const eventNode = eventSnap.getNode() as ChildrenNode;\n eventNode.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n initialChanges.push(Change.childAddedChange(key, childNode));\n });\n }\n if (eventSnap.isFullyInitialized()) {\n initialChanges.push(Change.valueChange(eventSnap.getNode()));\n }\n return this.generateEventsForChanges_(\n initialChanges,\n eventSnap.getNode(),\n registration\n );\n }\n\n /**\n * @private\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {EventRegistration=} eventRegistration\n * @return {!Array.}\n */\n generateEventsForChanges_(\n changes: Change[],\n eventCache: Node,\n eventRegistration?: EventRegistration\n ): Event[] {\n const registrations = eventRegistration\n ? [eventRegistration]\n : this.eventRegistrations_;\n return this.eventGenerator_.generateEventsForChanges(\n changes,\n eventCache,\n registrations\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/View.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ImmutableTree } from './util/ImmutableTree';\nimport { Path } from './util/Path';\nimport { forEach } from '../../utils/obj';\nimport { Node, NamedNode } from './snap/Node';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { assert } from '../../utils/assert';\nimport { ChildrenNode } from './snap/ChildrenNode';\n\n/**\n * This class holds a collection of writes that can be applied to nodes in unison. It abstracts away the logic with\n * dealing with priority writes and multiple nested writes. At any given path there is only allowed to be one write\n * modifying that path. Any write to an existing path or shadowing an existing path will modify that existing write\n * to reflect the write added.\n *\n * @constructor\n * @param {!ImmutableTree.} writeTree\n */\nexport class CompoundWrite {\n constructor(private writeTree_: ImmutableTree) {}\n /**\n * @type {!CompoundWrite}\n */\n static Empty = new CompoundWrite(new ImmutableTree(null));\n\n /**\n * @param {!Path} path\n * @param {!Node} node\n * @return {!CompoundWrite}\n */\n addWrite(path: Path, node: Node): CompoundWrite {\n if (path.isEmpty()) {\n return new CompoundWrite(new ImmutableTree(node));\n } else {\n const rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n const rootMostPath = rootmost.path;\n let value = rootmost.value;\n const relativePath = Path.relativePath(rootMostPath, path);\n value = value.updateChild(relativePath, node);\n return new CompoundWrite(this.writeTree_.set(rootMostPath, value));\n } else {\n const subtree = new ImmutableTree(node);\n const newWriteTree = this.writeTree_.setTree(path, subtree);\n return new CompoundWrite(newWriteTree);\n }\n }\n }\n\n /**\n * @param {!Path} path\n * @param {!Object.} updates\n * @return {!CompoundWrite}\n */\n addWrites(path: Path, updates: { [name: string]: Node }): CompoundWrite {\n let newWrite = this as CompoundWrite;\n forEach(updates, function(childKey: string, node: Node) {\n newWrite = newWrite.addWrite(path.child(childKey), node);\n });\n return newWrite;\n }\n\n /**\n * Will remove a write at the given path and deeper paths. This will not modify a write at a higher\n * location, which must be removed by calling this method with that path.\n *\n * @param {!Path} path The path at which a write and all deeper writes should be removed\n * @return {!CompoundWrite} The new CompoundWrite with the removed path\n */\n removeWrite(path: Path): CompoundWrite {\n if (path.isEmpty()) {\n return CompoundWrite.Empty;\n } else {\n const newWriteTree = this.writeTree_.setTree(path, ImmutableTree.Empty);\n return new CompoundWrite(newWriteTree);\n }\n }\n\n /**\n * Returns whether this CompoundWrite will fully overwrite a node at a given location and can therefore be\n * considered \"complete\".\n *\n * @param {!Path} path The path to check for\n * @return {boolean} Whether there is a complete write at that path\n */\n hasCompleteWrite(path: Path): boolean {\n return this.getCompleteNode(path) != null;\n }\n\n /**\n * Returns a node for a path if and only if the node is a \"complete\" overwrite at that path. This will not aggregate\n * writes from deeper paths, but will return child nodes from a more shallow path.\n *\n * @param {!Path} path The path to get a complete write\n * @return {?Node} The node if complete at that path, or null otherwise.\n */\n getCompleteNode(path: Path): Node | null {\n const rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n return this.writeTree_\n .get(rootmost.path)\n .getChild(Path.relativePath(rootmost.path, path));\n } else {\n return null;\n }\n }\n\n /**\n * Returns all children that are guaranteed to be a complete overwrite.\n *\n * @return {!Array.} A list of all complete children.\n */\n getCompleteChildren(): Array {\n const children: NamedNode[] = [];\n let node = this.writeTree_.value;\n if (node != null) {\n // If it's a leaf node, it has no children; so nothing to do.\n if (!node.isLeafNode()) {\n (node as ChildrenNode).forEachChild(PRIORITY_INDEX, function(\n childName,\n childNode\n ) {\n children.push(new NamedNode(childName, childNode));\n });\n }\n } else {\n this.writeTree_.children.inorderTraversal(function(childName, childTree) {\n if (childTree.value != null) {\n children.push(new NamedNode(childName, childTree.value));\n }\n });\n }\n return children;\n }\n\n /**\n * @param {!Path} path\n * @return {!CompoundWrite}\n */\n childCompoundWrite(path: Path): CompoundWrite {\n if (path.isEmpty()) {\n return this;\n } else {\n const shadowingNode = this.getCompleteNode(path);\n if (shadowingNode != null) {\n return new CompoundWrite(new ImmutableTree(shadowingNode));\n } else {\n return new CompoundWrite(this.writeTree_.subtree(path));\n }\n }\n }\n\n /**\n * Returns true if this CompoundWrite is empty and therefore does not modify any nodes.\n * @return {boolean} Whether this CompoundWrite is empty\n */\n isEmpty(): boolean {\n return this.writeTree_.isEmpty();\n }\n\n /**\n * Applies this CompoundWrite to a node. The node is returned with all writes from this CompoundWrite applied to the\n * node\n * @param {!Node} node The node to apply this CompoundWrite to\n * @return {!Node} The node with all writes applied\n */\n apply(node: Node): Node {\n return CompoundWrite.applySubtreeWrite_(Path.Empty, this.writeTree_, node);\n }\n\n /**\n * @param {!Path} relativePath\n * @param {!ImmutableTree.} writeTree\n * @param {!Node} node\n * @return {!Node}\n * @private\n */\n private static applySubtreeWrite_ = function(\n relativePath: Path,\n writeTree: ImmutableTree,\n node: Node\n ): Node {\n if (writeTree.value != null) {\n // Since there a write is always a leaf, we're done here\n return node.updateChild(relativePath, writeTree.value);\n } else {\n let priorityWrite = null;\n writeTree.children.inorderTraversal(function(childKey, childTree) {\n if (childKey === '.priority') {\n // Apply priorities at the end so we don't update priorities for either empty nodes or forget\n // to apply priorities to empty nodes that are later filled\n assert(\n childTree.value !== null,\n 'Priority writes must always be leaf nodes'\n );\n priorityWrite = childTree.value;\n } else {\n node = CompoundWrite.applySubtreeWrite_(\n relativePath.child(childKey),\n childTree,\n node\n );\n }\n });\n // If there was a priority write, we only apply it if the node is not empty\n if (!node.getChild(relativePath).isEmpty() && priorityWrite !== null) {\n node = node.updateChild(relativePath.child('.priority'), priorityWrite);\n }\n return node;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/CompoundWrite.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { findKey, forEach, safeGet } from '../../utils/obj';\nimport { assert, assertionError } from '../../utils/assert';\nimport { Path } from './util/Path';\nimport { CompoundWrite } from './CompoundWrite';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { NamedNode, Node } from './snap/Node';\nimport { CacheNode } from './view/CacheNode';\nimport { Index } from './snap/indexes/Index';\n\n/**\n * Defines a single user-initiated write operation. May be the result of a set(), transaction(), or update() call. In\n * the case of a set() or transaction, snap wil be non-null. In the case of an update(), children will be non-null.\n */\nexport interface WriteRecord {\n writeId: number;\n path: Path;\n snap?: Node | null;\n children?: { [k: string]: Node } | null;\n visible: boolean;\n}\n\n/**\n * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them\n * with underlying server data (to create \"event cache\" data). Pending writes are added with addOverwrite()\n * and addMerge(), and removed with removeWrite().\n *\n * @constructor\n */\nexport class WriteTree {\n /**\n * A tree tracking the result of applying all visible writes. This does not include transactions with\n * applyLocally=false or writes that are completely shadowed by other writes.\n *\n * @type {!CompoundWrite}\n * @private\n */\n private visibleWrites_: CompoundWrite = CompoundWrite.Empty;\n\n /**\n * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary\n * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also\n * used by transactions).\n *\n * @type {!Array.}\n * @private\n */\n private allWrites_: WriteRecord[] = [];\n\n private lastWriteId_ = -1;\n\n /**\n * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.\n *\n * @param {!Path} path\n * @return {!WriteTreeRef}\n */\n childWrites(path: Path): WriteTreeRef {\n return new WriteTreeRef(path, this);\n }\n\n /**\n * Record a new overwrite from user code.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} writeId\n * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches\n */\n addOverwrite(path: Path, snap: Node, writeId: number, visible?: boolean) {\n assert(\n writeId > this.lastWriteId_,\n 'Stacking an older write on top of newer ones'\n );\n if (visible === undefined) {\n visible = true;\n }\n this.allWrites_.push({\n path: path,\n snap: snap,\n writeId: writeId,\n visible: visible\n });\n\n if (visible) {\n this.visibleWrites_ = this.visibleWrites_.addWrite(path, snap);\n }\n this.lastWriteId_ = writeId;\n }\n\n /**\n * Record a new merge from user code.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n */\n addMerge(\n path: Path,\n changedChildren: { [k: string]: Node },\n writeId: number\n ) {\n assert(\n writeId > this.lastWriteId_,\n 'Stacking an older merge on top of newer ones'\n );\n this.allWrites_.push({\n path: path,\n children: changedChildren,\n writeId: writeId,\n visible: true\n });\n\n this.visibleWrites_ = this.visibleWrites_.addWrites(path, changedChildren);\n this.lastWriteId_ = writeId;\n }\n\n /**\n * @param {!number} writeId\n * @return {?WriteRecord}\n */\n getWrite(writeId: number): WriteRecord | null {\n for (let i = 0; i < this.allWrites_.length; i++) {\n const record = this.allWrites_[i];\n if (record.writeId === writeId) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates\n * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.\n *\n * @param {!number} writeId\n * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise\n * events as a result).\n */\n removeWrite(writeId: number): boolean {\n // Note: disabling this check. It could be a transaction that preempted another transaction, and thus was applied\n // out of order.\n //const validClear = revert || this.allWrites_.length === 0 || writeId <= this.allWrites_[0].writeId;\n //assert(validClear, \"Either we don't have this write, or it's the first one in the queue\");\n\n const idx = this.allWrites_.findIndex(function(s) {\n return s.writeId === writeId;\n });\n assert(idx >= 0, 'removeWrite called with nonexistent writeId.');\n const writeToRemove = this.allWrites_[idx];\n this.allWrites_.splice(idx, 1);\n\n let removedWriteWasVisible = writeToRemove.visible;\n let removedWriteOverlapsWithOtherWrites = false;\n\n let i = this.allWrites_.length - 1;\n\n while (removedWriteWasVisible && i >= 0) {\n const currentWrite = this.allWrites_[i];\n if (currentWrite.visible) {\n if (\n i >= idx &&\n this.recordContainsPath_(currentWrite, writeToRemove.path)\n ) {\n // The removed write was completely shadowed by a subsequent write.\n removedWriteWasVisible = false;\n } else if (writeToRemove.path.contains(currentWrite.path)) {\n // Either we're covering some writes or they're covering part of us (depending on which came first).\n removedWriteOverlapsWithOtherWrites = true;\n }\n }\n i--;\n }\n\n if (!removedWriteWasVisible) {\n return false;\n } else if (removedWriteOverlapsWithOtherWrites) {\n // There's some shadowing going on. Just rebuild the visible writes from scratch.\n this.resetTree_();\n return true;\n } else {\n // There's no shadowing. We can safely just remove the write(s) from visibleWrites.\n if (writeToRemove.snap) {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(\n writeToRemove.path\n );\n } else {\n const children = writeToRemove.children;\n forEach(children, (childName: string) => {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(\n writeToRemove.path.child(childName)\n );\n });\n }\n return true;\n }\n }\n\n /**\n * Return a complete snapshot for the given path if there's visible write data at that path, else null.\n * No server data is considered.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n getCompleteWriteData(path: Path): Node | null {\n return this.visibleWrites_.getCompleteNode(path);\n }\n\n /**\n * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden\n * writes), attempt to calculate a complete snapshot for the given path\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude An optional set to be excluded\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n calcCompleteEventCache(\n treePath: Path,\n completeServerCache: Node | null,\n writeIdsToExclude?: number[],\n includeHiddenWrites?: boolean\n ): Node | null {\n if (!writeIdsToExclude && !includeHiddenWrites) {\n const shadowingNode = this.visibleWrites_.getCompleteNode(treePath);\n if (shadowingNode != null) {\n return shadowingNode;\n } else {\n const subMerge = this.visibleWrites_.childCompoundWrite(treePath);\n if (subMerge.isEmpty()) {\n return completeServerCache;\n } else if (\n completeServerCache == null &&\n !subMerge.hasCompleteWrite(Path.Empty)\n ) {\n // We wouldn't have a complete snapshot, since there's no underlying data and no complete shadow\n return null;\n } else {\n const layeredCache = completeServerCache || ChildrenNode.EMPTY_NODE;\n return subMerge.apply(layeredCache);\n }\n }\n } else {\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n if (!includeHiddenWrites && merge.isEmpty()) {\n return completeServerCache;\n } else {\n // If the server cache is null, and we don't have a complete cache, we need to return null\n if (\n !includeHiddenWrites &&\n completeServerCache == null &&\n !merge.hasCompleteWrite(Path.Empty)\n ) {\n return null;\n } else {\n const filter = function(write: WriteRecord) {\n return (\n (write.visible || includeHiddenWrites) &&\n (!writeIdsToExclude ||\n !~writeIdsToExclude.indexOf(write.writeId)) &&\n (write.path.contains(treePath) || treePath.contains(write.path))\n );\n };\n const mergeAtPath = WriteTree.layerTree_(\n this.allWrites_,\n filter,\n treePath\n );\n const layeredCache = completeServerCache || ChildrenNode.EMPTY_NODE;\n return mergeAtPath.apply(layeredCache);\n }\n }\n }\n }\n\n /**\n * With optional, underlying server data, attempt to return a children node of children that we have complete data for.\n * Used when creating new views, to pre-fill their complete event children snapshot.\n *\n * @param {!Path} treePath\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n calcCompleteEventChildren(\n treePath: Path,\n completeServerChildren: ChildrenNode | null\n ) {\n let completeChildren = ChildrenNode.EMPTY_NODE as Node;\n const topLevelSet = this.visibleWrites_.getCompleteNode(treePath);\n if (topLevelSet) {\n if (!topLevelSet.isLeafNode()) {\n // we're shadowing everything. Return the children.\n topLevelSet.forEachChild(PRIORITY_INDEX, function(\n childName,\n childSnap\n ) {\n completeChildren = completeChildren.updateImmediateChild(\n childName,\n childSnap\n );\n });\n }\n return completeChildren;\n } else if (completeServerChildren) {\n // Layer any children we have on top of this\n // We know we don't have a top-level set, so just enumerate existing children\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n completeServerChildren.forEachChild(PRIORITY_INDEX, function(\n childName,\n childNode\n ) {\n const node = merge\n .childCompoundWrite(new Path(childName))\n .apply(childNode);\n completeChildren = completeChildren.updateImmediateChild(\n childName,\n node\n );\n });\n // Add any complete children we have from the set\n merge.getCompleteChildren().forEach(function(namedNode) {\n completeChildren = completeChildren.updateImmediateChild(\n namedNode.name,\n namedNode.node\n );\n });\n return completeChildren;\n } else {\n // We don't have anything to layer on top of. Layer on any children we have\n // Note that we can return an empty snap if we have a defined delete\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n merge.getCompleteChildren().forEach(function(namedNode) {\n completeChildren = completeChildren.updateImmediateChild(\n namedNode.name,\n namedNode.node\n );\n });\n return completeChildren;\n }\n }\n\n /**\n * Given that the underlying server data has updated, determine what, if anything, needs to be\n * applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events\n *\n * Either existingEventSnap or existingServerSnap must exist\n *\n * @param {!Path} treePath\n * @param {!Path} childPath\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n calcEventCacheAfterServerOverwrite(\n treePath: Path,\n childPath: Path,\n existingEventSnap: Node | null,\n existingServerSnap: Node | null\n ): Node | null {\n assert(\n existingEventSnap || existingServerSnap,\n 'Either existingEventSnap or existingServerSnap must exist'\n );\n const path = treePath.child(childPath);\n if (this.visibleWrites_.hasCompleteWrite(path)) {\n // At this point we can probably guarantee that we're in case 2, meaning no events\n // May need to check visibility while doing the findRootMostValueAndPath call\n return null;\n } else {\n // No complete shadowing. We're either partially shadowing or not shadowing at all.\n const childMerge = this.visibleWrites_.childCompoundWrite(path);\n if (childMerge.isEmpty()) {\n // We're not shadowing at all. Case 1\n return existingServerSnap.getChild(childPath);\n } else {\n // This could be more efficient if the serverNode + updates doesn't change the eventSnap\n // However this is tricky to find out, since user updates don't necessary change the server\n // snap, e.g. priority updates on empty nodes, or deep deletes. Another special case is if the server\n // adds nodes, but doesn't change any existing writes. It is therefore not enough to\n // only check if the updates change the serverNode.\n // Maybe check if the merge tree contains these special cases and only do a full overwrite in that case?\n return childMerge.apply(existingServerSnap.getChild(childPath));\n }\n }\n }\n\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!Path} treePath\n * @param {!string} childKey\n * @param {!CacheNode} existingServerSnap\n * @return {?Node}\n */\n calcCompleteChild(\n treePath: Path,\n childKey: string,\n existingServerSnap: CacheNode\n ): Node | null {\n const path = treePath.child(childKey);\n const shadowingNode = this.visibleWrites_.getCompleteNode(path);\n if (shadowingNode != null) {\n return shadowingNode;\n } else {\n if (existingServerSnap.isCompleteForChild(childKey)) {\n const childMerge = this.visibleWrites_.childCompoundWrite(path);\n return childMerge.apply(\n existingServerSnap.getNode().getImmediateChild(childKey)\n );\n } else {\n return null;\n }\n }\n }\n\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n shadowingWrite(path: Path): Node | null {\n return this.visibleWrites_.getCompleteNode(path);\n }\n\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window.\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n calcIndexedSlice(\n treePath: Path,\n completeServerData: Node | null,\n startPost: NamedNode,\n count: number,\n reverse: boolean,\n index: Index\n ): NamedNode[] {\n let toIterate: Node;\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n const shadowingNode = merge.getCompleteNode(Path.Empty);\n if (shadowingNode != null) {\n toIterate = shadowingNode;\n } else if (completeServerData != null) {\n toIterate = merge.apply(completeServerData);\n } else {\n // no children to iterate on\n return [];\n }\n toIterate = toIterate.withIndex(index);\n if (!toIterate.isEmpty() && !toIterate.isLeafNode()) {\n const nodes = [];\n const cmp = index.getCompare();\n const iter = reverse\n ? (toIterate as ChildrenNode).getReverseIteratorFrom(startPost, index)\n : (toIterate as ChildrenNode).getIteratorFrom(startPost, index);\n let next = iter.getNext();\n while (next && nodes.length < count) {\n if (cmp(next, startPost) !== 0) {\n nodes.push(next);\n }\n next = iter.getNext();\n }\n return nodes;\n } else {\n return [];\n }\n }\n\n /**\n * @param {!WriteRecord} writeRecord\n * @param {!Path} path\n * @return {boolean}\n * @private\n */\n private recordContainsPath_(writeRecord: WriteRecord, path: Path): boolean {\n if (writeRecord.snap) {\n return writeRecord.path.contains(path);\n } else {\n // findKey can return undefined, so use !! to coerce to boolean\n return !!findKey(writeRecord.children, function(\n childSnap: Node,\n childName: string\n ) {\n return writeRecord.path.child(childName).contains(path);\n });\n }\n }\n\n /**\n * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots\n * @private\n */\n private resetTree_() {\n this.visibleWrites_ = WriteTree.layerTree_(\n this.allWrites_,\n WriteTree.DefaultFilter_,\n Path.Empty\n );\n if (this.allWrites_.length > 0) {\n this.lastWriteId_ = this.allWrites_[this.allWrites_.length - 1].writeId;\n } else {\n this.lastWriteId_ = -1;\n }\n }\n\n /**\n * The default filter used when constructing the tree. Keep everything that's visible.\n *\n * @param {!WriteRecord} write\n * @return {boolean}\n * @private\n */\n private static DefaultFilter_(write: WriteRecord) {\n return write.visible;\n }\n\n /**\n * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of\n * event data at that path.\n *\n * @param {!Array.} writes\n * @param {!function(!WriteRecord):boolean} filter\n * @param {!Path} treeRoot\n * @return {!CompoundWrite}\n * @private\n */\n private static layerTree_(\n writes: WriteRecord[],\n filter: (w: WriteRecord) => boolean,\n treeRoot: Path\n ): CompoundWrite {\n let compoundWrite = CompoundWrite.Empty;\n for (let i = 0; i < writes.length; ++i) {\n const write = writes[i];\n // Theory, a later set will either:\n // a) abort a relevant transaction, so no need to worry about excluding it from calculating that transaction\n // b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction\n if (filter(write)) {\n const writePath = write.path;\n let relativePath;\n if (write.snap) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrite(relativePath, write.snap);\n } else if (writePath.contains(treeRoot)) {\n relativePath = Path.relativePath(writePath, treeRoot);\n compoundWrite = compoundWrite.addWrite(\n Path.Empty,\n write.snap.getChild(relativePath)\n );\n } else {\n // There is no overlap between root path and write path, ignore write\n }\n } else if (write.children) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrites(\n relativePath,\n write.children\n );\n } else if (writePath.contains(treeRoot)) {\n relativePath = Path.relativePath(writePath, treeRoot);\n if (relativePath.isEmpty()) {\n compoundWrite = compoundWrite.addWrites(\n Path.Empty,\n write.children\n );\n } else {\n const child = safeGet(write.children, relativePath.getFront());\n if (child) {\n // There exists a child in this node that matches the root path\n const deepNode = child.getChild(relativePath.popFront());\n compoundWrite = compoundWrite.addWrite(Path.Empty, deepNode);\n }\n }\n } else {\n // There is no overlap between root path and write path, ignore write\n }\n } else {\n throw assertionError('WriteRecord should have .snap or .children');\n }\n }\n }\n return compoundWrite;\n }\n}\n\n/**\n * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods\n * just proxy to the underlying WriteTree.\n *\n * @constructor\n */\nexport class WriteTreeRef {\n /**\n * The path to this particular write tree ref. Used for calling methods on writeTree_ while exposing a simpler\n * interface to callers.\n *\n * @type {!Path}\n * @private\n * @const\n */\n private readonly treePath_: Path;\n\n /**\n * * A reference to the actual tree of write data. All methods are pass-through to the tree, but with the appropriate\n * path prefixed.\n *\n * This lets us make cheap references to points in the tree for sync points without having to copy and maintain all of\n * the data.\n *\n * @type {!WriteTree}\n * @private\n * @const\n */\n private readonly writeTree_: WriteTree;\n\n /**\n * @param {!Path} path\n * @param {!WriteTree} writeTree\n */\n constructor(path: Path, writeTree: WriteTree) {\n this.treePath_ = path;\n this.writeTree_ = writeTree;\n }\n\n /**\n * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used\n * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node\n * can lead to a more expensive calculation.\n *\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude Optional writes to exclude.\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n calcCompleteEventCache(\n completeServerCache: Node | null,\n writeIdsToExclude?: number[],\n includeHiddenWrites?: boolean\n ): Node | null {\n return this.writeTree_.calcCompleteEventCache(\n this.treePath_,\n completeServerCache,\n writeIdsToExclude,\n includeHiddenWrites\n );\n }\n\n /**\n * If possible, returns a children node containing all of the complete children we have data for. The returned data is a\n * mix of the given server data and write data.\n *\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n calcCompleteEventChildren(completeServerChildren: ChildrenNode | null): ChildrenNode {\n return this.writeTree_.calcCompleteEventChildren(\n this.treePath_,\n completeServerChildren\n ) as ChildrenNode;\n }\n\n /**\n * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,\n * if anything, needs to be applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events should be raised\n *\n * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert\n *\n * @param {!Path} path\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n calcEventCacheAfterServerOverwrite(\n path: Path,\n existingEventSnap: Node | null,\n existingServerSnap: Node | null\n ): Node | null {\n return this.writeTree_.calcEventCacheAfterServerOverwrite(\n this.treePath_,\n path,\n existingEventSnap,\n existingServerSnap\n );\n }\n\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n shadowingWrite(path: Path): Node | null {\n return this.writeTree_.shadowingWrite(this.treePath_.child(path));\n }\n\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window\n *\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n calcIndexedSlice(\n completeServerData: Node | null,\n startPost: NamedNode,\n count: number,\n reverse: boolean,\n index: Index\n ): NamedNode[] {\n return this.writeTree_.calcIndexedSlice(\n this.treePath_,\n completeServerData,\n startPost,\n count,\n reverse,\n index\n );\n }\n\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!string} childKey\n * @param {!CacheNode} existingServerCache\n * @return {?Node}\n */\n calcCompleteChild(\n childKey: string,\n existingServerCache: CacheNode\n ): Node | null {\n return this.writeTree_.calcCompleteChild(\n this.treePath_,\n childKey,\n existingServerCache\n );\n }\n\n /**\n * Return a WriteTreeRef for a child.\n *\n * @param {string} childName\n * @return {!WriteTreeRef}\n */\n child(childName: string): WriteTreeRef {\n return new WriteTreeRef(this.treePath_.child(childName), this.writeTree_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/WriteTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { errorForServerCode } from './util/util';\nimport { AckUserWrite } from './operation/AckUserWrite';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { forEach, safeGet } from '../../utils/obj';\nimport { ImmutableTree } from './util/ImmutableTree';\nimport { ListenComplete } from './operation/ListenComplete';\nimport { Merge } from './operation/Merge';\nimport { Operation, OperationSource } from './operation/Operation';\nimport { Overwrite } from './operation/Overwrite';\nimport { Path } from './util/Path';\nimport { SyncPoint } from './SyncPoint';\nimport { WriteTree, WriteTreeRef } from './WriteTree';\nimport { Query } from '../api/Query';\nimport { Node } from './snap/Node';\nimport { Event } from './view/Event';\nimport { EventRegistration } from './view/EventRegistration';\nimport { View } from './view/View';\n\n/**\n * @typedef {{\n * startListening: function(\n * !Query,\n * ?number,\n * function():string,\n * function(!string, *):!Array.\n * ):!Array.,\n *\n * stopListening: function(!Query, ?number)\n * }}\n */\nexport interface ListenProvider {\n startListening(\n query: Query,\n tag: number | null,\n hashFn: () => string,\n onComplete: (a: string, b?: any) => Event[]\n ): Event[];\n\n stopListening(a: Query, b: number | null): void;\n}\n\n/**\n * SyncTree is the central class for managing event callback registration, data caching, views\n * (query processing), and event generation. There are typically two SyncTree instances for\n * each Repo, one for the normal Firebase data, and one for the .info data.\n *\n * It has a number of responsibilities, including:\n * - Tracking all user event callbacks (registered via addEventRegistration() and removeEventRegistration()).\n * - Applying and caching data changes for user set(), transaction(), and update() calls\n * (applyUserOverwrite(), applyUserMerge()).\n * - Applying and caching data changes for server data changes (applyServerOverwrite(),\n * applyServerMerge()).\n * - Generating user-facing events for server and user changes (all of the apply* methods\n * return the set of events that need to be raised as a result).\n * - Maintaining the appropriate set of server listens to ensure we are always subscribed\n * to the correct set of paths and queries to satisfy the current set of user event\n * callbacks (listens are started/stopped using the provided listenProvider).\n *\n * NOTE: Although SyncTree tracks event callbacks and calculates events to raise, the actual\n * events are returned to the caller rather than raised synchronously.\n *\n * @constructor\n */\nexport class SyncTree {\n /**\n * Tree of SyncPoints. There's a SyncPoint at any location that has 1 or more views.\n * @type {!ImmutableTree.}\n * @private\n */\n private syncPointTree_: ImmutableTree = ImmutableTree.Empty;\n\n /**\n * A tree of all pending user writes (user-initiated set()'s, transaction()'s, update()'s, etc.).\n * @type {!WriteTree}\n * @private\n */\n private pendingWriteTree_ = new WriteTree();\n\n private tagToQueryMap_: { [k: string]: string } = {};\n private queryToTagMap_: { [k: string]: number } = {};\n\n /**\n * @param {!ListenProvider} listenProvider_ Used by SyncTree to start / stop listening\n * to server data.\n */\n constructor(private listenProvider_: ListenProvider) {}\n\n /**\n * Apply the data changes for a user-generated set() or transaction() call.\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @param {number} writeId\n * @param {boolean=} visible\n * @return {!Array.} Events to raise.\n */\n applyUserOverwrite(\n path: Path,\n newData: Node,\n writeId: number,\n visible?: boolean\n ): Event[] {\n // Record pending write.\n this.pendingWriteTree_.addOverwrite(path, newData, writeId, visible);\n\n if (!visible) {\n return [];\n } else {\n return this.applyOperationToSyncPoints_(\n new Overwrite(OperationSource.User, path, newData)\n );\n }\n }\n\n /**\n * Apply the data from a user-generated update() call\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n * @return {!Array.} Events to raise.\n */\n applyUserMerge(\n path: Path,\n changedChildren: { [k: string]: Node },\n writeId: number\n ): Event[] {\n // Record pending merge.\n this.pendingWriteTree_.addMerge(path, changedChildren, writeId);\n\n const changeTree = ImmutableTree.fromObject(changedChildren);\n\n return this.applyOperationToSyncPoints_(\n new Merge(OperationSource.User, path, changeTree)\n );\n }\n\n /**\n * Acknowledge a pending user write that was previously registered with applyUserOverwrite() or applyUserMerge().\n *\n * @param {!number} writeId\n * @param {boolean=} revert True if the given write failed and needs to be reverted\n * @return {!Array.} Events to raise.\n */\n ackUserWrite(writeId: number, revert: boolean = false) {\n const write = this.pendingWriteTree_.getWrite(writeId);\n const needToReevaluate = this.pendingWriteTree_.removeWrite(writeId);\n if (!needToReevaluate) {\n return [];\n } else {\n let affectedTree = ImmutableTree.Empty;\n if (write.snap != null) {\n // overwrite\n affectedTree = affectedTree.set(Path.Empty, true);\n } else {\n forEach(write.children, function(pathString: string, node: Node) {\n affectedTree = affectedTree.set(new Path(pathString), node);\n });\n }\n return this.applyOperationToSyncPoints_(\n new AckUserWrite(write.path, affectedTree, revert)\n );\n }\n }\n\n /**\n * Apply new server data for the specified path..\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @return {!Array.} Events to raise.\n */\n applyServerOverwrite(path: Path, newData: Node): Event[] {\n return this.applyOperationToSyncPoints_(\n new Overwrite(OperationSource.Server, path, newData)\n );\n }\n\n /**\n * Apply new server data to be merged in at the specified path.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @return {!Array.} Events to raise.\n */\n applyServerMerge(\n path: Path,\n changedChildren: { [k: string]: Node }\n ): Event[] {\n const changeTree = ImmutableTree.fromObject(changedChildren);\n\n return this.applyOperationToSyncPoints_(\n new Merge(OperationSource.Server, path, changeTree)\n );\n }\n\n /**\n * Apply a listen complete for a query\n *\n * @param {!Path} path\n * @return {!Array.} Events to raise.\n */\n applyListenComplete(path: Path): Event[] {\n return this.applyOperationToSyncPoints_(\n new ListenComplete(OperationSource.Server, path)\n );\n }\n\n /**\n * Apply new server data for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n applyTaggedQueryOverwrite(path: Path, snap: Node, tag: number): Event[] {\n const queryKey = this.queryKeyForTag_(tag);\n if (queryKey != null) {\n const r = SyncTree.parseQueryKey_(queryKey);\n const queryPath = r.path,\n queryId = r.queryId;\n const relativePath = Path.relativePath(queryPath, path);\n const op = new Overwrite(\n OperationSource.forServerTaggedQuery(queryId),\n relativePath,\n snap\n );\n return this.applyTaggedOperation_(queryPath, op);\n } else {\n // Query must have been removed already\n return [];\n }\n }\n\n /**\n * Apply server data to be merged in for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n applyTaggedQueryMerge(\n path: Path,\n changedChildren: { [k: string]: Node },\n tag: number\n ): Event[] {\n const queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n const r = SyncTree.parseQueryKey_(queryKey);\n const queryPath = r.path,\n queryId = r.queryId;\n const relativePath = Path.relativePath(queryPath, path);\n const changeTree = ImmutableTree.fromObject(changedChildren);\n const op = new Merge(\n OperationSource.forServerTaggedQuery(queryId),\n relativePath,\n changeTree\n );\n return this.applyTaggedOperation_(queryPath, op);\n } else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n }\n\n /**\n * Apply a listen complete for a tagged query\n *\n * @param {!Path} path\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n applyTaggedListenComplete(path: Path, tag: number): Event[] {\n const queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n const r = SyncTree.parseQueryKey_(queryKey);\n const queryPath = r.path,\n queryId = r.queryId;\n const relativePath = Path.relativePath(queryPath, path);\n const op = new ListenComplete(\n OperationSource.forServerTaggedQuery(queryId),\n relativePath\n );\n return this.applyTaggedOperation_(queryPath, op);\n } else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n }\n\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @return {!Array.} Events to raise.\n */\n addEventRegistration(\n query: Query,\n eventRegistration: EventRegistration\n ): Event[] {\n const path = query.path;\n\n let serverCache: Node | null = null;\n let foundAncestorDefaultView = false;\n // Any covering writes will necessarily be at the root, so really all we need to find is the server cache.\n // Consider optimizing this once there's a better understanding of what actual behavior will be.\n this.syncPointTree_.foreachOnPath(path, function(pathToSyncPoint, sp) {\n const relativePath = Path.relativePath(pathToSyncPoint, path);\n serverCache = serverCache || sp.getCompleteServerCache(relativePath);\n foundAncestorDefaultView =\n foundAncestorDefaultView || sp.hasCompleteView();\n });\n let syncPoint = this.syncPointTree_.get(path);\n if (!syncPoint) {\n syncPoint = new SyncPoint();\n this.syncPointTree_ = this.syncPointTree_.set(path, syncPoint);\n } else {\n foundAncestorDefaultView =\n foundAncestorDefaultView || syncPoint.hasCompleteView();\n serverCache = serverCache || syncPoint.getCompleteServerCache(Path.Empty);\n }\n\n let serverCacheComplete;\n if (serverCache != null) {\n serverCacheComplete = true;\n } else {\n serverCacheComplete = false;\n serverCache = ChildrenNode.EMPTY_NODE;\n const subtree = this.syncPointTree_.subtree(path);\n subtree.foreachChild(function(childName, childSyncPoint) {\n const completeCache = childSyncPoint.getCompleteServerCache(Path.Empty);\n if (completeCache) {\n serverCache = serverCache.updateImmediateChild(\n childName,\n completeCache\n );\n }\n });\n }\n\n const viewAlreadyExists = syncPoint.viewExistsForQuery(query);\n if (!viewAlreadyExists && !query.getQueryParams().loadsAllData()) {\n // We need to track a tag for this query\n const queryKey = SyncTree.makeQueryKey_(query);\n assert(\n !(queryKey in this.queryToTagMap_),\n 'View does not exist, but we have a tag'\n );\n const tag = SyncTree.getNextQueryTag_();\n this.queryToTagMap_[queryKey] = tag;\n // Coerce to string to avoid sparse arrays.\n this.tagToQueryMap_['_' + tag] = queryKey;\n }\n const writesCache = this.pendingWriteTree_.childWrites(path);\n let events = syncPoint.addEventRegistration(\n query,\n eventRegistration,\n writesCache,\n serverCache,\n serverCacheComplete\n );\n if (!viewAlreadyExists && !foundAncestorDefaultView) {\n const view /** @type !View */ = syncPoint.viewForQuery(query);\n events = events.concat(this.setupListener_(query, view));\n }\n return events;\n }\n\n /**\n * Remove event callback(s).\n *\n * If query is the default query, we'll check all queries for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified query/queries.\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, all callbacks are removed.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n removeEventRegistration(\n query: Query,\n eventRegistration: EventRegistration | null,\n cancelError?: Error\n ): Event[] {\n // Find the syncPoint first. Then deal with whether or not it has matching listeners\n const path = query.path;\n const maybeSyncPoint = this.syncPointTree_.get(path);\n let cancelEvents: Event[] = [];\n // A removal on a default query affects all queries at that location. A removal on an indexed query, even one without\n // other query constraints, does *not* affect all queries at that location. So this check must be for 'default', and\n // not loadsAllData().\n if (\n maybeSyncPoint &&\n (query.queryIdentifier() === 'default' ||\n maybeSyncPoint.viewExistsForQuery(query))\n ) {\n /**\n * @type {{removed: !Array., events: !Array.}}\n */\n const removedAndEvents = maybeSyncPoint.removeEventRegistration(\n query,\n eventRegistration,\n cancelError\n );\n if (maybeSyncPoint.isEmpty()) {\n this.syncPointTree_ = this.syncPointTree_.remove(path);\n }\n const removed = removedAndEvents.removed;\n cancelEvents = removedAndEvents.events;\n // We may have just removed one of many listeners and can short-circuit this whole process\n // We may also not have removed a default listener, in which case all of the descendant listeners should already be\n // properly set up.\n //\n // Since indexed queries can shadow if they don't have other query constraints, check for loadsAllData(), instead of\n // queryId === 'default'\n const removingDefault =\n -1 !==\n removed.findIndex(function(query) {\n return query.getQueryParams().loadsAllData();\n });\n const covered = this.syncPointTree_.findOnPath(path, function(\n relativePath,\n parentSyncPoint\n ) {\n return parentSyncPoint.hasCompleteView();\n });\n\n if (removingDefault && !covered) {\n const subtree = this.syncPointTree_.subtree(path);\n // There are potentially child listeners. Determine what if any listens we need to send before executing the\n // removal\n if (!subtree.isEmpty()) {\n // We need to fold over our subtree and collect the listeners to send\n const newViews = this.collectDistinctViewsForSubTree_(subtree);\n\n // Ok, we've collected all the listens we need. Set them up.\n for (let i = 0; i < newViews.length; ++i) {\n const view = newViews[i],\n newQuery = view.getQuery();\n const listener = this.createListenerForView_(view);\n this.listenProvider_.startListening(\n SyncTree.queryForListening_(newQuery),\n this.tagForQuery_(newQuery),\n listener.hashFn,\n listener.onComplete\n );\n }\n } else {\n // There's nothing below us, so nothing we need to start listening on\n }\n }\n // If we removed anything and we're not covered by a higher up listen, we need to stop listening on this query\n // The above block has us covered in terms of making sure we're set up on listens lower in the tree.\n // Also, note that if we have a cancelError, it's already been removed at the provider level.\n if (!covered && removed.length > 0 && !cancelError) {\n // If we removed a default, then we weren't listening on any of the other queries here. Just cancel the one\n // default. Otherwise, we need to iterate through and cancel each individual query\n if (removingDefault) {\n // We don't tag default listeners\n const defaultTag: number | null = null;\n this.listenProvider_.stopListening(\n SyncTree.queryForListening_(query),\n defaultTag\n );\n } else {\n removed.forEach((queryToRemove: Query) => {\n const tagToRemove = this.queryToTagMap_[\n SyncTree.makeQueryKey_(queryToRemove)\n ];\n this.listenProvider_.stopListening(\n SyncTree.queryForListening_(queryToRemove),\n tagToRemove\n );\n });\n }\n }\n // Now, clear all of the tags we're tracking for the removed listens\n this.removeTags_(removed);\n } else {\n // No-op, this listener must've been already removed\n }\n return cancelEvents;\n }\n\n /**\n * Returns a complete cache, if we have one, of the data at a particular path. The location must have a listener above\n * it, but as this is only used by transaction code, that should always be the case anyways.\n *\n * Note: this method will *include* hidden writes from transaction with applyLocally set to false.\n * @param {!Path} path The path to the data we want\n * @param {Array.=} writeIdsToExclude A specific set to be excluded\n * @return {?Node}\n */\n calcCompleteEventCache(\n path: Path,\n writeIdsToExclude?: number[]\n ): Node | null {\n const includeHiddenSets = true;\n const writeTree = this.pendingWriteTree_;\n const serverCache = this.syncPointTree_.findOnPath(path, function(\n pathSoFar,\n syncPoint\n ) {\n const relativePath = Path.relativePath(pathSoFar, path);\n const serverCache = syncPoint.getCompleteServerCache(relativePath);\n if (serverCache) {\n return serverCache;\n }\n });\n return writeTree.calcCompleteEventCache(\n path,\n serverCache,\n writeIdsToExclude,\n includeHiddenSets\n );\n }\n\n /**\n * This collapses multiple unfiltered views into a single view, since we only need a single\n * listener for them.\n *\n * @param {!ImmutableTree.} subtree\n * @return {!Array.}\n * @private\n */\n private collectDistinctViewsForSubTree_(\n subtree: ImmutableTree\n ): View[] {\n return subtree.fold<\n View[]\n >((relativePath, maybeChildSyncPoint, childMap) => {\n if (maybeChildSyncPoint && maybeChildSyncPoint.hasCompleteView()) {\n const completeView = maybeChildSyncPoint.getCompleteView();\n return [completeView];\n } else {\n // No complete view here, flatten any deeper listens into an array\n let views: View[] = [];\n if (maybeChildSyncPoint) {\n views = maybeChildSyncPoint.getQueryViews();\n }\n forEach(childMap, function(key: string, childViews: View[]) {\n views = views.concat(childViews);\n });\n return views;\n }\n });\n }\n\n /**\n * @param {!Array.} queries\n * @private\n */\n private removeTags_(queries: Query[]) {\n for (let j = 0; j < queries.length; ++j) {\n const removedQuery = queries[j];\n if (!removedQuery.getQueryParams().loadsAllData()) {\n // We should have a tag for this\n const removedQueryKey = SyncTree.makeQueryKey_(removedQuery);\n const removedQueryTag = this.queryToTagMap_[removedQueryKey];\n delete this.queryToTagMap_[removedQueryKey];\n delete this.tagToQueryMap_['_' + removedQueryTag];\n }\n }\n }\n\n /**\n * Normalizes a query to a query we send the server for listening\n * @param {!Query} query\n * @return {!Query} The normalized query\n * @private\n */\n private static queryForListening_(query: Query): Query {\n if (\n query.getQueryParams().loadsAllData() &&\n !query.getQueryParams().isDefault()\n ) {\n // We treat queries that load all data as default queries\n // Cast is necessary because ref() technically returns Firebase which is actually fb.api.Firebase which inherits\n // from Query\n return /** @type {!Query} */ query.getRef();\n } else {\n return query;\n }\n }\n\n /**\n * For a given new listen, manage the de-duplication of outstanding subscriptions.\n *\n * @param {!Query} query\n * @param {!View} view\n * @return {!Array.} This method can return events to support synchronous data sources\n * @private\n */\n private setupListener_(query: Query, view: View): Event[] {\n const path = query.path;\n const tag = this.tagForQuery_(query);\n const listener = this.createListenerForView_(view);\n\n const events = this.listenProvider_.startListening(\n SyncTree.queryForListening_(query),\n tag,\n listener.hashFn,\n listener.onComplete\n );\n\n const subtree = this.syncPointTree_.subtree(path);\n // The root of this subtree has our query. We're here because we definitely need to send a listen for that, but we\n // may need to shadow other listens as well.\n if (tag) {\n assert(\n !subtree.value.hasCompleteView(),\n \"If we're adding a query, it shouldn't be shadowed\"\n );\n } else {\n // Shadow everything at or below this location, this is a default listener.\n const queriesToStop = subtree.fold(function(\n relativePath,\n maybeChildSyncPoint,\n childMap\n ) {\n if (\n !relativePath.isEmpty() &&\n maybeChildSyncPoint &&\n maybeChildSyncPoint.hasCompleteView()\n ) {\n return [maybeChildSyncPoint.getCompleteView().getQuery()];\n } else {\n // No default listener here, flatten any deeper queries into an array\n let queries: Query[] = [];\n if (maybeChildSyncPoint) {\n queries = queries.concat(\n maybeChildSyncPoint.getQueryViews().map(view => view.getQuery())\n );\n }\n forEach(childMap, function(key: string, childQueries: Query[]) {\n queries = queries.concat(childQueries);\n });\n return queries;\n }\n });\n for (let i = 0; i < queriesToStop.length; ++i) {\n const queryToStop = queriesToStop[i];\n this.listenProvider_.stopListening(\n SyncTree.queryForListening_(queryToStop),\n this.tagForQuery_(queryToStop)\n );\n }\n }\n return events;\n }\n\n /**\n *\n * @param {!View} view\n * @return {{hashFn: function(), onComplete: function(!string, *)}}\n * @private\n */\n private createListenerForView_(\n view: View\n ): { hashFn(): string; onComplete(a: string, b?: any): Event[] } {\n const query = view.getQuery();\n const tag = this.tagForQuery_(query);\n\n return {\n hashFn: () => {\n const cache = view.getServerCache() || ChildrenNode.EMPTY_NODE;\n return cache.hash();\n },\n onComplete: (status: string): Event[] => {\n if (status === 'ok') {\n if (tag) {\n return this.applyTaggedListenComplete(query.path, tag);\n } else {\n return this.applyListenComplete(query.path);\n }\n } else {\n // If a listen failed, kill all of the listeners here, not just the one that triggered the error.\n // Note that this may need to be scoped to just this listener if we change permissions on filtered children\n const error = errorForServerCode(status, query);\n return this.removeEventRegistration(\n query,\n /*eventRegistration*/ null,\n error\n );\n }\n }\n };\n }\n\n /**\n * Given a query, computes a \"queryKey\" suitable for use in our queryToTagMap_.\n * @private\n * @param {!Query} query\n * @return {string}\n */\n private static makeQueryKey_(query: Query): string {\n return query.path.toString() + '$' + query.queryIdentifier();\n }\n\n /**\n * Given a queryKey (created by makeQueryKey), parse it back into a path and queryId.\n * @private\n * @param {!string} queryKey\n * @return {{queryId: !string, path: !Path}}\n */\n private static parseQueryKey_(\n queryKey: string\n ): { queryId: string; path: Path } {\n const splitIndex = queryKey.indexOf('$');\n assert(\n splitIndex !== -1 && splitIndex < queryKey.length - 1,\n 'Bad queryKey.'\n );\n return {\n queryId: queryKey.substr(splitIndex + 1),\n path: new Path(queryKey.substr(0, splitIndex))\n };\n }\n\n /**\n * Return the query associated with the given tag, if we have one\n * @param {!number} tag\n * @return {?string}\n * @private\n */\n private queryKeyForTag_(tag: number): string | null {\n return this.tagToQueryMap_['_' + tag];\n }\n\n /**\n * Return the tag associated with the given query.\n * @param {!Query} query\n * @return {?number}\n * @private\n */\n private tagForQuery_(query: Query): number | null {\n const queryKey = SyncTree.makeQueryKey_(query);\n return safeGet(this.queryToTagMap_, queryKey);\n }\n\n /**\n * Static tracker for next query tag.\n * @type {number}\n * @private\n */\n private static nextQueryTag_ = 1;\n\n /**\n * Static accessor for query tags.\n * @return {number}\n * @private\n */\n private static getNextQueryTag_(): number {\n return SyncTree.nextQueryTag_++;\n }\n\n /**\n * A helper method to apply tagged operations\n *\n * @param {!Path} queryPath\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n private applyTaggedOperation_(\n queryPath: Path,\n operation: Operation\n ): Event[] {\n const syncPoint = this.syncPointTree_.get(queryPath);\n assert(syncPoint, \"Missing sync point for query tag that we're tracking\");\n const writesCache = this.pendingWriteTree_.childWrites(queryPath);\n return syncPoint.applyOperation(\n operation,\n writesCache,\n /*serverCache=*/ null\n );\n }\n\n /**\n * A helper method that visits all descendant and ancestor SyncPoints, applying the operation.\n *\n * NOTES:\n * - Descendant SyncPoints will be visited first (since we raise events depth-first).\n\n * - We call applyOperation() on each SyncPoint passing three things:\n * 1. A version of the Operation that has been made relative to the SyncPoint location.\n * 2. A WriteTreeRef of any writes we have cached at the SyncPoint location.\n * 3. A snapshot Node with cached server data, if we have it.\n\n * - We concatenate all of the events returned by each SyncPoint and return the result.\n *\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n private applyOperationToSyncPoints_(operation: Operation): Event[] {\n return this.applyOperationHelper_(\n operation,\n this.syncPointTree_,\n /*serverCache=*/ null,\n this.pendingWriteTree_.childWrites(Path.Empty)\n );\n }\n\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n private applyOperationHelper_(\n operation: Operation,\n syncPointTree: ImmutableTree,\n serverCache: Node | null,\n writesCache: WriteTreeRef\n ): Event[] {\n if (operation.path.isEmpty()) {\n return this.applyOperationDescendantsHelper_(\n operation,\n syncPointTree,\n serverCache,\n writesCache\n );\n } else {\n const syncPoint = syncPointTree.get(Path.Empty);\n\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path.Empty);\n }\n\n let events: Event[] = [];\n const childName = operation.path.getFront();\n const childOperation = operation.operationForChild(childName);\n const childTree = syncPointTree.children.get(childName);\n if (childTree && childOperation) {\n const childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n const childWritesCache = writesCache.child(childName);\n events = events.concat(\n this.applyOperationHelper_(\n childOperation,\n childTree,\n childServerCache,\n childWritesCache\n )\n );\n }\n\n if (syncPoint) {\n events = events.concat(\n syncPoint.applyOperation(operation, writesCache, serverCache)\n );\n }\n\n return events;\n }\n }\n\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n private applyOperationDescendantsHelper_(\n operation: Operation,\n syncPointTree: ImmutableTree,\n serverCache: Node | null,\n writesCache: WriteTreeRef\n ): Event[] {\n const syncPoint = syncPointTree.get(Path.Empty);\n\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path.Empty);\n }\n\n let events: Event[] = [];\n syncPointTree.children.inorderTraversal((childName, childTree) => {\n const childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n const childWritesCache = writesCache.child(childName);\n const childOperation = operation.operationForChild(childName);\n if (childOperation) {\n events = events.concat(\n this.applyOperationDescendantsHelper_(\n childOperation,\n childTree,\n childServerCache,\n childWritesCache\n )\n );\n }\n });\n\n if (syncPoint) {\n events = events.concat(\n syncPoint.applyOperation(operation, writesCache, serverCache)\n );\n }\n\n return events;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SyncTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { Path } from './util/Path';\nimport { Node } from './snap/Node';\n\n/**\n * Mutable object which basically just stores a reference to the \"latest\" immutable snapshot.\n *\n * @constructor\n */\nexport class SnapshotHolder {\n private rootNode_: Node = ChildrenNode.EMPTY_NODE;\n\n getNode(path: Path): Node {\n return this.rootNode_.getChild(path);\n }\n\n updateSnapshot(path: Path, newSnapshotNode: Node) {\n this.rootNode_ = this.rootNode_.updateChild(path, newSnapshotNode);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SnapshotHolder.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { log, warn } from './util/util';\nimport { FirebaseApp, FirebaseAuthTokenData } from '../../app/firebase_app';\n\n/**\n * Abstraction around FirebaseApp's token fetching capabilities.\n */\nexport class AuthTokenProvider {\n /**\n * @param {!FirebaseApp} app_\n */\n constructor(private app_: FirebaseApp) {}\n\n /**\n * @param {boolean} forceRefresh\n * @return {!Promise}\n */\n getToken(forceRefresh: boolean): Promise {\n return this.app_['INTERNAL']['getToken'](forceRefresh).then(\n null,\n // .catch\n function(error) {\n // TODO: Need to figure out all the cases this is raised and whether\n // this makes sense.\n if (error && error.code === 'auth/token-not-initialized') {\n log('Got auth/token-not-initialized error. Treating as null token.');\n return null;\n } else {\n return Promise.reject(error);\n }\n }\n );\n }\n\n addTokenChangeListener(listener: (token: string | null) => void) {\n // TODO: We might want to wrap the listener and call it with no args to\n // avoid a leaky abstraction, but that makes removing the listener harder.\n this.app_['INTERNAL']['addAuthTokenListener'](listener);\n }\n\n removeTokenChangeListener(listener: (token: string | null) => void) {\n this.app_['INTERNAL']['removeAuthTokenListener'](listener);\n }\n\n notifyForInvalidToken() {\n let errorMessage =\n 'Provided authentication credentials for the app named \"' +\n this.app_.name +\n '\" are invalid. This usually indicates your app was not ' +\n 'initialized correctly. ';\n if ('credential' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"credential\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n } else if ('serviceAccount' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"serviceAccount\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n } else {\n errorMessage +=\n 'Make sure the \"apiKey\" and \"databaseURL\" properties provided to ' +\n 'initializeApp() match the values provided for your app at ' +\n 'https://console.firebase.google.com/.';\n }\n warn(errorMessage);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/AuthTokenProvider.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { clone, forEach } from '../../../utils/obj';\nimport { StatsCollection } from './StatsCollection';\n\n/**\n * Returns the delta from the previous call to get stats.\n *\n * @param collection_ The collection to \"listen\" to.\n * @constructor\n */\nexport class StatsListener {\n private last_: { [k: string]: number } | null = null;\n\n constructor(private collection_: StatsCollection) {}\n\n get(): { [k: string]: number } {\n const newStats = this.collection_.get();\n\n const delta: typeof newStats = clone(newStats);\n if (this.last_) {\n forEach(this.last_, (stat: string, value: number) => {\n delta[stat] = delta[stat] - value;\n });\n }\n this.last_ = newStats;\n\n return delta;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsListener.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { contains, forEach } from '../../../utils/obj';\nimport { setTimeoutNonBlocking } from '../util/util';\nimport { StatsListener } from './StatsListener';\nimport { StatsCollection } from './StatsCollection';\nimport { ServerActions } from '../ServerActions';\n\n// Assuming some apps may have a short amount of time on page, and a bulk of firebase operations probably\n// happen on page load, we try to report our first set of stats pretty quickly, but we wait at least 10\n// seconds to try to ensure the Firebase connection is established / settled.\nconst FIRST_STATS_MIN_TIME = 10 * 1000;\nconst FIRST_STATS_MAX_TIME = 30 * 1000;\n\n// We'll continue to report stats on average every 5 minutes.\nconst REPORT_STATS_INTERVAL = 5 * 60 * 1000;\n\n/**\n * @constructor\n */\nexport class StatsReporter {\n private statsListener_: StatsListener;\n private statsToReport_: { [k: string]: boolean } = {};\n\n /**\n * @param collection\n * @param server_\n */\n constructor(collection: StatsCollection, private server_: ServerActions) {\n this.statsListener_ = new StatsListener(collection);\n\n const timeout =\n FIRST_STATS_MIN_TIME +\n (FIRST_STATS_MAX_TIME - FIRST_STATS_MIN_TIME) * Math.random();\n setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(timeout));\n }\n\n includeStat(stat: string) {\n this.statsToReport_[stat] = true;\n }\n\n private reportStats_() {\n const stats = this.statsListener_.get();\n const reportedStats: typeof stats = {};\n let haveStatsToReport = false;\n\n forEach(stats, (stat: string, value: number) => {\n if (value > 0 && contains(this.statsToReport_, stat)) {\n reportedStats[stat] = value;\n haveStatsToReport = true;\n }\n });\n\n if (haveStatsToReport) {\n this.server_.reportStats(reportedStats);\n }\n\n // queue our next run.\n setTimeoutNonBlocking(\n this.reportStats_.bind(this),\n Math.floor(Math.random() * 2 * REPORT_STATS_INTERVAL)\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsReporter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../util/Path';\nimport { log, logger, exceptionGuard } from '../util/util';\nimport { Event } from './Event';\n\n/**\n * The event queue serves a few purposes:\n * 1. It ensures we maintain event order in the face of event callbacks doing operations that result in more\n * events being queued.\n * 2. raiseQueuedEvents() handles being called reentrantly nicely. That is, if in the course of raising events,\n * raiseQueuedEvents() is called again, the \"inner\" call will pick up raising events where the \"outer\" call\n * left off, ensuring that the events are still raised synchronously and in order.\n * 3. You can use raiseEventsAtPath and raiseEventsForChangedPath to ensure only relevant previously-queued\n * events are raised synchronously.\n *\n * NOTE: This can all go away if/when we move to async events.\n *\n * @constructor\n */\nexport class EventQueue {\n /**\n * @private\n * @type {!Array.}\n */\n private eventLists_: EventList[] = [];\n\n /**\n * Tracks recursion depth of raiseQueuedEvents_, for debugging purposes.\n * @private\n * @type {!number}\n */\n private recursionDepth_ = 0;\n\n /**\n * @param {!Array.} eventDataList The new events to queue.\n */\n queueEvents(eventDataList: Event[]) {\n // We group events by path, storing them in a single EventList, to make it easier to skip over them quickly.\n let currList = null;\n for (let i = 0; i < eventDataList.length; i++) {\n const eventData = eventDataList[i];\n const eventPath = eventData.getPath();\n if (currList !== null && !eventPath.equals(currList.getPath())) {\n this.eventLists_.push(currList);\n currList = null;\n }\n\n if (currList === null) {\n currList = new EventList(eventPath);\n }\n\n currList.add(eventData);\n }\n if (currList) {\n this.eventLists_.push(currList);\n }\n }\n\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones)\n * for the specified path.\n *\n * It is assumed that the new events are all for the specified path.\n *\n * @param {!Path} path The path to raise events for.\n * @param {!Array.} eventDataList The new events to raise.\n */\n raiseEventsAtPath(path: Path, eventDataList: Event[]) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_((eventPath: Path) =>\n eventPath.equals(path)\n );\n }\n\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones) for\n * locations related to the specified change path (i.e. all ancestors and descendants).\n *\n * It is assumed that the new events are all related (ancestor or descendant) to the specified path.\n *\n * @param {!Path} changedPath The path to raise events for.\n * @param {!Array.} eventDataList The events to raise\n */\n raiseEventsForChangedPath(changedPath: Path, eventDataList: Event[]) {\n this.queueEvents(eventDataList);\n\n this.raiseQueuedEventsMatchingPredicate_((eventPath: Path) => {\n return eventPath.contains(changedPath) || changedPath.contains(eventPath);\n });\n }\n\n /**\n * @param {!function(!Path):boolean} predicate\n * @private\n */\n private raiseQueuedEventsMatchingPredicate_(\n predicate: (path: Path) => boolean\n ) {\n this.recursionDepth_++;\n\n let sentAll = true;\n for (let i = 0; i < this.eventLists_.length; i++) {\n const eventList = this.eventLists_[i];\n if (eventList) {\n const eventPath = eventList.getPath();\n if (predicate(eventPath)) {\n this.eventLists_[i].raise();\n this.eventLists_[i] = null;\n } else {\n sentAll = false;\n }\n }\n }\n\n if (sentAll) {\n this.eventLists_ = [];\n }\n\n this.recursionDepth_--;\n }\n}\n\n/**\n * @param {!Path} path\n * @constructor\n */\nexport class EventList {\n /**\n * @type {!Array.}\n * @private\n */\n private events_: Event[] = [];\n\n constructor(private readonly path_: Path) {}\n\n /**\n * @param {!Event} eventData\n */\n add(eventData: Event) {\n this.events_.push(eventData);\n }\n\n /**\n * Iterates through the list and raises each event\n */\n raise() {\n for (let i = 0; i < this.events_.length; i++) {\n const eventData = this.events_[i];\n if (eventData !== null) {\n this.events_[i] = null;\n const eventFn = eventData.getEventRunner();\n if (logger) {\n log('event: ' + eventData.toString());\n }\n exceptionGuard(eventFn);\n }\n }\n }\n\n /**\n * @return {!Path}\n */\n getPath(): Path {\n return this.path_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/EventQueue.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\n\n/**\n * Base class to be used if you want to emit events. Call the constructor with\n * the set of allowed event names.\n */\nexport abstract class EventEmitter {\n private listeners_: {\n [eventType: string]: Array<{\n callback(...args: any[]): void;\n context: any;\n }>;\n } = {};\n\n /**\n * @param {!Array.} allowedEvents_\n */\n constructor(private allowedEvents_: Array) {\n assert(\n Array.isArray(allowedEvents_) && allowedEvents_.length > 0,\n 'Requires a non-empty array'\n );\n }\n\n /**\n * To be overridden by derived classes in order to fire an initial event when\n * somebody subscribes for data.\n *\n * @param {!string} eventType\n * @return {Array.<*>} Array of parameters to trigger initial event with.\n */\n abstract getInitialEvent(eventType: string): any[];\n\n /**\n * To be called by derived classes to trigger events.\n * @param {!string} eventType\n * @param {...*} var_args\n */\n protected trigger(eventType: string, ...var_args: any[]) {\n if (Array.isArray(this.listeners_[eventType])) {\n // Clone the list, since callbacks could add/remove listeners.\n const listeners = [...this.listeners_[eventType]];\n\n for (let i = 0; i < listeners.length; i++) {\n listeners[i].callback.apply(listeners[i].context, var_args);\n }\n }\n }\n\n on(eventType: string, callback: (a: any) => void, context: any) {\n this.validateEventType_(eventType);\n this.listeners_[eventType] = this.listeners_[eventType] || [];\n this.listeners_[eventType].push({ callback, context });\n\n const eventData = this.getInitialEvent(eventType);\n if (eventData) {\n callback.apply(context, eventData);\n }\n }\n\n off(eventType: string, callback: (a: any) => void, context: any) {\n this.validateEventType_(eventType);\n const listeners = this.listeners_[eventType] || [];\n for (let i = 0; i < listeners.length; i++) {\n if (\n listeners[i].callback === callback &&\n (!context || context === listeners[i].context)\n ) {\n listeners.splice(i, 1);\n return;\n }\n }\n }\n\n private validateEventType_(eventType: string) {\n assert(\n this.allowedEvents_.find(function(et) {\n return et === eventType;\n }),\n 'Unknown event: ' + eventType\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/EventEmitter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { EventEmitter } from './EventEmitter';\nimport { assert } from '../../../utils/assert';\n\ndeclare const document: any;\n\n/**\n * @extends {EventEmitter}\n */\nexport class VisibilityMonitor extends EventEmitter {\n private visible_: boolean;\n\n static getInstance() {\n return new VisibilityMonitor();\n }\n\n constructor() {\n super(['visible']);\n let hidden: string;\n let visibilityChange: string;\n if (\n typeof document !== 'undefined' &&\n typeof document.addEventListener !== 'undefined'\n ) {\n if (typeof document['hidden'] !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n visibilityChange = 'visibilitychange';\n hidden = 'hidden';\n } else if (typeof document['mozHidden'] !== 'undefined') {\n visibilityChange = 'mozvisibilitychange';\n hidden = 'mozHidden';\n } else if (typeof document['msHidden'] !== 'undefined') {\n visibilityChange = 'msvisibilitychange';\n hidden = 'msHidden';\n } else if (typeof document['webkitHidden'] !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange';\n hidden = 'webkitHidden';\n }\n }\n\n // Initially, we always assume we are visible. This ensures that in browsers\n // without page visibility support or in cases where we are never visible\n // (e.g. chrome extension), we act as if we are visible, i.e. don't delay\n // reconnects\n this.visible_ = true;\n\n if (visibilityChange) {\n document.addEventListener(\n visibilityChange,\n () => {\n const visible = !document[hidden];\n if (visible !== this.visible_) {\n this.visible_ = visible;\n this.trigger('visible', visible);\n }\n },\n false\n );\n }\n }\n\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n getInitialEvent(eventType: string): boolean[] {\n assert(eventType === 'visible', 'Unknown event type: ' + eventType);\n return [this.visible_];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/VisibilityMonitor.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { EventEmitter } from './EventEmitter';\nimport { isMobileCordova } from '../../../utils/environment';\n\n/**\n * Monitors online state (as reported by window.online/offline events).\n *\n * The expectation is that this could have many false positives (thinks we are online\n * when we're not), but no false negatives. So we can safely use it to determine when\n * we definitely cannot reach the internet.\n *\n * @extends {EventEmitter}\n */\nexport class OnlineMonitor extends EventEmitter {\n private online_ = true;\n\n static getInstance() {\n return new OnlineMonitor();\n }\n\n constructor() {\n super(['online']);\n\n // We've had repeated complaints that Cordova apps can get stuck \"offline\", e.g.\n // https://forum.ionicframework.com/t/firebase-connection-is-lost-and-never-come-back/43810\n // It would seem that the 'online' event does not always fire consistently. So we disable it\n // for Cordova.\n if (\n typeof window !== 'undefined' &&\n typeof window.addEventListener !== 'undefined' &&\n !isMobileCordova()\n ) {\n window.addEventListener(\n 'online',\n () => {\n if (!this.online_) {\n this.online_ = true;\n this.trigger('online', true);\n }\n },\n false\n );\n\n window.addEventListener(\n 'offline',\n () => {\n if (this.online_) {\n this.online_ = false;\n this.trigger('online', false);\n }\n },\n false\n );\n }\n }\n\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n getInitialEvent(eventType: string): boolean[] {\n assert(eventType === 'online', 'Unknown event type: ' + eventType);\n return [this.online_];\n }\n\n /**\n * @return {boolean}\n */\n currentlyOnline(): boolean {\n return this.online_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/OnlineMonitor.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { base64Decode } from '../database/core/util/util';\nimport { jsonEval } from './json';\n\n/**\n * Decodes a Firebase auth. token into constituent parts.\n *\n * Notes:\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {{header: *, claims: *, data: *, signature: string}}\n */\nexport const decode = function(token) {\n var header = {},\n claims = {},\n data = {},\n signature = '';\n\n try {\n var parts = token.split('.');\n header = jsonEval(base64Decode(parts[0]) || '');\n claims = jsonEval(base64Decode(parts[1]) || '');\n signature = parts[2];\n data = claims['d'] || {};\n delete claims['d'];\n } catch (e) {}\n\n return {\n header: header,\n claims: claims,\n data: data,\n signature: signature\n };\n};\n\n/**\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {boolean}\n */\nexport const isValidTimestamp = function(token) {\n var claims = decode(token).claims,\n now = Math.floor(new Date().getTime() / 1000),\n validSince,\n validUntil;\n\n if (typeof claims === 'object') {\n if (claims.hasOwnProperty('nbf')) {\n validSince = claims['nbf'];\n } else if (claims.hasOwnProperty('iat')) {\n validSince = claims['iat'];\n }\n\n if (claims.hasOwnProperty('exp')) {\n validUntil = claims['exp'];\n } else {\n // token will expire after 24h by default\n validUntil = validSince + 86400;\n }\n }\n\n return (\n now && validSince && validUntil && now >= validSince && now <= validUntil\n );\n};\n\n/**\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\n *\n * Notes:\n * - May return null if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {?number}\n */\nexport const issuedAtTime = function(token) {\n var claims = decode(token).claims;\n if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\n return claims['iat'];\n }\n return null;\n};\n\n/**\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time and non-empty\n * signature.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {boolean}\n */\nexport const isValidFormat = function(token) {\n var decoded = decode(token),\n claims = decoded.claims;\n\n return (\n !!decoded.signature &&\n !!claims &&\n typeof claims === 'object' &&\n claims.hasOwnProperty('iat')\n );\n};\n\n/**\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {boolean}\n */\nexport const isAdmin = function(token) {\n var claims = decode(token).claims;\n return typeof claims === 'object' && claims['admin'] === true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/jwt.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { exceptionGuard } from '../../core/util/util';\n\n/**\n * This class ensures the packets from the server arrive in order\n * This class takes data from the server and ensures it gets passed into the callbacks in order.\n * @constructor\n */\nexport class PacketReceiver {\n pendingResponses: any[] = [];\n currentResponseNum = 0;\n closeAfterResponse = -1;\n onClose: (() => void) | null = null;\n\n /**\n * @param onMessage_\n */\n constructor(private onMessage_: (a: Object) => void) {}\n\n closeAfter(responseNum: number, callback: () => void) {\n this.closeAfterResponse = responseNum;\n this.onClose = callback;\n if (this.closeAfterResponse < this.currentResponseNum) {\n this.onClose();\n this.onClose = null;\n }\n }\n\n /**\n * Each message from the server comes with a response number, and an array of data. The responseNumber\n * allows us to ensure that we process them in the right order, since we can't be guaranteed that all\n * browsers will respond in the same order as the requests we sent\n * @param {number} requestNum\n * @param {Array} data\n */\n handleResponse(requestNum: number, data: any[]) {\n this.pendingResponses[requestNum] = data;\n while (this.pendingResponses[this.currentResponseNum]) {\n const toProcess = this.pendingResponses[this.currentResponseNum];\n delete this.pendingResponses[this.currentResponseNum];\n for (let i = 0; i < toProcess.length; ++i) {\n if (toProcess[i]) {\n exceptionGuard(() => {\n this.onMessage_(toProcess[i]);\n });\n }\n }\n if (this.currentResponseNum === this.closeAfterResponse) {\n if (this.onClose) {\n this.onClose();\n this.onClose = null;\n }\n break;\n }\n this.currentResponseNum++;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/polling/PacketReceiver.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport {\n base64Encode,\n executeWhenDOMReady,\n isChromeExtensionContentScript,\n isWindowsStoreApp,\n log,\n logWrapper,\n LUIDGenerator,\n splitStringBySize\n} from '../core/util/util';\nimport { CountedSet } from '../core/util/CountedSet';\nimport { StatsManager } from '../core/stats/StatsManager';\nimport { PacketReceiver } from './polling/PacketReceiver';\nimport {\n FORGE_DOMAIN,\n FORGE_REF,\n LAST_SESSION_PARAM,\n LONG_POLLING,\n PROTOCOL_VERSION,\n REFERER_PARAM,\n TRANSPORT_SESSION_PARAM,\n VERSION_PARAM\n} from './Constants';\nimport { stringify } from '../../utils/json';\nimport { isNodeSdk } from '../../utils/environment';\nimport { Transport } from './Transport';\nimport { RepoInfo } from '../core/RepoInfo';\nimport { StatsCollection } from '../core/stats/StatsCollection';\n\n// URL query parameters associated with longpolling\nexport const FIREBASE_LONGPOLL_START_PARAM = 'start';\nexport const FIREBASE_LONGPOLL_CLOSE_COMMAND = 'close';\nexport const FIREBASE_LONGPOLL_COMMAND_CB_NAME = 'pLPCommand';\nexport const FIREBASE_LONGPOLL_DATA_CB_NAME = 'pRTLPCB';\nexport const FIREBASE_LONGPOLL_ID_PARAM = 'id';\nexport const FIREBASE_LONGPOLL_PW_PARAM = 'pw';\nexport const FIREBASE_LONGPOLL_SERIAL_PARAM = 'ser';\nexport const FIREBASE_LONGPOLL_CALLBACK_ID_PARAM = 'cb';\nexport const FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM = 'seg';\nexport const FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET = 'ts';\nexport const FIREBASE_LONGPOLL_DATA_PARAM = 'd';\nexport const FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM = 'disconn';\nexport const FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM = 'dframe';\n\n//Data size constants.\n//TODO: Perf: the maximum length actually differs from browser to browser.\n// We should check what browser we're on and set accordingly.\nconst MAX_URL_DATA_SIZE = 1870;\nconst SEG_HEADER_SIZE = 30; //ie: &seg=8299234&ts=982389123&d=\nconst MAX_PAYLOAD_SIZE = MAX_URL_DATA_SIZE - SEG_HEADER_SIZE;\n\n/**\n * Keepalive period\n * send a fresh request at minimum every 25 seconds. Opera has a maximum request\n * length of 30 seconds that we can't exceed.\n * @const\n * @type {number}\n */\nconst KEEPALIVE_REQUEST_INTERVAL = 25000;\n\n/**\n * How long to wait before aborting a long-polling connection attempt.\n * @const\n * @type {number}\n */\nconst LP_CONNECT_TIMEOUT = 30000;\n\n/**\n * This class manages a single long-polling connection.\n *\n * @constructor\n * @implements {Transport}\n */\nexport class BrowserPollConnection implements Transport {\n bytesSent = 0;\n bytesReceived = 0;\n urlFn: (params: object) => string;\n scriptTagHolder: FirebaseIFrameScriptHolder;\n myDisconnFrame: HTMLIFrameElement;\n curSegmentNum: number;\n myPacketOrderer: PacketReceiver;\n id: string;\n password: string;\n private log_: (...a: any[]) => void;\n private stats_: StatsCollection;\n private everConnected_ = false;\n private isClosed_: boolean;\n private connectTimeoutTimer_: number | null;\n private onDisconnect_: ((a?: boolean) => void) | null;\n\n /**\n * @param {string} connId An identifier for this connection, used for logging\n * @param {RepoInfo} repoInfo The info for the endpoint to send data to.\n * @param {string=} transportSessionId Optional transportSessionid if we are reconnecting for an existing\n * transport session\n * @param {string=} lastSessionId Optional lastSessionId if the PersistentConnection has already created a\n * connection previously\n */\n constructor(\n public connId: string,\n public repoInfo: RepoInfo,\n public transportSessionId?: string,\n public lastSessionId?: string\n ) {\n this.log_ = logWrapper(connId);\n this.stats_ = StatsManager.getCollection(repoInfo);\n this.urlFn = (params: { [k: string]: string }) =>\n repoInfo.connectionURL(LONG_POLLING, params);\n }\n\n /**\n *\n * @param {function(Object)} onMessage Callback when messages arrive\n * @param {function()} onDisconnect Callback with connection lost.\n */\n open(onMessage: (msg: Object) => void, onDisconnect: (a?: boolean) => void) {\n this.curSegmentNum = 0;\n this.onDisconnect_ = onDisconnect;\n this.myPacketOrderer = new PacketReceiver(onMessage);\n this.isClosed_ = false;\n\n this.connectTimeoutTimer_ = setTimeout(() => {\n this.log_('Timed out trying to connect.');\n // Make sure we clear the host cache\n this.onClosed_();\n this.connectTimeoutTimer_ = null;\n }, Math.floor(LP_CONNECT_TIMEOUT)) as any;\n\n // Ensure we delay the creation of the iframe until the DOM is loaded.\n executeWhenDOMReady(() => {\n if (this.isClosed_) return;\n\n //Set up a callback that gets triggered once a connection is set up.\n this.scriptTagHolder = new FirebaseIFrameScriptHolder(\n (...args) => {\n const [command, arg1, arg2, arg3, arg4] = args;\n this.incrementIncomingBytes_(args);\n if (!this.scriptTagHolder) return; // we closed the connection.\n\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n this.everConnected_ = true;\n if (command == FIREBASE_LONGPOLL_START_PARAM) {\n this.id = arg1;\n this.password = arg2;\n } else if (command === FIREBASE_LONGPOLL_CLOSE_COMMAND) {\n // Don't clear the host cache. We got a response from the server, so we know it's reachable\n if (arg1) {\n // We aren't expecting any more data (other than what the server's already in the process of sending us\n // through our already open polls), so don't send any more.\n this.scriptTagHolder.sendNewPolls = false;\n\n // arg1 in this case is the last response number sent by the server. We should try to receive\n // all of the responses up to this one before closing\n this.myPacketOrderer.closeAfter(arg1, () => {\n this.onClosed_();\n });\n } else {\n this.onClosed_();\n }\n } else {\n throw new Error('Unrecognized command received: ' + command);\n }\n },\n (...args) => {\n const [pN, data] = args;\n this.incrementIncomingBytes_(args);\n this.myPacketOrderer.handleResponse(pN, data);\n },\n () => {\n this.onClosed_();\n },\n this.urlFn\n );\n\n //Send the initial request to connect. The serial number is simply to keep the browser from pulling previous results\n //from cache.\n const urlParams: { [k: string]: string | number } = {};\n urlParams[FIREBASE_LONGPOLL_START_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_SERIAL_PARAM] = Math.floor(\n Math.random() * 100000000\n );\n if (this.scriptTagHolder.uniqueCallbackIdentifier)\n urlParams[\n FIREBASE_LONGPOLL_CALLBACK_ID_PARAM\n ] = this.scriptTagHolder.uniqueCallbackIdentifier;\n urlParams[VERSION_PARAM] = PROTOCOL_VERSION;\n if (this.transportSessionId) {\n urlParams[TRANSPORT_SESSION_PARAM] = this.transportSessionId;\n }\n if (this.lastSessionId) {\n urlParams[LAST_SESSION_PARAM] = this.lastSessionId;\n }\n if (\n !isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(FORGE_DOMAIN) !== -1\n ) {\n urlParams[REFERER_PARAM] = FORGE_REF;\n }\n const connectURL = this.urlFn(urlParams);\n this.log_('Connecting via long-poll to ' + connectURL);\n this.scriptTagHolder.addTag(connectURL, () => {\n /* do nothing */\n });\n });\n }\n\n /**\n * Call this when a handshake has completed successfully and we want to consider the connection established\n */\n start() {\n this.scriptTagHolder.startLongPoll(this.id, this.password);\n this.addDisconnectPingFrame(this.id, this.password);\n }\n\n private static forceAllow_: boolean;\n\n /**\n * Forces long polling to be considered as a potential transport\n */\n static forceAllow() {\n BrowserPollConnection.forceAllow_ = true;\n }\n\n private static forceDisallow_: boolean;\n\n /**\n * Forces longpolling to not be considered as a potential transport\n */\n static forceDisallow() {\n BrowserPollConnection.forceDisallow_ = true;\n }\n\n // Static method, use string literal so it can be accessed in a generic way\n static isAvailable() {\n // NOTE: In React-Native there's normally no 'document', but if you debug a React-Native app in\n // the Chrome debugger, 'document' is defined, but document.createElement is null (2015/06/08).\n return (\n BrowserPollConnection.forceAllow_ ||\n (!BrowserPollConnection.forceDisallow_ &&\n typeof document !== 'undefined' &&\n document.createElement != null &&\n !isChromeExtensionContentScript() &&\n !isWindowsStoreApp() &&\n !isNodeSdk())\n );\n }\n\n /**\n * No-op for polling\n */\n markConnectionHealthy() {}\n\n /**\n * Stops polling and cleans up the iframe\n * @private\n */\n private shutdown_() {\n this.isClosed_ = true;\n\n if (this.scriptTagHolder) {\n this.scriptTagHolder.close();\n this.scriptTagHolder = null;\n }\n\n //remove the disconnect frame, which will trigger an XHR call to the server to tell it we're leaving.\n if (this.myDisconnFrame) {\n document.body.removeChild(this.myDisconnFrame);\n this.myDisconnFrame = null;\n }\n\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n }\n\n /**\n * Triggered when this transport is closed\n * @private\n */\n private onClosed_() {\n if (!this.isClosed_) {\n this.log_('Longpoll is closing itself');\n this.shutdown_();\n\n if (this.onDisconnect_) {\n this.onDisconnect_(this.everConnected_);\n this.onDisconnect_ = null;\n }\n }\n }\n\n /**\n * External-facing close handler. RealTime has requested we shut down. Kill our connection and tell the server\n * that we've left.\n */\n close() {\n if (!this.isClosed_) {\n this.log_('Longpoll is being closed.');\n this.shutdown_();\n }\n }\n\n /**\n * Send the JSON object down to the server. It will need to be stringified, base64 encoded, and then\n * broken into chunks (since URLs have a small maximum length).\n * @param {!Object} data The JSON data to transmit.\n */\n send(data: Object) {\n const dataStr = stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n\n //first, lets get the base64-encoded data\n const base64data = base64Encode(dataStr);\n\n //We can only fit a certain amount in each URL, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n const dataSegs = splitStringBySize(base64data, MAX_PAYLOAD_SIZE);\n\n //Enqueue each segment for transmission. We assign each chunk a sequential ID and a total number\n //of segments so that we can reassemble the packet on the server.\n for (let i = 0; i < dataSegs.length; i++) {\n this.scriptTagHolder.enqueueSegment(\n this.curSegmentNum,\n dataSegs.length,\n dataSegs[i]\n );\n this.curSegmentNum++;\n }\n }\n\n /**\n * This is how we notify the server that we're leaving.\n * We aren't able to send requests with DHTML on a window close event, but we can\n * trigger XHR requests in some browsers (everything but Opera basically).\n * @param {!string} id\n * @param {!string} pw\n */\n addDisconnectPingFrame(id: string, pw: string) {\n if (isNodeSdk()) return;\n this.myDisconnFrame = document.createElement('iframe');\n const urlParams: { [k: string]: string } = {};\n urlParams[FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = id;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = pw;\n this.myDisconnFrame.src = this.urlFn(urlParams);\n this.myDisconnFrame.style.display = 'none';\n\n document.body.appendChild(this.myDisconnFrame);\n }\n\n /**\n * Used to track the bytes received by this client\n * @param {*} args\n * @private\n */\n private incrementIncomingBytes_(args: any) {\n // TODO: This is an annoying perf hit just to track the number of incoming bytes. Maybe it should be opt-in.\n const bytesReceived = stringify(args).length;\n this.bytesReceived += bytesReceived;\n this.stats_.incrementCounter('bytes_received', bytesReceived);\n }\n}\n\nexport interface IFrameElement extends HTMLIFrameElement {\n doc: Document;\n}\n\n/*********************************************************************************************\n * A wrapper around an iframe that is used as a long-polling script holder.\n * @constructor\n *********************************************************************************************/\nexport class FirebaseIFrameScriptHolder {\n //We maintain a count of all of the outstanding requests, because if we have too many active at once it can cause\n //problems in some browsers.\n /**\n * @type {CountedSet.}\n */\n outstandingRequests = new CountedSet();\n\n //A queue of the pending segments waiting for transmission to the server.\n pendingSegs: { seg: number; ts: number; d: any }[] = [];\n\n //A serial number. We use this for two things:\n // 1) A way to ensure the browser doesn't cache responses to polls\n // 2) A way to make the server aware when long-polls arrive in a different order than we started them. The\n // server needs to release both polls in this case or it will cause problems in Opera since Opera can only execute\n // JSONP code in the order it was added to the iframe.\n currentSerial = Math.floor(Math.random() * 100000000);\n\n // This gets set to false when we're \"closing down\" the connection (e.g. we're switching transports but there's still\n // incoming data from the server that we're waiting for).\n sendNewPolls = true;\n\n uniqueCallbackIdentifier: number;\n myIFrame: IFrameElement;\n alive: boolean;\n myID: string;\n myPW: string;\n commandCB: (command: string, ...args: any[]) => void;\n onMessageCB: (...args: any[]) => void;\n\n /**\n * @param commandCB - The callback to be called when control commands are recevied from the server.\n * @param onMessageCB - The callback to be triggered when responses arrive from the server.\n * @param onDisconnect - The callback to be triggered when this tag holder is closed\n * @param urlFn - A function that provides the URL of the endpoint to send data to.\n */\n constructor(\n commandCB: (command: string, ...args: any[]) => void,\n onMessageCB: (...args: any[]) => void,\n public onDisconnect: () => void,\n public urlFn: (a: object) => string\n ) {\n if (!isNodeSdk()) {\n //Each script holder registers a couple of uniquely named callbacks with the window. These are called from the\n //iframes where we put the long-polling script tags. We have two callbacks:\n // 1) Command Callback - Triggered for control issues, like starting a connection.\n // 2) Message Callback - Triggered when new data arrives.\n this.uniqueCallbackIdentifier = LUIDGenerator();\n (window as any)[\n FIREBASE_LONGPOLL_COMMAND_CB_NAME + this.uniqueCallbackIdentifier\n ] = commandCB;\n (window as any)[\n FIREBASE_LONGPOLL_DATA_CB_NAME + this.uniqueCallbackIdentifier\n ] = onMessageCB;\n\n //Create an iframe for us to add script tags to.\n this.myIFrame = FirebaseIFrameScriptHolder.createIFrame_();\n\n // Set the iframe's contents.\n let script = '';\n // if we set a javascript url, it's IE and we need to set the document domain. The javascript url is sufficient\n // for ie9, but ie8 needs to do it again in the document itself.\n if (\n this.myIFrame.src &&\n this.myIFrame.src.substr(0, 'javascript:'.length) === 'javascript:'\n ) {\n const currentDomain = document.domain;\n script = '';\n }\n const iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n } catch (e) {\n log('frame writing exception');\n if (e.stack) {\n log(e.stack);\n }\n log(e);\n }\n } else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n\n /**\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\n * actually use.\n * @private\n * @return {Element}\n */\n private static createIFrame_(): IFrameElement {\n const iframe = document.createElement('iframe') as IFrameElement;\n iframe.style.display = 'none';\n\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n const a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n log('No IE domain setting required');\n }\n } catch (e) {\n const domain = document.domain;\n iframe.src =\n \"javascript:void((function(){document.open();document.domain='\" +\n domain +\n \"';document.close();})())\";\n }\n } else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n (iframe as any).doc = iframe.contentDocument; // Firefox, Opera, Safari\n } else if (iframe.contentWindow) {\n (iframe as any).doc = iframe.contentWindow.document; // Internet Explorer\n } else if ((iframe as any).document) {\n (iframe as any).doc = (iframe as any).document; //others?\n }\n\n return iframe;\n }\n\n /**\n * Cancel all outstanding queries and remove the frame.\n */\n close() {\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(() => {\n if (this.myIFrame !== null) {\n document.body.removeChild(this.myIFrame);\n this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n\n if (isNodeSdk() && this.myID) {\n const urlParams: { [k: string]: string } = {};\n urlParams[FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n const theURL = this.urlFn(urlParams);\n (FirebaseIFrameScriptHolder as any).nodeRestRequest(theURL);\n }\n\n // Protect from being called recursively.\n const onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n }\n\n /**\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\n * @param {!string} id - The ID of this connection\n * @param {!string} pw - The password for this connection\n */\n startLongPoll(id: string, pw: string) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) {}\n }\n\n /**\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\n * too many outstanding requests and we are still alive.\n *\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\n * needed.\n */\n private newRequest_() {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (\n this.alive &&\n this.sendNewPolls &&\n this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)\n ) {\n //construct our url\n this.currentSerial++;\n const urlParams: { [k: string]: string | number } = {};\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n let theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n let curDataString = '';\n let i = 0;\n\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n const nextSeg = this.pendingSegs[0];\n if (\n nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <=\n MAX_URL_DATA_SIZE\n ) {\n //great, the segment will fit. Lets append it.\n const theSeg = this.pendingSegs.shift();\n curDataString =\n curDataString +\n '&' +\n FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM +\n i +\n '=' +\n theSeg.seg +\n '&' +\n FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET +\n i +\n '=' +\n theSeg.ts +\n '&' +\n FIREBASE_LONGPOLL_DATA_PARAM +\n i +\n '=' +\n theSeg.d;\n i++;\n } else {\n break;\n }\n }\n\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Queue a packet for transmission to the server.\n * @param segnum - A sequential id for this packet segment used for reassembly\n * @param totalsegs - The total number of segments in this packet\n * @param data - The data for this segment.\n */\n enqueueSegment(segnum: number, totalsegs: number, data: any) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n }\n\n /**\n * Add a script tag for a regular long-poll request.\n * @param {!string} url - The URL of the script tag.\n * @param {!number} serial - The serial number of the request.\n * @private\n */\n private addLongPollTag_(url: string, serial: number) {\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n\n const doNewRequest = () => {\n this.outstandingRequests.remove(serial);\n this.newRequest_();\n };\n\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n const keepaliveTimeout = setTimeout(\n doNewRequest,\n Math.floor(KEEPALIVE_REQUEST_INTERVAL)\n );\n\n const readyStateCB = () => {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n\n this.addTag(url, readyStateCB);\n }\n\n /**\n * Add an arbitrary script tag to the iframe.\n * @param {!string} url - The URL for the script tag source.\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\n */\n addTag(url: string, loadCB: () => void) {\n if (isNodeSdk()) {\n (this as any).doNodeLongPoll(url, loadCB);\n } else {\n setTimeout(() => {\n try {\n // if we're already closed, don't add this poll\n if (!this.sendNewPolls) return;\n const newScript = this.myIFrame.doc.createElement('script');\n newScript.type = 'text/javascript';\n newScript.async = true;\n newScript.src = url;\n newScript.onload = (newScript as any).onreadystatechange = function() {\n const rstate = (newScript as any).readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript.onload = (newScript as any).onreadystatechange = null;\n if (newScript.parentNode) {\n newScript.parentNode.removeChild(newScript);\n }\n loadCB();\n }\n };\n newScript.onerror = () => {\n log('Long-poll script failed to load: ' + url);\n this.sendNewPolls = false;\n this.close();\n };\n this.myIFrame.doc.body.appendChild(newScript);\n } catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/BrowserPollConnection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { BrowserPollConnection } from './BrowserPollConnection';\nimport { WebSocketConnection } from './WebSocketConnection';\nimport { warn, each } from '../core/util/util';\nimport { TransportConstructor } from './Transport';\nimport { RepoInfo } from '../core/RepoInfo';\n\n/**\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\n * lifecycle.\n *\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\n * they are available.\n * @constructor\n */\nexport class TransportManager {\n private transports_: TransportConstructor[];\n\n /**\n * @const\n * @type {!Array.}\n */\n static get ALL_TRANSPORTS() {\n return [BrowserPollConnection, WebSocketConnection];\n }\n\n /**\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\n */\n constructor(repoInfo: RepoInfo) {\n this.initTransports_(repoInfo);\n }\n\n /**\n * @param {!RepoInfo} repoInfo\n * @private\n */\n private initTransports_(repoInfo: RepoInfo) {\n const isWebSocketsAvailable: boolean =\n WebSocketConnection && WebSocketConnection['isAvailable']();\n let isSkipPollConnection =\n isWebSocketsAvailable && !WebSocketConnection.previouslyFailed();\n\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable)\n warn(\n \"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\"\n );\n\n isSkipPollConnection = true;\n }\n\n if (isSkipPollConnection) {\n this.transports_ = [WebSocketConnection];\n } else {\n const transports = (this.transports_ = [] as TransportConstructor[]);\n each(\n TransportManager.ALL_TRANSPORTS,\n (i: number, transport: TransportConstructor) => {\n if (transport && transport['isAvailable']()) {\n transports.push(transport);\n }\n }\n );\n }\n }\n\n /**\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\n * initial transport to use\n */\n initialTransport(): TransportConstructor {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n } else {\n throw new Error('No transports available');\n }\n }\n\n /**\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\n * transport, or null\n */\n upgradeTransport(): TransportConstructor | null {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n } else {\n return null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/TransportManager.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport {\n error,\n logWrapper,\n requireKey,\n setTimeoutNonBlocking,\n warn\n} from '../core/util/util';\nimport { PersistentStorage } from '../core/storage/storage';\nimport { PROTOCOL_VERSION } from './Constants';\nimport { TransportManager } from './TransportManager';\nimport { RepoInfo } from '../core/RepoInfo';\nimport { Transport, TransportConstructor } from './Transport';\n\n// Abort upgrade attempt if it takes longer than 60s.\nconst UPGRADE_TIMEOUT = 60000;\n\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nconst DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nconst BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nconst BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\n\nconst enum RealtimeState {\n CONNECTING,\n CONNECTED,\n DISCONNECTED\n}\n\nconst MESSAGE_TYPE = 't';\nconst MESSAGE_DATA = 'd';\nconst CONTROL_SHUTDOWN = 's';\nconst CONTROL_RESET = 'r';\nconst CONTROL_ERROR = 'e';\nconst CONTROL_PONG = 'o';\nconst SWITCH_ACK = 'a';\nconst END_TRANSMISSION = 'n';\nconst PING = 'p';\n\nconst SERVER_HELLO = 'h';\n\n/**\n * Creates a new real-time connection to the server using whichever method works\n * best in the current browser.\n *\n * @constructor\n */\nexport class Connection {\n connectionCount = 0;\n pendingDataMessages: any[] = [];\n sessionId: string;\n\n private conn_: Transport;\n private healthyTimeout_: number;\n private isHealthy_: boolean;\n private log_: (...args: any[]) => void;\n private primaryResponsesRequired_: number;\n private rx_: Transport;\n private secondaryConn_: Transport;\n private secondaryResponsesRequired_: number;\n private state_ = RealtimeState.CONNECTING;\n private transportManager_: TransportManager;\n private tx_: Transport;\n\n /**\n * @param {!string} id - an id for this connection\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\n */\n constructor(\n public id: string,\n private repoInfo_: RepoInfo,\n private onMessage_: (a: Object) => void,\n private onReady_: (a: number, b: string) => void,\n private onDisconnect_: () => void,\n private onKill_: (a: string) => void,\n public lastSessionId?: string\n ) {\n this.log_ = logWrapper('c:' + this.id + ':');\n this.transportManager_ = new TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n\n /**\n * Starts a connection attempt\n * @private\n */\n private start_() {\n const conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(\n this.nextTransportId_(),\n this.repoInfo_,\n undefined,\n this.lastSessionId\n );\n\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n\n const onMessageReceived = this.connReceiver_(this.conn_);\n const onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n\n /*\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\n * still have the context of your originating frame.\n */\n setTimeout(() => {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n this.conn_ && this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n\n const healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = setTimeoutNonBlocking(() => {\n this.healthyTimeout_ = null;\n if (!this.isHealthy_) {\n if (\n this.conn_ &&\n this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE\n ) {\n this.log_(\n 'Connection exceeded healthy timeout but has received ' +\n this.conn_.bytesReceived +\n ' bytes. Marking connection healthy.'\n );\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n } else if (\n this.conn_ &&\n this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE\n ) {\n this.log_(\n 'Connection exceeded healthy timeout but has sent ' +\n this.conn_.bytesSent +\n ' bytes. Leaving connection alive.'\n );\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n } else {\n this.log_('Closing unhealthy connection after timeout.');\n this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms)) as any;\n }\n }\n\n /**\n * @return {!string}\n * @private\n */\n private nextTransportId_(): string {\n return 'c:' + this.id + ':' + this.connectionCount++;\n }\n\n private disconnReceiver_(conn) {\n return everConnected => {\n if (conn === this.conn_) {\n this.onConnectionLost_(everConnected);\n } else if (conn === this.secondaryConn_) {\n this.log_('Secondary connection lost.');\n this.onSecondaryConnectionLost_();\n } else {\n this.log_('closing an old connection');\n }\n };\n }\n\n private connReceiver_(conn: Transport) {\n return (message: object) => {\n if (this.state_ != RealtimeState.DISCONNECTED) {\n if (conn === this.rx_) {\n this.onPrimaryMessageReceived_(message);\n } else if (conn === this.secondaryConn_) {\n this.onSecondaryMessageReceived_(message);\n } else {\n this.log_('message on old connection');\n }\n }\n };\n }\n\n /**\n *\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\n */\n sendRequest(dataMsg: object) {\n // wrap in a data message envelope and send it on\n const msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n }\n\n tryCleanupConnection() {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_(\n 'cleaning up and promoting a connection: ' + this.secondaryConn_.connId\n );\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n }\n\n private onSecondaryControl_(controlData: { [k: string]: any }) {\n if (MESSAGE_TYPE in controlData) {\n const cmd = controlData[MESSAGE_TYPE] as string;\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n } else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (\n this.tx_ === this.secondaryConn_ ||\n this.rx_ === this.secondaryConn_\n ) {\n this.close();\n }\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n }\n\n private onSecondaryMessageReceived_(parsedData: object) {\n const layer: string = requireKey('t', parsedData);\n const data: any = requireKey('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n } else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n } else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n }\n\n private upgradeIfSecondaryHealthy_() {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n } else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n }\n\n private proceedWithUpgrade_() {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n\n this.tryCleanupConnection();\n }\n\n private onPrimaryMessageReceived_(parsedData: { [k: string]: any }) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n const layer: string = requireKey('t', parsedData);\n const data: any = requireKey('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n } else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n }\n\n private onDataMessage_(message: any) {\n this.onPrimaryResponse_();\n\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n }\n\n private onPrimaryResponse_() {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n }\n\n private onControl_(controlData: { [k: string]: any }) {\n const cmd: string = requireKey(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n const payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n } else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (let i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n } else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n } else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n } else if (cmd === CONTROL_ERROR) {\n error('Server Error: ' + payload);\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n } else {\n error('Unknown control packet command: ' + cmd);\n }\n }\n }\n\n /**\n *\n * @param {Object} handshake The handshake data returned from the server\n * @private\n */\n private onHandshake_(handshake: {\n ts: number;\n v: string;\n h: string;\n s: string;\n }) {\n const timestamp = handshake.ts;\n const version = handshake.v;\n const host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == RealtimeState.CONNECTING) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (PROTOCOL_VERSION !== version) {\n warn('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n }\n\n private tryStartUpgrade_() {\n const conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n }\n\n private startUpgrade_(conn: TransportConstructor) {\n this.secondaryConn_ = new conn(\n this.nextTransportId_(),\n this.repoInfo_,\n this.sessionId\n );\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ =\n conn['responsesRequiredToBeHealthy'] || 0;\n\n const onMessage = this.connReceiver_(this.secondaryConn_);\n const onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n setTimeoutNonBlocking(() => {\n if (this.secondaryConn_) {\n this.log_('Timed out trying to upgrade.');\n this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n }\n\n private onReset_(host: string) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === RealtimeState.CONNECTED) {\n this.close();\n } else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n }\n\n private onConnectionEstablished_(conn: Transport, timestamp: number) {\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = RealtimeState.CONNECTED;\n\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n } else {\n setTimeoutNonBlocking(() => {\n this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n }\n\n private sendPingOnPrimaryIfNecessary_() {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === RealtimeState.CONNECTED) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n }\n\n private onSecondaryConnectionLost_() {\n const conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n }\n\n /**\n *\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\n * we should flush the host cache\n * @private\n */\n private onConnectionLost_(everConnected: boolean) {\n this.conn_ = null;\n\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === RealtimeState.CONNECTING) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n PersistentStorage.remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n } else if (this.state_ === RealtimeState.CONNECTED) {\n this.log_('Realtime connection lost.');\n }\n\n this.close();\n }\n\n /**\n *\n * @param {string} reason\n * @private\n */\n private onConnectionShutdown_(reason: string) {\n this.log_('Connection shutdown command received. Shutting down...');\n\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n\n this.close();\n }\n\n private sendData_(data: object) {\n if (this.state_ !== RealtimeState.CONNECTED) {\n throw 'Connection is not connected';\n } else {\n this.tx_.send(data);\n }\n }\n\n /**\n * Cleans up this connection, calling the appropriate callbacks\n */\n close() {\n if (this.state_ !== RealtimeState.DISCONNECTED) {\n this.log_('Closing realtime connection.');\n this.state_ = RealtimeState.DISCONNECTED;\n\n this.closeConnections_();\n\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n }\n\n /**\n *\n * @private\n */\n private closeConnections_() {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/Connection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Query } from '../api/Query';\n\n/**\n * Interface defining the set of actions that can be performed against the Firebase server\n * (basically corresponds to our wire protocol).\n *\n * @interface\n */\nexport abstract class ServerActions {\n /**\n * @param {!Query} query\n * @param {function():string} currentHashFn\n * @param {?number} tag\n * @param {function(string, *)} onComplete\n */\n abstract listen(\n query: Query,\n currentHashFn: () => string,\n tag: number | null,\n onComplete: (a: string, b: any) => void\n ): void;\n\n /**\n * Remove a listen.\n *\n * @param {!Query} query\n * @param {?number} tag\n */\n abstract unlisten(query: Query, tag: number | null): void;\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n * @param {string=} hash\n */\n put(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void,\n hash?: string\n ) {}\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, ?string)} onComplete\n * @param {string=} hash\n */\n merge(\n pathString: string,\n data: any,\n onComplete: (a: string, b: string | null) => void,\n hash?: string\n ) {}\n\n /**\n * Refreshes the auth token for the current connection.\n * @param {string} token The authentication token\n */\n refreshAuthToken(token: string) {}\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n onDisconnectPut(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {}\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n onDisconnectMerge(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {}\n\n /**\n * @param {string} pathString\n * @param {function(string, string)=} onComplete\n */\n onDisconnectCancel(\n pathString: string,\n onComplete?: (a: string, b: string) => void\n ) {}\n\n /**\n * @param {Object.} stats\n */\n reportStats(stats: { [k: string]: any }) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/ServerActions.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport firebase from '../../app';\nimport { forEach, contains, isEmpty, getCount, safeGet } from '../../utils/obj';\nimport { stringify } from '../../utils/json';\nimport { assert } from '../../utils/assert';\nimport { error, log, logWrapper, warn, ObjectToUniqueKey } from './util/util';\nimport { Path } from './util/Path';\nimport { VisibilityMonitor } from './util/VisibilityMonitor';\nimport { OnlineMonitor } from './util/OnlineMonitor';\nimport { isAdmin, isValidFormat } from '../../utils/jwt';\nimport { Connection } from '../realtime/Connection';\nimport { CONSTANTS } from '../../utils/constants';\nimport {\n isMobileCordova,\n isReactNative,\n isNodeSdk\n} from '../../utils/environment';\nimport { ServerActions } from './ServerActions';\nimport { AuthTokenProvider } from './AuthTokenProvider';\nimport { RepoInfo } from './RepoInfo';\nimport { Query } from '../api/Query';\n\nconst RECONNECT_MIN_DELAY = 1000;\nconst RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nconst RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nconst RECONNECT_DELAY_MULTIPLIER = 1.3;\nconst RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nconst SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nconst INVALID_AUTH_TOKEN_THRESHOLD = 3;\n\ninterface ListenSpec {\n onComplete(s: string, p?: any): void;\n\n hashFn(): string;\n\n query: Query;\n tag: number | null;\n}\n\ninterface OnDisconnectRequest {\n pathString: string;\n action: string;\n data: any;\n onComplete?: (a: string, b: string) => void;\n}\n\ninterface OutstandingPut {\n action: string;\n request: Object;\n queued?: boolean;\n onComplete: (a: string, b?: string) => void;\n}\n\n/**\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\n *\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\n * in quotes to make sure the closure compiler does not minify them.\n */\nexport class PersistentConnection extends ServerActions {\n // Used for diagnostic logging.\n id = PersistentConnection.nextPersistentConnectionId_++;\n private log_ = logWrapper('p:' + this.id + ':');\n\n /** @private {Object} */\n private interruptReasons_: { [reason: string]: boolean } = {};\n private listens_: { [path: string]: { [queryId: string]: ListenSpec } } = {};\n private outstandingPuts_: OutstandingPut[] = [];\n private outstandingPutCount_ = 0;\n private onDisconnectRequestQueue_: OnDisconnectRequest[] = [];\n private connected_ = false;\n private reconnectDelay_ = RECONNECT_MIN_DELAY;\n private maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n private securityDebugCallback_: ((a: Object) => void) | null = null;\n lastSessionId: string | null = null;\n\n /** @private {number|null} */\n private establishConnectionTimer_: number | null = null;\n\n /** @private {boolean} */\n private visible_: boolean = false;\n\n // Before we get connected, we keep a queue of pending messages to send.\n private requestCBHash_: { [k: number]: (a: any) => void } = {};\n private requestNumber_ = 0;\n\n /** @private {?{\n * sendRequest(Object),\n * close()\n * }} */\n private realtime_: {\n sendRequest(a: Object): void;\n close(): void;\n } | null = null;\n\n /** @private {string|null} */\n private authToken_: string | null = null;\n private forceTokenRefresh_ = false;\n private invalidAuthTokenCount_ = 0;\n\n private firstConnection_ = true;\n private lastConnectionAttemptTime_: number | null = null;\n private lastConnectionEstablishedTime_: number | null = null;\n\n /**\n * @private\n */\n private static nextPersistentConnectionId_ = 0;\n\n /**\n * Counter for number of connections created. Mainly used for tagging in the logs\n * @type {number}\n * @private\n */\n private static nextConnectionId_ = 0;\n\n /**\n * @implements {ServerActions}\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param onConnectStatus_\n * @param onServerInfoUpdate_\n * @param authTokenProvider_\n * @param authOverride_\n */\n constructor(\n private repoInfo_: RepoInfo,\n private onDataUpdate_: (\n a: string,\n b: any,\n c: boolean,\n d: number | null\n ) => void,\n private onConnectStatus_: (a: boolean) => void,\n private onServerInfoUpdate_: (a: any) => void,\n private authTokenProvider_: AuthTokenProvider,\n private authOverride_?: Object | null\n ) {\n super();\n\n if (authOverride_ && !isNodeSdk()) {\n throw new Error(\n 'Auth override specified in options, but not supported on non Node.js platforms'\n );\n }\n this.scheduleConnect_(0);\n\n VisibilityMonitor.getInstance().on('visible', this.onVisible_, this);\n\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor.getInstance().on('online', this.onOnline_, this);\n }\n }\n\n /**\n * @param {!string} action\n * @param {*} body\n * @param {function(*)=} onResponse\n * @protected\n */\n protected sendRequest(\n action: string,\n body: any,\n onResponse?: (a: any) => void\n ) {\n const curReqNum = ++this.requestNumber_;\n\n const msg = { r: curReqNum, a: action, b: body };\n this.log_(stringify(msg));\n assert(\n this.connected_,\n \"sendRequest call when we're not connected not allowed.\"\n );\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n }\n\n /**\n * @inheritDoc\n */\n listen(\n query: Query,\n currentHashFn: () => string,\n tag: number | null,\n onComplete: (a: string, b: any) => void\n ) {\n const queryId = query.queryIdentifier();\n const pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n assert(\n query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(),\n 'listen() called for non-default but complete query'\n );\n assert(\n !this.listens_[pathString][queryId],\n 'listen() called twice for same path/queryId.'\n );\n const listenSpec: ListenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n }\n\n /**\n * @param {!{onComplete(),\n * hashFn():!string,\n * query: !Query,\n * tag: ?number}} listenSpec\n * @private\n */\n private sendListen_(listenSpec: ListenSpec) {\n const query = listenSpec.query;\n const pathString = query.path.toString();\n const queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n const req: { [k: string]: any } = { /*path*/ p: pathString };\n\n const action = 'q';\n\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n\n req[/*hash*/ 'h'] = listenSpec.hashFn();\n\n this.sendRequest(action, req, (message: { [k: string]: any }) => {\n const payload: any = message[/*data*/ 'd'];\n const status: string = message[/*status*/ 's'];\n\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n\n const currentListenSpec =\n this.listens_[pathString] && this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n this.log_('listen response', message);\n\n if (status !== 'ok') {\n this.removeListen_(pathString, queryId);\n }\n\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n }\n\n /**\n * @param {*} payload\n * @param {!Query} query\n * @private\n */\n private static warnOnListenWarnings_(payload: any, query: Query) {\n if (payload && typeof payload === 'object' && contains(payload, 'w')) {\n const warnings = safeGet(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n const indexSpec =\n '\".indexOn\": \"' + query.getQueryParams().getIndex().toString() + '\"';\n const indexPath = query.path.toString();\n warn(\n 'Using an unspecified index. Consider adding ' +\n indexSpec +\n ' at ' +\n indexPath +\n ' to your security rules for better performance'\n );\n }\n }\n }\n\n /**\n * @inheritDoc\n */\n refreshAuthToken(token: string) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n } else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, () => {});\n }\n }\n\n this.reduceReconnectDelayIfAdminCredential_(token);\n }\n\n /**\n * @param {!string} credential\n * @private\n */\n private reduceReconnectDelayIfAdminCredential_(credential: string) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n const isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || isAdmin(credential)) {\n this.log_(\n 'Admin auth credential detected. Reducing max reconnect time.'\n );\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n }\n\n /**\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\n * a auth revoked (the connection is closed).\n */\n tryAuth() {\n if (this.connected_ && this.authToken_) {\n const token = this.authToken_;\n const authMethod = isValidFormat(token) ? 'auth' : 'gauth';\n const requestData: { [k: string]: any } = { cred: token };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n } else if (typeof this.authOverride_ === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, (res: { [k: string]: any }) => {\n const status: string = res[/*status*/ 's'];\n const data: string = res[/*data*/ 'd'] || 'error';\n\n if (this.authToken_ === token) {\n if (status === 'ok') {\n this.invalidAuthTokenCount_ = 0;\n } else {\n // Triggers reconnect and force refresh for auth token\n this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n unlisten(query: Query, tag: number | null) {\n const pathString = query.path.toString();\n const queryId = query.queryIdentifier();\n\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n\n assert(\n query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(),\n 'unlisten() called for non-default but complete query'\n );\n const listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n }\n\n private sendUnlisten_(\n pathString: string,\n queryId: string,\n queryObj: Object,\n tag: number | null\n ) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n\n const req: { [k: string]: any } = { /*path*/ p: pathString };\n const action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n\n this.sendRequest(action, req);\n }\n\n /**\n * @inheritDoc\n */\n onDisconnectPut(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString,\n action: 'o',\n data,\n onComplete\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n onDisconnectMerge(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString,\n action: 'om',\n data,\n onComplete\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n onDisconnectCancel(\n pathString: string,\n onComplete?: (a: string, b: string) => void\n ) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString,\n action: 'oc',\n data: null,\n onComplete\n });\n }\n }\n\n private sendOnDisconnect_(\n action: string,\n pathString: string,\n data: any,\n onComplete: (a: string, b: string) => void\n ) {\n const request = { /*path*/ p: pathString, /*data*/ d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, (response: { [k: string]: any }) => {\n if (onComplete) {\n setTimeout(function() {\n onComplete(response[/*status*/ 's'], response[/* data */ 'd']);\n }, Math.floor(0));\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n put(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void,\n hash?: string\n ) {\n this.putInternal('p', pathString, data, onComplete, hash);\n }\n\n /**\n * @inheritDoc\n */\n merge(\n pathString: string,\n data: any,\n onComplete: (a: string, b: string | null) => void,\n hash?: string\n ) {\n this.putInternal('m', pathString, data, onComplete, hash);\n }\n\n putInternal(\n action: string,\n pathString: string,\n data: any,\n onComplete: (a: string, b: string | null) => void,\n hash?: string\n ) {\n const request: { [k: string]: any } = {\n /*path*/ p: pathString,\n /*data*/ d: data\n };\n\n if (hash !== undefined) request[/*hash*/ 'h'] = hash;\n\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action,\n request,\n onComplete\n });\n\n this.outstandingPutCount_++;\n const index = this.outstandingPuts_.length - 1;\n\n if (this.connected_) {\n this.sendPut_(index);\n } else {\n this.log_('Buffering put: ' + pathString);\n }\n }\n\n private sendPut_(index: number) {\n const action = this.outstandingPuts_[index].action;\n const request = this.outstandingPuts_[index].request;\n const onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n\n this.sendRequest(action, request, (message: { [k: string]: any }) => {\n this.log_(action + ' response', message);\n\n delete this.outstandingPuts_[index];\n this.outstandingPutCount_--;\n\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0) {\n this.outstandingPuts_ = [];\n }\n\n if (onComplete)\n onComplete(message[/*status*/ 's'], message[/* data */ 'd']);\n });\n }\n\n /**\n * @inheritDoc\n */\n reportStats(stats: { [k: string]: any }) {\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n const request = { /*counters*/ c: stats };\n this.log_('reportStats', request);\n\n this.sendRequest(/*stats*/ 's', request, result => {\n const status = result[/*status*/ 's'];\n if (status !== 'ok') {\n const errorReason = result[/* data */ 'd'];\n this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n }\n\n /**\n * @param {*} message\n * @private\n */\n private onDataMessage_(message: { [k: string]: any }) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + stringify(message));\n const reqNum = message['r'];\n const onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message[/*body*/ 'b']);\n }\n } else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n } else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n }\n\n private onDataPush_(action: string, body: { [k: string]: any }) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd')\n this.onDataUpdate_(\n body[/*path*/ 'p'],\n body[/*data*/ 'd'],\n /*isMerge*/ false,\n body['t']\n );\n else if (action === 'm')\n this.onDataUpdate_(\n body[/*path*/ 'p'],\n body[/*data*/ 'd'],\n /*isMerge=*/ true,\n body['t']\n );\n else if (action === 'c')\n this.onListenRevoked_(body[/*path*/ 'p'], body[/*query*/ 'q']);\n else if (action === 'ac')\n this.onAuthRevoked_(\n body[/*status code*/ 's'],\n body[/* explanation */ 'd']\n );\n else if (action === 'sd') this.onSecurityDebugPacket_(body);\n else\n error(\n 'Unrecognized action received from server: ' +\n stringify(action) +\n '\\nAre you using the latest client?'\n );\n }\n\n private onReady_(timestamp: number, sessionId: string) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n }\n\n private scheduleConnect_(timeout: number) {\n assert(\n !this.realtime_,\n \"Scheduling a connect when we're already connected/ing?\"\n );\n\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n\n this.establishConnectionTimer_ = setTimeout(() => {\n this.establishConnectionTimer_ = null;\n this.establishConnection_();\n }, Math.floor(timeout)) as any;\n }\n\n /**\n * @param {boolean} visible\n * @private\n */\n private onVisible_(visible: boolean) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (\n visible &&\n !this.visible_ &&\n this.reconnectDelay_ === this.maxReconnectDelay_\n ) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n }\n\n private onOnline_(online: boolean) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n } else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n }\n\n private onRealtimeDisconnect_() {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n } else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n const timeSinceLastConnectSucceeded =\n new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT)\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n\n const timeSinceLastConnectAttempt =\n new Date().getTime() - this.lastConnectionAttemptTime_;\n let reconnectDelay = Math.max(\n 0,\n this.reconnectDelay_ - timeSinceLastConnectAttempt\n );\n reconnectDelay = Math.random() * reconnectDelay;\n\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(\n this.maxReconnectDelay_,\n this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER\n );\n }\n this.onConnectStatus_(false);\n }\n\n private establishConnection_() {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n const onDataMessage = this.onDataMessage_.bind(this);\n const onReady = this.onReady_.bind(this);\n const onDisconnect = this.onRealtimeDisconnect_.bind(this);\n const connId = this.id + ':' + PersistentConnection.nextConnectionId_++;\n const self = this;\n const lastSessionId = this.lastSessionId;\n let canceled = false;\n let connection: Connection | null = null;\n const closeFn = function() {\n if (connection) {\n connection.close();\n } else {\n canceled = true;\n onDisconnect();\n }\n };\n const sendRequestFn = function(msg: Object) {\n assert(\n connection,\n \"sendRequest call when we're not connected not allowed.\"\n );\n connection.sendRequest(msg);\n };\n\n this.realtime_ = {\n close: closeFn,\n sendRequest: sendRequestFn\n };\n\n const forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_\n .getToken(forceRefresh)\n .then(function(result) {\n if (!canceled) {\n log('getToken() completed. Creating connection.');\n self.authToken_ = result && result.accessToken;\n connection = new Connection(\n connId,\n self.repoInfo_,\n onDataMessage,\n onReady,\n onDisconnect,\n /* onKill= */ function(reason) {\n warn(reason + ' (' + self.repoInfo_.toString() + ')');\n self.interrupt(SERVER_KILL_INTERRUPT_REASON);\n },\n lastSessionId\n );\n } else {\n log('getToken() completed but was canceled');\n }\n })\n .then(null, function(error) {\n self.log_('Failed to get token: ' + error);\n if (!canceled) {\n if (CONSTANTS.NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n warn(error);\n }\n closeFn();\n }\n });\n }\n }\n\n /**\n * @param {string} reason\n */\n interrupt(reason: string) {\n log('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n } else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n }\n\n /**\n * @param {string} reason\n */\n resume(reason: string) {\n log('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (isEmpty(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n }\n\n private handleTimestamp_(timestamp: number) {\n const delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n }\n\n private cancelSentTransactions_() {\n for (let i = 0; i < this.outstandingPuts_.length; i++) {\n const put = this.outstandingPuts_[i];\n if (put && /*hash*/ 'h' in put.request && put.queued) {\n if (put.onComplete) put.onComplete('disconnect');\n\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0) this.outstandingPuts_ = [];\n }\n\n /**\n * @param {!string} pathString\n * @param {Array.<*>=} query\n * @private\n */\n private onListenRevoked_(pathString: string, query?: any[]) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n let queryId;\n if (!query) {\n queryId = 'default';\n } else {\n queryId = query.map(q => ObjectToUniqueKey(q)).join('$');\n }\n const listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete) listen.onComplete('permission_denied');\n }\n\n /**\n * @param {!string} pathString\n * @param {!string} queryId\n * @return {{queries:Array., onComplete:function(string)}}\n * @private\n */\n private removeListen_(pathString: string, queryId: string): ListenSpec {\n const normalizedPathString = new Path(pathString).toString(); // normalize path.\n let listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (getCount(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n } else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n }\n\n private onAuthRevoked_(statusCode: string, explanation: string) {\n log('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n }\n\n private onSecurityDebugPacket_(body: { [k: string]: any }) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n } else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n }\n\n private restoreState_() {\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n forEach(this.listens_, (pathString: string, queries: Object) => {\n forEach(queries, (key: string, listenSpec: ListenSpec) => {\n this.sendListen_(listenSpec);\n });\n });\n\n for (let i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i]) this.sendPut_(i);\n }\n\n while (this.onDisconnectRequestQueue_.length) {\n const request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(\n request.action,\n request.pathString,\n request.data,\n request.onComplete\n );\n }\n }\n\n /**\n * Sends client stats for first connection\n * @private\n */\n private sendConnectStats_() {\n const stats: { [k: string]: number } = {};\n\n let clientName = 'js';\n if (CONSTANTS.NODE_ADMIN) {\n clientName = 'admin_node';\n } else if (CONSTANTS.NODE_CLIENT) {\n clientName = 'node';\n }\n\n stats[\n 'sdk.' + clientName + '.' + firebase.SDK_VERSION.replace(/\\./g, '-')\n ] = 1;\n\n if (isMobileCordova()) {\n stats['framework.cordova'] = 1;\n } else if (isReactNative()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n }\n\n /**\n * @return {boolean}\n * @private\n */\n private shouldReconnect_(): boolean {\n const online = OnlineMonitor.getInstance().currentlyOnline();\n return isEmpty(this.interruptReasons_) && online;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/PersistentConnection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { forEach } from './obj';\n\n/**\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a params\n * object (e.g. {arg: 'val', arg2: 'val2'})\n * Note: You must prepend it with ? when adding it to a URL.\n *\n * @param {!Object} querystringParams\n * @return {string}\n */\nexport const querystring = function(querystringParams) {\n var params = [];\n forEach(querystringParams, function(key, value) {\n if (Array.isArray(value)) {\n value.forEach(function(arrayVal) {\n params.push(\n encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal)\n );\n });\n } else {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n });\n return params.length ? '&' + params.join('&') : '';\n};\n\n/**\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object (e.g. {arg: 'val', arg2: 'val2'})\n *\n * @param {string} querystring\n * @return {!Object}\n */\nexport const querystringDecode = function(querystring) {\n var obj = {};\n var tokens = querystring.replace(/^\\?/, '').split('&');\n\n tokens.forEach(function(token) {\n if (token) {\n var key = token.split('=');\n obj[key[0]] = key[1];\n }\n });\n return obj;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/util.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { logWrapper, warn } from './util/util';\nimport { jsonEval } from '../../utils/json';\nimport { safeGet } from '../../utils/obj';\nimport { querystring } from '../../utils/util';\nimport { ServerActions } from './ServerActions';\nimport { RepoInfo } from './RepoInfo';\nimport { AuthTokenProvider } from './AuthTokenProvider';\nimport { Query } from '../api/Query';\n\n/**\n * An implementation of ServerActions that communicates with the server via REST requests.\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\n * persistent connection (using WebSockets or long-polling)\n */\nexport class ReadonlyRestClient extends ServerActions {\n reportStats(stats: { [k: string]: any }): void {\n throw new Error('Method not implemented.');\n }\n\n /** @private {function(...[*])} */\n private log_: (...args: any[]) => void = logWrapper('p:rest:');\n\n /**\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\n * that's been removed. :-/\n *\n * @private {!Object.}\n */\n private listens_: { [k: string]: Object } = {};\n\n /**\n * @param {!Query} query\n * @param {?number=} tag\n * @return {string}\n * @private\n */\n static getListenId_(query: Query, tag?: number | null): string {\n if (tag !== undefined) {\n return 'tag$' + tag;\n } else {\n assert(\n query.getQueryParams().isDefault(),\n \"should have a tag if it's not a default query.\"\n );\n return query.path.toString();\n }\n }\n\n /**\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param {AuthTokenProvider} authTokenProvider_\n * @implements {ServerActions}\n */\n constructor(\n private repoInfo_: RepoInfo,\n private onDataUpdate_: (\n a: string,\n b: any,\n c: boolean,\n d: number | null\n ) => void,\n private authTokenProvider_: AuthTokenProvider\n ) {\n super();\n }\n\n /** @inheritDoc */\n listen(\n query: Query,\n currentHashFn: () => string,\n tag: number | null,\n onComplete: (a: string, b: any) => void\n ) {\n const pathString = query.path.toString();\n this.log_(\n 'Listen called for ' + pathString + ' ' + query.queryIdentifier()\n );\n\n // Mark this listener so we can tell if it's removed.\n const listenId = ReadonlyRestClient.getListenId_(query, tag);\n const thisListen = {};\n this.listens_[listenId] = thisListen;\n\n const queryStringParamaters = query\n .getQueryParams()\n .toRestQueryStringParameters();\n\n this.restRequest_(\n pathString + '.json',\n queryStringParamaters,\n (error, result) => {\n let data = result;\n\n if (error === 404) {\n data = null;\n error = null;\n }\n\n if (error === null) {\n this.onDataUpdate_(pathString, data, /*isMerge=*/ false, tag);\n }\n\n if (safeGet(this.listens_, listenId) === thisListen) {\n let status;\n if (!error) {\n status = 'ok';\n } else if (error == 401) {\n status = 'permission_denied';\n } else {\n status = 'rest_error:' + error;\n }\n\n onComplete(status, null);\n }\n }\n );\n }\n\n /** @inheritDoc */\n unlisten(query: Query, tag: number | null) {\n const listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n }\n\n /** @inheritDoc */\n refreshAuthToken(token: string) {\n // no-op since we just always call getToken.\n }\n\n /**\n * Performs a REST request to the given path, with the provided query string parameters,\n * and any auth credentials we have.\n *\n * @param {!string} pathString\n * @param {!Object.} queryStringParameters\n * @param {?function(?number, *=)} callback\n * @private\n */\n private restRequest_(\n pathString: string,\n queryStringParameters: { [k: string]: any } = {},\n callback: ((a: number | null, b?: any) => void) | null\n ) {\n queryStringParameters['format'] = 'export';\n\n this.authTokenProvider_\n .getToken(/*forceRefresh=*/ false)\n .then(authTokenData => {\n const authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n\n const url =\n (this.repoInfo_.secure ? 'https://' : 'http://') +\n this.repoInfo_.host +\n pathString +\n '?' +\n querystring(queryStringParameters);\n\n this.log_('Sending REST request for ' + url);\n const xhr = new XMLHttpRequest();\n xhr.onreadystatechange = () => {\n if (callback && xhr.readyState === 4) {\n this.log_(\n 'REST Response for ' + url + ' received. status:',\n xhr.status,\n 'response:',\n xhr.responseText\n );\n let res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = jsonEval(xhr.responseText);\n } catch (e) {\n warn(\n 'Failed to parse JSON response for ' +\n url +\n ': ' +\n xhr.responseText\n );\n }\n callback(null, res);\n } else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n warn(\n 'Got unsuccessful REST response for ' +\n url +\n ' Status: ' +\n xhr.status\n );\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n\n xhr.open('GET', url, /*asynchronous=*/ true);\n xhr.send();\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/ReadonlyRestClient.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport {\n generateWithValues,\n resolveDeferredValueSnapshot,\n resolveDeferredValueTree\n} from './util/ServerValues';\nimport { nodeFromJSON } from './snap/nodeFromJSON';\nimport { Path } from './util/Path';\nimport { SparseSnapshotTree } from './SparseSnapshotTree';\nimport { SyncTree } from './SyncTree';\nimport { SnapshotHolder } from './SnapshotHolder';\nimport { stringify } from '../../utils/json';\nimport { beingCrawled, each, exceptionGuard, warn, log } from './util/util';\nimport { map, forEach, isEmpty } from '../../utils/obj';\nimport { AuthTokenProvider } from './AuthTokenProvider';\nimport { StatsManager } from './stats/StatsManager';\nimport { StatsReporter } from './stats/StatsReporter';\nimport { StatsListener } from './stats/StatsListener';\nimport { EventQueue } from './view/EventQueue';\nimport { PersistentConnection } from './PersistentConnection';\nimport { ReadonlyRestClient } from './ReadonlyRestClient';\nimport { FirebaseApp } from '../../app/firebase_app';\nimport { RepoInfo } from './RepoInfo';\nimport { Database } from '../api/Database';\nimport { ServerActions } from './ServerActions';\nimport { Query } from '../api/Query';\nimport { EventRegistration } from './view/EventRegistration';\nimport { StatsCollection } from './stats/StatsCollection';\nimport { Event } from './view/Event';\nimport { Node } from './snap/Node';\n\nconst INTERRUPT_REASON = 'repo_interrupt';\n\n/**\n * A connection to a single data repository.\n */\nexport class Repo {\n dataUpdateCount = 0;\n private infoSyncTree_: SyncTree;\n private serverSyncTree_: SyncTree;\n\n private stats_: StatsCollection;\n private statsListener_: StatsListener | null = null;\n private eventQueue_ = new EventQueue();\n private nextWriteId_ = 1;\n private server_: ServerActions;\n private statsReporter_: StatsReporter;\n private transactions_init_: () => void;\n private infoData_: SnapshotHolder;\n private abortTransactions_: (path: Path) => Path;\n private rerunTransactions_: (changedPath: Path) => Path;\n private interceptServerDataCallback_:\n | ((a: string, b: any) => void)\n | null = null;\n private __database: Database;\n\n // A list of data pieces and paths to be set when this client disconnects.\n private onDisconnect_ = new SparseSnapshotTree();\n\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @type {?PersistentConnection}\n */\n persistentConnection_: PersistentConnection | null = null;\n\n /**\n * @param {!RepoInfo} repoInfo_\n * @param {boolean} forceRestClient\n * @param {!FirebaseApp} app\n */\n constructor(\n private repoInfo_: RepoInfo,\n forceRestClient: boolean,\n public app: FirebaseApp\n ) {\n /** @type {!AuthTokenProvider} */\n const authTokenProvider = new AuthTokenProvider(app);\n\n this.stats_ = StatsManager.getCollection(repoInfo_);\n\n if (forceRestClient || beingCrawled()) {\n this.server_ = new ReadonlyRestClient(\n this.repoInfo_,\n this.onDataUpdate_.bind(this),\n authTokenProvider\n );\n\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n } else {\n const authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if (typeof authOverride !== 'object') {\n throw new Error(\n 'Only objects are supported for option databaseAuthVariableOverride'\n );\n }\n try {\n stringify(authOverride);\n } catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n\n this.persistentConnection_ = new PersistentConnection(\n this.repoInfo_,\n this.onDataUpdate_.bind(this),\n this.onConnectStatus_.bind(this),\n this.onServerInfoUpdate_.bind(this),\n authTokenProvider,\n authOverride\n );\n\n this.server_ = this.persistentConnection_;\n }\n\n authTokenProvider.addTokenChangeListener(token => {\n this.server_.refreshAuthToken(token);\n });\n\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = StatsManager.getOrCreateReporter(\n repoInfo_,\n () => new StatsReporter(this.stats_, this.server_)\n );\n\n this.transactions_init_();\n\n // Used for .info.\n this.infoData_ = new SnapshotHolder();\n this.infoSyncTree_ = new SyncTree({\n startListening: (query, tag, currentHashFn, onComplete) => {\n let infoEvents: Event[] = [];\n const node = this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = this.infoSyncTree_.applyServerOverwrite(\n query.path,\n node\n );\n setTimeout(() => {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: () => {}\n });\n this.updateInfo_('connected', false);\n\n this.serverSyncTree_ = new SyncTree({\n startListening: (query, tag, currentHashFn, onComplete) => {\n this.server_.listen(query, currentHashFn, tag, (status, data) => {\n const events = onComplete(status, data);\n this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: (query, tag) => {\n this.server_.unlisten(query, tag);\n }\n });\n }\n\n /**\n * @return {string} The URL corresponding to the root of this Firebase.\n */\n toString(): string {\n return (\n (this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host\n );\n }\n\n /**\n * @return {!string} The namespace represented by the repo.\n */\n name(): string {\n return this.repoInfo_.namespace;\n }\n\n /**\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\n */\n serverTime(): number {\n const offsetNode = this.infoData_.getNode(\n new Path('.info/serverTimeOffset')\n );\n const offset = (offsetNode.val() as number) || 0;\n return new Date().getTime() + offset;\n }\n\n /**\n * Generate ServerValues using some variables from the repo object.\n * @return {!Object}\n */\n generateServerValues(): Object {\n return generateWithValues({\n timestamp: this.serverTime()\n });\n }\n\n /**\n * Called by realtime when we get new messages from the server.\n *\n * @private\n * @param {string} pathString\n * @param {*} data\n * @param {boolean} isMerge\n * @param {?number} tag\n */\n private onDataUpdate_(\n pathString: string,\n data: any,\n isMerge: boolean,\n tag: number | null\n ) {\n // For testing.\n this.dataUpdateCount++;\n const path = new Path(pathString);\n data = this.interceptServerDataCallback_\n ? this.interceptServerDataCallback_(pathString, data)\n : data;\n let events = [];\n if (tag) {\n if (isMerge) {\n const taggedChildren = map(data as { [k: string]: any }, (raw: any) =>\n nodeFromJSON(raw)\n );\n events = this.serverSyncTree_.applyTaggedQueryMerge(\n path,\n taggedChildren,\n tag\n );\n } else {\n const taggedSnap = nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(\n path,\n taggedSnap,\n tag\n );\n }\n } else if (isMerge) {\n const changedChildren = map(data as { [k: string]: any }, (raw: any) =>\n nodeFromJSON(raw)\n );\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n } else {\n const snap = nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n let affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n }\n\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @param {?function(!string, *):*} callback\n * @private\n */\n interceptServerData_(callback: ((a: string, b: any) => any) | null) {\n this.interceptServerDataCallback_ = callback;\n }\n\n /**\n * @param {!boolean} connectStatus\n * @private\n */\n private onConnectStatus_(connectStatus: boolean) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n }\n\n /**\n * @param {!Object} updates\n * @private\n */\n private onServerInfoUpdate_(updates: Object) {\n each(updates, (value: any, key: string) => {\n this.updateInfo_(key, value);\n });\n }\n\n /**\n *\n * @param {!string} pathString\n * @param {*} value\n * @private\n */\n private updateInfo_(pathString: string, value: any) {\n const path = new Path('/.info/' + pathString);\n const newNode = nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n const events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n }\n\n /**\n * @return {!number}\n * @private\n */\n private getNextWriteId_(): number {\n return this.nextWriteId_++;\n }\n\n /**\n * @param {!Path} path\n * @param {*} newVal\n * @param {number|string|null} newPriority\n * @param {?function(?Error, *=)} onComplete\n */\n setWithPriority(\n path: Path,\n newVal: any,\n newPriority: number | string | null,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n const serverValues = this.generateServerValues();\n const newNodeUnresolved = nodeFromJSON(newVal, newPriority);\n const newNode = resolveDeferredValueSnapshot(\n newNodeUnresolved,\n serverValues\n );\n\n const writeId = this.getNextWriteId_();\n const events = this.serverSyncTree_.applyUserOverwrite(\n path,\n newNode,\n writeId,\n true\n );\n this.eventQueue_.queueEvents(events);\n this.server_.put(\n path.toString(),\n newNodeUnresolved.val(/*export=*/ true),\n (status, errorReason) => {\n const success = status === 'ok';\n if (!success) {\n warn('set at ' + path + ' failed: ' + status);\n }\n\n const clearEvents = this.serverSyncTree_.ackUserWrite(\n writeId,\n !success\n );\n this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n const affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n }\n\n /**\n * @param {!Path} path\n * @param {!Object} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n update(\n path: Path,\n childrenToMerge: { [k: string]: any },\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n\n // Start with our existing data and merge each child into it.\n let empty = true;\n const serverValues = this.generateServerValues();\n const changedChildren: { [k: string]: Node } = {};\n forEach(childrenToMerge, (changedKey: string, changedValue: any) => {\n empty = false;\n const newNodeUnresolved = nodeFromJSON(changedValue);\n changedChildren[changedKey] = resolveDeferredValueSnapshot(\n newNodeUnresolved,\n serverValues\n );\n });\n\n if (!empty) {\n const writeId = this.getNextWriteId_();\n const events = this.serverSyncTree_.applyUserMerge(\n path,\n changedChildren,\n writeId\n );\n this.eventQueue_.queueEvents(events);\n this.server_.merge(\n path.toString(),\n childrenToMerge,\n (status, errorReason) => {\n const success = status === 'ok';\n if (!success) {\n warn('update at ' + path + ' failed: ' + status);\n }\n\n const clearEvents = this.serverSyncTree_.ackUserWrite(\n writeId,\n !success\n );\n const affectedPath =\n clearEvents.length > 0 ? this.rerunTransactions_(path) : path;\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n\n forEach(childrenToMerge, (changedPath: string) => {\n const affectedPath = this.abortTransactions_(path.child(changedPath));\n this.rerunTransactions_(affectedPath);\n });\n\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n } else {\n log(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n }\n\n /**\n * Applies all of the changes stored up in the onDisconnect_ tree.\n * @private\n */\n private runOnDisconnectEvents_() {\n this.log_('onDisconnectEvents');\n\n const serverValues = this.generateServerValues();\n const resolvedOnDisconnectTree = resolveDeferredValueTree(\n this.onDisconnect_,\n serverValues\n );\n let events: Event[] = [];\n\n resolvedOnDisconnectTree.forEachTree(Path.Empty, (path, snap) => {\n events = events.concat(\n this.serverSyncTree_.applyServerOverwrite(path, snap)\n );\n const affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n });\n\n this.onDisconnect_ = new SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path.Empty, events);\n }\n\n /**\n * @param {!Path} path\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectCancel(\n path: Path,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n this.server_.onDisconnectCancel(path.toString(), (status, errorReason) => {\n if (status === 'ok') {\n this.onDisconnect_.forget(path);\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n }\n\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectSet(\n path: Path,\n value: any,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n const newNode = nodeFromJSON(value);\n this.server_.onDisconnectPut(\n path.toString(),\n newNode.val(/*export=*/ true),\n (status, errorReason) => {\n if (status === 'ok') {\n this.onDisconnect_.remember(path, newNode);\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n }\n\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {*} priority\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectSetWithPriority(\n path: Path,\n value: any,\n priority: any,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n const newNode = nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(\n path.toString(),\n newNode.val(/*export=*/ true),\n (status, errorReason) => {\n if (status === 'ok') {\n this.onDisconnect_.remember(path, newNode);\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n }\n\n /**\n * @param {!Path} path\n * @param {*} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectUpdate(\n path: Path,\n childrenToMerge: { [k: string]: any },\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n if (isEmpty(childrenToMerge)) {\n log(\n \"onDisconnect().update() called with empty data. Don't do anything.\"\n );\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n\n this.server_.onDisconnectMerge(\n path.toString(),\n childrenToMerge,\n (status, errorReason) => {\n if (status === 'ok') {\n forEach(childrenToMerge, (childName: string, childNode: any) => {\n const newChildNode = nodeFromJSON(childNode);\n this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n }\n\n /**\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n */\n addEventCallbackForQuery(query: Query, eventRegistration: EventRegistration) {\n let events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(\n query,\n eventRegistration\n );\n } else {\n events = this.serverSyncTree_.addEventRegistration(\n query,\n eventRegistration\n );\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n }\n\n /**\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration\n */\n removeEventCallbackForQuery(\n query: Query,\n eventRegistration: EventRegistration\n ) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n let events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(\n query,\n eventRegistration\n );\n } else {\n events = this.serverSyncTree_.removeEventRegistration(\n query,\n eventRegistration\n );\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n }\n\n interrupt() {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n }\n\n resume() {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n }\n\n stats(showDelta: boolean = false) {\n if (typeof console === 'undefined') return;\n\n let stats: { [k: string]: any };\n if (showDelta) {\n if (!this.statsListener_)\n this.statsListener_ = new StatsListener(this.stats_);\n stats = this.statsListener_.get();\n } else {\n stats = this.stats_.get();\n }\n\n const longestName = Object.keys(stats).reduce(\n (previousValue, currentValue) =>\n Math.max(currentValue.length, previousValue),\n 0\n );\n\n forEach(stats, (stat: string, value: any) => {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (let i = stat.length; i < longestName + 2; i++) stat += ' ';\n console.log(stat + value);\n });\n }\n\n statsIncrementCounter(metric: string) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n }\n\n /**\n * @param {...*} var_args\n * @private\n */\n private log_(...var_args: any[]) {\n let prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n log(prefix, ...var_args);\n }\n\n /**\n * @param {?function(?Error, *=)} callback\n * @param {!string} status\n * @param {?string=} errorReason\n */\n callOnCompleteCallback(\n callback: ((status: Error | null, errorReason?: string) => void) | null,\n status: string,\n errorReason?: string | null\n ) {\n if (callback) {\n exceptionGuard(function() {\n if (status == 'ok') {\n callback(null);\n } else {\n const code = (status || 'error').toUpperCase();\n let message = code;\n if (errorReason) message += ': ' + errorReason;\n\n const error = new Error(message);\n (error as any).code = code;\n callback(error);\n }\n });\n }\n }\n\n get database(): Database {\n return this.__database || (this.__database = new Database(this));\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/Repo.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { IndexedFilter } from './IndexedFilter';\nimport { PRIORITY_INDEX } from '../../snap/indexes/PriorityIndex';\nimport { NamedNode, Node } from '../../../core/snap/Node';\nimport { ChildrenNode } from '../../snap/ChildrenNode';\nimport { NodeFilter } from './NodeFilter';\nimport { QueryParams } from '../QueryParams';\nimport { Index } from '../../snap/indexes/Index';\nimport { Path } from '../../util/Path';\nimport { CompleteChildSource } from '../CompleteChildSource';\nimport { ChildChangeAccumulator } from '../ChildChangeAccumulator';\n\n/**\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\n *\n * @constructor\n * @implements {NodeFilter}\n */\nexport class RangedFilter implements NodeFilter {\n /**\n * @type {!IndexedFilter}\n * @const\n * @private\n */\n private indexedFilter_: IndexedFilter;\n\n /**\n * @const\n * @type {!Index}\n * @private\n */\n private index_: Index;\n\n /**\n * @const\n * @type {!NamedNode}\n * @private\n */\n private startPost_: NamedNode;\n\n /**\n * @const\n * @type {!NamedNode}\n * @private\n */\n private endPost_: NamedNode;\n\n /**\n * @param {!QueryParams} params\n */\n constructor(params: QueryParams) {\n this.indexedFilter_ = new IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n\n /**\n * @return {!NamedNode}\n */\n getStartPost(): NamedNode {\n return this.startPost_;\n }\n\n /**\n * @return {!NamedNode}\n */\n getEndPost(): NamedNode {\n return this.endPost_;\n }\n\n /**\n * @param {!NamedNode} node\n * @return {boolean}\n */\n matches(node: NamedNode): boolean {\n return (\n this.index_.compare(this.getStartPost(), node) <= 0 &&\n this.index_.compare(node, this.getEndPost()) <= 0\n );\n }\n\n /**\n * @inheritDoc\n */\n updateChild(\n snap: Node,\n key: string,\n newChild: Node,\n affectedPath: Path,\n source: CompleteChildSource,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (!this.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(\n snap,\n key,\n newChild,\n affectedPath,\n source,\n optChangeAccumulator\n );\n }\n\n /**\n * @inheritDoc\n */\n updateFullNode(\n oldSnap: Node,\n newSnap: Node,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode.EMPTY_NODE;\n }\n let filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode.EMPTY_NODE);\n const self = this;\n newSnap.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n if (!self.matches(new NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(\n oldSnap,\n filtered,\n optChangeAccumulator\n );\n }\n\n /**\n * @inheritDoc\n */\n updatePriority(oldSnap: Node, newPriority: Node): Node {\n // Don't support priorities on queries\n return oldSnap;\n }\n\n /**\n * @inheritDoc\n */\n filtersNodes(): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n getIndexedFilter(): IndexedFilter {\n return this.indexedFilter_;\n }\n\n /**\n * @inheritDoc\n */\n getIndex(): Index {\n return this.index_;\n }\n\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n private static getStartPost_(params: QueryParams): NamedNode {\n if (params.hasStart()) {\n const startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n } else {\n return params.getIndex().minPost();\n }\n }\n\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n private static getEndPost_(params: QueryParams): NamedNode {\n if (params.hasEnd()) {\n const endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n } else {\n return params.getIndex().maxPost();\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/filter/RangedFilter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { RangedFilter } from './RangedFilter';\nimport { ChildrenNode } from '../../snap/ChildrenNode';\nimport { Node, NamedNode } from '../../snap/Node';\nimport { assert } from '../../../../utils/assert';\nimport { Change } from '../Change';\nimport { NodeFilter } from './NodeFilter';\nimport { Index } from '../../snap/indexes/Index';\nimport { IndexedFilter } from './IndexedFilter';\nimport { QueryParams } from '../QueryParams';\nimport { Path } from '../../util/Path';\nimport { CompleteChildSource } from '../CompleteChildSource';\nimport { ChildChangeAccumulator } from '../ChildChangeAccumulator';\n\n/**\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\n *\n * @constructor\n * @implements {NodeFilter}\n */\nexport class LimitedFilter implements NodeFilter {\n /**\n * @const\n * @type {RangedFilter}\n * @private\n */\n private readonly rangedFilter_: RangedFilter;\n\n /**\n * @const\n * @type {!Index}\n * @private\n */\n private readonly index_: Index;\n\n /**\n * @const\n * @type {number}\n * @private\n */\n private readonly limit_: number;\n\n /**\n * @const\n * @type {boolean}\n * @private\n */\n private readonly reverse_: boolean;\n\n /**\n * @param {!QueryParams} params\n */\n constructor(params: QueryParams) {\n this.rangedFilter_ = new RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n\n /**\n * @inheritDoc\n */\n updateChild(\n snap: Node,\n key: string,\n newChild: Node,\n affectedPath: Path,\n source: CompleteChildSource,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (!this.rangedFilter_.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n } else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_\n .getIndexedFilter()\n .updateChild(\n snap,\n key,\n newChild,\n affectedPath,\n source,\n optChangeAccumulator\n );\n } else {\n return this.fullLimitUpdateChild_(\n snap,\n key,\n newChild,\n source,\n optChangeAccumulator\n );\n }\n }\n\n /**\n * @inheritDoc\n */\n updateFullNode(\n oldSnap: Node,\n newSnap: Node,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n let filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n } else {\n if (\n this.limit_ * 2 < newSnap.numChildren() &&\n newSnap.isIndexed(this.index_)\n ) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n let iterator;\n if (this.reverse_) {\n iterator = (newSnap as ChildrenNode).getReverseIteratorFrom(\n this.rangedFilter_.getEndPost(),\n this.index_\n );\n } else {\n iterator = (newSnap as ChildrenNode).getIteratorFrom(\n this.rangedFilter_.getStartPost(),\n this.index_\n );\n }\n let count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n const next = iterator.getNext();\n let inRange;\n if (this.reverse_) {\n inRange =\n this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n } else {\n inRange =\n this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n } else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n } else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(\n ChildrenNode.EMPTY_NODE\n ) as ChildrenNode;\n let startPost;\n let endPost;\n let cmp;\n let iterator;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n const indexCompare = this.index_.getCompare();\n cmp = (a: NamedNode, b: NamedNode) => indexCompare(b, a);\n } else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n\n let count = 0;\n let foundStartPost = false;\n while (iterator.hasNext()) {\n let next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n let inRange =\n foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n } else {\n filtered = filtered.updateImmediateChild(\n next.name,\n ChildrenNode.EMPTY_NODE\n );\n }\n }\n }\n }\n return this.rangedFilter_\n .getIndexedFilter()\n .updateFullNode(oldSnap, filtered, optChangeAccumulator);\n }\n\n /**\n * @inheritDoc\n */\n updatePriority(oldSnap: Node, newPriority: Node): Node {\n // Don't support priorities on queries\n return oldSnap;\n }\n\n /**\n * @inheritDoc\n */\n filtersNodes(): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n getIndexedFilter(): IndexedFilter {\n return this.rangedFilter_.getIndexedFilter();\n }\n\n /**\n * @inheritDoc\n */\n getIndex(): Index {\n return this.index_;\n }\n\n /**\n * @param {!Node} snap\n * @param {string} childKey\n * @param {!Node} childSnap\n * @param {!CompleteChildSource} source\n * @param {?ChildChangeAccumulator} changeAccumulator\n * @return {!Node}\n * @private\n */\n private fullLimitUpdateChild_(\n snap: Node,\n childKey: string,\n childSnap: Node,\n source: CompleteChildSource,\n changeAccumulator: ChildChangeAccumulator | null\n ): Node {\n // TODO: rename all cache stuff etc to general snap terminology\n let cmp;\n if (this.reverse_) {\n const indexCmp = this.index_.getCompare();\n cmp = (a: NamedNode, b: NamedNode) => indexCmp(b, a);\n } else {\n cmp = this.index_.getCompare();\n }\n const oldEventCache = snap as ChildrenNode;\n assert(oldEventCache.numChildren() == this.limit_, '');\n const newChildNamedNode = new NamedNode(childKey, childSnap);\n const windowBoundary = this.reverse_\n ? oldEventCache.getFirstChild(this.index_)\n : oldEventCache.getLastChild(this.index_) as NamedNode;\n const inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n const oldChildSnap = oldEventCache.getImmediateChild(childKey);\n let nextChild = source.getChildAfterChild(\n this.index_,\n windowBoundary,\n this.reverse_\n );\n while (\n nextChild != null &&\n (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))\n ) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(\n this.index_,\n nextChild,\n this.reverse_\n );\n }\n const compareNext =\n nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n const remainsInWindow =\n inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childChangedChange(childKey, childSnap, oldChildSnap)\n );\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n } else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childRemovedChange(childKey, oldChildSnap)\n );\n }\n const newEventCache = oldEventCache.updateImmediateChild(\n childKey,\n ChildrenNode.EMPTY_NODE\n );\n const nextChildInRange =\n nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childAddedChange(nextChild.name, nextChild.node)\n );\n }\n return newEventCache.updateImmediateChild(\n nextChild.name,\n nextChild.node\n );\n } else {\n return newEventCache;\n }\n }\n } else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n } else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childRemovedChange(windowBoundary.name, windowBoundary.node)\n );\n changeAccumulator.trackChildChange(\n Change.childAddedChange(childKey, childSnap)\n );\n }\n return oldEventCache\n .updateImmediateChild(childKey, childSnap)\n .updateImmediateChild(windowBoundary.name, ChildrenNode.EMPTY_NODE);\n } else {\n return snap;\n }\n } else {\n return snap;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/filter/LimitedFilter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { MIN_NAME, MAX_NAME } from '../util/util';\nimport { KEY_INDEX } from '../snap/indexes/KeyIndex';\nimport { PRIORITY_INDEX } from '../snap/indexes/PriorityIndex';\nimport { VALUE_INDEX } from '../snap/indexes/ValueIndex';\nimport { PathIndex } from '../snap/indexes/PathIndex';\nimport { IndexedFilter } from './filter/IndexedFilter';\nimport { LimitedFilter } from './filter/LimitedFilter';\nimport { RangedFilter } from './filter/RangedFilter';\nimport { stringify } from '../../../utils/json';\nimport { NodeFilter } from './filter/NodeFilter';\nimport { Index } from '../snap/indexes/Index';\n\n/**\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\n * user-facing API level, so it is not done here.\n * @constructor\n */\nexport class QueryParams {\n private limitSet_ = false;\n private startSet_ = false;\n private startNameSet_ = false;\n private endSet_ = false;\n private endNameSet_ = false;\n\n private limit_ = 0;\n private viewFrom_ = '';\n private indexStartValue_: any | null = null;\n private indexStartName_ = '';\n private indexEndValue_: any | null = null;\n private indexEndName_ = '';\n\n private index_ = PRIORITY_INDEX;\n\n /**\n * Wire Protocol Constants\n * @const\n * @enum {string}\n * @private\n */\n private static readonly WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n\n /**\n * REST Query Constants\n * @const\n * @enum {string}\n * @private\n */\n private static readonly REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n\n /**\n * Default, empty query parameters\n * @type {!QueryParams}\n * @const\n */\n static readonly DEFAULT = new QueryParams();\n\n /**\n * @return {boolean}\n */\n hasStart(): boolean {\n return this.startSet_;\n }\n\n /**\n * @return {boolean} True if it would return from left.\n */\n isViewFromLeft(): boolean {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n } else {\n return (\n this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT\n );\n }\n }\n\n /**\n * Only valid to call if hasStart() returns true\n * @return {*}\n */\n getIndexStartValue(): any {\n assert(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n }\n\n /**\n * Only valid to call if hasStart() returns true.\n * Returns the starting key name for the range defined by these query parameters\n * @return {!string}\n */\n getIndexStartName(): string {\n assert(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n } else {\n return MIN_NAME;\n }\n }\n\n /**\n * @return {boolean}\n */\n hasEnd(): boolean {\n return this.endSet_;\n }\n\n /**\n * Only valid to call if hasEnd() returns true.\n * @return {*}\n */\n getIndexEndValue(): any {\n assert(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n }\n\n /**\n * Only valid to call if hasEnd() returns true.\n * Returns the end key name for the range defined by these query parameters\n * @return {!string}\n */\n getIndexEndName(): string {\n assert(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n } else {\n return MAX_NAME;\n }\n }\n\n /**\n * @return {boolean}\n */\n hasLimit(): boolean {\n return this.limitSet_;\n }\n\n /**\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\n */\n hasAnchoredLimit(): boolean {\n return this.limitSet_ && this.viewFrom_ !== '';\n }\n\n /**\n * Only valid to call if hasLimit() returns true\n * @return {!number}\n */\n getLimit(): number {\n assert(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n }\n\n /**\n * @return {!Index}\n */\n getIndex(): Index {\n return this.index_;\n }\n\n /**\n * @return {!QueryParams}\n * @private\n */\n private copy_(): QueryParams {\n const copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n }\n\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n limit(newLimit: number): QueryParams {\n const newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n }\n\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n limitToFirst(newLimit: number): QueryParams {\n const newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n }\n\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n limitToLast(newLimit: number): QueryParams {\n const newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n }\n\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n startAt(indexValue: any, key?: string | null): QueryParams {\n const newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n } else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n }\n\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n endAt(indexValue: any, key?: string | null): QueryParams {\n const newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n } else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n }\n\n /**\n * @param {!Index} index\n * @return {!QueryParams}\n */\n orderBy(index: Index): QueryParams {\n const newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n }\n\n /**\n * @return {!Object}\n */\n getQueryObject(): Object {\n const WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n const obj: { [k: string]: any } = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n let viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n } else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n }\n\n /**\n * @return {boolean}\n */\n loadsAllData(): boolean {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n }\n\n /**\n * @return {boolean}\n */\n isDefault(): boolean {\n return this.loadsAllData() && this.index_ == PRIORITY_INDEX;\n }\n\n /**\n * @return {!NodeFilter}\n */\n getNodeFilter(): NodeFilter {\n if (this.loadsAllData()) {\n return new IndexedFilter(this.getIndex());\n } else if (this.hasLimit()) {\n return new LimitedFilter(this);\n } else {\n return new RangedFilter(this);\n }\n }\n\n /**\n * Returns a set of REST query string parameters representing this query.\n *\n * @return {!Object.} query string parameters\n */\n toRestQueryStringParameters(): { [k: string]: any } {\n const REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n const qs: { [k: string]: string | number } = {};\n\n if (this.isDefault()) {\n return qs;\n }\n\n let orderBy;\n if (this.index_ === PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n } else if (this.index_ === VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n } else if (this.index_ === KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n } else {\n assert(this.index_ instanceof PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = stringify(orderBy);\n\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = stringify(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + stringify(this.indexStartName_);\n }\n }\n\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = stringify(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + stringify(this.indexEndName_);\n }\n }\n\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n } else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n\n return qs;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/QueryParams.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { OnDisconnect } from './onDisconnect';\nimport { TransactionResult } from './TransactionResult';\nimport { warn } from '../core/util/util';\nimport { nextPushId } from '../core/util/NextPushId';\nimport { Query } from './Query';\nimport { Repo } from '../core/Repo';\nimport { Path } from '../core/util/Path';\nimport { QueryParams } from '../core/view/QueryParams';\nimport {\n validateRootPathString,\n validatePathString,\n validateFirebaseMergeDataArg,\n validateBoolean,\n validatePriority,\n validateFirebaseDataArg,\n validateWritablePath\n} from '../core/util/validation';\nimport { validateArgCount, validateCallback } from '../../utils/validation';\nimport {\n Deferred,\n attachDummyErrorHandler,\n PromiseImpl\n} from '../../utils/promise';\nimport { SyncPoint } from '../core/SyncPoint';\nimport { Database } from './Database';\nimport { DataSnapshot } from './DataSnapshot';\n\nexport interface ReferenceConstructor {\n new (repo: Repo, path: Path): Reference;\n}\n\nexport class Reference extends Query {\n public then: (a?: any) => Promise;\n public catch: (a?: Error) => Promise;\n\n /**\n * Call options:\n * new Reference(Repo, Path) or\n * new Reference(url: string, string|RepoManager)\n *\n * Externally - this is the firebase.database.Reference type.\n *\n * @param {!Repo} repo\n * @param {(!Path)} path\n * @extends {Query}\n */\n constructor(repo: Repo, path: Path) {\n if (!(repo instanceof Repo)) {\n throw new Error(\n 'new Reference() no longer supported - use app.database().'\n );\n }\n\n // call Query's constructor, passing in the repo and path.\n super(repo, path, QueryParams.DEFAULT, false);\n }\n\n /** @return {?string} */\n getKey(): string | null {\n validateArgCount('Reference.key', 0, 0, arguments.length);\n\n if (this.path.isEmpty()) return null;\n else return this.path.getBack();\n }\n\n /**\n * @param {!(string|Path)} pathString\n * @return {!Reference}\n */\n child(pathString: string | Path): Reference {\n validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n } else if (!(pathString instanceof Path)) {\n if (this.path.getFront() === null)\n validateRootPathString('Reference.child', 1, pathString, false);\n else validatePathString('Reference.child', 1, pathString, false);\n }\n\n return new Reference(this.repo, this.path.child(pathString));\n }\n\n /** @return {?Reference} */\n getParent(): Reference | null {\n validateArgCount('Reference.parent', 0, 0, arguments.length);\n\n const parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n }\n\n /** @return {!Reference} */\n getRoot(): Reference {\n validateArgCount('Reference.root', 0, 0, arguments.length);\n\n let ref = this as any;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n }\n\n /** @return {!Database} */\n databaseProp(): Database {\n return this.repo.database;\n }\n\n /**\n * @param {*} newVal\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n set(newVal: any, onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('Reference.set', 1, 2, arguments.length);\n validateWritablePath('Reference.set', this.path);\n validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n validateCallback('Reference.set', 2, onComplete, true);\n\n const deferred = new Deferred();\n this.repo.setWithPriority(\n this.path,\n newVal,\n /*priority=*/ null,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n update(\n objectToMerge: Object,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('Reference.update', 1, 2, arguments.length);\n validateWritablePath('Reference.update', this.path);\n\n if (Array.isArray(objectToMerge)) {\n const newObjectToMerge: { [k: string]: any } = {};\n for (let i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n warn(\n 'Passing an Array to Firebase.update() is deprecated. ' +\n 'Use set() if you want to overwrite the existing data, or ' +\n 'an Object with integer keys if you really do want to ' +\n 'only update some of the children.'\n );\n }\n validateFirebaseMergeDataArg(\n 'Reference.update',\n 1,\n objectToMerge,\n this.path,\n false\n );\n validateCallback('Reference.update', 2, onComplete, true);\n const deferred = new Deferred();\n this.repo.update(\n this.path,\n objectToMerge,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*} newVal\n * @param {string|number|null} newPriority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n setWithPriority(\n newVal: any,\n newPriority: string | number | null,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validateWritablePath('Reference.setWithPriority', this.path);\n validateFirebaseDataArg(\n 'Reference.setWithPriority',\n 1,\n newVal,\n this.path,\n false\n );\n validatePriority('Reference.setWithPriority', 2, newPriority, false);\n validateCallback('Reference.setWithPriority', 3, onComplete, true);\n\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.setWithPriority failed: ' +\n this.getKey() +\n ' is a read-only object.';\n\n const deferred = new Deferred();\n this.repo.setWithPriority(\n this.path,\n newVal,\n newPriority,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n remove(onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('Reference.remove', 0, 1, arguments.length);\n validateWritablePath('Reference.remove', this.path);\n validateCallback('Reference.remove', 1, onComplete, true);\n\n return this.set(null, onComplete);\n }\n\n /**\n * @param {function(*):*} transactionUpdate\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\n * @param {boolean=} applyLocally\n * @return {!Promise}\n */\n transaction(\n transactionUpdate: (a: any) => any,\n onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => void,\n applyLocally?: boolean\n ): Promise {\n validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validateWritablePath('Reference.transaction', this.path);\n validateCallback('Reference.transaction', 1, transactionUpdate, false);\n validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validateBoolean('Reference.transaction', 3, applyLocally, true);\n\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.transaction failed: ' +\n this.getKey() +\n ' is a read-only object.';\n\n if (applyLocally === undefined) applyLocally = true;\n\n const deferred = new Deferred();\n if (typeof onComplete === 'function') {\n attachDummyErrorHandler(deferred.promise);\n }\n\n const promiseComplete = function(\n error: Error,\n committed: boolean,\n snapshot: DataSnapshot\n ) {\n if (error) {\n deferred.reject(error);\n } else {\n deferred.resolve(new TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(\n this.path,\n transactionUpdate,\n promiseComplete,\n applyLocally\n );\n\n return deferred.promise;\n }\n\n /**\n * @param {string|number|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n setPriority(\n priority: string | number | null,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validateWritablePath('Reference.setPriority', this.path);\n validatePriority('Reference.setPriority', 1, priority, false);\n validateCallback('Reference.setPriority', 2, onComplete, true);\n\n const deferred = new Deferred();\n this.repo.setWithPriority(\n this.path.child('.priority'),\n priority,\n null,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*=} value\n * @param {function(?Error)=} onComplete\n * @return {!Reference}\n */\n push(value?: any, onComplete?: (a: Error | null) => void): Reference {\n validateArgCount('Reference.push', 0, 2, arguments.length);\n validateWritablePath('Reference.push', this.path);\n validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n validateCallback('Reference.push', 2, onComplete, true);\n\n const now = this.repo.serverTime();\n const name = nextPushId(now);\n\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n const thennablePushRef = this.child(name);\n const pushRef = this.child(name);\n\n let promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(() => pushRef);\n } else {\n promise = PromiseImpl.resolve(pushRef);\n }\n\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n\n if (typeof onComplete === 'function') {\n attachDummyErrorHandler(promise);\n }\n\n return thennablePushRef;\n }\n\n /**\n * @return {!OnDisconnect}\n */\n onDisconnect(): OnDisconnect {\n validateWritablePath('Reference.onDisconnect', this.path);\n return new OnDisconnect(this.repo, this.path);\n }\n\n get database(): Database {\n return this.databaseProp();\n }\n\n get key(): string | null {\n return this.getKey();\n }\n\n get parent(): Reference | null {\n return this.getParent();\n }\n\n get root(): Reference {\n return this.getRoot();\n }\n}\n\n/**\n * Define reference constructor in various modules\n *\n * We are doing this here to avoid several circular\n * dependency issues\n */\nQuery.__referenceConstructor = Reference;\nSyncPoint.__referenceConstructor = Reference;\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/Reference.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { Reference } from '../api/Reference';\nimport { DataSnapshot } from '../api/DataSnapshot';\nimport { Path } from './util/Path';\nimport { Tree } from './util/Tree';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { Node } from './snap/Node';\nimport { LUIDGenerator, warn, exceptionGuard } from './util/util';\nimport { resolveDeferredValueSnapshot } from './util/ServerValues';\nimport { isValidPriority, validateFirebaseData } from './util/validation';\nimport { contains, safeGet } from '../../utils/obj';\nimport { nodeFromJSON } from './snap/nodeFromJSON';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { Repo } from './Repo';\nimport { Event } from './view/Event';\n\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n\n/**\n * @enum {number}\n */\nexport enum TransactionStatus {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n RUN,\n\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n SENT,\n\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n COMPLETED,\n\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n SENT_NEEDS_ABORT,\n\n // Temporary state used to mark transactions that need to be aborted.\n NEEDS_ABORT\n}\n\n/**\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\n * @type {number}\n * @const\n * @private\n */\n(Repo as any).MAX_TRANSACTION_RETRIES_ = 25;\n\n/**\n * @typedef {{\n * path: !Path,\n * update: function(*):*,\n * onComplete: ?function(?Error, boolean, ?DataSnapshot),\n * status: ?TransactionStatus,\n * order: !number,\n * applyLocally: boolean,\n * retryCount: !number,\n * unwatcher: function(),\n * abortReason: ?string,\n * currentWriteId: !number,\n * currentInputSnapshot: ?Node,\n * currentOutputSnapshotRaw: ?Node,\n * currentOutputSnapshotResolved: ?Node\n * }}\n */\ntype Transaction = {\n path: Path;\n update: (a: any) => any;\n onComplete: (a: Error | null, b: boolean, c: DataSnapshot | null) => void;\n status: TransactionStatus;\n order: number;\n applyLocally: boolean;\n retryCount: number;\n unwatcher: () => void;\n abortReason: string | null;\n currentWriteId: number;\n currentInputSnapshot: Node | null;\n currentOutputSnapshotRaw: Node | null;\n currentOutputSnapshotResolved: Node | null;\n};\n\n/**\n * Setup the transaction data structures\n * @private\n */\n(Repo.prototype as any).transactions_init_ = function() {\n /**\n * Stores queues of outstanding transactions for Firebase locations.\n *\n * @type {!Tree.>}\n * @private\n */\n this.transactionQueueTree_ = new Tree();\n};\n\ndeclare module './Repo' {\n interface Repo {\n startTransaction(\n path: Path,\n transactionUpdate: (a: any) => void,\n onComplete: ((a: Error, b: boolean, c: DataSnapshot) => void) | null,\n applyLocally: boolean\n ): void;\n }\n}\n\n/**\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\n *\n * @param {!Path} path Path at which to do transaction.\n * @param {function(*):*} transactionUpdate Update callback.\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\n */\nRepo.prototype.startTransaction = function(\n path: Path,\n transactionUpdate: (a: any) => any,\n onComplete: ((a: Error, b: boolean, c: DataSnapshot) => void) | null,\n applyLocally: boolean\n) {\n this.log_('transaction on ' + path);\n\n // Add a watch to make sure we get server updates.\n const valueCallback = function() {};\n const watchRef = new Reference(this, path);\n watchRef.on('value', valueCallback);\n const unwatcher = function() {\n watchRef.off('value', valueCallback);\n };\n\n // Initialize transaction.\n const transaction: Transaction = {\n path,\n update: transactionUpdate,\n onComplete,\n\n // One of TransactionStatus enums.\n status: null,\n\n // Used when combining transactions at different locations to figure out which one goes first.\n order: LUIDGenerator(),\n\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n\n // Function to call to clean up our .on() listener.\n unwatcher,\n\n // Stores why a transaction was aborted.\n abortReason: null,\n\n currentWriteId: null,\n\n currentInputSnapshot: null,\n\n currentOutputSnapshotRaw: null,\n\n currentOutputSnapshotResolved: null\n };\n\n // Run transaction initially.\n const currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n const newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n const snapshot = new DataSnapshot(\n transaction.currentInputSnapshot,\n new Reference(this, transaction.path),\n PRIORITY_INDEX\n );\n transaction.onComplete(null, false, snapshot);\n }\n } else {\n validateFirebaseData(\n 'transaction failed: Data returned ',\n newVal,\n transaction.path\n );\n\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n const queueNode = this.transactionQueueTree_.subTree(path);\n const nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n\n queueNode.setValue(nodeQueue);\n\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n let priorityForNode;\n if (\n typeof newVal === 'object' &&\n newVal !== null &&\n contains(newVal, '.priority')\n ) {\n priorityForNode = safeGet(newVal, '.priority');\n assert(\n isValidPriority(priorityForNode),\n 'Invalid priority returned by transaction. ' +\n 'Priority must be a valid string, finite number, server value, or null.'\n );\n } else {\n const currentNode =\n this.serverSyncTree_.calcCompleteEventCache(path) ||\n ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n\n const serverValues = this.generateServerValues();\n const newNodeUnresolved = nodeFromJSON(newVal, priorityForNode);\n const newNode = resolveDeferredValueSnapshot(\n newNodeUnresolved,\n serverValues\n );\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n\n const events = this.serverSyncTree_.applyUserOverwrite(\n path,\n newNode,\n transaction.currentWriteId,\n transaction.applyLocally\n );\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n\n this.sendReadyTransactions_();\n }\n};\n\n/**\n * @param {!Path} path\n * @param {Array.=} excludeSets A specific set to exclude\n * @return {Node}\n * @private\n */\n(Repo.prototype as any).getLatestState_ = function(\n path: Path,\n excludeSets?: number[]\n): Node {\n return (\n this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) ||\n ChildrenNode.EMPTY_NODE\n );\n};\n\n/**\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\n * complete.\n *\n * Externally it's called with no arguments, but it calls itself recursively with a particular\n * transactionQueueTree node to recurse through the tree.\n *\n * @param {Tree.>=} node transactionQueueTree node to start at.\n * @private\n */\n(Repo.prototype as any).sendReadyTransactions_ = function(\n node: Tree = this.transactionQueueTree_\n) {\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n\n if (node.getValue() !== null) {\n const queue = this.buildTransactionQueue_(node);\n assert(queue.length > 0, 'Sending zero length transaction queue');\n\n const allRun = queue.every(\n (transaction: Transaction) => transaction.status === TransactionStatus.RUN\n );\n\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n } else if (node.hasChildren()) {\n node.forEachChild(childNode => {\n this.sendReadyTransactions_(childNode);\n });\n }\n};\n\n/**\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\n *\n * @param {!Path} path The location of the queue.\n * @param {!Array.} queue Queue of transactions under the specified location.\n * @private\n */\n(Repo.prototype as any).sendTransactionQueue_ = function(\n path: Path,\n queue: Array\n) {\n // Mark transactions as sent and increment retry count!\n const setsToIgnore = queue.map(function(txn) {\n return txn.currentWriteId;\n });\n const latestState = this.getLatestState_(path, setsToIgnore);\n let snapToSend = latestState;\n const latestHash = latestState.hash();\n for (let i = 0; i < queue.length; i++) {\n const txn = queue[i];\n assert(\n txn.status === TransactionStatus.RUN,\n 'tryToSendTransactionQueue_: items in queue should all be run.'\n );\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n const relativePath = Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(\n relativePath /**@type {!Node} */,\n txn.currentOutputSnapshotRaw\n );\n }\n\n const dataToSend = snapToSend.val(true);\n const pathToSend = path;\n\n // Send the put.\n this.server_.put(\n pathToSend.toString(),\n dataToSend,\n (status: string) => {\n this.log_('transaction put response', {\n path: pathToSend.toString(),\n status\n });\n\n let events: Event[] = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n const callbacks = [];\n for (let i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId)\n );\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n const node = queue[i].currentOutputSnapshotResolved as Node;\n const ref = new Reference(this, queue[i].path);\n const snapshot = new DataSnapshot(node, ref, PRIORITY_INDEX);\n callbacks.push(\n queue[i].onComplete.bind(null, null, true, snapshot)\n );\n }\n queue[i].unwatcher();\n }\n\n // Now remove the completed transactions.\n this.pruneCompletedTransactionsBelowNode_(\n this.transactionQueueTree_.subTree(path)\n );\n // There may be pending transactions that we can now send.\n this.sendReadyTransactions_();\n\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n\n // Finally, trigger onComplete callbacks.\n for (let i = 0; i < callbacks.length; i++) {\n exceptionGuard(callbacks[i]);\n }\n } else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (let i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT)\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n else queue[i].status = TransactionStatus.RUN;\n }\n } else {\n warn(\n 'transaction at ' + pathToSend.toString() + ' failed: ' + status\n );\n for (let i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n\n this.rerunTransactions_(path);\n }\n },\n latestHash\n );\n};\n\n/**\n * Finds all transactions dependent on the data at changedPath and reruns them.\n *\n * Should be called any time cached data changes.\n *\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\n * be raised for.\n *\n * @param {!Path} changedPath The path in mergedData that changed.\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\n * @private\n */\n(Repo.prototype as any).rerunTransactions_ = function(changedPath: Path): Path {\n const rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n const path = rootMostTransactionNode.path();\n\n const queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n\n return path;\n};\n\n/**\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\n *\n * @param {Array.} queue The queue of transactions to run.\n * @param {!Path} path The path the queue is for.\n * @private\n */\n(Repo.prototype as any).rerunTransactionQueue_ = function(\n queue: Array,\n path: Path\n) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n const callbacks = [];\n let events: Event[] = [];\n // Ignore all of the sets we're going to re-run.\n const txnsToRerun = queue.filter(function(q) {\n return q.status === TransactionStatus.RUN;\n });\n const setsToIgnore = txnsToRerun.map(function(q) {\n return q.currentWriteId;\n });\n for (let i = 0; i < queue.length; i++) {\n const transaction = queue[i];\n const relativePath = Path.relativePath(path, transaction.path);\n let abortTransaction = false,\n abortReason;\n assert(\n relativePath !== null,\n 'rerunTransactionsUnderNode_: relativePath should not be null.'\n );\n\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true)\n );\n } else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= (Repo as any).MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true)\n );\n } else {\n // This code reruns a transaction\n const currentNode = this.getLatestState_(\n transaction.path,\n setsToIgnore\n );\n transaction.currentInputSnapshot = currentNode;\n const newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validateFirebaseData(\n 'transaction failed: Data returned ',\n newData,\n transaction.path\n );\n let newDataNode = nodeFromJSON(newData);\n const hasExplicitPriority =\n typeof newData === 'object' &&\n newData != null &&\n contains(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n\n const oldWriteId = transaction.currentWriteId;\n const serverValues = this.generateServerValues();\n const newNodeResolved = resolveDeferredValueSnapshot(\n newDataNode,\n serverValues\n );\n\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(\n this.serverSyncTree_.applyUserOverwrite(\n transaction.path,\n newNodeResolved,\n transaction.currentWriteId,\n transaction.applyLocally\n )\n );\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(oldWriteId, true)\n );\n } else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true)\n );\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function(unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n const ref = new Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n const lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n const snapshot = new DataSnapshot(lastInput, ref, PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n } else {\n callbacks.push(\n queue[i].onComplete.bind(null, new Error(abortReason), false, null)\n );\n }\n }\n }\n }\n\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n\n // Now fire callbacks, now that we're in a good, known state.\n for (let i = 0; i < callbacks.length; i++) {\n exceptionGuard(callbacks[i]);\n }\n\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n\n/**\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\n * the node for the given path if there are no pending transactions on any ancestor.\n *\n * @param {!Path} path The location to start at.\n * @return {!Tree.>} The rootmost node with a transaction.\n * @private\n */\n(Repo.prototype as any).getAncestorTransactionNode_ = function(\n path: Path\n): Tree {\n let front;\n\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n let transactionNode = this.transactionQueueTree_;\n while (\n (front = path.getFront()) !== null &&\n transactionNode.getValue() === null\n ) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n\n return transactionNode;\n};\n\n/**\n * Builds the queue of all transactions at or below the specified transactionNode.\n *\n * @param {!Tree.>} transactionNode\n * @return {Array.} The generated queue.\n * @private\n */\n(Repo.prototype as any).buildTransactionQueue_ = function(\n transactionNode: Tree\n): Array {\n // Walk any child transaction queues and aggregate them into a single queue.\n const transactionQueue: Transaction[] = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function(a, b) {\n return a.order - b.order;\n });\n\n return transactionQueue;\n};\n\n/**\n * @param {!Tree.>} node\n * @param {Array.} queue\n * @private\n */\n(Repo.prototype as any).aggregateTransactionQueuesForNode_ = function(\n node: Tree,\n queue: Array\n) {\n const nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (let i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n\n node.forEachChild(child => {\n this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n\n/**\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\n *\n * @param {!Tree.>} node\n * @private\n */\n(Repo.prototype as any).pruneCompletedTransactionsBelowNode_ = function(\n node: Tree\n) {\n const queue = node.getValue();\n if (queue) {\n let to = 0;\n for (let from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n\n node.forEachChild(childNode => {\n this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n\n/**\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\n * since we consider them incompatible with transactions.\n *\n * @param {!Path} path Path for which we want to abort related transactions.\n * @return {!Path}\n * @private\n */\n(Repo.prototype as any).abortTransactions_ = function(path: Path): Path {\n const affectedPath = this.getAncestorTransactionNode_(path).path();\n\n const transactionNode = this.transactionQueueTree_.subTree(path);\n\n transactionNode.forEachAncestor((node: Tree) => {\n this.abortTransactionsOnNode_(node);\n });\n\n this.abortTransactionsOnNode_(transactionNode);\n\n transactionNode.forEachDescendant((node: Tree) => {\n this.abortTransactionsOnNode_(node);\n });\n\n return affectedPath;\n};\n\n/**\n * Abort transactions stored in this transaction queue node.\n *\n * @param {!Tree.>} node Node to abort transactions for.\n * @private\n */\n(Repo.prototype as any).abortTransactionsOnNode_ = function(\n node: Tree\n) {\n const queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n const callbacks = [];\n\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n let events: Event[] = [];\n let lastSent = -1;\n for (let i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n } else if (queue[i].status === TransactionStatus.SENT) {\n assert(\n lastSent === i - 1,\n 'All SENT items should be at beginning of queue.'\n );\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n } else {\n assert(\n queue[i].status === TransactionStatus.RUN,\n 'Unexpected transaction status in abort'\n );\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true)\n );\n if (queue[i].onComplete) {\n const snapshot: DataSnapshot | null = null;\n callbacks.push(\n queue[i].onComplete.bind(null, new Error('set'), false, snapshot)\n );\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n } else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (let i = 0; i < callbacks.length; i++) {\n exceptionGuard(callbacks[i]);\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/Repo_transaction.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from './Path';\nimport { forEach, contains, safeGet } from '../../../utils/obj';\n\n/**\n * Node in a Tree.\n */\nexport class TreeNode {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n children: { [name: string]: TreeNode } = {};\n childCount = 0;\n value: T | null = null;\n}\n\n/**\n * A light-weight tree, traversable by path. Nodes can have both values and children.\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\n * children.\n */\nexport class Tree {\n /**\n * @template T\n * @param {string=} name_ Optional name of the node.\n * @param {Tree=} parent_ Optional parent node.\n * @param {TreeNode=} node_ Optional node to wrap.\n */\n constructor(\n private name_: string = '',\n private parent_: Tree | null = null,\n private node_: TreeNode = new TreeNode()\n ) {}\n\n /**\n * Returns a sub-Tree for the given path.\n *\n * @param {!(string|Path)} pathObj Path to look up.\n * @return {!Tree.} Tree for path.\n */\n subTree(pathObj: string | Path): Tree {\n // TODO: Require pathObj to be Path?\n let path = pathObj instanceof Path ? pathObj : new Path(pathObj);\n let child = this as any,\n next;\n while ((next = path.getFront()) !== null) {\n const childNode = safeGet(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n\n return child;\n }\n\n /**\n * Returns the data associated with this tree node.\n *\n * @return {?T} The data or null if no data exists.\n */\n getValue(): T | null {\n return this.node_.value;\n }\n\n /**\n * Sets data to this tree node.\n *\n * @param {!T} value Value to set.\n */\n setValue(value: T) {\n assert(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n }\n\n /**\n * Clears the contents of the tree node (its value and all children).\n */\n clear() {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n }\n\n /**\n * @return {boolean} Whether the tree has any children.\n */\n hasChildren(): boolean {\n return this.node_.childCount > 0;\n }\n\n /**\n * @return {boolean} Whether the tree is empty (no value or children).\n */\n isEmpty(): boolean {\n return this.getValue() === null && !this.hasChildren();\n }\n\n /**\n * Calls action for each child of this tree node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n forEachChild(action: (tree: Tree) => void) {\n forEach(this.node_.children, (child: string, childTree: TreeNode) => {\n action(new Tree(child, this, childTree));\n });\n }\n\n /**\n * Does a depth-first traversal of this node's descendants, calling action for each one.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\n * false.\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\n * parent.\n */\n forEachDescendant(\n action: (tree: Tree) => void,\n includeSelf?: boolean,\n childrenFirst?: boolean\n ) {\n if (includeSelf && !childrenFirst) action(this);\n\n this.forEachChild(function(child) {\n child.forEachDescendant(action, /*includeSelf=*/ true, childrenFirst);\n });\n\n if (includeSelf && childrenFirst) action(this);\n }\n\n /**\n * Calls action on each ancestor node.\n *\n * @param {function(!Tree.)} action Action to be called on each parent; return\n * true to abort.\n * @param {boolean=} includeSelf Whether to call action on this node as well.\n * @return {boolean} true if the action callback returned true.\n */\n forEachAncestor(\n action: (tree: Tree) => void,\n includeSelf?: boolean\n ): boolean {\n let node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n }\n\n /**\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\n * is found, action is called on it and traversal does not continue inside the node.\n * Action is *not* called on this node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n forEachImmediateDescendantWithValue(action: (tree: Tree) => void) {\n this.forEachChild(function(child) {\n if (child.getValue() !== null) action(child);\n else child.forEachImmediateDescendantWithValue(action);\n });\n }\n\n /**\n * @return {!Path} The path of this tree node, as a Path.\n */\n path(): Path {\n return new Path(\n this.parent_ === null\n ? this.name_\n : this.parent_.path() + '/' + this.name_\n );\n }\n\n /**\n * @return {string} The name of the tree node.\n */\n name(): string {\n return this.name_;\n }\n\n /**\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\n */\n parent(): Tree | null {\n return this.parent_;\n }\n\n /**\n * Adds or removes this child from its parent based on whether it's empty or not.\n *\n * @private\n */\n private updateParents_() {\n if (this.parent_ !== null) this.parent_.updateChild_(this.name_, this);\n }\n\n /**\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\n *\n * @param {string} childName The name of the child to update.\n * @param {!Tree.} child The child to update.\n * @private\n */\n private updateChild_(childName: string, child: Tree) {\n const childEmpty = child.isEmpty();\n const childExists = contains(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n } else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/Tree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { FirebaseApp } from '../../app/firebase_app';\nimport { safeGet } from '../../utils/obj';\nimport { Repo } from './Repo';\nimport { fatal } from './util/util';\nimport { parseRepoInfo } from './util/libs/parser';\nimport { validateUrl } from './util/validation';\nimport './Repo_transaction';\nimport { Database } from '../api/Database';\nimport { RepoInfo } from './RepoInfo';\n\n/** @const {string} */\nconst DATABASE_URL_OPTION = 'databaseURL';\n\nlet _staticInstance: RepoManager;\n\n/**\n * Creates and caches Repo instances.\n */\nexport class RepoManager {\n /**\n * @private {!Object.}\n */\n private repos_: {\n [name: string]: Repo;\n } = {};\n\n /**\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\n * @private {boolean}\n */\n private useRestClient_: boolean = false;\n\n static getInstance(): RepoManager {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n }\n\n // TODO(koss): Remove these functions unless used in tests?\n interrupt() {\n for (const repo in this.repos_) {\n this.repos_[repo].interrupt();\n }\n }\n\n resume() {\n for (const repo in this.repos_) {\n this.repos_[repo].resume();\n }\n }\n\n /**\n * This function should only ever be called to CREATE a new database instance.\n *\n * @param {!FirebaseApp} app\n * @return {!Database}\n */\n databaseFromApp(app: FirebaseApp): Database {\n const dbUrl: string = app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n fatal(\n \"Can't determine Firebase Database URL. Be sure to include \" +\n DATABASE_URL_OPTION +\n ' option when calling firebase.intializeApp().'\n );\n }\n\n const parsedUrl = parseRepoInfo(dbUrl);\n const repoInfo = parsedUrl.repoInfo;\n\n validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n fatal(\n 'Database URL must point to the root of a Firebase Database ' +\n '(not including a child path).'\n );\n }\n\n const repo = this.createRepo(repoInfo, app);\n\n return repo.database;\n }\n\n /**\n * Remove the repo and make sure it is disconnected.\n *\n * @param {!Repo} repo\n */\n deleteRepo(repo: Repo) {\n // This should never happen...\n if (safeGet(this.repos_, repo.app.name) !== repo) {\n fatal('Database ' + repo.app.name + ' has already been deleted.');\n }\n repo.interrupt();\n delete this.repos_[repo.app.name];\n }\n\n /**\n * Ensures a repo doesn't already exist and then creates one using the\n * provided app.\n *\n * @param {!RepoInfo} repoInfo The metadata about the Repo\n * @param {!FirebaseApp} app\n * @return {!Repo} The Repo object for the specified server / repoName.\n */\n createRepo(repoInfo: RepoInfo, app: FirebaseApp): Repo {\n let repo = safeGet(this.repos_, app.name);\n if (repo) {\n fatal('FIREBASE INTERNAL ERROR: Database initialized multiple times.');\n }\n repo = new Repo(repoInfo, this.useRestClient_, app);\n this.repos_[app.name] = repo;\n\n return repo;\n }\n\n /**\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\n * @param {boolean} forceRestClient\n */\n forceRestClient(forceRestClient: boolean) {\n this.useRestClient_ = forceRestClient;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/RepoManager.ts","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { fatal } from '../core/util/util';\nimport { parseRepoInfo } from '../core/util/libs/parser';\nimport { Path } from '../core/util/Path';\nimport { PromiseImpl } from '../../utils/promise';\nimport { Reference } from './Reference';\nimport { Repo } from '../core/Repo';\nimport { RepoManager } from '../core/RepoManager';\nimport { validateArgCount } from '../../utils/validation';\nimport { validateUrl } from '../core/util/validation';\nimport { FirebaseApp, FirebaseService } from '../../app/firebase_app';\nimport { RepoInfo } from '../core/RepoInfo';\n\n/**\n * Class representing a firebase database.\n * @implements {FirebaseService}\n */\nexport class Database implements FirebaseService {\n INTERNAL: DatabaseInternals;\n private root_: Reference;\n\n static readonly ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n\n /**\n * The constructor should not be called by users of our public API.\n * @param {!Repo} repo_\n */\n constructor(private repo_: Repo) {\n if (!(repo_ instanceof Repo)) {\n fatal(\n \"Don't call new Database() directly - please use firebase.database().\"\n );\n }\n\n /** @type {Reference} */\n this.root_ = new Reference(repo_, Path.Empty);\n\n this.INTERNAL = new DatabaseInternals(this);\n }\n\n get app(): FirebaseApp {\n return this.repo_.app;\n }\n\n /**\n * Returns a reference to the root or the path specified in opt_pathString.\n * @param {string=} pathString\n * @return {!Reference} Firebase reference.\n */\n ref(pathString?: string): Reference {\n this.checkDeleted_('ref');\n validateArgCount('database.ref', 0, 1, arguments.length);\n\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n }\n\n /**\n * Returns a reference to the root or the path specified in url.\n * We throw a exception if the url is not in the same domain as the\n * current repo.\n * @param {string} url\n * @return {!Reference} Firebase reference.\n */\n refFromURL(url: string): Reference {\n /** @const {string} */\n const apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n validateArgCount(apiName, 1, 1, arguments.length);\n const parsedURL = parseRepoInfo(url);\n validateUrl(apiName, 1, parsedURL);\n\n const repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== ((this.repo_ as any).repoInfo_ as RepoInfo).host) {\n fatal(\n apiName +\n ': Host name does not match the current database: ' +\n '(found ' +\n repoInfo.host +\n ' but expected ' +\n ((this.repo_ as any).repoInfo_ as RepoInfo).host +\n ')'\n );\n }\n\n return this.ref(parsedURL.path.toString());\n }\n\n /**\n * @param {string} apiName\n */\n private checkDeleted_(apiName: string) {\n if (this.repo_ === null) {\n fatal('Cannot call ' + apiName + ' on a deleted database.');\n }\n }\n\n // Make individual repo go offline.\n goOffline() {\n validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n }\n\n goOnline() {\n validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n }\n}\n\nexport class DatabaseInternals {\n /** @param {!Database} database */\n constructor(public database: Database) {}\n\n /** @return {Promise} */\n delete(): Promise {\n (this.database as any).checkDeleted_('delete');\n RepoManager.getInstance().deleteRepo((this.database as any).repo_ as Repo);\n\n (this.database as any).repo_ = null;\n (this.database as any).root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return PromiseImpl.resolve();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/Database.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { WebSocketConnection } from '../realtime/WebSocketConnection';\nimport { BrowserPollConnection } from '../realtime/BrowserPollConnection';\nimport { Reference } from './Reference';\n\n/**\n * INTERNAL methods for internal-use only (tests, etc.).\n *\n * Customers shouldn't use these or else should be aware that they could break at any time.\n *\n * @const\n */\n\nexport const forceLongPolling = function() {\n WebSocketConnection.forceDisallow();\n BrowserPollConnection.forceAllow();\n};\n\nexport const forceWebSockets = function() {\n BrowserPollConnection.forceDisallow();\n};\n\n/* Used by App Manager */\nexport const isWebSocketsAvailable = function(): boolean {\n return WebSocketConnection['isAvailable']();\n};\n\nexport const setSecurityDebugCallback = function(\n ref: Reference,\n callback: (a: Object) => void\n) {\n (ref.repo.persistentConnection_ as any).securityDebugCallback_ = callback;\n};\n\nexport const stats = function(ref: Reference, showDelta?: boolean) {\n ref.repo.stats(showDelta);\n};\n\nexport const statsIncrementCounter = function(ref: Reference, metric: string) {\n ref.repo.statsIncrementCounter(metric);\n};\n\nexport const dataUpdateCount = function(ref: Reference): number {\n return ref.repo.dataUpdateCount;\n};\n\nexport const interceptServerData = function(\n ref: Reference,\n callback: ((a: string, b: any) => void) | null\n) {\n return ref.repo.interceptServerData_(callback);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/internal.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { RepoInfo } from '../core/RepoInfo';\nimport { PersistentConnection } from '../core/PersistentConnection';\nimport { RepoManager } from '../core/RepoManager';\nimport { Connection } from '../realtime/Connection';\nimport { Query } from './Query';\n\nexport const DataConnection = PersistentConnection;\n\n/**\n * @param {!string} pathString\n * @param {function(*)} onComplete\n */\n(PersistentConnection.prototype as any).simpleListen = function(\n pathString: string,\n onComplete: (a: any) => void\n) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n\n/**\n * @param {*} data\n * @param {function(*)} onEcho\n */\n(PersistentConnection.prototype as any).echo = function(\n data: any,\n onEcho: (a: any) => void\n) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n\n// RealTimeConnection properties that we use in tests.\nexport const RealTimeConnection = Connection;\n\n/**\n * @param {function(): string} newHash\n * @return {function()}\n */\nexport const hijackHash = function(newHash: () => string) {\n const oldPut = PersistentConnection.prototype.put;\n PersistentConnection.prototype.put = function(\n pathString,\n data,\n opt_onComplete,\n opt_hash\n ) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function() {\n PersistentConnection.prototype.put = oldPut;\n };\n};\n\n/**\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\n */\nexport const ConnectionTarget = RepoInfo;\n\n/**\n * @param {!Query} query\n * @return {!string}\n */\nexport const queryIdentifier = function(query: Query) {\n return query.queryIdentifier();\n};\n\n/**\n * @param {!Query} firebaseRef\n * @return {!Object}\n */\nexport const listens = function(firebaseRef: Query) {\n return (firebaseRef.repo.persistentConnection_ as any).listens_;\n};\n\n/**\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\n *\n * @param {boolean} forceRestClient\n */\nexport const forceRestClient = function(forceRestClient: boolean) {\n RepoManager.getInstance().forceRestClient(forceRestClient);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/test_access.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport firebase from './app';\nimport { FirebaseApp, FirebaseNamespace } from './app/firebase_app';\nimport { Database } from './database/api/Database';\nimport { Query } from './database/api/Query';\nimport { Reference } from './database/api/Reference';\nimport { enableLogging } from './database/core/util/util';\nimport { RepoManager } from './database/core/RepoManager';\nimport * as INTERNAL from './database/api/internal';\nimport * as TEST_ACCESS from './database/api/test_access';\nimport { isNodeSdk } from './utils/environment';\n\nexport function registerDatabase(instance: FirebaseNamespace) {\n // Register the Database Service with the 'firebase' namespace.\n const namespace = instance.INTERNAL.registerService(\n 'database',\n app => RepoManager.getInstance().databaseFromApp(app),\n // firebase.database namespace properties\n {\n Reference,\n Query,\n Database,\n enableLogging,\n INTERNAL,\n ServerValue: Database.ServerValue,\n TEST_ACCESS\n }\n );\n\n if (isNodeSdk()) {\n module.exports = namespace;\n }\n}\n\n/**\n * Extensions to the FirebaseApp and FirebaseNamespaces interfaces\n */\ndeclare module './app/firebase_app' {\n interface FirebaseApp {\n database?(): Database;\n }\n}\n\ndeclare module './app/firebase_app' {\n interface FirebaseNamespace {\n database?: {\n (app?: FirebaseApp): Database;\n Database;\n enableLogging;\n INTERNAL;\n Query;\n Reference;\n ServerValue;\n };\n }\n}\n\nregisterDatabase(firebase);\n\n\n\n// WEBPACK FOOTER //\n// ./src/database.ts","module.exports = function(originalModule) {\r\n\tif(!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true,\r\n\t\t});\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/harmony-module.js\n// module id = 26\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///firebase-database.js","webpack:///../database/dist/cjs/src/core/util/util.js","webpack:///../database/dist/cjs/src/core/util/Path.js","webpack:///../database/dist/cjs/src/core/snap/indexes/PriorityIndex.js","webpack:///../database/dist/cjs/src/core/snap/ChildrenNode.js","webpack:///../database/dist/cjs/src/core/snap/Node.js","webpack:///../database/dist/cjs/src/core/util/validation.js","webpack:///../database/dist/cjs/src/core/operation/Operation.js","webpack:///../database/dist/cjs/src/core/view/Change.js","webpack:///../database/dist/cjs/src/core/snap/indexes/KeyIndex.js","webpack:///../database/dist/cjs/src/core/snap/nodeFromJSON.js","webpack:///../database/dist/cjs/src/core/storage/storage.js","webpack:///../database/dist/cjs/src/realtime/Constants.js","webpack:///../database/dist/cjs/src/core/snap/indexes/Index.js","webpack:///../database/dist/cjs/src/core/snap/LeafNode.js","webpack:///../database/dist/cjs/src/core/util/SortedMap.js","webpack:///../database/dist/cjs/src/core/Repo.js","webpack:///../database/dist/cjs/src/core/view/CacheNode.js","webpack:///../database/dist/cjs/src/api/Reference.js","webpack:///../database/dist/cjs/src/api/DataSnapshot.js","webpack:///../database/dist/cjs/src/core/util/ImmutableTree.js","webpack:///../database/dist/cjs/src/core/view/filter/IndexedFilter.js","webpack:///../database/dist/cjs/src/core/stats/StatsManager.js","webpack:///../database/dist/cjs/src/core/RepoManager.js","webpack:///../database/dist/cjs/src/api/Database.js","webpack:///../database/dist/cjs/src/core/util/libs/parser.js","webpack:///../database/dist/cjs/src/core/RepoInfo.js","webpack:///../database/dist/cjs/src/api/onDisconnect.js","webpack:///../database/dist/cjs/src/api/Query.js","webpack:///../database/dist/cjs/src/core/snap/snap.js","webpack:///../database/dist/cjs/src/core/snap/indexes/ValueIndex.js","webpack:///../database/dist/cjs/src/core/snap/IndexMap.js","webpack:///../database/dist/cjs/src/core/snap/childSet.js","webpack:///../database/dist/cjs/src/core/snap/comparators.js","webpack:///../database/dist/cjs/src/core/snap/indexes/PathIndex.js","webpack:///../database/dist/cjs/src/core/util/ServerValues.js","webpack:///../database/dist/cjs/src/core/SparseSnapshotTree.js","webpack:///../database/dist/cjs/src/core/util/CountedSet.js","webpack:///../database/dist/cjs/src/core/operation/Overwrite.js","webpack:///../database/dist/cjs/src/core/SyncPoint.js","webpack:///../database/dist/cjs/src/core/view/ViewCache.js","webpack:///../database/dist/cjs/src/core/stats/StatsListener.js","webpack:///../database/dist/cjs/src/core/PersistentConnection.js","webpack:///../database/dist/cjs/src/core/util/EventEmitter.js","webpack:///../database/dist/cjs/src/realtime/Connection.js","webpack:///../database/dist/cjs/src/realtime/BrowserPollConnection.js","webpack:///../database/dist/cjs/src/realtime/WebSocketConnection.js","webpack:///../database/dist/cjs/src/core/ServerActions.js","webpack:///../database/dist/cjs/src/core/view/filter/RangedFilter.js","webpack:///./database/index.js","webpack:///../database/dist/cjs/index.js","webpack:///../database/dist/cjs/src/core/storage/DOMStorageWrapper.js","webpack:///../database/dist/cjs/src/core/storage/MemoryStorage.js","webpack:///../database/dist/cjs/src/api/TransactionResult.js","webpack:///../database/dist/cjs/src/core/util/NextPushId.js","webpack:///../database/dist/cjs/src/core/view/EventRegistration.js","webpack:///../database/dist/cjs/src/core/view/Event.js","webpack:///../database/dist/cjs/src/core/SyncTree.js","webpack:///../database/dist/cjs/src/core/operation/AckUserWrite.js","webpack:///../database/dist/cjs/src/core/operation/ListenComplete.js","webpack:///../database/dist/cjs/src/core/operation/Merge.js","webpack:///../database/dist/cjs/src/core/view/View.js","webpack:///../database/dist/cjs/src/core/view/ViewProcessor.js","webpack:///../database/dist/cjs/src/core/view/ChildChangeAccumulator.js","webpack:///../database/dist/cjs/src/core/view/CompleteChildSource.js","webpack:///../database/dist/cjs/src/core/view/EventGenerator.js","webpack:///../database/dist/cjs/src/core/WriteTree.js","webpack:///../database/dist/cjs/src/core/CompoundWrite.js","webpack:///../database/dist/cjs/src/core/SnapshotHolder.js","webpack:///../database/dist/cjs/src/core/AuthTokenProvider.js","webpack:///../database/dist/cjs/src/core/stats/StatsCollection.js","webpack:///../database/dist/cjs/src/core/stats/StatsReporter.js","webpack:///../database/dist/cjs/src/core/view/EventQueue.js","webpack:///../database/dist/cjs/src/core/util/VisibilityMonitor.js","webpack:///../database/dist/cjs/src/core/util/OnlineMonitor.js","webpack:///../database/dist/cjs/src/realtime/TransportManager.js","webpack:///../database/dist/cjs/src/realtime/polling/PacketReceiver.js","webpack:///../database/dist/cjs/src/core/ReadonlyRestClient.js","webpack:///../database/dist/cjs/src/core/view/QueryParams.js","webpack:///../database/dist/cjs/src/core/view/filter/LimitedFilter.js","webpack:///../database/dist/cjs/src/core/Repo_transaction.js","webpack:///../database/dist/cjs/src/core/util/Tree.js","webpack:///../database/dist/cjs/src/api/internal.js","webpack:///../database/dist/cjs/src/api/test_access.js"],"names":["webpackJsonpFirebase","module","exports","__webpack_require__","Object","defineProperty","value","util_1","util_2","util_3","util_4","util_5","util_6","storage_1","util_7","LUIDGenerator","id","sha1","str","utf8Bytes","stringToByteArray","Sha1","update","sha1Bytes","digest","base64","encodeByteArray","buildLogMessage_","var_args","_i","arguments","length","message","i","Array","isArray","apply","stringify","logger","firstLog_","enableLogging","logger_","persistent","assert","console","log","bind","SessionStorage","set","remove","get","logWrapper","prefix","concat","error","fatal","Error","warn","warnIfPageIsSecure","window","location","protocol","indexOf","warnAboutUnsupportedMethod","methodName","isInvalidJSONNumber","data","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","executeWhenDOMReady","fn","isNodeSdk","document","readyState","called_1","wrappedFn_1","body","setTimeout","Math","floor","addEventListener","attachEvent","MIN_NAME","MAX_NAME","nameCompare","a","b","aAsInt","tryParseInt","bAsInt","stringCompare","requireKey","key","obj","ObjectToUniqueKey","keys","k","push","sort","splitStringBySize","segsize","len","dataSegs","c","substring","each","forEach","val","bindCallback","callback","context","doubleToIEEE754String","v","s","e","f","ln","bits","abs","pow","min","LN2","round","reverse","join","hexByteString","hexByte","parseInt","substr","toString","toLowerCase","isChromeExtensionContentScript","test","href","isWindowsStoreApp","Windows","UI","errorForServerCode","code","query","reason","path","toUpperCase","INTEGER_REGEXP_","RegExp","intVal","exceptionGuard","stack","callUserCallback","beingCrawled","search","exportPropGetter","object","name","fnGet","setTimeoutNonBlocking","time","timeout","Path","pathOrString","pieceNum","this","pieces_","split","copyTo","pieceNum_","enumerable","configurable","prototype","getFront","getLength","popFront","getBack","pathString","toUrlEncodedString","encodeURIComponent","String","slice","begin","parent","pieces","child","childPathObj","childPieces","isEmpty","relativePath","outerPath","innerPath","outer","inner","comparePaths","left","right","leftKeys","rightKeys","cmp","equals","other","j","contains","ValidationPath","errorPrefix_","parts_","byteLength_","max","stringLength","checkValid_","pop","last","MAX_PATH_LENGTH_BYTES","MAX_PATH_DEPTH","toErrorString","setNodeFromJSON","nodeFromJSON","setMaxNode","MAX_NODE","__extends","extendStatics","setPrototypeOf","__proto__","d","p","hasOwnProperty","__","constructor","create","Index_1","Node_1","LeafNode_1","PriorityIndex","_super","compare","aPriority","node","getPriority","bPriority","indexCmp","compareTo","isDefinedOn","indexedValueChanged","oldNode","newNode","minPost","NamedNode","MIN","maxPost","LeafNode","makePost","indexValue","priorityNode","Index","PRIORITY_INDEX","EMPTY_NODE","SortedMap_1","snap_1","PriorityIndex_1","KeyIndex_1","IndexMap_1","comparators_1","ChildrenNode","children_","priorityNode_","indexMap_","lazyHash_","validatePriorityNode","SortedMap","NAME_COMPARATOR","IndexMap","Default","isLeafNode","updatePriority","newPriorityNode","getImmediateChild","childName","getChild","front","hasChild","updateImmediateChild","newChildNode","namedNode","newChildren","newIndexMap","newPriority","removeFromIndexes","insert","addToIndexes","updateChild","newImmediateChild","numChildren","count","exportFormat","numKeys","maxKey","allIntegerKeys","forEachChild","childNode","array","hash","toHash_1","priorityHashText","childHash","getPredecessorChildName","index","idx","resolveIndex_","predecessor","getPredecessorKey","getFirstChildName","indexDefinition","minKey","getFirstChild","getLastChildName","getLastChild","action","inorderTraversal","wrappedNode","getIterator","getIteratorFrom","startPost","iterator","Wrap","next","peek","getNext","getReverseIterator","getReverseIteratorFrom","endPost","withIndex","KEY_INDEX","hasIndex","addIndex","isIndexed","otherChildrenNode","thisIter","otherIter","thisCurrent","otherCurrent","MaxNode","call","defineProperties","MAX","KeyIndex","__EMPTY_NODE","__childrenNodeConstructor","Path_1","INVALID_KEY_REGEX_","INVALID_PATH_REGEX_","MAX_LEAF_SIZE_","isValidKey","isValidPathString","isValidRootPathString","replace","isValidPriority","priority","validateFirebaseDataArg","fnName","argumentNumber","optional","undefined","validateFirebaseData","errorPrefix","path_","hasDotValue_1","hasActualChild_1","validateFirebaseMergePaths","mergePaths","curPath","prevPath","validateFirebaseMergeDataArg","validatePriority","validateEventType","eventType","validateKey","validatePathString","validateRootPathString","validateWritablePath","validateUrl","parsedUrl","repoInfo","host","namespace","validateCredential","cred","validateBoolean","bool","validateString","string","validateObject","validateObjectContainsKey","opt_type","safeGet","OperationType","OperationSource","fromUser","fromServer","queryId","tagged","User","Server","forServerTaggedQuery","Change","type","snapshotNode","oldSnap","prevName","valueChange","snapshot","VALUE","childAddedChange","childKey","CHILD_ADDED","childRemovedChange","CHILD_REMOVED","childChangedChange","newSnapshot","oldSnapshot","CHILD_CHANGED","childMovedChange","CHILD_MOVED","assertionError","json","ChildrenNode_1","jsonLeaf","USE_HINZE","node_1","jsonObj_1","childData","children_1","childrenHavePriority_1","hinzeJsonObj_1","childSet","childSet_1","buildChildSet","NAME_ONLY_COMPARATOR","sortedChildSet","getCompare",".priority","DOMStorageWrapper_1","MemoryStorage_1","createStoragefor","domStorageName","domStorage","setItem","removeItem","DOMStorageWrapper","MemoryStorage","PersistentStorage","PROTOCOL_VERSION","VERSION_PARAM","TRANSPORT_SESSION_PARAM","REFERER_PARAM","FORGE_REF","FORGE_DOMAIN","LAST_SESSION_PARAM","WEBSOCKET","LONG_POLLING","oldWrapped","newWrapped","value_",".value","getValue","toHash","compareToLeafNode_","otherLeaf","otherLeafType","thisLeafType","otherIndex","VALUE_TYPE_ORDER","thisIndex","SortedMapIterator","startKey","comparator","isReverse_","resultGenerator_","nodeStack_","result","hasNext","LLRBNode","color","RED","copy","reverseTraversal","min_","n","fixUp_","removeMin_","isRed_","moveRedLeft_","smallest","rotateRight_","moveRedRight_","rotateLeft_","colorFlip_","nl","nr","checkMaxDepth_","blackDepth","check_","BLACK","LLRBEmptyNode","comparator_","root_","rightParent","resultGenerator","ServerValues_1","nodeFromJSON_1","SparseSnapshotTree_1","SyncTree_1","SnapshotHolder_1","AuthTokenProvider_1","StatsManager_1","StatsReporter_1","StatsListener_1","EventQueue_1","PersistentConnection_1","ReadonlyRestClient_1","Database_1","Repo","repoInfo_","forceRestClient","app","_this","dataUpdateCount","statsListener_","eventQueue_","EventQueue","nextWriteId_","interceptServerDataCallback_","onDisconnect_","SparseSnapshotTree","persistentConnection_","authTokenProvider","AuthTokenProvider","stats_","StatsManager","getCollection","server_","ReadonlyRestClient","onDataUpdate_","onConnectStatus_","authOverride","options","PersistentConnection","onServerInfoUpdate_","addTokenChangeListener","token","refreshAuthToken","statsReporter_","getOrCreateReporter","StatsReporter","transactions_init_","infoData_","SnapshotHolder","infoSyncTree_","SyncTree","startListening","tag","currentHashFn","onComplete","infoEvents","getNode","applyServerOverwrite","stopListening","updateInfo_","serverSyncTree_","listen","status","events","raiseEventsForChangedPath","unlisten","secure","serverTime","offsetNode","offset","Date","getTime","generateServerValues","generateWithValues","timestamp","isMerge","taggedChildren","map","raw","applyTaggedQueryMerge","taggedSnap","applyTaggedQueryOverwrite","changedChildren","applyServerMerge","snap","affectedPath","rerunTransactions_","interceptServerData_","connectStatus","runOnDisconnectEvents_","updates","updateSnapshot","getNextWriteId_","setWithPriority","newVal","log_","serverValues","newNodeUnresolved","resolveDeferredValueSnapshot","writeId","applyUserOverwrite","queueEvents","put","errorReason","success","clearEvents","ackUserWrite","callOnCompleteCallback","abortTransactions_","childrenToMerge","empty","changedKey","changedValue","writeId_1","applyUserMerge","merge","changedPath","resolvedOnDisconnectTree","resolveDeferredValueTree","forEachTree","Empty","onDisconnectCancel","forget","onDisconnectSet","onDisconnectPut","remember","onDisconnectSetWithPriority","onDisconnectUpdate","onDisconnectMerge","addEventCallbackForQuery","eventRegistration","addEventRegistration","raiseEventsAtPath","removeEventCallbackForQuery","removeEventRegistration","interrupt","resume","stats","showDelta","StatsListener","longestName","reduce","previousValue","currentValue","stat","statsIncrementCounter","metric","incrementCounter","includeStat","__database","Database","CacheNode","node_","fullyInitialized_","filtered_","isFullyInitialized","isFiltered","isCompleteForPath","isCompleteForChild","onDisconnect_1","TransactionResult_1","NextPushId_1","Query_1","Repo_1","QueryParams_1","validation_1","SyncPoint_1","Reference","repo","QueryParams","DEFAULT","getKey","validateArgCount","getParent","parentPath","getRoot","ref","databaseProp","database","validateCallback","deferred","Deferred","wrapCallback","promise","objectToMerge","newObjectToMerge","transaction","transactionUpdate","applyLocally","catch","promiseComplete","committed","reject","resolve","TransactionResult","startTransaction","setPriority","now","nextPushId","thennablePushRef","pushRef","then","Promise","onDisconnect","OnDisconnect","Query","__referenceConstructor","SyncPoint","DataSnapshot","ref_","index_","exportVal","toJSON","exists","childPathString","childPath","childRef","hasChildren","getRef","emptyChildrenSingleton","EmptyChildren","ImmutableTree","children","fromObject","tree","childSnap","findRootMostMatchingPathAndValue","predicate","childExistingPathAndValue","findRootMostValueAndPath","subtree","childTree","toSet","newChild","setTree","newTree","fold","fold_","pathSoFar","accum","findOnPath","findOnPath_","pathToFollow","nextChild","foreachOnPath","foreachOnPath_","currentRelativePath","foreach","foreach_","foreachChild","Change_1","IndexedFilter","source","optChangeAccumulator","oldChild","trackChildChange","updateFullNode","newSnap","filtersNodes","getIndexedFilter","getIndex","StatsCollection_1","hashString","collections_","StatsCollection","creatorFunction","reporters_","parser_1","_staticInstance","RepoManager","repos_","useRestClient_","getInstance","appName","dbUrl","databaseFromApp","url","parseRepoInfo","createRepo","deleteRepo","appRepos","toURLString","Reference_1","RepoManager_1","repo_","INTERNAL","DatabaseInternals","checkDeleted_","refFromURL","apiName","parsedURL","goOffline","goOnline","ServerValue","TIMESTAMP",".sv","delete","decodePath","pathStringDecoded","piece","decodeURIComponent","RepoInfo_1","dataURL","parseURL","subdomain","domain","webSocketOnly","scheme","RepoInfo","port","colonInd","slashInd","parts","Constants_1","persistenceKey","internalHost","needsQueryParam","isCacheableHost","isDemoHost","isCustomHost","updateHost","newHost","connectionURL","params","connURL","pairs","cancel","ValueIndex_1","PathIndex_1","EventRegistration_1","queryParams_","orderByCalled_","validateQueryEndpoints_","startNode","endNode","hasStart","getIndexStartValue","hasEnd","getIndexEndValue","tooManyArgsError","wrongArgTypeError","getIndexStartName","getIndexEndName","PathIndex","VALUE_INDEX","validateLimit_","hasLimit","hasAnchoredLimit","validateNoPreviousOrderByCall_","getQueryParams","on","cancelCallbackOrContext","ret","getCancelAndContextArgs_","onValueEvent","callbacks","onChildEvent","cancelCallback","container","ValueEventRegistration","ChildEventRegistration","off","validateContextObject","valueCallback","once","userCallback","cancelOrContext","firstCall","onceCallback","err","limitToFirst","limit","limitToLast","orderByChild","parsedPath","newParams","orderBy","orderByKey","orderByPriority","orderByValue","startAt","endAt","equalTo","queryObject","getQueryObject","queryIdentifier","isEqual","sameRepo","samePath","sameQueryIdentifier","ValueIndex","valueNode","_defaultIndexMap","fallbackObject","indexes_","indexSet_","indexKey","sortedMap","existingChildren","childList","sawIndexedValue","iter","newIndex","indexName","newIndexSet","clone","newIndexes","indexedChildren","existingSnap","SortedMap_2","LOG_2","Base12Num","num","current_","mask","bits_","nextBitIsOne","keyFn","mapSortFn","buildBalancedTree","low","high","middle","base12","root","buildPennant","chunkSize","attachPennant","pennant","isOne","indexPath_","extractChild","aChild","bChild","values","resolveDeferredValue","resolvedTree","rawPri","leafNode","childrenNode","CountedSet_1","find","CountedSet","add","self_1","prefixPath","func","item","clear","getCount","Operation_1","Overwrite","OVERWRITE","operationForChild","CacheNode_1","ViewCache_1","View_1","views_","applyOperation","operation","writesCache","optCompleteServerCache","view","events_1","serverCache","serverCacheComplete","eventCache","calcCompleteEventCache","eventCacheComplete","calcCompleteEventChildren","viewCache","ViewCache","View","getInitialEvents","cancelError","removed","cancelEvents","hadCompleteView","hasCompleteView","viewQueryId","getQuery","loadsAllData","getQueryViews","filter","getCompleteServerCache","viewForQuery","getCompleteView","viewExistsForQuery","findValue","eventCache_","serverCache_","updateEventSnap","eventSnap","complete","filtered","updateServerSnap","serverSnap","getEventCache","getCompleteEventSnap","getServerCache","getCompleteServerSnap","collection_","last_","newStats","delta","app_1","VisibilityMonitor_1","OnlineMonitor_1","Connection_1","ServerActions_1","RECONNECT_MIN_DELAY","RECONNECT_MAX_DELAY_DEFAULT","authTokenProvider_","authOverride_","nextPersistentConnectionId_","interruptReasons_","listens_","outstandingPuts_","outstandingPutCount_","onDisconnectRequestQueue_","connected_","reconnectDelay_","maxReconnectDelay_","securityDebugCallback_","lastSessionId","establishConnectionTimer_","visible_","requestCBHash_","requestNumber_","realtime_","authToken_","forceTokenRefresh_","invalidAuthTokenCount_","firstConnection_","lastConnectionAttemptTime_","lastConnectionEstablishedTime_","scheduleConnect_","VisibilityMonitor","onVisible_","OnlineMonitor","onOnline_","sendRequest","onResponse","curReqNum","msg","r","isDefault","listenSpec","hashFn","sendListen_","req","payload","warnOnListenWarnings_","removeListen_","warnings","indexSpec","indexPath","tryAuth","reduceReconnectDelayIfAdminCredential_","credential","isAdmin","token_1","authMethod","isValidFormat","requestData","res","onAuthRevoked_","sendUnlisten_","queryObj","sendOnDisconnect_","request","response","putInternal","sendPut_","queued","reportStats","onDataMessage_","reqNum","onDataPush_","onListenRevoked_","onSecurityDebugPacket_","onReady_","sessionId","handleTimestamp_","sendConnectStats_","restoreState_","clearTimeout","establishConnection_","visible","online","close","onRealtimeDisconnect_","cancelSentTransactions_","shouldReconnect_","timeSinceLastConnectSucceeded","timeSinceLastConnectAttempt","reconnectDelay","random","onDataMessage_1","onReady_1","connId_1","nextConnectionId_","lastSessionId_1","canceled_1","connection_1","closeFn_1","sendRequestFn","forceRefresh","getToken","accessToken","Connection","CONSTANTS","NODE_ADMIN","serverTimeOffset","q","normalizedPathString","statusCode","explanation","notifyForInvalidToken","queries","shift","clientName","NODE_CLIENT","default","SDK_VERSION","isMobileCordova","isReactNative","currentlyOnline","ServerActions","EventEmitter","allowedEvents_","listeners_","trigger","listeners","validateEventType_","eventData","getInitialEvent","splice","et","TransportManager_1","onMessage_","onKill_","connectionCount","pendingDataMessages","state_","transportManager_","TransportManager","start_","conn","initialTransport","conn_","nextTransportId_","primaryResponsesRequired_","onMessageReceived","connReceiver_","onConnectionLost","disconnReceiver_","tx_","rx_","secondaryConn_","isHealthy_","open","healthyTimeout_ms","healthyTimeout_","bytesReceived","markConnectionHealthy","bytesSent","everConnected","onConnectionLost_","onSecondaryConnectionLost_","onPrimaryMessageReceived_","onSecondaryMessageReceived_","dataMsg","t","sendData_","tryCleanupConnection","connId","onSecondaryControl_","controlData","cmd","upgradeIfSecondaryHealthy_","secondaryResponsesRequired_","parsedData","layer","proceedWithUpgrade_","send","start","onControl_","onPrimaryResponse_","onHandshake_","onConnectionShutdown_","onReset_","sendPingOnPrimaryIfNecessary_","handshake","ts","version","h","onConnectionEstablished_","tryStartUpgrade_","upgradeTransport","startUpgrade_","onMessage","closeConnections_","PacketReceiver_1","FIREBASE_LONGPOLL_START_PARAM","FIREBASE_LONGPOLL_CLOSE_COMMAND","FIREBASE_LONGPOLL_COMMAND_CB_NAME","FIREBASE_LONGPOLL_DATA_CB_NAME","FIREBASE_LONGPOLL_ID_PARAM","FIREBASE_LONGPOLL_PW_PARAM","FIREBASE_LONGPOLL_SERIAL_PARAM","FIREBASE_LONGPOLL_CALLBACK_ID_PARAM","FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM","FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET","FIREBASE_LONGPOLL_DATA_PARAM","FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM","FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM","BrowserPollConnection","transportSessionId","everConnected_","urlFn","curSegmentNum","myPacketOrderer","PacketReceiver","isClosed_","connectTimeoutTimer_","onClosed_","scriptTagHolder","FirebaseIFrameScriptHolder","args","command","arg1","arg2","incrementIncomingBytes_","password","sendNewPolls","closeAfter","pN","handleResponse","urlParams","uniqueCallbackIdentifier","connectURL","addTag","startLongPoll","addDisconnectPingFrame","forceAllow","forceAllow_","forceDisallow","forceDisallow_","isAvailable","createElement","shutdown_","myDisconnFrame","removeChild","dataStr","base64data","base64Encode","MAX_URL_DATA_SIZE","enqueueSegment","pw","src","style","display","appendChild","commandCB","onMessageCB","outstandingRequests","pendingSegs","currentSerial","myIFrame","createIFrame_","script","iframeContents","doc","write","iframe","contentWindow","contentDocument","alive","innerHTML","myID","myPW","theURL","nodeRestRequest","newRequest_","curDataString","theSeg","seg","addLongPollTag_","segnum","totalsegs","serial","doNewRequest","keepaliveTimeout","readyStateCB","loadCB","doNodeLongPoll","newScript_1","async","onload","onreadystatechange","rstate","parentNode","onerror","process","setWebSocketImpl","impl","WebSocketImpl","MozWebSocket","WebSocket","WebSocketConnection","keepaliveTimer","frames","totalFrames","connectionURL_","device","headers","User-Agent","platform","env","proxy","origin","mySock","onopen","onclose","onmessage","m","handleIncomingFrame","isOldAndroid","navigator","userAgent","oldAndroidRegex","oldAndroidMatch","match","parseFloat","previouslyFailed","isInMemoryStorage","appendFrame_","fullMess","jsonMess","jsonEval","handleNewFrameCount_","frameCount","extractFrameCount_","isNaN","mess","resetKeepAlive","remainingData","sendString_","clearInterval","setInterval","responsesRequiredToBeHealthy","healthyTimeout","IndexedFilter_1","RangedFilter","indexedFilter_","startPost_","getStartPost_","endPost_","getEndPost_","getStartPost","getEndPost","matches","self","startName","endName","registerDatabase","instance","registerService","unused","TEST_ACCESS","DataSnapshot_1","domStorage_","prefix_","prefixedName_","storedVal","getItem","cache_","PUSH_CHARS","lastPushTime","lastRandChars","duplicateTime","timeStampChars","charAt","Event_1","callback_","cancelCallback_","context_","respondsTo","createEvent","change","DataEvent","getEventRunner","ctx","getEventType","cancelCB_1","cb_1","createCancelEvent","CancelEvent","hasAnyCallback","callbacks_","eventToCheck","cancelCB_2","cb_2","otherCount","otherKey","getAnyKey","thisKey","every","cb","getPath","AckUserWrite_1","ImmutableTree_1","ListenComplete_1","Merge_1","Overwrite_1","WriteTree_1","listenProvider_","syncPointTree_","pendingWriteTree_","WriteTree","tagToQueryMap_","queryToTagMap_","newData","addOverwrite","applyOperationToSyncPoints_","addMerge","changeTree","Merge","revert","getWrite","removeWrite","affectedTree_1","AckUserWrite","applyListenComplete","ListenComplete","queryKey","queryKeyForTag_","parseQueryKey_","queryPath","op","applyTaggedOperation_","applyTaggedListenComplete","foundAncestorDefaultView","pathToSyncPoint","sp","syncPoint","childSyncPoint","completeCache","viewAlreadyExists","makeQueryKey_","getNextQueryTag_","childWrites","setupListener_","maybeSyncPoint","removedAndEvents","removingDefault","findIndex","covered","parentSyncPoint","newViews","collectDistinctViewsForSubTree_","newQuery","listener","createListenerForView_","queryForListening_","tagForQuery_","queryToRemove","tagToRemove","removeTags_","writeIdsToExclude","writeTree","maybeChildSyncPoint","childMap","views_1","childViews","removedQuery","removedQueryKey","removedQueryTag","queriesToStop","queries_1","childQueries","queryToStop","splitIndex","nextQueryTag_","applyOperationHelper_","syncPointTree","applyOperationDescendantsHelper_","childOperation","childServerCache","childWritesCache","affectedTree","ACK_USER_WRITE","LISTEN_COMPLETE","MERGE","ViewProcessor_1","EventGenerator_1","query_","initialViewCache","eventRegistrations_","indexFilter","getNodeFilter","processor_","ViewProcessor","initialServerCache","initialEventCache","newServerCache","newEventCache","viewCache_","eventGenerator_","EventGenerator","cache","path_1","registration","maybeEvent","remaining","existing","completeServerCache","oldViewCache","assertIndexed","generateEventsForChanges_","changes","initialChanges","registrations","generateEventsForChanges","ChildChangeAccumulator_1","CompleteChildSource_1","ProcessorResult","filter_","newViewCache","filterServerNode","accumulator","ChildChangeAccumulator","overwrite","applyUserOverwrite_","applyServerOverwrite_","applyUserMerge_","applyServerMerge_","revertUserWrite_","ackUserWrite_","listenComplete_","getChanges","maybeAddValueEvent_","isLeafOrEmpty","oldCompleteSnap","generateEventCacheAfterServerEvent_","changePath","oldEventSnap","shadowingWrite","serverNode","completeChildren","completeEventChildren","completeNode","oldEventNode","updatedPriority","calcEventCacheAfterServerOverwrite","childChangePath","newEventChild","eventChildUpdate","calcCompleteChild","changedSnap","oldServerSnap","serverFilter","newServerNode","NO_COMPLETE_CHILD_SOURCE","WriteTreeCompleteChildSource","getCompleteChild","newEventSnap","cacheHasChild_","curViewCache","writePath","applyMerge_","viewMergeTree","serverChild","childMergeTree","isUnknownDeepMerge","ackPath","changedChildren_1","changedChildren_2","mergePath","serverCachePath","oldServerNode","oldEventCache","serverChildren","changeMap_","oldChange","oldType","getValues","NoCompleteChildSource_","getChildAfterChild","writes_","optCompleteServerCache_","completeServerData","nodes","calcIndexedSlice","eventRegistrations","moves","generateEventsForType_","filteredChanges","compareChanges_","materializedChange","materializeSingleChange_","aWrapped","bWrapped","CompoundWrite_1","visibleWrites_","CompoundWrite","allWrites_","lastWriteId_","WriteTreeRef","addWrite","addWrites","record","writeToRemove","removedWriteWasVisible","removedWriteOverlapsWithOtherWrites","currentWrite","recordContainsPath_","resetTree_","getCompleteWriteData","getCompleteNode","treePath","includeHiddenWrites","childCompoundWrite","hasCompleteWrite","mergeAtPath","layerTree_","layeredCache","shadowingNode","subMerge","completeServerChildren","topLevelSet","merge_1","getCompleteChildren","existingEventSnap","existingServerSnap","childMerge","toIterate","writeRecord","findKey","DefaultFilter_","writes","treeRoot","compoundWrite","deepNode","treePath_","writeTree_","existingServerCache","rootmost","rootMostPath","newWrite","applySubtreeWrite_","priorityWrite_1","rootNode_","newSnapshotNode","app_","removeTokenChangeListener","errorMessage","counters_","amount","deepCopy","FIRST_STATS_MIN_TIME","FIRST_STATS_MAX_TIME","collection","statsToReport_","reportStats_","reportedStats","haveStatsToReport","eventLists_","recursionDepth_","eventDataList","currList","eventPath","EventList","raiseQueuedEventsMatchingPredicate_","sentAll","eventList","raise","events_","eventFn","EventEmitter_1","hidden","visibilityChange","online_","BrowserPollConnection_1","WebSocketConnection_1","initTransports_","isWebSocketsAvailable","isSkipPollConnection","transports_","transports_1","ALL_TRANSPORTS","transport","pendingResponses","currentResponseNum","closeAfterResponse","onClose","responseNum","requestNum","this_1","toProcess","getListenId_","listenId","thisListen","queryStringParamaters","toRestQueryStringParameters","restRequest_","status_1","queryStringParameters","authTokenData","authToken","querystring","xhr","XMLHttpRequest","responseText","LimitedFilter_1","RangedFilter_1","limitSet_","startSet_","startNameSet_","endSet_","endNameSet_","limit_","viewFrom_","indexStartValue_","indexStartName_","indexEndValue_","indexEndName_","isViewFromLeft","WIRE_PROTOCOL_CONSTANTS_","VIEW_FROM_LEFT","getLimit","copy_","newLimit","VIEW_FROM_RIGHT","WIRE_PROTOCOL_CONSTANTS","INDEX_START_VALUE","INDEX_START_NAME","INDEX_END_VALUE","INDEX_END_NAME","LIMIT","viewFrom","VIEW_FROM","INDEX","LimitedFilter","REST_CONSTANTS","REST_QUERY_CONSTANTS_","qs","ORDER_BY","START_AT","END_AT","LIMIT_TO_FIRST","LIMIT_TO_LAST","rangedFilter_","reverse_","fullLimitUpdateChild_","inRange","indexCompare_1","foundStartPost","changeAccumulator","indexCmp_1","newChildNamedNode","windowBoundary","oldChildSnap","compareNext","TransactionStatus","Tree_1","MAX_TRANSACTION_RETRIES_","transactionQueueTree_","Tree","watchRef","unwatcher","order","retryCount","abortReason","currentWriteId","currentInputSnapshot","currentOutputSnapshotRaw","currentOutputSnapshotResolved","currentState","getLatestState_","RUN","queueNode","subTree","nodeQueue","setValue","priorityForNode","sendReadyTransactions_","excludeSets","pruneCompletedTransactionsBelowNode_","queue","buildTransactionQueue_","sendTransactionQueue_","setsToIgnore","txn","latestState","snapToSend","latestHash","SENT","dataToSend","pathToSend","COMPLETED","SENT_NEEDS_ABORT","NEEDS_ABORT","rootMostTransactionNode","getAncestorTransactionNode_","rerunTransactionQueue_","txnsToRerun","abortTransaction","currentNode","newDataNode","hasExplicitPriority","oldWriteId","newNodeResolved","lastInput","transactionNode","transactionQueue","aggregateTransactionQueuesForNode_","to","from","forEachAncestor","abortTransactionsOnNode_","forEachDescendant","lastSent","TreeNode","childCount","name_","parent_","pathObj","updateParents_","includeSelf","childrenFirst","forEachImmediateDescendantWithValue","updateChild_","childEmpty","childExists","forceLongPolling","forceWebSockets","setSecurityDebugCallback","interceptServerData","DataConnection","simpleListen","echo","onEcho","RealTimeConnection","hijackHash","newHash","oldPut","opt_onComplete","opt_hash","ConnectionTarget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X,UAAAsb,IAAA,SAAAjb,EAAA5G,EAAA2vD,EAAAC,OACAv9C,KAAAu9C,IACAA,EAAAH,KAEAC,EAAAz+C,KAAAjL,KAAAY,EAAA5G,EAAA2vD,EAAAC,IAEA,WACA3zC,EAAA4B,qBAAAtX,UAAAsb,IAAA6tC,IAMA1zD,EAAA6zD,iBAAAzhC,EAAAO,SAKA3yB,EAAAw3B,gBAAA,SAAA9uB,GACA,MAAAA,GAAA8uB,mBAMAx3B,EAAA8zD,QAAA,SAAAC,GACA,MAAAA,GAAAhqC,KAAA9I,EAAA0e,IAOA3/B,EAAAsgB,gBAAA,SAAAA,GACA4Q,EAAAd,YAAAG,cAAAjQ,uBnF42gBG,KACO,MAAMld,GACN,KAAUE,OACR","file":"firebase-database.js","sourcesContent":["/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\ntry {\n webpackJsonpFirebase([0],[\n/* 0 */,\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar util_3 = __webpack_require__(0);\nvar util_4 = __webpack_require__(0);\nvar util_5 = __webpack_require__(0);\nvar util_6 = __webpack_require__(0);\nvar storage_1 = __webpack_require__(12);\nvar util_7 = __webpack_require__(0);\n/**\n * Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).\n * @type {function(): number} Generated ID.\n */\nexports.LUIDGenerator = (function () {\n var id = 1;\n return function () {\n return id++;\n };\n})();\n/**\n * Sha1 hash of the input string\n * @param {!string} str The string to hash\n * @return {!string} The resulting hash\n */\nexports.sha1 = function (str) {\n var utf8Bytes = util_5.stringToByteArray(str);\n var sha1 = new util_4.Sha1();\n sha1.update(utf8Bytes);\n var sha1Bytes = sha1.digest();\n return util_3.base64.encodeByteArray(sha1Bytes);\n};\n/**\n * @param {...*} var_args\n * @return {string}\n * @private\n */\nvar buildLogMessage_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var message = '';\n for (var i = 0; i < var_args.length; i++) {\n if (Array.isArray(var_args[i]) ||\n (var_args[i] &&\n typeof var_args[i] === 'object' &&\n typeof var_args[i].length === 'number')) {\n message += buildLogMessage_.apply(null, var_args[i]);\n }\n else if (typeof var_args[i] === 'object') {\n message += util_6.stringify(var_args[i]);\n }\n else {\n message += var_args[i];\n }\n message += ' ';\n }\n return message;\n};\n/**\n * Use this for all debug messages in Firebase.\n * @type {?function(string)}\n */\nexports.logger = null;\n/**\n * Flag to check for log availability on first log message\n * @type {boolean}\n * @private\n */\nvar firstLog_ = true;\n/**\n * The implementation of Firebase.enableLogging (defined here to break dependencies)\n * @param {boolean|?function(string)} logger_ A flag to turn on logging, or a custom logger\n * @param {boolean=} persistent Whether or not to persist logging settings across refreshes\n */\nexports.enableLogging = function (logger_, persistent) {\n util_1.assert(!persistent || (logger_ === true || logger_ === false), \"Can't turn on custom loggers persistently.\");\n if (logger_ === true) {\n if (typeof console !== 'undefined') {\n if (typeof console.log === 'function') {\n exports.logger = console.log.bind(console);\n }\n else if (typeof console.log === 'object') {\n // IE does this.\n exports.logger = function (message) {\n console.log(message);\n };\n }\n }\n if (persistent)\n storage_1.SessionStorage.set('logging_enabled', true);\n }\n else if (typeof logger_ === 'function') {\n exports.logger = logger_;\n }\n else {\n exports.logger = null;\n storage_1.SessionStorage.remove('logging_enabled');\n }\n};\n/**\n *\n * @param {...(string|Arguments)} var_args\n */\nexports.log = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (firstLog_ === true) {\n firstLog_ = false;\n if (exports.logger === null && storage_1.SessionStorage.get('logging_enabled') === true)\n exports.enableLogging(true);\n }\n if (exports.logger) {\n var message = buildLogMessage_.apply(null, var_args);\n exports.logger(message);\n }\n};\n/**\n * @param {!string} prefix\n * @return {function(...[*])}\n */\nexports.logWrapper = function (prefix) {\n return function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n exports.log.apply(void 0, [prefix].concat(var_args));\n };\n};\n/**\n * @param {...string} var_args\n */\nexports.error = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n var message = 'FIREBASE INTERNAL ERROR: ' + buildLogMessage_.apply(void 0, var_args);\n if (typeof console.error !== 'undefined') {\n console.error(message);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * @param {...string} var_args\n */\nexports.fatal = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var message = buildLogMessage_.apply(void 0, var_args);\n throw new Error('FIREBASE FATAL ERROR: ' + message);\n};\n/**\n * @param {...*} var_args\n */\nexports.warn = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n var message = 'FIREBASE WARNING: ' + buildLogMessage_.apply(void 0, var_args);\n if (typeof console.warn !== 'undefined') {\n console.warn(message);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * Logs a warning if the containing page uses https. Called when a call to new Firebase\n * does not use https.\n */\nexports.warnIfPageIsSecure = function () {\n // Be very careful accessing browser globals. Who knows what may or may not exist.\n if (typeof window !== 'undefined' &&\n window.location &&\n window.location.protocol &&\n window.location.protocol.indexOf('https:') !== -1) {\n exports.warn('Insecure Firebase access from a secure page. ' +\n 'Please use https in calls to new Firebase().');\n }\n};\n/**\n * @param {!String} methodName\n */\nexports.warnAboutUnsupportedMethod = function (methodName) {\n exports.warn(methodName +\n ' is unsupported and will likely change soon. ' +\n 'Please do not use.');\n};\n/**\n * Returns true if data is NaN, or +/- Infinity.\n * @param {*} data\n * @return {boolean}\n */\nexports.isInvalidJSONNumber = function (data) {\n return (typeof data === 'number' &&\n (data != data || // NaN\n data == Number.POSITIVE_INFINITY ||\n data == Number.NEGATIVE_INFINITY));\n};\n/**\n * @param {function()} fn\n */\nexports.executeWhenDOMReady = function (fn) {\n if (util_7.isNodeSdk() || document.readyState === 'complete') {\n fn();\n }\n else {\n // Modeled after jQuery. Try DOMContentLoaded and onreadystatechange (which\n // fire before onload), but fall back to onload.\n var called_1 = false;\n var wrappedFn_1 = function () {\n if (!document.body) {\n setTimeout(wrappedFn_1, Math.floor(10));\n return;\n }\n if (!called_1) {\n called_1 = true;\n fn();\n }\n };\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', wrappedFn_1, false);\n // fallback to onload.\n window.addEventListener('load', wrappedFn_1, false);\n }\n else if (document.attachEvent) {\n // IE.\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'complete')\n wrappedFn_1();\n });\n // fallback to onload.\n window.attachEvent('onload', wrappedFn_1);\n // jQuery has an extra hack for IE that we could employ (based on\n // http://javascript.nwbox.com/IEContentLoaded/) But it looks really old.\n // I'm hoping we don't need it.\n }\n }\n};\n/**\n * Minimum key name. Invalid for actual data, used as a marker to sort before any valid names\n * @type {!string}\n */\nexports.MIN_NAME = '[MIN_NAME]';\n/**\n * Maximum key name. Invalid for actual data, used as a marker to sort above any valid names\n * @type {!string}\n */\nexports.MAX_NAME = '[MAX_NAME]';\n/**\n * Compares valid Firebase key names, plus min and max name\n * @param {!string} a\n * @param {!string} b\n * @return {!number}\n */\nexports.nameCompare = function (a, b) {\n if (a === b) {\n return 0;\n }\n else if (a === exports.MIN_NAME || b === exports.MAX_NAME) {\n return -1;\n }\n else if (b === exports.MIN_NAME || a === exports.MAX_NAME) {\n return 1;\n }\n else {\n var aAsInt = exports.tryParseInt(a), bAsInt = exports.tryParseInt(b);\n if (aAsInt !== null) {\n if (bAsInt !== null) {\n return aAsInt - bAsInt == 0 ? a.length - b.length : aAsInt - bAsInt;\n }\n else {\n return -1;\n }\n }\n else if (bAsInt !== null) {\n return 1;\n }\n else {\n return a < b ? -1 : 1;\n }\n }\n};\n/**\n * @param {!string} a\n * @param {!string} b\n * @return {!number} comparison result.\n */\nexports.stringCompare = function (a, b) {\n if (a === b) {\n return 0;\n }\n else if (a < b) {\n return -1;\n }\n else {\n return 1;\n }\n};\n/**\n * @param {string} key\n * @param {Object} obj\n * @return {*}\n */\nexports.requireKey = function (key, obj) {\n if (obj && key in obj) {\n return obj[key];\n }\n else {\n throw new Error('Missing required key (' + key + ') in object: ' + util_6.stringify(obj));\n }\n};\n/**\n * @param {*} obj\n * @return {string}\n */\nexports.ObjectToUniqueKey = function (obj) {\n if (typeof obj !== 'object' || obj === null)\n return util_6.stringify(obj);\n var keys = [];\n for (var k in obj) {\n keys.push(k);\n }\n // Export as json, but with the keys sorted.\n keys.sort();\n var key = '{';\n for (var i = 0; i < keys.length; i++) {\n if (i !== 0)\n key += ',';\n key += util_6.stringify(keys[i]);\n key += ':';\n key += exports.ObjectToUniqueKey(obj[keys[i]]);\n }\n key += '}';\n return key;\n};\n/**\n * Splits a string into a number of smaller segments of maximum size\n * @param {!string} str The string\n * @param {!number} segsize The maximum number of chars in the string.\n * @return {Array.} The string, split into appropriately-sized chunks\n */\nexports.splitStringBySize = function (str, segsize) {\n var len = str.length;\n if (len <= segsize) {\n return [str];\n }\n var dataSegs = [];\n for (var c = 0; c < len; c += segsize) {\n if (c + segsize > len) {\n dataSegs.push(str.substring(c, len));\n }\n else {\n dataSegs.push(str.substring(c, c + segsize));\n }\n }\n return dataSegs;\n};\n/**\n * Apply a function to each (key, value) pair in an object or\n * apply a function to each (index, value) pair in an array\n * @param {!(Object|Array)} obj The object or array to iterate over\n * @param {function(?, ?)} fn The function to apply\n */\nexports.each = function (obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; ++i) {\n fn(i, obj[i]);\n }\n }\n else {\n /**\n * in the conversion of code we removed the goog.object.forEach\n * function which did a value,key callback. We standardized on\n * a single impl that does a key, value callback. So we invert\n * to not have to touch the `each` code points\n */\n util_2.forEach(obj, function (key, val) { return fn(val, key); });\n }\n};\n/**\n * Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.\n * @param {function(*)} callback Callback function.\n * @param {?Object=} context Optional context to bind to.\n * @return {function(*)}\n */\nexports.bindCallback = function (callback, context) {\n return context ? callback.bind(context) : callback;\n};\n/**\n * Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)\n * I made one modification at the end and removed the NaN / Infinity\n * handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.\n * @param {!number} v A double\n * @return {string}\n */\nexports.doubleToIEEE754String = function (v) {\n util_1.assert(!exports.isInvalidJSONNumber(v), 'Invalid JSON number'); // MJL\n var ebits = 11, fbits = 52;\n var bias = (1 << (ebits - 1)) - 1, s, e, f, ln, i, bits, str;\n // Compute sign, exponent, fraction\n // Skip NaN / Infinity handling --MJL.\n if (v === 0) {\n e = 0;\n f = 0;\n s = 1 / v === -Infinity ? 1 : 0;\n }\n else {\n s = v < 0;\n v = Math.abs(v);\n if (v >= Math.pow(2, 1 - bias)) {\n // Normalized\n ln = Math.min(Math.floor(Math.log(v) / Math.LN2), bias);\n e = ln + bias;\n f = Math.round(v * Math.pow(2, fbits - ln) - Math.pow(2, fbits));\n }\n else {\n // Denormalized\n e = 0;\n f = Math.round(v / Math.pow(2, 1 - bias - fbits));\n }\n }\n // Pack sign, exponent, fraction\n bits = [];\n for (i = fbits; i; i -= 1) {\n bits.push(f % 2 ? 1 : 0);\n f = Math.floor(f / 2);\n }\n for (i = ebits; i; i -= 1) {\n bits.push(e % 2 ? 1 : 0);\n e = Math.floor(e / 2);\n }\n bits.push(s ? 1 : 0);\n bits.reverse();\n str = bits.join('');\n // Return the data as a hex string. --MJL\n var hexByteString = '';\n for (i = 0; i < 64; i += 8) {\n var hexByte = parseInt(str.substr(i, 8), 2).toString(16);\n if (hexByte.length === 1)\n hexByte = '0' + hexByte;\n hexByteString = hexByteString + hexByte;\n }\n return hexByteString.toLowerCase();\n};\n/**\n * Used to detect if we're in a Chrome content script (which executes in an\n * isolated environment where long-polling doesn't work).\n * @return {boolean}\n */\nexports.isChromeExtensionContentScript = function () {\n return !!(typeof window === 'object' &&\n window['chrome'] &&\n window['chrome']['extension'] &&\n !/^chrome/.test(window.location.href));\n};\n/**\n * Used to detect if we're in a Windows 8 Store app.\n * @return {boolean}\n */\nexports.isWindowsStoreApp = function () {\n // Check for the presence of a couple WinRT globals\n return typeof Windows === 'object' && typeof Windows.UI === 'object';\n};\n/**\n * Converts a server error code to a Javascript Error\n * @param {!string} code\n * @param {!Query} query\n * @return {Error}\n */\nexports.errorForServerCode = function (code, query) {\n var reason = 'Unknown Error';\n if (code === 'too_big') {\n reason =\n 'The data requested exceeds the maximum size ' +\n 'that can be accessed with a single request.';\n }\n else if (code == 'permission_denied') {\n reason = \"Client doesn't have permission to access the desired data.\";\n }\n else if (code == 'unavailable') {\n reason = 'The service is unavailable';\n }\n var error = new Error(code + ' at ' + query.path.toString() + ': ' + reason);\n error.code = code.toUpperCase();\n return error;\n};\n/**\n * Used to test for integer-looking strings\n * @type {RegExp}\n * @private\n */\nexports.INTEGER_REGEXP_ = new RegExp('^-?\\\\d{1,10}$');\n/**\n * If the string contains a 32-bit integer, return it. Else return null.\n * @param {!string} str\n * @return {?number}\n */\nexports.tryParseInt = function (str) {\n if (exports.INTEGER_REGEXP_.test(str)) {\n var intVal = Number(str);\n if (intVal >= -2147483648 && intVal <= 2147483647) {\n return intVal;\n }\n }\n return null;\n};\n/**\n * Helper to run some code but catch any exceptions and re-throw them later.\n * Useful for preventing user callbacks from breaking internal code.\n *\n * Re-throwing the exception from a setTimeout is a little evil, but it's very\n * convenient (we don't have to try to figure out when is a safe point to\n * re-throw it), and the behavior seems reasonable:\n *\n * * If you aren't pausing on exceptions, you get an error in the console with\n * the correct stack trace.\n * * If you're pausing on all exceptions, the debugger will pause on your\n * exception and then again when we rethrow it.\n * * If you're only pausing on uncaught exceptions, the debugger will only pause\n * on us re-throwing it.\n *\n * @param {!function()} fn The code to guard.\n */\nexports.exceptionGuard = function (fn) {\n try {\n fn();\n }\n catch (e) {\n // Re-throw exception when it's safe.\n setTimeout(function () {\n // It used to be that \"throw e\" would result in a good console error with\n // relevant context, but as of Chrome 39, you just get the firebase.js\n // file/line number where we re-throw it, which is useless. So we log\n // e.stack explicitly.\n var stack = e.stack || '';\n exports.warn('Exception was thrown by user callback.', stack);\n throw e;\n }, Math.floor(0));\n }\n};\n/**\n * Helper function to safely call opt_callback with the specified arguments. It:\n * 1. Turns into a no-op if opt_callback is null or undefined.\n * 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.\n *\n * @param {?Function=} callback Optional onComplete callback.\n * @param {...*} var_args Arbitrary args to be passed to opt_onComplete\n */\nexports.callUserCallback = function (callback) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (typeof callback === 'function') {\n exports.exceptionGuard(function () {\n callback.apply(void 0, var_args);\n });\n }\n};\n/**\n * @return {boolean} true if we think we're currently being crawled.\n */\nexports.beingCrawled = function () {\n var userAgent = (typeof window === 'object' &&\n window['navigator'] &&\n window['navigator']['userAgent']) ||\n '';\n // For now we whitelist the most popular crawlers. We should refine this to be the set of crawlers we\n // believe to support JavaScript/AJAX rendering.\n // NOTE: Google Webmaster Tools doesn't really belong, but their \"This is how a visitor to your website\n // would have seen the page\" is flaky if we don't treat it as a crawler.\n return (userAgent.search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i) >= 0);\n};\n/**\n * Export a property of an object using a getter function.\n *\n * @param {!Object} object\n * @param {string} name\n * @param {!function(): *} fnGet\n */\nexports.exportPropGetter = function (object, name, fnGet) {\n Object.defineProperty(object, name, { get: fnGet });\n};\n/**\n * Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.\n *\n * It is removed with clearTimeout() as normal.\n *\n * @param {Function} fn Function to run.\n * @param {number} time Milliseconds to wait before running.\n * @return {number|Object} The setTimeout() return value.\n */\nexports.setTimeoutNonBlocking = function (fn, time) {\n var timeout = setTimeout(fn, time);\n if (typeof timeout === 'object' && timeout['unref']) {\n timeout['unref']();\n }\n return timeout;\n};\n\n//# sourceMappingURL=util.js.map\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\nvar util_2 = __webpack_require__(0);\n/**\n * An immutable object representing a parsed path. It's immutable so that you\n * can pass them around to other functions without worrying about them changing\n * it.\n */\nvar Path = /** @class */ (function () {\n /**\n * @param {string|Array.} pathOrString Path string to parse,\n * or another path, or the raw tokens array\n * @param {number=} pieceNum\n */\n function Path(pathOrString, pieceNum) {\n if (pieceNum === void 0) {\n this.pieces_ = pathOrString.split('/');\n // Remove empty pieces.\n var copyTo = 0;\n for (var i = 0; i < this.pieces_.length; i++) {\n if (this.pieces_[i].length > 0) {\n this.pieces_[copyTo] = this.pieces_[i];\n copyTo++;\n }\n }\n this.pieces_.length = copyTo;\n this.pieceNum_ = 0;\n }\n else {\n this.pieces_ = pathOrString;\n this.pieceNum_ = pieceNum;\n }\n }\n Object.defineProperty(Path, \"Empty\", {\n /**\n * Singleton to represent an empty path\n *\n * @const\n */\n get: function () {\n return new Path('');\n },\n enumerable: true,\n configurable: true\n });\n Path.prototype.getFront = function () {\n if (this.pieceNum_ >= this.pieces_.length)\n return null;\n return this.pieces_[this.pieceNum_];\n };\n /**\n * @return {number} The number of segments in this path\n */\n Path.prototype.getLength = function () {\n return this.pieces_.length - this.pieceNum_;\n };\n /**\n * @return {!Path}\n */\n Path.prototype.popFront = function () {\n var pieceNum = this.pieceNum_;\n if (pieceNum < this.pieces_.length) {\n pieceNum++;\n }\n return new Path(this.pieces_, pieceNum);\n };\n /**\n * @return {?string}\n */\n Path.prototype.getBack = function () {\n if (this.pieceNum_ < this.pieces_.length)\n return this.pieces_[this.pieces_.length - 1];\n return null;\n };\n Path.prototype.toString = function () {\n var pathString = '';\n for (var i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + this.pieces_[i];\n }\n return pathString || '/';\n };\n Path.prototype.toUrlEncodedString = function () {\n var pathString = '';\n for (var i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + encodeURIComponent(String(this.pieces_[i]));\n }\n return pathString || '/';\n };\n /**\n * Shallow copy of the parts of the path.\n *\n * @param {number=} begin\n * @return {!Array}\n */\n Path.prototype.slice = function (begin) {\n if (begin === void 0) { begin = 0; }\n return this.pieces_.slice(this.pieceNum_ + begin);\n };\n /**\n * @return {?Path}\n */\n Path.prototype.parent = function () {\n if (this.pieceNum_ >= this.pieces_.length)\n return null;\n var pieces = [];\n for (var i = this.pieceNum_; i < this.pieces_.length - 1; i++)\n pieces.push(this.pieces_[i]);\n return new Path(pieces, 0);\n };\n /**\n * @param {string|!Path} childPathObj\n * @return {!Path}\n */\n Path.prototype.child = function (childPathObj) {\n var pieces = [];\n for (var i = this.pieceNum_; i < this.pieces_.length; i++)\n pieces.push(this.pieces_[i]);\n if (childPathObj instanceof Path) {\n for (var i = childPathObj.pieceNum_; i < childPathObj.pieces_.length; i++) {\n pieces.push(childPathObj.pieces_[i]);\n }\n }\n else {\n var childPieces = childPathObj.split('/');\n for (var i = 0; i < childPieces.length; i++) {\n if (childPieces[i].length > 0)\n pieces.push(childPieces[i]);\n }\n }\n return new Path(pieces, 0);\n };\n /**\n * @return {boolean} True if there are no segments in this path\n */\n Path.prototype.isEmpty = function () {\n return this.pieceNum_ >= this.pieces_.length;\n };\n /**\n * @param {!Path} outerPath\n * @param {!Path} innerPath\n * @return {!Path} The path from outerPath to innerPath\n */\n Path.relativePath = function (outerPath, innerPath) {\n var outer = outerPath.getFront(), inner = innerPath.getFront();\n if (outer === null) {\n return innerPath;\n }\n else if (outer === inner) {\n return Path.relativePath(outerPath.popFront(), innerPath.popFront());\n }\n else {\n throw new Error('INTERNAL ERROR: innerPath (' +\n innerPath +\n ') is not within ' +\n 'outerPath (' +\n outerPath +\n ')');\n }\n };\n /**\n * @param {!Path} left\n * @param {!Path} right\n * @return {number} -1, 0, 1 if left is less, equal, or greater than the right.\n */\n Path.comparePaths = function (left, right) {\n var leftKeys = left.slice();\n var rightKeys = right.slice();\n for (var i = 0; i < leftKeys.length && i < rightKeys.length; i++) {\n var cmp = util_1.nameCompare(leftKeys[i], rightKeys[i]);\n if (cmp !== 0)\n return cmp;\n }\n if (leftKeys.length === rightKeys.length)\n return 0;\n return leftKeys.length < rightKeys.length ? -1 : 1;\n };\n /**\n *\n * @param {Path} other\n * @return {boolean} true if paths are the same.\n */\n Path.prototype.equals = function (other) {\n if (this.getLength() !== other.getLength()) {\n return false;\n }\n for (var i = this.pieceNum_, j = other.pieceNum_; i <= this.pieces_.length; i++, j++) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n }\n return true;\n };\n /**\n *\n * @param {!Path} other\n * @return {boolean} True if this path is a parent (or the same as) other\n */\n Path.prototype.contains = function (other) {\n var i = this.pieceNum_;\n var j = other.pieceNum_;\n if (this.getLength() > other.getLength()) {\n return false;\n }\n while (i < this.pieces_.length) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n ++i;\n ++j;\n }\n return true;\n };\n return Path;\n}()); // end Path\nexports.Path = Path;\n/**\n * Dynamic (mutable) path used to count path lengths.\n *\n * This class is used to efficiently check paths for valid\n * length (in UTF8 bytes) and depth (used in path validation).\n *\n * Throws Error exception if path is ever invalid.\n *\n * The definition of a path always begins with '/'.\n */\nvar ValidationPath = /** @class */ (function () {\n /**\n * @param {!Path} path Initial Path.\n * @param {string} errorPrefix_ Prefix for any error messages.\n */\n function ValidationPath(path, errorPrefix_) {\n this.errorPrefix_ = errorPrefix_;\n /** @type {!Array} */\n this.parts_ = path.slice();\n /** @type {number} Initialize to number of '/' chars needed in path. */\n this.byteLength_ = Math.max(1, this.parts_.length);\n for (var i = 0; i < this.parts_.length; i++) {\n this.byteLength_ += util_2.stringLength(this.parts_[i]);\n }\n this.checkValid_();\n }\n Object.defineProperty(ValidationPath, \"MAX_PATH_DEPTH\", {\n /** @const {number} Maximum key depth. */\n get: function () {\n return 32;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValidationPath, \"MAX_PATH_LENGTH_BYTES\", {\n /** @const {number} Maximum number of (UTF8) bytes in a Firebase path. */\n get: function () {\n return 768;\n },\n enumerable: true,\n configurable: true\n });\n /** @param {string} child */\n ValidationPath.prototype.push = function (child) {\n // Count the needed '/'\n if (this.parts_.length > 0) {\n this.byteLength_ += 1;\n }\n this.parts_.push(child);\n this.byteLength_ += util_2.stringLength(child);\n this.checkValid_();\n };\n ValidationPath.prototype.pop = function () {\n var last = this.parts_.pop();\n this.byteLength_ -= util_2.stringLength(last);\n // Un-count the previous '/'\n if (this.parts_.length > 0) {\n this.byteLength_ -= 1;\n }\n };\n ValidationPath.prototype.checkValid_ = function () {\n if (this.byteLength_ > ValidationPath.MAX_PATH_LENGTH_BYTES) {\n throw new Error(this.errorPrefix_ +\n 'has a key path longer than ' +\n ValidationPath.MAX_PATH_LENGTH_BYTES +\n ' bytes (' +\n this.byteLength_ +\n ').');\n }\n if (this.parts_.length > ValidationPath.MAX_PATH_DEPTH) {\n throw new Error(this.errorPrefix_ +\n 'path specified exceeds the maximum depth that can be written (' +\n ValidationPath.MAX_PATH_DEPTH +\n ') or object contains a cycle ' +\n this.toErrorString());\n }\n };\n /**\n * String for use in error messages - uses '.' notation for path.\n *\n * @return {string}\n */\n ValidationPath.prototype.toErrorString = function () {\n if (this.parts_.length == 0) {\n return '';\n }\n return \"in property '\" + this.parts_.join('.') + \"'\";\n };\n return ValidationPath;\n}());\nexports.ValidationPath = ValidationPath;\n\n//# sourceMappingURL=Path.js.map\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = __webpack_require__(14);\nvar util_1 = __webpack_require__(1);\nvar Node_1 = __webpack_require__(5);\nvar LeafNode_1 = __webpack_require__(15);\nvar nodeFromJSON;\nvar MAX_NODE;\nfunction setNodeFromJSON(val) {\n nodeFromJSON = val;\n}\nexports.setNodeFromJSON = setNodeFromJSON;\nfunction setMaxNode(val) {\n MAX_NODE = val;\n}\nexports.setMaxNode = setMaxNode;\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nvar PriorityIndex = /** @class */ (function (_super) {\n __extends(PriorityIndex, _super);\n function PriorityIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.compare = function (a, b) {\n var aPriority = a.node.getPriority();\n var bPriority = b.node.getPriority();\n var indexCmp = aPriority.compareTo(bPriority);\n if (indexCmp === 0) {\n return util_1.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.isDefinedOn = function (node) {\n return !node.getPriority().isEmpty();\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return !oldNode.getPriority().equals(newNode.getPriority());\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.maxPost = function () {\n return new Node_1.NamedNode(util_1.MAX_NAME, new LeafNode_1.LeafNode('[PRIORITY-POST]', MAX_NODE));\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n PriorityIndex.prototype.makePost = function (indexValue, name) {\n var priorityNode = nodeFromJSON(indexValue);\n return new Node_1.NamedNode(name, new LeafNode_1.LeafNode('[PRIORITY-POST]', priorityNode));\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n PriorityIndex.prototype.toString = function () {\n return '.priority';\n };\n return PriorityIndex;\n}(Index_1.Index));\nexports.PriorityIndex = PriorityIndex;\nexports.PRIORITY_INDEX = new PriorityIndex();\n\n//# sourceMappingURL=PriorityIndex.js.map\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar SortedMap_1 = __webpack_require__(16);\nvar Node_1 = __webpack_require__(5);\nvar snap_1 = __webpack_require__(37);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar KeyIndex_1 = __webpack_require__(10);\nvar IndexMap_1 = __webpack_require__(39);\nvar LeafNode_1 = __webpack_require__(15);\nvar comparators_1 = __webpack_require__(41);\n// TODO: For memory savings, don't store priorityNode_ if it's empty.\nvar EMPTY_NODE;\n/**\n * ChildrenNode is a class for storing internal nodes in a DataSnapshot\n * (i.e. nodes with children). It implements Node and stores the\n * list of children in the children property, sorted by child name.\n *\n * @constructor\n * @implements {Node}\n */\nvar ChildrenNode = /** @class */ (function () {\n /**\n *\n * @param {!SortedMap.} children_ List of children\n * of this node..\n * @param {?Node} priorityNode_ The priority of this node (as a snapshot node).\n * @param {!IndexMap} indexMap_\n */\n function ChildrenNode(children_, priorityNode_, indexMap_) {\n this.children_ = children_;\n this.priorityNode_ = priorityNode_;\n this.indexMap_ = indexMap_;\n this.lazyHash_ = null;\n /**\n * Note: The only reason we allow null priority is for EMPTY_NODE, since we can't use\n * EMPTY_NODE as the priority of EMPTY_NODE. We might want to consider making EMPTY_NODE its own\n * class instead of an empty ChildrenNode.\n */\n if (this.priorityNode_) {\n snap_1.validatePriorityNode(this.priorityNode_);\n }\n if (this.children_.isEmpty()) {\n util_1.assert(!this.priorityNode_ || this.priorityNode_.isEmpty(), 'An empty node cannot have a priority');\n }\n }\n Object.defineProperty(ChildrenNode, \"EMPTY_NODE\", {\n get: function () {\n return (EMPTY_NODE ||\n (EMPTY_NODE = new ChildrenNode(new SortedMap_1.SortedMap(comparators_1.NAME_COMPARATOR), null, IndexMap_1.IndexMap.Default)));\n },\n enumerable: true,\n configurable: true\n });\n /** @inheritDoc */\n ChildrenNode.prototype.isLeafNode = function () {\n return false;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getPriority = function () {\n return this.priorityNode_ || EMPTY_NODE;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updatePriority = function (newPriorityNode) {\n if (this.children_.isEmpty()) {\n // Don't allow priorities on empty nodes\n return this;\n }\n else {\n return new ChildrenNode(this.children_, newPriorityNode, this.indexMap_);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getImmediateChild = function (childName) {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.getPriority();\n }\n else {\n var child = this.children_.get(childName);\n return child === null ? EMPTY_NODE : child;\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getChild = function (path) {\n var front = path.getFront();\n if (front === null)\n return this;\n return this.getImmediateChild(front).getChild(path.popFront());\n };\n /** @inheritDoc */\n ChildrenNode.prototype.hasChild = function (childName) {\n return this.children_.get(childName) !== null;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updateImmediateChild = function (childName, newChildNode) {\n util_1.assert(newChildNode, 'We should always be passing snapshot nodes');\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n }\n else {\n var namedNode = new Node_1.NamedNode(childName, newChildNode);\n var newChildren = void 0, newIndexMap = void 0, newPriority = void 0;\n if (newChildNode.isEmpty()) {\n newChildren = this.children_.remove(childName);\n newIndexMap = this.indexMap_.removeFromIndexes(namedNode, this.children_);\n }\n else {\n newChildren = this.children_.insert(childName, newChildNode);\n newIndexMap = this.indexMap_.addToIndexes(namedNode, this.children_);\n }\n newPriority = newChildren.isEmpty() ? EMPTY_NODE : this.priorityNode_;\n return new ChildrenNode(newChildren, newPriority, newIndexMap);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updateChild = function (path, newChildNode) {\n var front = path.getFront();\n if (front === null) {\n return newChildNode;\n }\n else {\n util_1.assert(path.getFront() !== '.priority' || path.getLength() === 1, '.priority must be the last token in a path');\n var newImmediateChild = this.getImmediateChild(front).updateChild(path.popFront(), newChildNode);\n return this.updateImmediateChild(front, newImmediateChild);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.isEmpty = function () {\n return this.children_.isEmpty();\n };\n /** @inheritDoc */\n ChildrenNode.prototype.numChildren = function () {\n return this.children_.count();\n };\n /** @inheritDoc */\n ChildrenNode.prototype.val = function (exportFormat) {\n if (this.isEmpty())\n return null;\n var obj = {};\n var numKeys = 0, maxKey = 0, allIntegerKeys = true;\n this.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n obj[key] = childNode.val(exportFormat);\n numKeys++;\n if (allIntegerKeys && ChildrenNode.INTEGER_REGEXP_.test(key)) {\n maxKey = Math.max(maxKey, Number(key));\n }\n else {\n allIntegerKeys = false;\n }\n });\n if (!exportFormat && allIntegerKeys && maxKey < 2 * numKeys) {\n // convert to array.\n var array = [];\n for (var key in obj)\n array[key] = obj[key];\n return array;\n }\n else {\n if (exportFormat && !this.getPriority().isEmpty()) {\n obj['.priority'] = this.getPriority().val();\n }\n return obj;\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.hash = function () {\n if (this.lazyHash_ === null) {\n var toHash_1 = '';\n if (!this.getPriority().isEmpty())\n toHash_1 +=\n 'priority:' +\n snap_1.priorityHashText(this.getPriority().val()) +\n ':';\n this.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n var childHash = childNode.hash();\n if (childHash !== '')\n toHash_1 += ':' + key + ':' + childHash;\n });\n this.lazyHash_ = toHash_1 === '' ? '' : util_2.sha1(toHash_1);\n }\n return this.lazyHash_;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getPredecessorChildName = function (childName, childNode, index) {\n var idx = this.resolveIndex_(index);\n if (idx) {\n var predecessor = idx.getPredecessorKey(new Node_1.NamedNode(childName, childNode));\n return predecessor ? predecessor.name : null;\n }\n else {\n return this.children_.getPredecessorKey(childName);\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n ChildrenNode.prototype.getFirstChildName = function (indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n var minKey = idx.minKey();\n return minKey && minKey.name;\n }\n else {\n return this.children_.minKey();\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n ChildrenNode.prototype.getFirstChild = function (indexDefinition) {\n var minKey = this.getFirstChildName(indexDefinition);\n if (minKey) {\n return new Node_1.NamedNode(minKey, this.children_.get(minKey));\n }\n else {\n return null;\n }\n };\n /**\n * Given an index, return the key name of the largest value we have, according to that index\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n ChildrenNode.prototype.getLastChildName = function (indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n var maxKey = idx.maxKey();\n return maxKey && maxKey.name;\n }\n else {\n return this.children_.maxKey();\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n ChildrenNode.prototype.getLastChild = function (indexDefinition) {\n var maxKey = this.getLastChildName(indexDefinition);\n if (maxKey) {\n return new Node_1.NamedNode(maxKey, this.children_.get(maxKey));\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.forEachChild = function (index, action) {\n var idx = this.resolveIndex_(index);\n if (idx) {\n return idx.inorderTraversal(function (wrappedNode) {\n return action(wrappedNode.name, wrappedNode.node);\n });\n }\n else {\n return this.children_.inorderTraversal(action);\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {SortedMapIterator}\n */\n ChildrenNode.prototype.getIterator = function (indexDefinition) {\n return this.getIteratorFrom(indexDefinition.minPost(), indexDefinition);\n };\n /**\n *\n * @param {!NamedNode} startPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getIteratorFrom = function (startPost, indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getIteratorFrom(startPost, function (key) { return key; });\n }\n else {\n var iterator = this.children_.getIteratorFrom(startPost.name, Node_1.NamedNode.Wrap);\n var next = iterator.peek();\n while (next != null && indexDefinition.compare(next, startPost) < 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getReverseIterator = function (indexDefinition) {\n return this.getReverseIteratorFrom(indexDefinition.maxPost(), indexDefinition);\n };\n /**\n * @param {!NamedNode} endPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getReverseIteratorFrom = function (endPost, indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getReverseIteratorFrom(endPost, function (key) {\n return key;\n });\n }\n else {\n var iterator = this.children_.getReverseIteratorFrom(endPost.name, Node_1.NamedNode.Wrap);\n var next = iterator.peek();\n while (next != null && indexDefinition.compare(next, endPost) > 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.compareTo = function (other) {\n if (this.isEmpty()) {\n if (other.isEmpty()) {\n return 0;\n }\n else {\n return -1;\n }\n }\n else if (other.isLeafNode() || other.isEmpty()) {\n return 1;\n }\n else if (other === exports.MAX_NODE) {\n return -1;\n }\n else {\n // Must be another node with children.\n return 0;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.withIndex = function (indexDefinition) {\n if (indexDefinition === KeyIndex_1.KEY_INDEX ||\n this.indexMap_.hasIndex(indexDefinition)) {\n return this;\n }\n else {\n var newIndexMap = this.indexMap_.addIndex(indexDefinition, this.children_);\n return new ChildrenNode(this.children_, this.priorityNode_, newIndexMap);\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.isIndexed = function (index) {\n return index === KeyIndex_1.KEY_INDEX || this.indexMap_.hasIndex(index);\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.equals = function (other) {\n if (other === this) {\n return true;\n }\n else if (other.isLeafNode()) {\n return false;\n }\n else {\n var otherChildrenNode = other;\n if (!this.getPriority().equals(otherChildrenNode.getPriority())) {\n return false;\n }\n else if (this.children_.count() === otherChildrenNode.children_.count()) {\n var thisIter = this.getIterator(PriorityIndex_1.PRIORITY_INDEX);\n var otherIter = otherChildrenNode.getIterator(PriorityIndex_1.PRIORITY_INDEX);\n var thisCurrent = thisIter.getNext();\n var otherCurrent = otherIter.getNext();\n while (thisCurrent && otherCurrent) {\n if (thisCurrent.name !== otherCurrent.name ||\n !thisCurrent.node.equals(otherCurrent.node)) {\n return false;\n }\n thisCurrent = thisIter.getNext();\n otherCurrent = otherIter.getNext();\n }\n return thisCurrent === null && otherCurrent === null;\n }\n else {\n return false;\n }\n }\n };\n /**\n * Returns a SortedMap ordered by index, or null if the default (by-key) ordering can be used\n * instead.\n *\n * @private\n * @param {!Index} indexDefinition\n * @return {?SortedMap.}\n */\n ChildrenNode.prototype.resolveIndex_ = function (indexDefinition) {\n if (indexDefinition === KeyIndex_1.KEY_INDEX) {\n return null;\n }\n else {\n return this.indexMap_.get(indexDefinition.toString());\n }\n };\n /**\n * @private\n * @type {RegExp}\n */\n ChildrenNode.INTEGER_REGEXP_ = /^(0|[1-9]\\d*)$/;\n return ChildrenNode;\n}());\nexports.ChildrenNode = ChildrenNode;\n/**\n * @constructor\n * @extends {ChildrenNode}\n * @private\n */\nvar MaxNode = /** @class */ (function (_super) {\n __extends(MaxNode, _super);\n function MaxNode() {\n return _super.call(this, new SortedMap_1.SortedMap(comparators_1.NAME_COMPARATOR), ChildrenNode.EMPTY_NODE, IndexMap_1.IndexMap.Default) || this;\n }\n MaxNode.prototype.compareTo = function (other) {\n if (other === this) {\n return 0;\n }\n else {\n return 1;\n }\n };\n MaxNode.prototype.equals = function (other) {\n // Not that we every compare it, but MAX_NODE is only ever equal to itself\n return other === this;\n };\n MaxNode.prototype.getPriority = function () {\n return this;\n };\n MaxNode.prototype.getImmediateChild = function (childName) {\n return ChildrenNode.EMPTY_NODE;\n };\n MaxNode.prototype.isEmpty = function () {\n return false;\n };\n return MaxNode;\n}(ChildrenNode));\nexports.MaxNode = MaxNode;\n/**\n * Marker that will sort higher than any other snapshot.\n * @type {!MAX_NODE}\n * @const\n */\nexports.MAX_NODE = new MaxNode();\nObject.defineProperties(Node_1.NamedNode, {\n MIN: {\n value: new Node_1.NamedNode(util_2.MIN_NAME, ChildrenNode.EMPTY_NODE)\n },\n MAX: {\n value: new Node_1.NamedNode(util_2.MAX_NAME, exports.MAX_NODE)\n }\n});\n/**\n * Reference Extensions\n */\nKeyIndex_1.KeyIndex.__EMPTY_NODE = ChildrenNode.EMPTY_NODE;\nLeafNode_1.LeafNode.__childrenNodeConstructor = ChildrenNode;\nsnap_1.setMaxNode(exports.MAX_NODE);\nPriorityIndex_1.setMaxNode(exports.MAX_NODE);\n\n//# sourceMappingURL=ChildrenNode.js.map\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n *\n * @param {!string} name\n * @param {!Node} node\n * @constructor\n * @struct\n */\nvar NamedNode = /** @class */ (function () {\n function NamedNode(name, node) {\n this.name = name;\n this.node = node;\n }\n /**\n *\n * @param {!string} name\n * @param {!Node} node\n * @return {NamedNode}\n */\n NamedNode.Wrap = function (name, node) {\n return new NamedNode(name, node);\n };\n return NamedNode;\n}());\nexports.NamedNode = NamedNode;\n\n//# sourceMappingURL=Node.js.map\n\n\n/***/ }),\n/* 6 */,\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = __webpack_require__(2);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar util_3 = __webpack_require__(0);\nvar util_4 = __webpack_require__(0);\n/**\n * True for invalid Firebase keys\n * @type {RegExp}\n * @private\n */\nexports.INVALID_KEY_REGEX_ = /[\\[\\].#$\\/\\u0000-\\u001F\\u007F]/;\n/**\n * True for invalid Firebase paths.\n * Allows '/' in paths.\n * @type {RegExp}\n * @private\n */\nexports.INVALID_PATH_REGEX_ = /[\\[\\].#$\\u0000-\\u001F\\u007F]/;\n/**\n * Maximum number of characters to allow in leaf value\n * @type {number}\n * @private\n */\nexports.MAX_LEAF_SIZE_ = 10 * 1024 * 1024;\n/**\n * @param {*} key\n * @return {boolean}\n */\nexports.isValidKey = function (key) {\n return (typeof key === 'string' && key.length !== 0 && !exports.INVALID_KEY_REGEX_.test(key));\n};\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexports.isValidPathString = function (pathString) {\n return (typeof pathString === 'string' &&\n pathString.length !== 0 &&\n !exports.INVALID_PATH_REGEX_.test(pathString));\n};\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexports.isValidRootPathString = function (pathString) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n return exports.isValidPathString(pathString);\n};\n/**\n * @param {*} priority\n * @return {boolean}\n */\nexports.isValidPriority = function (priority) {\n return (priority === null ||\n typeof priority === 'string' ||\n (typeof priority === 'number' && !util_2.isInvalidJSONNumber(priority)) ||\n (priority && typeof priority === 'object' && util_1.contains(priority, '.sv')));\n};\n/**\n * Pre-validate a datum passed as an argument to Firebase function.\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexports.validateFirebaseDataArg = function (fnName, argumentNumber, data, path, optional) {\n if (optional && data === undefined)\n return;\n exports.validateFirebaseData(util_3.errorPrefix(fnName, argumentNumber, optional), data, path);\n};\n/**\n * Validate a data object client-side before sending to server.\n *\n * @param {string} errorPrefix\n * @param {*} data\n * @param {!Path|!ValidationPath} path_\n */\nexports.validateFirebaseData = function (errorPrefix, data, path_) {\n var path = path_ instanceof Path_1.Path ? new Path_1.ValidationPath(path_, errorPrefix) : path_;\n if (data === undefined) {\n throw new Error(errorPrefix + 'contains undefined ' + path.toErrorString());\n }\n if (typeof data === 'function') {\n throw new Error(errorPrefix +\n 'contains a function ' +\n path.toErrorString() +\n ' with contents = ' +\n data.toString());\n }\n if (util_2.isInvalidJSONNumber(data)) {\n throw new Error(errorPrefix + 'contains ' + data.toString() + ' ' + path.toErrorString());\n }\n // Check max leaf size, but try to avoid the utf8 conversion if we can.\n if (typeof data === 'string' &&\n data.length > exports.MAX_LEAF_SIZE_ / 3 &&\n util_4.stringLength(data) > exports.MAX_LEAF_SIZE_) {\n throw new Error(errorPrefix +\n 'contains a string greater than ' +\n exports.MAX_LEAF_SIZE_ +\n ' utf8 bytes ' +\n path.toErrorString() +\n \" ('\" +\n data.substring(0, 50) +\n \"...')\");\n }\n // TODO = Perf = Consider combining the recursive validation of keys into NodeFromJSON\n // to save extra walking of large objects.\n if (data && typeof data === 'object') {\n var hasDotValue_1 = false, hasActualChild_1 = false;\n util_1.forEach(data, function (key, value) {\n if (key === '.value') {\n hasDotValue_1 = true;\n }\n else if (key !== '.priority' && key !== '.sv') {\n hasActualChild_1 = true;\n if (!exports.isValidKey(key)) {\n throw new Error(errorPrefix +\n ' contains an invalid key (' +\n key +\n ') ' +\n path.toErrorString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"');\n }\n }\n path.push(key);\n exports.validateFirebaseData(errorPrefix, value, path);\n path.pop();\n });\n if (hasDotValue_1 && hasActualChild_1) {\n throw new Error(errorPrefix +\n ' contains \".value\" child ' +\n path.toErrorString() +\n ' in addition to actual children.');\n }\n }\n};\n/**\n * Pre-validate paths passed in the firebase function.\n *\n * @param {string} errorPrefix\n * @param {Array} mergePaths\n */\nexports.validateFirebaseMergePaths = function (errorPrefix, mergePaths) {\n var i, curPath;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n var keys = curPath.slice();\n for (var j = 0; j < keys.length; j++) {\n if (keys[j] === '.priority' && j === keys.length - 1) {\n // .priority is OK\n }\n else if (!exports.isValidKey(keys[j])) {\n throw new Error(errorPrefix +\n 'contains an invalid key (' +\n keys[j] +\n ') in path ' +\n curPath.toString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"');\n }\n }\n }\n // Check that update keys are not descendants of each other.\n // We rely on the property that sorting guarantees that ancestors come\n // right before descendants.\n mergePaths.sort(Path_1.Path.comparePaths);\n var prevPath = null;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n if (prevPath !== null && prevPath.contains(curPath)) {\n throw new Error(errorPrefix +\n 'contains a path ' +\n prevPath.toString() +\n ' that is ancestor of another path ' +\n curPath.toString());\n }\n prevPath = curPath;\n }\n};\n/**\n * pre-validate an object passed as an argument to firebase function (\n * must be an object - e.g. for firebase.update()).\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexports.validateFirebaseMergeDataArg = function (fnName, argumentNumber, data, path, optional) {\n if (optional && data === undefined)\n return;\n var errorPrefix = util_3.errorPrefix(fnName, argumentNumber, optional);\n if (!(data && typeof data === 'object') || Array.isArray(data)) {\n throw new Error(errorPrefix + ' must be an object containing the children to replace.');\n }\n var mergePaths = [];\n util_1.forEach(data, function (key, value) {\n var curPath = new Path_1.Path(key);\n exports.validateFirebaseData(errorPrefix, value, path.child(curPath));\n if (curPath.getBack() === '.priority') {\n if (!exports.isValidPriority(value)) {\n throw new Error(errorPrefix +\n \"contains an invalid value for '\" +\n curPath.toString() +\n \"', which must be a valid \" +\n 'Firebase priority (a string, finite number, server value, or null).');\n }\n }\n mergePaths.push(curPath);\n });\n exports.validateFirebaseMergePaths(errorPrefix, mergePaths);\n};\nexports.validatePriority = function (fnName, argumentNumber, priority, optional) {\n if (optional && priority === undefined)\n return;\n if (util_2.isInvalidJSONNumber(priority))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'is ' +\n priority.toString() +\n ', but must be a valid Firebase priority (a string, finite number, ' +\n 'server value, or null).');\n // Special case to allow importing data with a .sv.\n if (!exports.isValidPriority(priority))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid Firebase priority ' +\n '(a string, finite number, server value, or null).');\n};\nexports.validateEventType = function (fnName, argumentNumber, eventType, optional) {\n if (optional && eventType === undefined)\n return;\n switch (eventType) {\n case 'value':\n case 'child_added':\n case 'child_removed':\n case 'child_changed':\n case 'child_moved':\n break;\n default:\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid event type = \"value\", \"child_added\", \"child_removed\", ' +\n '\"child_changed\", or \"child_moved\".');\n }\n};\nexports.validateKey = function (fnName, argumentNumber, key, optional) {\n if (optional && key === undefined)\n return;\n if (!exports.isValidKey(key))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'was an invalid key = \"' +\n key +\n '\". Firebase keys must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\").');\n};\nexports.validatePathString = function (fnName, argumentNumber, pathString, optional) {\n if (optional && pathString === undefined)\n return;\n if (!exports.isValidPathString(pathString))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'was an invalid path = \"' +\n pathString +\n '\". Paths must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\"');\n};\nexports.validateRootPathString = function (fnName, argumentNumber, pathString, optional) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n exports.validatePathString(fnName, argumentNumber, pathString, optional);\n};\nexports.validateWritablePath = function (fnName, path) {\n if (path.getFront() === '.info') {\n throw new Error(fnName + \" failed = Can't modify data under /.info/\");\n }\n};\nexports.validateUrl = function (fnName, argumentNumber, parsedUrl) {\n // TODO = Validate server better.\n var pathString = parsedUrl.path.toString();\n if (!(typeof parsedUrl.repoInfo.host === 'string') ||\n parsedUrl.repoInfo.host.length === 0 ||\n !exports.isValidKey(parsedUrl.repoInfo.namespace) ||\n (pathString.length !== 0 && !exports.isValidRootPathString(pathString))) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, false) +\n 'must be a valid firebase URL and ' +\n 'the path can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\".');\n }\n};\nexports.validateCredential = function (fnName, argumentNumber, cred, optional) {\n if (optional && cred === undefined)\n return;\n if (!(typeof cred === 'string'))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid credential (a string).');\n};\nexports.validateBoolean = function (fnName, argumentNumber, bool, optional) {\n if (optional && bool === undefined)\n return;\n if (typeof bool !== 'boolean')\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) + 'must be a boolean.');\n};\nexports.validateString = function (fnName, argumentNumber, string, optional) {\n if (optional && string === undefined)\n return;\n if (!(typeof string === 'string')) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid string.');\n }\n};\nexports.validateObject = function (fnName, argumentNumber, obj, optional) {\n if (optional && obj === undefined)\n return;\n if (!(obj && typeof obj === 'object') || obj === null) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid object.');\n }\n};\nexports.validateObjectContainsKey = function (fnName, argumentNumber, obj, key, optional, opt_type) {\n var objectContainsKey = obj && typeof obj === 'object' && util_1.contains(obj, key);\n if (!objectContainsKey) {\n if (optional) {\n return;\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\"');\n }\n }\n if (opt_type) {\n var val = util_1.safeGet(obj, key);\n if ((opt_type === 'number' && !(typeof val === 'number')) ||\n (opt_type === 'string' && !(typeof val === 'string')) ||\n (opt_type === 'boolean' && !(typeof val === 'boolean')) ||\n (opt_type === 'function' && !(typeof val === 'function')) ||\n (opt_type === 'object' && !(typeof val === 'object') && val)) {\n if (optional) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'contains invalid value for key \"' +\n key +\n '\" (must be of type \"' +\n opt_type +\n '\")');\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\" with type \"' +\n opt_type +\n '\"');\n }\n }\n }\n};\n\n//# sourceMappingURL=validation.js.map\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n *\n * @enum\n */\nvar OperationType;\n(function (OperationType) {\n OperationType[OperationType[\"OVERWRITE\"] = 0] = \"OVERWRITE\";\n OperationType[OperationType[\"MERGE\"] = 1] = \"MERGE\";\n OperationType[OperationType[\"ACK_USER_WRITE\"] = 2] = \"ACK_USER_WRITE\";\n OperationType[OperationType[\"LISTEN_COMPLETE\"] = 3] = \"LISTEN_COMPLETE\";\n})(OperationType = exports.OperationType || (exports.OperationType = {}));\n/**\n * @param {boolean} fromUser\n * @param {boolean} fromServer\n * @param {?string} queryId\n * @param {boolean} tagged\n * @constructor\n */\nvar OperationSource = /** @class */ (function () {\n function OperationSource(fromUser, fromServer, queryId, tagged) {\n this.fromUser = fromUser;\n this.fromServer = fromServer;\n this.queryId = queryId;\n this.tagged = tagged;\n util_1.assert(!tagged || fromServer, 'Tagged queries must be from server.');\n }\n /**\n * @const\n * @type {!OperationSource}\n */\n OperationSource.User = new OperationSource(\n /*fromUser=*/ true, false, null, \n /*tagged=*/ false);\n /**\n * @const\n * @type {!OperationSource}\n */\n OperationSource.Server = new OperationSource(false, \n /*fromServer=*/ true, null, \n /*tagged=*/ false);\n /**\n * @param {string} queryId\n * @return {!OperationSource}\n */\n OperationSource.forServerTaggedQuery = function (queryId) {\n return new OperationSource(false, \n /*fromServer=*/ true, queryId, \n /*tagged=*/ true);\n };\n return OperationSource;\n}());\nexports.OperationSource = OperationSource;\n\n//# sourceMappingURL=Operation.js.map\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @constructor\n * @struct\n * @param {!string} type The event type\n * @param {!Node} snapshotNode The data\n * @param {string=} childName The name for this child, if it's a child event\n * @param {Node=} oldSnap Used for intermediate processing of child changed events\n * @param {string=} prevName The name for the previous child, if applicable\n */\nvar Change = /** @class */ (function () {\n function Change(type, snapshotNode, childName, oldSnap, prevName) {\n this.type = type;\n this.snapshotNode = snapshotNode;\n this.childName = childName;\n this.oldSnap = oldSnap;\n this.prevName = prevName;\n }\n /**\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.valueChange = function (snapshot) {\n return new Change(Change.VALUE, snapshot);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childAddedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_ADDED, snapshot, childKey);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childRemovedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_REMOVED, snapshot, childKey);\n };\n /**\n * @param {string} childKey\n * @param {!Node} newSnapshot\n * @param {!Node} oldSnapshot\n * @return {!Change}\n */\n Change.childChangedChange = function (childKey, newSnapshot, oldSnapshot) {\n return new Change(Change.CHILD_CHANGED, newSnapshot, childKey, oldSnapshot);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childMovedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_MOVED, snapshot, childKey);\n };\n //event types\n /** Event type for a child added */\n Change.CHILD_ADDED = 'child_added';\n /** Event type for a child removed */\n Change.CHILD_REMOVED = 'child_removed';\n /** Event type for a child changed */\n Change.CHILD_CHANGED = 'child_changed';\n /** Event type for a child moved */\n Change.CHILD_MOVED = 'child_moved';\n /** Event type for a value change */\n Change.VALUE = 'value';\n return Change;\n}());\nexports.Change = Change;\n\n//# sourceMappingURL=Change.js.map\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = __webpack_require__(14);\nvar Node_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(1);\nvar util_2 = __webpack_require__(0);\nvar __EMPTY_NODE;\nvar KeyIndex = /** @class */ (function (_super) {\n __extends(KeyIndex, _super);\n function KeyIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(KeyIndex, \"__EMPTY_NODE\", {\n get: function () {\n return __EMPTY_NODE;\n },\n set: function (val) {\n __EMPTY_NODE = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.compare = function (a, b) {\n return util_1.nameCompare(a.name, b.name);\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.isDefinedOn = function (node) {\n // We could probably return true here (since every node has a key), but it's never called\n // so just leaving unimplemented for now.\n throw util_2.assertionError('KeyIndex.isDefinedOn not expected to be called.');\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return false; // The key for a node never changes.\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.maxPost = function () {\n // TODO: This should really be created once and cached in a static property, but\n // NamedNode isn't defined yet, so I can't use it in a static. Bleh.\n return new Node_1.NamedNode(util_1.MAX_NAME, __EMPTY_NODE);\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n KeyIndex.prototype.makePost = function (indexValue, name) {\n util_2.assert(typeof indexValue === 'string', 'KeyIndex indexValue must always be a string.');\n // We just use empty node, but it'll never be compared, since our comparator only looks at name.\n return new Node_1.NamedNode(indexValue, __EMPTY_NODE);\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n KeyIndex.prototype.toString = function () {\n return '.key';\n };\n return KeyIndex;\n}(Index_1.Index));\nexports.KeyIndex = KeyIndex;\nexports.KEY_INDEX = new KeyIndex();\n\n//# sourceMappingURL=KeyIndex.js.map\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = __webpack_require__(4);\nvar LeafNode_1 = __webpack_require__(15);\nvar Node_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar childSet_1 = __webpack_require__(40);\nvar comparators_1 = __webpack_require__(41);\nvar IndexMap_1 = __webpack_require__(39);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar USE_HINZE = true;\n/**\n * Constructs a snapshot node representing the passed JSON and returns it.\n * @param {*} json JSON to create a node for.\n * @param {?string|?number=} priority Optional priority to use. This will be ignored if the\n * passed JSON contains a .priority property.\n * @return {!Node}\n */\nfunction nodeFromJSON(json, priority) {\n if (priority === void 0) { priority = null; }\n if (json === null) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (typeof json === 'object' && '.priority' in json) {\n priority = json['.priority'];\n }\n util_2.assert(priority === null ||\n typeof priority === 'string' ||\n typeof priority === 'number' ||\n (typeof priority === 'object' && '.sv' in priority), 'Invalid priority type found: ' + typeof priority);\n if (typeof json === 'object' && '.value' in json && json['.value'] !== null) {\n json = json['.value'];\n }\n // Valid leaf nodes include non-objects or server-value wrapper objects\n if (typeof json !== 'object' || '.sv' in json) {\n var jsonLeaf = json;\n return new LeafNode_1.LeafNode(jsonLeaf, nodeFromJSON(priority));\n }\n if (!(json instanceof Array) && USE_HINZE) {\n var children_1 = [];\n var childrenHavePriority_1 = false;\n var hinzeJsonObj_1 = json;\n util_1.forEach(hinzeJsonObj_1, function (key, child) {\n if (typeof key !== 'string' || key.substring(0, 1) !== '.') {\n // Ignore metadata nodes\n var childNode = nodeFromJSON(hinzeJsonObj_1[key]);\n if (!childNode.isEmpty()) {\n childrenHavePriority_1 =\n childrenHavePriority_1 || !childNode.getPriority().isEmpty();\n children_1.push(new Node_1.NamedNode(key, childNode));\n }\n }\n });\n if (children_1.length == 0) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var childSet = childSet_1.buildChildSet(children_1, comparators_1.NAME_ONLY_COMPARATOR, function (namedNode) { return namedNode.name; }, comparators_1.NAME_COMPARATOR);\n if (childrenHavePriority_1) {\n var sortedChildSet = childSet_1.buildChildSet(children_1, PriorityIndex_1.PRIORITY_INDEX.getCompare());\n return new ChildrenNode_1.ChildrenNode(childSet, nodeFromJSON(priority), new IndexMap_1.IndexMap({ '.priority': sortedChildSet }, { '.priority': PriorityIndex_1.PRIORITY_INDEX }));\n }\n else {\n return new ChildrenNode_1.ChildrenNode(childSet, nodeFromJSON(priority), IndexMap_1.IndexMap.Default);\n }\n }\n else {\n var node_1 = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var jsonObj_1 = json;\n util_1.forEach(jsonObj_1, function (key, childData) {\n if (util_1.contains(jsonObj_1, key)) {\n if (key.substring(0, 1) !== '.') {\n // ignore metadata nodes.\n var childNode = nodeFromJSON(childData);\n if (childNode.isLeafNode() || !childNode.isEmpty())\n node_1 = node_1.updateImmediateChild(key, childNode);\n }\n }\n });\n return node_1.updatePriority(nodeFromJSON(priority));\n }\n}\nexports.nodeFromJSON = nodeFromJSON;\nPriorityIndex_1.setNodeFromJSON(nodeFromJSON);\n\n//# sourceMappingURL=nodeFromJSON.js.map\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DOMStorageWrapper_1 = __webpack_require__(80);\nvar MemoryStorage_1 = __webpack_require__(81);\n/**\n * Helper to create a DOMStorageWrapper or else fall back to MemoryStorage.\n * TODO: Once MemoryStorage and DOMStorageWrapper have a shared interface this method annotation should change\n * to reflect this type\n *\n * @param {string} domStorageName Name of the underlying storage object\n * (e.g. 'localStorage' or 'sessionStorage').\n * @return {?} Turning off type information until a common interface is defined.\n */\nvar createStoragefor = function (domStorageName) {\n try {\n // NOTE: just accessing \"localStorage\" or \"window['localStorage']\" may throw a security exception,\n // so it must be inside the try/catch.\n if (typeof window !== 'undefined' &&\n typeof window[domStorageName] !== 'undefined') {\n // Need to test cache. Just because it's here doesn't mean it works\n var domStorage = window[domStorageName];\n domStorage.setItem('firebase:sentinel', 'cache');\n domStorage.removeItem('firebase:sentinel');\n return new DOMStorageWrapper_1.DOMStorageWrapper(domStorage);\n }\n }\n catch (e) { }\n // Failed to create wrapper. Just return in-memory storage.\n // TODO: log?\n return new MemoryStorage_1.MemoryStorage();\n};\n/** A storage object that lasts across sessions */\nexports.PersistentStorage = createStoragefor('localStorage');\n/** A storage object that only lasts one session */\nexports.SessionStorage = createStoragefor('sessionStorage');\n\n//# sourceMappingURL=storage.js.map\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PROTOCOL_VERSION = '5';\nexports.VERSION_PARAM = 'v';\nexports.TRANSPORT_SESSION_PARAM = 's';\nexports.REFERER_PARAM = 'r';\nexports.FORGE_REF = 'f';\nexports.FORGE_DOMAIN = 'firebaseio.com';\nexports.LAST_SESSION_PARAM = 'ls';\nexports.WEBSOCKET = 'websocket';\nexports.LONG_POLLING = 'long_polling';\n\n//# sourceMappingURL=Constants.js.map\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(1);\n/**\n *\n * @constructor\n */\nvar Index = /** @class */ (function () {\n function Index() {\n }\n /**\n * @return {function(!NamedNode, !NamedNode):number} A standalone comparison function for\n * this index\n */\n Index.prototype.getCompare = function () {\n return this.compare.bind(this);\n };\n /**\n * Given a before and after value for a node, determine if the indexed value has changed. Even if they are different,\n * it's possible that the changes are isolated to parts of the snapshot that are not indexed.\n *\n * @param {!Node} oldNode\n * @param {!Node} newNode\n * @return {boolean} True if the portion of the snapshot being indexed changed between oldNode and newNode\n */\n Index.prototype.indexedValueChanged = function (oldNode, newNode) {\n var oldWrapped = new Node_1.NamedNode(util_1.MIN_NAME, oldNode);\n var newWrapped = new Node_1.NamedNode(util_1.MIN_NAME, newNode);\n return this.compare(oldWrapped, newWrapped) !== 0;\n };\n /**\n * @return {!NamedNode} a node wrapper that will sort equal to or less than\n * any other node wrapper, using this index\n */\n Index.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n return Index;\n}());\nexports.Index = Index;\n\n//# sourceMappingURL=Index.js.map\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar snap_1 = __webpack_require__(37);\nvar __childrenNodeConstructor;\n/**\n * LeafNode is a class for storing leaf nodes in a DataSnapshot. It\n * implements Node and stores the value of the node (a string,\n * number, or boolean) accessible via getValue().\n */\nvar LeafNode = /** @class */ (function () {\n /**\n * @implements {Node}\n * @param {!(string|number|boolean|Object)} value_ The value to store in this leaf node.\n * The object type is possible in the event of a deferred value\n * @param {!Node=} priorityNode_ The priority of this node.\n */\n function LeafNode(value_, priorityNode_) {\n if (priorityNode_ === void 0) { priorityNode_ = LeafNode.__childrenNodeConstructor.EMPTY_NODE; }\n this.value_ = value_;\n this.priorityNode_ = priorityNode_;\n this.lazyHash_ = null;\n util_1.assert(this.value_ !== undefined && this.value_ !== null, \"LeafNode shouldn't be created with null/undefined value.\");\n snap_1.validatePriorityNode(this.priorityNode_);\n }\n Object.defineProperty(LeafNode, \"__childrenNodeConstructor\", {\n get: function () {\n return __childrenNodeConstructor;\n },\n set: function (val) {\n __childrenNodeConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /** @inheritDoc */\n LeafNode.prototype.isLeafNode = function () {\n return true;\n };\n /** @inheritDoc */\n LeafNode.prototype.getPriority = function () {\n return this.priorityNode_;\n };\n /** @inheritDoc */\n LeafNode.prototype.updatePriority = function (newPriorityNode) {\n return new LeafNode(this.value_, newPriorityNode);\n };\n /** @inheritDoc */\n LeafNode.prototype.getImmediateChild = function (childName) {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.priorityNode_;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.getChild = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else if (path.getFront() === '.priority') {\n return this.priorityNode_;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.hasChild = function () {\n return false;\n };\n /** @inheritDoc */\n LeafNode.prototype.getPredecessorChildName = function (childName, childNode) {\n return null;\n };\n /** @inheritDoc */\n LeafNode.prototype.updateImmediateChild = function (childName, newChildNode) {\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n }\n else if (newChildNode.isEmpty() && childName !== '.priority') {\n return this;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE\n .updateImmediateChild(childName, newChildNode)\n .updatePriority(this.priorityNode_);\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.updateChild = function (path, newChildNode) {\n var front = path.getFront();\n if (front === null) {\n return newChildNode;\n }\n else if (newChildNode.isEmpty() && front !== '.priority') {\n return this;\n }\n else {\n util_1.assert(front !== '.priority' || path.getLength() === 1, '.priority must be the last token in a path');\n return this.updateImmediateChild(front, LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateChild(path.popFront(), newChildNode));\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.isEmpty = function () {\n return false;\n };\n /** @inheritDoc */\n LeafNode.prototype.numChildren = function () {\n return 0;\n };\n /** @inheritDoc */\n LeafNode.prototype.forEachChild = function (index, action) {\n return false;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.val = function (exportFormat) {\n if (exportFormat && !this.getPriority().isEmpty())\n return {\n '.value': this.getValue(),\n '.priority': this.getPriority().val()\n };\n else\n return this.getValue();\n };\n /** @inheritDoc */\n LeafNode.prototype.hash = function () {\n if (this.lazyHash_ === null) {\n var toHash = '';\n if (!this.priorityNode_.isEmpty())\n toHash +=\n 'priority:' +\n snap_1.priorityHashText(this.priorityNode_.val()) +\n ':';\n var type = typeof this.value_;\n toHash += type + ':';\n if (type === 'number') {\n toHash += util_2.doubleToIEEE754String(this.value_);\n }\n else {\n toHash += this.value_;\n }\n this.lazyHash_ = util_2.sha1(toHash);\n }\n return this.lazyHash_;\n };\n /**\n * Returns the value of the leaf node.\n * @return {Object|string|number|boolean} The value of the node.\n */\n LeafNode.prototype.getValue = function () {\n return this.value_;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.compareTo = function (other) {\n if (other === LeafNode.__childrenNodeConstructor.EMPTY_NODE) {\n return 1;\n }\n else if (other instanceof LeafNode.__childrenNodeConstructor) {\n return -1;\n }\n else {\n util_1.assert(other.isLeafNode(), 'Unknown node type');\n return this.compareToLeafNode_(other);\n }\n };\n /**\n * Comparison specifically for two leaf nodes\n * @param {!LeafNode} otherLeaf\n * @return {!number}\n * @private\n */\n LeafNode.prototype.compareToLeafNode_ = function (otherLeaf) {\n var otherLeafType = typeof otherLeaf.value_;\n var thisLeafType = typeof this.value_;\n var otherIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(otherLeafType);\n var thisIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(thisLeafType);\n util_1.assert(otherIndex >= 0, 'Unknown leaf type: ' + otherLeafType);\n util_1.assert(thisIndex >= 0, 'Unknown leaf type: ' + thisLeafType);\n if (otherIndex === thisIndex) {\n // Same type, compare values\n if (thisLeafType === 'object') {\n // Deferred value nodes are all equal, but we should also never get to this point...\n return 0;\n }\n else {\n // Note that this works because true > false, all others are number or string comparisons\n if (this.value_ < otherLeaf.value_) {\n return -1;\n }\n else if (this.value_ === otherLeaf.value_) {\n return 0;\n }\n else {\n return 1;\n }\n }\n }\n else {\n return thisIndex - otherIndex;\n }\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.withIndex = function () {\n return this;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.isIndexed = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.equals = function (other) {\n /**\n * @inheritDoc\n */\n if (other === this) {\n return true;\n }\n else if (other.isLeafNode()) {\n var otherLeaf = other;\n return (this.value_ === otherLeaf.value_ &&\n this.priorityNode_.equals(otherLeaf.priorityNode_));\n }\n else {\n return false;\n }\n };\n /**\n * The sort order for comparing leaf nodes of different types. If two leaf nodes have\n * the same type, the comparison falls back to their value\n * @type {Array.}\n * @const\n */\n LeafNode.VALUE_TYPE_ORDER = ['object', 'boolean', 'number', 'string'];\n return LeafNode;\n}());\nexports.LeafNode = LeafNode;\n\n//# sourceMappingURL=LeafNode.js.map\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * An iterator over an LLRBNode.\n */\nvar SortedMapIterator = /** @class */ (function () {\n /**\n * @template K, V, T\n * @param {LLRBNode|LLRBEmptyNode} node Node to iterate.\n * @param {?K} startKey\n * @param {function(K, K): number} comparator\n * @param {boolean} isReverse_ Whether or not to iterate in reverse\n * @param {(function(K, V):T)=} resultGenerator_\n */\n function SortedMapIterator(node, startKey, comparator, isReverse_, resultGenerator_) {\n if (resultGenerator_ === void 0) { resultGenerator_ = null; }\n this.isReverse_ = isReverse_;\n this.resultGenerator_ = resultGenerator_;\n /** @private\n * @type {Array.}\n */\n this.nodeStack_ = [];\n var cmp = 1;\n while (!node.isEmpty()) {\n node = node;\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse_)\n cmp *= -1;\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse_) {\n node = node.left;\n }\n else {\n node = node.right;\n }\n }\n else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack, but stop iterating;\n this.nodeStack_.push(node);\n break;\n }\n else {\n // This node is greater than our start key, add it to the stack and move to the next one\n this.nodeStack_.push(node);\n if (this.isReverse_) {\n node = node.right;\n }\n else {\n node = node.left;\n }\n }\n }\n }\n SortedMapIterator.prototype.getNext = function () {\n if (this.nodeStack_.length === 0)\n return null;\n var node = this.nodeStack_.pop();\n var result;\n if (this.resultGenerator_)\n result = this.resultGenerator_(node.key, node.value);\n else\n result = { key: node.key, value: node.value };\n if (this.isReverse_) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.right;\n }\n }\n else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.left;\n }\n }\n return result;\n };\n SortedMapIterator.prototype.hasNext = function () {\n return this.nodeStack_.length > 0;\n };\n SortedMapIterator.prototype.peek = function () {\n if (this.nodeStack_.length === 0)\n return null;\n var node = this.nodeStack_[this.nodeStack_.length - 1];\n if (this.resultGenerator_) {\n return this.resultGenerator_(node.key, node.value);\n }\n else {\n return { key: node.key, value: node.value };\n }\n };\n return SortedMapIterator;\n}());\nexports.SortedMapIterator = SortedMapIterator;\n/**\n * Represents a node in a Left-leaning Red-Black tree.\n */\nvar LLRBNode = /** @class */ (function () {\n /**\n * @template K, V\n * @param {!K} key Key associated with this node.\n * @param {!V} value Value associated with this node.\n * @param {?boolean} color Whether this node is red.\n * @param {?(LLRBNode|LLRBEmptyNode)=} left Left child.\n * @param {?(LLRBNode|LLRBEmptyNode)=} right Right child.\n */\n function LLRBNode(key, value, color, left, right) {\n this.key = key;\n this.value = value;\n this.color = color != null ? color : LLRBNode.RED;\n this.left =\n left != null ? left : SortedMap.EMPTY_NODE;\n this.right =\n right != null ? right : SortedMap.EMPTY_NODE;\n }\n /**\n * Returns a copy of the current node, optionally replacing pieces of it.\n *\n * @param {?K} key New key for the node, or null.\n * @param {?V} value New value for the node, or null.\n * @param {?boolean} color New color for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} left New left child for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} right New right child for the node, or null.\n * @return {!LLRBNode} The node copy.\n */\n LLRBNode.prototype.copy = function (key, value, color, left, right) {\n return new LLRBNode(key != null ? key : this.key, value != null ? value : this.value, color != null ? color : this.color, left != null ? left : this.left, right != null ? right : this.right);\n };\n /**\n * @return {number} The total number of nodes in the tree.\n */\n LLRBNode.prototype.count = function () {\n return this.left.count() + 1 + this.right.count();\n };\n /**\n * @return {boolean} True if the tree is empty.\n */\n LLRBNode.prototype.isEmpty = function () {\n return false;\n };\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n LLRBNode.prototype.inorderTraversal = function (action) {\n return (this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action));\n };\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!Object, !Object)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} True if traversal was aborted.\n */\n LLRBNode.prototype.reverseTraversal = function (action) {\n return (this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action));\n };\n /**\n * @return {!Object} The minimum node in the tree.\n * @private\n */\n LLRBNode.prototype.min_ = function () {\n if (this.left.isEmpty()) {\n return this;\n }\n else {\n return this.left.min_();\n }\n };\n /**\n * @return {!K} The maximum key in the tree.\n */\n LLRBNode.prototype.minKey = function () {\n return this.min_().key;\n };\n /**\n * @return {!K} The maximum key in the tree.\n */\n LLRBNode.prototype.maxKey = function () {\n if (this.right.isEmpty()) {\n return this.key;\n }\n else {\n return this.right.maxKey();\n }\n };\n /**\n *\n * @param {!Object} key Key to insert.\n * @param {!Object} value Value to insert.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with the key/value added.\n */\n LLRBNode.prototype.insert = function (key, value, comparator) {\n var cmp, n;\n n = this;\n cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n }\n else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n }\n else {\n n = n.copy(null, null, null, null, n.right.insert(key, value, comparator));\n }\n return n.fixUp_();\n };\n /**\n * @private\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the minimum key removed.\n */\n LLRBNode.prototype.removeMin_ = function () {\n if (this.left.isEmpty()) {\n return SortedMap.EMPTY_NODE;\n }\n var n = this;\n if (!n.left.isRed_() && !n.left.left.isRed_())\n n = n.moveRedLeft_();\n n = n.copy(null, null, null, n.left.removeMin_(), null);\n return n.fixUp_();\n };\n /**\n * @param {!Object} key The key of the item to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the specified item removed.\n */\n LLRBNode.prototype.remove = function (key, comparator) {\n var n, smallest;\n n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed_() && !n.left.left.isRed_()) {\n n = n.moveRedLeft_();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n }\n else {\n if (n.left.isRed_())\n n = n.rotateRight_();\n if (!n.right.isEmpty() && !n.right.isRed_() && !n.right.left.isRed_()) {\n n = n.moveRedRight_();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return SortedMap.EMPTY_NODE;\n }\n else {\n smallest = n.right.min_();\n n = n.copy(smallest.key, smallest.value, null, null, n.right.removeMin_());\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp_();\n };\n /**\n * @private\n * @return {boolean} Whether this is a RED node.\n */\n LLRBNode.prototype.isRed_ = function () {\n return this.color;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree after performing any needed rotations.\n */\n LLRBNode.prototype.fixUp_ = function () {\n var n = this;\n if (n.right.isRed_() && !n.left.isRed_())\n n = n.rotateLeft_();\n if (n.left.isRed_() && n.left.left.isRed_())\n n = n.rotateRight_();\n if (n.left.isRed_() && n.right.isRed_())\n n = n.colorFlip_();\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedLeft.\n */\n LLRBNode.prototype.moveRedLeft_ = function () {\n var n = this.colorFlip_();\n if (n.right.left.isRed_()) {\n n = n.copy(null, null, null, null, n.right.rotateRight_());\n n = n.rotateLeft_();\n n = n.colorFlip_();\n }\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedRight.\n */\n LLRBNode.prototype.moveRedRight_ = function () {\n var n = this.colorFlip_();\n if (n.left.left.isRed_()) {\n n = n.rotateRight_();\n n = n.colorFlip_();\n }\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateLeft.\n */\n LLRBNode.prototype.rotateLeft_ = function () {\n var nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null);\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateRight.\n */\n LLRBNode.prototype.rotateRight_ = function () {\n var nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr);\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after colorFlip.\n */\n LLRBNode.prototype.colorFlip_ = function () {\n var left = this.left.copy(null, null, !this.left.color, null, null);\n var right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n };\n /**\n * For testing.\n *\n * @private\n * @return {boolean} True if all is well.\n */\n LLRBNode.prototype.checkMaxDepth_ = function () {\n var blackDepth = this.check_();\n return Math.pow(2.0, blackDepth) <= this.count() + 1;\n };\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n LLRBNode.prototype.check_ = function () {\n var blackDepth;\n if (this.isRed_() && this.left.isRed_()) {\n throw new Error('Red node has red child(' + this.key + ',' + this.value + ')');\n }\n if (this.right.isRed_()) {\n throw new Error('Right child of (' + this.key + ',' + this.value + ') is red');\n }\n blackDepth = this.left.check_();\n if (blackDepth !== this.right.check_()) {\n throw new Error('Black depths differ');\n }\n else {\n return blackDepth + (this.isRed_() ? 0 : 1);\n }\n };\n LLRBNode.RED = true;\n LLRBNode.BLACK = false;\n return LLRBNode;\n}());\nexports.LLRBNode = LLRBNode;\n/**\n * Represents an empty node (a leaf node in the Red-Black Tree).\n */\nvar LLRBEmptyNode = /** @class */ (function () {\n function LLRBEmptyNode() {\n }\n /**\n * Returns a copy of the current node.\n *\n * @return {!LLRBEmptyNode} The node copy.\n */\n LLRBEmptyNode.prototype.copy = function (key, value, color, left, right) {\n return this;\n };\n /**\n * Returns a copy of the tree, with the specified key/value added.\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with item added.\n */\n LLRBEmptyNode.prototype.insert = function (key, value, comparator) {\n return new LLRBNode(key, value, null);\n };\n /**\n * Returns a copy of the tree, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBEmptyNode} New tree, with item removed.\n */\n LLRBEmptyNode.prototype.remove = function (key, comparator) {\n return this;\n };\n /**\n * @return {number} The total number of nodes in the tree.\n */\n LLRBEmptyNode.prototype.count = function () {\n return 0;\n };\n /**\n * @return {boolean} True if the tree is empty.\n */\n LLRBEmptyNode.prototype.isEmpty = function () {\n return true;\n };\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n LLRBEmptyNode.prototype.inorderTraversal = function (action) {\n return false;\n };\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n LLRBEmptyNode.prototype.reverseTraversal = function (action) {\n return false;\n };\n /**\n * @return {null}\n */\n LLRBEmptyNode.prototype.minKey = function () {\n return null;\n };\n /**\n * @return {null}\n */\n LLRBEmptyNode.prototype.maxKey = function () {\n return null;\n };\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n LLRBEmptyNode.prototype.check_ = function () {\n return 0;\n };\n /**\n * @private\n * @return {boolean} Whether this node is red.\n */\n LLRBEmptyNode.prototype.isRed_ = function () {\n return false;\n };\n return LLRBEmptyNode;\n}());\nexports.LLRBEmptyNode = LLRBEmptyNode;\n/**\n * An immutable sorted map implementation, based on a Left-leaning Red-Black\n * tree.\n */\nvar SortedMap = /** @class */ (function () {\n /**\n * @template K, V\n * @param {function(K, K):number} comparator_ Key comparator.\n * @param {LLRBNode=} root_ (Optional) Root node for the map.\n */\n function SortedMap(comparator_, root_) {\n if (root_ === void 0) { root_ = SortedMap.EMPTY_NODE; }\n this.comparator_ = comparator_;\n this.root_ = root_;\n }\n /**\n * Returns a copy of the map, with the specified key/value added or replaced.\n * (TODO: We should perhaps rename this method to 'put')\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @return {!SortedMap.} New map, with item added.\n */\n SortedMap.prototype.insert = function (key, value) {\n return new SortedMap(this.comparator_, this.root_\n .insert(key, value, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n /**\n * Returns a copy of the map, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @return {!SortedMap.} New map, with item removed.\n */\n SortedMap.prototype.remove = function (key) {\n return new SortedMap(this.comparator_, this.root_\n .remove(key, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n /**\n * Returns the value of the node with the given key, or null.\n *\n * @param {!K} key The key to look up.\n * @return {?V} The value of the node with the given key, or null if the\n * key doesn't exist.\n */\n SortedMap.prototype.get = function (key) {\n var cmp;\n var node = this.root_;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n return node.value;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n };\n /**\n * Returns the key of the item *before* the specified key, or null if key is the first item.\n * @param {K} key The key to find the predecessor of\n * @return {?K} The predecessor key.\n */\n SortedMap.prototype.getPredecessorKey = function (key) {\n var cmp, node = this.root_, rightParent = null;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty())\n node = node.right;\n return node.key;\n }\n else if (rightParent) {\n return rightParent.key;\n }\n else {\n return null; // first item.\n }\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n throw new Error('Attempted to find predecessor key for a nonexistent key. What gives?');\n };\n /**\n * @return {boolean} True if the map is empty.\n */\n SortedMap.prototype.isEmpty = function () {\n return this.root_.isEmpty();\n };\n /**\n * @return {number} The total number of nodes in the map.\n */\n SortedMap.prototype.count = function () {\n return this.root_.count();\n };\n /**\n * @return {?K} The minimum key in the map.\n */\n SortedMap.prototype.minKey = function () {\n return this.root_.minKey();\n };\n /**\n * @return {?K} The maximum key in the map.\n */\n SortedMap.prototype.maxKey = function () {\n return this.root_.maxKey();\n };\n /**\n * Traverses the map in key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!K, !V):*} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n SortedMap.prototype.inorderTraversal = function (action) {\n return this.root_.inorderTraversal(action);\n };\n /**\n * Traverses the map in reverse key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!Object, !Object)} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} True if the traversal was aborted.\n */\n SortedMap.prototype.reverseTraversal = function (action) {\n return this.root_.reverseTraversal(action);\n };\n /**\n * Returns an iterator over the SortedMap.\n * @template T\n * @param {(function(K, V):T)=} resultGenerator\n * @return {SortedMapIterator.} The iterator.\n */\n SortedMap.prototype.getIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root_, null, this.comparator_, false, resultGenerator);\n };\n SortedMap.prototype.getIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root_, key, this.comparator_, false, resultGenerator);\n };\n SortedMap.prototype.getReverseIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root_, key, this.comparator_, true, resultGenerator);\n };\n SortedMap.prototype.getReverseIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root_, null, this.comparator_, true, resultGenerator);\n };\n /**\n * Always use the same empty node, to reduce memory.\n * @const\n */\n SortedMap.EMPTY_NODE = new LLRBEmptyNode();\n return SortedMap;\n}());\nexports.SortedMap = SortedMap;\n\n//# sourceMappingURL=SortedMap.js.map\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ServerValues_1 = __webpack_require__(43);\nvar nodeFromJSON_1 = __webpack_require__(11);\nvar Path_1 = __webpack_require__(2);\nvar SparseSnapshotTree_1 = __webpack_require__(44);\nvar SyncTree_1 = __webpack_require__(86);\nvar SnapshotHolder_1 = __webpack_require__(97);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar util_3 = __webpack_require__(0);\nvar AuthTokenProvider_1 = __webpack_require__(98);\nvar StatsManager_1 = __webpack_require__(25);\nvar StatsReporter_1 = __webpack_require__(100);\nvar StatsListener_1 = __webpack_require__(49);\nvar EventQueue_1 = __webpack_require__(101);\nvar PersistentConnection_1 = __webpack_require__(50);\nvar ReadonlyRestClient_1 = __webpack_require__(106);\nvar Database_1 = __webpack_require__(32);\nvar INTERRUPT_REASON = 'repo_interrupt';\n/**\n * A connection to a single data repository.\n */\nvar Repo = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo_\n * @param {boolean} forceRestClient\n * @param {!FirebaseApp} app\n */\n function Repo(repoInfo_, forceRestClient, app) {\n var _this = this;\n this.repoInfo_ = repoInfo_;\n this.app = app;\n this.dataUpdateCount = 0;\n this.statsListener_ = null;\n this.eventQueue_ = new EventQueue_1.EventQueue();\n this.nextWriteId_ = 1;\n this.interceptServerDataCallback_ = null;\n // A list of data pieces and paths to be set when this client disconnects.\n this.onDisconnect_ = new SparseSnapshotTree_1.SparseSnapshotTree();\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @type {?PersistentConnection}\n */\n this.persistentConnection_ = null;\n /** @type {!AuthTokenProvider} */\n var authTokenProvider = new AuthTokenProvider_1.AuthTokenProvider(app);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo_);\n if (forceRestClient || util_2.beingCrawled()) {\n this.server_ = new ReadonlyRestClient_1.ReadonlyRestClient(this.repoInfo_, this.onDataUpdate_.bind(this), authTokenProvider);\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n }\n else {\n var authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if (typeof authOverride !== 'object') {\n throw new Error('Only objects are supported for option databaseAuthVariableOverride');\n }\n try {\n util_1.stringify(authOverride);\n }\n catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n this.persistentConnection_ = new PersistentConnection_1.PersistentConnection(this.repoInfo_, this.onDataUpdate_.bind(this), this.onConnectStatus_.bind(this), this.onServerInfoUpdate_.bind(this), authTokenProvider, authOverride);\n this.server_ = this.persistentConnection_;\n }\n authTokenProvider.addTokenChangeListener(function (token) {\n _this.server_.refreshAuthToken(token);\n });\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = StatsManager_1.StatsManager.getOrCreateReporter(repoInfo_, function () { return new StatsReporter_1.StatsReporter(_this.stats_, _this.server_); });\n this.transactions_init_();\n // Used for .info.\n this.infoData_ = new SnapshotHolder_1.SnapshotHolder();\n this.infoSyncTree_ = new SyncTree_1.SyncTree({\n startListening: function (query, tag, currentHashFn, onComplete) {\n var infoEvents = [];\n var node = _this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = _this.infoSyncTree_.applyServerOverwrite(query.path, node);\n setTimeout(function () {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: function () { }\n });\n this.updateInfo_('connected', false);\n this.serverSyncTree_ = new SyncTree_1.SyncTree({\n startListening: function (query, tag, currentHashFn, onComplete) {\n _this.server_.listen(query, currentHashFn, tag, function (status, data) {\n var events = onComplete(status, data);\n _this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: function (query, tag) {\n _this.server_.unlisten(query, tag);\n }\n });\n }\n /**\n * @return {string} The URL corresponding to the root of this Firebase.\n */\n Repo.prototype.toString = function () {\n return ((this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host);\n };\n /**\n * @return {!string} The namespace represented by the repo.\n */\n Repo.prototype.name = function () {\n return this.repoInfo_.namespace;\n };\n /**\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\n */\n Repo.prototype.serverTime = function () {\n var offsetNode = this.infoData_.getNode(new Path_1.Path('.info/serverTimeOffset'));\n var offset = offsetNode.val() || 0;\n return new Date().getTime() + offset;\n };\n /**\n * Generate ServerValues using some variables from the repo object.\n * @return {!Object}\n */\n Repo.prototype.generateServerValues = function () {\n return ServerValues_1.generateWithValues({\n timestamp: this.serverTime()\n });\n };\n /**\n * Called by realtime when we get new messages from the server.\n *\n * @private\n * @param {string} pathString\n * @param {*} data\n * @param {boolean} isMerge\n * @param {?number} tag\n */\n Repo.prototype.onDataUpdate_ = function (pathString, data, isMerge, tag) {\n // For testing.\n this.dataUpdateCount++;\n var path = new Path_1.Path(pathString);\n data = this.interceptServerDataCallback_\n ? this.interceptServerDataCallback_(pathString, data)\n : data;\n var events = [];\n if (tag) {\n if (isMerge) {\n var taggedChildren = util_3.map(data, function (raw) {\n return nodeFromJSON_1.nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyTaggedQueryMerge(path, taggedChildren, tag);\n }\n else {\n var taggedSnap = nodeFromJSON_1.nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(path, taggedSnap, tag);\n }\n }\n else if (isMerge) {\n var changedChildren = util_3.map(data, function (raw) {\n return nodeFromJSON_1.nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n }\n else {\n var snap = nodeFromJSON_1.nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n var affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n };\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @param {?function(!string, *):*} callback\n * @private\n */\n Repo.prototype.interceptServerData_ = function (callback) {\n this.interceptServerDataCallback_ = callback;\n };\n /**\n * @param {!boolean} connectStatus\n * @private\n */\n Repo.prototype.onConnectStatus_ = function (connectStatus) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n };\n /**\n * @param {!Object} updates\n * @private\n */\n Repo.prototype.onServerInfoUpdate_ = function (updates) {\n var _this = this;\n util_2.each(updates, function (value, key) {\n _this.updateInfo_(key, value);\n });\n };\n /**\n *\n * @param {!string} pathString\n * @param {*} value\n * @private\n */\n Repo.prototype.updateInfo_ = function (pathString, value) {\n var path = new Path_1.Path('/.info/' + pathString);\n var newNode = nodeFromJSON_1.nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n var events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n };\n /**\n * @return {!number}\n * @private\n */\n Repo.prototype.getNextWriteId_ = function () {\n return this.nextWriteId_++;\n };\n /**\n * @param {!Path} path\n * @param {*} newVal\n * @param {number|string|null} newPriority\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.setWithPriority = function (path, newVal, newPriority, onComplete) {\n var _this = this;\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, newPriority);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n var writeId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, writeId, true);\n this.eventQueue_.queueEvents(events);\n this.server_.put(path.toString(), newNodeUnresolved.val(/*export=*/ true), function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n util_2.warn('set at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId, !success);\n _this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n var affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n };\n /**\n * @param {!Path} path\n * @param {!Object} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.update = function (path, childrenToMerge, onComplete) {\n var _this = this;\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n // Start with our existing data and merge each child into it.\n var empty = true;\n var serverValues = this.generateServerValues();\n var changedChildren = {};\n util_3.forEach(childrenToMerge, function (changedKey, changedValue) {\n empty = false;\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(changedValue);\n changedChildren[changedKey] = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n });\n if (!empty) {\n var writeId_1 = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserMerge(path, changedChildren, writeId_1);\n this.eventQueue_.queueEvents(events);\n this.server_.merge(path.toString(), childrenToMerge, function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n util_2.warn('update at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId_1, !success);\n var affectedPath = clearEvents.length > 0 ? _this.rerunTransactions_(path) : path;\n _this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n util_3.forEach(childrenToMerge, function (changedPath) {\n var affectedPath = _this.abortTransactions_(path.child(changedPath));\n _this.rerunTransactions_(affectedPath);\n });\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n }\n else {\n util_2.log(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n };\n /**\n * Applies all of the changes stored up in the onDisconnect_ tree.\n * @private\n */\n Repo.prototype.runOnDisconnectEvents_ = function () {\n var _this = this;\n this.log_('onDisconnectEvents');\n var serverValues = this.generateServerValues();\n var resolvedOnDisconnectTree = ServerValues_1.resolveDeferredValueTree(this.onDisconnect_, serverValues);\n var events = [];\n resolvedOnDisconnectTree.forEachTree(Path_1.Path.Empty, function (path, snap) {\n events = events.concat(_this.serverSyncTree_.applyServerOverwrite(path, snap));\n var affectedPath = _this.abortTransactions_(path);\n _this.rerunTransactions_(affectedPath);\n });\n this.onDisconnect_ = new SparseSnapshotTree_1.SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path_1.Path.Empty, events);\n };\n /**\n * @param {!Path} path\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectCancel = function (path, onComplete) {\n var _this = this;\n this.server_.onDisconnectCancel(path.toString(), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.forget(path);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectSet = function (path, value, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_1.nodeFromJSON(value);\n this.server_.onDisconnectPut(path.toString(), newNode.val(/*export=*/ true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {*} priority\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectSetWithPriority = function (path, value, priority, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_1.nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(path.toString(), newNode.val(/*export=*/ true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectUpdate = function (path, childrenToMerge, onComplete) {\n var _this = this;\n if (util_3.isEmpty(childrenToMerge)) {\n util_2.log(\"onDisconnect().update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n this.server_.onDisconnectMerge(path.toString(), childrenToMerge, function (status, errorReason) {\n if (status === 'ok') {\n util_3.forEach(childrenToMerge, function (childName, childNode) {\n var newChildNode = nodeFromJSON_1.nodeFromJSON(childNode);\n _this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n */\n Repo.prototype.addEventCallbackForQuery = function (query, eventRegistration) {\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(query, eventRegistration);\n }\n else {\n events = this.serverSyncTree_.addEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n /**\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration\n */\n Repo.prototype.removeEventCallbackForQuery = function (query, eventRegistration) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n else {\n events = this.serverSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n Repo.prototype.interrupt = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n };\n Repo.prototype.resume = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n };\n Repo.prototype.stats = function (showDelta) {\n if (showDelta === void 0) { showDelta = false; }\n if (typeof console === 'undefined')\n return;\n var stats;\n if (showDelta) {\n if (!this.statsListener_)\n this.statsListener_ = new StatsListener_1.StatsListener(this.stats_);\n stats = this.statsListener_.get();\n }\n else {\n stats = this.stats_.get();\n }\n var longestName = Object.keys(stats).reduce(function (previousValue, currentValue) {\n return Math.max(currentValue.length, previousValue);\n }, 0);\n util_3.forEach(stats, function (stat, value) {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (var i = stat.length; i < longestName + 2; i++)\n stat += ' ';\n console.log(stat + value);\n });\n };\n Repo.prototype.statsIncrementCounter = function (metric) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n };\n /**\n * @param {...*} var_args\n * @private\n */\n Repo.prototype.log_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n util_2.log.apply(void 0, [prefix].concat(var_args));\n };\n /**\n * @param {?function(?Error, *=)} callback\n * @param {!string} status\n * @param {?string=} errorReason\n */\n Repo.prototype.callOnCompleteCallback = function (callback, status, errorReason) {\n if (callback) {\n util_2.exceptionGuard(function () {\n if (status == 'ok') {\n callback(null);\n }\n else {\n var code = (status || 'error').toUpperCase();\n var message = code;\n if (errorReason)\n message += ': ' + errorReason;\n var error = new Error(message);\n error.code = code;\n callback(error);\n }\n });\n }\n };\n Object.defineProperty(Repo.prototype, \"database\", {\n get: function () {\n return this.__database || (this.__database = new Database_1.Database(this));\n },\n enumerable: true,\n configurable: true\n });\n return Repo;\n}());\nexports.Repo = Repo;\n\n//# sourceMappingURL=Repo.js.map\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully\n * initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.\n * initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks\n * whether a node potentially had children removed due to a filter.\n */\nvar CacheNode = /** @class */ (function () {\n /**\n * @param {!Node} node_\n * @param {boolean} fullyInitialized_\n * @param {boolean} filtered_\n */\n function CacheNode(node_, fullyInitialized_, filtered_) {\n this.node_ = node_;\n this.fullyInitialized_ = fullyInitialized_;\n this.filtered_ = filtered_;\n }\n /**\n * Returns whether this node was fully initialized with either server data or a complete overwrite by the client\n * @return {boolean}\n */\n CacheNode.prototype.isFullyInitialized = function () {\n return this.fullyInitialized_;\n };\n /**\n * Returns whether this node is potentially missing children due to a filter applied to the node\n * @return {boolean}\n */\n CacheNode.prototype.isFiltered = function () {\n return this.filtered_;\n };\n /**\n * @param {!Path} path\n * @return {boolean}\n */\n CacheNode.prototype.isCompleteForPath = function (path) {\n if (path.isEmpty()) {\n return this.isFullyInitialized() && !this.filtered_;\n }\n var childKey = path.getFront();\n return this.isCompleteForChild(childKey);\n };\n /**\n * @param {!string} key\n * @return {boolean}\n */\n CacheNode.prototype.isCompleteForChild = function (key) {\n return ((this.isFullyInitialized() && !this.filtered_) || this.node_.hasChild(key));\n };\n /**\n * @return {!Node}\n */\n CacheNode.prototype.getNode = function () {\n return this.node_;\n };\n return CacheNode;\n}());\nexports.CacheNode = CacheNode;\n\n//# sourceMappingURL=CacheNode.js.map\n\n\n/***/ }),\n/* 19 */,\n/* 20 */,\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar onDisconnect_1 = __webpack_require__(35);\nvar TransactionResult_1 = __webpack_require__(82);\nvar util_1 = __webpack_require__(1);\nvar NextPushId_1 = __webpack_require__(83);\nvar Query_1 = __webpack_require__(36);\nvar Repo_1 = __webpack_require__(17);\nvar Path_1 = __webpack_require__(2);\nvar QueryParams_1 = __webpack_require__(107);\nvar validation_1 = __webpack_require__(7);\nvar util_2 = __webpack_require__(0);\nvar util_3 = __webpack_require__(0);\nvar SyncPoint_1 = __webpack_require__(47);\nvar Reference = /** @class */ (function (_super) {\n __extends(Reference, _super);\n /**\n * Call options:\n * new Reference(Repo, Path) or\n * new Reference(url: string, string|RepoManager)\n *\n * Externally - this is the firebase.database.Reference type.\n *\n * @param {!Repo} repo\n * @param {(!Path)} path\n * @extends {Query}\n */\n function Reference(repo, path) {\n var _this = this;\n if (!(repo instanceof Repo_1.Repo)) {\n throw new Error('new Reference() no longer supported - use app.database().');\n }\n // call Query's constructor, passing in the repo and path.\n _this = _super.call(this, repo, path, QueryParams_1.QueryParams.DEFAULT, false) || this;\n return _this;\n }\n /** @return {?string} */\n Reference.prototype.getKey = function () {\n util_2.validateArgCount('Reference.key', 0, 0, arguments.length);\n if (this.path.isEmpty())\n return null;\n else\n return this.path.getBack();\n };\n /**\n * @param {!(string|Path)} pathString\n * @return {!Reference}\n */\n Reference.prototype.child = function (pathString) {\n util_2.validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n }\n else if (!(pathString instanceof Path_1.Path)) {\n if (this.path.getFront() === null)\n validation_1.validateRootPathString('Reference.child', 1, pathString, false);\n else\n validation_1.validatePathString('Reference.child', 1, pathString, false);\n }\n return new Reference(this.repo, this.path.child(pathString));\n };\n /** @return {?Reference} */\n Reference.prototype.getParent = function () {\n util_2.validateArgCount('Reference.parent', 0, 0, arguments.length);\n var parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n };\n /** @return {!Reference} */\n Reference.prototype.getRoot = function () {\n util_2.validateArgCount('Reference.root', 0, 0, arguments.length);\n var ref = this;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n };\n /** @return {!Database} */\n Reference.prototype.databaseProp = function () {\n return this.repo.database;\n };\n /**\n * @param {*} newVal\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.set = function (newVal, onComplete) {\n util_2.validateArgCount('Reference.set', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.set', this.path);\n validation_1.validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n util_2.validateCallback('Reference.set', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path, newVal, \n /*priority=*/ null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.update = function (objectToMerge, onComplete) {\n util_2.validateArgCount('Reference.update', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.update', this.path);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n util_1.warn('Passing an Array to Firebase.update() is deprecated. ' +\n 'Use set() if you want to overwrite the existing data, or ' +\n 'an Object with integer keys if you really do want to ' +\n 'only update some of the children.');\n }\n validation_1.validateFirebaseMergeDataArg('Reference.update', 1, objectToMerge, this.path, false);\n util_2.validateCallback('Reference.update', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.update(this.path, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} newVal\n * @param {string|number|null} newPriority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.setWithPriority = function (newVal, newPriority, onComplete) {\n util_2.validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validation_1.validateWritablePath('Reference.setWithPriority', this.path);\n validation_1.validateFirebaseDataArg('Reference.setWithPriority', 1, newVal, this.path, false);\n validation_1.validatePriority('Reference.setWithPriority', 2, newPriority, false);\n util_2.validateCallback('Reference.setWithPriority', 3, onComplete, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.setWithPriority failed: ' +\n this.getKey() +\n ' is a read-only object.';\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path, newVal, newPriority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.remove = function (onComplete) {\n util_2.validateArgCount('Reference.remove', 0, 1, arguments.length);\n validation_1.validateWritablePath('Reference.remove', this.path);\n util_2.validateCallback('Reference.remove', 1, onComplete, true);\n return this.set(null, onComplete);\n };\n /**\n * @param {function(*):*} transactionUpdate\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\n * @param {boolean=} applyLocally\n * @return {!Promise}\n */\n Reference.prototype.transaction = function (transactionUpdate, onComplete, applyLocally) {\n util_2.validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validation_1.validateWritablePath('Reference.transaction', this.path);\n util_2.validateCallback('Reference.transaction', 1, transactionUpdate, false);\n util_2.validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validation_1.validateBoolean('Reference.transaction', 3, applyLocally, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.transaction failed: ' +\n this.getKey() +\n ' is a read-only object.';\n if (applyLocally === undefined)\n applyLocally = true;\n var deferred = new util_3.Deferred();\n if (typeof onComplete === 'function') {\n deferred.promise.catch(function () { });\n }\n var promiseComplete = function (error, committed, snapshot) {\n if (error) {\n deferred.reject(error);\n }\n else {\n deferred.resolve(new TransactionResult_1.TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(this.path, transactionUpdate, promiseComplete, applyLocally);\n return deferred.promise;\n };\n /**\n * @param {string|number|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.setPriority = function (priority, onComplete) {\n util_2.validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.setPriority', this.path);\n validation_1.validatePriority('Reference.setPriority', 1, priority, false);\n util_2.validateCallback('Reference.setPriority', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path.child('.priority'), priority, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*=} value\n * @param {function(?Error)=} onComplete\n * @return {!Reference}\n */\n Reference.prototype.push = function (value, onComplete) {\n util_2.validateArgCount('Reference.push', 0, 2, arguments.length);\n validation_1.validateWritablePath('Reference.push', this.path);\n validation_1.validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n util_2.validateCallback('Reference.push', 2, onComplete, true);\n var now = this.repo.serverTime();\n var name = NextPushId_1.nextPushId(now);\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n var thennablePushRef = this.child(name);\n var pushRef = this.child(name);\n var promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(function () { return pushRef; });\n }\n else {\n promise = Promise.resolve(pushRef);\n }\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n if (typeof onComplete === 'function') {\n promise.catch(function () { });\n }\n return thennablePushRef;\n };\n /**\n * @return {!OnDisconnect}\n */\n Reference.prototype.onDisconnect = function () {\n validation_1.validateWritablePath('Reference.onDisconnect', this.path);\n return new onDisconnect_1.OnDisconnect(this.repo, this.path);\n };\n Object.defineProperty(Reference.prototype, \"database\", {\n get: function () {\n return this.databaseProp();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"key\", {\n get: function () {\n return this.getKey();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"parent\", {\n get: function () {\n return this.getParent();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n get: function () {\n return this.getRoot();\n },\n enumerable: true,\n configurable: true\n });\n return Reference;\n}(Query_1.Query));\nexports.Reference = Reference;\n/**\n * Define reference constructor in various modules\n *\n * We are doing this here to avoid several circular\n * dependency issues\n */\nQuery_1.Query.__referenceConstructor = Reference;\nSyncPoint_1.SyncPoint.__referenceConstructor = Reference;\n\n//# sourceMappingURL=Reference.js.map\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar validation_1 = __webpack_require__(7);\nvar Path_1 = __webpack_require__(2);\nvar PriorityIndex_1 = __webpack_require__(3);\n/**\n * Class representing a firebase data snapshot. It wraps a SnapshotNode and\n * surfaces the public methods (val, forEach, etc.) we want to expose.\n */\nvar DataSnapshot = /** @class */ (function () {\n /**\n * @param {!Node} node_ A SnapshotNode to wrap.\n * @param {!Reference} ref_ The ref of the location this snapshot came from.\n * @param {!Index} index_ The iteration order for this snapshot\n */\n function DataSnapshot(node_, ref_, index_) {\n this.node_ = node_;\n this.ref_ = ref_;\n this.index_ = index_;\n }\n /**\n * Retrieves the snapshot contents as JSON. Returns null if the snapshot is\n * empty.\n *\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n DataSnapshot.prototype.val = function () {\n util_1.validateArgCount('DataSnapshot.val', 0, 0, arguments.length);\n return this.node_.val();\n };\n /**\n * Returns the snapshot contents as JSON, including priorities of node. Suitable for exporting\n * the entire node contents.\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n DataSnapshot.prototype.exportVal = function () {\n util_1.validateArgCount('DataSnapshot.exportVal', 0, 0, arguments.length);\n return this.node_.val(true);\n };\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n DataSnapshot.prototype.toJSON = function () {\n // Optional spacer argument is unnecessary because we're depending on recursion rather than stringifying the content\n util_1.validateArgCount('DataSnapshot.toJSON', 0, 1, arguments.length);\n return this.exportVal();\n };\n /**\n * Returns whether the snapshot contains a non-null value.\n *\n * @return {boolean} Whether the snapshot contains a non-null value, or is empty.\n */\n DataSnapshot.prototype.exists = function () {\n util_1.validateArgCount('DataSnapshot.exists', 0, 0, arguments.length);\n return !this.node_.isEmpty();\n };\n /**\n * Returns a DataSnapshot of the specified child node's contents.\n *\n * @param {!string} childPathString Path to a child.\n * @return {!DataSnapshot} DataSnapshot for child node.\n */\n DataSnapshot.prototype.child = function (childPathString) {\n util_1.validateArgCount('DataSnapshot.child', 0, 1, arguments.length);\n // Ensure the childPath is a string (can be a number)\n childPathString = String(childPathString);\n validation_1.validatePathString('DataSnapshot.child', 1, childPathString, false);\n var childPath = new Path_1.Path(childPathString);\n var childRef = this.ref_.child(childPath);\n return new DataSnapshot(this.node_.getChild(childPath), childRef, PriorityIndex_1.PRIORITY_INDEX);\n };\n /**\n * Returns whether the snapshot contains a child at the specified path.\n *\n * @param {!string} childPathString Path to a child.\n * @return {boolean} Whether the child exists.\n */\n DataSnapshot.prototype.hasChild = function (childPathString) {\n util_1.validateArgCount('DataSnapshot.hasChild', 1, 1, arguments.length);\n validation_1.validatePathString('DataSnapshot.hasChild', 1, childPathString, false);\n var childPath = new Path_1.Path(childPathString);\n return !this.node_.getChild(childPath).isEmpty();\n };\n /**\n * Returns the priority of the object, or null if no priority was set.\n *\n * @return {string|number|null} The priority.\n */\n DataSnapshot.prototype.getPriority = function () {\n util_1.validateArgCount('DataSnapshot.getPriority', 0, 0, arguments.length);\n // typecast here because we never return deferred values or internal priorities (MAX_PRIORITY)\n return this.node_.getPriority().val();\n };\n /**\n * Iterates through child nodes and calls the specified action for each one.\n *\n * @param {function(!DataSnapshot)} action Callback function to be called\n * for each child.\n * @return {boolean} True if forEach was canceled by action returning true for\n * one of the child nodes.\n */\n DataSnapshot.prototype.forEach = function (action) {\n var _this = this;\n util_1.validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);\n util_1.validateCallback('DataSnapshot.forEach', 1, action, false);\n if (this.node_.isLeafNode())\n return false;\n var childrenNode = this.node_;\n // Sanitize the return value to a boolean. ChildrenNode.forEachChild has a weird return type...\n return !!childrenNode.forEachChild(this.index_, function (key, node) {\n return action(new DataSnapshot(node, _this.ref_.child(key), PriorityIndex_1.PRIORITY_INDEX));\n });\n };\n /**\n * Returns whether this DataSnapshot has children.\n * @return {boolean} True if the DataSnapshot contains 1 or more child nodes.\n */\n DataSnapshot.prototype.hasChildren = function () {\n util_1.validateArgCount('DataSnapshot.hasChildren', 0, 0, arguments.length);\n if (this.node_.isLeafNode())\n return false;\n else\n return !this.node_.isEmpty();\n };\n Object.defineProperty(DataSnapshot.prototype, \"key\", {\n get: function () {\n return this.ref_.getKey();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the number of children for this DataSnapshot.\n * @return {number} The number of children that this DataSnapshot contains.\n */\n DataSnapshot.prototype.numChildren = function () {\n util_1.validateArgCount('DataSnapshot.numChildren', 0, 0, arguments.length);\n return this.node_.numChildren();\n };\n /**\n * @return {Reference} The Firebase reference for the location this snapshot's data came from.\n */\n DataSnapshot.prototype.getRef = function () {\n util_1.validateArgCount('DataSnapshot.ref', 0, 0, arguments.length);\n return this.ref_;\n };\n Object.defineProperty(DataSnapshot.prototype, \"ref\", {\n get: function () {\n return this.getRef();\n },\n enumerable: true,\n configurable: true\n });\n return DataSnapshot;\n}());\nexports.DataSnapshot = DataSnapshot;\n\n//# sourceMappingURL=DataSnapshot.js.map\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SortedMap_1 = __webpack_require__(16);\nvar Path_1 = __webpack_require__(2);\nvar util_1 = __webpack_require__(1);\nvar util_2 = __webpack_require__(0);\nvar emptyChildrenSingleton;\n/**\n * Singleton empty children collection.\n *\n * @const\n * @type {!SortedMap.>}\n */\nvar EmptyChildren = function () {\n if (!emptyChildrenSingleton) {\n emptyChildrenSingleton = new SortedMap_1.SortedMap(util_1.stringCompare);\n }\n return emptyChildrenSingleton;\n};\n/**\n * A tree with immutable elements.\n */\nvar ImmutableTree = /** @class */ (function () {\n /**\n * @template T\n * @param {?T} value\n * @param {SortedMap.>=} children\n */\n function ImmutableTree(value, children) {\n if (children === void 0) { children = EmptyChildren(); }\n this.value = value;\n this.children = children;\n }\n /**\n * @template T\n * @param {!Object.} obj\n * @return {!ImmutableTree.}\n */\n ImmutableTree.fromObject = function (obj) {\n var tree = ImmutableTree.Empty;\n util_2.forEach(obj, function (childPath, childSnap) {\n tree = tree.set(new Path_1.Path(childPath), childSnap);\n });\n return tree;\n };\n /**\n * True if the value is empty and there are no children\n * @return {boolean}\n */\n ImmutableTree.prototype.isEmpty = function () {\n return this.value === null && this.children.isEmpty();\n };\n /**\n * Given a path and predicate, return the first node and the path to that node\n * where the predicate returns true.\n *\n * TODO Do a perf test -- If we're creating a bunch of {path: value:} objects\n * on the way back out, it may be better to pass down a pathSoFar obj.\n *\n * @param {!Path} relativePath The remainder of the path\n * @param {function(T):boolean} predicate The predicate to satisfy to return a\n * node\n * @return {?{path:!Path, value:!T}}\n */\n ImmutableTree.prototype.findRootMostMatchingPathAndValue = function (relativePath, predicate) {\n if (this.value != null && predicate(this.value)) {\n return { path: Path_1.Path.Empty, value: this.value };\n }\n else {\n if (relativePath.isEmpty()) {\n return null;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child !== null) {\n var childExistingPathAndValue = child.findRootMostMatchingPathAndValue(relativePath.popFront(), predicate);\n if (childExistingPathAndValue != null) {\n var fullPath = new Path_1.Path(front).child(childExistingPathAndValue.path);\n return { path: fullPath, value: childExistingPathAndValue.value };\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n }\n }\n };\n /**\n * Find, if it exists, the shortest subpath of the given path that points a defined\n * value in the tree\n * @param {!Path} relativePath\n * @return {?{path: !Path, value: !T}}\n */\n ImmutableTree.prototype.findRootMostValueAndPath = function (relativePath) {\n return this.findRootMostMatchingPathAndValue(relativePath, function () { return true; });\n };\n /**\n * @param {!Path} relativePath\n * @return {!ImmutableTree.} The subtree at the given path\n */\n ImmutableTree.prototype.subtree = function (relativePath) {\n if (relativePath.isEmpty()) {\n return this;\n }\n else {\n var front = relativePath.getFront();\n var childTree = this.children.get(front);\n if (childTree !== null) {\n return childTree.subtree(relativePath.popFront());\n }\n else {\n return ImmutableTree.Empty;\n }\n }\n };\n /**\n * Sets a value at the specified path.\n *\n * @param {!Path} relativePath Path to set value at.\n * @param {?T} toSet Value to set.\n * @return {!ImmutableTree.} Resulting tree.\n */\n ImmutableTree.prototype.set = function (relativePath, toSet) {\n if (relativePath.isEmpty()) {\n return new ImmutableTree(toSet, this.children);\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front) || ImmutableTree.Empty;\n var newChild = child.set(relativePath.popFront(), toSet);\n var newChildren = this.children.insert(front, newChild);\n return new ImmutableTree(this.value, newChildren);\n }\n };\n /**\n * Removes the value at the specified path.\n *\n * @param {!Path} relativePath Path to value to remove.\n * @return {!ImmutableTree.} Resulting tree.\n */\n ImmutableTree.prototype.remove = function (relativePath) {\n if (relativePath.isEmpty()) {\n if (this.children.isEmpty()) {\n return ImmutableTree.Empty;\n }\n else {\n return new ImmutableTree(null, this.children);\n }\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child) {\n var newChild = child.remove(relativePath.popFront());\n var newChildren = void 0;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n }\n else {\n newChildren = this.children.insert(front, newChild);\n }\n if (this.value === null && newChildren.isEmpty()) {\n return ImmutableTree.Empty;\n }\n else {\n return new ImmutableTree(this.value, newChildren);\n }\n }\n else {\n return this;\n }\n }\n };\n /**\n * Gets a value from the tree.\n *\n * @param {!Path} relativePath Path to get value for.\n * @return {?T} Value at path, or null.\n */\n ImmutableTree.prototype.get = function (relativePath) {\n if (relativePath.isEmpty()) {\n return this.value;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child) {\n return child.get(relativePath.popFront());\n }\n else {\n return null;\n }\n }\n };\n /**\n * Replace the subtree at the specified path with the given new tree.\n *\n * @param {!Path} relativePath Path to replace subtree for.\n * @param {!ImmutableTree} newTree New tree.\n * @return {!ImmutableTree} Resulting tree.\n */\n ImmutableTree.prototype.setTree = function (relativePath, newTree) {\n if (relativePath.isEmpty()) {\n return newTree;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front) || ImmutableTree.Empty;\n var newChild = child.setTree(relativePath.popFront(), newTree);\n var newChildren = void 0;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n }\n else {\n newChildren = this.children.insert(front, newChild);\n }\n return new ImmutableTree(this.value, newChildren);\n }\n };\n /**\n * Performs a depth first fold on this tree. Transforms a tree into a single\n * value, given a function that operates on the path to a node, an optional\n * current value, and a map of child names to folded subtrees\n * @template V\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n */\n ImmutableTree.prototype.fold = function (fn) {\n return this.fold_(Path_1.Path.Empty, fn);\n };\n /**\n * Recursive helper for public-facing fold() method\n * @template V\n * @param {!Path} pathSoFar\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n * @private\n */\n ImmutableTree.prototype.fold_ = function (pathSoFar, fn) {\n var accum = {};\n this.children.inorderTraversal(function (childKey, childTree) {\n accum[childKey] = childTree.fold_(pathSoFar.child(childKey), fn);\n });\n return fn(pathSoFar, this.value, accum);\n };\n /**\n * Find the first matching value on the given path. Return the result of applying f to it.\n * @template V\n * @param {!Path} path\n * @param {!function(!Path, !T):?V} f\n * @return {?V}\n */\n ImmutableTree.prototype.findOnPath = function (path, f) {\n return this.findOnPath_(path, Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.findOnPath_ = function (pathToFollow, pathSoFar, f) {\n var result = this.value ? f(pathSoFar, this.value) : false;\n if (result) {\n return result;\n }\n else {\n if (pathToFollow.isEmpty()) {\n return null;\n }\n else {\n var front = pathToFollow.getFront();\n var nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.findOnPath_(pathToFollow.popFront(), pathSoFar.child(front), f);\n }\n else {\n return null;\n }\n }\n }\n };\n /**\n *\n * @param {!Path} path\n * @param {!function(!Path, !T)} f\n * @returns {!ImmutableTree.}\n */\n ImmutableTree.prototype.foreachOnPath = function (path, f) {\n return this.foreachOnPath_(path, Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.foreachOnPath_ = function (pathToFollow, currentRelativePath, f) {\n if (pathToFollow.isEmpty()) {\n return this;\n }\n else {\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n var front = pathToFollow.getFront();\n var nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.foreachOnPath_(pathToFollow.popFront(), currentRelativePath.child(front), f);\n }\n else {\n return ImmutableTree.Empty;\n }\n }\n };\n /**\n * Calls the given function for each node in the tree that has a value.\n *\n * @param {function(!Path, !T)} f A function to be called with\n * the path from the root of the tree to a node, and the value at that node.\n * Called in depth-first order.\n */\n ImmutableTree.prototype.foreach = function (f) {\n this.foreach_(Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.foreach_ = function (currentRelativePath, f) {\n this.children.inorderTraversal(function (childName, childTree) {\n childTree.foreach_(currentRelativePath.child(childName), f);\n });\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n };\n /**\n *\n * @param {function(string, !T)} f\n */\n ImmutableTree.prototype.foreachChild = function (f) {\n this.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value) {\n f(childName, childTree.value);\n }\n });\n };\n ImmutableTree.Empty = new ImmutableTree(null);\n return ImmutableTree;\n}());\nexports.ImmutableTree = ImmutableTree;\n\n//# sourceMappingURL=ImmutableTree.js.map\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Change_1 = __webpack_require__(9);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar PriorityIndex_1 = __webpack_require__(3);\n/**\n * Doesn't really filter nodes but applies an index to the node and keeps track of any changes\n *\n * @constructor\n * @implements {NodeFilter}\n * @param {!Index} index\n */\nvar IndexedFilter = /** @class */ (function () {\n function IndexedFilter(index_) {\n this.index_ = index_;\n }\n IndexedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n util_1.assert(snap.isIndexed(this.index_), 'A node must be indexed if only a child is updated');\n var oldChild = snap.getImmediateChild(key);\n // Check if anything actually changed.\n if (oldChild.getChild(affectedPath).equals(newChild.getChild(affectedPath))) {\n // There's an edge case where a child can enter or leave the view because affectedPath was set to null.\n // In this case, affectedPath will appear null in both the old and new snapshots. So we need\n // to avoid treating these cases as \"nothing changed.\"\n if (oldChild.isEmpty() == newChild.isEmpty()) {\n // Nothing changed.\n // This assert should be valid, but it's expensive (can dominate perf testing) so don't actually do it.\n //assert(oldChild.equals(newChild), 'Old and new snapshots should be equal.');\n return snap;\n }\n }\n if (optChangeAccumulator != null) {\n if (newChild.isEmpty()) {\n if (snap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(key, oldChild));\n }\n else {\n util_1.assert(snap.isLeafNode(), 'A child remove without an old child only makes sense on a leaf node');\n }\n }\n else if (oldChild.isEmpty()) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childAddedChange(key, newChild));\n }\n else {\n optChangeAccumulator.trackChildChange(Change_1.Change.childChangedChange(key, newChild, oldChild));\n }\n }\n if (snap.isLeafNode() && newChild.isEmpty()) {\n return snap;\n }\n else {\n // Make sure the node is indexed\n return snap.updateImmediateChild(key, newChild).withIndex(this.index_);\n }\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (optChangeAccumulator != null) {\n if (!oldSnap.isLeafNode()) {\n oldSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!newSnap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(key, childNode));\n }\n });\n }\n if (!newSnap.isLeafNode()) {\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (oldSnap.hasChild(key)) {\n var oldChild = oldSnap.getImmediateChild(key);\n if (!oldChild.equals(childNode)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childChangedChange(key, childNode, oldChild));\n }\n }\n else {\n optChangeAccumulator.trackChildChange(Change_1.Change.childAddedChange(key, childNode));\n }\n });\n }\n }\n return newSnap.withIndex(this.index_);\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n if (oldSnap.isEmpty()) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n else {\n return oldSnap.updatePriority(newPriority);\n }\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.filtersNodes = function () {\n return false;\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.getIndexedFilter = function () {\n return this;\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n return IndexedFilter;\n}());\nexports.IndexedFilter = IndexedFilter;\n\n//# sourceMappingURL=IndexedFilter.js.map\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar StatsCollection_1 = __webpack_require__(99);\nvar StatsManager = /** @class */ (function () {\n function StatsManager() {\n }\n StatsManager.getCollection = function (repoInfo) {\n var hashString = repoInfo.toString();\n if (!this.collections_[hashString]) {\n this.collections_[hashString] = new StatsCollection_1.StatsCollection();\n }\n return this.collections_[hashString];\n };\n StatsManager.getOrCreateReporter = function (repoInfo, creatorFunction) {\n var hashString = repoInfo.toString();\n if (!this.reporters_[hashString]) {\n this.reporters_[hashString] = creatorFunction();\n }\n return this.reporters_[hashString];\n };\n StatsManager.collections_ = {};\n StatsManager.reporters_ = {};\n return StatsManager;\n}());\nexports.StatsManager = StatsManager;\n\n//# sourceMappingURL=StatsManager.js.map\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Repo_1 = __webpack_require__(17);\nvar util_2 = __webpack_require__(1);\nvar parser_1 = __webpack_require__(33);\nvar validation_1 = __webpack_require__(7);\n__webpack_require__(109);\n/** @const {string} */\nvar DATABASE_URL_OPTION = 'databaseURL';\nvar _staticInstance;\n/**\n * Creates and caches Repo instances.\n */\nvar RepoManager = /** @class */ (function () {\n function RepoManager() {\n /**\n * @private {!Object.>}\n */\n this.repos_ = {};\n /**\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\n * @private {boolean}\n */\n this.useRestClient_ = false;\n }\n RepoManager.getInstance = function () {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n };\n // TODO(koss): Remove these functions unless used in tests?\n RepoManager.prototype.interrupt = function () {\n for (var appName in this.repos_) {\n for (var dbUrl in this.repos_[appName]) {\n this.repos_[appName][dbUrl].interrupt();\n }\n }\n };\n RepoManager.prototype.resume = function () {\n for (var appName in this.repos_) {\n for (var dbUrl in this.repos_[appName]) {\n this.repos_[appName][dbUrl].resume();\n }\n }\n };\n /**\n * This function should only ever be called to CREATE a new database instance.\n *\n * @param {!FirebaseApp} app\n * @return {!Database}\n */\n RepoManager.prototype.databaseFromApp = function (app, url) {\n var dbUrl = url || app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n util_2.fatal(\"Can't determine Firebase Database URL. Be sure to include \" +\n DATABASE_URL_OPTION +\n ' option when calling firebase.intializeApp().');\n }\n var parsedUrl = parser_1.parseRepoInfo(dbUrl);\n var repoInfo = parsedUrl.repoInfo;\n validation_1.validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n util_2.fatal('Database URL must point to the root of a Firebase Database ' +\n '(not including a child path).');\n }\n var repo = this.createRepo(repoInfo, app);\n return repo.database;\n };\n /**\n * Remove the repo and make sure it is disconnected.\n *\n * @param {!Repo} repo\n */\n RepoManager.prototype.deleteRepo = function (repo) {\n var appRepos = util_1.safeGet(this.repos_, repo.app.name);\n // This should never happen...\n if (!appRepos || util_1.safeGet(appRepos, repo.repoInfo_.toURLString()) !== repo) {\n util_2.fatal(\"Database \" + repo.app.name + \"(\" + repo.repoInfo_ + \") has already been deleted.\");\n }\n repo.interrupt();\n delete appRepos[repo.repoInfo_.toURLString()];\n };\n /**\n * Ensures a repo doesn't already exist and then creates one using the\n * provided app.\n *\n * @param {!RepoInfo} repoInfo The metadata about the Repo\n * @param {!FirebaseApp} app\n * @return {!Repo} The Repo object for the specified server / repoName.\n */\n RepoManager.prototype.createRepo = function (repoInfo, app) {\n var appRepos = util_1.safeGet(this.repos_, app.name);\n if (!appRepos) {\n appRepos = {};\n this.repos_[app.name] = appRepos;\n }\n var repo = util_1.safeGet(appRepos, repoInfo.toURLString());\n if (repo) {\n util_2.fatal('Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.');\n }\n repo = new Repo_1.Repo(repoInfo, this.useRestClient_, app);\n appRepos[repoInfo.toURLString()] = repo;\n return repo;\n };\n /**\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\n * @param {boolean} forceRestClient\n */\n RepoManager.prototype.forceRestClient = function (forceRestClient) {\n this.useRestClient_ = forceRestClient;\n };\n return RepoManager;\n}());\nexports.RepoManager = RepoManager;\n\n//# sourceMappingURL=RepoManager.js.map\n\n\n/***/ }),\n/* 27 */,\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */,\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\nvar parser_1 = __webpack_require__(33);\nvar Path_1 = __webpack_require__(2);\nvar Reference_1 = __webpack_require__(21);\nvar Repo_1 = __webpack_require__(17);\nvar RepoManager_1 = __webpack_require__(26);\nvar util_2 = __webpack_require__(0);\nvar validation_1 = __webpack_require__(7);\n/**\n * Class representing a firebase database.\n * @implements {FirebaseService}\n */\nvar Database = /** @class */ (function () {\n /**\n * The constructor should not be called by users of our public API.\n * @param {!Repo} repo_\n */\n function Database(repo_) {\n this.repo_ = repo_;\n if (!(repo_ instanceof Repo_1.Repo)) {\n util_1.fatal(\"Don't call new Database() directly - please use firebase.database().\");\n }\n /** @type {Reference} */\n this.root_ = new Reference_1.Reference(repo_, Path_1.Path.Empty);\n this.INTERNAL = new DatabaseInternals(this);\n }\n Object.defineProperty(Database.prototype, \"app\", {\n get: function () {\n return this.repo_.app;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns a reference to the root or the path specified in opt_pathString.\n * @param {string=} pathString\n * @return {!Reference} Firebase reference.\n */\n Database.prototype.ref = function (pathString) {\n this.checkDeleted_('ref');\n util_2.validateArgCount('database.ref', 0, 1, arguments.length);\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n };\n /**\n * Returns a reference to the root or the path specified in url.\n * We throw a exception if the url is not in the same domain as the\n * current repo.\n * @param {string} url\n * @return {!Reference} Firebase reference.\n */\n Database.prototype.refFromURL = function (url) {\n /** @const {string} */\n var apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n util_2.validateArgCount(apiName, 1, 1, arguments.length);\n var parsedURL = parser_1.parseRepoInfo(url);\n validation_1.validateUrl(apiName, 1, parsedURL);\n var repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== this.repo_.repoInfo_.host) {\n util_1.fatal(apiName +\n ': Host name does not match the current database: ' +\n '(found ' +\n repoInfo.host +\n ' but expected ' +\n this.repo_.repoInfo_.host +\n ')');\n }\n return this.ref(parsedURL.path.toString());\n };\n /**\n * @param {string} apiName\n */\n Database.prototype.checkDeleted_ = function (apiName) {\n if (this.repo_ === null) {\n util_1.fatal('Cannot call ' + apiName + ' on a deleted database.');\n }\n };\n // Make individual repo go offline.\n Database.prototype.goOffline = function () {\n util_2.validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n };\n Database.prototype.goOnline = function () {\n util_2.validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n };\n Database.ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n return Database;\n}());\nexports.Database = Database;\nvar DatabaseInternals = /** @class */ (function () {\n /** @param {!Database} database */\n function DatabaseInternals(database) {\n this.database = database;\n }\n /** @return {Promise} */\n DatabaseInternals.prototype.delete = function () {\n this.database.checkDeleted_('delete');\n RepoManager_1.RepoManager.getInstance().deleteRepo(this.database.repo_);\n this.database.repo_ = null;\n this.database.root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return Promise.resolve();\n };\n return DatabaseInternals;\n}());\nexports.DatabaseInternals = DatabaseInternals;\n\n//# sourceMappingURL=Database.js.map\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = __webpack_require__(2);\nvar RepoInfo_1 = __webpack_require__(34);\nvar util_1 = __webpack_require__(1);\n/**\n * @param {!string} pathString\n * @return {string}\n */\nfunction decodePath(pathString) {\n var pathStringDecoded = '';\n var pieces = pathString.split('/');\n for (var i = 0; i < pieces.length; i++) {\n if (pieces[i].length > 0) {\n var piece = pieces[i];\n try {\n piece = decodeURIComponent(piece.replace(/\\+/g, ' '));\n }\n catch (e) { }\n pathStringDecoded += '/' + piece;\n }\n }\n return pathStringDecoded;\n}\n/**\n *\n * @param {!string} dataURL\n * @return {{repoInfo: !RepoInfo, path: !Path}}\n */\nexports.parseRepoInfo = function (dataURL) {\n var parsedUrl = exports.parseURL(dataURL), namespace = parsedUrl.subdomain;\n if (parsedUrl.domain === 'firebase') {\n util_1.fatal(parsedUrl.host +\n ' is no longer supported. ' +\n 'Please use .firebaseio.com instead');\n }\n // Catch common error of uninitialized namespace value.\n if (!namespace || namespace == 'undefined') {\n util_1.fatal('Cannot parse Firebase url. Please use https://.firebaseio.com');\n }\n if (!parsedUrl.secure) {\n util_1.warnIfPageIsSecure();\n }\n var webSocketOnly = parsedUrl.scheme === 'ws' || parsedUrl.scheme === 'wss';\n return {\n repoInfo: new RepoInfo_1.RepoInfo(parsedUrl.host, parsedUrl.secure, namespace, webSocketOnly),\n path: new Path_1.Path(parsedUrl.pathString)\n };\n};\n/**\n *\n * @param {!string} dataURL\n * @return {{host: string, port: number, domain: string, subdomain: string, secure: boolean, scheme: string, pathString: string}}\n */\nexports.parseURL = function (dataURL) {\n // Default to empty strings in the event of a malformed string.\n var host = '', domain = '', subdomain = '', pathString = '';\n // Always default to SSL, unless otherwise specified.\n var secure = true, scheme = 'https', port = 443;\n // Don't do any validation here. The caller is responsible for validating the result of parsing.\n if (typeof dataURL === 'string') {\n // Parse scheme.\n var colonInd = dataURL.indexOf('//');\n if (colonInd >= 0) {\n scheme = dataURL.substring(0, colonInd - 1);\n dataURL = dataURL.substring(colonInd + 2);\n }\n // Parse host and path.\n var slashInd = dataURL.indexOf('/');\n if (slashInd === -1) {\n slashInd = dataURL.length;\n }\n host = dataURL.substring(0, slashInd);\n pathString = decodePath(dataURL.substring(slashInd));\n var parts = host.split('.');\n if (parts.length === 3) {\n // Normalize namespaces to lowercase to share storage / connection.\n domain = parts[1];\n subdomain = parts[0].toLowerCase();\n }\n else if (parts.length === 2) {\n domain = parts[0];\n }\n // If we have a port, use scheme for determining if it's secure.\n colonInd = host.indexOf(':');\n if (colonInd >= 0) {\n secure = scheme === 'https' || scheme === 'wss';\n port = parseInt(host.substring(colonInd + 1), 10);\n }\n }\n return {\n host: host,\n port: port,\n domain: domain,\n subdomain: subdomain,\n secure: secure,\n scheme: scheme,\n pathString: pathString\n };\n};\n\n//# sourceMappingURL=parser.js.map\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar storage_1 = __webpack_require__(12);\nvar Constants_1 = __webpack_require__(13);\n/**\n * A class that holds metadata about a Repo object\n *\n * @constructor\n */\nvar RepoInfo = /** @class */ (function () {\n /**\n * @param {string} host Hostname portion of the url for the repo\n * @param {boolean} secure Whether or not this repo is accessed over ssl\n * @param {string} namespace The namespace represented by the repo\n * @param {boolean} webSocketOnly Whether to prefer websockets over all other transports (used by Nest).\n * @param {string=} persistenceKey Override the default session persistence storage key\n */\n function RepoInfo(host, secure, namespace, webSocketOnly, persistenceKey) {\n if (persistenceKey === void 0) { persistenceKey = ''; }\n this.secure = secure;\n this.namespace = namespace;\n this.webSocketOnly = webSocketOnly;\n this.persistenceKey = persistenceKey;\n this.host = host.toLowerCase();\n this.domain = this.host.substr(this.host.indexOf('.') + 1);\n this.internalHost = storage_1.PersistentStorage.get('host:' + host) || this.host;\n }\n RepoInfo.prototype.needsQueryParam = function () {\n return this.host !== this.internalHost;\n };\n RepoInfo.prototype.isCacheableHost = function () {\n return this.internalHost.substr(0, 2) === 's-';\n };\n RepoInfo.prototype.isDemoHost = function () {\n return this.domain === 'firebaseio-demo.com';\n };\n RepoInfo.prototype.isCustomHost = function () {\n return (this.domain !== 'firebaseio.com' && this.domain !== 'firebaseio-demo.com');\n };\n RepoInfo.prototype.updateHost = function (newHost) {\n if (newHost !== this.internalHost) {\n this.internalHost = newHost;\n if (this.isCacheableHost()) {\n storage_1.PersistentStorage.set('host:' + this.host, this.internalHost);\n }\n }\n };\n /**\n * Returns the websocket URL for this repo\n * @param {string} type of connection\n * @param {Object} params list\n * @return {string} The URL for this repo\n */\n RepoInfo.prototype.connectionURL = function (type, params) {\n util_1.assert(typeof type === 'string', 'typeof type must == string');\n util_1.assert(typeof params === 'object', 'typeof params must == object');\n var connURL;\n if (type === Constants_1.WEBSOCKET) {\n connURL =\n (this.secure ? 'wss://' : 'ws://') + this.internalHost + '/.ws?';\n }\n else if (type === Constants_1.LONG_POLLING) {\n connURL =\n (this.secure ? 'https://' : 'http://') + this.internalHost + '/.lp?';\n }\n else {\n throw new Error('Unknown connection type: ' + type);\n }\n if (this.needsQueryParam()) {\n params['ns'] = this.namespace;\n }\n var pairs = [];\n util_2.forEach(params, function (key, value) {\n pairs.push(key + '=' + value);\n });\n return connURL + pairs.join('&');\n };\n /** @return {string} */\n RepoInfo.prototype.toString = function () {\n var str = this.toURLString();\n if (this.persistenceKey) {\n str += '<' + this.persistenceKey + '>';\n }\n return str;\n };\n /** @return {string} */\n RepoInfo.prototype.toURLString = function () {\n return (this.secure ? 'https://' : 'http://') + this.host;\n };\n return RepoInfo;\n}());\nexports.RepoInfo = RepoInfo;\n\n//# sourceMappingURL=RepoInfo.js.map\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar validation_1 = __webpack_require__(7);\nvar util_2 = __webpack_require__(1);\nvar util_3 = __webpack_require__(0);\n/**\n * @constructor\n */\nvar OnDisconnect = /** @class */ (function () {\n /**\n * @param {!Repo} repo_\n * @param {!Path} path_\n */\n function OnDisconnect(repo_, path_) {\n this.repo_ = repo_;\n this.path_ = path_;\n }\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.cancel = function (onComplete) {\n util_1.validateArgCount('OnDisconnect.cancel', 0, 1, arguments.length);\n util_1.validateCallback('OnDisconnect.cancel', 1, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectCancel(this.path_, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.remove = function (onComplete) {\n util_1.validateArgCount('OnDisconnect.remove', 0, 1, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.remove', this.path_);\n util_1.validateCallback('OnDisconnect.remove', 1, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSet(this.path_, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} value\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.set = function (value, onComplete) {\n util_1.validateArgCount('OnDisconnect.set', 1, 2, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.set', this.path_);\n validation_1.validateFirebaseDataArg('OnDisconnect.set', 1, value, this.path_, false);\n util_1.validateCallback('OnDisconnect.set', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSet(this.path_, value, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} value\n * @param {number|string|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.setWithPriority = function (value, priority, onComplete) {\n util_1.validateArgCount('OnDisconnect.setWithPriority', 2, 3, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.setWithPriority', this.path_);\n validation_1.validateFirebaseDataArg('OnDisconnect.setWithPriority', 1, value, this.path_, false);\n validation_1.validatePriority('OnDisconnect.setWithPriority', 2, priority, false);\n util_1.validateCallback('OnDisconnect.setWithPriority', 3, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSetWithPriority(this.path_, value, priority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.update = function (objectToMerge, onComplete) {\n util_1.validateArgCount('OnDisconnect.update', 1, 2, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.update', this.path_);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n util_2.warn('Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the ' +\n 'existing data, or an Object with integer keys if you really do want to only update some of the children.');\n }\n validation_1.validateFirebaseMergeDataArg('OnDisconnect.update', 1, objectToMerge, this.path_, false);\n util_1.validateCallback('OnDisconnect.update', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectUpdate(this.path_, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n return OnDisconnect;\n}());\nexports.OnDisconnect = OnDisconnect;\n\n//# sourceMappingURL=onDisconnect.js.map\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar KeyIndex_1 = __webpack_require__(10);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar ValueIndex_1 = __webpack_require__(38);\nvar PathIndex_1 = __webpack_require__(42);\nvar util_2 = __webpack_require__(1);\nvar Path_1 = __webpack_require__(2);\nvar validation_1 = __webpack_require__(7);\nvar util_3 = __webpack_require__(0);\nvar EventRegistration_1 = __webpack_require__(84);\nvar util_4 = __webpack_require__(0);\nvar __referenceConstructor;\n/**\n * A Query represents a filter to be applied to a firebase location. This object purely represents the\n * query expression (and exposes our public API to build the query). The actual query logic is in ViewBase.js.\n *\n * Since every Firebase reference is a query, Firebase inherits from this object.\n */\nvar Query = /** @class */ (function () {\n function Query(repo, path, queryParams_, orderByCalled_) {\n this.repo = repo;\n this.path = path;\n this.queryParams_ = queryParams_;\n this.orderByCalled_ = orderByCalled_;\n }\n Object.defineProperty(Query, \"__referenceConstructor\", {\n get: function () {\n util_1.assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n },\n set: function (val) {\n __referenceConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Validates start/end values for queries.\n * @param {!QueryParams} params\n * @private\n */\n Query.validateQueryEndpoints_ = function (params) {\n var startNode = null;\n var endNode = null;\n if (params.hasStart()) {\n startNode = params.getIndexStartValue();\n }\n if (params.hasEnd()) {\n endNode = params.getIndexEndValue();\n }\n if (params.getIndex() === KeyIndex_1.KEY_INDEX) {\n var tooManyArgsError = 'Query: When ordering by key, you may only pass one argument to ' +\n 'startAt(), endAt(), or equalTo().';\n var wrongArgTypeError = 'Query: When ordering by key, the argument passed to startAt(), endAt(),' +\n 'or equalTo() must be a string.';\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n if (startName != util_2.MIN_NAME) {\n throw new Error(tooManyArgsError);\n }\n else if (typeof startNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n if (endName != util_2.MAX_NAME) {\n throw new Error(tooManyArgsError);\n }\n else if (typeof endNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n }\n else if (params.getIndex() === PriorityIndex_1.PRIORITY_INDEX) {\n if ((startNode != null && !validation_1.isValidPriority(startNode)) ||\n (endNode != null && !validation_1.isValidPriority(endNode))) {\n throw new Error('Query: When ordering by priority, the first argument passed to startAt(), ' +\n 'endAt(), or equalTo() must be a valid priority value (null, a number, or a string).');\n }\n }\n else {\n util_1.assert(params.getIndex() instanceof PathIndex_1.PathIndex ||\n params.getIndex() === ValueIndex_1.VALUE_INDEX, 'unknown index type.');\n if ((startNode != null && typeof startNode === 'object') ||\n (endNode != null && typeof endNode === 'object')) {\n throw new Error('Query: First argument passed to startAt(), endAt(), or equalTo() cannot be ' +\n 'an object.');\n }\n }\n };\n /**\n * Validates that limit* has been called with the correct combination of parameters\n * @param {!QueryParams} params\n * @private\n */\n Query.validateLimit_ = function (params) {\n if (params.hasStart() &&\n params.hasEnd() &&\n params.hasLimit() &&\n !params.hasAnchoredLimit()) {\n throw new Error(\"Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.\");\n }\n };\n /**\n * Validates that no other order by call has been made\n * @param {!string} fnName\n * @private\n */\n Query.prototype.validateNoPreviousOrderByCall_ = function (fnName) {\n if (this.orderByCalled_ === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n };\n /**\n * @return {!QueryParams}\n */\n Query.prototype.getQueryParams = function () {\n return this.queryParams_;\n };\n /**\n * @return {!Reference}\n */\n Query.prototype.getRef = function () {\n util_3.validateArgCount('Query.ref', 0, 0, arguments.length);\n // This is a slight hack. We cannot goog.require('fb.api.Firebase'), since Firebase requires fb.api.Query.\n // However, we will always export 'Firebase' to the global namespace, so it's guaranteed to exist by the time this\n // method gets called.\n return new Query.__referenceConstructor(this.repo, this.path);\n };\n /**\n * @param {!string} eventType\n * @param {!function(DataSnapshot, string=)} callback\n * @param {(function(Error)|Object)=} cancelCallbackOrContext\n * @param {Object=} context\n * @return {!function(DataSnapshot, string=)}\n */\n Query.prototype.on = function (eventType, callback, cancelCallbackOrContext, context) {\n util_3.validateArgCount('Query.on', 2, 4, arguments.length);\n validation_1.validateEventType('Query.on', 1, eventType, false);\n util_3.validateCallback('Query.on', 2, callback, false);\n var ret = Query.getCancelAndContextArgs_('Query.on', cancelCallbackOrContext, context);\n if (eventType === 'value') {\n this.onValueEvent(callback, ret.cancel, ret.context);\n }\n else {\n var callbacks = {};\n callbacks[eventType] = callback;\n this.onChildEvent(callbacks, ret.cancel, ret.context);\n }\n return callback;\n };\n /**\n * @param {!function(!DataSnapshot)} callback\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n Query.prototype.onValueEvent = function (callback, cancelCallback, context) {\n var container = new EventRegistration_1.ValueEventRegistration(callback, cancelCallback || null, context || null);\n this.repo.addEventCallbackForQuery(this, container);\n };\n /**\n * @param {!Object.} callbacks\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n Query.prototype.onChildEvent = function (callbacks, cancelCallback, context) {\n var container = new EventRegistration_1.ChildEventRegistration(callbacks, cancelCallback, context);\n this.repo.addEventCallbackForQuery(this, container);\n };\n /**\n * @param {string=} eventType\n * @param {(function(!DataSnapshot, ?string=))=} callback\n * @param {Object=} context\n */\n Query.prototype.off = function (eventType, callback, context) {\n util_3.validateArgCount('Query.off', 0, 3, arguments.length);\n validation_1.validateEventType('Query.off', 1, eventType, true);\n util_3.validateCallback('Query.off', 2, callback, true);\n util_3.validateContextObject('Query.off', 3, context, true);\n var container = null;\n var callbacks = null;\n if (eventType === 'value') {\n var valueCallback = callback || null;\n container = new EventRegistration_1.ValueEventRegistration(valueCallback, null, context || null);\n }\n else if (eventType) {\n if (callback) {\n callbacks = {};\n callbacks[eventType] = callback;\n }\n container = new EventRegistration_1.ChildEventRegistration(callbacks, null, context || null);\n }\n this.repo.removeEventCallbackForQuery(this, container);\n };\n /**\n * Attaches a listener, waits for the first event, and then removes the listener\n * @param {!string} eventType\n * @param {!function(!DataSnapshot, string=)} userCallback\n * @param cancelOrContext\n * @param context\n * @return {!firebase.Promise}\n */\n Query.prototype.once = function (eventType, userCallback, cancelOrContext, context) {\n var _this = this;\n util_3.validateArgCount('Query.once', 1, 4, arguments.length);\n validation_1.validateEventType('Query.once', 1, eventType, false);\n util_3.validateCallback('Query.once', 2, userCallback, true);\n var ret = Query.getCancelAndContextArgs_('Query.once', cancelOrContext, context);\n // TODO: Implement this more efficiently (in particular, use 'get' wire protocol for 'value' event)\n // TODO: consider actually wiring the callbacks into the promise. We cannot do this without a breaking change\n // because the API currently expects callbacks will be called synchronously if the data is cached, but this is\n // against the Promise specification.\n var firstCall = true;\n var deferred = new util_4.Deferred();\n // A dummy error handler in case a user wasn't expecting promises\n deferred.promise.catch(function () { });\n var onceCallback = function (snapshot) {\n // NOTE: Even though we unsubscribe, we may get called multiple times if a single action (e.g. set() with JSON)\n // triggers multiple events (e.g. child_added or child_changed).\n if (firstCall) {\n firstCall = false;\n _this.off(eventType, onceCallback);\n if (userCallback) {\n userCallback.bind(ret.context)(snapshot);\n }\n deferred.resolve(snapshot);\n }\n };\n this.on(eventType, onceCallback, \n /*cancel=*/ function (err) {\n _this.off(eventType, onceCallback);\n if (ret.cancel)\n ret.cancel.bind(ret.context)(err);\n deferred.reject(err);\n });\n return deferred.promise;\n };\n /**\n * Set a limit and anchor it to the start of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n Query.prototype.limitToFirst = function (limit) {\n util_3.validateArgCount('Query.limitToFirst', 1, 1, arguments.length);\n if (typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0) {\n throw new Error('Query.limitToFirst: First argument must be a positive integer.');\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error('Query.limitToFirst: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).');\n }\n return new Query(this.repo, this.path, this.queryParams_.limitToFirst(limit), this.orderByCalled_);\n };\n /**\n * Set a limit and anchor it to the end of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n Query.prototype.limitToLast = function (limit) {\n util_3.validateArgCount('Query.limitToLast', 1, 1, arguments.length);\n if (typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0) {\n throw new Error('Query.limitToLast: First argument must be a positive integer.');\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error('Query.limitToLast: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).');\n }\n return new Query(this.repo, this.path, this.queryParams_.limitToLast(limit), this.orderByCalled_);\n };\n /**\n * Given a child path, return a new query ordered by the specified grandchild path.\n * @param {!string} path\n * @return {!Query}\n */\n Query.prototype.orderByChild = function (path) {\n util_3.validateArgCount('Query.orderByChild', 1, 1, arguments.length);\n if (path === '$key') {\n throw new Error('Query.orderByChild: \"$key\" is invalid. Use Query.orderByKey() instead.');\n }\n else if (path === '$priority') {\n throw new Error('Query.orderByChild: \"$priority\" is invalid. Use Query.orderByPriority() instead.');\n }\n else if (path === '$value') {\n throw new Error('Query.orderByChild: \"$value\" is invalid. Use Query.orderByValue() instead.');\n }\n validation_1.validatePathString('Query.orderByChild', 1, path, false);\n this.validateNoPreviousOrderByCall_('Query.orderByChild');\n var parsedPath = new Path_1.Path(path);\n if (parsedPath.isEmpty()) {\n throw new Error('Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.');\n }\n var index = new PathIndex_1.PathIndex(parsedPath);\n var newParams = this.queryParams_.orderBy(index);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the KeyIndex\n * @return {!Query}\n */\n Query.prototype.orderByKey = function () {\n util_3.validateArgCount('Query.orderByKey', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByKey');\n var newParams = this.queryParams_.orderBy(KeyIndex_1.KEY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the PriorityIndex\n * @return {!Query}\n */\n Query.prototype.orderByPriority = function () {\n util_3.validateArgCount('Query.orderByPriority', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByPriority');\n var newParams = this.queryParams_.orderBy(PriorityIndex_1.PRIORITY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the ValueIndex\n * @return {!Query}\n */\n Query.prototype.orderByValue = function () {\n util_3.validateArgCount('Query.orderByValue', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByValue');\n var newParams = this.queryParams_.orderBy(ValueIndex_1.VALUE_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n Query.prototype.startAt = function (value, name) {\n if (value === void 0) { value = null; }\n util_3.validateArgCount('Query.startAt', 0, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.startAt', 1, value, this.path, true);\n validation_1.validateKey('Query.startAt', 2, name, true);\n var newParams = this.queryParams_.startAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasStart()) {\n throw new Error('Query.startAt: Starting point was already set (by another call to startAt ' +\n 'or equalTo).');\n }\n // Calling with no params tells us to start at the beginning.\n if (value === undefined) {\n value = null;\n name = null;\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n };\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n Query.prototype.endAt = function (value, name) {\n if (value === void 0) { value = null; }\n util_3.validateArgCount('Query.endAt', 0, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.endAt', 1, value, this.path, true);\n validation_1.validateKey('Query.endAt', 2, name, true);\n var newParams = this.queryParams_.endAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasEnd()) {\n throw new Error('Query.endAt: Ending point was already set (by another call to endAt or ' +\n 'equalTo).');\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n };\n /**\n * Load the selection of children with exactly the specified value, and, optionally,\n * the specified name.\n * @param {number|string|boolean|null} value\n * @param {string=} name\n * @return {!Query}\n */\n Query.prototype.equalTo = function (value, name) {\n util_3.validateArgCount('Query.equalTo', 1, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.equalTo', 1, value, this.path, false);\n validation_1.validateKey('Query.equalTo', 2, name, true);\n if (this.queryParams_.hasStart()) {\n throw new Error('Query.equalTo: Starting point was already set (by another call to startAt or ' +\n 'equalTo).');\n }\n if (this.queryParams_.hasEnd()) {\n throw new Error('Query.equalTo: Ending point was already set (by another call to endAt or ' +\n 'equalTo).');\n }\n return this.startAt(value, name).endAt(value, name);\n };\n /**\n * @return {!string} URL for this location.\n */\n Query.prototype.toString = function () {\n util_3.validateArgCount('Query.toString', 0, 0, arguments.length);\n return this.repo.toString() + this.path.toUrlEncodedString();\n };\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users.\n Query.prototype.toJSON = function () {\n // An optional spacer argument is unnecessary for a string.\n util_3.validateArgCount('Query.toJSON', 0, 1, arguments.length);\n return this.toString();\n };\n /**\n * An object representation of the query parameters used by this Query.\n * @return {!Object}\n */\n Query.prototype.queryObject = function () {\n return this.queryParams_.getQueryObject();\n };\n /**\n * @return {!string}\n */\n Query.prototype.queryIdentifier = function () {\n var obj = this.queryObject();\n var id = util_2.ObjectToUniqueKey(obj);\n return id === '{}' ? 'default' : id;\n };\n /**\n * Return true if this query and the provided query are equivalent; otherwise, return false.\n * @param {Query} other\n * @return {boolean}\n */\n Query.prototype.isEqual = function (other) {\n util_3.validateArgCount('Query.isEqual', 1, 1, arguments.length);\n if (!(other instanceof Query)) {\n var error = 'Query.isEqual failed: First argument must be an instance of firebase.database.Query.';\n throw new Error(error);\n }\n var sameRepo = this.repo === other.repo;\n var samePath = this.path.equals(other.path);\n var sameQueryIdentifier = this.queryIdentifier() === other.queryIdentifier();\n return sameRepo && samePath && sameQueryIdentifier;\n };\n /**\n * Helper used by .on and .once to extract the context and or cancel arguments.\n * @param {!string} fnName The function name (on or once)\n * @param {(function(Error)|Object)=} cancelOrContext\n * @param {Object=} context\n * @return {{cancel: ?function(Error), context: ?Object}}\n * @private\n */\n Query.getCancelAndContextArgs_ = function (fnName, cancelOrContext, context) {\n var ret = { cancel: null, context: null };\n if (cancelOrContext && context) {\n ret.cancel = cancelOrContext;\n util_3.validateCallback(fnName, 3, ret.cancel, true);\n ret.context = context;\n util_3.validateContextObject(fnName, 4, ret.context, true);\n }\n else if (cancelOrContext) {\n // we have either a cancel callback or a context.\n if (typeof cancelOrContext === 'object' && cancelOrContext !== null) {\n // it's a context!\n ret.context = cancelOrContext;\n }\n else if (typeof cancelOrContext === 'function') {\n ret.cancel = cancelOrContext;\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, 3, true) +\n ' must either be a cancel callback or a context object.');\n }\n }\n return ret;\n };\n Object.defineProperty(Query.prototype, \"ref\", {\n get: function () {\n return this.getRef();\n },\n enumerable: true,\n configurable: true\n });\n return Query;\n}());\nexports.Query = Query;\n\n//# sourceMappingURL=Query.js.map\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar util_3 = __webpack_require__(0);\nvar MAX_NODE;\nfunction setMaxNode(val) {\n MAX_NODE = val;\n}\nexports.setMaxNode = setMaxNode;\n/**\n * @param {(!string|!number)} priority\n * @return {!string}\n */\nexports.priorityHashText = function (priority) {\n if (typeof priority === 'number')\n return 'number:' + util_2.doubleToIEEE754String(priority);\n else\n return 'string:' + priority;\n};\n/**\n * Validates that a priority snapshot Node is valid.\n *\n * @param {!Node} priorityNode\n */\nexports.validatePriorityNode = function (priorityNode) {\n if (priorityNode.isLeafNode()) {\n var val = priorityNode.val();\n util_1.assert(typeof val === 'string' ||\n typeof val === 'number' ||\n (typeof val === 'object' && util_3.contains(val, '.sv')), 'Priority must be a string or number.');\n }\n else {\n util_1.assert(priorityNode === MAX_NODE || priorityNode.isEmpty(), 'priority of unexpected type.');\n }\n // Don't call getPriority() on MAX_NODE to avoid hitting assertion.\n util_1.assert(priorityNode === MAX_NODE || priorityNode.getPriority().isEmpty(), \"Priority nodes can't have a priority of their own.\");\n};\n\n//# sourceMappingURL=snap.js.map\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = __webpack_require__(14);\nvar Node_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(1);\nvar nodeFromJSON_1 = __webpack_require__(11);\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nvar ValueIndex = /** @class */ (function (_super) {\n __extends(ValueIndex, _super);\n function ValueIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.compare = function (a, b) {\n var indexCmp = a.node.compareTo(b.node);\n if (indexCmp === 0) {\n return util_1.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.isDefinedOn = function (node) {\n return true;\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return !oldNode.equals(newNode);\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.maxPost = function () {\n return Node_1.NamedNode.MAX;\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n ValueIndex.prototype.makePost = function (indexValue, name) {\n var valueNode = nodeFromJSON_1.nodeFromJSON(indexValue);\n return new Node_1.NamedNode(name, valueNode);\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n ValueIndex.prototype.toString = function () {\n return '.value';\n };\n return ValueIndex;\n}(Index_1.Index));\nexports.ValueIndex = ValueIndex;\nexports.VALUE_INDEX = new ValueIndex();\n\n//# sourceMappingURL=ValueIndex.js.map\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar childSet_1 = __webpack_require__(40);\nvar util_2 = __webpack_require__(0);\nvar Node_1 = __webpack_require__(5);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar KeyIndex_1 = __webpack_require__(10);\nvar _defaultIndexMap;\nvar fallbackObject = {};\n/**\n *\n * @param {Object.>} indexes\n * @param {Object.} indexSet\n * @constructor\n */\nvar IndexMap = /** @class */ (function () {\n function IndexMap(indexes_, indexSet_) {\n this.indexes_ = indexes_;\n this.indexSet_ = indexSet_;\n }\n Object.defineProperty(IndexMap, \"Default\", {\n /**\n * The default IndexMap for nodes without a priority\n * @type {!IndexMap}\n * @const\n */\n get: function () {\n util_1.assert(fallbackObject && PriorityIndex_1.PRIORITY_INDEX, 'ChildrenNode.ts has not been loaded');\n _defaultIndexMap =\n _defaultIndexMap ||\n new IndexMap({ '.priority': fallbackObject }, { '.priority': PriorityIndex_1.PRIORITY_INDEX });\n return _defaultIndexMap;\n },\n enumerable: true,\n configurable: true\n });\n /**\n *\n * @param {!string} indexKey\n * @return {?SortedMap.}\n */\n IndexMap.prototype.get = function (indexKey) {\n var sortedMap = util_2.safeGet(this.indexes_, indexKey);\n if (!sortedMap)\n throw new Error('No index defined for ' + indexKey);\n if (sortedMap === fallbackObject) {\n // The index exists, but it falls back to just name comparison. Return null so that the calling code uses the\n // regular child map\n return null;\n }\n else {\n return sortedMap;\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n IndexMap.prototype.hasIndex = function (indexDefinition) {\n return util_2.contains(this.indexSet_, indexDefinition.toString());\n };\n /**\n * @param {!Index} indexDefinition\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.addIndex = function (indexDefinition, existingChildren) {\n util_1.assert(indexDefinition !== KeyIndex_1.KEY_INDEX, \"KeyIndex always exists and isn't meant to be added to the IndexMap.\");\n var childList = [];\n var sawIndexedValue = false;\n var iter = existingChildren.getIterator(Node_1.NamedNode.Wrap);\n var next = iter.getNext();\n while (next) {\n sawIndexedValue =\n sawIndexedValue || indexDefinition.isDefinedOn(next.node);\n childList.push(next);\n next = iter.getNext();\n }\n var newIndex;\n if (sawIndexedValue) {\n newIndex = childSet_1.buildChildSet(childList, indexDefinition.getCompare());\n }\n else {\n newIndex = fallbackObject;\n }\n var indexName = indexDefinition.toString();\n var newIndexSet = util_2.clone(this.indexSet_);\n newIndexSet[indexName] = indexDefinition;\n var newIndexes = util_2.clone(this.indexes_);\n newIndexes[indexName] = newIndex;\n return new IndexMap(newIndexes, newIndexSet);\n };\n /**\n * Ensure that this node is properly tracked in any indexes that we're maintaining\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.addToIndexes = function (namedNode, existingChildren) {\n var _this = this;\n var newIndexes = util_2.map(this.indexes_, function (indexedChildren, indexName) {\n var index = util_2.safeGet(_this.indexSet_, indexName);\n util_1.assert(index, 'Missing index implementation for ' + indexName);\n if (indexedChildren === fallbackObject) {\n // Check to see if we need to index everything\n if (index.isDefinedOn(namedNode.node)) {\n // We need to build this index\n var childList = [];\n var iter = existingChildren.getIterator(Node_1.NamedNode.Wrap);\n var next = iter.getNext();\n while (next) {\n if (next.name != namedNode.name) {\n childList.push(next);\n }\n next = iter.getNext();\n }\n childList.push(namedNode);\n return childSet_1.buildChildSet(childList, index.getCompare());\n }\n else {\n // No change, this remains a fallback\n return fallbackObject;\n }\n }\n else {\n var existingSnap = existingChildren.get(namedNode.name);\n var newChildren = indexedChildren;\n if (existingSnap) {\n newChildren = newChildren.remove(new Node_1.NamedNode(namedNode.name, existingSnap));\n }\n return newChildren.insert(namedNode, namedNode.node);\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n };\n /**\n * Create a new IndexMap instance with the given value removed\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.removeFromIndexes = function (namedNode, existingChildren) {\n var newIndexes = util_2.map(this.indexes_, function (indexedChildren) {\n if (indexedChildren === fallbackObject) {\n // This is the fallback. Just return it, nothing to do in this case\n return indexedChildren;\n }\n else {\n var existingSnap = existingChildren.get(namedNode.name);\n if (existingSnap) {\n return indexedChildren.remove(new Node_1.NamedNode(namedNode.name, existingSnap));\n }\n else {\n // No record of this child\n return indexedChildren;\n }\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n };\n return IndexMap;\n}());\nexports.IndexMap = IndexMap;\n\n//# sourceMappingURL=IndexMap.js.map\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SortedMap_1 = __webpack_require__(16);\nvar SortedMap_2 = __webpack_require__(16);\nvar LOG_2 = Math.log(2);\n/**\n * @constructor\n */\nvar Base12Num = /** @class */ (function () {\n /**\n * @param {number} length\n */\n function Base12Num(length) {\n var logBase2 = function (num) {\n return parseInt((Math.log(num) / LOG_2), 10);\n };\n var bitMask = function (bits) { return parseInt(Array(bits + 1).join('1'), 2); };\n this.count = logBase2(length + 1);\n this.current_ = this.count - 1;\n var mask = bitMask(this.count);\n this.bits_ = (length + 1) & mask;\n }\n /**\n * @return {boolean}\n */\n Base12Num.prototype.nextBitIsOne = function () {\n //noinspection JSBitwiseOperatorUsage\n var result = !(this.bits_ & (0x1 << this.current_));\n this.current_--;\n return result;\n };\n return Base12Num;\n}());\n/**\n * Takes a list of child nodes and constructs a SortedSet using the given comparison\n * function\n *\n * Uses the algorithm described in the paper linked here:\n * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.1458\n *\n * @template K, V\n * @param {Array.} childList Unsorted list of children\n * @param {function(!NamedNode, !NamedNode):number} cmp The comparison method to be used\n * @param {(function(NamedNode):K)=} keyFn An optional function to extract K from a node wrapper, if K's\n * type is not NamedNode\n * @param {(function(K, K):number)=} mapSortFn An optional override for comparator used by the generated sorted map\n * @return {SortedMap.}\n */\nexports.buildChildSet = function (childList, cmp, keyFn, mapSortFn) {\n childList.sort(cmp);\n var buildBalancedTree = function (low, high) {\n var length = high - low;\n var namedNode;\n var key;\n if (length == 0) {\n return null;\n }\n else if (length == 1) {\n namedNode = childList[low];\n key = keyFn ? keyFn(namedNode) : namedNode;\n return new SortedMap_1.LLRBNode(key, namedNode.node, SortedMap_1.LLRBNode.BLACK, null, null);\n }\n else {\n var middle = parseInt((length / 2), 10) + low;\n var left = buildBalancedTree(low, middle);\n var right = buildBalancedTree(middle + 1, high);\n namedNode = childList[middle];\n key = keyFn ? keyFn(namedNode) : namedNode;\n return new SortedMap_1.LLRBNode(key, namedNode.node, SortedMap_1.LLRBNode.BLACK, left, right);\n }\n };\n var buildFrom12Array = function (base12) {\n var node = null;\n var root = null;\n var index = childList.length;\n var buildPennant = function (chunkSize, color) {\n var low = index - chunkSize;\n var high = index;\n index -= chunkSize;\n var childTree = buildBalancedTree(low + 1, high);\n var namedNode = childList[low];\n var key = keyFn ? keyFn(namedNode) : namedNode;\n attachPennant(new SortedMap_1.LLRBNode(key, namedNode.node, color, null, childTree));\n };\n var attachPennant = function (pennant) {\n if (node) {\n node.left = pennant;\n node = pennant;\n }\n else {\n root = pennant;\n node = pennant;\n }\n };\n for (var i = 0; i < base12.count; ++i) {\n var isOne = base12.nextBitIsOne();\n // The number of nodes taken in each slice is 2^(arr.length - (i + 1))\n var chunkSize = Math.pow(2, base12.count - (i + 1));\n if (isOne) {\n buildPennant(chunkSize, SortedMap_1.LLRBNode.BLACK);\n }\n else {\n // current == 2\n buildPennant(chunkSize, SortedMap_1.LLRBNode.BLACK);\n buildPennant(chunkSize, SortedMap_1.LLRBNode.RED);\n }\n }\n return root;\n };\n var base12 = new Base12Num(childList.length);\n var root = buildFrom12Array(base12);\n return new SortedMap_2.SortedMap(mapSortFn || cmp, root);\n};\n\n//# sourceMappingURL=childSet.js.map\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\nfunction NAME_ONLY_COMPARATOR(left, right) {\n return util_1.nameCompare(left.name, right.name);\n}\nexports.NAME_ONLY_COMPARATOR = NAME_ONLY_COMPARATOR;\nfunction NAME_COMPARATOR(left, right) {\n return util_1.nameCompare(left, right);\n}\nexports.NAME_COMPARATOR = NAME_COMPARATOR;\n\n//# sourceMappingURL=comparators.js.map\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar Index_1 = __webpack_require__(14);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar Node_1 = __webpack_require__(5);\nvar nodeFromJSON_1 = __webpack_require__(11);\n/**\n * @param {!Path} indexPath\n * @constructor\n * @extends {Index}\n */\nvar PathIndex = /** @class */ (function (_super) {\n __extends(PathIndex, _super);\n function PathIndex(indexPath_) {\n var _this = _super.call(this) || this;\n _this.indexPath_ = indexPath_;\n util_1.assert(!indexPath_.isEmpty() && indexPath_.getFront() !== '.priority', \"Can't create PathIndex with empty path or .priority key\");\n return _this;\n }\n /**\n * @param {!Node} snap\n * @return {!Node}\n * @protected\n */\n PathIndex.prototype.extractChild = function (snap) {\n return snap.getChild(this.indexPath_);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.isDefinedOn = function (node) {\n return !node.getChild(this.indexPath_).isEmpty();\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.compare = function (a, b) {\n var aChild = this.extractChild(a.node);\n var bChild = this.extractChild(b.node);\n var indexCmp = aChild.compareTo(bChild);\n if (indexCmp === 0) {\n return util_2.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.makePost = function (indexValue, name) {\n var valueNode = nodeFromJSON_1.nodeFromJSON(indexValue);\n var node = ChildrenNode_1.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, valueNode);\n return new Node_1.NamedNode(name, node);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.maxPost = function () {\n var node = ChildrenNode_1.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, ChildrenNode_1.MAX_NODE);\n return new Node_1.NamedNode(util_2.MAX_NAME, node);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.toString = function () {\n return this.indexPath_.slice().join('/');\n };\n return PathIndex;\n}(Index_1.Index));\nexports.PathIndex = PathIndex;\n\n//# sourceMappingURL=PathIndex.js.map\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar SparseSnapshotTree_1 = __webpack_require__(44);\nvar LeafNode_1 = __webpack_require__(15);\nvar nodeFromJSON_1 = __webpack_require__(11);\nvar PriorityIndex_1 = __webpack_require__(3);\n/**\n * Generate placeholders for deferred values.\n * @param {?Object} values\n * @return {!Object}\n */\nexports.generateWithValues = function (values) {\n values = values || {};\n values['timestamp'] = values['timestamp'] || new Date().getTime();\n return values;\n};\n/**\n * Value to use when firing local events. When writing server values, fire\n * local events with an approximate value, otherwise return value as-is.\n * @param {(Object|string|number|boolean)} value\n * @param {!Object} serverValues\n * @return {!(string|number|boolean)}\n */\nexports.resolveDeferredValue = function (value, serverValues) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n else {\n util_1.assert('.sv' in value, 'Unexpected leaf node or priority contents');\n return serverValues[value['.sv']];\n }\n};\n/**\n * Recursively replace all deferred values and priorities in the tree with the\n * specified generated replacement values.\n * @param {!SparseSnapshotTree} tree\n * @param {!Object} serverValues\n * @return {!SparseSnapshotTree}\n */\nexports.resolveDeferredValueTree = function (tree, serverValues) {\n var resolvedTree = new SparseSnapshotTree_1.SparseSnapshotTree();\n tree.forEachTree(new Path_1.Path(''), function (path, node) {\n resolvedTree.remember(path, exports.resolveDeferredValueSnapshot(node, serverValues));\n });\n return resolvedTree;\n};\n/**\n * Recursively replace all deferred values and priorities in the node with the\n * specified generated replacement values. If there are no server values in the node,\n * it'll be returned as-is.\n * @param {!Node} node\n * @param {!Object} serverValues\n * @return {!Node}\n */\nexports.resolveDeferredValueSnapshot = function (node, serverValues) {\n var rawPri = node.getPriority().val();\n var priority = exports.resolveDeferredValue(rawPri, serverValues);\n var newNode;\n if (node.isLeafNode()) {\n var leafNode = node;\n var value = exports.resolveDeferredValue(leafNode.getValue(), serverValues);\n if (value !== leafNode.getValue() ||\n priority !== leafNode.getPriority().val()) {\n return new LeafNode_1.LeafNode(value, nodeFromJSON_1.nodeFromJSON(priority));\n }\n else {\n return node;\n }\n }\n else {\n var childrenNode = node;\n newNode = childrenNode;\n if (priority !== childrenNode.getPriority().val()) {\n newNode = newNode.updatePriority(new LeafNode_1.LeafNode(priority));\n }\n childrenNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var newChildNode = exports.resolveDeferredValueSnapshot(childNode, serverValues);\n if (newChildNode !== childNode) {\n newNode = newNode.updateImmediateChild(childName, newChildNode);\n }\n });\n return newNode;\n }\n};\n\n//# sourceMappingURL=ServerValues.js.map\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = __webpack_require__(2);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar CountedSet_1 = __webpack_require__(45);\n/**\n * Helper class to store a sparse set of snapshots.\n *\n * @constructor\n */\nvar SparseSnapshotTree = /** @class */ (function () {\n function SparseSnapshotTree() {\n /**\n * @private\n * @type {Node}\n */\n this.value_ = null;\n /**\n * @private\n * @type {CountedSet}\n */\n this.children_ = null;\n }\n /**\n * Gets the node stored at the given path if one exists.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {?Node} The retrieved node, or null.\n */\n SparseSnapshotTree.prototype.find = function (path) {\n if (this.value_ != null) {\n return this.value_.getChild(path);\n }\n else if (!path.isEmpty() && this.children_ != null) {\n var childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n var childTree = this.children_.get(childKey);\n return childTree.find(path);\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n };\n /**\n * Stores the given node at the specified path. If there is already a node\n * at a shallower path, it merges the new data into that snapshot node.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @param {!Node} data The new data, or null.\n */\n SparseSnapshotTree.prototype.remember = function (path, data) {\n if (path.isEmpty()) {\n this.value_ = data;\n this.children_ = null;\n }\n else if (this.value_ !== null) {\n this.value_ = this.value_.updateChild(path, data);\n }\n else {\n if (this.children_ == null) {\n this.children_ = new CountedSet_1.CountedSet();\n }\n var childKey = path.getFront();\n if (!this.children_.contains(childKey)) {\n this.children_.add(childKey, new SparseSnapshotTree());\n }\n var child = this.children_.get(childKey);\n path = path.popFront();\n child.remember(path, data);\n }\n };\n /**\n * Purge the data at path from the cache.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {boolean} True if this node should now be removed.\n */\n SparseSnapshotTree.prototype.forget = function (path) {\n if (path.isEmpty()) {\n this.value_ = null;\n this.children_ = null;\n return true;\n }\n else {\n if (this.value_ !== null) {\n if (this.value_.isLeafNode()) {\n // We're trying to forget a node that doesn't exist\n return false;\n }\n else {\n var value = this.value_;\n this.value_ = null;\n var self_1 = this;\n value.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, tree) {\n self_1.remember(new Path_1.Path(key), tree);\n });\n return this.forget(path);\n }\n }\n else if (this.children_ !== null) {\n var childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n var safeToRemove = this.children_.get(childKey).forget(path);\n if (safeToRemove) {\n this.children_.remove(childKey);\n }\n }\n if (this.children_.isEmpty()) {\n this.children_ = null;\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }\n };\n /**\n * Recursively iterates through all of the stored tree and calls the\n * callback on each one.\n *\n * @param {!Path} prefixPath Path to look up node for.\n * @param {!Function} func The function to invoke for each tree.\n */\n SparseSnapshotTree.prototype.forEachTree = function (prefixPath, func) {\n if (this.value_ !== null) {\n func(prefixPath, this.value_);\n }\n else {\n this.forEachChild(function (key, tree) {\n var path = new Path_1.Path(prefixPath.toString() + '/' + key);\n tree.forEachTree(path, func);\n });\n }\n };\n /**\n * Iterates through each immediate child and triggers the callback.\n *\n * @param {!Function} func The function to invoke for each child.\n */\n SparseSnapshotTree.prototype.forEachChild = function (func) {\n if (this.children_ !== null) {\n this.children_.each(function (key, tree) {\n func(key, tree);\n });\n }\n };\n return SparseSnapshotTree;\n}());\nexports.SparseSnapshotTree = SparseSnapshotTree;\n\n//# sourceMappingURL=SparseSnapshotTree.js.map\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Implements a set with a count of elements.\n *\n * @template K, V\n */\nvar CountedSet = /** @class */ (function () {\n function CountedSet() {\n this.set = {};\n }\n /**\n * @param {!K} item\n * @param {V} val\n */\n CountedSet.prototype.add = function (item, val) {\n this.set[item] = val !== null ? val : true;\n };\n /**\n * @param {!K} key\n * @return {boolean}\n */\n CountedSet.prototype.contains = function (key) {\n return util_1.contains(this.set, key);\n };\n /**\n * @param {!K} item\n * @return {V}\n */\n CountedSet.prototype.get = function (item) {\n return this.contains(item) ? this.set[item] : undefined;\n };\n /**\n * @param {!K} item\n */\n CountedSet.prototype.remove = function (item) {\n delete this.set[item];\n };\n /**\n * Deletes everything in the set\n */\n CountedSet.prototype.clear = function () {\n this.set = {};\n };\n /**\n * True if there's nothing in the set\n * @return {boolean}\n */\n CountedSet.prototype.isEmpty = function () {\n return util_1.isEmpty(this.set);\n };\n /**\n * @return {number} The number of items in the set\n */\n CountedSet.prototype.count = function () {\n return util_1.getCount(this.set);\n };\n /**\n * Run a function on each k,v pair in the set\n * @param {function(K, V)} fn\n */\n CountedSet.prototype.each = function (fn) {\n util_1.forEach(this.set, function (k, v) { return fn(k, v); });\n };\n /**\n * Mostly for debugging\n * @return {Array.} The keys present in this CountedSet\n */\n CountedSet.prototype.keys = function () {\n var keys = [];\n util_1.forEach(this.set, function (k) {\n keys.push(k);\n });\n return keys;\n };\n return CountedSet;\n}());\nexports.CountedSet = CountedSet;\n\n//# sourceMappingURL=CountedSet.js.map\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = __webpack_require__(8);\nvar Path_1 = __webpack_require__(2);\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!Node} snap\n * @constructor\n * @implements {Operation}\n */\nvar Overwrite = /** @class */ (function () {\n function Overwrite(source, path, snap) {\n this.source = source;\n this.path = path;\n this.snap = snap;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.OVERWRITE;\n }\n Overwrite.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new Overwrite(this.source, Path_1.Path.Empty, this.snap.getImmediateChild(childName));\n }\n else {\n return new Overwrite(this.source, this.path.popFront(), this.snap);\n }\n };\n return Overwrite;\n}());\nexports.Overwrite = Overwrite;\n\n//# sourceMappingURL=Overwrite.js.map\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = __webpack_require__(18);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar ViewCache_1 = __webpack_require__(48);\nvar View_1 = __webpack_require__(90);\nvar __referenceConstructor;\n/**\n * SyncPoint represents a single location in a SyncTree with 1 or more event registrations, meaning we need to\n * maintain 1 or more Views at this location to cache server data and raise appropriate events for server changes\n * and user writes (set, transaction, update).\n *\n * It's responsible for:\n * - Maintaining the set of 1 or more views necessary at this location (a SyncPoint with 0 views should be removed).\n * - Proxying user / server operations to the views as appropriate (i.e. applyServerOverwrite,\n * applyUserOverwrite, etc.)\n */\nvar SyncPoint = /** @class */ (function () {\n function SyncPoint() {\n /**\n * The Views being tracked at this location in the tree, stored as a map where the key is a\n * queryId and the value is the View for that query.\n *\n * NOTE: This list will be quite small (usually 1, but perhaps 2 or 3; any more is an odd use case).\n *\n * @type {!Object.}\n * @private\n */\n this.views_ = {};\n }\n Object.defineProperty(SyncPoint, \"__referenceConstructor\", {\n get: function () {\n util_1.assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n },\n set: function (val) {\n util_1.assert(!__referenceConstructor, '__referenceConstructor has already been defined');\n __referenceConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {boolean}\n */\n SyncPoint.prototype.isEmpty = function () {\n return util_2.isEmpty(this.views_);\n };\n /**\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} optCompleteServerCache\n * @return {!Array.}\n */\n SyncPoint.prototype.applyOperation = function (operation, writesCache, optCompleteServerCache) {\n var queryId = operation.source.queryId;\n if (queryId !== null) {\n var view = util_2.safeGet(this.views_, queryId);\n util_1.assert(view != null, 'SyncTree gave us an op for an invalid query.');\n return view.applyOperation(operation, writesCache, optCompleteServerCache);\n }\n else {\n var events_1 = [];\n util_2.forEach(this.views_, function (key, view) {\n events_1 = events_1.concat(view.applyOperation(operation, writesCache, optCompleteServerCache));\n });\n return events_1;\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache Complete server cache, if we have it.\n * @param {boolean} serverCacheComplete\n * @return {!Array.} Events to raise.\n */\n SyncPoint.prototype.addEventRegistration = function (query, eventRegistration, writesCache, serverCache, serverCacheComplete) {\n var queryId = query.queryIdentifier();\n var view = util_2.safeGet(this.views_, queryId);\n if (!view) {\n // TODO: make writesCache take flag for complete server node\n var eventCache = writesCache.calcCompleteEventCache(serverCacheComplete ? serverCache : null);\n var eventCacheComplete = false;\n if (eventCache) {\n eventCacheComplete = true;\n }\n else if (serverCache instanceof ChildrenNode_1.ChildrenNode) {\n eventCache = writesCache.calcCompleteEventChildren(serverCache);\n eventCacheComplete = false;\n }\n else {\n eventCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n eventCacheComplete = false;\n }\n var viewCache = new ViewCache_1.ViewCache(new CacheNode_1.CacheNode(\n /** @type {!Node} */ (eventCache), eventCacheComplete, false), new CacheNode_1.CacheNode(\n /** @type {!Node} */ (serverCache), serverCacheComplete, false));\n view = new View_1.View(query, viewCache);\n this.views_[queryId] = view;\n }\n // This is guaranteed to exist now, we just created anything that was missing\n view.addEventRegistration(eventRegistration);\n return view.getInitialEvents(eventRegistration);\n };\n /**\n * Remove event callback(s). Return cancelEvents if a cancelError is specified.\n *\n * If query is the default query, we'll check all views for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified view(s).\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {{removed:!Array., events:!Array.}} removed queries and any cancel events\n */\n SyncPoint.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var queryId = query.queryIdentifier();\n var removed = [];\n var cancelEvents = [];\n var hadCompleteView = this.hasCompleteView();\n if (queryId === 'default') {\n // When you do ref.off(...), we search all views for the registration to remove.\n var self_1 = this;\n util_2.forEach(this.views_, function (viewQueryId, view) {\n cancelEvents = cancelEvents.concat(view.removeEventRegistration(eventRegistration, cancelError));\n if (view.isEmpty()) {\n delete self_1.views_[viewQueryId];\n // We'll deal with complete views later.\n if (!view\n .getQuery()\n .getQueryParams()\n .loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n });\n }\n else {\n // remove the callback from the specific view.\n var view = util_2.safeGet(this.views_, queryId);\n if (view) {\n cancelEvents = cancelEvents.concat(view.removeEventRegistration(eventRegistration, cancelError));\n if (view.isEmpty()) {\n delete this.views_[queryId];\n // We'll deal with complete views later.\n if (!view\n .getQuery()\n .getQueryParams()\n .loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n }\n }\n if (hadCompleteView && !this.hasCompleteView()) {\n // We removed our last complete view.\n removed.push(new SyncPoint.__referenceConstructor(query.repo, query.path));\n }\n return { removed: removed, events: cancelEvents };\n };\n /**\n * @return {!Array.}\n */\n SyncPoint.prototype.getQueryViews = function () {\n var _this = this;\n var values = Object.keys(this.views_).map(function (key) { return _this.views_[key]; });\n return values.filter(function (view) {\n return !view\n .getQuery()\n .getQueryParams()\n .loadsAllData();\n });\n };\n /**\n *\n * @param {!Path} path The path to the desired complete snapshot\n * @return {?Node} A complete cache, if it exists\n */\n SyncPoint.prototype.getCompleteServerCache = function (path) {\n var serverCache = null;\n util_2.forEach(this.views_, function (key, view) {\n serverCache = serverCache || view.getCompleteServerCache(path);\n });\n return serverCache;\n };\n /**\n * @param {!Query} query\n * @return {?View}\n */\n SyncPoint.prototype.viewForQuery = function (query) {\n var params = query.getQueryParams();\n if (params.loadsAllData()) {\n return this.getCompleteView();\n }\n else {\n var queryId = query.queryIdentifier();\n return util_2.safeGet(this.views_, queryId);\n }\n };\n /**\n * @param {!Query} query\n * @return {boolean}\n */\n SyncPoint.prototype.viewExistsForQuery = function (query) {\n return this.viewForQuery(query) != null;\n };\n /**\n * @return {boolean}\n */\n SyncPoint.prototype.hasCompleteView = function () {\n return this.getCompleteView() != null;\n };\n /**\n * @return {?View}\n */\n SyncPoint.prototype.getCompleteView = function () {\n var completeView = util_2.findValue(this.views_, function (view) {\n return view\n .getQuery()\n .getQueryParams()\n .loadsAllData();\n });\n return completeView || null;\n };\n return SyncPoint;\n}());\nexports.SyncPoint = SyncPoint;\n\n//# sourceMappingURL=SyncPoint.js.map\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = __webpack_require__(4);\nvar CacheNode_1 = __webpack_require__(18);\n/**\n * Stores the data we have cached for a view.\n *\n * serverSnap is the cached server data, eventSnap is the cached event data (server data plus any local writes).\n *\n * @constructor\n */\nvar ViewCache = /** @class */ (function () {\n /**\n *\n * @param {!CacheNode} eventCache_\n * @param {!CacheNode} serverCache_\n */\n function ViewCache(eventCache_, serverCache_) {\n this.eventCache_ = eventCache_;\n this.serverCache_ = serverCache_;\n }\n /**\n * @param {!Node} eventSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n ViewCache.prototype.updateEventSnap = function (eventSnap, complete, filtered) {\n return new ViewCache(new CacheNode_1.CacheNode(eventSnap, complete, filtered), this.serverCache_);\n };\n /**\n * @param {!Node} serverSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n ViewCache.prototype.updateServerSnap = function (serverSnap, complete, filtered) {\n return new ViewCache(this.eventCache_, new CacheNode_1.CacheNode(serverSnap, complete, filtered));\n };\n /**\n * @return {!CacheNode}\n */\n ViewCache.prototype.getEventCache = function () {\n return this.eventCache_;\n };\n /**\n * @return {?Node}\n */\n ViewCache.prototype.getCompleteEventSnap = function () {\n return this.eventCache_.isFullyInitialized()\n ? this.eventCache_.getNode()\n : null;\n };\n /**\n * @return {!CacheNode}\n */\n ViewCache.prototype.getServerCache = function () {\n return this.serverCache_;\n };\n /**\n * @return {?Node}\n */\n ViewCache.prototype.getCompleteServerSnap = function () {\n return this.serverCache_.isFullyInitialized()\n ? this.serverCache_.getNode()\n : null;\n };\n /**\n * @const\n * @type {ViewCache}\n */\n ViewCache.Empty = new ViewCache(new CacheNode_1.CacheNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, \n /*fullyInitialized=*/ false, \n /*filtered=*/ false), new CacheNode_1.CacheNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, \n /*fullyInitialized=*/ false, \n /*filtered=*/ false));\n return ViewCache;\n}());\nexports.ViewCache = ViewCache;\n\n//# sourceMappingURL=ViewCache.js.map\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Returns the delta from the previous call to get stats.\n *\n * @param collection_ The collection to \"listen\" to.\n * @constructor\n */\nvar StatsListener = /** @class */ (function () {\n function StatsListener(collection_) {\n this.collection_ = collection_;\n this.last_ = null;\n }\n StatsListener.prototype.get = function () {\n var newStats = this.collection_.get();\n var delta = util_1.clone(newStats);\n if (this.last_) {\n util_1.forEach(this.last_, function (stat, value) {\n delta[stat] = delta[stat] - value;\n });\n }\n this.last_ = newStats;\n return delta;\n };\n return StatsListener;\n}());\nexports.StatsListener = StatsListener;\n\n//# sourceMappingURL=StatsListener.js.map\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = __webpack_require__(6);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar util_3 = __webpack_require__(0);\nvar util_4 = __webpack_require__(1);\nvar Path_1 = __webpack_require__(2);\nvar VisibilityMonitor_1 = __webpack_require__(102);\nvar OnlineMonitor_1 = __webpack_require__(103);\nvar util_5 = __webpack_require__(0);\nvar Connection_1 = __webpack_require__(52);\nvar util_6 = __webpack_require__(0);\nvar util_7 = __webpack_require__(0);\nvar ServerActions_1 = __webpack_require__(55);\nvar RECONNECT_MIN_DELAY = 1000;\nvar RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nvar RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nvar RECONNECT_DELAY_MULTIPLIER = 1.3;\nvar RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nvar SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nvar INVALID_AUTH_TOKEN_THRESHOLD = 3;\n/**\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\n *\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\n * in quotes to make sure the closure compiler does not minify them.\n */\nvar PersistentConnection = /** @class */ (function (_super) {\n __extends(PersistentConnection, _super);\n /**\n * @implements {ServerActions}\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param onConnectStatus_\n * @param onServerInfoUpdate_\n * @param authTokenProvider_\n * @param authOverride_\n */\n function PersistentConnection(repoInfo_, onDataUpdate_, onConnectStatus_, onServerInfoUpdate_, authTokenProvider_, authOverride_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.onConnectStatus_ = onConnectStatus_;\n _this.onServerInfoUpdate_ = onServerInfoUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n _this.authOverride_ = authOverride_;\n // Used for diagnostic logging.\n _this.id = PersistentConnection.nextPersistentConnectionId_++;\n _this.log_ = util_4.logWrapper('p:' + _this.id + ':');\n /** @private {Object} */\n _this.interruptReasons_ = {};\n _this.listens_ = {};\n _this.outstandingPuts_ = [];\n _this.outstandingPutCount_ = 0;\n _this.onDisconnectRequestQueue_ = [];\n _this.connected_ = false;\n _this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n _this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n _this.securityDebugCallback_ = null;\n _this.lastSessionId = null;\n /** @private {number|null} */\n _this.establishConnectionTimer_ = null;\n /** @private {boolean} */\n _this.visible_ = false;\n // Before we get connected, we keep a queue of pending messages to send.\n _this.requestCBHash_ = {};\n _this.requestNumber_ = 0;\n /** @private {?{\n * sendRequest(Object),\n * close()\n * }} */\n _this.realtime_ = null;\n /** @private {string|null} */\n _this.authToken_ = null;\n _this.forceTokenRefresh_ = false;\n _this.invalidAuthTokenCount_ = 0;\n _this.firstConnection_ = true;\n _this.lastConnectionAttemptTime_ = null;\n _this.lastConnectionEstablishedTime_ = null;\n if (authOverride_ && !util_7.isNodeSdk()) {\n throw new Error('Auth override specified in options, but not supported on non Node.js platforms');\n }\n _this.scheduleConnect_(0);\n VisibilityMonitor_1.VisibilityMonitor.getInstance().on('visible', _this.onVisible_, _this);\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor_1.OnlineMonitor.getInstance().on('online', _this.onOnline_, _this);\n }\n return _this;\n }\n /**\n * @param {!string} action\n * @param {*} body\n * @param {function(*)=} onResponse\n * @protected\n */\n PersistentConnection.prototype.sendRequest = function (action, body, onResponse) {\n var curReqNum = ++this.requestNumber_;\n var msg = { r: curReqNum, a: action, b: body };\n this.log_(util_2.stringify(msg));\n util_3.assert(this.connected_, \"sendRequest call when we're not connected not allowed.\");\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var queryId = query.queryIdentifier();\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n util_3.assert(query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(), 'listen() called for non-default but complete query');\n util_3.assert(!this.listens_[pathString][queryId], 'listen() called twice for same path/queryId.');\n var listenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n };\n /**\n * @param {!{onComplete(),\n * hashFn():!string,\n * query: !Query,\n * tag: ?number}} listenSpec\n * @private\n */\n PersistentConnection.prototype.sendListen_ = function (listenSpec) {\n var _this = this;\n var query = listenSpec.query;\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n var req = { /*path*/ p: pathString };\n var action = 'q';\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n req['h'] = listenSpec.hashFn();\n this.sendRequest(action, req, function (message) {\n var payload = message['d'];\n var status = message['s'];\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n var currentListenSpec = _this.listens_[pathString] && _this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n _this.log_('listen response', message);\n if (status !== 'ok') {\n _this.removeListen_(pathString, queryId);\n }\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n };\n /**\n * @param {*} payload\n * @param {!Query} query\n * @private\n */\n PersistentConnection.warnOnListenWarnings_ = function (payload, query) {\n if (payload && typeof payload === 'object' && util_1.contains(payload, 'w')) {\n var warnings = util_1.safeGet(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n var indexSpec = '\".indexOn\": \"' +\n query\n .getQueryParams()\n .getIndex()\n .toString() +\n '\"';\n var indexPath = query.path.toString();\n util_4.warn(\"Using an unspecified index. Your data will be downloaded and \" +\n (\"filtered on the client. Consider adding \" + indexSpec + \" at \") +\n (indexPath + \" to your security rules for better performance.\"));\n }\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.refreshAuthToken = function (token) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n }\n else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, function () { });\n }\n }\n this.reduceReconnectDelayIfAdminCredential_(token);\n };\n /**\n * @param {!string} credential\n * @private\n */\n PersistentConnection.prototype.reduceReconnectDelayIfAdminCredential_ = function (credential) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n var isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || util_5.isAdmin(credential)) {\n this.log_('Admin auth credential detected. Reducing max reconnect time.');\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n };\n /**\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\n * a auth revoked (the connection is closed).\n */\n PersistentConnection.prototype.tryAuth = function () {\n var _this = this;\n if (this.connected_ && this.authToken_) {\n var token_1 = this.authToken_;\n var authMethod = util_5.isValidFormat(token_1) ? 'auth' : 'gauth';\n var requestData = { cred: token_1 };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n }\n else if (typeof this.authOverride_ === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, function (res) {\n var status = res['s'];\n var data = res['d'] || 'error';\n if (_this.authToken_ === token_1) {\n if (status === 'ok') {\n _this.invalidAuthTokenCount_ = 0;\n }\n else {\n // Triggers reconnect and force refresh for auth token\n _this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.unlisten = function (query, tag) {\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n util_3.assert(query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(), 'unlisten() called for non-default but complete query');\n var listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n };\n PersistentConnection.prototype.sendUnlisten_ = function (pathString, queryId, queryObj, tag) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n var req = { /*path*/ p: pathString };\n var action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n this.sendRequest(action, req);\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectPut = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'o',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectMerge = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'om',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectCancel = function (pathString, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'oc',\n data: null,\n onComplete: onComplete\n });\n }\n };\n PersistentConnection.prototype.sendOnDisconnect_ = function (action, pathString, data, onComplete) {\n var request = { /*path*/ p: pathString, /*data*/ d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, function (response) {\n if (onComplete) {\n setTimeout(function () {\n onComplete(response['s'], response['d']);\n }, Math.floor(0));\n }\n });\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.put = function (pathString, data, onComplete, hash) {\n this.putInternal('p', pathString, data, onComplete, hash);\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.merge = function (pathString, data, onComplete, hash) {\n this.putInternal('m', pathString, data, onComplete, hash);\n };\n PersistentConnection.prototype.putInternal = function (action, pathString, data, onComplete, hash) {\n var request = {\n /*path*/ p: pathString,\n /*data*/ d: data\n };\n if (hash !== undefined)\n request['h'] = hash;\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action: action,\n request: request,\n onComplete: onComplete\n });\n this.outstandingPutCount_++;\n var index = this.outstandingPuts_.length - 1;\n if (this.connected_) {\n this.sendPut_(index);\n }\n else {\n this.log_('Buffering put: ' + pathString);\n }\n };\n PersistentConnection.prototype.sendPut_ = function (index) {\n var _this = this;\n var action = this.outstandingPuts_[index].action;\n var request = this.outstandingPuts_[index].request;\n var onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n this.sendRequest(action, request, function (message) {\n _this.log_(action + ' response', message);\n delete _this.outstandingPuts_[index];\n _this.outstandingPutCount_--;\n // Clean up array occasionally.\n if (_this.outstandingPutCount_ === 0) {\n _this.outstandingPuts_ = [];\n }\n if (onComplete)\n onComplete(message['s'], message['d']);\n });\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.reportStats = function (stats) {\n var _this = this;\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n var request = { /*counters*/ c: stats };\n this.log_('reportStats', request);\n this.sendRequest(/*stats*/ 's', request, function (result) {\n var status = result['s'];\n if (status !== 'ok') {\n var errorReason = result['d'];\n _this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n };\n /**\n * @param {*} message\n * @private\n */\n PersistentConnection.prototype.onDataMessage_ = function (message) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + util_2.stringify(message));\n var reqNum = message['r'];\n var onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message['b']);\n }\n }\n else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n }\n else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n };\n PersistentConnection.prototype.onDataPush_ = function (action, body) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd')\n this.onDataUpdate_(body['p'], body['d'], \n /*isMerge*/ false, body['t']);\n else if (action === 'm')\n this.onDataUpdate_(body['p'], body['d'], \n /*isMerge=*/ true, body['t']);\n else if (action === 'c')\n this.onListenRevoked_(body['p'], body['q']);\n else if (action === 'ac')\n this.onAuthRevoked_(body['s'], body['d']);\n else if (action === 'sd')\n this.onSecurityDebugPacket_(body);\n else\n util_4.error('Unrecognized action received from server: ' +\n util_2.stringify(action) +\n '\\nAre you using the latest client?');\n };\n PersistentConnection.prototype.onReady_ = function (timestamp, sessionId) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n };\n PersistentConnection.prototype.scheduleConnect_ = function (timeout) {\n var _this = this;\n util_3.assert(!this.realtime_, \"Scheduling a connect when we're already connected/ing?\");\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n this.establishConnectionTimer_ = setTimeout(function () {\n _this.establishConnectionTimer_ = null;\n _this.establishConnection_();\n }, Math.floor(timeout));\n };\n /**\n * @param {boolean} visible\n * @private\n */\n PersistentConnection.prototype.onVisible_ = function (visible) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (visible &&\n !this.visible_ &&\n this.reconnectDelay_ === this.maxReconnectDelay_) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n };\n PersistentConnection.prototype.onOnline_ = function (online) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n };\n PersistentConnection.prototype.onRealtimeDisconnect_ = function () {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n }\n else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n var timeSinceLastConnectSucceeded = new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT)\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n var timeSinceLastConnectAttempt = new Date().getTime() - this.lastConnectionAttemptTime_;\n var reconnectDelay = Math.max(0, this.reconnectDelay_ - timeSinceLastConnectAttempt);\n reconnectDelay = Math.random() * reconnectDelay;\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(this.maxReconnectDelay_, this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER);\n }\n this.onConnectStatus_(false);\n };\n PersistentConnection.prototype.establishConnection_ = function () {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n var onDataMessage_1 = this.onDataMessage_.bind(this);\n var onReady_1 = this.onReady_.bind(this);\n var onDisconnect_1 = this.onRealtimeDisconnect_.bind(this);\n var connId_1 = this.id + ':' + PersistentConnection.nextConnectionId_++;\n var self_1 = this;\n var lastSessionId_1 = this.lastSessionId;\n var canceled_1 = false;\n var connection_1 = null;\n var closeFn_1 = function () {\n if (connection_1) {\n connection_1.close();\n }\n else {\n canceled_1 = true;\n onDisconnect_1();\n }\n };\n var sendRequestFn = function (msg) {\n util_3.assert(connection_1, \"sendRequest call when we're not connected not allowed.\");\n connection_1.sendRequest(msg);\n };\n this.realtime_ = {\n close: closeFn_1,\n sendRequest: sendRequestFn\n };\n var forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_\n .getToken(forceRefresh)\n .then(function (result) {\n if (!canceled_1) {\n util_4.log('getToken() completed. Creating connection.');\n self_1.authToken_ = result && result.accessToken;\n connection_1 = new Connection_1.Connection(connId_1, self_1.repoInfo_, onDataMessage_1, onReady_1, onDisconnect_1, \n /* onKill= */ function (reason) {\n util_4.warn(reason + ' (' + self_1.repoInfo_.toString() + ')');\n self_1.interrupt(SERVER_KILL_INTERRUPT_REASON);\n }, lastSessionId_1);\n }\n else {\n util_4.log('getToken() completed but was canceled');\n }\n })\n .then(null, function (error) {\n self_1.log_('Failed to get token: ' + error);\n if (!canceled_1) {\n if (util_6.CONSTANTS.NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n util_4.warn(error);\n }\n closeFn_1();\n }\n });\n }\n };\n /**\n * @param {string} reason\n */\n PersistentConnection.prototype.interrupt = function (reason) {\n util_4.log('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n }\n else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n };\n /**\n * @param {string} reason\n */\n PersistentConnection.prototype.resume = function (reason) {\n util_4.log('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (util_1.isEmpty(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n };\n PersistentConnection.prototype.handleTimestamp_ = function (timestamp) {\n var delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n };\n PersistentConnection.prototype.cancelSentTransactions_ = function () {\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n var put = this.outstandingPuts_[i];\n if (put && /*hash*/ 'h' in put.request && put.queued) {\n if (put.onComplete)\n put.onComplete('disconnect');\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0)\n this.outstandingPuts_ = [];\n };\n /**\n * @param {!string} pathString\n * @param {Array.<*>=} query\n * @private\n */\n PersistentConnection.prototype.onListenRevoked_ = function (pathString, query) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n var queryId;\n if (!query) {\n queryId = 'default';\n }\n else {\n queryId = query.map(function (q) { return util_4.ObjectToUniqueKey(q); }).join('$');\n }\n var listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete)\n listen.onComplete('permission_denied');\n };\n /**\n * @param {!string} pathString\n * @param {!string} queryId\n * @return {{queries:Array., onComplete:function(string)}}\n * @private\n */\n PersistentConnection.prototype.removeListen_ = function (pathString, queryId) {\n var normalizedPathString = new Path_1.Path(pathString).toString(); // normalize path.\n var listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (util_1.getCount(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n }\n else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n };\n PersistentConnection.prototype.onAuthRevoked_ = function (statusCode, explanation) {\n util_4.log('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n };\n PersistentConnection.prototype.onSecurityDebugPacket_ = function (body) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n }\n else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n };\n PersistentConnection.prototype.restoreState_ = function () {\n var _this = this;\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n util_1.forEach(this.listens_, function (pathString, queries) {\n util_1.forEach(queries, function (key, listenSpec) {\n _this.sendListen_(listenSpec);\n });\n });\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i])\n this.sendPut_(i);\n }\n while (this.onDisconnectRequestQueue_.length) {\n var request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(request.action, request.pathString, request.data, request.onComplete);\n }\n };\n /**\n * Sends client stats for first connection\n * @private\n */\n PersistentConnection.prototype.sendConnectStats_ = function () {\n var stats = {};\n var clientName = 'js';\n if (util_6.CONSTANTS.NODE_ADMIN) {\n clientName = 'admin_node';\n }\n else if (util_6.CONSTANTS.NODE_CLIENT) {\n clientName = 'node';\n }\n stats['sdk.' + clientName + '.' + app_1.default.SDK_VERSION.replace(/\\./g, '-')] = 1;\n if (util_7.isMobileCordova()) {\n stats['framework.cordova'] = 1;\n }\n else if (util_7.isReactNative()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n };\n /**\n * @return {boolean}\n * @private\n */\n PersistentConnection.prototype.shouldReconnect_ = function () {\n var online = OnlineMonitor_1.OnlineMonitor.getInstance().currentlyOnline();\n return util_1.isEmpty(this.interruptReasons_) && online;\n };\n /**\n * @private\n */\n PersistentConnection.nextPersistentConnectionId_ = 0;\n /**\n * Counter for number of connections created. Mainly used for tagging in the logs\n * @type {number}\n * @private\n */\n PersistentConnection.nextConnectionId_ = 0;\n return PersistentConnection;\n}(ServerActions_1.ServerActions));\nexports.PersistentConnection = PersistentConnection;\n\n//# sourceMappingURL=PersistentConnection.js.map\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Base class to be used if you want to emit events. Call the constructor with\n * the set of allowed event names.\n */\nvar EventEmitter = /** @class */ (function () {\n /**\n * @param {!Array.} allowedEvents_\n */\n function EventEmitter(allowedEvents_) {\n this.allowedEvents_ = allowedEvents_;\n this.listeners_ = {};\n util_1.assert(Array.isArray(allowedEvents_) && allowedEvents_.length > 0, 'Requires a non-empty array');\n }\n /**\n * To be called by derived classes to trigger events.\n * @param {!string} eventType\n * @param {...*} var_args\n */\n EventEmitter.prototype.trigger = function (eventType) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (Array.isArray(this.listeners_[eventType])) {\n // Clone the list, since callbacks could add/remove listeners.\n var listeners = this.listeners_[eventType].slice();\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].callback.apply(listeners[i].context, var_args);\n }\n }\n };\n EventEmitter.prototype.on = function (eventType, callback, context) {\n this.validateEventType_(eventType);\n this.listeners_[eventType] = this.listeners_[eventType] || [];\n this.listeners_[eventType].push({ callback: callback, context: context });\n var eventData = this.getInitialEvent(eventType);\n if (eventData) {\n callback.apply(context, eventData);\n }\n };\n EventEmitter.prototype.off = function (eventType, callback, context) {\n this.validateEventType_(eventType);\n var listeners = this.listeners_[eventType] || [];\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].callback === callback &&\n (!context || context === listeners[i].context)) {\n listeners.splice(i, 1);\n return;\n }\n }\n };\n EventEmitter.prototype.validateEventType_ = function (eventType) {\n util_1.assert(this.allowedEvents_.find(function (et) {\n return et === eventType;\n }), 'Unknown event: ' + eventType);\n };\n return EventEmitter;\n}());\nexports.EventEmitter = EventEmitter;\n\n//# sourceMappingURL=EventEmitter.js.map\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\nvar storage_1 = __webpack_require__(12);\nvar Constants_1 = __webpack_require__(13);\nvar TransportManager_1 = __webpack_require__(104);\n// Abort upgrade attempt if it takes longer than 60s.\nvar UPGRADE_TIMEOUT = 60000;\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nvar DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nvar BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nvar BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\nvar MESSAGE_TYPE = 't';\nvar MESSAGE_DATA = 'd';\nvar CONTROL_SHUTDOWN = 's';\nvar CONTROL_RESET = 'r';\nvar CONTROL_ERROR = 'e';\nvar CONTROL_PONG = 'o';\nvar SWITCH_ACK = 'a';\nvar END_TRANSMISSION = 'n';\nvar PING = 'p';\nvar SERVER_HELLO = 'h';\n/**\n * Creates a new real-time connection to the server using whichever method works\n * best in the current browser.\n *\n * @constructor\n */\nvar Connection = /** @class */ (function () {\n /**\n * @param {!string} id - an id for this connection\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\n */\n function Connection(id, repoInfo_, onMessage_, onReady_, onDisconnect_, onKill_, lastSessionId) {\n this.id = id;\n this.repoInfo_ = repoInfo_;\n this.onMessage_ = onMessage_;\n this.onReady_ = onReady_;\n this.onDisconnect_ = onDisconnect_;\n this.onKill_ = onKill_;\n this.lastSessionId = lastSessionId;\n this.connectionCount = 0;\n this.pendingDataMessages = [];\n this.state_ = 0 /* CONNECTING */;\n this.log_ = util_1.logWrapper('c:' + this.id + ':');\n this.transportManager_ = new TransportManager_1.TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n /**\n * Starts a connection attempt\n * @private\n */\n Connection.prototype.start_ = function () {\n var _this = this;\n var conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(this.nextTransportId_(), this.repoInfo_, undefined, this.lastSessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessageReceived = this.connReceiver_(this.conn_);\n var onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n /*\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\n * still have the context of your originating frame.\n */\n setTimeout(function () {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n _this.conn_ && _this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n var healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = util_1.setTimeoutNonBlocking(function () {\n _this.healthyTimeout_ = null;\n if (!_this.isHealthy_) {\n if (_this.conn_ &&\n _this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has received ' +\n _this.conn_.bytesReceived +\n ' bytes. Marking connection healthy.');\n _this.isHealthy_ = true;\n _this.conn_.markConnectionHealthy();\n }\n else if (_this.conn_ &&\n _this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has sent ' +\n _this.conn_.bytesSent +\n ' bytes. Leaving connection alive.');\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n }\n else {\n _this.log_('Closing unhealthy connection after timeout.');\n _this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms));\n }\n };\n /**\n * @return {!string}\n * @private\n */\n Connection.prototype.nextTransportId_ = function () {\n return 'c:' + this.id + ':' + this.connectionCount++;\n };\n Connection.prototype.disconnReceiver_ = function (conn) {\n var _this = this;\n return function (everConnected) {\n if (conn === _this.conn_) {\n _this.onConnectionLost_(everConnected);\n }\n else if (conn === _this.secondaryConn_) {\n _this.log_('Secondary connection lost.');\n _this.onSecondaryConnectionLost_();\n }\n else {\n _this.log_('closing an old connection');\n }\n };\n };\n Connection.prototype.connReceiver_ = function (conn) {\n var _this = this;\n return function (message) {\n if (_this.state_ != 2 /* DISCONNECTED */) {\n if (conn === _this.rx_) {\n _this.onPrimaryMessageReceived_(message);\n }\n else if (conn === _this.secondaryConn_) {\n _this.onSecondaryMessageReceived_(message);\n }\n else {\n _this.log_('message on old connection');\n }\n }\n };\n };\n /**\n *\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\n */\n Connection.prototype.sendRequest = function (dataMsg) {\n // wrap in a data message envelope and send it on\n var msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n };\n Connection.prototype.tryCleanupConnection = function () {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_('cleaning up and promoting a connection: ' + this.secondaryConn_.connId);\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n };\n Connection.prototype.onSecondaryControl_ = function (controlData) {\n if (MESSAGE_TYPE in controlData) {\n var cmd = controlData[MESSAGE_TYPE];\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n }\n else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (this.tx_ === this.secondaryConn_ ||\n this.rx_ === this.secondaryConn_) {\n this.close();\n }\n }\n else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n };\n Connection.prototype.onSecondaryMessageReceived_ = function (parsedData) {\n var layer = util_1.requireKey('t', parsedData);\n var data = util_1.requireKey('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n }\n else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n }\n else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n };\n Connection.prototype.upgradeIfSecondaryHealthy_ = function () {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n }\n else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.proceedWithUpgrade_ = function () {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n this.tryCleanupConnection();\n };\n Connection.prototype.onPrimaryMessageReceived_ = function (parsedData) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n var layer = util_1.requireKey('t', parsedData);\n var data = util_1.requireKey('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n }\n else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n };\n Connection.prototype.onDataMessage_ = function (message) {\n this.onPrimaryResponse_();\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n };\n Connection.prototype.onPrimaryResponse_ = function () {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n };\n Connection.prototype.onControl_ = function (controlData) {\n var cmd = util_1.requireKey(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n var payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n }\n else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (var i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n }\n else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n }\n else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n }\n else if (cmd === CONTROL_ERROR) {\n util_1.error('Server Error: ' + payload);\n }\n else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n }\n else {\n util_1.error('Unknown control packet command: ' + cmd);\n }\n }\n };\n /**\n *\n * @param {Object} handshake The handshake data returned from the server\n * @private\n */\n Connection.prototype.onHandshake_ = function (handshake) {\n var timestamp = handshake.ts;\n var version = handshake.v;\n var host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == 0 /* CONNECTING */) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (Constants_1.PROTOCOL_VERSION !== version) {\n util_1.warn('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n };\n Connection.prototype.tryStartUpgrade_ = function () {\n var conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n };\n Connection.prototype.startUpgrade_ = function (conn) {\n var _this = this;\n this.secondaryConn_ = new conn(this.nextTransportId_(), this.repoInfo_, this.sessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ =\n conn['responsesRequiredToBeHealthy'] || 0;\n var onMessage = this.connReceiver_(this.secondaryConn_);\n var onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n util_1.setTimeoutNonBlocking(function () {\n if (_this.secondaryConn_) {\n _this.log_('Timed out trying to upgrade.');\n _this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n };\n Connection.prototype.onReset_ = function (host) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === 1 /* CONNECTED */) {\n this.close();\n }\n else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n };\n Connection.prototype.onConnectionEstablished_ = function (conn, timestamp) {\n var _this = this;\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = 1 /* CONNECTED */;\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n }\n else {\n util_1.setTimeoutNonBlocking(function () {\n _this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n };\n Connection.prototype.sendPingOnPrimaryIfNecessary_ = function () {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === 1 /* CONNECTED */) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.onSecondaryConnectionLost_ = function () {\n var conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n };\n /**\n *\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\n * we should flush the host cache\n * @private\n */\n Connection.prototype.onConnectionLost_ = function (everConnected) {\n this.conn_ = null;\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === 0 /* CONNECTING */) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n storage_1.PersistentStorage.remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n }\n else if (this.state_ === 1 /* CONNECTED */) {\n this.log_('Realtime connection lost.');\n }\n this.close();\n };\n /**\n *\n * @param {string} reason\n * @private\n */\n Connection.prototype.onConnectionShutdown_ = function (reason) {\n this.log_('Connection shutdown command received. Shutting down...');\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n this.close();\n };\n Connection.prototype.sendData_ = function (data) {\n if (this.state_ !== 1 /* CONNECTED */) {\n throw 'Connection is not connected';\n }\n else {\n this.tx_.send(data);\n }\n };\n /**\n * Cleans up this connection, calling the appropriate callbacks\n */\n Connection.prototype.close = function () {\n if (this.state_ !== 2 /* DISCONNECTED */) {\n this.log_('Closing realtime connection.');\n this.state_ = 2 /* DISCONNECTED */;\n this.closeConnections_();\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n };\n /**\n *\n * @private\n */\n Connection.prototype.closeConnections_ = function () {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n };\n return Connection;\n}());\nexports.Connection = Connection;\n\n//# sourceMappingURL=Connection.js.map\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\nvar CountedSet_1 = __webpack_require__(45);\nvar StatsManager_1 = __webpack_require__(25);\nvar PacketReceiver_1 = __webpack_require__(105);\nvar Constants_1 = __webpack_require__(13);\nvar util_2 = __webpack_require__(0);\nvar util_3 = __webpack_require__(0);\n// URL query parameters associated with longpolling\nexports.FIREBASE_LONGPOLL_START_PARAM = 'start';\nexports.FIREBASE_LONGPOLL_CLOSE_COMMAND = 'close';\nexports.FIREBASE_LONGPOLL_COMMAND_CB_NAME = 'pLPCommand';\nexports.FIREBASE_LONGPOLL_DATA_CB_NAME = 'pRTLPCB';\nexports.FIREBASE_LONGPOLL_ID_PARAM = 'id';\nexports.FIREBASE_LONGPOLL_PW_PARAM = 'pw';\nexports.FIREBASE_LONGPOLL_SERIAL_PARAM = 'ser';\nexports.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM = 'cb';\nexports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM = 'seg';\nexports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET = 'ts';\nexports.FIREBASE_LONGPOLL_DATA_PARAM = 'd';\nexports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM = 'disconn';\nexports.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM = 'dframe';\n//Data size constants.\n//TODO: Perf: the maximum length actually differs from browser to browser.\n// We should check what browser we're on and set accordingly.\nvar MAX_URL_DATA_SIZE = 1870;\nvar SEG_HEADER_SIZE = 30; //ie: &seg=8299234&ts=982389123&d=\nvar MAX_PAYLOAD_SIZE = MAX_URL_DATA_SIZE - SEG_HEADER_SIZE;\n/**\n * Keepalive period\n * send a fresh request at minimum every 25 seconds. Opera has a maximum request\n * length of 30 seconds that we can't exceed.\n * @const\n * @type {number}\n */\nvar KEEPALIVE_REQUEST_INTERVAL = 25000;\n/**\n * How long to wait before aborting a long-polling connection attempt.\n * @const\n * @type {number}\n */\nvar LP_CONNECT_TIMEOUT = 30000;\n/**\n * This class manages a single long-polling connection.\n *\n * @constructor\n * @implements {Transport}\n */\nvar BrowserPollConnection = /** @class */ (function () {\n /**\n * @param {string} connId An identifier for this connection, used for logging\n * @param {RepoInfo} repoInfo The info for the endpoint to send data to.\n * @param {string=} transportSessionId Optional transportSessionid if we are reconnecting for an existing\n * transport session\n * @param {string=} lastSessionId Optional lastSessionId if the PersistentConnection has already created a\n * connection previously\n */\n function BrowserPollConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.repoInfo = repoInfo;\n this.transportSessionId = transportSessionId;\n this.lastSessionId = lastSessionId;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.everConnected_ = false;\n this.log_ = util_1.logWrapper(connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.urlFn = function (params) {\n return repoInfo.connectionURL(Constants_1.LONG_POLLING, params);\n };\n }\n /**\n *\n * @param {function(Object)} onMessage Callback when messages arrive\n * @param {function()} onDisconnect Callback with connection lost.\n */\n BrowserPollConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.curSegmentNum = 0;\n this.onDisconnect_ = onDisconnect;\n this.myPacketOrderer = new PacketReceiver_1.PacketReceiver(onMessage);\n this.isClosed_ = false;\n this.connectTimeoutTimer_ = setTimeout(function () {\n _this.log_('Timed out trying to connect.');\n // Make sure we clear the host cache\n _this.onClosed_();\n _this.connectTimeoutTimer_ = null;\n }, Math.floor(LP_CONNECT_TIMEOUT));\n // Ensure we delay the creation of the iframe until the DOM is loaded.\n util_1.executeWhenDOMReady(function () {\n if (_this.isClosed_)\n return;\n //Set up a callback that gets triggered once a connection is set up.\n _this.scriptTagHolder = new FirebaseIFrameScriptHolder(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var command = args[0], arg1 = args[1], arg2 = args[2], arg3 = args[3], arg4 = args[4];\n _this.incrementIncomingBytes_(args);\n if (!_this.scriptTagHolder)\n return; // we closed the connection.\n if (_this.connectTimeoutTimer_) {\n clearTimeout(_this.connectTimeoutTimer_);\n _this.connectTimeoutTimer_ = null;\n }\n _this.everConnected_ = true;\n if (command == exports.FIREBASE_LONGPOLL_START_PARAM) {\n _this.id = arg1;\n _this.password = arg2;\n }\n else if (command === exports.FIREBASE_LONGPOLL_CLOSE_COMMAND) {\n // Don't clear the host cache. We got a response from the server, so we know it's reachable\n if (arg1) {\n // We aren't expecting any more data (other than what the server's already in the process of sending us\n // through our already open polls), so don't send any more.\n _this.scriptTagHolder.sendNewPolls = false;\n // arg1 in this case is the last response number sent by the server. We should try to receive\n // all of the responses up to this one before closing\n _this.myPacketOrderer.closeAfter(arg1, function () {\n _this.onClosed_();\n });\n }\n else {\n _this.onClosed_();\n }\n }\n else {\n throw new Error('Unrecognized command received: ' + command);\n }\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var pN = args[0], data = args[1];\n _this.incrementIncomingBytes_(args);\n _this.myPacketOrderer.handleResponse(pN, data);\n }, function () {\n _this.onClosed_();\n }, _this.urlFn);\n //Send the initial request to connect. The serial number is simply to keep the browser from pulling previous results\n //from cache.\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_START_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = Math.floor(Math.random() * 100000000);\n if (_this.scriptTagHolder.uniqueCallbackIdentifier)\n urlParams[exports.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM] = _this.scriptTagHolder.uniqueCallbackIdentifier;\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (_this.transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = _this.transportSessionId;\n }\n if (_this.lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = _this.lastSessionId;\n }\n if (!util_3.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n var connectURL = _this.urlFn(urlParams);\n _this.log_('Connecting via long-poll to ' + connectURL);\n _this.scriptTagHolder.addTag(connectURL, function () {\n /* do nothing */\n });\n });\n };\n /**\n * Call this when a handshake has completed successfully and we want to consider the connection established\n */\n BrowserPollConnection.prototype.start = function () {\n this.scriptTagHolder.startLongPoll(this.id, this.password);\n this.addDisconnectPingFrame(this.id, this.password);\n };\n /**\n * Forces long polling to be considered as a potential transport\n */\n BrowserPollConnection.forceAllow = function () {\n BrowserPollConnection.forceAllow_ = true;\n };\n /**\n * Forces longpolling to not be considered as a potential transport\n */\n BrowserPollConnection.forceDisallow = function () {\n BrowserPollConnection.forceDisallow_ = true;\n };\n // Static method, use string literal so it can be accessed in a generic way\n BrowserPollConnection.isAvailable = function () {\n // NOTE: In React-Native there's normally no 'document', but if you debug a React-Native app in\n // the Chrome debugger, 'document' is defined, but document.createElement is null (2015/06/08).\n return (BrowserPollConnection.forceAllow_ ||\n (!BrowserPollConnection.forceDisallow_ &&\n typeof document !== 'undefined' &&\n document.createElement != null &&\n !util_1.isChromeExtensionContentScript() &&\n !util_1.isWindowsStoreApp() &&\n !util_3.isNodeSdk()));\n };\n /**\n * No-op for polling\n */\n BrowserPollConnection.prototype.markConnectionHealthy = function () { };\n /**\n * Stops polling and cleans up the iframe\n * @private\n */\n BrowserPollConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.scriptTagHolder) {\n this.scriptTagHolder.close();\n this.scriptTagHolder = null;\n }\n //remove the disconnect frame, which will trigger an XHR call to the server to tell it we're leaving.\n if (this.myDisconnFrame) {\n document.body.removeChild(this.myDisconnFrame);\n this.myDisconnFrame = null;\n }\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n };\n /**\n * Triggered when this transport is closed\n * @private\n */\n BrowserPollConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('Longpoll is closing itself');\n this.shutdown_();\n if (this.onDisconnect_) {\n this.onDisconnect_(this.everConnected_);\n this.onDisconnect_ = null;\n }\n }\n };\n /**\n * External-facing close handler. RealTime has requested we shut down. Kill our connection and tell the server\n * that we've left.\n */\n BrowserPollConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('Longpoll is being closed.');\n this.shutdown_();\n }\n };\n /**\n * Send the JSON object down to the server. It will need to be stringified, base64 encoded, and then\n * broken into chunks (since URLs have a small maximum length).\n * @param {!Object} data The JSON data to transmit.\n */\n BrowserPollConnection.prototype.send = function (data) {\n var dataStr = util_2.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //first, lets get the base64-encoded data\n var base64data = util_2.base64Encode(dataStr);\n //We can only fit a certain amount in each URL, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_1.splitStringBySize(base64data, MAX_PAYLOAD_SIZE);\n //Enqueue each segment for transmission. We assign each chunk a sequential ID and a total number\n //of segments so that we can reassemble the packet on the server.\n for (var i = 0; i < dataSegs.length; i++) {\n this.scriptTagHolder.enqueueSegment(this.curSegmentNum, dataSegs.length, dataSegs[i]);\n this.curSegmentNum++;\n }\n };\n /**\n * This is how we notify the server that we're leaving.\n * We aren't able to send requests with DHTML on a window close event, but we can\n * trigger XHR requests in some browsers (everything but Opera basically).\n * @param {!string} id\n * @param {!string} pw\n */\n BrowserPollConnection.prototype.addDisconnectPingFrame = function (id, pw) {\n if (util_3.isNodeSdk())\n return;\n this.myDisconnFrame = document.createElement('iframe');\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = id;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = pw;\n this.myDisconnFrame.src = this.urlFn(urlParams);\n this.myDisconnFrame.style.display = 'none';\n document.body.appendChild(this.myDisconnFrame);\n };\n /**\n * Used to track the bytes received by this client\n * @param {*} args\n * @private\n */\n BrowserPollConnection.prototype.incrementIncomingBytes_ = function (args) {\n // TODO: This is an annoying perf hit just to track the number of incoming bytes. Maybe it should be opt-in.\n var bytesReceived = util_2.stringify(args).length;\n this.bytesReceived += bytesReceived;\n this.stats_.incrementCounter('bytes_received', bytesReceived);\n };\n return BrowserPollConnection;\n}());\nexports.BrowserPollConnection = BrowserPollConnection;\n/*********************************************************************************************\n * A wrapper around an iframe that is used as a long-polling script holder.\n * @constructor\n *********************************************************************************************/\nvar FirebaseIFrameScriptHolder = /** @class */ (function () {\n /**\n * @param commandCB - The callback to be called when control commands are recevied from the server.\n * @param onMessageCB - The callback to be triggered when responses arrive from the server.\n * @param onDisconnect - The callback to be triggered when this tag holder is closed\n * @param urlFn - A function that provides the URL of the endpoint to send data to.\n */\n function FirebaseIFrameScriptHolder(commandCB, onMessageCB, onDisconnect, urlFn) {\n this.onDisconnect = onDisconnect;\n this.urlFn = urlFn;\n //We maintain a count of all of the outstanding requests, because if we have too many active at once it can cause\n //problems in some browsers.\n /**\n * @type {CountedSet.}\n */\n this.outstandingRequests = new CountedSet_1.CountedSet();\n //A queue of the pending segments waiting for transmission to the server.\n this.pendingSegs = [];\n //A serial number. We use this for two things:\n // 1) A way to ensure the browser doesn't cache responses to polls\n // 2) A way to make the server aware when long-polls arrive in a different order than we started them. The\n // server needs to release both polls in this case or it will cause problems in Opera since Opera can only execute\n // JSONP code in the order it was added to the iframe.\n this.currentSerial = Math.floor(Math.random() * 100000000);\n // This gets set to false when we're \"closing down\" the connection (e.g. we're switching transports but there's still\n // incoming data from the server that we're waiting for).\n this.sendNewPolls = true;\n if (!util_3.isNodeSdk()) {\n //Each script holder registers a couple of uniquely named callbacks with the window. These are called from the\n //iframes where we put the long-polling script tags. We have two callbacks:\n // 1) Command Callback - Triggered for control issues, like starting a connection.\n // 2) Message Callback - Triggered when new data arrives.\n this.uniqueCallbackIdentifier = util_1.LUIDGenerator();\n window[exports.FIREBASE_LONGPOLL_COMMAND_CB_NAME + this.uniqueCallbackIdentifier] = commandCB;\n window[exports.FIREBASE_LONGPOLL_DATA_CB_NAME + this.uniqueCallbackIdentifier] = onMessageCB;\n //Create an iframe for us to add script tags to.\n this.myIFrame = FirebaseIFrameScriptHolder.createIFrame_();\n // Set the iframe's contents.\n var script = '';\n // if we set a javascript url, it's IE and we need to set the document domain. The javascript url is sufficient\n // for ie9, but ie8 needs to do it again in the document itself.\n if (this.myIFrame.src &&\n this.myIFrame.src.substr(0, 'javascript:'.length) === 'javascript:') {\n var currentDomain = document.domain;\n script = '';\n }\n var iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n }\n catch (e) {\n util_1.log('frame writing exception');\n if (e.stack) {\n util_1.log(e.stack);\n }\n util_1.log(e);\n }\n }\n else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n /**\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\n * actually use.\n * @private\n * @return {Element}\n */\n FirebaseIFrameScriptHolder.createIFrame_ = function () {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n var a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n util_1.log('No IE domain setting required');\n }\n }\n catch (e) {\n var domain = document.domain;\n iframe.src =\n \"javascript:void((function(){document.open();document.domain='\" +\n domain +\n \"';document.close();})())\";\n }\n }\n else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n iframe.doc = iframe.contentDocument; // Firefox, Opera, Safari\n }\n else if (iframe.contentWindow) {\n iframe.doc = iframe.contentWindow.document; // Internet Explorer\n }\n else if (iframe.document) {\n iframe.doc = iframe.document; //others?\n }\n return iframe;\n };\n /**\n * Cancel all outstanding queries and remove the frame.\n */\n FirebaseIFrameScriptHolder.prototype.close = function () {\n var _this = this;\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(function () {\n if (_this.myIFrame !== null) {\n document.body.removeChild(_this.myIFrame);\n _this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n if (util_3.isNodeSdk() && this.myID) {\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n var theURL = this.urlFn(urlParams);\n FirebaseIFrameScriptHolder.nodeRestRequest(theURL);\n }\n // Protect from being called recursively.\n var onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n };\n /**\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\n * @param {!string} id - The ID of this connection\n * @param {!string} pw - The password for this connection\n */\n FirebaseIFrameScriptHolder.prototype.startLongPoll = function (id, pw) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) { }\n };\n /**\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\n * too many outstanding requests and we are still alive.\n *\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\n * needed.\n */\n FirebaseIFrameScriptHolder.prototype.newRequest_ = function () {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (this.alive &&\n this.sendNewPolls &&\n this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)) {\n //construct our url\n this.currentSerial++;\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n var theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n var curDataString = '';\n var i = 0;\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n var nextSeg = this.pendingSegs[0];\n if (nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <=\n MAX_URL_DATA_SIZE) {\n //great, the segment will fit. Lets append it.\n var theSeg = this.pendingSegs.shift();\n curDataString =\n curDataString +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM +\n i +\n '=' +\n theSeg.seg +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET +\n i +\n '=' +\n theSeg.ts +\n '&' +\n exports.FIREBASE_LONGPOLL_DATA_PARAM +\n i +\n '=' +\n theSeg.d;\n i++;\n }\n else {\n break;\n }\n }\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * Queue a packet for transmission to the server.\n * @param segnum - A sequential id for this packet segment used for reassembly\n * @param totalsegs - The total number of segments in this packet\n * @param data - The data for this segment.\n */\n FirebaseIFrameScriptHolder.prototype.enqueueSegment = function (segnum, totalsegs, data) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n };\n /**\n * Add a script tag for a regular long-poll request.\n * @param {!string} url - The URL of the script tag.\n * @param {!number} serial - The serial number of the request.\n * @private\n */\n FirebaseIFrameScriptHolder.prototype.addLongPollTag_ = function (url, serial) {\n var _this = this;\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n var doNewRequest = function () {\n _this.outstandingRequests.remove(serial);\n _this.newRequest_();\n };\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n var keepaliveTimeout = setTimeout(doNewRequest, Math.floor(KEEPALIVE_REQUEST_INTERVAL));\n var readyStateCB = function () {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n this.addTag(url, readyStateCB);\n };\n /**\n * Add an arbitrary script tag to the iframe.\n * @param {!string} url - The URL for the script tag source.\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\n */\n FirebaseIFrameScriptHolder.prototype.addTag = function (url, loadCB) {\n var _this = this;\n if (util_3.isNodeSdk()) {\n this.doNodeLongPoll(url, loadCB);\n }\n else {\n setTimeout(function () {\n try {\n // if we're already closed, don't add this poll\n if (!_this.sendNewPolls)\n return;\n var newScript_1 = _this.myIFrame.doc.createElement('script');\n newScript_1.type = 'text/javascript';\n newScript_1.async = true;\n newScript_1.src = url;\n newScript_1.onload = newScript_1.onreadystatechange = function () {\n var rstate = newScript_1.readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript_1.onload = newScript_1.onreadystatechange = null;\n if (newScript_1.parentNode) {\n newScript_1.parentNode.removeChild(newScript_1);\n }\n loadCB();\n }\n };\n newScript_1.onerror = function () {\n util_1.log('Long-poll script failed to load: ' + url);\n _this.sendNewPolls = false;\n _this.close();\n };\n _this.myIFrame.doc.body.appendChild(newScript_1);\n }\n catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n };\n return FirebaseIFrameScriptHolder;\n}());\nexports.FirebaseIFrameScriptHolder = FirebaseIFrameScriptHolder;\n\n//# sourceMappingURL=BrowserPollConnection.js.map\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = __webpack_require__(6);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar StatsManager_1 = __webpack_require__(25);\nvar Constants_1 = __webpack_require__(13);\nvar util_3 = __webpack_require__(0);\nvar storage_1 = __webpack_require__(12);\nvar util_4 = __webpack_require__(0);\nvar util_5 = __webpack_require__(0);\nvar WEBSOCKET_MAX_FRAME_SIZE = 16384;\nvar WEBSOCKET_KEEPALIVE_INTERVAL = 45000;\nvar WebSocketImpl = null;\nif (typeof MozWebSocket !== 'undefined') {\n WebSocketImpl = MozWebSocket;\n}\nelse if (typeof WebSocket !== 'undefined') {\n WebSocketImpl = WebSocket;\n}\nfunction setWebSocketImpl(impl) {\n WebSocketImpl = impl;\n}\nexports.setWebSocketImpl = setWebSocketImpl;\n/**\n * Create a new websocket connection with the given callbacks.\n * @constructor\n * @implements {Transport}\n */\nvar WebSocketConnection = /** @class */ (function () {\n /**\n * @param {string} connId identifier for this transport\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n */\n function WebSocketConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.keepaliveTimer = null;\n this.frames = null;\n this.totalFrames = 0;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.log_ = util_2.logWrapper(this.connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.connURL = WebSocketConnection.connectionURL_(repoInfo, transportSessionId, lastSessionId);\n }\n /**\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n * @return {string} connection url\n * @private\n */\n WebSocketConnection.connectionURL_ = function (repoInfo, transportSessionId, lastSessionId) {\n var urlParams = {};\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (!util_5.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n if (transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = transportSessionId;\n }\n if (lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = lastSessionId;\n }\n return repoInfo.connectionURL(Constants_1.WEBSOCKET, urlParams);\n };\n /**\n *\n * @param onMessage Callback when messages arrive\n * @param onDisconnect Callback with connection lost.\n */\n WebSocketConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.onDisconnect = onDisconnect;\n this.onMessage = onMessage;\n this.log_('Websocket connecting to ' + this.connURL);\n this.everConnected_ = false;\n // Assume failure until proven otherwise.\n storage_1.PersistentStorage.set('previous_websocket_failure', true);\n try {\n if (util_5.isNodeSdk()) {\n var device = util_3.CONSTANTS.NODE_ADMIN ? 'AdminNode' : 'Node';\n // UA Format: Firebase////\n var options = {\n headers: {\n 'User-Agent': \"Firebase/\" + Constants_1.PROTOCOL_VERSION + \"/\" + app_1.default.SDK_VERSION + \"/\" + process.platform + \"/\" + device\n }\n };\n // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.\n var env = process['env'];\n var proxy = this.connURL.indexOf('wss://') == 0\n ? env['HTTPS_PROXY'] || env['https_proxy']\n : env['HTTP_PROXY'] || env['http_proxy'];\n if (proxy) {\n options['proxy'] = { origin: proxy };\n }\n this.mySock = new WebSocketImpl(this.connURL, [], options);\n }\n else {\n this.mySock = new WebSocketImpl(this.connURL);\n }\n }\n catch (e) {\n this.log_('Error instantiating WebSocket.');\n var error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n return;\n }\n this.mySock.onopen = function () {\n _this.log_('Websocket connected.');\n _this.everConnected_ = true;\n };\n this.mySock.onclose = function () {\n _this.log_('Websocket connection was disconnected.');\n _this.mySock = null;\n _this.onClosed_();\n };\n this.mySock.onmessage = function (m) {\n _this.handleIncomingFrame(m);\n };\n this.mySock.onerror = function (e) {\n _this.log_('WebSocket error. Closing connection.');\n var error = e.message || e.data;\n if (error) {\n _this.log_(error);\n }\n _this.onClosed_();\n };\n };\n /**\n * No-op for websockets, we don't need to do anything once the connection is confirmed as open\n */\n WebSocketConnection.prototype.start = function () { };\n WebSocketConnection.forceDisallow = function () {\n WebSocketConnection.forceDisallow_ = true;\n };\n WebSocketConnection.isAvailable = function () {\n var isOldAndroid = false;\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n var oldAndroidRegex = /Android ([0-9]{0,}\\.[0-9]{0,})/;\n var oldAndroidMatch = navigator.userAgent.match(oldAndroidRegex);\n if (oldAndroidMatch && oldAndroidMatch.length > 1) {\n if (parseFloat(oldAndroidMatch[1]) < 4.4) {\n isOldAndroid = true;\n }\n }\n }\n return (!isOldAndroid &&\n WebSocketImpl !== null &&\n !WebSocketConnection.forceDisallow_);\n };\n /**\n * Returns true if we previously failed to connect with this transport.\n * @return {boolean}\n */\n WebSocketConnection.previouslyFailed = function () {\n // If our persistent storage is actually only in-memory storage,\n // we default to assuming that it previously failed to be safe.\n return (storage_1.PersistentStorage.isInMemoryStorage ||\n storage_1.PersistentStorage.get('previous_websocket_failure') === true);\n };\n WebSocketConnection.prototype.markConnectionHealthy = function () {\n storage_1.PersistentStorage.remove('previous_websocket_failure');\n };\n WebSocketConnection.prototype.appendFrame_ = function (data) {\n this.frames.push(data);\n if (this.frames.length == this.totalFrames) {\n var fullMess = this.frames.join('');\n this.frames = null;\n var jsonMess = util_4.jsonEval(fullMess);\n //handle the message\n this.onMessage(jsonMess);\n }\n };\n /**\n * @param {number} frameCount The number of frames we are expecting from the server\n * @private\n */\n WebSocketConnection.prototype.handleNewFrameCount_ = function (frameCount) {\n this.totalFrames = frameCount;\n this.frames = [];\n };\n /**\n * Attempts to parse a frame count out of some text. If it can't, assumes a value of 1\n * @param {!String} data\n * @return {?String} Any remaining data to be process, or null if there is none\n * @private\n */\n WebSocketConnection.prototype.extractFrameCount_ = function (data) {\n util_1.assert(this.frames === null, 'We already have a frame buffer');\n // TODO: The server is only supposed to send up to 9999 frames (i.e. length <= 4), but that isn't being enforced\n // currently. So allowing larger frame counts (length <= 6). See https://app.asana.com/0/search/8688598998380/8237608042508\n if (data.length <= 6) {\n var frameCount = Number(data);\n if (!isNaN(frameCount)) {\n this.handleNewFrameCount_(frameCount);\n return null;\n }\n }\n this.handleNewFrameCount_(1);\n return data;\n };\n /**\n * Process a websocket frame that has arrived from the server.\n * @param mess The frame data\n */\n WebSocketConnection.prototype.handleIncomingFrame = function (mess) {\n if (this.mySock === null)\n return; // Chrome apparently delivers incoming packets even after we .close() the connection sometimes.\n var data = mess['data'];\n this.bytesReceived += data.length;\n this.stats_.incrementCounter('bytes_received', data.length);\n this.resetKeepAlive();\n if (this.frames !== null) {\n // we're buffering\n this.appendFrame_(data);\n }\n else {\n // try to parse out a frame count, otherwise, assume 1 and process it\n var remainingData = this.extractFrameCount_(data);\n if (remainingData !== null) {\n this.appendFrame_(remainingData);\n }\n }\n };\n /**\n * Send a message to the server\n * @param {Object} data The JSON object to transmit\n */\n WebSocketConnection.prototype.send = function (data) {\n this.resetKeepAlive();\n var dataStr = util_4.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //We can only fit a certain amount in each websocket frame, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_2.splitStringBySize(dataStr, WEBSOCKET_MAX_FRAME_SIZE);\n //Send the length header\n if (dataSegs.length > 1) {\n this.sendString_(String(dataSegs.length));\n }\n //Send the actual data in segments.\n for (var i = 0; i < dataSegs.length; i++) {\n this.sendString_(dataSegs[i]);\n }\n };\n WebSocketConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.keepaliveTimer) {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = null;\n }\n if (this.mySock) {\n this.mySock.close();\n this.mySock = null;\n }\n };\n WebSocketConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is closing itself');\n this.shutdown_();\n // since this is an internal close, trigger the close listener\n if (this.onDisconnect) {\n this.onDisconnect(this.everConnected_);\n this.onDisconnect = null;\n }\n }\n };\n /**\n * External-facing close handler.\n * Close the websocket and kill the connection.\n */\n WebSocketConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is being closed');\n this.shutdown_();\n }\n };\n /**\n * Kill the current keepalive timer and start a new one, to ensure that it always fires N seconds after\n * the last activity.\n */\n WebSocketConnection.prototype.resetKeepAlive = function () {\n var _this = this;\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = setInterval(function () {\n //If there has been no websocket activity for a while, send a no-op\n if (_this.mySock) {\n _this.sendString_('0');\n }\n _this.resetKeepAlive();\n }, Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL));\n };\n /**\n * Send a string over the websocket.\n *\n * @param {string} str String to send.\n * @private\n */\n WebSocketConnection.prototype.sendString_ = function (str) {\n // Firefox seems to sometimes throw exceptions (NS_ERROR_UNEXPECTED) from websocket .send()\n // calls for some unknown reason. We treat these as an error and disconnect.\n // See https://app.asana.com/0/58926111402292/68021340250410\n try {\n this.mySock.send(str);\n }\n catch (e) {\n this.log_('Exception thrown from WebSocket.send():', e.message || e.data, 'Closing connection.');\n setTimeout(this.onClosed_.bind(this), 0);\n }\n };\n /**\n * Number of response before we consider the connection \"healthy.\"\n * @type {number}\n */\n WebSocketConnection.responsesRequiredToBeHealthy = 2;\n /**\n * Time to wait for the connection te become healthy before giving up.\n * @type {number}\n */\n WebSocketConnection.healthyTimeout = 30000;\n return WebSocketConnection;\n}());\nexports.WebSocketConnection = WebSocketConnection;\n\n//# sourceMappingURL=WebSocketConnection.js.map\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27)))\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Interface defining the set of actions that can be performed against the Firebase server\n * (basically corresponds to our wire protocol).\n *\n * @interface\n */\nvar ServerActions = /** @class */ (function () {\n function ServerActions() {\n }\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.put = function (pathString, data, onComplete, hash) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, ?string)} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.merge = function (pathString, data, onComplete, hash) { };\n /**\n * Refreshes the auth token for the current connection.\n * @param {string} token The authentication token\n */\n ServerActions.prototype.refreshAuthToken = function (token) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectPut = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectMerge = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectCancel = function (pathString, onComplete) { };\n /**\n * @param {Object.} stats\n */\n ServerActions.prototype.reportStats = function (stats) { };\n return ServerActions;\n}());\nexports.ServerActions = ServerActions;\n\n//# sourceMappingURL=ServerActions.js.map\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = __webpack_require__(24);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar Node_1 = __webpack_require__(5);\nvar ChildrenNode_1 = __webpack_require__(4);\n/**\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar RangedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function RangedFilter(params) {\n this.indexedFilter_ = new IndexedFilter_1.IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getStartPost = function () {\n return this.startPost_;\n };\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getEndPost = function () {\n return this.endPost_;\n };\n /**\n * @param {!NamedNode} node\n * @return {boolean}\n */\n RangedFilter.prototype.matches = function (node) {\n return (this.index_.compare(this.getStartPost(), node) <= 0 &&\n this.index_.compare(node, this.getEndPost()) <= 0);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var self = this;\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!self.matches(new Node_1.NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndexedFilter = function () {\n return this.indexedFilter_;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getStartPost_ = function (params) {\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n }\n else {\n return params.getIndex().minPost();\n }\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getEndPost_ = function (params) {\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n }\n else {\n return params.getIndex().maxPost();\n }\n };\n return RangedFilter;\n}());\nexports.RangedFilter = RangedFilter;\n\n//# sourceMappingURL=RangedFilter.js.map\n\n\n/***/ }),\n/* 57 */,\n/* 58 */,\n/* 59 */,\n/* 60 */,\n/* 61 */,\n/* 62 */,\n/* 63 */,\n/* 64 */,\n/* 65 */,\n/* 66 */,\n/* 67 */,\n/* 68 */,\n/* 69 */,\n/* 70 */,\n/* 71 */,\n/* 72 */,\n/* 73 */,\n/* 74 */,\n/* 75 */,\n/* 76 */,\n/* 77 */,\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = __webpack_require__(79);\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = __webpack_require__(6);\nvar Database_1 = __webpack_require__(32);\nexports.Database = Database_1.Database;\nvar Query_1 = __webpack_require__(36);\nexports.Query = Query_1.Query;\nvar Reference_1 = __webpack_require__(21);\nexports.Reference = Reference_1.Reference;\nvar util_1 = __webpack_require__(1);\nexports.enableLogging = util_1.enableLogging;\nvar RepoManager_1 = __webpack_require__(26);\nvar INTERNAL = __webpack_require__(111);\nvar TEST_ACCESS = __webpack_require__(112);\nvar util_2 = __webpack_require__(0);\nvar ServerValue = Database_1.Database.ServerValue;\nexports.ServerValue = ServerValue;\nfunction registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app, unused, url) { return RepoManager_1.RepoManager.getInstance().databaseFromApp(app, url); }, \n // firebase.database namespace properties\n {\n Reference: Reference_1.Reference,\n Query: Query_1.Query,\n Database: Database_1.Database,\n enableLogging: util_1.enableLogging,\n INTERNAL: INTERNAL,\n ServerValue: ServerValue,\n TEST_ACCESS: TEST_ACCESS\n }, null, true);\n if (util_2.isNodeSdk()) {\n module.exports = namespace;\n }\n}\nexports.registerDatabase = registerDatabase;\nregisterDatabase(app_1.default);\nvar DataSnapshot_1 = __webpack_require__(22);\nexports.DataSnapshot = DataSnapshot_1.DataSnapshot;\nvar onDisconnect_1 = __webpack_require__(35);\nexports.OnDisconnect = onDisconnect_1.OnDisconnect;\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Wraps a DOM Storage object and:\n * - automatically encode objects as JSON strings before storing them to allow us to store arbitrary types.\n * - prefixes names with \"firebase:\" to avoid collisions with app data.\n *\n * We automatically (see storage.js) create two such wrappers, one for sessionStorage,\n * and one for localStorage.\n *\n * @constructor\n */\nvar DOMStorageWrapper = /** @class */ (function () {\n /**\n * @param {Storage} domStorage_ The underlying storage object (e.g. localStorage or sessionStorage)\n */\n function DOMStorageWrapper(domStorage_) {\n this.domStorage_ = domStorage_;\n // Use a prefix to avoid collisions with other stuff saved by the app.\n this.prefix_ = 'firebase:';\n }\n /**\n * @param {string} key The key to save the value under\n * @param {?Object} value The value being stored, or null to remove the key.\n */\n DOMStorageWrapper.prototype.set = function (key, value) {\n if (value == null) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n }\n else {\n this.domStorage_.setItem(this.prefixedName_(key), util_1.stringify(value));\n }\n };\n /**\n * @param {string} key\n * @return {*} The value that was stored under this key, or null\n */\n DOMStorageWrapper.prototype.get = function (key) {\n var storedVal = this.domStorage_.getItem(this.prefixedName_(key));\n if (storedVal == null) {\n return null;\n }\n else {\n return util_1.jsonEval(storedVal);\n }\n };\n /**\n * @param {string} key\n */\n DOMStorageWrapper.prototype.remove = function (key) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n };\n /**\n * @param {string} name\n * @return {string}\n */\n DOMStorageWrapper.prototype.prefixedName_ = function (name) {\n return this.prefix_ + name;\n };\n DOMStorageWrapper.prototype.toString = function () {\n return this.domStorage_.toString();\n };\n return DOMStorageWrapper;\n}());\nexports.DOMStorageWrapper = DOMStorageWrapper;\n\n//# sourceMappingURL=DOMStorageWrapper.js.map\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * An in-memory storage implementation that matches the API of DOMStorageWrapper\n * (TODO: create interface for both to implement).\n *\n * @constructor\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n this.cache_ = {};\n this.isInMemoryStorage = true;\n }\n MemoryStorage.prototype.set = function (key, value) {\n if (value == null) {\n delete this.cache_[key];\n }\n else {\n this.cache_[key] = value;\n }\n };\n MemoryStorage.prototype.get = function (key) {\n if (util_1.contains(this.cache_, key)) {\n return this.cache_[key];\n }\n return null;\n };\n MemoryStorage.prototype.remove = function (key) {\n delete this.cache_[key];\n };\n return MemoryStorage;\n}());\nexports.MemoryStorage = MemoryStorage;\n\n//# sourceMappingURL=MemoryStorage.js.map\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar TransactionResult = /** @class */ (function () {\n /**\n * A type for the resolve value of Firebase.transaction.\n * @constructor\n * @dict\n * @param {boolean} committed\n * @param {DataSnapshot} snapshot\n */\n function TransactionResult(committed, snapshot) {\n this.committed = committed;\n this.snapshot = snapshot;\n }\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n TransactionResult.prototype.toJSON = function () {\n util_1.validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);\n return { committed: this.committed, snapshot: this.snapshot.toJSON() };\n };\n return TransactionResult;\n}());\nexports.TransactionResult = TransactionResult;\n\n//# sourceMappingURL=TransactionResult.js.map\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Fancy ID generator that creates 20-character string identifiers with the\n * following properties:\n *\n * 1. They're based on timestamp so that they sort *after* any existing ids.\n * 2. They contain 72-bits of random data after the timestamp so that IDs won't\n * collide with other clients' IDs.\n * 3. They sort *lexicographically* (so the timestamp is converted to characters\n * that will sort properly).\n * 4. They're monotonically increasing. Even if you generate more than one in\n * the same timestamp, the latter ones will sort after the former ones. We do\n * this by using the previous random bits but \"incrementing\" them by 1 (only\n * in the case of a timestamp collision).\n */\nexports.nextPushId = (function () {\n // Modeled after base64 web-safe chars, but ordered by ASCII.\n var PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n // Timestamp of last push, used to prevent local collisions if you push twice\n // in one ms.\n var lastPushTime = 0;\n // We generate 72-bits of randomness which get turned into 12 characters and\n // appended to the timestamp to prevent collisions with other clients. We\n // store the last characters we generated because in the event of a collision,\n // we'll use those same characters except \"incremented\" by one.\n var lastRandChars = [];\n return function (now) {\n var duplicateTime = now === lastPushTime;\n lastPushTime = now;\n var i;\n var timeStampChars = new Array(8);\n for (i = 7; i >= 0; i--) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n // NOTE: Can't use << here because javascript will convert to int and lose\n // the upper bits.\n now = Math.floor(now / 64);\n }\n util_1.assert(now === 0, 'Cannot push at time == 0');\n var id = timeStampChars.join('');\n if (!duplicateTime) {\n for (i = 0; i < 12; i++) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n }\n else {\n // If the timestamp hasn't changed since last push, use the same random\n // number, except incremented by 1.\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i--) {\n lastRandChars[i] = 0;\n }\n lastRandChars[i]++;\n }\n for (i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n util_1.assert(id.length === 20, 'nextPushId: Length should be 20.');\n return id;\n };\n})();\n\n//# sourceMappingURL=NextPushId.js.map\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DataSnapshot_1 = __webpack_require__(22);\nvar Event_1 = __webpack_require__(85);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\n/**\n * Represents registration for 'value' events.\n */\nvar ValueEventRegistration = /** @class */ (function () {\n /**\n * @param {?function(!DataSnapshot)} callback_\n * @param {?function(Error)} cancelCallback_\n * @param {?Object} context_\n */\n function ValueEventRegistration(callback_, cancelCallback_, context_) {\n this.callback_ = callback_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.respondsTo = function (eventType) {\n return eventType === 'value';\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createEvent = function (change, query) {\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent('value', this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, query.getRef(), index));\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_1 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_1.call(ctx, eventData.error);\n };\n }\n else {\n var cb_1 = this.callback_;\n return function () {\n cb_1.call(ctx, eventData.snapshot);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.matches = function (other) {\n if (!(other instanceof ValueEventRegistration)) {\n return false;\n }\n else if (!other.callback_ || !this.callback_) {\n // If no callback specified, we consider it to match any callback.\n return true;\n }\n else {\n return (other.callback_ === this.callback_ && other.context_ === this.context_);\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.hasAnyCallback = function () {\n return this.callback_ !== null;\n };\n return ValueEventRegistration;\n}());\nexports.ValueEventRegistration = ValueEventRegistration;\n/**\n * Represents the registration of 1 or more child_xxx events.\n *\n * Currently, it is always exactly 1 child_xxx event, but the idea is we might let you\n * register a group of callbacks together in the future.\n *\n * @constructor\n * @implements {EventRegistration}\n */\nvar ChildEventRegistration = /** @class */ (function () {\n /**\n * @param {?Object.} callbacks_\n * @param {?function(Error)} cancelCallback_\n * @param {Object=} context_\n */\n function ChildEventRegistration(callbacks_, cancelCallback_, context_) {\n this.callbacks_ = callbacks_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.respondsTo = function (eventType) {\n var eventToCheck = eventType === 'children_added' ? 'child_added' : eventType;\n eventToCheck =\n eventToCheck === 'children_removed' ? 'child_removed' : eventToCheck;\n return util_1.contains(this.callbacks_, eventToCheck);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createEvent = function (change, query) {\n util_2.assert(change.childName != null, 'Child events should have a childName.');\n var ref = query.getRef().child(/** @type {!string} */ (change.childName));\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent(change.type, this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, ref, index), change.prevName);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_2 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_2.call(ctx, eventData.error);\n };\n }\n else {\n var cb_2 = this.callbacks_[eventData.eventType];\n return function () {\n cb_2.call(ctx, eventData.snapshot, eventData.prevName);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.matches = function (other) {\n if (other instanceof ChildEventRegistration) {\n if (!this.callbacks_ || !other.callbacks_) {\n return true;\n }\n else if (this.context_ === other.context_) {\n var otherCount = util_1.getCount(other.callbacks_);\n var thisCount = util_1.getCount(this.callbacks_);\n if (otherCount === thisCount) {\n // If count is 1, do an exact match on eventType, if either is defined but null, it's a match.\n // If event types don't match, not a match\n // If count is not 1, exact match across all\n if (otherCount === 1) {\n var otherKey /** @type {!string} */ = util_1.getAnyKey(other.callbacks_);\n var thisKey /** @type {!string} */ = util_1.getAnyKey(this.callbacks_);\n return (thisKey === otherKey &&\n (!other.callbacks_[otherKey] ||\n !this.callbacks_[thisKey] ||\n other.callbacks_[otherKey] === this.callbacks_[thisKey]));\n }\n else {\n // Exact match on each key.\n return util_1.every(this.callbacks_, function (eventType, cb) { return other.callbacks_[eventType] === cb; });\n }\n }\n }\n }\n return false;\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.hasAnyCallback = function () {\n return this.callbacks_ !== null;\n };\n return ChildEventRegistration;\n}());\nexports.ChildEventRegistration = ChildEventRegistration;\n\n//# sourceMappingURL=EventRegistration.js.map\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Encapsulates the data needed to raise an event\n * @implements {Event}\n */\nvar DataEvent = /** @class */ (function () {\n /**\n * @param {!string} eventType One of: value, child_added, child_changed, child_moved, child_removed\n * @param {!EventRegistration} eventRegistration The function to call to with the event data. User provided\n * @param {!DataSnapshot} snapshot The data backing the event\n * @param {?string=} prevName Optional, the name of the previous child for child_* events.\n */\n function DataEvent(eventType, eventRegistration, snapshot, prevName) {\n this.eventType = eventType;\n this.eventRegistration = eventRegistration;\n this.snapshot = snapshot;\n this.prevName = prevName;\n }\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getPath = function () {\n var ref = this.snapshot.getRef();\n if (this.eventType === 'value') {\n return ref.path;\n }\n else {\n return ref.getParent().path;\n }\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventType = function () {\n return this.eventType;\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.toString = function () {\n return (this.getPath().toString() +\n ':' +\n this.eventType +\n ':' +\n util_1.stringify(this.snapshot.exportVal()));\n };\n return DataEvent;\n}());\nexports.DataEvent = DataEvent;\nvar CancelEvent = /** @class */ (function () {\n /**\n * @param {EventRegistration} eventRegistration\n * @param {Error} error\n * @param {!Path} path\n */\n function CancelEvent(eventRegistration, error, path) {\n this.eventRegistration = eventRegistration;\n this.error = error;\n this.path = path;\n }\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getPath = function () {\n return this.path;\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventType = function () {\n return 'cancel';\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.toString = function () {\n return this.path.toString() + ':cancel';\n };\n return CancelEvent;\n}());\nexports.CancelEvent = CancelEvent;\n\n//# sourceMappingURL=Event.js.map\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar AckUserWrite_1 = __webpack_require__(87);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar util_3 = __webpack_require__(0);\nvar ImmutableTree_1 = __webpack_require__(23);\nvar ListenComplete_1 = __webpack_require__(88);\nvar Merge_1 = __webpack_require__(89);\nvar Operation_1 = __webpack_require__(8);\nvar Overwrite_1 = __webpack_require__(46);\nvar Path_1 = __webpack_require__(2);\nvar SyncPoint_1 = __webpack_require__(47);\nvar WriteTree_1 = __webpack_require__(95);\n/**\n * SyncTree is the central class for managing event callback registration, data caching, views\n * (query processing), and event generation. There are typically two SyncTree instances for\n * each Repo, one for the normal Firebase data, and one for the .info data.\n *\n * It has a number of responsibilities, including:\n * - Tracking all user event callbacks (registered via addEventRegistration() and removeEventRegistration()).\n * - Applying and caching data changes for user set(), transaction(), and update() calls\n * (applyUserOverwrite(), applyUserMerge()).\n * - Applying and caching data changes for server data changes (applyServerOverwrite(),\n * applyServerMerge()).\n * - Generating user-facing events for server and user changes (all of the apply* methods\n * return the set of events that need to be raised as a result).\n * - Maintaining the appropriate set of server listens to ensure we are always subscribed\n * to the correct set of paths and queries to satisfy the current set of user event\n * callbacks (listens are started/stopped using the provided listenProvider).\n *\n * NOTE: Although SyncTree tracks event callbacks and calculates events to raise, the actual\n * events are returned to the caller rather than raised synchronously.\n *\n * @constructor\n */\nvar SyncTree = /** @class */ (function () {\n /**\n * @param {!ListenProvider} listenProvider_ Used by SyncTree to start / stop listening\n * to server data.\n */\n function SyncTree(listenProvider_) {\n this.listenProvider_ = listenProvider_;\n /**\n * Tree of SyncPoints. There's a SyncPoint at any location that has 1 or more views.\n * @type {!ImmutableTree.}\n * @private\n */\n this.syncPointTree_ = ImmutableTree_1.ImmutableTree.Empty;\n /**\n * A tree of all pending user writes (user-initiated set()'s, transaction()'s, update()'s, etc.).\n * @type {!WriteTree}\n * @private\n */\n this.pendingWriteTree_ = new WriteTree_1.WriteTree();\n this.tagToQueryMap_ = {};\n this.queryToTagMap_ = {};\n }\n /**\n * Apply the data changes for a user-generated set() or transaction() call.\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @param {number} writeId\n * @param {boolean=} visible\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserOverwrite = function (path, newData, writeId, visible) {\n // Record pending write.\n this.pendingWriteTree_.addOverwrite(path, newData, writeId, visible);\n if (!visible) {\n return [];\n }\n else {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.User, path, newData));\n }\n };\n /**\n * Apply the data from a user-generated update() call\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserMerge = function (path, changedChildren, writeId) {\n // Record pending merge.\n this.pendingWriteTree_.addMerge(path, changedChildren, writeId);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.User, path, changeTree));\n };\n /**\n * Acknowledge a pending user write that was previously registered with applyUserOverwrite() or applyUserMerge().\n *\n * @param {!number} writeId\n * @param {boolean=} revert True if the given write failed and needs to be reverted\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.ackUserWrite = function (writeId, revert) {\n if (revert === void 0) { revert = false; }\n var write = this.pendingWriteTree_.getWrite(writeId);\n var needToReevaluate = this.pendingWriteTree_.removeWrite(writeId);\n if (!needToReevaluate) {\n return [];\n }\n else {\n var affectedTree_1 = ImmutableTree_1.ImmutableTree.Empty;\n if (write.snap != null) {\n // overwrite\n affectedTree_1 = affectedTree_1.set(Path_1.Path.Empty, true);\n }\n else {\n util_3.forEach(write.children, function (pathString, node) {\n affectedTree_1 = affectedTree_1.set(new Path_1.Path(pathString), node);\n });\n }\n return this.applyOperationToSyncPoints_(new AckUserWrite_1.AckUserWrite(write.path, affectedTree_1, revert));\n }\n };\n /**\n * Apply new server data for the specified path..\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerOverwrite = function (path, newData) {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.Server, path, newData));\n };\n /**\n * Apply new server data to be merged in at the specified path.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerMerge = function (path, changedChildren) {\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.Server, path, changeTree));\n };\n /**\n * Apply a listen complete for a query\n *\n * @param {!Path} path\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyListenComplete = function (path) {\n return this.applyOperationToSyncPoints_(new ListenComplete_1.ListenComplete(Operation_1.OperationSource.Server, path));\n };\n /**\n * Apply new server data for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryOverwrite = function (path, snap, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey != null) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new Overwrite_1.Overwrite(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, snap);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // Query must have been removed already\n return [];\n }\n };\n /**\n * Apply server data to be merged in for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryMerge = function (path, changedChildren, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n var op = new Merge_1.Merge(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, changeTree);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Apply a listen complete for a tagged query\n *\n * @param {!Path} path\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedListenComplete = function (path, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new ListenComplete_1.ListenComplete(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.addEventRegistration = function (query, eventRegistration) {\n var path = query.path;\n var serverCache = null;\n var foundAncestorDefaultView = false;\n // Any covering writes will necessarily be at the root, so really all we need to find is the server cache.\n // Consider optimizing this once there's a better understanding of what actual behavior will be.\n this.syncPointTree_.foreachOnPath(path, function (pathToSyncPoint, sp) {\n var relativePath = Path_1.Path.relativePath(pathToSyncPoint, path);\n serverCache = serverCache || sp.getCompleteServerCache(relativePath);\n foundAncestorDefaultView =\n foundAncestorDefaultView || sp.hasCompleteView();\n });\n var syncPoint = this.syncPointTree_.get(path);\n if (!syncPoint) {\n syncPoint = new SyncPoint_1.SyncPoint();\n this.syncPointTree_ = this.syncPointTree_.set(path, syncPoint);\n }\n else {\n foundAncestorDefaultView =\n foundAncestorDefaultView || syncPoint.hasCompleteView();\n serverCache = serverCache || syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var serverCacheComplete;\n if (serverCache != null) {\n serverCacheComplete = true;\n }\n else {\n serverCacheComplete = false;\n serverCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var subtree = this.syncPointTree_.subtree(path);\n subtree.foreachChild(function (childName, childSyncPoint) {\n var completeCache = childSyncPoint.getCompleteServerCache(Path_1.Path.Empty);\n if (completeCache) {\n serverCache = serverCache.updateImmediateChild(childName, completeCache);\n }\n });\n }\n var viewAlreadyExists = syncPoint.viewExistsForQuery(query);\n if (!viewAlreadyExists && !query.getQueryParams().loadsAllData()) {\n // We need to track a tag for this query\n var queryKey = SyncTree.makeQueryKey_(query);\n util_1.assert(!(queryKey in this.queryToTagMap_), 'View does not exist, but we have a tag');\n var tag = SyncTree.getNextQueryTag_();\n this.queryToTagMap_[queryKey] = tag;\n // Coerce to string to avoid sparse arrays.\n this.tagToQueryMap_['_' + tag] = queryKey;\n }\n var writesCache = this.pendingWriteTree_.childWrites(path);\n var events = syncPoint.addEventRegistration(query, eventRegistration, writesCache, serverCache, serverCacheComplete);\n if (!viewAlreadyExists && !foundAncestorDefaultView) {\n var view /** @type !View */ = syncPoint.viewForQuery(query);\n events = events.concat(this.setupListener_(query, view));\n }\n return events;\n };\n /**\n * Remove event callback(s).\n *\n * If query is the default query, we'll check all queries for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified query/queries.\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, all callbacks are removed.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n SyncTree.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var _this = this;\n // Find the syncPoint first. Then deal with whether or not it has matching listeners\n var path = query.path;\n var maybeSyncPoint = this.syncPointTree_.get(path);\n var cancelEvents = [];\n // A removal on a default query affects all queries at that location. A removal on an indexed query, even one without\n // other query constraints, does *not* affect all queries at that location. So this check must be for 'default', and\n // not loadsAllData().\n if (maybeSyncPoint &&\n (query.queryIdentifier() === 'default' ||\n maybeSyncPoint.viewExistsForQuery(query))) {\n /**\n * @type {{removed: !Array., events: !Array.}}\n */\n var removedAndEvents = maybeSyncPoint.removeEventRegistration(query, eventRegistration, cancelError);\n if (maybeSyncPoint.isEmpty()) {\n this.syncPointTree_ = this.syncPointTree_.remove(path);\n }\n var removed = removedAndEvents.removed;\n cancelEvents = removedAndEvents.events;\n // We may have just removed one of many listeners and can short-circuit this whole process\n // We may also not have removed a default listener, in which case all of the descendant listeners should already be\n // properly set up.\n //\n // Since indexed queries can shadow if they don't have other query constraints, check for loadsAllData(), instead of\n // queryId === 'default'\n var removingDefault = -1 !==\n removed.findIndex(function (query) {\n return query.getQueryParams().loadsAllData();\n });\n var covered = this.syncPointTree_.findOnPath(path, function (relativePath, parentSyncPoint) {\n return parentSyncPoint.hasCompleteView();\n });\n if (removingDefault && !covered) {\n var subtree = this.syncPointTree_.subtree(path);\n // There are potentially child listeners. Determine what if any listens we need to send before executing the\n // removal\n if (!subtree.isEmpty()) {\n // We need to fold over our subtree and collect the listeners to send\n var newViews = this.collectDistinctViewsForSubTree_(subtree);\n // Ok, we've collected all the listens we need. Set them up.\n for (var i = 0; i < newViews.length; ++i) {\n var view = newViews[i], newQuery = view.getQuery();\n var listener = this.createListenerForView_(view);\n this.listenProvider_.startListening(SyncTree.queryForListening_(newQuery), this.tagForQuery_(newQuery), listener.hashFn, listener.onComplete);\n }\n }\n else {\n // There's nothing below us, so nothing we need to start listening on\n }\n }\n // If we removed anything and we're not covered by a higher up listen, we need to stop listening on this query\n // The above block has us covered in terms of making sure we're set up on listens lower in the tree.\n // Also, note that if we have a cancelError, it's already been removed at the provider level.\n if (!covered && removed.length > 0 && !cancelError) {\n // If we removed a default, then we weren't listening on any of the other queries here. Just cancel the one\n // default. Otherwise, we need to iterate through and cancel each individual query\n if (removingDefault) {\n // We don't tag default listeners\n var defaultTag = null;\n this.listenProvider_.stopListening(SyncTree.queryForListening_(query), defaultTag);\n }\n else {\n removed.forEach(function (queryToRemove) {\n var tagToRemove = _this.queryToTagMap_[SyncTree.makeQueryKey_(queryToRemove)];\n _this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToRemove), tagToRemove);\n });\n }\n }\n // Now, clear all of the tags we're tracking for the removed listens\n this.removeTags_(removed);\n }\n else {\n // No-op, this listener must've been already removed\n }\n return cancelEvents;\n };\n /**\n * Returns a complete cache, if we have one, of the data at a particular path. The location must have a listener above\n * it, but as this is only used by transaction code, that should always be the case anyways.\n *\n * Note: this method will *include* hidden writes from transaction with applyLocally set to false.\n * @param {!Path} path The path to the data we want\n * @param {Array.=} writeIdsToExclude A specific set to be excluded\n * @return {?Node}\n */\n SyncTree.prototype.calcCompleteEventCache = function (path, writeIdsToExclude) {\n var includeHiddenSets = true;\n var writeTree = this.pendingWriteTree_;\n var serverCache = this.syncPointTree_.findOnPath(path, function (pathSoFar, syncPoint) {\n var relativePath = Path_1.Path.relativePath(pathSoFar, path);\n var serverCache = syncPoint.getCompleteServerCache(relativePath);\n if (serverCache) {\n return serverCache;\n }\n });\n return writeTree.calcCompleteEventCache(path, serverCache, writeIdsToExclude, includeHiddenSets);\n };\n /**\n * This collapses multiple unfiltered views into a single view, since we only need a single\n * listener for them.\n *\n * @param {!ImmutableTree.} subtree\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.collectDistinctViewsForSubTree_ = function (subtree) {\n return subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (maybeChildSyncPoint && maybeChildSyncPoint.hasCompleteView()) {\n var completeView = maybeChildSyncPoint.getCompleteView();\n return [completeView];\n }\n else {\n // No complete view here, flatten any deeper listens into an array\n var views_1 = [];\n if (maybeChildSyncPoint) {\n views_1 = maybeChildSyncPoint.getQueryViews();\n }\n util_3.forEach(childMap, function (key, childViews) {\n views_1 = views_1.concat(childViews);\n });\n return views_1;\n }\n });\n };\n /**\n * @param {!Array.} queries\n * @private\n */\n SyncTree.prototype.removeTags_ = function (queries) {\n for (var j = 0; j < queries.length; ++j) {\n var removedQuery = queries[j];\n if (!removedQuery.getQueryParams().loadsAllData()) {\n // We should have a tag for this\n var removedQueryKey = SyncTree.makeQueryKey_(removedQuery);\n var removedQueryTag = this.queryToTagMap_[removedQueryKey];\n delete this.queryToTagMap_[removedQueryKey];\n delete this.tagToQueryMap_['_' + removedQueryTag];\n }\n }\n };\n /**\n * Normalizes a query to a query we send the server for listening\n * @param {!Query} query\n * @return {!Query} The normalized query\n * @private\n */\n SyncTree.queryForListening_ = function (query) {\n if (query.getQueryParams().loadsAllData() &&\n !query.getQueryParams().isDefault()) {\n // We treat queries that load all data as default queries\n // Cast is necessary because ref() technically returns Firebase which is actually fb.api.Firebase which inherits\n // from Query\n return /** @type {!Query} */ query.getRef();\n }\n else {\n return query;\n }\n };\n /**\n * For a given new listen, manage the de-duplication of outstanding subscriptions.\n *\n * @param {!Query} query\n * @param {!View} view\n * @return {!Array.} This method can return events to support synchronous data sources\n * @private\n */\n SyncTree.prototype.setupListener_ = function (query, view) {\n var path = query.path;\n var tag = this.tagForQuery_(query);\n var listener = this.createListenerForView_(view);\n var events = this.listenProvider_.startListening(SyncTree.queryForListening_(query), tag, listener.hashFn, listener.onComplete);\n var subtree = this.syncPointTree_.subtree(path);\n // The root of this subtree has our query. We're here because we definitely need to send a listen for that, but we\n // may need to shadow other listens as well.\n if (tag) {\n util_1.assert(!subtree.value.hasCompleteView(), \"If we're adding a query, it shouldn't be shadowed\");\n }\n else {\n // Shadow everything at or below this location, this is a default listener.\n var queriesToStop = subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (!relativePath.isEmpty() &&\n maybeChildSyncPoint &&\n maybeChildSyncPoint.hasCompleteView()) {\n return [maybeChildSyncPoint.getCompleteView().getQuery()];\n }\n else {\n // No default listener here, flatten any deeper queries into an array\n var queries_1 = [];\n if (maybeChildSyncPoint) {\n queries_1 = queries_1.concat(maybeChildSyncPoint.getQueryViews().map(function (view) { return view.getQuery(); }));\n }\n util_3.forEach(childMap, function (key, childQueries) {\n queries_1 = queries_1.concat(childQueries);\n });\n return queries_1;\n }\n });\n for (var i = 0; i < queriesToStop.length; ++i) {\n var queryToStop = queriesToStop[i];\n this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToStop), this.tagForQuery_(queryToStop));\n }\n }\n return events;\n };\n /**\n *\n * @param {!View} view\n * @return {{hashFn: function(), onComplete: function(!string, *)}}\n * @private\n */\n SyncTree.prototype.createListenerForView_ = function (view) {\n var _this = this;\n var query = view.getQuery();\n var tag = this.tagForQuery_(query);\n return {\n hashFn: function () {\n var cache = view.getServerCache() || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return cache.hash();\n },\n onComplete: function (status) {\n if (status === 'ok') {\n if (tag) {\n return _this.applyTaggedListenComplete(query.path, tag);\n }\n else {\n return _this.applyListenComplete(query.path);\n }\n }\n else {\n // If a listen failed, kill all of the listeners here, not just the one that triggered the error.\n // Note that this may need to be scoped to just this listener if we change permissions on filtered children\n var error = util_2.errorForServerCode(status, query);\n return _this.removeEventRegistration(query, \n /*eventRegistration*/ null, error);\n }\n }\n };\n };\n /**\n * Given a query, computes a \"queryKey\" suitable for use in our queryToTagMap_.\n * @private\n * @param {!Query} query\n * @return {string}\n */\n SyncTree.makeQueryKey_ = function (query) {\n return query.path.toString() + '$' + query.queryIdentifier();\n };\n /**\n * Given a queryKey (created by makeQueryKey), parse it back into a path and queryId.\n * @private\n * @param {!string} queryKey\n * @return {{queryId: !string, path: !Path}}\n */\n SyncTree.parseQueryKey_ = function (queryKey) {\n var splitIndex = queryKey.indexOf('$');\n util_1.assert(splitIndex !== -1 && splitIndex < queryKey.length - 1, 'Bad queryKey.');\n return {\n queryId: queryKey.substr(splitIndex + 1),\n path: new Path_1.Path(queryKey.substr(0, splitIndex))\n };\n };\n /**\n * Return the query associated with the given tag, if we have one\n * @param {!number} tag\n * @return {?string}\n * @private\n */\n SyncTree.prototype.queryKeyForTag_ = function (tag) {\n return this.tagToQueryMap_['_' + tag];\n };\n /**\n * Return the tag associated with the given query.\n * @param {!Query} query\n * @return {?number}\n * @private\n */\n SyncTree.prototype.tagForQuery_ = function (query) {\n var queryKey = SyncTree.makeQueryKey_(query);\n return util_3.safeGet(this.queryToTagMap_, queryKey);\n };\n /**\n * Static accessor for query tags.\n * @return {number}\n * @private\n */\n SyncTree.getNextQueryTag_ = function () {\n return SyncTree.nextQueryTag_++;\n };\n /**\n * A helper method to apply tagged operations\n *\n * @param {!Path} queryPath\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyTaggedOperation_ = function (queryPath, operation) {\n var syncPoint = this.syncPointTree_.get(queryPath);\n util_1.assert(syncPoint, \"Missing sync point for query tag that we're tracking\");\n var writesCache = this.pendingWriteTree_.childWrites(queryPath);\n return syncPoint.applyOperation(operation, writesCache, \n /*serverCache=*/ null);\n };\n /**\n * A helper method that visits all descendant and ancestor SyncPoints, applying the operation.\n *\n * NOTES:\n * - Descendant SyncPoints will be visited first (since we raise events depth-first).\n \n * - We call applyOperation() on each SyncPoint passing three things:\n * 1. A version of the Operation that has been made relative to the SyncPoint location.\n * 2. A WriteTreeRef of any writes we have cached at the SyncPoint location.\n * 3. A snapshot Node with cached server data, if we have it.\n \n * - We concatenate all of the events returned by each SyncPoint and return the result.\n *\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyOperationToSyncPoints_ = function (operation) {\n return this.applyOperationHelper_(operation, this.syncPointTree_, \n /*serverCache=*/ null, this.pendingWriteTree_.childWrites(Path_1.Path.Empty));\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n if (operation.path.isEmpty()) {\n return this.applyOperationDescendantsHelper_(operation, syncPointTree, serverCache, writesCache);\n }\n else {\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n var childName = operation.path.getFront();\n var childOperation = operation.operationForChild(childName);\n var childTree = syncPointTree.children.get(childName);\n if (childTree && childOperation) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n events = events.concat(this.applyOperationHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n }\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationDescendantsHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n var _this = this;\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n syncPointTree.children.inorderTraversal(function (childName, childTree) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n var childOperation = operation.operationForChild(childName);\n if (childOperation) {\n events = events.concat(_this.applyOperationDescendantsHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n });\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n };\n /**\n * Static tracker for next query tag.\n * @type {number}\n * @private\n */\n SyncTree.nextQueryTag_ = 1;\n return SyncTree;\n}());\nexports.SyncTree = SyncTree;\n\n//# sourceMappingURL=SyncTree.js.map\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar Operation_1 = __webpack_require__(8);\nvar AckUserWrite = /** @class */ (function () {\n /**\n *\n * @param {!Path} path\n * @param {!ImmutableTree} affectedTree A tree containing true for each affected path. Affected paths can't overlap.\n * @param {!boolean} revert\n */\n function AckUserWrite(\n /**@inheritDoc */ path, \n /**@inheritDoc */ affectedTree, \n /**@inheritDoc */ revert) {\n this.path = path;\n this.affectedTree = affectedTree;\n this.revert = revert;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.ACK_USER_WRITE;\n /** @inheritDoc */\n this.source = Operation_1.OperationSource.User;\n }\n /**\n * @inheritDoc\n */\n AckUserWrite.prototype.operationForChild = function (childName) {\n if (!this.path.isEmpty()) {\n util_1.assert(this.path.getFront() === childName, 'operationForChild called for unrelated child.');\n return new AckUserWrite(this.path.popFront(), this.affectedTree, this.revert);\n }\n else if (this.affectedTree.value != null) {\n util_1.assert(this.affectedTree.children.isEmpty(), 'affectedTree should not have overlapping affected paths.');\n // All child locations are affected as well; just return same operation.\n return this;\n }\n else {\n var childTree = this.affectedTree.subtree(new Path_1.Path(childName));\n return new AckUserWrite(Path_1.Path.Empty, childTree, this.revert);\n }\n };\n return AckUserWrite;\n}());\nexports.AckUserWrite = AckUserWrite;\n\n//# sourceMappingURL=AckUserWrite.js.map\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = __webpack_require__(2);\nvar Operation_1 = __webpack_require__(8);\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @constructor\n * @implements {Operation}\n */\nvar ListenComplete = /** @class */ (function () {\n function ListenComplete(source, path) {\n this.source = source;\n this.path = path;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.LISTEN_COMPLETE;\n }\n ListenComplete.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new ListenComplete(this.source, Path_1.Path.Empty);\n }\n else {\n return new ListenComplete(this.source, this.path.popFront());\n }\n };\n return ListenComplete;\n}());\nexports.ListenComplete = ListenComplete;\n\n//# sourceMappingURL=ListenComplete.js.map\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = __webpack_require__(8);\nvar Overwrite_1 = __webpack_require__(46);\nvar Path_1 = __webpack_require__(2);\nvar util_1 = __webpack_require__(0);\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!ImmutableTree.} children\n * @constructor\n * @implements {Operation}\n */\nvar Merge = /** @class */ (function () {\n function Merge(\n /**@inheritDoc */ source, \n /**@inheritDoc */ path, \n /**@inheritDoc */ children) {\n this.source = source;\n this.path = path;\n this.children = children;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.MERGE;\n }\n /**\n * @inheritDoc\n */\n Merge.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n var childTree = this.children.subtree(new Path_1.Path(childName));\n if (childTree.isEmpty()) {\n // This child is unaffected\n return null;\n }\n else if (childTree.value) {\n // We have a snapshot for the child in question. This becomes an overwrite of the child.\n return new Overwrite_1.Overwrite(this.source, Path_1.Path.Empty, childTree.value);\n }\n else {\n // This is a merge at a deeper level\n return new Merge(this.source, Path_1.Path.Empty, childTree);\n }\n }\n else {\n util_1.assert(this.path.getFront() === childName, \"Can't get a merge for a child not on the path of the operation\");\n return new Merge(this.source, this.path.popFront(), this.children);\n }\n };\n /**\n * @inheritDoc\n */\n Merge.prototype.toString = function () {\n return ('Operation(' +\n this.path +\n ': ' +\n this.source.toString() +\n ' merge: ' +\n this.children.toString() +\n ')');\n };\n return Merge;\n}());\nexports.Merge = Merge;\n\n//# sourceMappingURL=Merge.js.map\n\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = __webpack_require__(24);\nvar ViewProcessor_1 = __webpack_require__(91);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar CacheNode_1 = __webpack_require__(18);\nvar ViewCache_1 = __webpack_require__(48);\nvar EventGenerator_1 = __webpack_require__(94);\nvar util_1 = __webpack_require__(0);\nvar Operation_1 = __webpack_require__(8);\nvar Change_1 = __webpack_require__(9);\nvar PriorityIndex_1 = __webpack_require__(3);\n/**\n * A view represents a specific location and query that has 1 or more event registrations.\n *\n * It does several things:\n * - Maintains the list of event registrations for this location/query.\n * - Maintains a cache of the data visible for this location/query.\n * - Applies new operations (via applyOperation), updates the cache, and based on the event\n * registrations returns the set of events to be raised.\n * @constructor\n */\nvar View = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n * @param {!ViewCache} initialViewCache\n */\n function View(query_, initialViewCache) {\n this.query_ = query_;\n this.eventRegistrations_ = [];\n var params = this.query_.getQueryParams();\n var indexFilter = new IndexedFilter_1.IndexedFilter(params.getIndex());\n var filter = params.getNodeFilter();\n /**\n * @type {ViewProcessor}\n * @private\n */\n this.processor_ = new ViewProcessor_1.ViewProcessor(filter);\n var initialServerCache = initialViewCache.getServerCache();\n var initialEventCache = initialViewCache.getEventCache();\n // Don't filter server node with other filter than index, wait for tagged listen\n var serverSnap = indexFilter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialServerCache.getNode(), null);\n var eventSnap = filter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialEventCache.getNode(), null);\n var newServerCache = new CacheNode_1.CacheNode(serverSnap, initialServerCache.isFullyInitialized(), indexFilter.filtersNodes());\n var newEventCache = new CacheNode_1.CacheNode(eventSnap, initialEventCache.isFullyInitialized(), filter.filtersNodes());\n /**\n * @type {!ViewCache}\n * @private\n */\n this.viewCache_ = new ViewCache_1.ViewCache(newEventCache, newServerCache);\n /**\n * @type {!EventGenerator}\n * @private\n */\n this.eventGenerator_ = new EventGenerator_1.EventGenerator(this.query_);\n }\n /**\n * @return {!Query}\n */\n View.prototype.getQuery = function () {\n return this.query_;\n };\n /**\n * @return {?Node}\n */\n View.prototype.getServerCache = function () {\n return this.viewCache_.getServerCache().getNode();\n };\n /**\n * @param {!Path} path\n * @return {?Node}\n */\n View.prototype.getCompleteServerCache = function (path) {\n var cache = this.viewCache_.getCompleteServerSnap();\n if (cache) {\n // If this isn't a \"loadsAllData\" view, then cache isn't actually a complete cache and\n // we need to see if it contains the child we're interested in.\n if (this.query_.getQueryParams().loadsAllData() ||\n (!path.isEmpty() && !cache.getImmediateChild(path.getFront()).isEmpty())) {\n return cache.getChild(path);\n }\n }\n return null;\n };\n /**\n * @return {boolean}\n */\n View.prototype.isEmpty = function () {\n return this.eventRegistrations_.length === 0;\n };\n /**\n * @param {!EventRegistration} eventRegistration\n */\n View.prototype.addEventRegistration = function (eventRegistration) {\n this.eventRegistrations_.push(eventRegistration);\n };\n /**\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n View.prototype.removeEventRegistration = function (eventRegistration, cancelError) {\n var cancelEvents = [];\n if (cancelError) {\n util_1.assert(eventRegistration == null, 'A cancel should cancel all event registrations.');\n var path_1 = this.query_.path;\n this.eventRegistrations_.forEach(function (registration) {\n cancelError /** @type {!Error} */ = cancelError;\n var maybeEvent = registration.createCancelEvent(cancelError, path_1);\n if (maybeEvent) {\n cancelEvents.push(maybeEvent);\n }\n });\n }\n if (eventRegistration) {\n var remaining = [];\n for (var i = 0; i < this.eventRegistrations_.length; ++i) {\n var existing = this.eventRegistrations_[i];\n if (!existing.matches(eventRegistration)) {\n remaining.push(existing);\n }\n else if (eventRegistration.hasAnyCallback()) {\n // We're removing just this one\n remaining = remaining.concat(this.eventRegistrations_.slice(i + 1));\n break;\n }\n }\n this.eventRegistrations_ = remaining;\n }\n else {\n this.eventRegistrations_ = [];\n }\n return cancelEvents;\n };\n /**\n * Applies the given Operation, updates our cache, and returns the appropriate events.\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @return {!Array.}\n */\n View.prototype.applyOperation = function (operation, writesCache, completeServerCache) {\n if (operation.type === Operation_1.OperationType.MERGE &&\n operation.source.queryId !== null) {\n util_1.assert(this.viewCache_.getCompleteServerSnap(), 'We should always have a full cache before handling merges');\n util_1.assert(this.viewCache_.getCompleteEventSnap(), 'Missing event cache, even though we have a server cache');\n }\n var oldViewCache = this.viewCache_;\n var result = this.processor_.applyOperation(oldViewCache, operation, writesCache, completeServerCache);\n this.processor_.assertIndexed(result.viewCache);\n util_1.assert(result.viewCache.getServerCache().isFullyInitialized() ||\n !oldViewCache.getServerCache().isFullyInitialized(), 'Once a server snap is complete, it should never go back');\n this.viewCache_ = result.viewCache;\n return this.generateEventsForChanges_(result.changes, result.viewCache.getEventCache().getNode(), null);\n };\n /**\n * @param {!EventRegistration} registration\n * @return {!Array.}\n */\n View.prototype.getInitialEvents = function (registration) {\n var eventSnap = this.viewCache_.getEventCache();\n var initialChanges = [];\n if (!eventSnap.getNode().isLeafNode()) {\n var eventNode = eventSnap.getNode();\n eventNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n initialChanges.push(Change_1.Change.childAddedChange(key, childNode));\n });\n }\n if (eventSnap.isFullyInitialized()) {\n initialChanges.push(Change_1.Change.valueChange(eventSnap.getNode()));\n }\n return this.generateEventsForChanges_(initialChanges, eventSnap.getNode(), registration);\n };\n /**\n * @private\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {EventRegistration=} eventRegistration\n * @return {!Array.}\n */\n View.prototype.generateEventsForChanges_ = function (changes, eventCache, eventRegistration) {\n var registrations = eventRegistration\n ? [eventRegistration]\n : this.eventRegistrations_;\n return this.eventGenerator_.generateEventsForChanges(changes, eventCache, registrations);\n };\n return View;\n}());\nexports.View = View;\n\n//# sourceMappingURL=View.js.map\n\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = __webpack_require__(8);\nvar util_1 = __webpack_require__(0);\nvar ChildChangeAccumulator_1 = __webpack_require__(92);\nvar Change_1 = __webpack_require__(9);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar KeyIndex_1 = __webpack_require__(10);\nvar ImmutableTree_1 = __webpack_require__(23);\nvar Path_1 = __webpack_require__(2);\nvar CompleteChildSource_1 = __webpack_require__(93);\n/**\n * @constructor\n * @struct\n */\nvar ProcessorResult = /** @class */ (function () {\n /**\n * @param {!ViewCache} viewCache\n * @param {!Array.} changes\n */\n function ProcessorResult(viewCache, changes) {\n this.viewCache = viewCache;\n this.changes = changes;\n }\n return ProcessorResult;\n}());\nexports.ProcessorResult = ProcessorResult;\n/**\n * @constructor\n */\nvar ViewProcessor = /** @class */ (function () {\n /**\n * @param {!NodeFilter} filter_\n */\n function ViewProcessor(filter_) {\n this.filter_ = filter_;\n }\n /**\n * @param {!ViewCache} viewCache\n */\n ViewProcessor.prototype.assertIndexed = function (viewCache) {\n util_1.assert(viewCache\n .getEventCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Event snap not indexed');\n util_1.assert(viewCache\n .getServerCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Server snap not indexed');\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @return {!ProcessorResult}\n */\n ViewProcessor.prototype.applyOperation = function (oldViewCache, operation, writesCache, completeCache) {\n var accumulator = new ChildChangeAccumulator_1.ChildChangeAccumulator();\n var newViewCache, filterServerNode;\n if (operation.type === Operation_1.OperationType.OVERWRITE) {\n var overwrite = operation;\n if (overwrite.source.fromUser) {\n newViewCache = this.applyUserOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(overwrite.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered and the\n // update is not at the root in which case it is ok (and necessary) to mark the node unfiltered\n // again\n filterServerNode =\n overwrite.source.tagged ||\n (oldViewCache.getServerCache().isFiltered() &&\n !overwrite.path.isEmpty());\n newViewCache = this.applyServerOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.MERGE) {\n var merge = operation;\n if (merge.source.fromUser) {\n newViewCache = this.applyUserMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(merge.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered\n filterServerNode =\n merge.source.tagged || oldViewCache.getServerCache().isFiltered();\n newViewCache = this.applyServerMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.ACK_USER_WRITE) {\n var ackUserWrite = operation;\n if (!ackUserWrite.revert) {\n newViewCache = this.ackUserWrite_(oldViewCache, ackUserWrite.path, ackUserWrite.affectedTree, writesCache, completeCache, accumulator);\n }\n else {\n newViewCache = this.revertUserWrite_(oldViewCache, ackUserWrite.path, writesCache, completeCache, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.LISTEN_COMPLETE) {\n newViewCache = this.listenComplete_(oldViewCache, operation.path, writesCache, accumulator);\n }\n else {\n throw util_1.assertionError('Unknown operation type: ' + operation.type);\n }\n var changes = accumulator.getChanges();\n ViewProcessor.maybeAddValueEvent_(oldViewCache, newViewCache, changes);\n return new ProcessorResult(newViewCache, changes);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!ViewCache} newViewCache\n * @param {!Array.} accumulator\n * @private\n */\n ViewProcessor.maybeAddValueEvent_ = function (oldViewCache, newViewCache, accumulator) {\n var eventSnap = newViewCache.getEventCache();\n if (eventSnap.isFullyInitialized()) {\n var isLeafOrEmpty = eventSnap.getNode().isLeafNode() || eventSnap.getNode().isEmpty();\n var oldCompleteSnap = oldViewCache.getCompleteEventSnap();\n if (accumulator.length > 0 ||\n !oldViewCache.getEventCache().isFullyInitialized() ||\n (isLeafOrEmpty &&\n !eventSnap\n .getNode()\n .equals(/** @type {!Node} */ (oldCompleteSnap))) ||\n !eventSnap\n .getNode()\n .getPriority()\n .equals(oldCompleteSnap.getPriority())) {\n accumulator.push(Change_1.Change.valueChange(\n /** @type {!Node} */ newViewCache.getCompleteEventSnap()));\n }\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} changePath\n * @param {!WriteTreeRef} writesCache\n * @param {!CompleteChildSource} source\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.generateEventCacheAfterServerEvent_ = function (viewCache, changePath, writesCache, source, accumulator) {\n var oldEventSnap = viewCache.getEventCache();\n if (writesCache.shadowingWrite(changePath) != null) {\n // we have a shadowing write, ignore changes\n return viewCache;\n }\n else {\n var newEventCache = void 0, serverNode = void 0;\n if (changePath.isEmpty()) {\n // TODO: figure out how this plays with \"sliding ack windows\"\n util_1.assert(viewCache.getServerCache().isFullyInitialized(), 'If change path is empty, we must have complete server data');\n if (viewCache.getServerCache().isFiltered()) {\n // We need to special case this, because we need to only apply writes to complete children, or\n // we might end up raising events for incomplete children. If the server data is filtered deep\n // writes cannot be guaranteed to be complete\n var serverCache = viewCache.getCompleteServerSnap();\n var completeChildren = serverCache instanceof ChildrenNode_1.ChildrenNode\n ? serverCache\n : ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var completeEventChildren = writesCache.calcCompleteEventChildren(completeChildren);\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeEventChildren, accumulator);\n }\n else {\n var completeNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeNode, accumulator);\n }\n }\n else {\n var childKey = changePath.getFront();\n if (childKey == '.priority') {\n util_1.assert(changePath.getLength() == 1, \"Can't have a priority with additional path components\");\n var oldEventNode = oldEventSnap.getNode();\n serverNode = viewCache.getServerCache().getNode();\n // we might have overwrites for this priority\n var updatedPriority = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventNode, serverNode);\n if (updatedPriority != null) {\n newEventCache = this.filter_.updatePriority(oldEventNode, updatedPriority);\n }\n else {\n // priority didn't change, keep old node\n newEventCache = oldEventSnap.getNode();\n }\n }\n else {\n var childChangePath = changePath.popFront();\n // update child\n var newEventChild = void 0;\n if (oldEventSnap.isCompleteForChild(childKey)) {\n serverNode = viewCache.getServerCache().getNode();\n var eventChildUpdate = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventSnap.getNode(), serverNode);\n if (eventChildUpdate != null) {\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey)\n .updateChild(childChangePath, eventChildUpdate);\n }\n else {\n // Nothing changed, just keep the old child\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey);\n }\n }\n else {\n newEventChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n }\n if (newEventChild != null) {\n newEventCache = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newEventChild, childChangePath, source, accumulator);\n }\n else {\n // no complete child available or no change\n newEventCache = oldEventSnap.getNode();\n }\n }\n }\n return viewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized() || changePath.isEmpty(), this.filter_.filtersNodes());\n }\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, filterServerNode, accumulator) {\n var oldServerSnap = oldViewCache.getServerCache();\n var newServerCache;\n var serverFilter = filterServerNode\n ? this.filter_\n : this.filter_.getIndexedFilter();\n if (changePath.isEmpty()) {\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), changedSnap, null);\n }\n else if (serverFilter.filtersNodes() && !oldServerSnap.isFiltered()) {\n // we want to filter the server node, but we didn't filter the server node yet, so simulate a full update\n var newServerNode = oldServerSnap\n .getNode()\n .updateChild(changePath, changedSnap);\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), newServerNode, null);\n }\n else {\n var childKey = changePath.getFront();\n if (!oldServerSnap.isCompleteForPath(changePath) &&\n changePath.getLength() > 1) {\n // We don't update incomplete nodes with updates intended for other listeners\n return oldViewCache;\n }\n var childChangePath = changePath.popFront();\n var childNode = oldServerSnap.getNode().getImmediateChild(childKey);\n var newChildNode = childNode.updateChild(childChangePath, changedSnap);\n if (childKey == '.priority') {\n newServerCache = serverFilter.updatePriority(oldServerSnap.getNode(), newChildNode);\n }\n else {\n newServerCache = serverFilter.updateChild(oldServerSnap.getNode(), childKey, newChildNode, childChangePath, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, null);\n }\n }\n var newViewCache = oldViewCache.updateServerSnap(newServerCache, oldServerSnap.isFullyInitialized() || changePath.isEmpty(), serverFilter.filtersNodes());\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, newViewCache, completeCache);\n return this.generateEventCacheAfterServerEvent_(newViewCache, changePath, writesCache, source, accumulator);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, accumulator) {\n var oldEventSnap = oldViewCache.getEventCache();\n var newViewCache, newEventCache;\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, oldViewCache, completeCache);\n if (changePath.isEmpty()) {\n newEventCache = this.filter_.updateFullNode(oldViewCache.getEventCache().getNode(), changedSnap, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, true, this.filter_.filtersNodes());\n }\n else {\n var childKey = changePath.getFront();\n if (childKey === '.priority') {\n newEventCache = this.filter_.updatePriority(oldViewCache.getEventCache().getNode(), changedSnap);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized(), oldEventSnap.isFiltered());\n }\n else {\n var childChangePath = changePath.popFront();\n var oldChild = oldEventSnap.getNode().getImmediateChild(childKey);\n var newChild = void 0;\n if (childChangePath.isEmpty()) {\n // Child overwrite, we can replace the child\n newChild = changedSnap;\n }\n else {\n var childNode = source.getCompleteChild(childKey);\n if (childNode != null) {\n if (childChangePath.getBack() === '.priority' &&\n childNode.getChild(childChangePath.parent()).isEmpty()) {\n // This is a priority update on an empty node. If this node exists on the server, the\n // server will send down the priority in the update, so ignore for now\n newChild = childNode;\n }\n else {\n newChild = childNode.updateChild(childChangePath, changedSnap);\n }\n }\n else {\n // There is no complete child node available\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n }\n if (!oldChild.equals(newChild)) {\n var newEventSnap = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newChild, childChangePath, source, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventSnap, oldEventSnap.isFullyInitialized(), this.filter_.filtersNodes());\n }\n else {\n newViewCache = oldViewCache;\n }\n }\n }\n return newViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {string} childKey\n * @return {boolean}\n * @private\n */\n ViewProcessor.cacheHasChild_ = function (viewCache, childKey) {\n return viewCache.getEventCache().isCompleteForChild(childKey);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, accumulator) {\n var _this = this;\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (!ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!Node} node\n * @param {ImmutableTree.} merge\n * @return {!Node}\n * @private\n */\n ViewProcessor.prototype.applyMerge_ = function (node, merge) {\n merge.foreach(function (relativePath, childNode) {\n node = node.updateChild(relativePath, childNode);\n });\n return node;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, filterServerNode, accumulator) {\n var _this = this;\n // If we don't have a cache yet, this merge was intended for a previously listen in the same location. Ignore it and\n // wait for the complete data update coming soon.\n if (viewCache\n .getServerCache()\n .getNode()\n .isEmpty() &&\n !viewCache.getServerCache().isFullyInitialized()) {\n return viewCache;\n }\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n var viewMergeTree;\n if (path.isEmpty()) {\n viewMergeTree = changedChildren;\n }\n else {\n viewMergeTree = ImmutableTree_1.ImmutableTree.Empty.setTree(path, changedChildren);\n }\n var serverNode = viewCache.getServerCache().getNode();\n viewMergeTree.children.inorderTraversal(function (childKey, childTree) {\n if (serverNode.hasChild(childKey)) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n viewMergeTree.children.inorderTraversal(function (childKey, childMergeTree) {\n var isUnknownDeepMerge = !viewCache.getServerCache().isCompleteForChild(childKey) &&\n childMergeTree.value == null;\n if (!serverNode.hasChild(childKey) && !isUnknownDeepMerge) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childMergeTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} ackPath\n * @param {!ImmutableTree} affectedTree\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.ackUserWrite_ = function (viewCache, ackPath, affectedTree, writesCache, completeCache, accumulator) {\n if (writesCache.shadowingWrite(ackPath) != null) {\n return viewCache;\n }\n // Only filter server node if it is currently filtered\n var filterServerNode = viewCache.getServerCache().isFiltered();\n // Essentially we'll just get our existing server cache for the affected paths and re-apply it as a server update\n // now that it won't be shadowed.\n var serverCache = viewCache.getServerCache();\n if (affectedTree.value != null) {\n // This is an overwrite.\n if ((ackPath.isEmpty() && serverCache.isFullyInitialized()) ||\n serverCache.isCompleteForPath(ackPath)) {\n return this.applyServerOverwrite_(viewCache, ackPath, serverCache.getNode().getChild(ackPath), writesCache, completeCache, filterServerNode, accumulator);\n }\n else if (ackPath.isEmpty()) {\n // This is a goofy edge case where we are acking data at this location but don't have full data. We\n // should just re-apply whatever we have in our cache as a merge.\n var changedChildren_1 = ImmutableTree_1.ImmutableTree.Empty;\n serverCache.getNode().forEachChild(KeyIndex_1.KEY_INDEX, function (name, node) {\n changedChildren_1 = changedChildren_1.set(new Path_1.Path(name), node);\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_1, writesCache, completeCache, filterServerNode, accumulator);\n }\n else {\n return viewCache;\n }\n }\n else {\n // This is a merge.\n var changedChildren_2 = ImmutableTree_1.ImmutableTree.Empty;\n affectedTree.foreach(function (mergePath, value) {\n var serverCachePath = ackPath.child(mergePath);\n if (serverCache.isCompleteForPath(serverCachePath)) {\n changedChildren_2 = changedChildren_2.set(mergePath, serverCache.getNode().getChild(serverCachePath));\n }\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_2, writesCache, completeCache, filterServerNode, accumulator);\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.listenComplete_ = function (viewCache, path, writesCache, accumulator) {\n var oldServerNode = viewCache.getServerCache();\n var newViewCache = viewCache.updateServerSnap(oldServerNode.getNode(), oldServerNode.isFullyInitialized() || path.isEmpty(), oldServerNode.isFiltered());\n return this.generateEventCacheAfterServerEvent_(newViewCache, path, writesCache, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, accumulator);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.revertUserWrite_ = function (viewCache, path, writesCache, completeServerCache, accumulator) {\n var complete;\n if (writesCache.shadowingWrite(path) != null) {\n return viewCache;\n }\n else {\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, viewCache, completeServerCache);\n var oldEventCache = viewCache.getEventCache().getNode();\n var newEventCache = void 0;\n if (path.isEmpty() || path.getFront() === '.priority') {\n var newNode = void 0;\n if (viewCache.getServerCache().isFullyInitialized()) {\n newNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n }\n else {\n var serverChildren = viewCache.getServerCache().getNode();\n util_1.assert(serverChildren instanceof ChildrenNode_1.ChildrenNode, 'serverChildren would be complete if leaf node');\n newNode = writesCache.calcCompleteEventChildren(serverChildren);\n }\n newNode = newNode;\n newEventCache = this.filter_.updateFullNode(oldEventCache, newNode, accumulator);\n }\n else {\n var childKey = path.getFront();\n var newChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n if (newChild == null &&\n viewCache.getServerCache().isCompleteForChild(childKey)) {\n newChild = oldEventCache.getImmediateChild(childKey);\n }\n if (newChild != null) {\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, newChild, path.popFront(), source, accumulator);\n }\n else if (viewCache\n .getEventCache()\n .getNode()\n .hasChild(childKey)) {\n // No complete child available, delete the existing one, if any\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE, path.popFront(), source, accumulator);\n }\n else {\n newEventCache = oldEventCache;\n }\n if (newEventCache.isEmpty() &&\n viewCache.getServerCache().isFullyInitialized()) {\n // We might have reverted all child writes. Maybe the old event was a leaf node\n complete = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n if (complete.isLeafNode()) {\n newEventCache = this.filter_.updateFullNode(newEventCache, complete, accumulator);\n }\n }\n }\n complete =\n viewCache.getServerCache().isFullyInitialized() ||\n writesCache.shadowingWrite(Path_1.Path.Empty) != null;\n return viewCache.updateEventSnap(newEventCache, complete, this.filter_.filtersNodes());\n }\n };\n return ViewProcessor;\n}());\nexports.ViewProcessor = ViewProcessor;\n\n//# sourceMappingURL=ViewProcessor.js.map\n\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Change_1 = __webpack_require__(9);\nvar util_2 = __webpack_require__(0);\n/**\n * @constructor\n */\nvar ChildChangeAccumulator = /** @class */ (function () {\n function ChildChangeAccumulator() {\n this.changeMap_ = {};\n }\n /**\n * @param {!Change} change\n */\n ChildChangeAccumulator.prototype.trackChildChange = function (change) {\n var type = change.type;\n var childKey /** @type {!string} */ = change.childName;\n util_2.assert(type == Change_1.Change.CHILD_ADDED ||\n type == Change_1.Change.CHILD_CHANGED ||\n type == Change_1.Change.CHILD_REMOVED, 'Only child changes supported for tracking');\n util_2.assert(childKey !== '.priority', 'Only non-priority child changes can be tracked.');\n var oldChange = util_1.safeGet(this.changeMap_, childKey);\n if (oldChange) {\n var oldType = oldChange.type;\n if (type == Change_1.Change.CHILD_ADDED && oldType == Change_1.Change.CHILD_REMOVED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n delete this.changeMap_[childKey];\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childRemovedChange(childKey, oldChange.oldSnap);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n this.changeMap_[childKey] = Change_1.Change.childAddedChange(childKey, change.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.oldSnap);\n }\n else {\n throw util_2.assertionError('Illegal combination of changes: ' +\n change +\n ' occurred after ' +\n oldChange);\n }\n }\n else {\n this.changeMap_[childKey] = change;\n }\n };\n /**\n * @return {!Array.}\n */\n ChildChangeAccumulator.prototype.getChanges = function () {\n return util_1.getValues(this.changeMap_);\n };\n return ChildChangeAccumulator;\n}());\nexports.ChildChangeAccumulator = ChildChangeAccumulator;\n\n//# sourceMappingURL=ChildChangeAccumulator.js.map\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = __webpack_require__(18);\n/**\n * An implementation of CompleteChildSource that never returns any additional children\n *\n * @private\n * @constructor\n * @implements CompleteChildSource\n */\nvar NoCompleteChildSource_ = /** @class */ (function () {\n function NoCompleteChildSource_() {\n }\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getCompleteChild = function (childKey) {\n return null;\n };\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getChildAfterChild = function (index, child, reverse) {\n return null;\n };\n return NoCompleteChildSource_;\n}());\nexports.NoCompleteChildSource_ = NoCompleteChildSource_;\n/**\n * Singleton instance.\n * @const\n * @type {!CompleteChildSource}\n */\nexports.NO_COMPLETE_CHILD_SOURCE = new NoCompleteChildSource_();\n/**\n * An implementation of CompleteChildSource that uses a WriteTree in addition to any other server data or\n * old event caches available to calculate complete children.\n *\n *\n * @implements CompleteChildSource\n */\nvar WriteTreeCompleteChildSource = /** @class */ (function () {\n /**\n * @param {!WriteTreeRef} writes_\n * @param {!ViewCache} viewCache_\n * @param {?Node} optCompleteServerCache_\n */\n function WriteTreeCompleteChildSource(writes_, viewCache_, optCompleteServerCache_) {\n if (optCompleteServerCache_ === void 0) { optCompleteServerCache_ = null; }\n this.writes_ = writes_;\n this.viewCache_ = viewCache_;\n this.optCompleteServerCache_ = optCompleteServerCache_;\n }\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getCompleteChild = function (childKey) {\n var node = this.viewCache_.getEventCache();\n if (node.isCompleteForChild(childKey)) {\n return node.getNode().getImmediateChild(childKey);\n }\n else {\n var serverNode = this.optCompleteServerCache_ != null\n ? new CacheNode_1.CacheNode(this.optCompleteServerCache_, true, false)\n : this.viewCache_.getServerCache();\n return this.writes_.calcCompleteChild(childKey, serverNode);\n }\n };\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getChildAfterChild = function (index, child, reverse) {\n var completeServerData = this.optCompleteServerCache_ != null\n ? this.optCompleteServerCache_\n : this.viewCache_.getCompleteServerSnap();\n var nodes = this.writes_.calcIndexedSlice(completeServerData, child, 1, reverse, index);\n if (nodes.length === 0) {\n return null;\n }\n else {\n return nodes[0];\n }\n };\n return WriteTreeCompleteChildSource;\n}());\nexports.WriteTreeCompleteChildSource = WriteTreeCompleteChildSource;\n\n//# sourceMappingURL=CompleteChildSource.js.map\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = __webpack_require__(5);\nvar Change_1 = __webpack_require__(9);\nvar util_1 = __webpack_require__(0);\n/**\n * An EventGenerator is used to convert \"raw\" changes (Change) as computed by the\n * CacheDiffer into actual events (Event) that can be raised. See generateEventsForChanges()\n * for details.\n *\n * @constructor\n */\nvar EventGenerator = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n */\n function EventGenerator(query_) {\n this.query_ = query_;\n /**\n * @private\n * @type {!Index}\n */\n this.index_ = this.query_.getQueryParams().getIndex();\n }\n /**\n * Given a set of raw changes (no moved events and prevName not specified yet), and a set of\n * EventRegistrations that should be notified of these changes, generate the actual events to be raised.\n *\n * Notes:\n * - child_moved events will be synthesized at this time for any child_changed events that affect\n * our index.\n * - prevName will be calculated based on the index ordering.\n *\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {!Array.} eventRegistrations\n * @return {!Array.}\n */\n EventGenerator.prototype.generateEventsForChanges = function (changes, eventCache, eventRegistrations) {\n var _this = this;\n var events = [];\n var moves = [];\n changes.forEach(function (change) {\n if (change.type === Change_1.Change.CHILD_CHANGED &&\n _this.index_.indexedValueChanged(change.oldSnap, change.snapshotNode)) {\n moves.push(Change_1.Change.childMovedChange(change.childName, change.snapshotNode));\n }\n });\n this.generateEventsForType_(events, Change_1.Change.CHILD_REMOVED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_ADDED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_MOVED, moves, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_CHANGED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.VALUE, changes, eventRegistrations, eventCache);\n return events;\n };\n /**\n * Given changes of a single change type, generate the corresponding events.\n *\n * @param {!Array.} events\n * @param {!string} eventType\n * @param {!Array.} changes\n * @param {!Array.} registrations\n * @param {!Node} eventCache\n * @private\n */\n EventGenerator.prototype.generateEventsForType_ = function (events, eventType, changes, registrations, eventCache) {\n var _this = this;\n var filteredChanges = changes.filter(function (change) { return change.type === eventType; });\n filteredChanges.sort(this.compareChanges_.bind(this));\n filteredChanges.forEach(function (change) {\n var materializedChange = _this.materializeSingleChange_(change, eventCache);\n registrations.forEach(function (registration) {\n if (registration.respondsTo(change.type)) {\n events.push(registration.createEvent(materializedChange, _this.query_));\n }\n });\n });\n };\n /**\n * @param {!Change} change\n * @param {!Node} eventCache\n * @return {!Change}\n * @private\n */\n EventGenerator.prototype.materializeSingleChange_ = function (change, eventCache) {\n if (change.type === 'value' || change.type === 'child_removed') {\n return change;\n }\n else {\n change.prevName = eventCache.getPredecessorChildName(\n /** @type {!string} */\n change.childName, change.snapshotNode, this.index_);\n return change;\n }\n };\n /**\n * @param {!Change} a\n * @param {!Change} b\n * @return {number}\n * @private\n */\n EventGenerator.prototype.compareChanges_ = function (a, b) {\n if (a.childName == null || b.childName == null) {\n throw util_1.assertionError('Should only compare child_ events.');\n }\n var aWrapped = new Node_1.NamedNode(a.childName, a.snapshotNode);\n var bWrapped = new Node_1.NamedNode(b.childName, b.snapshotNode);\n return this.index_.compare(aWrapped, bWrapped);\n };\n return EventGenerator;\n}());\nexports.EventGenerator = EventGenerator;\n\n//# sourceMappingURL=EventGenerator.js.map\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar CompoundWrite_1 = __webpack_require__(96);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar ChildrenNode_1 = __webpack_require__(4);\n/**\n * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them\n * with underlying server data (to create \"event cache\" data). Pending writes are added with addOverwrite()\n * and addMerge(), and removed with removeWrite().\n *\n * @constructor\n */\nvar WriteTree = /** @class */ (function () {\n function WriteTree() {\n /**\n * A tree tracking the result of applying all visible writes. This does not include transactions with\n * applyLocally=false or writes that are completely shadowed by other writes.\n *\n * @type {!CompoundWrite}\n * @private\n */\n this.visibleWrites_ = CompoundWrite_1.CompoundWrite.Empty;\n /**\n * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary\n * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also\n * used by transactions).\n *\n * @type {!Array.}\n * @private\n */\n this.allWrites_ = [];\n this.lastWriteId_ = -1;\n }\n /**\n * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.\n *\n * @param {!Path} path\n * @return {!WriteTreeRef}\n */\n WriteTree.prototype.childWrites = function (path) {\n return new WriteTreeRef(path, this);\n };\n /**\n * Record a new overwrite from user code.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} writeId\n * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches\n */\n WriteTree.prototype.addOverwrite = function (path, snap, writeId, visible) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older write on top of newer ones');\n if (visible === undefined) {\n visible = true;\n }\n this.allWrites_.push({\n path: path,\n snap: snap,\n writeId: writeId,\n visible: visible\n });\n if (visible) {\n this.visibleWrites_ = this.visibleWrites_.addWrite(path, snap);\n }\n this.lastWriteId_ = writeId;\n };\n /**\n * Record a new merge from user code.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n */\n WriteTree.prototype.addMerge = function (path, changedChildren, writeId) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older merge on top of newer ones');\n this.allWrites_.push({\n path: path,\n children: changedChildren,\n writeId: writeId,\n visible: true\n });\n this.visibleWrites_ = this.visibleWrites_.addWrites(path, changedChildren);\n this.lastWriteId_ = writeId;\n };\n /**\n * @param {!number} writeId\n * @return {?WriteRecord}\n */\n WriteTree.prototype.getWrite = function (writeId) {\n for (var i = 0; i < this.allWrites_.length; i++) {\n var record = this.allWrites_[i];\n if (record.writeId === writeId) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates\n * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.\n *\n * @param {!number} writeId\n * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise\n * events as a result).\n */\n WriteTree.prototype.removeWrite = function (writeId) {\n // Note: disabling this check. It could be a transaction that preempted another transaction, and thus was applied\n // out of order.\n //const validClear = revert || this.allWrites_.length === 0 || writeId <= this.allWrites_[0].writeId;\n //assert(validClear, \"Either we don't have this write, or it's the first one in the queue\");\n var _this = this;\n var idx = this.allWrites_.findIndex(function (s) {\n return s.writeId === writeId;\n });\n util_2.assert(idx >= 0, 'removeWrite called with nonexistent writeId.');\n var writeToRemove = this.allWrites_[idx];\n this.allWrites_.splice(idx, 1);\n var removedWriteWasVisible = writeToRemove.visible;\n var removedWriteOverlapsWithOtherWrites = false;\n var i = this.allWrites_.length - 1;\n while (removedWriteWasVisible && i >= 0) {\n var currentWrite = this.allWrites_[i];\n if (currentWrite.visible) {\n if (i >= idx &&\n this.recordContainsPath_(currentWrite, writeToRemove.path)) {\n // The removed write was completely shadowed by a subsequent write.\n removedWriteWasVisible = false;\n }\n else if (writeToRemove.path.contains(currentWrite.path)) {\n // Either we're covering some writes or they're covering part of us (depending on which came first).\n removedWriteOverlapsWithOtherWrites = true;\n }\n }\n i--;\n }\n if (!removedWriteWasVisible) {\n return false;\n }\n else if (removedWriteOverlapsWithOtherWrites) {\n // There's some shadowing going on. Just rebuild the visible writes from scratch.\n this.resetTree_();\n return true;\n }\n else {\n // There's no shadowing. We can safely just remove the write(s) from visibleWrites.\n if (writeToRemove.snap) {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(writeToRemove.path);\n }\n else {\n var children = writeToRemove.children;\n util_1.forEach(children, function (childName) {\n _this.visibleWrites_ = _this.visibleWrites_.removeWrite(writeToRemove.path.child(childName));\n });\n }\n return true;\n }\n };\n /**\n * Return a complete snapshot for the given path if there's visible write data at that path, else null.\n * No server data is considered.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.getCompleteWriteData = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden\n * writes), attempt to calculate a complete snapshot for the given path\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude An optional set to be excluded\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteEventCache = function (treePath, completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n if (!writeIdsToExclude && !includeHiddenWrites) {\n var shadowingNode = this.visibleWrites_.getCompleteNode(treePath);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n var subMerge = this.visibleWrites_.childCompoundWrite(treePath);\n if (subMerge.isEmpty()) {\n return completeServerCache;\n }\n else if (completeServerCache == null &&\n !subMerge.hasCompleteWrite(Path_1.Path.Empty)) {\n // We wouldn't have a complete snapshot, since there's no underlying data and no complete shadow\n return null;\n }\n else {\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return subMerge.apply(layeredCache);\n }\n }\n }\n else {\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n if (!includeHiddenWrites && merge.isEmpty()) {\n return completeServerCache;\n }\n else {\n // If the server cache is null, and we don't have a complete cache, we need to return null\n if (!includeHiddenWrites &&\n completeServerCache == null &&\n !merge.hasCompleteWrite(Path_1.Path.Empty)) {\n return null;\n }\n else {\n var filter = function (write) {\n return ((write.visible || includeHiddenWrites) &&\n (!writeIdsToExclude ||\n !~writeIdsToExclude.indexOf(write.writeId)) &&\n (write.path.contains(treePath) || treePath.contains(write.path)));\n };\n var mergeAtPath = WriteTree.layerTree_(this.allWrites_, filter, treePath);\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return mergeAtPath.apply(layeredCache);\n }\n }\n }\n };\n /**\n * With optional, underlying server data, attempt to return a children node of children that we have complete data for.\n * Used when creating new views, to pre-fill their complete event children snapshot.\n *\n * @param {!Path} treePath\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTree.prototype.calcCompleteEventChildren = function (treePath, completeServerChildren) {\n var completeChildren = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var topLevelSet = this.visibleWrites_.getCompleteNode(treePath);\n if (topLevelSet) {\n if (!topLevelSet.isLeafNode()) {\n // we're shadowing everything. Return the children.\n topLevelSet.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childSnap) {\n completeChildren = completeChildren.updateImmediateChild(childName, childSnap);\n });\n }\n return completeChildren;\n }\n else if (completeServerChildren) {\n // Layer any children we have on top of this\n // We know we don't have a top-level set, so just enumerate existing children\n var merge_1 = this.visibleWrites_.childCompoundWrite(treePath);\n completeServerChildren.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var node = merge_1\n .childCompoundWrite(new Path_1.Path(childName))\n .apply(childNode);\n completeChildren = completeChildren.updateImmediateChild(childName, node);\n });\n // Add any complete children we have from the set\n merge_1.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n else {\n // We don't have anything to layer on top of. Layer on any children we have\n // Note that we can return an empty snap if we have a defined delete\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n merge.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n };\n /**\n * Given that the underlying server data has updated, determine what, if anything, needs to be\n * applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events\n *\n * Either existingEventSnap or existingServerSnap must exist\n *\n * @param {!Path} treePath\n * @param {!Path} childPath\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcEventCacheAfterServerOverwrite = function (treePath, childPath, existingEventSnap, existingServerSnap) {\n util_2.assert(existingEventSnap || existingServerSnap, 'Either existingEventSnap or existingServerSnap must exist');\n var path = treePath.child(childPath);\n if (this.visibleWrites_.hasCompleteWrite(path)) {\n // At this point we can probably guarantee that we're in case 2, meaning no events\n // May need to check visibility while doing the findRootMostValueAndPath call\n return null;\n }\n else {\n // No complete shadowing. We're either partially shadowing or not shadowing at all.\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n if (childMerge.isEmpty()) {\n // We're not shadowing at all. Case 1\n return existingServerSnap.getChild(childPath);\n }\n else {\n // This could be more efficient if the serverNode + updates doesn't change the eventSnap\n // However this is tricky to find out, since user updates don't necessary change the server\n // snap, e.g. priority updates on empty nodes, or deep deletes. Another special case is if the server\n // adds nodes, but doesn't change any existing writes. It is therefore not enough to\n // only check if the updates change the serverNode.\n // Maybe check if the merge tree contains these special cases and only do a full overwrite in that case?\n return childMerge.apply(existingServerSnap.getChild(childPath));\n }\n }\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!Path} treePath\n * @param {!string} childKey\n * @param {!CacheNode} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteChild = function (treePath, childKey, existingServerSnap) {\n var path = treePath.child(childKey);\n var shadowingNode = this.visibleWrites_.getCompleteNode(path);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n if (existingServerSnap.isCompleteForChild(childKey)) {\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n return childMerge.apply(existingServerSnap.getNode().getImmediateChild(childKey));\n }\n else {\n return null;\n }\n }\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.shadowingWrite = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window.\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTree.prototype.calcIndexedSlice = function (treePath, completeServerData, startPost, count, reverse, index) {\n var toIterate;\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n var shadowingNode = merge.getCompleteNode(Path_1.Path.Empty);\n if (shadowingNode != null) {\n toIterate = shadowingNode;\n }\n else if (completeServerData != null) {\n toIterate = merge.apply(completeServerData);\n }\n else {\n // no children to iterate on\n return [];\n }\n toIterate = toIterate.withIndex(index);\n if (!toIterate.isEmpty() && !toIterate.isLeafNode()) {\n var nodes = [];\n var cmp = index.getCompare();\n var iter = reverse\n ? toIterate.getReverseIteratorFrom(startPost, index)\n : toIterate.getIteratorFrom(startPost, index);\n var next = iter.getNext();\n while (next && nodes.length < count) {\n if (cmp(next, startPost) !== 0) {\n nodes.push(next);\n }\n next = iter.getNext();\n }\n return nodes;\n }\n else {\n return [];\n }\n };\n /**\n * @param {!WriteRecord} writeRecord\n * @param {!Path} path\n * @return {boolean}\n * @private\n */\n WriteTree.prototype.recordContainsPath_ = function (writeRecord, path) {\n if (writeRecord.snap) {\n return writeRecord.path.contains(path);\n }\n else {\n // findKey can return undefined, so use !! to coerce to boolean\n return !!util_1.findKey(writeRecord.children, function (childSnap, childName) {\n return writeRecord.path.child(childName).contains(path);\n });\n }\n };\n /**\n * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots\n * @private\n */\n WriteTree.prototype.resetTree_ = function () {\n this.visibleWrites_ = WriteTree.layerTree_(this.allWrites_, WriteTree.DefaultFilter_, Path_1.Path.Empty);\n if (this.allWrites_.length > 0) {\n this.lastWriteId_ = this.allWrites_[this.allWrites_.length - 1].writeId;\n }\n else {\n this.lastWriteId_ = -1;\n }\n };\n /**\n * The default filter used when constructing the tree. Keep everything that's visible.\n *\n * @param {!WriteRecord} write\n * @return {boolean}\n * @private\n */\n WriteTree.DefaultFilter_ = function (write) {\n return write.visible;\n };\n /**\n * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of\n * event data at that path.\n *\n * @param {!Array.} writes\n * @param {!function(!WriteRecord):boolean} filter\n * @param {!Path} treeRoot\n * @return {!CompoundWrite}\n * @private\n */\n WriteTree.layerTree_ = function (writes, filter, treeRoot) {\n var compoundWrite = CompoundWrite_1.CompoundWrite.Empty;\n for (var i = 0; i < writes.length; ++i) {\n var write = writes[i];\n // Theory, a later set will either:\n // a) abort a relevant transaction, so no need to worry about excluding it from calculating that transaction\n // b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction\n if (filter(write)) {\n var writePath = write.path;\n var relativePath = void 0;\n if (write.snap) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrite(relativePath, write.snap);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, write.snap.getChild(relativePath));\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else if (write.children) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrites(relativePath, write.children);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n if (relativePath.isEmpty()) {\n compoundWrite = compoundWrite.addWrites(Path_1.Path.Empty, write.children);\n }\n else {\n var child = util_1.safeGet(write.children, relativePath.getFront());\n if (child) {\n // There exists a child in this node that matches the root path\n var deepNode = child.getChild(relativePath.popFront());\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, deepNode);\n }\n }\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else {\n throw util_2.assertionError('WriteRecord should have .snap or .children');\n }\n }\n }\n return compoundWrite;\n };\n return WriteTree;\n}());\nexports.WriteTree = WriteTree;\n/**\n * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods\n * just proxy to the underlying WriteTree.\n *\n * @constructor\n */\nvar WriteTreeRef = /** @class */ (function () {\n /**\n * @param {!Path} path\n * @param {!WriteTree} writeTree\n */\n function WriteTreeRef(path, writeTree) {\n this.treePath_ = path;\n this.writeTree_ = writeTree;\n }\n /**\n * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used\n * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node\n * can lead to a more expensive calculation.\n *\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude Optional writes to exclude.\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteEventCache = function (completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n return this.writeTree_.calcCompleteEventCache(this.treePath_, completeServerCache, writeIdsToExclude, includeHiddenWrites);\n };\n /**\n * If possible, returns a children node containing all of the complete children we have data for. The returned data is a\n * mix of the given server data and write data.\n *\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTreeRef.prototype.calcCompleteEventChildren = function (completeServerChildren) {\n return this.writeTree_.calcCompleteEventChildren(this.treePath_, completeServerChildren);\n };\n /**\n * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,\n * if anything, needs to be applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events should be raised\n *\n * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert\n *\n * @param {!Path} path\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcEventCacheAfterServerOverwrite = function (path, existingEventSnap, existingServerSnap) {\n return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_, path, existingEventSnap, existingServerSnap);\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTreeRef.prototype.shadowingWrite = function (path) {\n return this.writeTree_.shadowingWrite(this.treePath_.child(path));\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window\n *\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTreeRef.prototype.calcIndexedSlice = function (completeServerData, startPost, count, reverse, index) {\n return this.writeTree_.calcIndexedSlice(this.treePath_, completeServerData, startPost, count, reverse, index);\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!string} childKey\n * @param {!CacheNode} existingServerCache\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteChild = function (childKey, existingServerCache) {\n return this.writeTree_.calcCompleteChild(this.treePath_, childKey, existingServerCache);\n };\n /**\n * Return a WriteTreeRef for a child.\n *\n * @param {string} childName\n * @return {!WriteTreeRef}\n */\n WriteTreeRef.prototype.child = function (childName) {\n return new WriteTreeRef(this.treePath_.child(childName), this.writeTree_);\n };\n return WriteTreeRef;\n}());\nexports.WriteTreeRef = WriteTreeRef;\n\n//# sourceMappingURL=WriteTree.js.map\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ImmutableTree_1 = __webpack_require__(23);\nvar Path_1 = __webpack_require__(2);\nvar util_1 = __webpack_require__(0);\nvar Node_1 = __webpack_require__(5);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar util_2 = __webpack_require__(0);\n/**\n * This class holds a collection of writes that can be applied to nodes in unison. It abstracts away the logic with\n * dealing with priority writes and multiple nested writes. At any given path there is only allowed to be one write\n * modifying that path. Any write to an existing path or shadowing an existing path will modify that existing write\n * to reflect the write added.\n *\n * @constructor\n * @param {!ImmutableTree.} writeTree\n */\nvar CompoundWrite = /** @class */ (function () {\n function CompoundWrite(writeTree_) {\n this.writeTree_ = writeTree_;\n }\n /**\n * @param {!Path} path\n * @param {!Node} node\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrite = function (path, node) {\n if (path.isEmpty()) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(node));\n }\n else {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n var rootMostPath = rootmost.path;\n var value = rootmost.value;\n var relativePath = Path_1.Path.relativePath(rootMostPath, path);\n value = value.updateChild(relativePath, node);\n return new CompoundWrite(this.writeTree_.set(rootMostPath, value));\n }\n else {\n var subtree = new ImmutableTree_1.ImmutableTree(node);\n var newWriteTree = this.writeTree_.setTree(path, subtree);\n return new CompoundWrite(newWriteTree);\n }\n }\n };\n /**\n * @param {!Path} path\n * @param {!Object.} updates\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrites = function (path, updates) {\n var newWrite = this;\n util_1.forEach(updates, function (childKey, node) {\n newWrite = newWrite.addWrite(path.child(childKey), node);\n });\n return newWrite;\n };\n /**\n * Will remove a write at the given path and deeper paths. This will not modify a write at a higher\n * location, which must be removed by calling this method with that path.\n *\n * @param {!Path} path The path at which a write and all deeper writes should be removed\n * @return {!CompoundWrite} The new CompoundWrite with the removed path\n */\n CompoundWrite.prototype.removeWrite = function (path) {\n if (path.isEmpty()) {\n return CompoundWrite.Empty;\n }\n else {\n var newWriteTree = this.writeTree_.setTree(path, ImmutableTree_1.ImmutableTree.Empty);\n return new CompoundWrite(newWriteTree);\n }\n };\n /**\n * Returns whether this CompoundWrite will fully overwrite a node at a given location and can therefore be\n * considered \"complete\".\n *\n * @param {!Path} path The path to check for\n * @return {boolean} Whether there is a complete write at that path\n */\n CompoundWrite.prototype.hasCompleteWrite = function (path) {\n return this.getCompleteNode(path) != null;\n };\n /**\n * Returns a node for a path if and only if the node is a \"complete\" overwrite at that path. This will not aggregate\n * writes from deeper paths, but will return child nodes from a more shallow path.\n *\n * @param {!Path} path The path to get a complete write\n * @return {?Node} The node if complete at that path, or null otherwise.\n */\n CompoundWrite.prototype.getCompleteNode = function (path) {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n return this.writeTree_\n .get(rootmost.path)\n .getChild(Path_1.Path.relativePath(rootmost.path, path));\n }\n else {\n return null;\n }\n };\n /**\n * Returns all children that are guaranteed to be a complete overwrite.\n *\n * @return {!Array.} A list of all complete children.\n */\n CompoundWrite.prototype.getCompleteChildren = function () {\n var children = [];\n var node = this.writeTree_.value;\n if (node != null) {\n // If it's a leaf node, it has no children; so nothing to do.\n if (!node.isLeafNode()) {\n node.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n children.push(new Node_1.NamedNode(childName, childNode));\n });\n }\n }\n else {\n this.writeTree_.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value != null) {\n children.push(new Node_1.NamedNode(childName, childTree.value));\n }\n });\n }\n return children;\n };\n /**\n * @param {!Path} path\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.childCompoundWrite = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else {\n var shadowingNode = this.getCompleteNode(path);\n if (shadowingNode != null) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(shadowingNode));\n }\n else {\n return new CompoundWrite(this.writeTree_.subtree(path));\n }\n }\n };\n /**\n * Returns true if this CompoundWrite is empty and therefore does not modify any nodes.\n * @return {boolean} Whether this CompoundWrite is empty\n */\n CompoundWrite.prototype.isEmpty = function () {\n return this.writeTree_.isEmpty();\n };\n /**\n * Applies this CompoundWrite to a node. The node is returned with all writes from this CompoundWrite applied to the\n * node\n * @param {!Node} node The node to apply this CompoundWrite to\n * @return {!Node} The node with all writes applied\n */\n CompoundWrite.prototype.apply = function (node) {\n return CompoundWrite.applySubtreeWrite_(Path_1.Path.Empty, this.writeTree_, node);\n };\n /**\n * @type {!CompoundWrite}\n */\n CompoundWrite.Empty = new CompoundWrite(new ImmutableTree_1.ImmutableTree(null));\n /**\n * @param {!Path} relativePath\n * @param {!ImmutableTree.} writeTree\n * @param {!Node} node\n * @return {!Node}\n * @private\n */\n CompoundWrite.applySubtreeWrite_ = function (relativePath, writeTree, node) {\n if (writeTree.value != null) {\n // Since there a write is always a leaf, we're done here\n return node.updateChild(relativePath, writeTree.value);\n }\n else {\n var priorityWrite_1 = null;\n writeTree.children.inorderTraversal(function (childKey, childTree) {\n if (childKey === '.priority') {\n // Apply priorities at the end so we don't update priorities for either empty nodes or forget\n // to apply priorities to empty nodes that are later filled\n util_2.assert(childTree.value !== null, 'Priority writes must always be leaf nodes');\n priorityWrite_1 = childTree.value;\n }\n else {\n node = CompoundWrite.applySubtreeWrite_(relativePath.child(childKey), childTree, node);\n }\n });\n // If there was a priority write, we only apply it if the node is not empty\n if (!node.getChild(relativePath).isEmpty() && priorityWrite_1 !== null) {\n node = node.updateChild(relativePath.child('.priority'), priorityWrite_1);\n }\n return node;\n }\n };\n return CompoundWrite;\n}());\nexports.CompoundWrite = CompoundWrite;\n\n//# sourceMappingURL=CompoundWrite.js.map\n\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = __webpack_require__(4);\n/**\n * Mutable object which basically just stores a reference to the \"latest\" immutable snapshot.\n *\n * @constructor\n */\nvar SnapshotHolder = /** @class */ (function () {\n function SnapshotHolder() {\n this.rootNode_ = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n SnapshotHolder.prototype.getNode = function (path) {\n return this.rootNode_.getChild(path);\n };\n SnapshotHolder.prototype.updateSnapshot = function (path, newSnapshotNode) {\n this.rootNode_ = this.rootNode_.updateChild(path, newSnapshotNode);\n };\n return SnapshotHolder;\n}());\nexports.SnapshotHolder = SnapshotHolder;\n\n//# sourceMappingURL=SnapshotHolder.js.map\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\n/**\n * Abstraction around FirebaseApp's token fetching capabilities.\n */\nvar AuthTokenProvider = /** @class */ (function () {\n /**\n * @param {!FirebaseApp} app_\n */\n function AuthTokenProvider(app_) {\n this.app_ = app_;\n }\n /**\n * @param {boolean} forceRefresh\n * @return {!Promise}\n */\n AuthTokenProvider.prototype.getToken = function (forceRefresh) {\n return this.app_['INTERNAL']['getToken'](forceRefresh).then(null, \n // .catch\n function (error) {\n // TODO: Need to figure out all the cases this is raised and whether\n // this makes sense.\n if (error && error.code === 'auth/token-not-initialized') {\n util_1.log('Got auth/token-not-initialized error. Treating as null token.');\n return null;\n }\n else {\n return Promise.reject(error);\n }\n });\n };\n AuthTokenProvider.prototype.addTokenChangeListener = function (listener) {\n // TODO: We might want to wrap the listener and call it with no args to\n // avoid a leaky abstraction, but that makes removing the listener harder.\n this.app_['INTERNAL']['addAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.removeTokenChangeListener = function (listener) {\n this.app_['INTERNAL']['removeAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.notifyForInvalidToken = function () {\n var errorMessage = 'Provided authentication credentials for the app named \"' +\n this.app_.name +\n '\" are invalid. This usually indicates your app was not ' +\n 'initialized correctly. ';\n if ('credential' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"credential\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else if ('serviceAccount' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"serviceAccount\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else {\n errorMessage +=\n 'Make sure the \"apiKey\" and \"databaseURL\" properties provided to ' +\n 'initializeApp() match the values provided for your app at ' +\n 'https://console.firebase.google.com/.';\n }\n util_1.warn(errorMessage);\n };\n return AuthTokenProvider;\n}());\nexports.AuthTokenProvider = AuthTokenProvider;\n\n//# sourceMappingURL=AuthTokenProvider.js.map\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\n/**\n * Tracks a collection of stats.\n *\n * @constructor\n */\nvar StatsCollection = /** @class */ (function () {\n function StatsCollection() {\n this.counters_ = {};\n }\n StatsCollection.prototype.incrementCounter = function (name, amount) {\n if (amount === void 0) { amount = 1; }\n if (!util_2.contains(this.counters_, name))\n this.counters_[name] = 0;\n this.counters_[name] += amount;\n };\n StatsCollection.prototype.get = function () {\n return util_1.deepCopy(this.counters_);\n };\n return StatsCollection;\n}());\nexports.StatsCollection = StatsCollection;\n\n//# sourceMappingURL=StatsCollection.js.map\n\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar StatsListener_1 = __webpack_require__(49);\n// Assuming some apps may have a short amount of time on page, and a bulk of firebase operations probably\n// happen on page load, we try to report our first set of stats pretty quickly, but we wait at least 10\n// seconds to try to ensure the Firebase connection is established / settled.\nvar FIRST_STATS_MIN_TIME = 10 * 1000;\nvar FIRST_STATS_MAX_TIME = 30 * 1000;\n// We'll continue to report stats on average every 5 minutes.\nvar REPORT_STATS_INTERVAL = 5 * 60 * 1000;\n/**\n * @constructor\n */\nvar StatsReporter = /** @class */ (function () {\n /**\n * @param collection\n * @param server_\n */\n function StatsReporter(collection, server_) {\n this.server_ = server_;\n this.statsToReport_ = {};\n this.statsListener_ = new StatsListener_1.StatsListener(collection);\n var timeout = FIRST_STATS_MIN_TIME +\n (FIRST_STATS_MAX_TIME - FIRST_STATS_MIN_TIME) * Math.random();\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(timeout));\n }\n StatsReporter.prototype.includeStat = function (stat) {\n this.statsToReport_[stat] = true;\n };\n StatsReporter.prototype.reportStats_ = function () {\n var _this = this;\n var stats = this.statsListener_.get();\n var reportedStats = {};\n var haveStatsToReport = false;\n util_1.forEach(stats, function (stat, value) {\n if (value > 0 && util_1.contains(_this.statsToReport_, stat)) {\n reportedStats[stat] = value;\n haveStatsToReport = true;\n }\n });\n if (haveStatsToReport) {\n this.server_.reportStats(reportedStats);\n }\n // queue our next run.\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(Math.random() * 2 * REPORT_STATS_INTERVAL));\n };\n return StatsReporter;\n}());\nexports.StatsReporter = StatsReporter;\n\n//# sourceMappingURL=StatsReporter.js.map\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\n/**\n * The event queue serves a few purposes:\n * 1. It ensures we maintain event order in the face of event callbacks doing operations that result in more\n * events being queued.\n * 2. raiseQueuedEvents() handles being called reentrantly nicely. That is, if in the course of raising events,\n * raiseQueuedEvents() is called again, the \"inner\" call will pick up raising events where the \"outer\" call\n * left off, ensuring that the events are still raised synchronously and in order.\n * 3. You can use raiseEventsAtPath and raiseEventsForChangedPath to ensure only relevant previously-queued\n * events are raised synchronously.\n *\n * NOTE: This can all go away if/when we move to async events.\n *\n * @constructor\n */\nvar EventQueue = /** @class */ (function () {\n function EventQueue() {\n /**\n * @private\n * @type {!Array.}\n */\n this.eventLists_ = [];\n /**\n * Tracks recursion depth of raiseQueuedEvents_, for debugging purposes.\n * @private\n * @type {!number}\n */\n this.recursionDepth_ = 0;\n }\n /**\n * @param {!Array.} eventDataList The new events to queue.\n */\n EventQueue.prototype.queueEvents = function (eventDataList) {\n // We group events by path, storing them in a single EventList, to make it easier to skip over them quickly.\n var currList = null;\n for (var i = 0; i < eventDataList.length; i++) {\n var eventData = eventDataList[i];\n var eventPath = eventData.getPath();\n if (currList !== null && !eventPath.equals(currList.getPath())) {\n this.eventLists_.push(currList);\n currList = null;\n }\n if (currList === null) {\n currList = new EventList(eventPath);\n }\n currList.add(eventData);\n }\n if (currList) {\n this.eventLists_.push(currList);\n }\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones)\n * for the specified path.\n *\n * It is assumed that the new events are all for the specified path.\n *\n * @param {!Path} path The path to raise events for.\n * @param {!Array.} eventDataList The new events to raise.\n */\n EventQueue.prototype.raiseEventsAtPath = function (path, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.equals(path);\n });\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones) for\n * locations related to the specified change path (i.e. all ancestors and descendants).\n *\n * It is assumed that the new events are all related (ancestor or descendant) to the specified path.\n *\n * @param {!Path} changedPath The path to raise events for.\n * @param {!Array.} eventDataList The events to raise\n */\n EventQueue.prototype.raiseEventsForChangedPath = function (changedPath, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.contains(changedPath) || changedPath.contains(eventPath);\n });\n };\n /**\n * @param {!function(!Path):boolean} predicate\n * @private\n */\n EventQueue.prototype.raiseQueuedEventsMatchingPredicate_ = function (predicate) {\n this.recursionDepth_++;\n var sentAll = true;\n for (var i = 0; i < this.eventLists_.length; i++) {\n var eventList = this.eventLists_[i];\n if (eventList) {\n var eventPath = eventList.getPath();\n if (predicate(eventPath)) {\n this.eventLists_[i].raise();\n this.eventLists_[i] = null;\n }\n else {\n sentAll = false;\n }\n }\n }\n if (sentAll) {\n this.eventLists_ = [];\n }\n this.recursionDepth_--;\n };\n return EventQueue;\n}());\nexports.EventQueue = EventQueue;\n/**\n * @param {!Path} path\n * @constructor\n */\nvar EventList = /** @class */ (function () {\n function EventList(path_) {\n this.path_ = path_;\n /**\n * @type {!Array.}\n * @private\n */\n this.events_ = [];\n }\n /**\n * @param {!Event} eventData\n */\n EventList.prototype.add = function (eventData) {\n this.events_.push(eventData);\n };\n /**\n * Iterates through the list and raises each event\n */\n EventList.prototype.raise = function () {\n for (var i = 0; i < this.events_.length; i++) {\n var eventData = this.events_[i];\n if (eventData !== null) {\n this.events_[i] = null;\n var eventFn = eventData.getEventRunner();\n if (util_1.logger) {\n util_1.log('event: ' + eventData.toString());\n }\n util_1.exceptionGuard(eventFn);\n }\n }\n };\n /**\n * @return {!Path}\n */\n EventList.prototype.getPath = function () {\n return this.path_;\n };\n return EventList;\n}());\nexports.EventList = EventList;\n\n//# sourceMappingURL=EventQueue.js.map\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EventEmitter_1 = __webpack_require__(51);\nvar util_1 = __webpack_require__(0);\n/**\n * @extends {EventEmitter}\n */\nvar VisibilityMonitor = /** @class */ (function (_super) {\n __extends(VisibilityMonitor, _super);\n function VisibilityMonitor() {\n var _this = _super.call(this, ['visible']) || this;\n var hidden;\n var visibilityChange;\n if (typeof document !== 'undefined' &&\n typeof document.addEventListener !== 'undefined') {\n if (typeof document['hidden'] !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n visibilityChange = 'visibilitychange';\n hidden = 'hidden';\n }\n else if (typeof document['mozHidden'] !== 'undefined') {\n visibilityChange = 'mozvisibilitychange';\n hidden = 'mozHidden';\n }\n else if (typeof document['msHidden'] !== 'undefined') {\n visibilityChange = 'msvisibilitychange';\n hidden = 'msHidden';\n }\n else if (typeof document['webkitHidden'] !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange';\n hidden = 'webkitHidden';\n }\n }\n // Initially, we always assume we are visible. This ensures that in browsers\n // without page visibility support or in cases where we are never visible\n // (e.g. chrome extension), we act as if we are visible, i.e. don't delay\n // reconnects\n _this.visible_ = true;\n if (visibilityChange) {\n document.addEventListener(visibilityChange, function () {\n var visible = !document[hidden];\n if (visible !== _this.visible_) {\n _this.visible_ = visible;\n _this.trigger('visible', visible);\n }\n }, false);\n }\n return _this;\n }\n VisibilityMonitor.getInstance = function () {\n return new VisibilityMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n VisibilityMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'visible', 'Unknown event type: ' + eventType);\n return [this.visible_];\n };\n return VisibilityMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.VisibilityMonitor = VisibilityMonitor;\n\n//# sourceMappingURL=VisibilityMonitor.js.map\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar EventEmitter_1 = __webpack_require__(51);\nvar util_2 = __webpack_require__(0);\n/**\n * Monitors online state (as reported by window.online/offline events).\n *\n * The expectation is that this could have many false positives (thinks we are online\n * when we're not), but no false negatives. So we can safely use it to determine when\n * we definitely cannot reach the internet.\n *\n * @extends {EventEmitter}\n */\nvar OnlineMonitor = /** @class */ (function (_super) {\n __extends(OnlineMonitor, _super);\n function OnlineMonitor() {\n var _this = _super.call(this, ['online']) || this;\n _this.online_ = true;\n // We've had repeated complaints that Cordova apps can get stuck \"offline\", e.g.\n // https://forum.ionicframework.com/t/firebase-connection-is-lost-and-never-come-back/43810\n // It would seem that the 'online' event does not always fire consistently. So we disable it\n // for Cordova.\n if (typeof window !== 'undefined' &&\n typeof window.addEventListener !== 'undefined' &&\n !util_2.isMobileCordova()) {\n window.addEventListener('online', function () {\n if (!_this.online_) {\n _this.online_ = true;\n _this.trigger('online', true);\n }\n }, false);\n window.addEventListener('offline', function () {\n if (_this.online_) {\n _this.online_ = false;\n _this.trigger('online', false);\n }\n }, false);\n }\n return _this;\n }\n OnlineMonitor.getInstance = function () {\n return new OnlineMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n OnlineMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'online', 'Unknown event type: ' + eventType);\n return [this.online_];\n };\n /**\n * @return {boolean}\n */\n OnlineMonitor.prototype.currentlyOnline = function () {\n return this.online_;\n };\n return OnlineMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.OnlineMonitor = OnlineMonitor;\n\n//# sourceMappingURL=OnlineMonitor.js.map\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BrowserPollConnection_1 = __webpack_require__(53);\nvar WebSocketConnection_1 = __webpack_require__(54);\nvar util_1 = __webpack_require__(1);\n/**\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\n * lifecycle.\n *\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\n * they are available.\n * @constructor\n */\nvar TransportManager = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\n */\n function TransportManager(repoInfo) {\n this.initTransports_(repoInfo);\n }\n Object.defineProperty(TransportManager, \"ALL_TRANSPORTS\", {\n /**\n * @const\n * @type {!Array.}\n */\n get: function () {\n return [BrowserPollConnection_1.BrowserPollConnection, WebSocketConnection_1.WebSocketConnection];\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {!RepoInfo} repoInfo\n * @private\n */\n TransportManager.prototype.initTransports_ = function (repoInfo) {\n var isWebSocketsAvailable = WebSocketConnection_1.WebSocketConnection && WebSocketConnection_1.WebSocketConnection['isAvailable']();\n var isSkipPollConnection = isWebSocketsAvailable && !WebSocketConnection_1.WebSocketConnection.previouslyFailed();\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable)\n util_1.warn(\"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\");\n isSkipPollConnection = true;\n }\n if (isSkipPollConnection) {\n this.transports_ = [WebSocketConnection_1.WebSocketConnection];\n }\n else {\n var transports_1 = (this.transports_ = []);\n util_1.each(TransportManager.ALL_TRANSPORTS, function (i, transport) {\n if (transport && transport['isAvailable']()) {\n transports_1.push(transport);\n }\n });\n }\n };\n /**\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\n * initial transport to use\n */\n TransportManager.prototype.initialTransport = function () {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n }\n else {\n throw new Error('No transports available');\n }\n };\n /**\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\n * transport, or null\n */\n TransportManager.prototype.upgradeTransport = function () {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n }\n else {\n return null;\n }\n };\n return TransportManager;\n}());\nexports.TransportManager = TransportManager;\n\n//# sourceMappingURL=TransportManager.js.map\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\n/**\n * This class ensures the packets from the server arrive in order\n * This class takes data from the server and ensures it gets passed into the callbacks in order.\n * @constructor\n */\nvar PacketReceiver = /** @class */ (function () {\n /**\n * @param onMessage_\n */\n function PacketReceiver(onMessage_) {\n this.onMessage_ = onMessage_;\n this.pendingResponses = [];\n this.currentResponseNum = 0;\n this.closeAfterResponse = -1;\n this.onClose = null;\n }\n PacketReceiver.prototype.closeAfter = function (responseNum, callback) {\n this.closeAfterResponse = responseNum;\n this.onClose = callback;\n if (this.closeAfterResponse < this.currentResponseNum) {\n this.onClose();\n this.onClose = null;\n }\n };\n /**\n * Each message from the server comes with a response number, and an array of data. The responseNumber\n * allows us to ensure that we process them in the right order, since we can't be guaranteed that all\n * browsers will respond in the same order as the requests we sent\n * @param {number} requestNum\n * @param {Array} data\n */\n PacketReceiver.prototype.handleResponse = function (requestNum, data) {\n var _this = this;\n this.pendingResponses[requestNum] = data;\n var _loop_1 = function () {\n var toProcess = this_1.pendingResponses[this_1.currentResponseNum];\n delete this_1.pendingResponses[this_1.currentResponseNum];\n var _loop_2 = function (i) {\n if (toProcess[i]) {\n util_1.exceptionGuard(function () {\n _this.onMessage_(toProcess[i]);\n });\n }\n };\n for (var i = 0; i < toProcess.length; ++i) {\n _loop_2(i);\n }\n if (this_1.currentResponseNum === this_1.closeAfterResponse) {\n if (this_1.onClose) {\n this_1.onClose();\n this_1.onClose = null;\n }\n return \"break\";\n }\n this_1.currentResponseNum++;\n };\n var this_1 = this;\n while (this.pendingResponses[this.currentResponseNum]) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n };\n return PacketReceiver;\n}());\nexports.PacketReceiver = PacketReceiver;\n\n//# sourceMappingURL=PacketReceiver.js.map\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar util_3 = __webpack_require__(0);\nvar util_4 = __webpack_require__(0);\nvar util_5 = __webpack_require__(0);\nvar ServerActions_1 = __webpack_require__(55);\n/**\n * An implementation of ServerActions that communicates with the server via REST requests.\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\n * persistent connection (using WebSockets or long-polling)\n */\nvar ReadonlyRestClient = /** @class */ (function (_super) {\n __extends(ReadonlyRestClient, _super);\n /**\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param {AuthTokenProvider} authTokenProvider_\n * @implements {ServerActions}\n */\n function ReadonlyRestClient(repoInfo_, onDataUpdate_, authTokenProvider_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n /** @private {function(...[*])} */\n _this.log_ = util_2.logWrapper('p:rest:');\n /**\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\n * that's been removed. :-/\n *\n * @private {!Object.}\n */\n _this.listens_ = {};\n return _this;\n }\n ReadonlyRestClient.prototype.reportStats = function (stats) {\n throw new Error('Method not implemented.');\n };\n /**\n * @param {!Query} query\n * @param {?number=} tag\n * @return {string}\n * @private\n */\n ReadonlyRestClient.getListenId_ = function (query, tag) {\n if (tag !== undefined) {\n return 'tag$' + tag;\n }\n else {\n util_1.assert(query.getQueryParams().isDefault(), \"should have a tag if it's not a default query.\");\n return query.path.toString();\n }\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var _this = this;\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + query.queryIdentifier());\n // Mark this listener so we can tell if it's removed.\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n var thisListen = {};\n this.listens_[listenId] = thisListen;\n var queryStringParamaters = query\n .getQueryParams()\n .toRestQueryStringParameters();\n this.restRequest_(pathString + '.json', queryStringParamaters, function (error, result) {\n var data = result;\n if (error === 404) {\n data = null;\n error = null;\n }\n if (error === null) {\n _this.onDataUpdate_(pathString, data, /*isMerge=*/ false, tag);\n }\n if (util_4.safeGet(_this.listens_, listenId) === thisListen) {\n var status_1;\n if (!error) {\n status_1 = 'ok';\n }\n else if (error == 401) {\n status_1 = 'permission_denied';\n }\n else {\n status_1 = 'rest_error:' + error;\n }\n onComplete(status_1, null);\n }\n });\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.unlisten = function (query, tag) {\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.refreshAuthToken = function (token) {\n // no-op since we just always call getToken.\n };\n /**\n * Performs a REST request to the given path, with the provided query string parameters,\n * and any auth credentials we have.\n *\n * @param {!string} pathString\n * @param {!Object.} queryStringParameters\n * @param {?function(?number, *=)} callback\n * @private\n */\n ReadonlyRestClient.prototype.restRequest_ = function (pathString, queryStringParameters, callback) {\n var _this = this;\n if (queryStringParameters === void 0) { queryStringParameters = {}; }\n queryStringParameters['format'] = 'export';\n this.authTokenProvider_\n .getToken(/*forceRefresh=*/ false)\n .then(function (authTokenData) {\n var authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n var url = (_this.repoInfo_.secure ? 'https://' : 'http://') +\n _this.repoInfo_.host +\n pathString +\n '?' +\n util_5.querystring(queryStringParameters);\n _this.log_('Sending REST request for ' + url);\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (callback && xhr.readyState === 4) {\n _this.log_('REST Response for ' + url + ' received. status:', xhr.status, 'response:', xhr.responseText);\n var res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = util_3.jsonEval(xhr.responseText);\n }\n catch (e) {\n util_2.warn('Failed to parse JSON response for ' +\n url +\n ': ' +\n xhr.responseText);\n }\n callback(null, res);\n }\n else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n util_2.warn('Got unsuccessful REST response for ' +\n url +\n ' Status: ' +\n xhr.status);\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n xhr.open('GET', url, /*asynchronous=*/ true);\n xhr.send();\n });\n };\n return ReadonlyRestClient;\n}(ServerActions_1.ServerActions));\nexports.ReadonlyRestClient = ReadonlyRestClient;\n\n//# sourceMappingURL=ReadonlyRestClient.js.map\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar KeyIndex_1 = __webpack_require__(10);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar ValueIndex_1 = __webpack_require__(38);\nvar PathIndex_1 = __webpack_require__(42);\nvar IndexedFilter_1 = __webpack_require__(24);\nvar LimitedFilter_1 = __webpack_require__(108);\nvar RangedFilter_1 = __webpack_require__(56);\nvar util_3 = __webpack_require__(0);\n/**\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\n * user-facing API level, so it is not done here.\n * @constructor\n */\nvar QueryParams = /** @class */ (function () {\n function QueryParams() {\n this.limitSet_ = false;\n this.startSet_ = false;\n this.startNameSet_ = false;\n this.endSet_ = false;\n this.endNameSet_ = false;\n this.limit_ = 0;\n this.viewFrom_ = '';\n this.indexStartValue_ = null;\n this.indexStartName_ = '';\n this.indexEndValue_ = null;\n this.indexEndName_ = '';\n this.index_ = PriorityIndex_1.PRIORITY_INDEX;\n }\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasStart = function () {\n return this.startSet_;\n };\n /**\n * @return {boolean} True if it would return from left.\n */\n QueryParams.prototype.isViewFromLeft = function () {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n }\n else {\n return (this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT);\n }\n };\n /**\n * Only valid to call if hasStart() returns true\n * @return {*}\n */\n QueryParams.prototype.getIndexStartValue = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n };\n /**\n * Only valid to call if hasStart() returns true.\n * Returns the starting key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexStartName = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n }\n else {\n return util_2.MIN_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasEnd = function () {\n return this.endSet_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * @return {*}\n */\n QueryParams.prototype.getIndexEndValue = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * Returns the end key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexEndName = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n }\n else {\n return util_2.MAX_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasLimit = function () {\n return this.limitSet_;\n };\n /**\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\n */\n QueryParams.prototype.hasAnchoredLimit = function () {\n return this.limitSet_ && this.viewFrom_ !== '';\n };\n /**\n * Only valid to call if hasLimit() returns true\n * @return {!number}\n */\n QueryParams.prototype.getLimit = function () {\n util_1.assert(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n };\n /**\n * @return {!Index}\n */\n QueryParams.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @return {!QueryParams}\n * @private\n */\n QueryParams.prototype.copy_ = function () {\n var copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limit = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToFirst = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToLast = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.startAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n }\n else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.endAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n }\n else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n };\n /**\n * @param {!Index} index\n * @return {!QueryParams}\n */\n QueryParams.prototype.orderBy = function (index) {\n var newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n };\n /**\n * @return {!Object}\n */\n QueryParams.prototype.getQueryObject = function () {\n var WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n var obj = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n var viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n }\n else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PriorityIndex_1.PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.loadsAllData = function () {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.isDefault = function () {\n return this.loadsAllData() && this.index_ == PriorityIndex_1.PRIORITY_INDEX;\n };\n /**\n * @return {!NodeFilter}\n */\n QueryParams.prototype.getNodeFilter = function () {\n if (this.loadsAllData()) {\n return new IndexedFilter_1.IndexedFilter(this.getIndex());\n }\n else if (this.hasLimit()) {\n return new LimitedFilter_1.LimitedFilter(this);\n }\n else {\n return new RangedFilter_1.RangedFilter(this);\n }\n };\n /**\n * Returns a set of REST query string parameters representing this query.\n *\n * @return {!Object.} query string parameters\n */\n QueryParams.prototype.toRestQueryStringParameters = function () {\n var REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n var qs = {};\n if (this.isDefault()) {\n return qs;\n }\n var orderBy;\n if (this.index_ === PriorityIndex_1.PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n }\n else if (this.index_ === ValueIndex_1.VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n }\n else if (this.index_ === KeyIndex_1.KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n }\n else {\n util_1.assert(this.index_ instanceof PathIndex_1.PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = util_3.stringify(orderBy);\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = util_3.stringify(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + util_3.stringify(this.indexStartName_);\n }\n }\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = util_3.stringify(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + util_3.stringify(this.indexEndName_);\n }\n }\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n }\n else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n return qs;\n };\n /**\n * Wire Protocol Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n /**\n * REST Query Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n /**\n * Default, empty query parameters\n * @type {!QueryParams}\n * @const\n */\n QueryParams.DEFAULT = new QueryParams();\n return QueryParams;\n}());\nexports.QueryParams = QueryParams;\n\n//# sourceMappingURL=QueryParams.js.map\n\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RangedFilter_1 = __webpack_require__(56);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar Node_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(0);\nvar Change_1 = __webpack_require__(9);\n/**\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar LimitedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function LimitedFilter(params) {\n this.rangedFilter_ = new RangedFilter_1.RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.rangedFilter_.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n }\n else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_\n .getIndexedFilter()\n .updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n }\n else {\n return this.fullLimitUpdateChild_(snap, key, newChild, source, optChangeAccumulator);\n }\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n var filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n }\n else {\n if (this.limit_ * 2 < newSnap.numChildren() &&\n newSnap.isIndexed(this.index_)) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n var iterator = void 0;\n if (this.reverse_) {\n iterator = newSnap.getReverseIteratorFrom(this.rangedFilter_.getEndPost(), this.index_);\n }\n else {\n iterator = newSnap.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_);\n }\n var count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n var next = iterator.getNext();\n var inRange = void 0;\n if (this.reverse_) {\n inRange =\n this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n }\n else {\n inRange =\n this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n }\n else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n }\n else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var startPost = void 0;\n var endPost = void 0;\n var cmp = void 0;\n var iterator = void 0;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n var indexCompare_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCompare_1(b, a); };\n }\n else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n var count = 0;\n var foundStartPost = false;\n while (iterator.hasNext()) {\n var next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n var inRange = foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n }\n else {\n filtered = filtered.updateImmediateChild(next.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n }\n }\n }\n return this.rangedFilter_\n .getIndexedFilter()\n .updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndexedFilter = function () {\n return this.rangedFilter_.getIndexedFilter();\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!Node} snap\n * @param {string} childKey\n * @param {!Node} childSnap\n * @param {!CompleteChildSource} source\n * @param {?ChildChangeAccumulator} changeAccumulator\n * @return {!Node}\n * @private\n */\n LimitedFilter.prototype.fullLimitUpdateChild_ = function (snap, childKey, childSnap, source, changeAccumulator) {\n // TODO: rename all cache stuff etc to general snap terminology\n var cmp;\n if (this.reverse_) {\n var indexCmp_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCmp_1(b, a); };\n }\n else {\n cmp = this.index_.getCompare();\n }\n var oldEventCache = snap;\n util_1.assert(oldEventCache.numChildren() == this.limit_, '');\n var newChildNamedNode = new Node_1.NamedNode(childKey, childSnap);\n var windowBoundary = this.reverse_\n ? oldEventCache.getFirstChild(this.index_)\n : oldEventCache.getLastChild(this.index_);\n var inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n var oldChildSnap = oldEventCache.getImmediateChild(childKey);\n var nextChild = source.getChildAfterChild(this.index_, windowBoundary, this.reverse_);\n while (nextChild != null &&\n (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(this.index_, nextChild, this.reverse_);\n }\n var compareNext = nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n var remainsInWindow = inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childChangedChange(childKey, childSnap, oldChildSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n }\n else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(childKey, oldChildSnap));\n }\n var newEventCache = oldEventCache.updateImmediateChild(childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var nextChildInRange = nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(nextChild.name, nextChild.node));\n }\n return newEventCache.updateImmediateChild(nextChild.name, nextChild.node);\n }\n else {\n return newEventCache;\n }\n }\n }\n else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n }\n else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(windowBoundary.name, windowBoundary.node));\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(childKey, childSnap));\n }\n return oldEventCache\n .updateImmediateChild(childKey, childSnap)\n .updateImmediateChild(windowBoundary.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n else {\n return snap;\n }\n }\n else {\n return snap;\n }\n };\n return LimitedFilter;\n}());\nexports.LimitedFilter = LimitedFilter;\n\n//# sourceMappingURL=LimitedFilter.js.map\n\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Reference_1 = __webpack_require__(21);\nvar DataSnapshot_1 = __webpack_require__(22);\nvar Path_1 = __webpack_require__(2);\nvar Tree_1 = __webpack_require__(110);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar util_2 = __webpack_require__(1);\nvar ServerValues_1 = __webpack_require__(43);\nvar validation_1 = __webpack_require__(7);\nvar util_3 = __webpack_require__(0);\nvar nodeFromJSON_1 = __webpack_require__(11);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar Repo_1 = __webpack_require__(17);\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n/**\n * @enum {number}\n */\nvar TransactionStatus;\n(function (TransactionStatus) {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n TransactionStatus[TransactionStatus[\"RUN\"] = 0] = \"RUN\";\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n TransactionStatus[TransactionStatus[\"SENT\"] = 1] = \"SENT\";\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n TransactionStatus[TransactionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n TransactionStatus[TransactionStatus[\"SENT_NEEDS_ABORT\"] = 3] = \"SENT_NEEDS_ABORT\";\n // Temporary state used to mark transactions that need to be aborted.\n TransactionStatus[TransactionStatus[\"NEEDS_ABORT\"] = 4] = \"NEEDS_ABORT\";\n})(TransactionStatus = exports.TransactionStatus || (exports.TransactionStatus = {}));\n/**\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\n * @type {number}\n * @const\n * @private\n */\nRepo_1.Repo.MAX_TRANSACTION_RETRIES_ = 25;\n/**\n * Setup the transaction data structures\n * @private\n */\nRepo_1.Repo.prototype.transactions_init_ = function () {\n /**\n * Stores queues of outstanding transactions for Firebase locations.\n *\n * @type {!Tree.>}\n * @private\n */\n this.transactionQueueTree_ = new Tree_1.Tree();\n};\n/**\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\n *\n * @param {!Path} path Path at which to do transaction.\n * @param {function(*):*} transactionUpdate Update callback.\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\n */\nRepo_1.Repo.prototype.startTransaction = function (path, transactionUpdate, onComplete, applyLocally) {\n this.log_('transaction on ' + path);\n // Add a watch to make sure we get server updates.\n var valueCallback = function () { };\n var watchRef = new Reference_1.Reference(this, path);\n watchRef.on('value', valueCallback);\n var unwatcher = function () {\n watchRef.off('value', valueCallback);\n };\n // Initialize transaction.\n var transaction = {\n path: path,\n update: transactionUpdate,\n onComplete: onComplete,\n // One of TransactionStatus enums.\n status: null,\n // Used when combining transactions at different locations to figure out which one goes first.\n order: util_2.LUIDGenerator(),\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n // Function to call to clean up our .on() listener.\n unwatcher: unwatcher,\n // Stores why a transaction was aborted.\n abortReason: null,\n currentWriteId: null,\n currentInputSnapshot: null,\n currentOutputSnapshotRaw: null,\n currentOutputSnapshotResolved: null\n };\n // Run transaction initially.\n var currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n var newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n var snapshot = new DataSnapshot_1.DataSnapshot(transaction.currentInputSnapshot, new Reference_1.Reference(this, transaction.path), PriorityIndex_1.PRIORITY_INDEX);\n transaction.onComplete(null, false, snapshot);\n }\n }\n else {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newVal, transaction.path);\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n var queueNode = this.transactionQueueTree_.subTree(path);\n var nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n queueNode.setValue(nodeQueue);\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n var priorityForNode = void 0;\n if (typeof newVal === 'object' &&\n newVal !== null &&\n util_3.contains(newVal, '.priority')) {\n priorityForNode = util_3.safeGet(newVal, '.priority');\n util_1.assert(validation_1.isValidPriority(priorityForNode), 'Invalid priority returned by transaction. ' +\n 'Priority must be a valid string, finite number, server value, or null.');\n }\n else {\n var currentNode = this.serverSyncTree_.calcCompleteEventCache(path) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, priorityForNode);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, transaction.currentWriteId, transaction.applyLocally);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n this.sendReadyTransactions_();\n }\n};\n/**\n * @param {!Path} path\n * @param {Array.=} excludeSets A specific set to exclude\n * @return {Node}\n * @private\n */\nRepo_1.Repo.prototype.getLatestState_ = function (path, excludeSets) {\n return (this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n};\n/**\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\n * complete.\n *\n * Externally it's called with no arguments, but it calls itself recursively with a particular\n * transactionQueueTree node to recurse through the tree.\n *\n * @param {Tree.>=} node transactionQueueTree node to start at.\n * @private\n */\nRepo_1.Repo.prototype.sendReadyTransactions_ = function (node) {\n var _this = this;\n if (node === void 0) { node = this.transactionQueueTree_; }\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n if (node.getValue() !== null) {\n var queue = this.buildTransactionQueue_(node);\n util_1.assert(queue.length > 0, 'Sending zero length transaction queue');\n var allRun = queue.every(function (transaction) { return transaction.status === TransactionStatus.RUN; });\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n }\n else if (node.hasChildren()) {\n node.forEachChild(function (childNode) {\n _this.sendReadyTransactions_(childNode);\n });\n }\n};\n/**\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\n *\n * @param {!Path} path The location of the queue.\n * @param {!Array.} queue Queue of transactions under the specified location.\n * @private\n */\nRepo_1.Repo.prototype.sendTransactionQueue_ = function (path, queue) {\n var _this = this;\n // Mark transactions as sent and increment retry count!\n var setsToIgnore = queue.map(function (txn) {\n return txn.currentWriteId;\n });\n var latestState = this.getLatestState_(path, setsToIgnore);\n var snapToSend = latestState;\n var latestHash = latestState.hash();\n for (var i = 0; i < queue.length; i++) {\n var txn = queue[i];\n util_1.assert(txn.status === TransactionStatus.RUN, 'tryToSendTransactionQueue_: items in queue should all be run.');\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n var relativePath = Path_1.Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(relativePath /**@type {!Node} */, txn.currentOutputSnapshotRaw);\n }\n var dataToSend = snapToSend.val(true);\n var pathToSend = path;\n // Send the put.\n this.server_.put(pathToSend.toString(), dataToSend, function (status) {\n _this.log_('transaction put response', {\n path: pathToSend.toString(),\n status: status\n });\n var events = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(_this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId));\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n var node = queue[i].currentOutputSnapshotResolved;\n var ref = new Reference_1.Reference(_this, queue[i].path);\n var snapshot = new DataSnapshot_1.DataSnapshot(node, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, true, snapshot));\n }\n queue[i].unwatcher();\n }\n // Now remove the completed transactions.\n _this.pruneCompletedTransactionsBelowNode_(_this.transactionQueueTree_.subTree(path));\n // There may be pending transactions that we can now send.\n _this.sendReadyTransactions_();\n _this.eventQueue_.raiseEventsForChangedPath(path, events);\n // Finally, trigger onComplete callbacks.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT)\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n else\n queue[i].status = TransactionStatus.RUN;\n }\n }\n else {\n util_2.warn('transaction at ' + pathToSend.toString() + ' failed: ' + status);\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n _this.rerunTransactions_(path);\n }\n }, latestHash);\n};\n/**\n * Finds all transactions dependent on the data at changedPath and reruns them.\n *\n * Should be called any time cached data changes.\n *\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\n * be raised for.\n *\n * @param {!Path} changedPath The path in mergedData that changed.\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactions_ = function (changedPath) {\n var rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n var path = rootMostTransactionNode.path();\n var queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n return path;\n};\n/**\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\n *\n * @param {Array.} queue The queue of transactions to run.\n * @param {!Path} path The path the queue is for.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactionQueue_ = function (queue, path) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n var events = [];\n // Ignore all of the sets we're going to re-run.\n var txnsToRerun = queue.filter(function (q) {\n return q.status === TransactionStatus.RUN;\n });\n var setsToIgnore = txnsToRerun.map(function (q) {\n return q.currentWriteId;\n });\n for (var i = 0; i < queue.length; i++) {\n var transaction = queue[i];\n var relativePath = Path_1.Path.relativePath(path, transaction.path);\n var abortTransaction = false, abortReason = void 0;\n util_1.assert(relativePath !== null, 'rerunTransactionsUnderNode_: relativePath should not be null.');\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= Repo_1.Repo.MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else {\n // This code reruns a transaction\n var currentNode = this.getLatestState_(transaction.path, setsToIgnore);\n transaction.currentInputSnapshot = currentNode;\n var newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newData, transaction.path);\n var newDataNode = nodeFromJSON_1.nodeFromJSON(newData);\n var hasExplicitPriority = typeof newData === 'object' &&\n newData != null &&\n util_3.contains(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n var oldWriteId = transaction.currentWriteId;\n var serverValues = this.generateServerValues();\n var newNodeResolved = ServerValues_1.resolveDeferredValueSnapshot(newDataNode, serverValues);\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(this.serverSyncTree_.applyUserOverwrite(transaction.path, newNodeResolved, transaction.currentWriteId, transaction.applyLocally));\n events = events.concat(this.serverSyncTree_.ackUserWrite(oldWriteId, true));\n }\n else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function (unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n var ref = new Reference_1.Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n var lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n var snapshot = new DataSnapshot_1.DataSnapshot(lastInput, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n }\n else {\n callbacks.push(queue[i].onComplete.bind(null, new Error(abortReason), false, null));\n }\n }\n }\n }\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n // Now fire callbacks, now that we're in a good, known state.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n/**\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\n * the node for the given path if there are no pending transactions on any ancestor.\n *\n * @param {!Path} path The location to start at.\n * @return {!Tree.>} The rootmost node with a transaction.\n * @private\n */\nRepo_1.Repo.prototype.getAncestorTransactionNode_ = function (path) {\n var front;\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n var transactionNode = this.transactionQueueTree_;\n while ((front = path.getFront()) !== null &&\n transactionNode.getValue() === null) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n return transactionNode;\n};\n/**\n * Builds the queue of all transactions at or below the specified transactionNode.\n *\n * @param {!Tree.>} transactionNode\n * @return {Array.} The generated queue.\n * @private\n */\nRepo_1.Repo.prototype.buildTransactionQueue_ = function (transactionNode) {\n // Walk any child transaction queues and aggregate them into a single queue.\n var transactionQueue = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function (a, b) {\n return a.order - b.order;\n });\n return transactionQueue;\n};\n/**\n * @param {!Tree.>} node\n * @param {Array.} queue\n * @private\n */\nRepo_1.Repo.prototype.aggregateTransactionQueuesForNode_ = function (node, queue) {\n var _this = this;\n var nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (var i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n node.forEachChild(function (child) {\n _this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n/**\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\n *\n * @param {!Tree.>} node\n * @private\n */\nRepo_1.Repo.prototype.pruneCompletedTransactionsBelowNode_ = function (node) {\n var _this = this;\n var queue = node.getValue();\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n node.forEachChild(function (childNode) {\n _this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n/**\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\n * since we consider them incompatible with transactions.\n *\n * @param {!Path} path Path for which we want to abort related transactions.\n * @return {!Path}\n * @private\n */\nRepo_1.Repo.prototype.abortTransactions_ = function (path) {\n var _this = this;\n var affectedPath = this.getAncestorTransactionNode_(path).path();\n var transactionNode = this.transactionQueueTree_.subTree(path);\n transactionNode.forEachAncestor(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n this.abortTransactionsOnNode_(transactionNode);\n transactionNode.forEachDescendant(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n return affectedPath;\n};\n/**\n * Abort transactions stored in this transaction queue node.\n *\n * @param {!Tree.>} node Node to abort transactions for.\n * @private\n */\nRepo_1.Repo.prototype.abortTransactionsOnNode_ = function (node) {\n var queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n var events = [];\n var lastSent = -1;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n }\n else if (queue[i].status === TransactionStatus.SENT) {\n util_1.assert(lastSent === i - 1, 'All SENT items should be at beginning of queue.');\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n }\n else {\n util_1.assert(queue[i].status === TransactionStatus.RUN, 'Unexpected transaction status in abort');\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true));\n if (queue[i].onComplete) {\n var snapshot = null;\n callbacks.push(queue[i].onComplete.bind(null, new Error('set'), false, snapshot));\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n }\n else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n};\n\n//# sourceMappingURL=Repo_transaction.js.map\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar util_2 = __webpack_require__(0);\n/**\n * Node in a Tree.\n */\nvar TreeNode = /** @class */ (function () {\n function TreeNode() {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n this.children = {};\n this.childCount = 0;\n this.value = null;\n }\n return TreeNode;\n}());\nexports.TreeNode = TreeNode;\n/**\n * A light-weight tree, traversable by path. Nodes can have both values and children.\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\n * children.\n */\nvar Tree = /** @class */ (function () {\n /**\n * @template T\n * @param {string=} name_ Optional name of the node.\n * @param {Tree=} parent_ Optional parent node.\n * @param {TreeNode=} node_ Optional node to wrap.\n */\n function Tree(name_, parent_, node_) {\n if (name_ === void 0) { name_ = ''; }\n if (parent_ === void 0) { parent_ = null; }\n if (node_ === void 0) { node_ = new TreeNode(); }\n this.name_ = name_;\n this.parent_ = parent_;\n this.node_ = node_;\n }\n /**\n * Returns a sub-Tree for the given path.\n *\n * @param {!(string|Path)} pathObj Path to look up.\n * @return {!Tree.} Tree for path.\n */\n Tree.prototype.subTree = function (pathObj) {\n // TODO: Require pathObj to be Path?\n var path = pathObj instanceof Path_1.Path ? pathObj : new Path_1.Path(pathObj);\n var child = this, next;\n while ((next = path.getFront()) !== null) {\n var childNode = util_2.safeGet(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n return child;\n };\n /**\n * Returns the data associated with this tree node.\n *\n * @return {?T} The data or null if no data exists.\n */\n Tree.prototype.getValue = function () {\n return this.node_.value;\n };\n /**\n * Sets data to this tree node.\n *\n * @param {!T} value Value to set.\n */\n Tree.prototype.setValue = function (value) {\n util_1.assert(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n };\n /**\n * Clears the contents of the tree node (its value and all children).\n */\n Tree.prototype.clear = function () {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n };\n /**\n * @return {boolean} Whether the tree has any children.\n */\n Tree.prototype.hasChildren = function () {\n return this.node_.childCount > 0;\n };\n /**\n * @return {boolean} Whether the tree is empty (no value or children).\n */\n Tree.prototype.isEmpty = function () {\n return this.getValue() === null && !this.hasChildren();\n };\n /**\n * Calls action for each child of this tree node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachChild = function (action) {\n var _this = this;\n util_2.forEach(this.node_.children, function (child, childTree) {\n action(new Tree(child, _this, childTree));\n });\n };\n /**\n * Does a depth-first traversal of this node's descendants, calling action for each one.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\n * false.\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\n * parent.\n */\n Tree.prototype.forEachDescendant = function (action, includeSelf, childrenFirst) {\n if (includeSelf && !childrenFirst)\n action(this);\n this.forEachChild(function (child) {\n child.forEachDescendant(action, /*includeSelf=*/ true, childrenFirst);\n });\n if (includeSelf && childrenFirst)\n action(this);\n };\n /**\n * Calls action on each ancestor node.\n *\n * @param {function(!Tree.)} action Action to be called on each parent; return\n * true to abort.\n * @param {boolean=} includeSelf Whether to call action on this node as well.\n * @return {boolean} true if the action callback returned true.\n */\n Tree.prototype.forEachAncestor = function (action, includeSelf) {\n var node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n };\n /**\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\n * is found, action is called on it and traversal does not continue inside the node.\n * Action is *not* called on this node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachImmediateDescendantWithValue = function (action) {\n this.forEachChild(function (child) {\n if (child.getValue() !== null)\n action(child);\n else\n child.forEachImmediateDescendantWithValue(action);\n });\n };\n /**\n * @return {!Path} The path of this tree node, as a Path.\n */\n Tree.prototype.path = function () {\n return new Path_1.Path(this.parent_ === null\n ? this.name_\n : this.parent_.path() + '/' + this.name_);\n };\n /**\n * @return {string} The name of the tree node.\n */\n Tree.prototype.name = function () {\n return this.name_;\n };\n /**\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\n */\n Tree.prototype.parent = function () {\n return this.parent_;\n };\n /**\n * Adds or removes this child from its parent based on whether it's empty or not.\n *\n * @private\n */\n Tree.prototype.updateParents_ = function () {\n if (this.parent_ !== null)\n this.parent_.updateChild_(this.name_, this);\n };\n /**\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\n *\n * @param {string} childName The name of the child to update.\n * @param {!Tree.} child The child to update.\n * @private\n */\n Tree.prototype.updateChild_ = function (childName, child) {\n var childEmpty = child.isEmpty();\n var childExists = util_2.contains(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n }\n else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n };\n return Tree;\n}());\nexports.Tree = Tree;\n\n//# sourceMappingURL=Tree.js.map\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar WebSocketConnection_1 = __webpack_require__(54);\nvar BrowserPollConnection_1 = __webpack_require__(53);\n/**\n * INTERNAL methods for internal-use only (tests, etc.).\n *\n * Customers shouldn't use these or else should be aware that they could break at any time.\n *\n * @const\n */\nexports.forceLongPolling = function () {\n WebSocketConnection_1.WebSocketConnection.forceDisallow();\n BrowserPollConnection_1.BrowserPollConnection.forceAllow();\n};\nexports.forceWebSockets = function () {\n BrowserPollConnection_1.BrowserPollConnection.forceDisallow();\n};\n/* Used by App Manager */\nexports.isWebSocketsAvailable = function () {\n return WebSocketConnection_1.WebSocketConnection['isAvailable']();\n};\nexports.setSecurityDebugCallback = function (ref, callback) {\n ref.repo.persistentConnection_.securityDebugCallback_ = callback;\n};\nexports.stats = function (ref, showDelta) {\n ref.repo.stats(showDelta);\n};\nexports.statsIncrementCounter = function (ref, metric) {\n ref.repo.statsIncrementCounter(metric);\n};\nexports.dataUpdateCount = function (ref) {\n return ref.repo.dataUpdateCount;\n};\nexports.interceptServerData = function (ref, callback) {\n return ref.repo.interceptServerData_(callback);\n};\n\n//# sourceMappingURL=internal.js.map\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RepoInfo_1 = __webpack_require__(34);\nvar PersistentConnection_1 = __webpack_require__(50);\nvar RepoManager_1 = __webpack_require__(26);\nvar Connection_1 = __webpack_require__(52);\nexports.DataConnection = PersistentConnection_1.PersistentConnection;\n/**\n * @param {!string} pathString\n * @param {function(*)} onComplete\n */\nPersistentConnection_1.PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n/**\n * @param {*} data\n * @param {function(*)} onEcho\n */\nPersistentConnection_1.PersistentConnection.prototype.echo = function (data, onEcho) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n// RealTimeConnection properties that we use in tests.\nexports.RealTimeConnection = Connection_1.Connection;\n/**\n * @param {function(): string} newHash\n * @return {function()}\n */\nexports.hijackHash = function (newHash) {\n var oldPut = PersistentConnection_1.PersistentConnection.prototype.put;\n PersistentConnection_1.PersistentConnection.prototype.put = function (pathString, data, opt_onComplete, opt_hash) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function () {\n PersistentConnection_1.PersistentConnection.prototype.put = oldPut;\n };\n};\n/**\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\n */\nexports.ConnectionTarget = RepoInfo_1.RepoInfo;\n/**\n * @param {!Query} query\n * @return {!string}\n */\nexports.queryIdentifier = function (query) {\n return query.queryIdentifier();\n};\n/**\n * @param {!Query} firebaseRef\n * @return {!Object}\n */\nexports.listens = function (firebaseRef) {\n return firebaseRef.repo.persistentConnection_.listens_;\n};\n/**\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\n *\n * @param {boolean} forceRestClient\n */\nexports.forceRestClient = function (forceRestClient) {\n RepoManager_1.RepoManager.getInstance().forceRestClient(forceRestClient);\n};\n\n//# sourceMappingURL=test_access.js.map\n\n\n/***/ })\n],[78]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-database.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-database.js","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"@firebase/util\");\nvar util_5 = require(\"@firebase/util\");\nvar util_6 = require(\"@firebase/util\");\nvar storage_1 = require(\"../storage/storage\");\nvar util_7 = require(\"@firebase/util\");\n/**\n * Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).\n * @type {function(): number} Generated ID.\n */\nexports.LUIDGenerator = (function () {\n var id = 1;\n return function () {\n return id++;\n };\n})();\n/**\n * Sha1 hash of the input string\n * @param {!string} str The string to hash\n * @return {!string} The resulting hash\n */\nexports.sha1 = function (str) {\n var utf8Bytes = util_5.stringToByteArray(str);\n var sha1 = new util_4.Sha1();\n sha1.update(utf8Bytes);\n var sha1Bytes = sha1.digest();\n return util_3.base64.encodeByteArray(sha1Bytes);\n};\n/**\n * @param {...*} var_args\n * @return {string}\n * @private\n */\nvar buildLogMessage_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var message = '';\n for (var i = 0; i < var_args.length; i++) {\n if (Array.isArray(var_args[i]) ||\n (var_args[i] &&\n typeof var_args[i] === 'object' &&\n typeof var_args[i].length === 'number')) {\n message += buildLogMessage_.apply(null, var_args[i]);\n }\n else if (typeof var_args[i] === 'object') {\n message += util_6.stringify(var_args[i]);\n }\n else {\n message += var_args[i];\n }\n message += ' ';\n }\n return message;\n};\n/**\n * Use this for all debug messages in Firebase.\n * @type {?function(string)}\n */\nexports.logger = null;\n/**\n * Flag to check for log availability on first log message\n * @type {boolean}\n * @private\n */\nvar firstLog_ = true;\n/**\n * The implementation of Firebase.enableLogging (defined here to break dependencies)\n * @param {boolean|?function(string)} logger_ A flag to turn on logging, or a custom logger\n * @param {boolean=} persistent Whether or not to persist logging settings across refreshes\n */\nexports.enableLogging = function (logger_, persistent) {\n util_1.assert(!persistent || (logger_ === true || logger_ === false), \"Can't turn on custom loggers persistently.\");\n if (logger_ === true) {\n if (typeof console !== 'undefined') {\n if (typeof console.log === 'function') {\n exports.logger = console.log.bind(console);\n }\n else if (typeof console.log === 'object') {\n // IE does this.\n exports.logger = function (message) {\n console.log(message);\n };\n }\n }\n if (persistent)\n storage_1.SessionStorage.set('logging_enabled', true);\n }\n else if (typeof logger_ === 'function') {\n exports.logger = logger_;\n }\n else {\n exports.logger = null;\n storage_1.SessionStorage.remove('logging_enabled');\n }\n};\n/**\n *\n * @param {...(string|Arguments)} var_args\n */\nexports.log = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (firstLog_ === true) {\n firstLog_ = false;\n if (exports.logger === null && storage_1.SessionStorage.get('logging_enabled') === true)\n exports.enableLogging(true);\n }\n if (exports.logger) {\n var message = buildLogMessage_.apply(null, var_args);\n exports.logger(message);\n }\n};\n/**\n * @param {!string} prefix\n * @return {function(...[*])}\n */\nexports.logWrapper = function (prefix) {\n return function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n exports.log.apply(void 0, [prefix].concat(var_args));\n };\n};\n/**\n * @param {...string} var_args\n */\nexports.error = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n var message = 'FIREBASE INTERNAL ERROR: ' + buildLogMessage_.apply(void 0, var_args);\n if (typeof console.error !== 'undefined') {\n console.error(message);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * @param {...string} var_args\n */\nexports.fatal = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var message = buildLogMessage_.apply(void 0, var_args);\n throw new Error('FIREBASE FATAL ERROR: ' + message);\n};\n/**\n * @param {...*} var_args\n */\nexports.warn = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n var message = 'FIREBASE WARNING: ' + buildLogMessage_.apply(void 0, var_args);\n if (typeof console.warn !== 'undefined') {\n console.warn(message);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * Logs a warning if the containing page uses https. Called when a call to new Firebase\n * does not use https.\n */\nexports.warnIfPageIsSecure = function () {\n // Be very careful accessing browser globals. Who knows what may or may not exist.\n if (typeof window !== 'undefined' &&\n window.location &&\n window.location.protocol &&\n window.location.protocol.indexOf('https:') !== -1) {\n exports.warn('Insecure Firebase access from a secure page. ' +\n 'Please use https in calls to new Firebase().');\n }\n};\n/**\n * @param {!String} methodName\n */\nexports.warnAboutUnsupportedMethod = function (methodName) {\n exports.warn(methodName +\n ' is unsupported and will likely change soon. ' +\n 'Please do not use.');\n};\n/**\n * Returns true if data is NaN, or +/- Infinity.\n * @param {*} data\n * @return {boolean}\n */\nexports.isInvalidJSONNumber = function (data) {\n return (typeof data === 'number' &&\n (data != data || // NaN\n data == Number.POSITIVE_INFINITY ||\n data == Number.NEGATIVE_INFINITY));\n};\n/**\n * @param {function()} fn\n */\nexports.executeWhenDOMReady = function (fn) {\n if (util_7.isNodeSdk() || document.readyState === 'complete') {\n fn();\n }\n else {\n // Modeled after jQuery. Try DOMContentLoaded and onreadystatechange (which\n // fire before onload), but fall back to onload.\n var called_1 = false;\n var wrappedFn_1 = function () {\n if (!document.body) {\n setTimeout(wrappedFn_1, Math.floor(10));\n return;\n }\n if (!called_1) {\n called_1 = true;\n fn();\n }\n };\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', wrappedFn_1, false);\n // fallback to onload.\n window.addEventListener('load', wrappedFn_1, false);\n }\n else if (document.attachEvent) {\n // IE.\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'complete')\n wrappedFn_1();\n });\n // fallback to onload.\n window.attachEvent('onload', wrappedFn_1);\n // jQuery has an extra hack for IE that we could employ (based on\n // http://javascript.nwbox.com/IEContentLoaded/) But it looks really old.\n // I'm hoping we don't need it.\n }\n }\n};\n/**\n * Minimum key name. Invalid for actual data, used as a marker to sort before any valid names\n * @type {!string}\n */\nexports.MIN_NAME = '[MIN_NAME]';\n/**\n * Maximum key name. Invalid for actual data, used as a marker to sort above any valid names\n * @type {!string}\n */\nexports.MAX_NAME = '[MAX_NAME]';\n/**\n * Compares valid Firebase key names, plus min and max name\n * @param {!string} a\n * @param {!string} b\n * @return {!number}\n */\nexports.nameCompare = function (a, b) {\n if (a === b) {\n return 0;\n }\n else if (a === exports.MIN_NAME || b === exports.MAX_NAME) {\n return -1;\n }\n else if (b === exports.MIN_NAME || a === exports.MAX_NAME) {\n return 1;\n }\n else {\n var aAsInt = exports.tryParseInt(a), bAsInt = exports.tryParseInt(b);\n if (aAsInt !== null) {\n if (bAsInt !== null) {\n return aAsInt - bAsInt == 0 ? a.length - b.length : aAsInt - bAsInt;\n }\n else {\n return -1;\n }\n }\n else if (bAsInt !== null) {\n return 1;\n }\n else {\n return a < b ? -1 : 1;\n }\n }\n};\n/**\n * @param {!string} a\n * @param {!string} b\n * @return {!number} comparison result.\n */\nexports.stringCompare = function (a, b) {\n if (a === b) {\n return 0;\n }\n else if (a < b) {\n return -1;\n }\n else {\n return 1;\n }\n};\n/**\n * @param {string} key\n * @param {Object} obj\n * @return {*}\n */\nexports.requireKey = function (key, obj) {\n if (obj && key in obj) {\n return obj[key];\n }\n else {\n throw new Error('Missing required key (' + key + ') in object: ' + util_6.stringify(obj));\n }\n};\n/**\n * @param {*} obj\n * @return {string}\n */\nexports.ObjectToUniqueKey = function (obj) {\n if (typeof obj !== 'object' || obj === null)\n return util_6.stringify(obj);\n var keys = [];\n for (var k in obj) {\n keys.push(k);\n }\n // Export as json, but with the keys sorted.\n keys.sort();\n var key = '{';\n for (var i = 0; i < keys.length; i++) {\n if (i !== 0)\n key += ',';\n key += util_6.stringify(keys[i]);\n key += ':';\n key += exports.ObjectToUniqueKey(obj[keys[i]]);\n }\n key += '}';\n return key;\n};\n/**\n * Splits a string into a number of smaller segments of maximum size\n * @param {!string} str The string\n * @param {!number} segsize The maximum number of chars in the string.\n * @return {Array.} The string, split into appropriately-sized chunks\n */\nexports.splitStringBySize = function (str, segsize) {\n var len = str.length;\n if (len <= segsize) {\n return [str];\n }\n var dataSegs = [];\n for (var c = 0; c < len; c += segsize) {\n if (c + segsize > len) {\n dataSegs.push(str.substring(c, len));\n }\n else {\n dataSegs.push(str.substring(c, c + segsize));\n }\n }\n return dataSegs;\n};\n/**\n * Apply a function to each (key, value) pair in an object or\n * apply a function to each (index, value) pair in an array\n * @param {!(Object|Array)} obj The object or array to iterate over\n * @param {function(?, ?)} fn The function to apply\n */\nexports.each = function (obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; ++i) {\n fn(i, obj[i]);\n }\n }\n else {\n /**\n * in the conversion of code we removed the goog.object.forEach\n * function which did a value,key callback. We standardized on\n * a single impl that does a key, value callback. So we invert\n * to not have to touch the `each` code points\n */\n util_2.forEach(obj, function (key, val) { return fn(val, key); });\n }\n};\n/**\n * Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.\n * @param {function(*)} callback Callback function.\n * @param {?Object=} context Optional context to bind to.\n * @return {function(*)}\n */\nexports.bindCallback = function (callback, context) {\n return context ? callback.bind(context) : callback;\n};\n/**\n * Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)\n * I made one modification at the end and removed the NaN / Infinity\n * handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.\n * @param {!number} v A double\n * @return {string}\n */\nexports.doubleToIEEE754String = function (v) {\n util_1.assert(!exports.isInvalidJSONNumber(v), 'Invalid JSON number'); // MJL\n var ebits = 11, fbits = 52;\n var bias = (1 << (ebits - 1)) - 1, s, e, f, ln, i, bits, str;\n // Compute sign, exponent, fraction\n // Skip NaN / Infinity handling --MJL.\n if (v === 0) {\n e = 0;\n f = 0;\n s = 1 / v === -Infinity ? 1 : 0;\n }\n else {\n s = v < 0;\n v = Math.abs(v);\n if (v >= Math.pow(2, 1 - bias)) {\n // Normalized\n ln = Math.min(Math.floor(Math.log(v) / Math.LN2), bias);\n e = ln + bias;\n f = Math.round(v * Math.pow(2, fbits - ln) - Math.pow(2, fbits));\n }\n else {\n // Denormalized\n e = 0;\n f = Math.round(v / Math.pow(2, 1 - bias - fbits));\n }\n }\n // Pack sign, exponent, fraction\n bits = [];\n for (i = fbits; i; i -= 1) {\n bits.push(f % 2 ? 1 : 0);\n f = Math.floor(f / 2);\n }\n for (i = ebits; i; i -= 1) {\n bits.push(e % 2 ? 1 : 0);\n e = Math.floor(e / 2);\n }\n bits.push(s ? 1 : 0);\n bits.reverse();\n str = bits.join('');\n // Return the data as a hex string. --MJL\n var hexByteString = '';\n for (i = 0; i < 64; i += 8) {\n var hexByte = parseInt(str.substr(i, 8), 2).toString(16);\n if (hexByte.length === 1)\n hexByte = '0' + hexByte;\n hexByteString = hexByteString + hexByte;\n }\n return hexByteString.toLowerCase();\n};\n/**\n * Used to detect if we're in a Chrome content script (which executes in an\n * isolated environment where long-polling doesn't work).\n * @return {boolean}\n */\nexports.isChromeExtensionContentScript = function () {\n return !!(typeof window === 'object' &&\n window['chrome'] &&\n window['chrome']['extension'] &&\n !/^chrome/.test(window.location.href));\n};\n/**\n * Used to detect if we're in a Windows 8 Store app.\n * @return {boolean}\n */\nexports.isWindowsStoreApp = function () {\n // Check for the presence of a couple WinRT globals\n return typeof Windows === 'object' && typeof Windows.UI === 'object';\n};\n/**\n * Converts a server error code to a Javascript Error\n * @param {!string} code\n * @param {!Query} query\n * @return {Error}\n */\nexports.errorForServerCode = function (code, query) {\n var reason = 'Unknown Error';\n if (code === 'too_big') {\n reason =\n 'The data requested exceeds the maximum size ' +\n 'that can be accessed with a single request.';\n }\n else if (code == 'permission_denied') {\n reason = \"Client doesn't have permission to access the desired data.\";\n }\n else if (code == 'unavailable') {\n reason = 'The service is unavailable';\n }\n var error = new Error(code + ' at ' + query.path.toString() + ': ' + reason);\n error.code = code.toUpperCase();\n return error;\n};\n/**\n * Used to test for integer-looking strings\n * @type {RegExp}\n * @private\n */\nexports.INTEGER_REGEXP_ = new RegExp('^-?\\\\d{1,10}$');\n/**\n * If the string contains a 32-bit integer, return it. Else return null.\n * @param {!string} str\n * @return {?number}\n */\nexports.tryParseInt = function (str) {\n if (exports.INTEGER_REGEXP_.test(str)) {\n var intVal = Number(str);\n if (intVal >= -2147483648 && intVal <= 2147483647) {\n return intVal;\n }\n }\n return null;\n};\n/**\n * Helper to run some code but catch any exceptions and re-throw them later.\n * Useful for preventing user callbacks from breaking internal code.\n *\n * Re-throwing the exception from a setTimeout is a little evil, but it's very\n * convenient (we don't have to try to figure out when is a safe point to\n * re-throw it), and the behavior seems reasonable:\n *\n * * If you aren't pausing on exceptions, you get an error in the console with\n * the correct stack trace.\n * * If you're pausing on all exceptions, the debugger will pause on your\n * exception and then again when we rethrow it.\n * * If you're only pausing on uncaught exceptions, the debugger will only pause\n * on us re-throwing it.\n *\n * @param {!function()} fn The code to guard.\n */\nexports.exceptionGuard = function (fn) {\n try {\n fn();\n }\n catch (e) {\n // Re-throw exception when it's safe.\n setTimeout(function () {\n // It used to be that \"throw e\" would result in a good console error with\n // relevant context, but as of Chrome 39, you just get the firebase.js\n // file/line number where we re-throw it, which is useless. So we log\n // e.stack explicitly.\n var stack = e.stack || '';\n exports.warn('Exception was thrown by user callback.', stack);\n throw e;\n }, Math.floor(0));\n }\n};\n/**\n * Helper function to safely call opt_callback with the specified arguments. It:\n * 1. Turns into a no-op if opt_callback is null or undefined.\n * 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.\n *\n * @param {?Function=} callback Optional onComplete callback.\n * @param {...*} var_args Arbitrary args to be passed to opt_onComplete\n */\nexports.callUserCallback = function (callback) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (typeof callback === 'function') {\n exports.exceptionGuard(function () {\n callback.apply(void 0, var_args);\n });\n }\n};\n/**\n * @return {boolean} true if we think we're currently being crawled.\n */\nexports.beingCrawled = function () {\n var userAgent = (typeof window === 'object' &&\n window['navigator'] &&\n window['navigator']['userAgent']) ||\n '';\n // For now we whitelist the most popular crawlers. We should refine this to be the set of crawlers we\n // believe to support JavaScript/AJAX rendering.\n // NOTE: Google Webmaster Tools doesn't really belong, but their \"This is how a visitor to your website\n // would have seen the page\" is flaky if we don't treat it as a crawler.\n return (userAgent.search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i) >= 0);\n};\n/**\n * Export a property of an object using a getter function.\n *\n * @param {!Object} object\n * @param {string} name\n * @param {!function(): *} fnGet\n */\nexports.exportPropGetter = function (object, name, fnGet) {\n Object.defineProperty(object, name, { get: fnGet });\n};\n/**\n * Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.\n *\n * It is removed with clearTimeout() as normal.\n *\n * @param {Function} fn Function to run.\n * @param {number} time Milliseconds to wait before running.\n * @return {number|Object} The setTimeout() return value.\n */\nexports.setTimeoutNonBlocking = function (fn, time) {\n var timeout = setTimeout(fn, time);\n if (typeof timeout === 'object' && timeout['unref']) {\n timeout['unref']();\n }\n return timeout;\n};\n\n//# sourceMappingURL=util.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/util.js\n// module id = 1\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * An immutable object representing a parsed path. It's immutable so that you\n * can pass them around to other functions without worrying about them changing\n * it.\n */\nvar Path = /** @class */ (function () {\n /**\n * @param {string|Array.} pathOrString Path string to parse,\n * or another path, or the raw tokens array\n * @param {number=} pieceNum\n */\n function Path(pathOrString, pieceNum) {\n if (pieceNum === void 0) {\n this.pieces_ = pathOrString.split('/');\n // Remove empty pieces.\n var copyTo = 0;\n for (var i = 0; i < this.pieces_.length; i++) {\n if (this.pieces_[i].length > 0) {\n this.pieces_[copyTo] = this.pieces_[i];\n copyTo++;\n }\n }\n this.pieces_.length = copyTo;\n this.pieceNum_ = 0;\n }\n else {\n this.pieces_ = pathOrString;\n this.pieceNum_ = pieceNum;\n }\n }\n Object.defineProperty(Path, \"Empty\", {\n /**\n * Singleton to represent an empty path\n *\n * @const\n */\n get: function () {\n return new Path('');\n },\n enumerable: true,\n configurable: true\n });\n Path.prototype.getFront = function () {\n if (this.pieceNum_ >= this.pieces_.length)\n return null;\n return this.pieces_[this.pieceNum_];\n };\n /**\n * @return {number} The number of segments in this path\n */\n Path.prototype.getLength = function () {\n return this.pieces_.length - this.pieceNum_;\n };\n /**\n * @return {!Path}\n */\n Path.prototype.popFront = function () {\n var pieceNum = this.pieceNum_;\n if (pieceNum < this.pieces_.length) {\n pieceNum++;\n }\n return new Path(this.pieces_, pieceNum);\n };\n /**\n * @return {?string}\n */\n Path.prototype.getBack = function () {\n if (this.pieceNum_ < this.pieces_.length)\n return this.pieces_[this.pieces_.length - 1];\n return null;\n };\n Path.prototype.toString = function () {\n var pathString = '';\n for (var i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + this.pieces_[i];\n }\n return pathString || '/';\n };\n Path.prototype.toUrlEncodedString = function () {\n var pathString = '';\n for (var i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + encodeURIComponent(String(this.pieces_[i]));\n }\n return pathString || '/';\n };\n /**\n * Shallow copy of the parts of the path.\n *\n * @param {number=} begin\n * @return {!Array}\n */\n Path.prototype.slice = function (begin) {\n if (begin === void 0) { begin = 0; }\n return this.pieces_.slice(this.pieceNum_ + begin);\n };\n /**\n * @return {?Path}\n */\n Path.prototype.parent = function () {\n if (this.pieceNum_ >= this.pieces_.length)\n return null;\n var pieces = [];\n for (var i = this.pieceNum_; i < this.pieces_.length - 1; i++)\n pieces.push(this.pieces_[i]);\n return new Path(pieces, 0);\n };\n /**\n * @param {string|!Path} childPathObj\n * @return {!Path}\n */\n Path.prototype.child = function (childPathObj) {\n var pieces = [];\n for (var i = this.pieceNum_; i < this.pieces_.length; i++)\n pieces.push(this.pieces_[i]);\n if (childPathObj instanceof Path) {\n for (var i = childPathObj.pieceNum_; i < childPathObj.pieces_.length; i++) {\n pieces.push(childPathObj.pieces_[i]);\n }\n }\n else {\n var childPieces = childPathObj.split('/');\n for (var i = 0; i < childPieces.length; i++) {\n if (childPieces[i].length > 0)\n pieces.push(childPieces[i]);\n }\n }\n return new Path(pieces, 0);\n };\n /**\n * @return {boolean} True if there are no segments in this path\n */\n Path.prototype.isEmpty = function () {\n return this.pieceNum_ >= this.pieces_.length;\n };\n /**\n * @param {!Path} outerPath\n * @param {!Path} innerPath\n * @return {!Path} The path from outerPath to innerPath\n */\n Path.relativePath = function (outerPath, innerPath) {\n var outer = outerPath.getFront(), inner = innerPath.getFront();\n if (outer === null) {\n return innerPath;\n }\n else if (outer === inner) {\n return Path.relativePath(outerPath.popFront(), innerPath.popFront());\n }\n else {\n throw new Error('INTERNAL ERROR: innerPath (' +\n innerPath +\n ') is not within ' +\n 'outerPath (' +\n outerPath +\n ')');\n }\n };\n /**\n * @param {!Path} left\n * @param {!Path} right\n * @return {number} -1, 0, 1 if left is less, equal, or greater than the right.\n */\n Path.comparePaths = function (left, right) {\n var leftKeys = left.slice();\n var rightKeys = right.slice();\n for (var i = 0; i < leftKeys.length && i < rightKeys.length; i++) {\n var cmp = util_1.nameCompare(leftKeys[i], rightKeys[i]);\n if (cmp !== 0)\n return cmp;\n }\n if (leftKeys.length === rightKeys.length)\n return 0;\n return leftKeys.length < rightKeys.length ? -1 : 1;\n };\n /**\n *\n * @param {Path} other\n * @return {boolean} true if paths are the same.\n */\n Path.prototype.equals = function (other) {\n if (this.getLength() !== other.getLength()) {\n return false;\n }\n for (var i = this.pieceNum_, j = other.pieceNum_; i <= this.pieces_.length; i++, j++) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n }\n return true;\n };\n /**\n *\n * @param {!Path} other\n * @return {boolean} True if this path is a parent (or the same as) other\n */\n Path.prototype.contains = function (other) {\n var i = this.pieceNum_;\n var j = other.pieceNum_;\n if (this.getLength() > other.getLength()) {\n return false;\n }\n while (i < this.pieces_.length) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n ++i;\n ++j;\n }\n return true;\n };\n return Path;\n}()); // end Path\nexports.Path = Path;\n/**\n * Dynamic (mutable) path used to count path lengths.\n *\n * This class is used to efficiently check paths for valid\n * length (in UTF8 bytes) and depth (used in path validation).\n *\n * Throws Error exception if path is ever invalid.\n *\n * The definition of a path always begins with '/'.\n */\nvar ValidationPath = /** @class */ (function () {\n /**\n * @param {!Path} path Initial Path.\n * @param {string} errorPrefix_ Prefix for any error messages.\n */\n function ValidationPath(path, errorPrefix_) {\n this.errorPrefix_ = errorPrefix_;\n /** @type {!Array} */\n this.parts_ = path.slice();\n /** @type {number} Initialize to number of '/' chars needed in path. */\n this.byteLength_ = Math.max(1, this.parts_.length);\n for (var i = 0; i < this.parts_.length; i++) {\n this.byteLength_ += util_2.stringLength(this.parts_[i]);\n }\n this.checkValid_();\n }\n Object.defineProperty(ValidationPath, \"MAX_PATH_DEPTH\", {\n /** @const {number} Maximum key depth. */\n get: function () {\n return 32;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValidationPath, \"MAX_PATH_LENGTH_BYTES\", {\n /** @const {number} Maximum number of (UTF8) bytes in a Firebase path. */\n get: function () {\n return 768;\n },\n enumerable: true,\n configurable: true\n });\n /** @param {string} child */\n ValidationPath.prototype.push = function (child) {\n // Count the needed '/'\n if (this.parts_.length > 0) {\n this.byteLength_ += 1;\n }\n this.parts_.push(child);\n this.byteLength_ += util_2.stringLength(child);\n this.checkValid_();\n };\n ValidationPath.prototype.pop = function () {\n var last = this.parts_.pop();\n this.byteLength_ -= util_2.stringLength(last);\n // Un-count the previous '/'\n if (this.parts_.length > 0) {\n this.byteLength_ -= 1;\n }\n };\n ValidationPath.prototype.checkValid_ = function () {\n if (this.byteLength_ > ValidationPath.MAX_PATH_LENGTH_BYTES) {\n throw new Error(this.errorPrefix_ +\n 'has a key path longer than ' +\n ValidationPath.MAX_PATH_LENGTH_BYTES +\n ' bytes (' +\n this.byteLength_ +\n ').');\n }\n if (this.parts_.length > ValidationPath.MAX_PATH_DEPTH) {\n throw new Error(this.errorPrefix_ +\n 'path specified exceeds the maximum depth that can be written (' +\n ValidationPath.MAX_PATH_DEPTH +\n ') or object contains a cycle ' +\n this.toErrorString());\n }\n };\n /**\n * String for use in error messages - uses '.' notation for path.\n *\n * @return {string}\n */\n ValidationPath.prototype.toErrorString = function () {\n if (this.parts_.length == 0) {\n return '';\n }\n return \"in property '\" + this.parts_.join('.') + \"'\";\n };\n return ValidationPath;\n}());\nexports.ValidationPath = ValidationPath;\n\n//# sourceMappingURL=Path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/Path.js\n// module id = 2\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = require(\"./Index\");\nvar util_1 = require(\"../../util/util\");\nvar Node_1 = require(\"../Node\");\nvar LeafNode_1 = require(\"../LeafNode\");\nvar nodeFromJSON;\nvar MAX_NODE;\nfunction setNodeFromJSON(val) {\n nodeFromJSON = val;\n}\nexports.setNodeFromJSON = setNodeFromJSON;\nfunction setMaxNode(val) {\n MAX_NODE = val;\n}\nexports.setMaxNode = setMaxNode;\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nvar PriorityIndex = /** @class */ (function (_super) {\n __extends(PriorityIndex, _super);\n function PriorityIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.compare = function (a, b) {\n var aPriority = a.node.getPriority();\n var bPriority = b.node.getPriority();\n var indexCmp = aPriority.compareTo(bPriority);\n if (indexCmp === 0) {\n return util_1.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.isDefinedOn = function (node) {\n return !node.getPriority().isEmpty();\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return !oldNode.getPriority().equals(newNode.getPriority());\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.maxPost = function () {\n return new Node_1.NamedNode(util_1.MAX_NAME, new LeafNode_1.LeafNode('[PRIORITY-POST]', MAX_NODE));\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n PriorityIndex.prototype.makePost = function (indexValue, name) {\n var priorityNode = nodeFromJSON(indexValue);\n return new Node_1.NamedNode(name, new LeafNode_1.LeafNode('[PRIORITY-POST]', priorityNode));\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n PriorityIndex.prototype.toString = function () {\n return '.priority';\n };\n return PriorityIndex;\n}(Index_1.Index));\nexports.PriorityIndex = PriorityIndex;\nexports.PRIORITY_INDEX = new PriorityIndex();\n\n//# sourceMappingURL=PriorityIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/PriorityIndex.js\n// module id = 3\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar SortedMap_1 = require(\"../util/SortedMap\");\nvar Node_1 = require(\"./Node\");\nvar snap_1 = require(\"./snap\");\nvar PriorityIndex_1 = require(\"./indexes/PriorityIndex\");\nvar KeyIndex_1 = require(\"./indexes/KeyIndex\");\nvar IndexMap_1 = require(\"./IndexMap\");\nvar LeafNode_1 = require(\"./LeafNode\");\nvar comparators_1 = require(\"./comparators\");\n// TODO: For memory savings, don't store priorityNode_ if it's empty.\nvar EMPTY_NODE;\n/**\n * ChildrenNode is a class for storing internal nodes in a DataSnapshot\n * (i.e. nodes with children). It implements Node and stores the\n * list of children in the children property, sorted by child name.\n *\n * @constructor\n * @implements {Node}\n */\nvar ChildrenNode = /** @class */ (function () {\n /**\n *\n * @param {!SortedMap.} children_ List of children\n * of this node..\n * @param {?Node} priorityNode_ The priority of this node (as a snapshot node).\n * @param {!IndexMap} indexMap_\n */\n function ChildrenNode(children_, priorityNode_, indexMap_) {\n this.children_ = children_;\n this.priorityNode_ = priorityNode_;\n this.indexMap_ = indexMap_;\n this.lazyHash_ = null;\n /**\n * Note: The only reason we allow null priority is for EMPTY_NODE, since we can't use\n * EMPTY_NODE as the priority of EMPTY_NODE. We might want to consider making EMPTY_NODE its own\n * class instead of an empty ChildrenNode.\n */\n if (this.priorityNode_) {\n snap_1.validatePriorityNode(this.priorityNode_);\n }\n if (this.children_.isEmpty()) {\n util_1.assert(!this.priorityNode_ || this.priorityNode_.isEmpty(), 'An empty node cannot have a priority');\n }\n }\n Object.defineProperty(ChildrenNode, \"EMPTY_NODE\", {\n get: function () {\n return (EMPTY_NODE ||\n (EMPTY_NODE = new ChildrenNode(new SortedMap_1.SortedMap(comparators_1.NAME_COMPARATOR), null, IndexMap_1.IndexMap.Default)));\n },\n enumerable: true,\n configurable: true\n });\n /** @inheritDoc */\n ChildrenNode.prototype.isLeafNode = function () {\n return false;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getPriority = function () {\n return this.priorityNode_ || EMPTY_NODE;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updatePriority = function (newPriorityNode) {\n if (this.children_.isEmpty()) {\n // Don't allow priorities on empty nodes\n return this;\n }\n else {\n return new ChildrenNode(this.children_, newPriorityNode, this.indexMap_);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getImmediateChild = function (childName) {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.getPriority();\n }\n else {\n var child = this.children_.get(childName);\n return child === null ? EMPTY_NODE : child;\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getChild = function (path) {\n var front = path.getFront();\n if (front === null)\n return this;\n return this.getImmediateChild(front).getChild(path.popFront());\n };\n /** @inheritDoc */\n ChildrenNode.prototype.hasChild = function (childName) {\n return this.children_.get(childName) !== null;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updateImmediateChild = function (childName, newChildNode) {\n util_1.assert(newChildNode, 'We should always be passing snapshot nodes');\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n }\n else {\n var namedNode = new Node_1.NamedNode(childName, newChildNode);\n var newChildren = void 0, newIndexMap = void 0, newPriority = void 0;\n if (newChildNode.isEmpty()) {\n newChildren = this.children_.remove(childName);\n newIndexMap = this.indexMap_.removeFromIndexes(namedNode, this.children_);\n }\n else {\n newChildren = this.children_.insert(childName, newChildNode);\n newIndexMap = this.indexMap_.addToIndexes(namedNode, this.children_);\n }\n newPriority = newChildren.isEmpty() ? EMPTY_NODE : this.priorityNode_;\n return new ChildrenNode(newChildren, newPriority, newIndexMap);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updateChild = function (path, newChildNode) {\n var front = path.getFront();\n if (front === null) {\n return newChildNode;\n }\n else {\n util_1.assert(path.getFront() !== '.priority' || path.getLength() === 1, '.priority must be the last token in a path');\n var newImmediateChild = this.getImmediateChild(front).updateChild(path.popFront(), newChildNode);\n return this.updateImmediateChild(front, newImmediateChild);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.isEmpty = function () {\n return this.children_.isEmpty();\n };\n /** @inheritDoc */\n ChildrenNode.prototype.numChildren = function () {\n return this.children_.count();\n };\n /** @inheritDoc */\n ChildrenNode.prototype.val = function (exportFormat) {\n if (this.isEmpty())\n return null;\n var obj = {};\n var numKeys = 0, maxKey = 0, allIntegerKeys = true;\n this.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n obj[key] = childNode.val(exportFormat);\n numKeys++;\n if (allIntegerKeys && ChildrenNode.INTEGER_REGEXP_.test(key)) {\n maxKey = Math.max(maxKey, Number(key));\n }\n else {\n allIntegerKeys = false;\n }\n });\n if (!exportFormat && allIntegerKeys && maxKey < 2 * numKeys) {\n // convert to array.\n var array = [];\n for (var key in obj)\n array[key] = obj[key];\n return array;\n }\n else {\n if (exportFormat && !this.getPriority().isEmpty()) {\n obj['.priority'] = this.getPriority().val();\n }\n return obj;\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.hash = function () {\n if (this.lazyHash_ === null) {\n var toHash_1 = '';\n if (!this.getPriority().isEmpty())\n toHash_1 +=\n 'priority:' +\n snap_1.priorityHashText(this.getPriority().val()) +\n ':';\n this.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n var childHash = childNode.hash();\n if (childHash !== '')\n toHash_1 += ':' + key + ':' + childHash;\n });\n this.lazyHash_ = toHash_1 === '' ? '' : util_2.sha1(toHash_1);\n }\n return this.lazyHash_;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getPredecessorChildName = function (childName, childNode, index) {\n var idx = this.resolveIndex_(index);\n if (idx) {\n var predecessor = idx.getPredecessorKey(new Node_1.NamedNode(childName, childNode));\n return predecessor ? predecessor.name : null;\n }\n else {\n return this.children_.getPredecessorKey(childName);\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n ChildrenNode.prototype.getFirstChildName = function (indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n var minKey = idx.minKey();\n return minKey && minKey.name;\n }\n else {\n return this.children_.minKey();\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n ChildrenNode.prototype.getFirstChild = function (indexDefinition) {\n var minKey = this.getFirstChildName(indexDefinition);\n if (minKey) {\n return new Node_1.NamedNode(minKey, this.children_.get(minKey));\n }\n else {\n return null;\n }\n };\n /**\n * Given an index, return the key name of the largest value we have, according to that index\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n ChildrenNode.prototype.getLastChildName = function (indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n var maxKey = idx.maxKey();\n return maxKey && maxKey.name;\n }\n else {\n return this.children_.maxKey();\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n ChildrenNode.prototype.getLastChild = function (indexDefinition) {\n var maxKey = this.getLastChildName(indexDefinition);\n if (maxKey) {\n return new Node_1.NamedNode(maxKey, this.children_.get(maxKey));\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.forEachChild = function (index, action) {\n var idx = this.resolveIndex_(index);\n if (idx) {\n return idx.inorderTraversal(function (wrappedNode) {\n return action(wrappedNode.name, wrappedNode.node);\n });\n }\n else {\n return this.children_.inorderTraversal(action);\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {SortedMapIterator}\n */\n ChildrenNode.prototype.getIterator = function (indexDefinition) {\n return this.getIteratorFrom(indexDefinition.minPost(), indexDefinition);\n };\n /**\n *\n * @param {!NamedNode} startPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getIteratorFrom = function (startPost, indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getIteratorFrom(startPost, function (key) { return key; });\n }\n else {\n var iterator = this.children_.getIteratorFrom(startPost.name, Node_1.NamedNode.Wrap);\n var next = iterator.peek();\n while (next != null && indexDefinition.compare(next, startPost) < 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getReverseIterator = function (indexDefinition) {\n return this.getReverseIteratorFrom(indexDefinition.maxPost(), indexDefinition);\n };\n /**\n * @param {!NamedNode} endPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getReverseIteratorFrom = function (endPost, indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getReverseIteratorFrom(endPost, function (key) {\n return key;\n });\n }\n else {\n var iterator = this.children_.getReverseIteratorFrom(endPost.name, Node_1.NamedNode.Wrap);\n var next = iterator.peek();\n while (next != null && indexDefinition.compare(next, endPost) > 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.compareTo = function (other) {\n if (this.isEmpty()) {\n if (other.isEmpty()) {\n return 0;\n }\n else {\n return -1;\n }\n }\n else if (other.isLeafNode() || other.isEmpty()) {\n return 1;\n }\n else if (other === exports.MAX_NODE) {\n return -1;\n }\n else {\n // Must be another node with children.\n return 0;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.withIndex = function (indexDefinition) {\n if (indexDefinition === KeyIndex_1.KEY_INDEX ||\n this.indexMap_.hasIndex(indexDefinition)) {\n return this;\n }\n else {\n var newIndexMap = this.indexMap_.addIndex(indexDefinition, this.children_);\n return new ChildrenNode(this.children_, this.priorityNode_, newIndexMap);\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.isIndexed = function (index) {\n return index === KeyIndex_1.KEY_INDEX || this.indexMap_.hasIndex(index);\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.equals = function (other) {\n if (other === this) {\n return true;\n }\n else if (other.isLeafNode()) {\n return false;\n }\n else {\n var otherChildrenNode = other;\n if (!this.getPriority().equals(otherChildrenNode.getPriority())) {\n return false;\n }\n else if (this.children_.count() === otherChildrenNode.children_.count()) {\n var thisIter = this.getIterator(PriorityIndex_1.PRIORITY_INDEX);\n var otherIter = otherChildrenNode.getIterator(PriorityIndex_1.PRIORITY_INDEX);\n var thisCurrent = thisIter.getNext();\n var otherCurrent = otherIter.getNext();\n while (thisCurrent && otherCurrent) {\n if (thisCurrent.name !== otherCurrent.name ||\n !thisCurrent.node.equals(otherCurrent.node)) {\n return false;\n }\n thisCurrent = thisIter.getNext();\n otherCurrent = otherIter.getNext();\n }\n return thisCurrent === null && otherCurrent === null;\n }\n else {\n return false;\n }\n }\n };\n /**\n * Returns a SortedMap ordered by index, or null if the default (by-key) ordering can be used\n * instead.\n *\n * @private\n * @param {!Index} indexDefinition\n * @return {?SortedMap.}\n */\n ChildrenNode.prototype.resolveIndex_ = function (indexDefinition) {\n if (indexDefinition === KeyIndex_1.KEY_INDEX) {\n return null;\n }\n else {\n return this.indexMap_.get(indexDefinition.toString());\n }\n };\n /**\n * @private\n * @type {RegExp}\n */\n ChildrenNode.INTEGER_REGEXP_ = /^(0|[1-9]\\d*)$/;\n return ChildrenNode;\n}());\nexports.ChildrenNode = ChildrenNode;\n/**\n * @constructor\n * @extends {ChildrenNode}\n * @private\n */\nvar MaxNode = /** @class */ (function (_super) {\n __extends(MaxNode, _super);\n function MaxNode() {\n return _super.call(this, new SortedMap_1.SortedMap(comparators_1.NAME_COMPARATOR), ChildrenNode.EMPTY_NODE, IndexMap_1.IndexMap.Default) || this;\n }\n MaxNode.prototype.compareTo = function (other) {\n if (other === this) {\n return 0;\n }\n else {\n return 1;\n }\n };\n MaxNode.prototype.equals = function (other) {\n // Not that we every compare it, but MAX_NODE is only ever equal to itself\n return other === this;\n };\n MaxNode.prototype.getPriority = function () {\n return this;\n };\n MaxNode.prototype.getImmediateChild = function (childName) {\n return ChildrenNode.EMPTY_NODE;\n };\n MaxNode.prototype.isEmpty = function () {\n return false;\n };\n return MaxNode;\n}(ChildrenNode));\nexports.MaxNode = MaxNode;\n/**\n * Marker that will sort higher than any other snapshot.\n * @type {!MAX_NODE}\n * @const\n */\nexports.MAX_NODE = new MaxNode();\nObject.defineProperties(Node_1.NamedNode, {\n MIN: {\n value: new Node_1.NamedNode(util_2.MIN_NAME, ChildrenNode.EMPTY_NODE)\n },\n MAX: {\n value: new Node_1.NamedNode(util_2.MAX_NAME, exports.MAX_NODE)\n }\n});\n/**\n * Reference Extensions\n */\nKeyIndex_1.KeyIndex.__EMPTY_NODE = ChildrenNode.EMPTY_NODE;\nLeafNode_1.LeafNode.__childrenNodeConstructor = ChildrenNode;\nsnap_1.setMaxNode(exports.MAX_NODE);\nPriorityIndex_1.setMaxNode(exports.MAX_NODE);\n\n//# sourceMappingURL=ChildrenNode.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/ChildrenNode.js\n// module id = 4\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n *\n * @param {!string} name\n * @param {!Node} node\n * @constructor\n * @struct\n */\nvar NamedNode = /** @class */ (function () {\n function NamedNode(name, node) {\n this.name = name;\n this.node = node;\n }\n /**\n *\n * @param {!string} name\n * @param {!Node} node\n * @return {NamedNode}\n */\n NamedNode.Wrap = function (name, node) {\n return new NamedNode(name, node);\n };\n return NamedNode;\n}());\nexports.NamedNode = NamedNode;\n\n//# sourceMappingURL=Node.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/Node.js\n// module id = 5\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"./Path\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"@firebase/util\");\n/**\n * True for invalid Firebase keys\n * @type {RegExp}\n * @private\n */\nexports.INVALID_KEY_REGEX_ = /[\\[\\].#$\\/\\u0000-\\u001F\\u007F]/;\n/**\n * True for invalid Firebase paths.\n * Allows '/' in paths.\n * @type {RegExp}\n * @private\n */\nexports.INVALID_PATH_REGEX_ = /[\\[\\].#$\\u0000-\\u001F\\u007F]/;\n/**\n * Maximum number of characters to allow in leaf value\n * @type {number}\n * @private\n */\nexports.MAX_LEAF_SIZE_ = 10 * 1024 * 1024;\n/**\n * @param {*} key\n * @return {boolean}\n */\nexports.isValidKey = function (key) {\n return (typeof key === 'string' && key.length !== 0 && !exports.INVALID_KEY_REGEX_.test(key));\n};\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexports.isValidPathString = function (pathString) {\n return (typeof pathString === 'string' &&\n pathString.length !== 0 &&\n !exports.INVALID_PATH_REGEX_.test(pathString));\n};\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexports.isValidRootPathString = function (pathString) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n return exports.isValidPathString(pathString);\n};\n/**\n * @param {*} priority\n * @return {boolean}\n */\nexports.isValidPriority = function (priority) {\n return (priority === null ||\n typeof priority === 'string' ||\n (typeof priority === 'number' && !util_2.isInvalidJSONNumber(priority)) ||\n (priority && typeof priority === 'object' && util_1.contains(priority, '.sv')));\n};\n/**\n * Pre-validate a datum passed as an argument to Firebase function.\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexports.validateFirebaseDataArg = function (fnName, argumentNumber, data, path, optional) {\n if (optional && data === undefined)\n return;\n exports.validateFirebaseData(util_3.errorPrefix(fnName, argumentNumber, optional), data, path);\n};\n/**\n * Validate a data object client-side before sending to server.\n *\n * @param {string} errorPrefix\n * @param {*} data\n * @param {!Path|!ValidationPath} path_\n */\nexports.validateFirebaseData = function (errorPrefix, data, path_) {\n var path = path_ instanceof Path_1.Path ? new Path_1.ValidationPath(path_, errorPrefix) : path_;\n if (data === undefined) {\n throw new Error(errorPrefix + 'contains undefined ' + path.toErrorString());\n }\n if (typeof data === 'function') {\n throw new Error(errorPrefix +\n 'contains a function ' +\n path.toErrorString() +\n ' with contents = ' +\n data.toString());\n }\n if (util_2.isInvalidJSONNumber(data)) {\n throw new Error(errorPrefix + 'contains ' + data.toString() + ' ' + path.toErrorString());\n }\n // Check max leaf size, but try to avoid the utf8 conversion if we can.\n if (typeof data === 'string' &&\n data.length > exports.MAX_LEAF_SIZE_ / 3 &&\n util_4.stringLength(data) > exports.MAX_LEAF_SIZE_) {\n throw new Error(errorPrefix +\n 'contains a string greater than ' +\n exports.MAX_LEAF_SIZE_ +\n ' utf8 bytes ' +\n path.toErrorString() +\n \" ('\" +\n data.substring(0, 50) +\n \"...')\");\n }\n // TODO = Perf = Consider combining the recursive validation of keys into NodeFromJSON\n // to save extra walking of large objects.\n if (data && typeof data === 'object') {\n var hasDotValue_1 = false, hasActualChild_1 = false;\n util_1.forEach(data, function (key, value) {\n if (key === '.value') {\n hasDotValue_1 = true;\n }\n else if (key !== '.priority' && key !== '.sv') {\n hasActualChild_1 = true;\n if (!exports.isValidKey(key)) {\n throw new Error(errorPrefix +\n ' contains an invalid key (' +\n key +\n ') ' +\n path.toErrorString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"');\n }\n }\n path.push(key);\n exports.validateFirebaseData(errorPrefix, value, path);\n path.pop();\n });\n if (hasDotValue_1 && hasActualChild_1) {\n throw new Error(errorPrefix +\n ' contains \".value\" child ' +\n path.toErrorString() +\n ' in addition to actual children.');\n }\n }\n};\n/**\n * Pre-validate paths passed in the firebase function.\n *\n * @param {string} errorPrefix\n * @param {Array} mergePaths\n */\nexports.validateFirebaseMergePaths = function (errorPrefix, mergePaths) {\n var i, curPath;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n var keys = curPath.slice();\n for (var j = 0; j < keys.length; j++) {\n if (keys[j] === '.priority' && j === keys.length - 1) {\n // .priority is OK\n }\n else if (!exports.isValidKey(keys[j])) {\n throw new Error(errorPrefix +\n 'contains an invalid key (' +\n keys[j] +\n ') in path ' +\n curPath.toString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"');\n }\n }\n }\n // Check that update keys are not descendants of each other.\n // We rely on the property that sorting guarantees that ancestors come\n // right before descendants.\n mergePaths.sort(Path_1.Path.comparePaths);\n var prevPath = null;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n if (prevPath !== null && prevPath.contains(curPath)) {\n throw new Error(errorPrefix +\n 'contains a path ' +\n prevPath.toString() +\n ' that is ancestor of another path ' +\n curPath.toString());\n }\n prevPath = curPath;\n }\n};\n/**\n * pre-validate an object passed as an argument to firebase function (\n * must be an object - e.g. for firebase.update()).\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexports.validateFirebaseMergeDataArg = function (fnName, argumentNumber, data, path, optional) {\n if (optional && data === undefined)\n return;\n var errorPrefix = util_3.errorPrefix(fnName, argumentNumber, optional);\n if (!(data && typeof data === 'object') || Array.isArray(data)) {\n throw new Error(errorPrefix + ' must be an object containing the children to replace.');\n }\n var mergePaths = [];\n util_1.forEach(data, function (key, value) {\n var curPath = new Path_1.Path(key);\n exports.validateFirebaseData(errorPrefix, value, path.child(curPath));\n if (curPath.getBack() === '.priority') {\n if (!exports.isValidPriority(value)) {\n throw new Error(errorPrefix +\n \"contains an invalid value for '\" +\n curPath.toString() +\n \"', which must be a valid \" +\n 'Firebase priority (a string, finite number, server value, or null).');\n }\n }\n mergePaths.push(curPath);\n });\n exports.validateFirebaseMergePaths(errorPrefix, mergePaths);\n};\nexports.validatePriority = function (fnName, argumentNumber, priority, optional) {\n if (optional && priority === undefined)\n return;\n if (util_2.isInvalidJSONNumber(priority))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'is ' +\n priority.toString() +\n ', but must be a valid Firebase priority (a string, finite number, ' +\n 'server value, or null).');\n // Special case to allow importing data with a .sv.\n if (!exports.isValidPriority(priority))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid Firebase priority ' +\n '(a string, finite number, server value, or null).');\n};\nexports.validateEventType = function (fnName, argumentNumber, eventType, optional) {\n if (optional && eventType === undefined)\n return;\n switch (eventType) {\n case 'value':\n case 'child_added':\n case 'child_removed':\n case 'child_changed':\n case 'child_moved':\n break;\n default:\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid event type = \"value\", \"child_added\", \"child_removed\", ' +\n '\"child_changed\", or \"child_moved\".');\n }\n};\nexports.validateKey = function (fnName, argumentNumber, key, optional) {\n if (optional && key === undefined)\n return;\n if (!exports.isValidKey(key))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'was an invalid key = \"' +\n key +\n '\". Firebase keys must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\").');\n};\nexports.validatePathString = function (fnName, argumentNumber, pathString, optional) {\n if (optional && pathString === undefined)\n return;\n if (!exports.isValidPathString(pathString))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'was an invalid path = \"' +\n pathString +\n '\". Paths must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\"');\n};\nexports.validateRootPathString = function (fnName, argumentNumber, pathString, optional) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n exports.validatePathString(fnName, argumentNumber, pathString, optional);\n};\nexports.validateWritablePath = function (fnName, path) {\n if (path.getFront() === '.info') {\n throw new Error(fnName + \" failed = Can't modify data under /.info/\");\n }\n};\nexports.validateUrl = function (fnName, argumentNumber, parsedUrl) {\n // TODO = Validate server better.\n var pathString = parsedUrl.path.toString();\n if (!(typeof parsedUrl.repoInfo.host === 'string') ||\n parsedUrl.repoInfo.host.length === 0 ||\n !exports.isValidKey(parsedUrl.repoInfo.namespace) ||\n (pathString.length !== 0 && !exports.isValidRootPathString(pathString))) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, false) +\n 'must be a valid firebase URL and ' +\n 'the path can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\".');\n }\n};\nexports.validateCredential = function (fnName, argumentNumber, cred, optional) {\n if (optional && cred === undefined)\n return;\n if (!(typeof cred === 'string'))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid credential (a string).');\n};\nexports.validateBoolean = function (fnName, argumentNumber, bool, optional) {\n if (optional && bool === undefined)\n return;\n if (typeof bool !== 'boolean')\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) + 'must be a boolean.');\n};\nexports.validateString = function (fnName, argumentNumber, string, optional) {\n if (optional && string === undefined)\n return;\n if (!(typeof string === 'string')) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid string.');\n }\n};\nexports.validateObject = function (fnName, argumentNumber, obj, optional) {\n if (optional && obj === undefined)\n return;\n if (!(obj && typeof obj === 'object') || obj === null) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid object.');\n }\n};\nexports.validateObjectContainsKey = function (fnName, argumentNumber, obj, key, optional, opt_type) {\n var objectContainsKey = obj && typeof obj === 'object' && util_1.contains(obj, key);\n if (!objectContainsKey) {\n if (optional) {\n return;\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\"');\n }\n }\n if (opt_type) {\n var val = util_1.safeGet(obj, key);\n if ((opt_type === 'number' && !(typeof val === 'number')) ||\n (opt_type === 'string' && !(typeof val === 'string')) ||\n (opt_type === 'boolean' && !(typeof val === 'boolean')) ||\n (opt_type === 'function' && !(typeof val === 'function')) ||\n (opt_type === 'object' && !(typeof val === 'object') && val)) {\n if (optional) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'contains invalid value for key \"' +\n key +\n '\" (must be of type \"' +\n opt_type +\n '\")');\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\" with type \"' +\n opt_type +\n '\"');\n }\n }\n }\n};\n\n//# sourceMappingURL=validation.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/validation.js\n// module id = 7\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n *\n * @enum\n */\nvar OperationType;\n(function (OperationType) {\n OperationType[OperationType[\"OVERWRITE\"] = 0] = \"OVERWRITE\";\n OperationType[OperationType[\"MERGE\"] = 1] = \"MERGE\";\n OperationType[OperationType[\"ACK_USER_WRITE\"] = 2] = \"ACK_USER_WRITE\";\n OperationType[OperationType[\"LISTEN_COMPLETE\"] = 3] = \"LISTEN_COMPLETE\";\n})(OperationType = exports.OperationType || (exports.OperationType = {}));\n/**\n * @param {boolean} fromUser\n * @param {boolean} fromServer\n * @param {?string} queryId\n * @param {boolean} tagged\n * @constructor\n */\nvar OperationSource = /** @class */ (function () {\n function OperationSource(fromUser, fromServer, queryId, tagged) {\n this.fromUser = fromUser;\n this.fromServer = fromServer;\n this.queryId = queryId;\n this.tagged = tagged;\n util_1.assert(!tagged || fromServer, 'Tagged queries must be from server.');\n }\n /**\n * @const\n * @type {!OperationSource}\n */\n OperationSource.User = new OperationSource(\n /*fromUser=*/ true, false, null, \n /*tagged=*/ false);\n /**\n * @const\n * @type {!OperationSource}\n */\n OperationSource.Server = new OperationSource(false, \n /*fromServer=*/ true, null, \n /*tagged=*/ false);\n /**\n * @param {string} queryId\n * @return {!OperationSource}\n */\n OperationSource.forServerTaggedQuery = function (queryId) {\n return new OperationSource(false, \n /*fromServer=*/ true, queryId, \n /*tagged=*/ true);\n };\n return OperationSource;\n}());\nexports.OperationSource = OperationSource;\n\n//# sourceMappingURL=Operation.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/Operation.js\n// module id = 8\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @constructor\n * @struct\n * @param {!string} type The event type\n * @param {!Node} snapshotNode The data\n * @param {string=} childName The name for this child, if it's a child event\n * @param {Node=} oldSnap Used for intermediate processing of child changed events\n * @param {string=} prevName The name for the previous child, if applicable\n */\nvar Change = /** @class */ (function () {\n function Change(type, snapshotNode, childName, oldSnap, prevName) {\n this.type = type;\n this.snapshotNode = snapshotNode;\n this.childName = childName;\n this.oldSnap = oldSnap;\n this.prevName = prevName;\n }\n /**\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.valueChange = function (snapshot) {\n return new Change(Change.VALUE, snapshot);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childAddedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_ADDED, snapshot, childKey);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childRemovedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_REMOVED, snapshot, childKey);\n };\n /**\n * @param {string} childKey\n * @param {!Node} newSnapshot\n * @param {!Node} oldSnapshot\n * @return {!Change}\n */\n Change.childChangedChange = function (childKey, newSnapshot, oldSnapshot) {\n return new Change(Change.CHILD_CHANGED, newSnapshot, childKey, oldSnapshot);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childMovedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_MOVED, snapshot, childKey);\n };\n //event types\n /** Event type for a child added */\n Change.CHILD_ADDED = 'child_added';\n /** Event type for a child removed */\n Change.CHILD_REMOVED = 'child_removed';\n /** Event type for a child changed */\n Change.CHILD_CHANGED = 'child_changed';\n /** Event type for a child moved */\n Change.CHILD_MOVED = 'child_moved';\n /** Event type for a value change */\n Change.VALUE = 'value';\n return Change;\n}());\nexports.Change = Change;\n\n//# sourceMappingURL=Change.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/Change.js\n// module id = 9\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = require(\"./Index\");\nvar Node_1 = require(\"../Node\");\nvar util_1 = require(\"../../util/util\");\nvar util_2 = require(\"@firebase/util\");\nvar __EMPTY_NODE;\nvar KeyIndex = /** @class */ (function (_super) {\n __extends(KeyIndex, _super);\n function KeyIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(KeyIndex, \"__EMPTY_NODE\", {\n get: function () {\n return __EMPTY_NODE;\n },\n set: function (val) {\n __EMPTY_NODE = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.compare = function (a, b) {\n return util_1.nameCompare(a.name, b.name);\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.isDefinedOn = function (node) {\n // We could probably return true here (since every node has a key), but it's never called\n // so just leaving unimplemented for now.\n throw util_2.assertionError('KeyIndex.isDefinedOn not expected to be called.');\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return false; // The key for a node never changes.\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.maxPost = function () {\n // TODO: This should really be created once and cached in a static property, but\n // NamedNode isn't defined yet, so I can't use it in a static. Bleh.\n return new Node_1.NamedNode(util_1.MAX_NAME, __EMPTY_NODE);\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n KeyIndex.prototype.makePost = function (indexValue, name) {\n util_2.assert(typeof indexValue === 'string', 'KeyIndex indexValue must always be a string.');\n // We just use empty node, but it'll never be compared, since our comparator only looks at name.\n return new Node_1.NamedNode(indexValue, __EMPTY_NODE);\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n KeyIndex.prototype.toString = function () {\n return '.key';\n };\n return KeyIndex;\n}(Index_1.Index));\nexports.KeyIndex = KeyIndex;\nexports.KEY_INDEX = new KeyIndex();\n\n//# sourceMappingURL=KeyIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/KeyIndex.js\n// module id = 10\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = require(\"./ChildrenNode\");\nvar LeafNode_1 = require(\"./LeafNode\");\nvar Node_1 = require(\"./Node\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar childSet_1 = require(\"./childSet\");\nvar comparators_1 = require(\"./comparators\");\nvar IndexMap_1 = require(\"./IndexMap\");\nvar PriorityIndex_1 = require(\"./indexes/PriorityIndex\");\nvar USE_HINZE = true;\n/**\n * Constructs a snapshot node representing the passed JSON and returns it.\n * @param {*} json JSON to create a node for.\n * @param {?string|?number=} priority Optional priority to use. This will be ignored if the\n * passed JSON contains a .priority property.\n * @return {!Node}\n */\nfunction nodeFromJSON(json, priority) {\n if (priority === void 0) { priority = null; }\n if (json === null) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (typeof json === 'object' && '.priority' in json) {\n priority = json['.priority'];\n }\n util_2.assert(priority === null ||\n typeof priority === 'string' ||\n typeof priority === 'number' ||\n (typeof priority === 'object' && '.sv' in priority), 'Invalid priority type found: ' + typeof priority);\n if (typeof json === 'object' && '.value' in json && json['.value'] !== null) {\n json = json['.value'];\n }\n // Valid leaf nodes include non-objects or server-value wrapper objects\n if (typeof json !== 'object' || '.sv' in json) {\n var jsonLeaf = json;\n return new LeafNode_1.LeafNode(jsonLeaf, nodeFromJSON(priority));\n }\n if (!(json instanceof Array) && USE_HINZE) {\n var children_1 = [];\n var childrenHavePriority_1 = false;\n var hinzeJsonObj_1 = json;\n util_1.forEach(hinzeJsonObj_1, function (key, child) {\n if (typeof key !== 'string' || key.substring(0, 1) !== '.') {\n // Ignore metadata nodes\n var childNode = nodeFromJSON(hinzeJsonObj_1[key]);\n if (!childNode.isEmpty()) {\n childrenHavePriority_1 =\n childrenHavePriority_1 || !childNode.getPriority().isEmpty();\n children_1.push(new Node_1.NamedNode(key, childNode));\n }\n }\n });\n if (children_1.length == 0) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var childSet = childSet_1.buildChildSet(children_1, comparators_1.NAME_ONLY_COMPARATOR, function (namedNode) { return namedNode.name; }, comparators_1.NAME_COMPARATOR);\n if (childrenHavePriority_1) {\n var sortedChildSet = childSet_1.buildChildSet(children_1, PriorityIndex_1.PRIORITY_INDEX.getCompare());\n return new ChildrenNode_1.ChildrenNode(childSet, nodeFromJSON(priority), new IndexMap_1.IndexMap({ '.priority': sortedChildSet }, { '.priority': PriorityIndex_1.PRIORITY_INDEX }));\n }\n else {\n return new ChildrenNode_1.ChildrenNode(childSet, nodeFromJSON(priority), IndexMap_1.IndexMap.Default);\n }\n }\n else {\n var node_1 = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var jsonObj_1 = json;\n util_1.forEach(jsonObj_1, function (key, childData) {\n if (util_1.contains(jsonObj_1, key)) {\n if (key.substring(0, 1) !== '.') {\n // ignore metadata nodes.\n var childNode = nodeFromJSON(childData);\n if (childNode.isLeafNode() || !childNode.isEmpty())\n node_1 = node_1.updateImmediateChild(key, childNode);\n }\n }\n });\n return node_1.updatePriority(nodeFromJSON(priority));\n }\n}\nexports.nodeFromJSON = nodeFromJSON;\nPriorityIndex_1.setNodeFromJSON(nodeFromJSON);\n\n//# sourceMappingURL=nodeFromJSON.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/nodeFromJSON.js\n// module id = 11\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DOMStorageWrapper_1 = require(\"./DOMStorageWrapper\");\nvar MemoryStorage_1 = require(\"./MemoryStorage\");\n/**\n * Helper to create a DOMStorageWrapper or else fall back to MemoryStorage.\n * TODO: Once MemoryStorage and DOMStorageWrapper have a shared interface this method annotation should change\n * to reflect this type\n *\n * @param {string} domStorageName Name of the underlying storage object\n * (e.g. 'localStorage' or 'sessionStorage').\n * @return {?} Turning off type information until a common interface is defined.\n */\nvar createStoragefor = function (domStorageName) {\n try {\n // NOTE: just accessing \"localStorage\" or \"window['localStorage']\" may throw a security exception,\n // so it must be inside the try/catch.\n if (typeof window !== 'undefined' &&\n typeof window[domStorageName] !== 'undefined') {\n // Need to test cache. Just because it's here doesn't mean it works\n var domStorage = window[domStorageName];\n domStorage.setItem('firebase:sentinel', 'cache');\n domStorage.removeItem('firebase:sentinel');\n return new DOMStorageWrapper_1.DOMStorageWrapper(domStorage);\n }\n }\n catch (e) { }\n // Failed to create wrapper. Just return in-memory storage.\n // TODO: log?\n return new MemoryStorage_1.MemoryStorage();\n};\n/** A storage object that lasts across sessions */\nexports.PersistentStorage = createStoragefor('localStorage');\n/** A storage object that only lasts one session */\nexports.SessionStorage = createStoragefor('sessionStorage');\n\n//# sourceMappingURL=storage.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/storage/storage.js\n// module id = 12\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PROTOCOL_VERSION = '5';\nexports.VERSION_PARAM = 'v';\nexports.TRANSPORT_SESSION_PARAM = 's';\nexports.REFERER_PARAM = 'r';\nexports.FORGE_REF = 'f';\nexports.FORGE_DOMAIN = 'firebaseio.com';\nexports.LAST_SESSION_PARAM = 'ls';\nexports.WEBSOCKET = 'websocket';\nexports.LONG_POLLING = 'long_polling';\n\n//# sourceMappingURL=Constants.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/Constants.js\n// module id = 13\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = require(\"../Node\");\nvar util_1 = require(\"../../util/util\");\n/**\n *\n * @constructor\n */\nvar Index = /** @class */ (function () {\n function Index() {\n }\n /**\n * @return {function(!NamedNode, !NamedNode):number} A standalone comparison function for\n * this index\n */\n Index.prototype.getCompare = function () {\n return this.compare.bind(this);\n };\n /**\n * Given a before and after value for a node, determine if the indexed value has changed. Even if they are different,\n * it's possible that the changes are isolated to parts of the snapshot that are not indexed.\n *\n * @param {!Node} oldNode\n * @param {!Node} newNode\n * @return {boolean} True if the portion of the snapshot being indexed changed between oldNode and newNode\n */\n Index.prototype.indexedValueChanged = function (oldNode, newNode) {\n var oldWrapped = new Node_1.NamedNode(util_1.MIN_NAME, oldNode);\n var newWrapped = new Node_1.NamedNode(util_1.MIN_NAME, newNode);\n return this.compare(oldWrapped, newWrapped) !== 0;\n };\n /**\n * @return {!NamedNode} a node wrapper that will sort equal to or less than\n * any other node wrapper, using this index\n */\n Index.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n return Index;\n}());\nexports.Index = Index;\n\n//# sourceMappingURL=Index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/Index.js\n// module id = 14\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar snap_1 = require(\"./snap\");\nvar __childrenNodeConstructor;\n/**\n * LeafNode is a class for storing leaf nodes in a DataSnapshot. It\n * implements Node and stores the value of the node (a string,\n * number, or boolean) accessible via getValue().\n */\nvar LeafNode = /** @class */ (function () {\n /**\n * @implements {Node}\n * @param {!(string|number|boolean|Object)} value_ The value to store in this leaf node.\n * The object type is possible in the event of a deferred value\n * @param {!Node=} priorityNode_ The priority of this node.\n */\n function LeafNode(value_, priorityNode_) {\n if (priorityNode_ === void 0) { priorityNode_ = LeafNode.__childrenNodeConstructor.EMPTY_NODE; }\n this.value_ = value_;\n this.priorityNode_ = priorityNode_;\n this.lazyHash_ = null;\n util_1.assert(this.value_ !== undefined && this.value_ !== null, \"LeafNode shouldn't be created with null/undefined value.\");\n snap_1.validatePriorityNode(this.priorityNode_);\n }\n Object.defineProperty(LeafNode, \"__childrenNodeConstructor\", {\n get: function () {\n return __childrenNodeConstructor;\n },\n set: function (val) {\n __childrenNodeConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /** @inheritDoc */\n LeafNode.prototype.isLeafNode = function () {\n return true;\n };\n /** @inheritDoc */\n LeafNode.prototype.getPriority = function () {\n return this.priorityNode_;\n };\n /** @inheritDoc */\n LeafNode.prototype.updatePriority = function (newPriorityNode) {\n return new LeafNode(this.value_, newPriorityNode);\n };\n /** @inheritDoc */\n LeafNode.prototype.getImmediateChild = function (childName) {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.priorityNode_;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.getChild = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else if (path.getFront() === '.priority') {\n return this.priorityNode_;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.hasChild = function () {\n return false;\n };\n /** @inheritDoc */\n LeafNode.prototype.getPredecessorChildName = function (childName, childNode) {\n return null;\n };\n /** @inheritDoc */\n LeafNode.prototype.updateImmediateChild = function (childName, newChildNode) {\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n }\n else if (newChildNode.isEmpty() && childName !== '.priority') {\n return this;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE\n .updateImmediateChild(childName, newChildNode)\n .updatePriority(this.priorityNode_);\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.updateChild = function (path, newChildNode) {\n var front = path.getFront();\n if (front === null) {\n return newChildNode;\n }\n else if (newChildNode.isEmpty() && front !== '.priority') {\n return this;\n }\n else {\n util_1.assert(front !== '.priority' || path.getLength() === 1, '.priority must be the last token in a path');\n return this.updateImmediateChild(front, LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateChild(path.popFront(), newChildNode));\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.isEmpty = function () {\n return false;\n };\n /** @inheritDoc */\n LeafNode.prototype.numChildren = function () {\n return 0;\n };\n /** @inheritDoc */\n LeafNode.prototype.forEachChild = function (index, action) {\n return false;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.val = function (exportFormat) {\n if (exportFormat && !this.getPriority().isEmpty())\n return {\n '.value': this.getValue(),\n '.priority': this.getPriority().val()\n };\n else\n return this.getValue();\n };\n /** @inheritDoc */\n LeafNode.prototype.hash = function () {\n if (this.lazyHash_ === null) {\n var toHash = '';\n if (!this.priorityNode_.isEmpty())\n toHash +=\n 'priority:' +\n snap_1.priorityHashText(this.priorityNode_.val()) +\n ':';\n var type = typeof this.value_;\n toHash += type + ':';\n if (type === 'number') {\n toHash += util_2.doubleToIEEE754String(this.value_);\n }\n else {\n toHash += this.value_;\n }\n this.lazyHash_ = util_2.sha1(toHash);\n }\n return this.lazyHash_;\n };\n /**\n * Returns the value of the leaf node.\n * @return {Object|string|number|boolean} The value of the node.\n */\n LeafNode.prototype.getValue = function () {\n return this.value_;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.compareTo = function (other) {\n if (other === LeafNode.__childrenNodeConstructor.EMPTY_NODE) {\n return 1;\n }\n else if (other instanceof LeafNode.__childrenNodeConstructor) {\n return -1;\n }\n else {\n util_1.assert(other.isLeafNode(), 'Unknown node type');\n return this.compareToLeafNode_(other);\n }\n };\n /**\n * Comparison specifically for two leaf nodes\n * @param {!LeafNode} otherLeaf\n * @return {!number}\n * @private\n */\n LeafNode.prototype.compareToLeafNode_ = function (otherLeaf) {\n var otherLeafType = typeof otherLeaf.value_;\n var thisLeafType = typeof this.value_;\n var otherIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(otherLeafType);\n var thisIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(thisLeafType);\n util_1.assert(otherIndex >= 0, 'Unknown leaf type: ' + otherLeafType);\n util_1.assert(thisIndex >= 0, 'Unknown leaf type: ' + thisLeafType);\n if (otherIndex === thisIndex) {\n // Same type, compare values\n if (thisLeafType === 'object') {\n // Deferred value nodes are all equal, but we should also never get to this point...\n return 0;\n }\n else {\n // Note that this works because true > false, all others are number or string comparisons\n if (this.value_ < otherLeaf.value_) {\n return -1;\n }\n else if (this.value_ === otherLeaf.value_) {\n return 0;\n }\n else {\n return 1;\n }\n }\n }\n else {\n return thisIndex - otherIndex;\n }\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.withIndex = function () {\n return this;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.isIndexed = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.equals = function (other) {\n /**\n * @inheritDoc\n */\n if (other === this) {\n return true;\n }\n else if (other.isLeafNode()) {\n var otherLeaf = other;\n return (this.value_ === otherLeaf.value_ &&\n this.priorityNode_.equals(otherLeaf.priorityNode_));\n }\n else {\n return false;\n }\n };\n /**\n * The sort order for comparing leaf nodes of different types. If two leaf nodes have\n * the same type, the comparison falls back to their value\n * @type {Array.}\n * @const\n */\n LeafNode.VALUE_TYPE_ORDER = ['object', 'boolean', 'number', 'string'];\n return LeafNode;\n}());\nexports.LeafNode = LeafNode;\n\n//# sourceMappingURL=LeafNode.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/LeafNode.js\n// module id = 15\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * An iterator over an LLRBNode.\n */\nvar SortedMapIterator = /** @class */ (function () {\n /**\n * @template K, V, T\n * @param {LLRBNode|LLRBEmptyNode} node Node to iterate.\n * @param {?K} startKey\n * @param {function(K, K): number} comparator\n * @param {boolean} isReverse_ Whether or not to iterate in reverse\n * @param {(function(K, V):T)=} resultGenerator_\n */\n function SortedMapIterator(node, startKey, comparator, isReverse_, resultGenerator_) {\n if (resultGenerator_ === void 0) { resultGenerator_ = null; }\n this.isReverse_ = isReverse_;\n this.resultGenerator_ = resultGenerator_;\n /** @private\n * @type {Array.}\n */\n this.nodeStack_ = [];\n var cmp = 1;\n while (!node.isEmpty()) {\n node = node;\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse_)\n cmp *= -1;\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse_) {\n node = node.left;\n }\n else {\n node = node.right;\n }\n }\n else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack, but stop iterating;\n this.nodeStack_.push(node);\n break;\n }\n else {\n // This node is greater than our start key, add it to the stack and move to the next one\n this.nodeStack_.push(node);\n if (this.isReverse_) {\n node = node.right;\n }\n else {\n node = node.left;\n }\n }\n }\n }\n SortedMapIterator.prototype.getNext = function () {\n if (this.nodeStack_.length === 0)\n return null;\n var node = this.nodeStack_.pop();\n var result;\n if (this.resultGenerator_)\n result = this.resultGenerator_(node.key, node.value);\n else\n result = { key: node.key, value: node.value };\n if (this.isReverse_) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.right;\n }\n }\n else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.left;\n }\n }\n return result;\n };\n SortedMapIterator.prototype.hasNext = function () {\n return this.nodeStack_.length > 0;\n };\n SortedMapIterator.prototype.peek = function () {\n if (this.nodeStack_.length === 0)\n return null;\n var node = this.nodeStack_[this.nodeStack_.length - 1];\n if (this.resultGenerator_) {\n return this.resultGenerator_(node.key, node.value);\n }\n else {\n return { key: node.key, value: node.value };\n }\n };\n return SortedMapIterator;\n}());\nexports.SortedMapIterator = SortedMapIterator;\n/**\n * Represents a node in a Left-leaning Red-Black tree.\n */\nvar LLRBNode = /** @class */ (function () {\n /**\n * @template K, V\n * @param {!K} key Key associated with this node.\n * @param {!V} value Value associated with this node.\n * @param {?boolean} color Whether this node is red.\n * @param {?(LLRBNode|LLRBEmptyNode)=} left Left child.\n * @param {?(LLRBNode|LLRBEmptyNode)=} right Right child.\n */\n function LLRBNode(key, value, color, left, right) {\n this.key = key;\n this.value = value;\n this.color = color != null ? color : LLRBNode.RED;\n this.left =\n left != null ? left : SortedMap.EMPTY_NODE;\n this.right =\n right != null ? right : SortedMap.EMPTY_NODE;\n }\n /**\n * Returns a copy of the current node, optionally replacing pieces of it.\n *\n * @param {?K} key New key for the node, or null.\n * @param {?V} value New value for the node, or null.\n * @param {?boolean} color New color for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} left New left child for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} right New right child for the node, or null.\n * @return {!LLRBNode} The node copy.\n */\n LLRBNode.prototype.copy = function (key, value, color, left, right) {\n return new LLRBNode(key != null ? key : this.key, value != null ? value : this.value, color != null ? color : this.color, left != null ? left : this.left, right != null ? right : this.right);\n };\n /**\n * @return {number} The total number of nodes in the tree.\n */\n LLRBNode.prototype.count = function () {\n return this.left.count() + 1 + this.right.count();\n };\n /**\n * @return {boolean} True if the tree is empty.\n */\n LLRBNode.prototype.isEmpty = function () {\n return false;\n };\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n LLRBNode.prototype.inorderTraversal = function (action) {\n return (this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action));\n };\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!Object, !Object)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} True if traversal was aborted.\n */\n LLRBNode.prototype.reverseTraversal = function (action) {\n return (this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action));\n };\n /**\n * @return {!Object} The minimum node in the tree.\n * @private\n */\n LLRBNode.prototype.min_ = function () {\n if (this.left.isEmpty()) {\n return this;\n }\n else {\n return this.left.min_();\n }\n };\n /**\n * @return {!K} The maximum key in the tree.\n */\n LLRBNode.prototype.minKey = function () {\n return this.min_().key;\n };\n /**\n * @return {!K} The maximum key in the tree.\n */\n LLRBNode.prototype.maxKey = function () {\n if (this.right.isEmpty()) {\n return this.key;\n }\n else {\n return this.right.maxKey();\n }\n };\n /**\n *\n * @param {!Object} key Key to insert.\n * @param {!Object} value Value to insert.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with the key/value added.\n */\n LLRBNode.prototype.insert = function (key, value, comparator) {\n var cmp, n;\n n = this;\n cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n }\n else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n }\n else {\n n = n.copy(null, null, null, null, n.right.insert(key, value, comparator));\n }\n return n.fixUp_();\n };\n /**\n * @private\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the minimum key removed.\n */\n LLRBNode.prototype.removeMin_ = function () {\n if (this.left.isEmpty()) {\n return SortedMap.EMPTY_NODE;\n }\n var n = this;\n if (!n.left.isRed_() && !n.left.left.isRed_())\n n = n.moveRedLeft_();\n n = n.copy(null, null, null, n.left.removeMin_(), null);\n return n.fixUp_();\n };\n /**\n * @param {!Object} key The key of the item to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the specified item removed.\n */\n LLRBNode.prototype.remove = function (key, comparator) {\n var n, smallest;\n n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed_() && !n.left.left.isRed_()) {\n n = n.moveRedLeft_();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n }\n else {\n if (n.left.isRed_())\n n = n.rotateRight_();\n if (!n.right.isEmpty() && !n.right.isRed_() && !n.right.left.isRed_()) {\n n = n.moveRedRight_();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return SortedMap.EMPTY_NODE;\n }\n else {\n smallest = n.right.min_();\n n = n.copy(smallest.key, smallest.value, null, null, n.right.removeMin_());\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp_();\n };\n /**\n * @private\n * @return {boolean} Whether this is a RED node.\n */\n LLRBNode.prototype.isRed_ = function () {\n return this.color;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree after performing any needed rotations.\n */\n LLRBNode.prototype.fixUp_ = function () {\n var n = this;\n if (n.right.isRed_() && !n.left.isRed_())\n n = n.rotateLeft_();\n if (n.left.isRed_() && n.left.left.isRed_())\n n = n.rotateRight_();\n if (n.left.isRed_() && n.right.isRed_())\n n = n.colorFlip_();\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedLeft.\n */\n LLRBNode.prototype.moveRedLeft_ = function () {\n var n = this.colorFlip_();\n if (n.right.left.isRed_()) {\n n = n.copy(null, null, null, null, n.right.rotateRight_());\n n = n.rotateLeft_();\n n = n.colorFlip_();\n }\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedRight.\n */\n LLRBNode.prototype.moveRedRight_ = function () {\n var n = this.colorFlip_();\n if (n.left.left.isRed_()) {\n n = n.rotateRight_();\n n = n.colorFlip_();\n }\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateLeft.\n */\n LLRBNode.prototype.rotateLeft_ = function () {\n var nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null);\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateRight.\n */\n LLRBNode.prototype.rotateRight_ = function () {\n var nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr);\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after colorFlip.\n */\n LLRBNode.prototype.colorFlip_ = function () {\n var left = this.left.copy(null, null, !this.left.color, null, null);\n var right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n };\n /**\n * For testing.\n *\n * @private\n * @return {boolean} True if all is well.\n */\n LLRBNode.prototype.checkMaxDepth_ = function () {\n var blackDepth = this.check_();\n return Math.pow(2.0, blackDepth) <= this.count() + 1;\n };\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n LLRBNode.prototype.check_ = function () {\n var blackDepth;\n if (this.isRed_() && this.left.isRed_()) {\n throw new Error('Red node has red child(' + this.key + ',' + this.value + ')');\n }\n if (this.right.isRed_()) {\n throw new Error('Right child of (' + this.key + ',' + this.value + ') is red');\n }\n blackDepth = this.left.check_();\n if (blackDepth !== this.right.check_()) {\n throw new Error('Black depths differ');\n }\n else {\n return blackDepth + (this.isRed_() ? 0 : 1);\n }\n };\n LLRBNode.RED = true;\n LLRBNode.BLACK = false;\n return LLRBNode;\n}());\nexports.LLRBNode = LLRBNode;\n/**\n * Represents an empty node (a leaf node in the Red-Black Tree).\n */\nvar LLRBEmptyNode = /** @class */ (function () {\n function LLRBEmptyNode() {\n }\n /**\n * Returns a copy of the current node.\n *\n * @return {!LLRBEmptyNode} The node copy.\n */\n LLRBEmptyNode.prototype.copy = function (key, value, color, left, right) {\n return this;\n };\n /**\n * Returns a copy of the tree, with the specified key/value added.\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with item added.\n */\n LLRBEmptyNode.prototype.insert = function (key, value, comparator) {\n return new LLRBNode(key, value, null);\n };\n /**\n * Returns a copy of the tree, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBEmptyNode} New tree, with item removed.\n */\n LLRBEmptyNode.prototype.remove = function (key, comparator) {\n return this;\n };\n /**\n * @return {number} The total number of nodes in the tree.\n */\n LLRBEmptyNode.prototype.count = function () {\n return 0;\n };\n /**\n * @return {boolean} True if the tree is empty.\n */\n LLRBEmptyNode.prototype.isEmpty = function () {\n return true;\n };\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n LLRBEmptyNode.prototype.inorderTraversal = function (action) {\n return false;\n };\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n LLRBEmptyNode.prototype.reverseTraversal = function (action) {\n return false;\n };\n /**\n * @return {null}\n */\n LLRBEmptyNode.prototype.minKey = function () {\n return null;\n };\n /**\n * @return {null}\n */\n LLRBEmptyNode.prototype.maxKey = function () {\n return null;\n };\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n LLRBEmptyNode.prototype.check_ = function () {\n return 0;\n };\n /**\n * @private\n * @return {boolean} Whether this node is red.\n */\n LLRBEmptyNode.prototype.isRed_ = function () {\n return false;\n };\n return LLRBEmptyNode;\n}());\nexports.LLRBEmptyNode = LLRBEmptyNode;\n/**\n * An immutable sorted map implementation, based on a Left-leaning Red-Black\n * tree.\n */\nvar SortedMap = /** @class */ (function () {\n /**\n * @template K, V\n * @param {function(K, K):number} comparator_ Key comparator.\n * @param {LLRBNode=} root_ (Optional) Root node for the map.\n */\n function SortedMap(comparator_, root_) {\n if (root_ === void 0) { root_ = SortedMap.EMPTY_NODE; }\n this.comparator_ = comparator_;\n this.root_ = root_;\n }\n /**\n * Returns a copy of the map, with the specified key/value added or replaced.\n * (TODO: We should perhaps rename this method to 'put')\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @return {!SortedMap.} New map, with item added.\n */\n SortedMap.prototype.insert = function (key, value) {\n return new SortedMap(this.comparator_, this.root_\n .insert(key, value, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n /**\n * Returns a copy of the map, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @return {!SortedMap.} New map, with item removed.\n */\n SortedMap.prototype.remove = function (key) {\n return new SortedMap(this.comparator_, this.root_\n .remove(key, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n /**\n * Returns the value of the node with the given key, or null.\n *\n * @param {!K} key The key to look up.\n * @return {?V} The value of the node with the given key, or null if the\n * key doesn't exist.\n */\n SortedMap.prototype.get = function (key) {\n var cmp;\n var node = this.root_;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n return node.value;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n };\n /**\n * Returns the key of the item *before* the specified key, or null if key is the first item.\n * @param {K} key The key to find the predecessor of\n * @return {?K} The predecessor key.\n */\n SortedMap.prototype.getPredecessorKey = function (key) {\n var cmp, node = this.root_, rightParent = null;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty())\n node = node.right;\n return node.key;\n }\n else if (rightParent) {\n return rightParent.key;\n }\n else {\n return null; // first item.\n }\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n throw new Error('Attempted to find predecessor key for a nonexistent key. What gives?');\n };\n /**\n * @return {boolean} True if the map is empty.\n */\n SortedMap.prototype.isEmpty = function () {\n return this.root_.isEmpty();\n };\n /**\n * @return {number} The total number of nodes in the map.\n */\n SortedMap.prototype.count = function () {\n return this.root_.count();\n };\n /**\n * @return {?K} The minimum key in the map.\n */\n SortedMap.prototype.minKey = function () {\n return this.root_.minKey();\n };\n /**\n * @return {?K} The maximum key in the map.\n */\n SortedMap.prototype.maxKey = function () {\n return this.root_.maxKey();\n };\n /**\n * Traverses the map in key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!K, !V):*} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n SortedMap.prototype.inorderTraversal = function (action) {\n return this.root_.inorderTraversal(action);\n };\n /**\n * Traverses the map in reverse key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!Object, !Object)} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} True if the traversal was aborted.\n */\n SortedMap.prototype.reverseTraversal = function (action) {\n return this.root_.reverseTraversal(action);\n };\n /**\n * Returns an iterator over the SortedMap.\n * @template T\n * @param {(function(K, V):T)=} resultGenerator\n * @return {SortedMapIterator.} The iterator.\n */\n SortedMap.prototype.getIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root_, null, this.comparator_, false, resultGenerator);\n };\n SortedMap.prototype.getIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root_, key, this.comparator_, false, resultGenerator);\n };\n SortedMap.prototype.getReverseIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root_, key, this.comparator_, true, resultGenerator);\n };\n SortedMap.prototype.getReverseIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root_, null, this.comparator_, true, resultGenerator);\n };\n /**\n * Always use the same empty node, to reduce memory.\n * @const\n */\n SortedMap.EMPTY_NODE = new LLRBEmptyNode();\n return SortedMap;\n}());\nexports.SortedMap = SortedMap;\n\n//# sourceMappingURL=SortedMap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/SortedMap.js\n// module id = 16\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ServerValues_1 = require(\"./util/ServerValues\");\nvar nodeFromJSON_1 = require(\"./snap/nodeFromJSON\");\nvar Path_1 = require(\"./util/Path\");\nvar SparseSnapshotTree_1 = require(\"./SparseSnapshotTree\");\nvar SyncTree_1 = require(\"./SyncTree\");\nvar SnapshotHolder_1 = require(\"./SnapshotHolder\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util/util\");\nvar util_3 = require(\"@firebase/util\");\nvar AuthTokenProvider_1 = require(\"./AuthTokenProvider\");\nvar StatsManager_1 = require(\"./stats/StatsManager\");\nvar StatsReporter_1 = require(\"./stats/StatsReporter\");\nvar StatsListener_1 = require(\"./stats/StatsListener\");\nvar EventQueue_1 = require(\"./view/EventQueue\");\nvar PersistentConnection_1 = require(\"./PersistentConnection\");\nvar ReadonlyRestClient_1 = require(\"./ReadonlyRestClient\");\nvar Database_1 = require(\"../api/Database\");\nvar INTERRUPT_REASON = 'repo_interrupt';\n/**\n * A connection to a single data repository.\n */\nvar Repo = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo_\n * @param {boolean} forceRestClient\n * @param {!FirebaseApp} app\n */\n function Repo(repoInfo_, forceRestClient, app) {\n var _this = this;\n this.repoInfo_ = repoInfo_;\n this.app = app;\n this.dataUpdateCount = 0;\n this.statsListener_ = null;\n this.eventQueue_ = new EventQueue_1.EventQueue();\n this.nextWriteId_ = 1;\n this.interceptServerDataCallback_ = null;\n // A list of data pieces and paths to be set when this client disconnects.\n this.onDisconnect_ = new SparseSnapshotTree_1.SparseSnapshotTree();\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @type {?PersistentConnection}\n */\n this.persistentConnection_ = null;\n /** @type {!AuthTokenProvider} */\n var authTokenProvider = new AuthTokenProvider_1.AuthTokenProvider(app);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo_);\n if (forceRestClient || util_2.beingCrawled()) {\n this.server_ = new ReadonlyRestClient_1.ReadonlyRestClient(this.repoInfo_, this.onDataUpdate_.bind(this), authTokenProvider);\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n }\n else {\n var authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if (typeof authOverride !== 'object') {\n throw new Error('Only objects are supported for option databaseAuthVariableOverride');\n }\n try {\n util_1.stringify(authOverride);\n }\n catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n this.persistentConnection_ = new PersistentConnection_1.PersistentConnection(this.repoInfo_, this.onDataUpdate_.bind(this), this.onConnectStatus_.bind(this), this.onServerInfoUpdate_.bind(this), authTokenProvider, authOverride);\n this.server_ = this.persistentConnection_;\n }\n authTokenProvider.addTokenChangeListener(function (token) {\n _this.server_.refreshAuthToken(token);\n });\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = StatsManager_1.StatsManager.getOrCreateReporter(repoInfo_, function () { return new StatsReporter_1.StatsReporter(_this.stats_, _this.server_); });\n this.transactions_init_();\n // Used for .info.\n this.infoData_ = new SnapshotHolder_1.SnapshotHolder();\n this.infoSyncTree_ = new SyncTree_1.SyncTree({\n startListening: function (query, tag, currentHashFn, onComplete) {\n var infoEvents = [];\n var node = _this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = _this.infoSyncTree_.applyServerOverwrite(query.path, node);\n setTimeout(function () {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: function () { }\n });\n this.updateInfo_('connected', false);\n this.serverSyncTree_ = new SyncTree_1.SyncTree({\n startListening: function (query, tag, currentHashFn, onComplete) {\n _this.server_.listen(query, currentHashFn, tag, function (status, data) {\n var events = onComplete(status, data);\n _this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: function (query, tag) {\n _this.server_.unlisten(query, tag);\n }\n });\n }\n /**\n * @return {string} The URL corresponding to the root of this Firebase.\n */\n Repo.prototype.toString = function () {\n return ((this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host);\n };\n /**\n * @return {!string} The namespace represented by the repo.\n */\n Repo.prototype.name = function () {\n return this.repoInfo_.namespace;\n };\n /**\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\n */\n Repo.prototype.serverTime = function () {\n var offsetNode = this.infoData_.getNode(new Path_1.Path('.info/serverTimeOffset'));\n var offset = offsetNode.val() || 0;\n return new Date().getTime() + offset;\n };\n /**\n * Generate ServerValues using some variables from the repo object.\n * @return {!Object}\n */\n Repo.prototype.generateServerValues = function () {\n return ServerValues_1.generateWithValues({\n timestamp: this.serverTime()\n });\n };\n /**\n * Called by realtime when we get new messages from the server.\n *\n * @private\n * @param {string} pathString\n * @param {*} data\n * @param {boolean} isMerge\n * @param {?number} tag\n */\n Repo.prototype.onDataUpdate_ = function (pathString, data, isMerge, tag) {\n // For testing.\n this.dataUpdateCount++;\n var path = new Path_1.Path(pathString);\n data = this.interceptServerDataCallback_\n ? this.interceptServerDataCallback_(pathString, data)\n : data;\n var events = [];\n if (tag) {\n if (isMerge) {\n var taggedChildren = util_3.map(data, function (raw) {\n return nodeFromJSON_1.nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyTaggedQueryMerge(path, taggedChildren, tag);\n }\n else {\n var taggedSnap = nodeFromJSON_1.nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(path, taggedSnap, tag);\n }\n }\n else if (isMerge) {\n var changedChildren = util_3.map(data, function (raw) {\n return nodeFromJSON_1.nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n }\n else {\n var snap = nodeFromJSON_1.nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n var affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n };\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @param {?function(!string, *):*} callback\n * @private\n */\n Repo.prototype.interceptServerData_ = function (callback) {\n this.interceptServerDataCallback_ = callback;\n };\n /**\n * @param {!boolean} connectStatus\n * @private\n */\n Repo.prototype.onConnectStatus_ = function (connectStatus) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n };\n /**\n * @param {!Object} updates\n * @private\n */\n Repo.prototype.onServerInfoUpdate_ = function (updates) {\n var _this = this;\n util_2.each(updates, function (value, key) {\n _this.updateInfo_(key, value);\n });\n };\n /**\n *\n * @param {!string} pathString\n * @param {*} value\n * @private\n */\n Repo.prototype.updateInfo_ = function (pathString, value) {\n var path = new Path_1.Path('/.info/' + pathString);\n var newNode = nodeFromJSON_1.nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n var events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n };\n /**\n * @return {!number}\n * @private\n */\n Repo.prototype.getNextWriteId_ = function () {\n return this.nextWriteId_++;\n };\n /**\n * @param {!Path} path\n * @param {*} newVal\n * @param {number|string|null} newPriority\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.setWithPriority = function (path, newVal, newPriority, onComplete) {\n var _this = this;\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, newPriority);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n var writeId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, writeId, true);\n this.eventQueue_.queueEvents(events);\n this.server_.put(path.toString(), newNodeUnresolved.val(/*export=*/ true), function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n util_2.warn('set at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId, !success);\n _this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n var affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n };\n /**\n * @param {!Path} path\n * @param {!Object} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.update = function (path, childrenToMerge, onComplete) {\n var _this = this;\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n // Start with our existing data and merge each child into it.\n var empty = true;\n var serverValues = this.generateServerValues();\n var changedChildren = {};\n util_3.forEach(childrenToMerge, function (changedKey, changedValue) {\n empty = false;\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(changedValue);\n changedChildren[changedKey] = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n });\n if (!empty) {\n var writeId_1 = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserMerge(path, changedChildren, writeId_1);\n this.eventQueue_.queueEvents(events);\n this.server_.merge(path.toString(), childrenToMerge, function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n util_2.warn('update at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId_1, !success);\n var affectedPath = clearEvents.length > 0 ? _this.rerunTransactions_(path) : path;\n _this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n util_3.forEach(childrenToMerge, function (changedPath) {\n var affectedPath = _this.abortTransactions_(path.child(changedPath));\n _this.rerunTransactions_(affectedPath);\n });\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n }\n else {\n util_2.log(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n };\n /**\n * Applies all of the changes stored up in the onDisconnect_ tree.\n * @private\n */\n Repo.prototype.runOnDisconnectEvents_ = function () {\n var _this = this;\n this.log_('onDisconnectEvents');\n var serverValues = this.generateServerValues();\n var resolvedOnDisconnectTree = ServerValues_1.resolveDeferredValueTree(this.onDisconnect_, serverValues);\n var events = [];\n resolvedOnDisconnectTree.forEachTree(Path_1.Path.Empty, function (path, snap) {\n events = events.concat(_this.serverSyncTree_.applyServerOverwrite(path, snap));\n var affectedPath = _this.abortTransactions_(path);\n _this.rerunTransactions_(affectedPath);\n });\n this.onDisconnect_ = new SparseSnapshotTree_1.SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path_1.Path.Empty, events);\n };\n /**\n * @param {!Path} path\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectCancel = function (path, onComplete) {\n var _this = this;\n this.server_.onDisconnectCancel(path.toString(), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.forget(path);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectSet = function (path, value, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_1.nodeFromJSON(value);\n this.server_.onDisconnectPut(path.toString(), newNode.val(/*export=*/ true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {*} priority\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectSetWithPriority = function (path, value, priority, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_1.nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(path.toString(), newNode.val(/*export=*/ true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectUpdate = function (path, childrenToMerge, onComplete) {\n var _this = this;\n if (util_3.isEmpty(childrenToMerge)) {\n util_2.log(\"onDisconnect().update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n this.server_.onDisconnectMerge(path.toString(), childrenToMerge, function (status, errorReason) {\n if (status === 'ok') {\n util_3.forEach(childrenToMerge, function (childName, childNode) {\n var newChildNode = nodeFromJSON_1.nodeFromJSON(childNode);\n _this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n */\n Repo.prototype.addEventCallbackForQuery = function (query, eventRegistration) {\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(query, eventRegistration);\n }\n else {\n events = this.serverSyncTree_.addEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n /**\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration\n */\n Repo.prototype.removeEventCallbackForQuery = function (query, eventRegistration) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n else {\n events = this.serverSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n Repo.prototype.interrupt = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n };\n Repo.prototype.resume = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n };\n Repo.prototype.stats = function (showDelta) {\n if (showDelta === void 0) { showDelta = false; }\n if (typeof console === 'undefined')\n return;\n var stats;\n if (showDelta) {\n if (!this.statsListener_)\n this.statsListener_ = new StatsListener_1.StatsListener(this.stats_);\n stats = this.statsListener_.get();\n }\n else {\n stats = this.stats_.get();\n }\n var longestName = Object.keys(stats).reduce(function (previousValue, currentValue) {\n return Math.max(currentValue.length, previousValue);\n }, 0);\n util_3.forEach(stats, function (stat, value) {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (var i = stat.length; i < longestName + 2; i++)\n stat += ' ';\n console.log(stat + value);\n });\n };\n Repo.prototype.statsIncrementCounter = function (metric) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n };\n /**\n * @param {...*} var_args\n * @private\n */\n Repo.prototype.log_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n util_2.log.apply(void 0, [prefix].concat(var_args));\n };\n /**\n * @param {?function(?Error, *=)} callback\n * @param {!string} status\n * @param {?string=} errorReason\n */\n Repo.prototype.callOnCompleteCallback = function (callback, status, errorReason) {\n if (callback) {\n util_2.exceptionGuard(function () {\n if (status == 'ok') {\n callback(null);\n }\n else {\n var code = (status || 'error').toUpperCase();\n var message = code;\n if (errorReason)\n message += ': ' + errorReason;\n var error = new Error(message);\n error.code = code;\n callback(error);\n }\n });\n }\n };\n Object.defineProperty(Repo.prototype, \"database\", {\n get: function () {\n return this.__database || (this.__database = new Database_1.Database(this));\n },\n enumerable: true,\n configurable: true\n });\n return Repo;\n}());\nexports.Repo = Repo;\n\n//# sourceMappingURL=Repo.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/Repo.js\n// module id = 17\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully\n * initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.\n * initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks\n * whether a node potentially had children removed due to a filter.\n */\nvar CacheNode = /** @class */ (function () {\n /**\n * @param {!Node} node_\n * @param {boolean} fullyInitialized_\n * @param {boolean} filtered_\n */\n function CacheNode(node_, fullyInitialized_, filtered_) {\n this.node_ = node_;\n this.fullyInitialized_ = fullyInitialized_;\n this.filtered_ = filtered_;\n }\n /**\n * Returns whether this node was fully initialized with either server data or a complete overwrite by the client\n * @return {boolean}\n */\n CacheNode.prototype.isFullyInitialized = function () {\n return this.fullyInitialized_;\n };\n /**\n * Returns whether this node is potentially missing children due to a filter applied to the node\n * @return {boolean}\n */\n CacheNode.prototype.isFiltered = function () {\n return this.filtered_;\n };\n /**\n * @param {!Path} path\n * @return {boolean}\n */\n CacheNode.prototype.isCompleteForPath = function (path) {\n if (path.isEmpty()) {\n return this.isFullyInitialized() && !this.filtered_;\n }\n var childKey = path.getFront();\n return this.isCompleteForChild(childKey);\n };\n /**\n * @param {!string} key\n * @return {boolean}\n */\n CacheNode.prototype.isCompleteForChild = function (key) {\n return ((this.isFullyInitialized() && !this.filtered_) || this.node_.hasChild(key));\n };\n /**\n * @return {!Node}\n */\n CacheNode.prototype.getNode = function () {\n return this.node_;\n };\n return CacheNode;\n}());\nexports.CacheNode = CacheNode;\n\n//# sourceMappingURL=CacheNode.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/CacheNode.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar onDisconnect_1 = require(\"./onDisconnect\");\nvar TransactionResult_1 = require(\"./TransactionResult\");\nvar util_1 = require(\"../core/util/util\");\nvar NextPushId_1 = require(\"../core/util/NextPushId\");\nvar Query_1 = require(\"./Query\");\nvar Repo_1 = require(\"../core/Repo\");\nvar Path_1 = require(\"../core/util/Path\");\nvar QueryParams_1 = require(\"../core/view/QueryParams\");\nvar validation_1 = require(\"../core/util/validation\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\nvar SyncPoint_1 = require(\"../core/SyncPoint\");\nvar Reference = /** @class */ (function (_super) {\n __extends(Reference, _super);\n /**\n * Call options:\n * new Reference(Repo, Path) or\n * new Reference(url: string, string|RepoManager)\n *\n * Externally - this is the firebase.database.Reference type.\n *\n * @param {!Repo} repo\n * @param {(!Path)} path\n * @extends {Query}\n */\n function Reference(repo, path) {\n var _this = this;\n if (!(repo instanceof Repo_1.Repo)) {\n throw new Error('new Reference() no longer supported - use app.database().');\n }\n // call Query's constructor, passing in the repo and path.\n _this = _super.call(this, repo, path, QueryParams_1.QueryParams.DEFAULT, false) || this;\n return _this;\n }\n /** @return {?string} */\n Reference.prototype.getKey = function () {\n util_2.validateArgCount('Reference.key', 0, 0, arguments.length);\n if (this.path.isEmpty())\n return null;\n else\n return this.path.getBack();\n };\n /**\n * @param {!(string|Path)} pathString\n * @return {!Reference}\n */\n Reference.prototype.child = function (pathString) {\n util_2.validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n }\n else if (!(pathString instanceof Path_1.Path)) {\n if (this.path.getFront() === null)\n validation_1.validateRootPathString('Reference.child', 1, pathString, false);\n else\n validation_1.validatePathString('Reference.child', 1, pathString, false);\n }\n return new Reference(this.repo, this.path.child(pathString));\n };\n /** @return {?Reference} */\n Reference.prototype.getParent = function () {\n util_2.validateArgCount('Reference.parent', 0, 0, arguments.length);\n var parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n };\n /** @return {!Reference} */\n Reference.prototype.getRoot = function () {\n util_2.validateArgCount('Reference.root', 0, 0, arguments.length);\n var ref = this;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n };\n /** @return {!Database} */\n Reference.prototype.databaseProp = function () {\n return this.repo.database;\n };\n /**\n * @param {*} newVal\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.set = function (newVal, onComplete) {\n util_2.validateArgCount('Reference.set', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.set', this.path);\n validation_1.validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n util_2.validateCallback('Reference.set', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path, newVal, \n /*priority=*/ null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.update = function (objectToMerge, onComplete) {\n util_2.validateArgCount('Reference.update', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.update', this.path);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n util_1.warn('Passing an Array to Firebase.update() is deprecated. ' +\n 'Use set() if you want to overwrite the existing data, or ' +\n 'an Object with integer keys if you really do want to ' +\n 'only update some of the children.');\n }\n validation_1.validateFirebaseMergeDataArg('Reference.update', 1, objectToMerge, this.path, false);\n util_2.validateCallback('Reference.update', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.update(this.path, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} newVal\n * @param {string|number|null} newPriority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.setWithPriority = function (newVal, newPriority, onComplete) {\n util_2.validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validation_1.validateWritablePath('Reference.setWithPriority', this.path);\n validation_1.validateFirebaseDataArg('Reference.setWithPriority', 1, newVal, this.path, false);\n validation_1.validatePriority('Reference.setWithPriority', 2, newPriority, false);\n util_2.validateCallback('Reference.setWithPriority', 3, onComplete, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.setWithPriority failed: ' +\n this.getKey() +\n ' is a read-only object.';\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path, newVal, newPriority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.remove = function (onComplete) {\n util_2.validateArgCount('Reference.remove', 0, 1, arguments.length);\n validation_1.validateWritablePath('Reference.remove', this.path);\n util_2.validateCallback('Reference.remove', 1, onComplete, true);\n return this.set(null, onComplete);\n };\n /**\n * @param {function(*):*} transactionUpdate\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\n * @param {boolean=} applyLocally\n * @return {!Promise}\n */\n Reference.prototype.transaction = function (transactionUpdate, onComplete, applyLocally) {\n util_2.validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validation_1.validateWritablePath('Reference.transaction', this.path);\n util_2.validateCallback('Reference.transaction', 1, transactionUpdate, false);\n util_2.validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validation_1.validateBoolean('Reference.transaction', 3, applyLocally, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.transaction failed: ' +\n this.getKey() +\n ' is a read-only object.';\n if (applyLocally === undefined)\n applyLocally = true;\n var deferred = new util_3.Deferred();\n if (typeof onComplete === 'function') {\n deferred.promise.catch(function () { });\n }\n var promiseComplete = function (error, committed, snapshot) {\n if (error) {\n deferred.reject(error);\n }\n else {\n deferred.resolve(new TransactionResult_1.TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(this.path, transactionUpdate, promiseComplete, applyLocally);\n return deferred.promise;\n };\n /**\n * @param {string|number|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.setPriority = function (priority, onComplete) {\n util_2.validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.setPriority', this.path);\n validation_1.validatePriority('Reference.setPriority', 1, priority, false);\n util_2.validateCallback('Reference.setPriority', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path.child('.priority'), priority, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*=} value\n * @param {function(?Error)=} onComplete\n * @return {!Reference}\n */\n Reference.prototype.push = function (value, onComplete) {\n util_2.validateArgCount('Reference.push', 0, 2, arguments.length);\n validation_1.validateWritablePath('Reference.push', this.path);\n validation_1.validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n util_2.validateCallback('Reference.push', 2, onComplete, true);\n var now = this.repo.serverTime();\n var name = NextPushId_1.nextPushId(now);\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n var thennablePushRef = this.child(name);\n var pushRef = this.child(name);\n var promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(function () { return pushRef; });\n }\n else {\n promise = Promise.resolve(pushRef);\n }\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n if (typeof onComplete === 'function') {\n promise.catch(function () { });\n }\n return thennablePushRef;\n };\n /**\n * @return {!OnDisconnect}\n */\n Reference.prototype.onDisconnect = function () {\n validation_1.validateWritablePath('Reference.onDisconnect', this.path);\n return new onDisconnect_1.OnDisconnect(this.repo, this.path);\n };\n Object.defineProperty(Reference.prototype, \"database\", {\n get: function () {\n return this.databaseProp();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"key\", {\n get: function () {\n return this.getKey();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"parent\", {\n get: function () {\n return this.getParent();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n get: function () {\n return this.getRoot();\n },\n enumerable: true,\n configurable: true\n });\n return Reference;\n}(Query_1.Query));\nexports.Reference = Reference;\n/**\n * Define reference constructor in various modules\n *\n * We are doing this here to avoid several circular\n * dependency issues\n */\nQuery_1.Query.__referenceConstructor = Reference;\nSyncPoint_1.SyncPoint.__referenceConstructor = Reference;\n\n//# sourceMappingURL=Reference.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/Reference.js\n// module id = 21\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar validation_1 = require(\"../core/util/validation\");\nvar Path_1 = require(\"../core/util/Path\");\nvar PriorityIndex_1 = require(\"../core/snap/indexes/PriorityIndex\");\n/**\n * Class representing a firebase data snapshot. It wraps a SnapshotNode and\n * surfaces the public methods (val, forEach, etc.) we want to expose.\n */\nvar DataSnapshot = /** @class */ (function () {\n /**\n * @param {!Node} node_ A SnapshotNode to wrap.\n * @param {!Reference} ref_ The ref of the location this snapshot came from.\n * @param {!Index} index_ The iteration order for this snapshot\n */\n function DataSnapshot(node_, ref_, index_) {\n this.node_ = node_;\n this.ref_ = ref_;\n this.index_ = index_;\n }\n /**\n * Retrieves the snapshot contents as JSON. Returns null if the snapshot is\n * empty.\n *\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n DataSnapshot.prototype.val = function () {\n util_1.validateArgCount('DataSnapshot.val', 0, 0, arguments.length);\n return this.node_.val();\n };\n /**\n * Returns the snapshot contents as JSON, including priorities of node. Suitable for exporting\n * the entire node contents.\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n DataSnapshot.prototype.exportVal = function () {\n util_1.validateArgCount('DataSnapshot.exportVal', 0, 0, arguments.length);\n return this.node_.val(true);\n };\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n DataSnapshot.prototype.toJSON = function () {\n // Optional spacer argument is unnecessary because we're depending on recursion rather than stringifying the content\n util_1.validateArgCount('DataSnapshot.toJSON', 0, 1, arguments.length);\n return this.exportVal();\n };\n /**\n * Returns whether the snapshot contains a non-null value.\n *\n * @return {boolean} Whether the snapshot contains a non-null value, or is empty.\n */\n DataSnapshot.prototype.exists = function () {\n util_1.validateArgCount('DataSnapshot.exists', 0, 0, arguments.length);\n return !this.node_.isEmpty();\n };\n /**\n * Returns a DataSnapshot of the specified child node's contents.\n *\n * @param {!string} childPathString Path to a child.\n * @return {!DataSnapshot} DataSnapshot for child node.\n */\n DataSnapshot.prototype.child = function (childPathString) {\n util_1.validateArgCount('DataSnapshot.child', 0, 1, arguments.length);\n // Ensure the childPath is a string (can be a number)\n childPathString = String(childPathString);\n validation_1.validatePathString('DataSnapshot.child', 1, childPathString, false);\n var childPath = new Path_1.Path(childPathString);\n var childRef = this.ref_.child(childPath);\n return new DataSnapshot(this.node_.getChild(childPath), childRef, PriorityIndex_1.PRIORITY_INDEX);\n };\n /**\n * Returns whether the snapshot contains a child at the specified path.\n *\n * @param {!string} childPathString Path to a child.\n * @return {boolean} Whether the child exists.\n */\n DataSnapshot.prototype.hasChild = function (childPathString) {\n util_1.validateArgCount('DataSnapshot.hasChild', 1, 1, arguments.length);\n validation_1.validatePathString('DataSnapshot.hasChild', 1, childPathString, false);\n var childPath = new Path_1.Path(childPathString);\n return !this.node_.getChild(childPath).isEmpty();\n };\n /**\n * Returns the priority of the object, or null if no priority was set.\n *\n * @return {string|number|null} The priority.\n */\n DataSnapshot.prototype.getPriority = function () {\n util_1.validateArgCount('DataSnapshot.getPriority', 0, 0, arguments.length);\n // typecast here because we never return deferred values or internal priorities (MAX_PRIORITY)\n return this.node_.getPriority().val();\n };\n /**\n * Iterates through child nodes and calls the specified action for each one.\n *\n * @param {function(!DataSnapshot)} action Callback function to be called\n * for each child.\n * @return {boolean} True if forEach was canceled by action returning true for\n * one of the child nodes.\n */\n DataSnapshot.prototype.forEach = function (action) {\n var _this = this;\n util_1.validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);\n util_1.validateCallback('DataSnapshot.forEach', 1, action, false);\n if (this.node_.isLeafNode())\n return false;\n var childrenNode = this.node_;\n // Sanitize the return value to a boolean. ChildrenNode.forEachChild has a weird return type...\n return !!childrenNode.forEachChild(this.index_, function (key, node) {\n return action(new DataSnapshot(node, _this.ref_.child(key), PriorityIndex_1.PRIORITY_INDEX));\n });\n };\n /**\n * Returns whether this DataSnapshot has children.\n * @return {boolean} True if the DataSnapshot contains 1 or more child nodes.\n */\n DataSnapshot.prototype.hasChildren = function () {\n util_1.validateArgCount('DataSnapshot.hasChildren', 0, 0, arguments.length);\n if (this.node_.isLeafNode())\n return false;\n else\n return !this.node_.isEmpty();\n };\n Object.defineProperty(DataSnapshot.prototype, \"key\", {\n get: function () {\n return this.ref_.getKey();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the number of children for this DataSnapshot.\n * @return {number} The number of children that this DataSnapshot contains.\n */\n DataSnapshot.prototype.numChildren = function () {\n util_1.validateArgCount('DataSnapshot.numChildren', 0, 0, arguments.length);\n return this.node_.numChildren();\n };\n /**\n * @return {Reference} The Firebase reference for the location this snapshot's data came from.\n */\n DataSnapshot.prototype.getRef = function () {\n util_1.validateArgCount('DataSnapshot.ref', 0, 0, arguments.length);\n return this.ref_;\n };\n Object.defineProperty(DataSnapshot.prototype, \"ref\", {\n get: function () {\n return this.getRef();\n },\n enumerable: true,\n configurable: true\n });\n return DataSnapshot;\n}());\nexports.DataSnapshot = DataSnapshot;\n\n//# sourceMappingURL=DataSnapshot.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/DataSnapshot.js\n// module id = 22\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SortedMap_1 = require(\"./SortedMap\");\nvar Path_1 = require(\"./Path\");\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"@firebase/util\");\nvar emptyChildrenSingleton;\n/**\n * Singleton empty children collection.\n *\n * @const\n * @type {!SortedMap.>}\n */\nvar EmptyChildren = function () {\n if (!emptyChildrenSingleton) {\n emptyChildrenSingleton = new SortedMap_1.SortedMap(util_1.stringCompare);\n }\n return emptyChildrenSingleton;\n};\n/**\n * A tree with immutable elements.\n */\nvar ImmutableTree = /** @class */ (function () {\n /**\n * @template T\n * @param {?T} value\n * @param {SortedMap.>=} children\n */\n function ImmutableTree(value, children) {\n if (children === void 0) { children = EmptyChildren(); }\n this.value = value;\n this.children = children;\n }\n /**\n * @template T\n * @param {!Object.} obj\n * @return {!ImmutableTree.}\n */\n ImmutableTree.fromObject = function (obj) {\n var tree = ImmutableTree.Empty;\n util_2.forEach(obj, function (childPath, childSnap) {\n tree = tree.set(new Path_1.Path(childPath), childSnap);\n });\n return tree;\n };\n /**\n * True if the value is empty and there are no children\n * @return {boolean}\n */\n ImmutableTree.prototype.isEmpty = function () {\n return this.value === null && this.children.isEmpty();\n };\n /**\n * Given a path and predicate, return the first node and the path to that node\n * where the predicate returns true.\n *\n * TODO Do a perf test -- If we're creating a bunch of {path: value:} objects\n * on the way back out, it may be better to pass down a pathSoFar obj.\n *\n * @param {!Path} relativePath The remainder of the path\n * @param {function(T):boolean} predicate The predicate to satisfy to return a\n * node\n * @return {?{path:!Path, value:!T}}\n */\n ImmutableTree.prototype.findRootMostMatchingPathAndValue = function (relativePath, predicate) {\n if (this.value != null && predicate(this.value)) {\n return { path: Path_1.Path.Empty, value: this.value };\n }\n else {\n if (relativePath.isEmpty()) {\n return null;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child !== null) {\n var childExistingPathAndValue = child.findRootMostMatchingPathAndValue(relativePath.popFront(), predicate);\n if (childExistingPathAndValue != null) {\n var fullPath = new Path_1.Path(front).child(childExistingPathAndValue.path);\n return { path: fullPath, value: childExistingPathAndValue.value };\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n }\n }\n };\n /**\n * Find, if it exists, the shortest subpath of the given path that points a defined\n * value in the tree\n * @param {!Path} relativePath\n * @return {?{path: !Path, value: !T}}\n */\n ImmutableTree.prototype.findRootMostValueAndPath = function (relativePath) {\n return this.findRootMostMatchingPathAndValue(relativePath, function () { return true; });\n };\n /**\n * @param {!Path} relativePath\n * @return {!ImmutableTree.} The subtree at the given path\n */\n ImmutableTree.prototype.subtree = function (relativePath) {\n if (relativePath.isEmpty()) {\n return this;\n }\n else {\n var front = relativePath.getFront();\n var childTree = this.children.get(front);\n if (childTree !== null) {\n return childTree.subtree(relativePath.popFront());\n }\n else {\n return ImmutableTree.Empty;\n }\n }\n };\n /**\n * Sets a value at the specified path.\n *\n * @param {!Path} relativePath Path to set value at.\n * @param {?T} toSet Value to set.\n * @return {!ImmutableTree.} Resulting tree.\n */\n ImmutableTree.prototype.set = function (relativePath, toSet) {\n if (relativePath.isEmpty()) {\n return new ImmutableTree(toSet, this.children);\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front) || ImmutableTree.Empty;\n var newChild = child.set(relativePath.popFront(), toSet);\n var newChildren = this.children.insert(front, newChild);\n return new ImmutableTree(this.value, newChildren);\n }\n };\n /**\n * Removes the value at the specified path.\n *\n * @param {!Path} relativePath Path to value to remove.\n * @return {!ImmutableTree.} Resulting tree.\n */\n ImmutableTree.prototype.remove = function (relativePath) {\n if (relativePath.isEmpty()) {\n if (this.children.isEmpty()) {\n return ImmutableTree.Empty;\n }\n else {\n return new ImmutableTree(null, this.children);\n }\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child) {\n var newChild = child.remove(relativePath.popFront());\n var newChildren = void 0;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n }\n else {\n newChildren = this.children.insert(front, newChild);\n }\n if (this.value === null && newChildren.isEmpty()) {\n return ImmutableTree.Empty;\n }\n else {\n return new ImmutableTree(this.value, newChildren);\n }\n }\n else {\n return this;\n }\n }\n };\n /**\n * Gets a value from the tree.\n *\n * @param {!Path} relativePath Path to get value for.\n * @return {?T} Value at path, or null.\n */\n ImmutableTree.prototype.get = function (relativePath) {\n if (relativePath.isEmpty()) {\n return this.value;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child) {\n return child.get(relativePath.popFront());\n }\n else {\n return null;\n }\n }\n };\n /**\n * Replace the subtree at the specified path with the given new tree.\n *\n * @param {!Path} relativePath Path to replace subtree for.\n * @param {!ImmutableTree} newTree New tree.\n * @return {!ImmutableTree} Resulting tree.\n */\n ImmutableTree.prototype.setTree = function (relativePath, newTree) {\n if (relativePath.isEmpty()) {\n return newTree;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front) || ImmutableTree.Empty;\n var newChild = child.setTree(relativePath.popFront(), newTree);\n var newChildren = void 0;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n }\n else {\n newChildren = this.children.insert(front, newChild);\n }\n return new ImmutableTree(this.value, newChildren);\n }\n };\n /**\n * Performs a depth first fold on this tree. Transforms a tree into a single\n * value, given a function that operates on the path to a node, an optional\n * current value, and a map of child names to folded subtrees\n * @template V\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n */\n ImmutableTree.prototype.fold = function (fn) {\n return this.fold_(Path_1.Path.Empty, fn);\n };\n /**\n * Recursive helper for public-facing fold() method\n * @template V\n * @param {!Path} pathSoFar\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n * @private\n */\n ImmutableTree.prototype.fold_ = function (pathSoFar, fn) {\n var accum = {};\n this.children.inorderTraversal(function (childKey, childTree) {\n accum[childKey] = childTree.fold_(pathSoFar.child(childKey), fn);\n });\n return fn(pathSoFar, this.value, accum);\n };\n /**\n * Find the first matching value on the given path. Return the result of applying f to it.\n * @template V\n * @param {!Path} path\n * @param {!function(!Path, !T):?V} f\n * @return {?V}\n */\n ImmutableTree.prototype.findOnPath = function (path, f) {\n return this.findOnPath_(path, Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.findOnPath_ = function (pathToFollow, pathSoFar, f) {\n var result = this.value ? f(pathSoFar, this.value) : false;\n if (result) {\n return result;\n }\n else {\n if (pathToFollow.isEmpty()) {\n return null;\n }\n else {\n var front = pathToFollow.getFront();\n var nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.findOnPath_(pathToFollow.popFront(), pathSoFar.child(front), f);\n }\n else {\n return null;\n }\n }\n }\n };\n /**\n *\n * @param {!Path} path\n * @param {!function(!Path, !T)} f\n * @returns {!ImmutableTree.}\n */\n ImmutableTree.prototype.foreachOnPath = function (path, f) {\n return this.foreachOnPath_(path, Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.foreachOnPath_ = function (pathToFollow, currentRelativePath, f) {\n if (pathToFollow.isEmpty()) {\n return this;\n }\n else {\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n var front = pathToFollow.getFront();\n var nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.foreachOnPath_(pathToFollow.popFront(), currentRelativePath.child(front), f);\n }\n else {\n return ImmutableTree.Empty;\n }\n }\n };\n /**\n * Calls the given function for each node in the tree that has a value.\n *\n * @param {function(!Path, !T)} f A function to be called with\n * the path from the root of the tree to a node, and the value at that node.\n * Called in depth-first order.\n */\n ImmutableTree.prototype.foreach = function (f) {\n this.foreach_(Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.foreach_ = function (currentRelativePath, f) {\n this.children.inorderTraversal(function (childName, childTree) {\n childTree.foreach_(currentRelativePath.child(childName), f);\n });\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n };\n /**\n *\n * @param {function(string, !T)} f\n */\n ImmutableTree.prototype.foreachChild = function (f) {\n this.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value) {\n f(childName, childTree.value);\n }\n });\n };\n ImmutableTree.Empty = new ImmutableTree(null);\n return ImmutableTree;\n}());\nexports.ImmutableTree = ImmutableTree;\n\n//# sourceMappingURL=ImmutableTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/ImmutableTree.js\n// module id = 23\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Change_1 = require(\"../Change\");\nvar ChildrenNode_1 = require(\"../../snap/ChildrenNode\");\nvar PriorityIndex_1 = require(\"../../snap/indexes/PriorityIndex\");\n/**\n * Doesn't really filter nodes but applies an index to the node and keeps track of any changes\n *\n * @constructor\n * @implements {NodeFilter}\n * @param {!Index} index\n */\nvar IndexedFilter = /** @class */ (function () {\n function IndexedFilter(index_) {\n this.index_ = index_;\n }\n IndexedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n util_1.assert(snap.isIndexed(this.index_), 'A node must be indexed if only a child is updated');\n var oldChild = snap.getImmediateChild(key);\n // Check if anything actually changed.\n if (oldChild.getChild(affectedPath).equals(newChild.getChild(affectedPath))) {\n // There's an edge case where a child can enter or leave the view because affectedPath was set to null.\n // In this case, affectedPath will appear null in both the old and new snapshots. So we need\n // to avoid treating these cases as \"nothing changed.\"\n if (oldChild.isEmpty() == newChild.isEmpty()) {\n // Nothing changed.\n // This assert should be valid, but it's expensive (can dominate perf testing) so don't actually do it.\n //assert(oldChild.equals(newChild), 'Old and new snapshots should be equal.');\n return snap;\n }\n }\n if (optChangeAccumulator != null) {\n if (newChild.isEmpty()) {\n if (snap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(key, oldChild));\n }\n else {\n util_1.assert(snap.isLeafNode(), 'A child remove without an old child only makes sense on a leaf node');\n }\n }\n else if (oldChild.isEmpty()) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childAddedChange(key, newChild));\n }\n else {\n optChangeAccumulator.trackChildChange(Change_1.Change.childChangedChange(key, newChild, oldChild));\n }\n }\n if (snap.isLeafNode() && newChild.isEmpty()) {\n return snap;\n }\n else {\n // Make sure the node is indexed\n return snap.updateImmediateChild(key, newChild).withIndex(this.index_);\n }\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (optChangeAccumulator != null) {\n if (!oldSnap.isLeafNode()) {\n oldSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!newSnap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(key, childNode));\n }\n });\n }\n if (!newSnap.isLeafNode()) {\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (oldSnap.hasChild(key)) {\n var oldChild = oldSnap.getImmediateChild(key);\n if (!oldChild.equals(childNode)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childChangedChange(key, childNode, oldChild));\n }\n }\n else {\n optChangeAccumulator.trackChildChange(Change_1.Change.childAddedChange(key, childNode));\n }\n });\n }\n }\n return newSnap.withIndex(this.index_);\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n if (oldSnap.isEmpty()) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n else {\n return oldSnap.updatePriority(newPriority);\n }\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.filtersNodes = function () {\n return false;\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.getIndexedFilter = function () {\n return this;\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n return IndexedFilter;\n}());\nexports.IndexedFilter = IndexedFilter;\n\n//# sourceMappingURL=IndexedFilter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/filter/IndexedFilter.js\n// module id = 24\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar StatsCollection_1 = require(\"./StatsCollection\");\nvar StatsManager = /** @class */ (function () {\n function StatsManager() {\n }\n StatsManager.getCollection = function (repoInfo) {\n var hashString = repoInfo.toString();\n if (!this.collections_[hashString]) {\n this.collections_[hashString] = new StatsCollection_1.StatsCollection();\n }\n return this.collections_[hashString];\n };\n StatsManager.getOrCreateReporter = function (repoInfo, creatorFunction) {\n var hashString = repoInfo.toString();\n if (!this.reporters_[hashString]) {\n this.reporters_[hashString] = creatorFunction();\n }\n return this.reporters_[hashString];\n };\n StatsManager.collections_ = {};\n StatsManager.reporters_ = {};\n return StatsManager;\n}());\nexports.StatsManager = StatsManager;\n\n//# sourceMappingURL=StatsManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsManager.js\n// module id = 25\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Repo_1 = require(\"./Repo\");\nvar util_2 = require(\"./util/util\");\nvar parser_1 = require(\"./util/libs/parser\");\nvar validation_1 = require(\"./util/validation\");\nrequire(\"./Repo_transaction\");\n/** @const {string} */\nvar DATABASE_URL_OPTION = 'databaseURL';\nvar _staticInstance;\n/**\n * Creates and caches Repo instances.\n */\nvar RepoManager = /** @class */ (function () {\n function RepoManager() {\n /**\n * @private {!Object.>}\n */\n this.repos_ = {};\n /**\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\n * @private {boolean}\n */\n this.useRestClient_ = false;\n }\n RepoManager.getInstance = function () {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n };\n // TODO(koss): Remove these functions unless used in tests?\n RepoManager.prototype.interrupt = function () {\n for (var appName in this.repos_) {\n for (var dbUrl in this.repos_[appName]) {\n this.repos_[appName][dbUrl].interrupt();\n }\n }\n };\n RepoManager.prototype.resume = function () {\n for (var appName in this.repos_) {\n for (var dbUrl in this.repos_[appName]) {\n this.repos_[appName][dbUrl].resume();\n }\n }\n };\n /**\n * This function should only ever be called to CREATE a new database instance.\n *\n * @param {!FirebaseApp} app\n * @return {!Database}\n */\n RepoManager.prototype.databaseFromApp = function (app, url) {\n var dbUrl = url || app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n util_2.fatal(\"Can't determine Firebase Database URL. Be sure to include \" +\n DATABASE_URL_OPTION +\n ' option when calling firebase.intializeApp().');\n }\n var parsedUrl = parser_1.parseRepoInfo(dbUrl);\n var repoInfo = parsedUrl.repoInfo;\n validation_1.validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n util_2.fatal('Database URL must point to the root of a Firebase Database ' +\n '(not including a child path).');\n }\n var repo = this.createRepo(repoInfo, app);\n return repo.database;\n };\n /**\n * Remove the repo and make sure it is disconnected.\n *\n * @param {!Repo} repo\n */\n RepoManager.prototype.deleteRepo = function (repo) {\n var appRepos = util_1.safeGet(this.repos_, repo.app.name);\n // This should never happen...\n if (!appRepos || util_1.safeGet(appRepos, repo.repoInfo_.toURLString()) !== repo) {\n util_2.fatal(\"Database \" + repo.app.name + \"(\" + repo.repoInfo_ + \") has already been deleted.\");\n }\n repo.interrupt();\n delete appRepos[repo.repoInfo_.toURLString()];\n };\n /**\n * Ensures a repo doesn't already exist and then creates one using the\n * provided app.\n *\n * @param {!RepoInfo} repoInfo The metadata about the Repo\n * @param {!FirebaseApp} app\n * @return {!Repo} The Repo object for the specified server / repoName.\n */\n RepoManager.prototype.createRepo = function (repoInfo, app) {\n var appRepos = util_1.safeGet(this.repos_, app.name);\n if (!appRepos) {\n appRepos = {};\n this.repos_[app.name] = appRepos;\n }\n var repo = util_1.safeGet(appRepos, repoInfo.toURLString());\n if (repo) {\n util_2.fatal('Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.');\n }\n repo = new Repo_1.Repo(repoInfo, this.useRestClient_, app);\n appRepos[repoInfo.toURLString()] = repo;\n return repo;\n };\n /**\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\n * @param {boolean} forceRestClient\n */\n RepoManager.prototype.forceRestClient = function (forceRestClient) {\n this.useRestClient_ = forceRestClient;\n };\n return RepoManager;\n}());\nexports.RepoManager = RepoManager;\n\n//# sourceMappingURL=RepoManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/RepoManager.js\n// module id = 26\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../core/util/util\");\nvar parser_1 = require(\"../core/util/libs/parser\");\nvar Path_1 = require(\"../core/util/Path\");\nvar Reference_1 = require(\"./Reference\");\nvar Repo_1 = require(\"../core/Repo\");\nvar RepoManager_1 = require(\"../core/RepoManager\");\nvar util_2 = require(\"@firebase/util\");\nvar validation_1 = require(\"../core/util/validation\");\n/**\n * Class representing a firebase database.\n * @implements {FirebaseService}\n */\nvar Database = /** @class */ (function () {\n /**\n * The constructor should not be called by users of our public API.\n * @param {!Repo} repo_\n */\n function Database(repo_) {\n this.repo_ = repo_;\n if (!(repo_ instanceof Repo_1.Repo)) {\n util_1.fatal(\"Don't call new Database() directly - please use firebase.database().\");\n }\n /** @type {Reference} */\n this.root_ = new Reference_1.Reference(repo_, Path_1.Path.Empty);\n this.INTERNAL = new DatabaseInternals(this);\n }\n Object.defineProperty(Database.prototype, \"app\", {\n get: function () {\n return this.repo_.app;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns a reference to the root or the path specified in opt_pathString.\n * @param {string=} pathString\n * @return {!Reference} Firebase reference.\n */\n Database.prototype.ref = function (pathString) {\n this.checkDeleted_('ref');\n util_2.validateArgCount('database.ref', 0, 1, arguments.length);\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n };\n /**\n * Returns a reference to the root or the path specified in url.\n * We throw a exception if the url is not in the same domain as the\n * current repo.\n * @param {string} url\n * @return {!Reference} Firebase reference.\n */\n Database.prototype.refFromURL = function (url) {\n /** @const {string} */\n var apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n util_2.validateArgCount(apiName, 1, 1, arguments.length);\n var parsedURL = parser_1.parseRepoInfo(url);\n validation_1.validateUrl(apiName, 1, parsedURL);\n var repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== this.repo_.repoInfo_.host) {\n util_1.fatal(apiName +\n ': Host name does not match the current database: ' +\n '(found ' +\n repoInfo.host +\n ' but expected ' +\n this.repo_.repoInfo_.host +\n ')');\n }\n return this.ref(parsedURL.path.toString());\n };\n /**\n * @param {string} apiName\n */\n Database.prototype.checkDeleted_ = function (apiName) {\n if (this.repo_ === null) {\n util_1.fatal('Cannot call ' + apiName + ' on a deleted database.');\n }\n };\n // Make individual repo go offline.\n Database.prototype.goOffline = function () {\n util_2.validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n };\n Database.prototype.goOnline = function () {\n util_2.validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n };\n Database.ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n return Database;\n}());\nexports.Database = Database;\nvar DatabaseInternals = /** @class */ (function () {\n /** @param {!Database} database */\n function DatabaseInternals(database) {\n this.database = database;\n }\n /** @return {Promise} */\n DatabaseInternals.prototype.delete = function () {\n this.database.checkDeleted_('delete');\n RepoManager_1.RepoManager.getInstance().deleteRepo(this.database.repo_);\n this.database.repo_ = null;\n this.database.root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return Promise.resolve();\n };\n return DatabaseInternals;\n}());\nexports.DatabaseInternals = DatabaseInternals;\n\n//# sourceMappingURL=Database.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/Database.js\n// module id = 32\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"../Path\");\nvar RepoInfo_1 = require(\"../../RepoInfo\");\nvar util_1 = require(\"../util\");\n/**\n * @param {!string} pathString\n * @return {string}\n */\nfunction decodePath(pathString) {\n var pathStringDecoded = '';\n var pieces = pathString.split('/');\n for (var i = 0; i < pieces.length; i++) {\n if (pieces[i].length > 0) {\n var piece = pieces[i];\n try {\n piece = decodeURIComponent(piece.replace(/\\+/g, ' '));\n }\n catch (e) { }\n pathStringDecoded += '/' + piece;\n }\n }\n return pathStringDecoded;\n}\n/**\n *\n * @param {!string} dataURL\n * @return {{repoInfo: !RepoInfo, path: !Path}}\n */\nexports.parseRepoInfo = function (dataURL) {\n var parsedUrl = exports.parseURL(dataURL), namespace = parsedUrl.subdomain;\n if (parsedUrl.domain === 'firebase') {\n util_1.fatal(parsedUrl.host +\n ' is no longer supported. ' +\n 'Please use .firebaseio.com instead');\n }\n // Catch common error of uninitialized namespace value.\n if (!namespace || namespace == 'undefined') {\n util_1.fatal('Cannot parse Firebase url. Please use https://.firebaseio.com');\n }\n if (!parsedUrl.secure) {\n util_1.warnIfPageIsSecure();\n }\n var webSocketOnly = parsedUrl.scheme === 'ws' || parsedUrl.scheme === 'wss';\n return {\n repoInfo: new RepoInfo_1.RepoInfo(parsedUrl.host, parsedUrl.secure, namespace, webSocketOnly),\n path: new Path_1.Path(parsedUrl.pathString)\n };\n};\n/**\n *\n * @param {!string} dataURL\n * @return {{host: string, port: number, domain: string, subdomain: string, secure: boolean, scheme: string, pathString: string}}\n */\nexports.parseURL = function (dataURL) {\n // Default to empty strings in the event of a malformed string.\n var host = '', domain = '', subdomain = '', pathString = '';\n // Always default to SSL, unless otherwise specified.\n var secure = true, scheme = 'https', port = 443;\n // Don't do any validation here. The caller is responsible for validating the result of parsing.\n if (typeof dataURL === 'string') {\n // Parse scheme.\n var colonInd = dataURL.indexOf('//');\n if (colonInd >= 0) {\n scheme = dataURL.substring(0, colonInd - 1);\n dataURL = dataURL.substring(colonInd + 2);\n }\n // Parse host and path.\n var slashInd = dataURL.indexOf('/');\n if (slashInd === -1) {\n slashInd = dataURL.length;\n }\n host = dataURL.substring(0, slashInd);\n pathString = decodePath(dataURL.substring(slashInd));\n var parts = host.split('.');\n if (parts.length === 3) {\n // Normalize namespaces to lowercase to share storage / connection.\n domain = parts[1];\n subdomain = parts[0].toLowerCase();\n }\n else if (parts.length === 2) {\n domain = parts[0];\n }\n // If we have a port, use scheme for determining if it's secure.\n colonInd = host.indexOf(':');\n if (colonInd >= 0) {\n secure = scheme === 'https' || scheme === 'wss';\n port = parseInt(host.substring(colonInd + 1), 10);\n }\n }\n return {\n host: host,\n port: port,\n domain: domain,\n subdomain: subdomain,\n secure: secure,\n scheme: scheme,\n pathString: pathString\n };\n};\n\n//# sourceMappingURL=parser.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/libs/parser.js\n// module id = 33\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar storage_1 = require(\"./storage/storage\");\nvar Constants_1 = require(\"../realtime/Constants\");\n/**\n * A class that holds metadata about a Repo object\n *\n * @constructor\n */\nvar RepoInfo = /** @class */ (function () {\n /**\n * @param {string} host Hostname portion of the url for the repo\n * @param {boolean} secure Whether or not this repo is accessed over ssl\n * @param {string} namespace The namespace represented by the repo\n * @param {boolean} webSocketOnly Whether to prefer websockets over all other transports (used by Nest).\n * @param {string=} persistenceKey Override the default session persistence storage key\n */\n function RepoInfo(host, secure, namespace, webSocketOnly, persistenceKey) {\n if (persistenceKey === void 0) { persistenceKey = ''; }\n this.secure = secure;\n this.namespace = namespace;\n this.webSocketOnly = webSocketOnly;\n this.persistenceKey = persistenceKey;\n this.host = host.toLowerCase();\n this.domain = this.host.substr(this.host.indexOf('.') + 1);\n this.internalHost = storage_1.PersistentStorage.get('host:' + host) || this.host;\n }\n RepoInfo.prototype.needsQueryParam = function () {\n return this.host !== this.internalHost;\n };\n RepoInfo.prototype.isCacheableHost = function () {\n return this.internalHost.substr(0, 2) === 's-';\n };\n RepoInfo.prototype.isDemoHost = function () {\n return this.domain === 'firebaseio-demo.com';\n };\n RepoInfo.prototype.isCustomHost = function () {\n return (this.domain !== 'firebaseio.com' && this.domain !== 'firebaseio-demo.com');\n };\n RepoInfo.prototype.updateHost = function (newHost) {\n if (newHost !== this.internalHost) {\n this.internalHost = newHost;\n if (this.isCacheableHost()) {\n storage_1.PersistentStorage.set('host:' + this.host, this.internalHost);\n }\n }\n };\n /**\n * Returns the websocket URL for this repo\n * @param {string} type of connection\n * @param {Object} params list\n * @return {string} The URL for this repo\n */\n RepoInfo.prototype.connectionURL = function (type, params) {\n util_1.assert(typeof type === 'string', 'typeof type must == string');\n util_1.assert(typeof params === 'object', 'typeof params must == object');\n var connURL;\n if (type === Constants_1.WEBSOCKET) {\n connURL =\n (this.secure ? 'wss://' : 'ws://') + this.internalHost + '/.ws?';\n }\n else if (type === Constants_1.LONG_POLLING) {\n connURL =\n (this.secure ? 'https://' : 'http://') + this.internalHost + '/.lp?';\n }\n else {\n throw new Error('Unknown connection type: ' + type);\n }\n if (this.needsQueryParam()) {\n params['ns'] = this.namespace;\n }\n var pairs = [];\n util_2.forEach(params, function (key, value) {\n pairs.push(key + '=' + value);\n });\n return connURL + pairs.join('&');\n };\n /** @return {string} */\n RepoInfo.prototype.toString = function () {\n var str = this.toURLString();\n if (this.persistenceKey) {\n str += '<' + this.persistenceKey + '>';\n }\n return str;\n };\n /** @return {string} */\n RepoInfo.prototype.toURLString = function () {\n return (this.secure ? 'https://' : 'http://') + this.host;\n };\n return RepoInfo;\n}());\nexports.RepoInfo = RepoInfo;\n\n//# sourceMappingURL=RepoInfo.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/RepoInfo.js\n// module id = 34\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar validation_1 = require(\"../core/util/validation\");\nvar util_2 = require(\"../core/util/util\");\nvar util_3 = require(\"@firebase/util\");\n/**\n * @constructor\n */\nvar OnDisconnect = /** @class */ (function () {\n /**\n * @param {!Repo} repo_\n * @param {!Path} path_\n */\n function OnDisconnect(repo_, path_) {\n this.repo_ = repo_;\n this.path_ = path_;\n }\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.cancel = function (onComplete) {\n util_1.validateArgCount('OnDisconnect.cancel', 0, 1, arguments.length);\n util_1.validateCallback('OnDisconnect.cancel', 1, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectCancel(this.path_, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.remove = function (onComplete) {\n util_1.validateArgCount('OnDisconnect.remove', 0, 1, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.remove', this.path_);\n util_1.validateCallback('OnDisconnect.remove', 1, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSet(this.path_, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} value\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.set = function (value, onComplete) {\n util_1.validateArgCount('OnDisconnect.set', 1, 2, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.set', this.path_);\n validation_1.validateFirebaseDataArg('OnDisconnect.set', 1, value, this.path_, false);\n util_1.validateCallback('OnDisconnect.set', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSet(this.path_, value, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} value\n * @param {number|string|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.setWithPriority = function (value, priority, onComplete) {\n util_1.validateArgCount('OnDisconnect.setWithPriority', 2, 3, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.setWithPriority', this.path_);\n validation_1.validateFirebaseDataArg('OnDisconnect.setWithPriority', 1, value, this.path_, false);\n validation_1.validatePriority('OnDisconnect.setWithPriority', 2, priority, false);\n util_1.validateCallback('OnDisconnect.setWithPriority', 3, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSetWithPriority(this.path_, value, priority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.update = function (objectToMerge, onComplete) {\n util_1.validateArgCount('OnDisconnect.update', 1, 2, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.update', this.path_);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n util_2.warn('Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the ' +\n 'existing data, or an Object with integer keys if you really do want to only update some of the children.');\n }\n validation_1.validateFirebaseMergeDataArg('OnDisconnect.update', 1, objectToMerge, this.path_, false);\n util_1.validateCallback('OnDisconnect.update', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectUpdate(this.path_, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n return OnDisconnect;\n}());\nexports.OnDisconnect = OnDisconnect;\n\n//# sourceMappingURL=onDisconnect.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/onDisconnect.js\n// module id = 35\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar KeyIndex_1 = require(\"../core/snap/indexes/KeyIndex\");\nvar PriorityIndex_1 = require(\"../core/snap/indexes/PriorityIndex\");\nvar ValueIndex_1 = require(\"../core/snap/indexes/ValueIndex\");\nvar PathIndex_1 = require(\"../core/snap/indexes/PathIndex\");\nvar util_2 = require(\"../core/util/util\");\nvar Path_1 = require(\"../core/util/Path\");\nvar validation_1 = require(\"../core/util/validation\");\nvar util_3 = require(\"@firebase/util\");\nvar EventRegistration_1 = require(\"../core/view/EventRegistration\");\nvar util_4 = require(\"@firebase/util\");\nvar __referenceConstructor;\n/**\n * A Query represents a filter to be applied to a firebase location. This object purely represents the\n * query expression (and exposes our public API to build the query). The actual query logic is in ViewBase.js.\n *\n * Since every Firebase reference is a query, Firebase inherits from this object.\n */\nvar Query = /** @class */ (function () {\n function Query(repo, path, queryParams_, orderByCalled_) {\n this.repo = repo;\n this.path = path;\n this.queryParams_ = queryParams_;\n this.orderByCalled_ = orderByCalled_;\n }\n Object.defineProperty(Query, \"__referenceConstructor\", {\n get: function () {\n util_1.assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n },\n set: function (val) {\n __referenceConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Validates start/end values for queries.\n * @param {!QueryParams} params\n * @private\n */\n Query.validateQueryEndpoints_ = function (params) {\n var startNode = null;\n var endNode = null;\n if (params.hasStart()) {\n startNode = params.getIndexStartValue();\n }\n if (params.hasEnd()) {\n endNode = params.getIndexEndValue();\n }\n if (params.getIndex() === KeyIndex_1.KEY_INDEX) {\n var tooManyArgsError = 'Query: When ordering by key, you may only pass one argument to ' +\n 'startAt(), endAt(), or equalTo().';\n var wrongArgTypeError = 'Query: When ordering by key, the argument passed to startAt(), endAt(),' +\n 'or equalTo() must be a string.';\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n if (startName != util_2.MIN_NAME) {\n throw new Error(tooManyArgsError);\n }\n else if (typeof startNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n if (endName != util_2.MAX_NAME) {\n throw new Error(tooManyArgsError);\n }\n else if (typeof endNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n }\n else if (params.getIndex() === PriorityIndex_1.PRIORITY_INDEX) {\n if ((startNode != null && !validation_1.isValidPriority(startNode)) ||\n (endNode != null && !validation_1.isValidPriority(endNode))) {\n throw new Error('Query: When ordering by priority, the first argument passed to startAt(), ' +\n 'endAt(), or equalTo() must be a valid priority value (null, a number, or a string).');\n }\n }\n else {\n util_1.assert(params.getIndex() instanceof PathIndex_1.PathIndex ||\n params.getIndex() === ValueIndex_1.VALUE_INDEX, 'unknown index type.');\n if ((startNode != null && typeof startNode === 'object') ||\n (endNode != null && typeof endNode === 'object')) {\n throw new Error('Query: First argument passed to startAt(), endAt(), or equalTo() cannot be ' +\n 'an object.');\n }\n }\n };\n /**\n * Validates that limit* has been called with the correct combination of parameters\n * @param {!QueryParams} params\n * @private\n */\n Query.validateLimit_ = function (params) {\n if (params.hasStart() &&\n params.hasEnd() &&\n params.hasLimit() &&\n !params.hasAnchoredLimit()) {\n throw new Error(\"Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.\");\n }\n };\n /**\n * Validates that no other order by call has been made\n * @param {!string} fnName\n * @private\n */\n Query.prototype.validateNoPreviousOrderByCall_ = function (fnName) {\n if (this.orderByCalled_ === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n };\n /**\n * @return {!QueryParams}\n */\n Query.prototype.getQueryParams = function () {\n return this.queryParams_;\n };\n /**\n * @return {!Reference}\n */\n Query.prototype.getRef = function () {\n util_3.validateArgCount('Query.ref', 0, 0, arguments.length);\n // This is a slight hack. We cannot goog.require('fb.api.Firebase'), since Firebase requires fb.api.Query.\n // However, we will always export 'Firebase' to the global namespace, so it's guaranteed to exist by the time this\n // method gets called.\n return new Query.__referenceConstructor(this.repo, this.path);\n };\n /**\n * @param {!string} eventType\n * @param {!function(DataSnapshot, string=)} callback\n * @param {(function(Error)|Object)=} cancelCallbackOrContext\n * @param {Object=} context\n * @return {!function(DataSnapshot, string=)}\n */\n Query.prototype.on = function (eventType, callback, cancelCallbackOrContext, context) {\n util_3.validateArgCount('Query.on', 2, 4, arguments.length);\n validation_1.validateEventType('Query.on', 1, eventType, false);\n util_3.validateCallback('Query.on', 2, callback, false);\n var ret = Query.getCancelAndContextArgs_('Query.on', cancelCallbackOrContext, context);\n if (eventType === 'value') {\n this.onValueEvent(callback, ret.cancel, ret.context);\n }\n else {\n var callbacks = {};\n callbacks[eventType] = callback;\n this.onChildEvent(callbacks, ret.cancel, ret.context);\n }\n return callback;\n };\n /**\n * @param {!function(!DataSnapshot)} callback\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n Query.prototype.onValueEvent = function (callback, cancelCallback, context) {\n var container = new EventRegistration_1.ValueEventRegistration(callback, cancelCallback || null, context || null);\n this.repo.addEventCallbackForQuery(this, container);\n };\n /**\n * @param {!Object.} callbacks\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n Query.prototype.onChildEvent = function (callbacks, cancelCallback, context) {\n var container = new EventRegistration_1.ChildEventRegistration(callbacks, cancelCallback, context);\n this.repo.addEventCallbackForQuery(this, container);\n };\n /**\n * @param {string=} eventType\n * @param {(function(!DataSnapshot, ?string=))=} callback\n * @param {Object=} context\n */\n Query.prototype.off = function (eventType, callback, context) {\n util_3.validateArgCount('Query.off', 0, 3, arguments.length);\n validation_1.validateEventType('Query.off', 1, eventType, true);\n util_3.validateCallback('Query.off', 2, callback, true);\n util_3.validateContextObject('Query.off', 3, context, true);\n var container = null;\n var callbacks = null;\n if (eventType === 'value') {\n var valueCallback = callback || null;\n container = new EventRegistration_1.ValueEventRegistration(valueCallback, null, context || null);\n }\n else if (eventType) {\n if (callback) {\n callbacks = {};\n callbacks[eventType] = callback;\n }\n container = new EventRegistration_1.ChildEventRegistration(callbacks, null, context || null);\n }\n this.repo.removeEventCallbackForQuery(this, container);\n };\n /**\n * Attaches a listener, waits for the first event, and then removes the listener\n * @param {!string} eventType\n * @param {!function(!DataSnapshot, string=)} userCallback\n * @param cancelOrContext\n * @param context\n * @return {!firebase.Promise}\n */\n Query.prototype.once = function (eventType, userCallback, cancelOrContext, context) {\n var _this = this;\n util_3.validateArgCount('Query.once', 1, 4, arguments.length);\n validation_1.validateEventType('Query.once', 1, eventType, false);\n util_3.validateCallback('Query.once', 2, userCallback, true);\n var ret = Query.getCancelAndContextArgs_('Query.once', cancelOrContext, context);\n // TODO: Implement this more efficiently (in particular, use 'get' wire protocol for 'value' event)\n // TODO: consider actually wiring the callbacks into the promise. We cannot do this without a breaking change\n // because the API currently expects callbacks will be called synchronously if the data is cached, but this is\n // against the Promise specification.\n var firstCall = true;\n var deferred = new util_4.Deferred();\n // A dummy error handler in case a user wasn't expecting promises\n deferred.promise.catch(function () { });\n var onceCallback = function (snapshot) {\n // NOTE: Even though we unsubscribe, we may get called multiple times if a single action (e.g. set() with JSON)\n // triggers multiple events (e.g. child_added or child_changed).\n if (firstCall) {\n firstCall = false;\n _this.off(eventType, onceCallback);\n if (userCallback) {\n userCallback.bind(ret.context)(snapshot);\n }\n deferred.resolve(snapshot);\n }\n };\n this.on(eventType, onceCallback, \n /*cancel=*/ function (err) {\n _this.off(eventType, onceCallback);\n if (ret.cancel)\n ret.cancel.bind(ret.context)(err);\n deferred.reject(err);\n });\n return deferred.promise;\n };\n /**\n * Set a limit and anchor it to the start of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n Query.prototype.limitToFirst = function (limit) {\n util_3.validateArgCount('Query.limitToFirst', 1, 1, arguments.length);\n if (typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0) {\n throw new Error('Query.limitToFirst: First argument must be a positive integer.');\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error('Query.limitToFirst: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).');\n }\n return new Query(this.repo, this.path, this.queryParams_.limitToFirst(limit), this.orderByCalled_);\n };\n /**\n * Set a limit and anchor it to the end of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n Query.prototype.limitToLast = function (limit) {\n util_3.validateArgCount('Query.limitToLast', 1, 1, arguments.length);\n if (typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0) {\n throw new Error('Query.limitToLast: First argument must be a positive integer.');\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error('Query.limitToLast: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).');\n }\n return new Query(this.repo, this.path, this.queryParams_.limitToLast(limit), this.orderByCalled_);\n };\n /**\n * Given a child path, return a new query ordered by the specified grandchild path.\n * @param {!string} path\n * @return {!Query}\n */\n Query.prototype.orderByChild = function (path) {\n util_3.validateArgCount('Query.orderByChild', 1, 1, arguments.length);\n if (path === '$key') {\n throw new Error('Query.orderByChild: \"$key\" is invalid. Use Query.orderByKey() instead.');\n }\n else if (path === '$priority') {\n throw new Error('Query.orderByChild: \"$priority\" is invalid. Use Query.orderByPriority() instead.');\n }\n else if (path === '$value') {\n throw new Error('Query.orderByChild: \"$value\" is invalid. Use Query.orderByValue() instead.');\n }\n validation_1.validatePathString('Query.orderByChild', 1, path, false);\n this.validateNoPreviousOrderByCall_('Query.orderByChild');\n var parsedPath = new Path_1.Path(path);\n if (parsedPath.isEmpty()) {\n throw new Error('Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.');\n }\n var index = new PathIndex_1.PathIndex(parsedPath);\n var newParams = this.queryParams_.orderBy(index);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the KeyIndex\n * @return {!Query}\n */\n Query.prototype.orderByKey = function () {\n util_3.validateArgCount('Query.orderByKey', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByKey');\n var newParams = this.queryParams_.orderBy(KeyIndex_1.KEY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the PriorityIndex\n * @return {!Query}\n */\n Query.prototype.orderByPriority = function () {\n util_3.validateArgCount('Query.orderByPriority', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByPriority');\n var newParams = this.queryParams_.orderBy(PriorityIndex_1.PRIORITY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the ValueIndex\n * @return {!Query}\n */\n Query.prototype.orderByValue = function () {\n util_3.validateArgCount('Query.orderByValue', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByValue');\n var newParams = this.queryParams_.orderBy(ValueIndex_1.VALUE_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n Query.prototype.startAt = function (value, name) {\n if (value === void 0) { value = null; }\n util_3.validateArgCount('Query.startAt', 0, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.startAt', 1, value, this.path, true);\n validation_1.validateKey('Query.startAt', 2, name, true);\n var newParams = this.queryParams_.startAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasStart()) {\n throw new Error('Query.startAt: Starting point was already set (by another call to startAt ' +\n 'or equalTo).');\n }\n // Calling with no params tells us to start at the beginning.\n if (value === undefined) {\n value = null;\n name = null;\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n };\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n Query.prototype.endAt = function (value, name) {\n if (value === void 0) { value = null; }\n util_3.validateArgCount('Query.endAt', 0, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.endAt', 1, value, this.path, true);\n validation_1.validateKey('Query.endAt', 2, name, true);\n var newParams = this.queryParams_.endAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasEnd()) {\n throw new Error('Query.endAt: Ending point was already set (by another call to endAt or ' +\n 'equalTo).');\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n };\n /**\n * Load the selection of children with exactly the specified value, and, optionally,\n * the specified name.\n * @param {number|string|boolean|null} value\n * @param {string=} name\n * @return {!Query}\n */\n Query.prototype.equalTo = function (value, name) {\n util_3.validateArgCount('Query.equalTo', 1, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.equalTo', 1, value, this.path, false);\n validation_1.validateKey('Query.equalTo', 2, name, true);\n if (this.queryParams_.hasStart()) {\n throw new Error('Query.equalTo: Starting point was already set (by another call to startAt or ' +\n 'equalTo).');\n }\n if (this.queryParams_.hasEnd()) {\n throw new Error('Query.equalTo: Ending point was already set (by another call to endAt or ' +\n 'equalTo).');\n }\n return this.startAt(value, name).endAt(value, name);\n };\n /**\n * @return {!string} URL for this location.\n */\n Query.prototype.toString = function () {\n util_3.validateArgCount('Query.toString', 0, 0, arguments.length);\n return this.repo.toString() + this.path.toUrlEncodedString();\n };\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users.\n Query.prototype.toJSON = function () {\n // An optional spacer argument is unnecessary for a string.\n util_3.validateArgCount('Query.toJSON', 0, 1, arguments.length);\n return this.toString();\n };\n /**\n * An object representation of the query parameters used by this Query.\n * @return {!Object}\n */\n Query.prototype.queryObject = function () {\n return this.queryParams_.getQueryObject();\n };\n /**\n * @return {!string}\n */\n Query.prototype.queryIdentifier = function () {\n var obj = this.queryObject();\n var id = util_2.ObjectToUniqueKey(obj);\n return id === '{}' ? 'default' : id;\n };\n /**\n * Return true if this query and the provided query are equivalent; otherwise, return false.\n * @param {Query} other\n * @return {boolean}\n */\n Query.prototype.isEqual = function (other) {\n util_3.validateArgCount('Query.isEqual', 1, 1, arguments.length);\n if (!(other instanceof Query)) {\n var error = 'Query.isEqual failed: First argument must be an instance of firebase.database.Query.';\n throw new Error(error);\n }\n var sameRepo = this.repo === other.repo;\n var samePath = this.path.equals(other.path);\n var sameQueryIdentifier = this.queryIdentifier() === other.queryIdentifier();\n return sameRepo && samePath && sameQueryIdentifier;\n };\n /**\n * Helper used by .on and .once to extract the context and or cancel arguments.\n * @param {!string} fnName The function name (on or once)\n * @param {(function(Error)|Object)=} cancelOrContext\n * @param {Object=} context\n * @return {{cancel: ?function(Error), context: ?Object}}\n * @private\n */\n Query.getCancelAndContextArgs_ = function (fnName, cancelOrContext, context) {\n var ret = { cancel: null, context: null };\n if (cancelOrContext && context) {\n ret.cancel = cancelOrContext;\n util_3.validateCallback(fnName, 3, ret.cancel, true);\n ret.context = context;\n util_3.validateContextObject(fnName, 4, ret.context, true);\n }\n else if (cancelOrContext) {\n // we have either a cancel callback or a context.\n if (typeof cancelOrContext === 'object' && cancelOrContext !== null) {\n // it's a context!\n ret.context = cancelOrContext;\n }\n else if (typeof cancelOrContext === 'function') {\n ret.cancel = cancelOrContext;\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, 3, true) +\n ' must either be a cancel callback or a context object.');\n }\n }\n return ret;\n };\n Object.defineProperty(Query.prototype, \"ref\", {\n get: function () {\n return this.getRef();\n },\n enumerable: true,\n configurable: true\n });\n return Query;\n}());\nexports.Query = Query;\n\n//# sourceMappingURL=Query.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/Query.js\n// module id = 36\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar util_3 = require(\"@firebase/util\");\nvar MAX_NODE;\nfunction setMaxNode(val) {\n MAX_NODE = val;\n}\nexports.setMaxNode = setMaxNode;\n/**\n * @param {(!string|!number)} priority\n * @return {!string}\n */\nexports.priorityHashText = function (priority) {\n if (typeof priority === 'number')\n return 'number:' + util_2.doubleToIEEE754String(priority);\n else\n return 'string:' + priority;\n};\n/**\n * Validates that a priority snapshot Node is valid.\n *\n * @param {!Node} priorityNode\n */\nexports.validatePriorityNode = function (priorityNode) {\n if (priorityNode.isLeafNode()) {\n var val = priorityNode.val();\n util_1.assert(typeof val === 'string' ||\n typeof val === 'number' ||\n (typeof val === 'object' && util_3.contains(val, '.sv')), 'Priority must be a string or number.');\n }\n else {\n util_1.assert(priorityNode === MAX_NODE || priorityNode.isEmpty(), 'priority of unexpected type.');\n }\n // Don't call getPriority() on MAX_NODE to avoid hitting assertion.\n util_1.assert(priorityNode === MAX_NODE || priorityNode.getPriority().isEmpty(), \"Priority nodes can't have a priority of their own.\");\n};\n\n//# sourceMappingURL=snap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/snap.js\n// module id = 37\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = require(\"./Index\");\nvar Node_1 = require(\"../Node\");\nvar util_1 = require(\"../../util/util\");\nvar nodeFromJSON_1 = require(\"../nodeFromJSON\");\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nvar ValueIndex = /** @class */ (function (_super) {\n __extends(ValueIndex, _super);\n function ValueIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.compare = function (a, b) {\n var indexCmp = a.node.compareTo(b.node);\n if (indexCmp === 0) {\n return util_1.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.isDefinedOn = function (node) {\n return true;\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return !oldNode.equals(newNode);\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.maxPost = function () {\n return Node_1.NamedNode.MAX;\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n ValueIndex.prototype.makePost = function (indexValue, name) {\n var valueNode = nodeFromJSON_1.nodeFromJSON(indexValue);\n return new Node_1.NamedNode(name, valueNode);\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n ValueIndex.prototype.toString = function () {\n return '.value';\n };\n return ValueIndex;\n}(Index_1.Index));\nexports.ValueIndex = ValueIndex;\nexports.VALUE_INDEX = new ValueIndex();\n\n//# sourceMappingURL=ValueIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/ValueIndex.js\n// module id = 38\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar childSet_1 = require(\"./childSet\");\nvar util_2 = require(\"@firebase/util\");\nvar Node_1 = require(\"./Node\");\nvar PriorityIndex_1 = require(\"./indexes/PriorityIndex\");\nvar KeyIndex_1 = require(\"./indexes/KeyIndex\");\nvar _defaultIndexMap;\nvar fallbackObject = {};\n/**\n *\n * @param {Object.>} indexes\n * @param {Object.} indexSet\n * @constructor\n */\nvar IndexMap = /** @class */ (function () {\n function IndexMap(indexes_, indexSet_) {\n this.indexes_ = indexes_;\n this.indexSet_ = indexSet_;\n }\n Object.defineProperty(IndexMap, \"Default\", {\n /**\n * The default IndexMap for nodes without a priority\n * @type {!IndexMap}\n * @const\n */\n get: function () {\n util_1.assert(fallbackObject && PriorityIndex_1.PRIORITY_INDEX, 'ChildrenNode.ts has not been loaded');\n _defaultIndexMap =\n _defaultIndexMap ||\n new IndexMap({ '.priority': fallbackObject }, { '.priority': PriorityIndex_1.PRIORITY_INDEX });\n return _defaultIndexMap;\n },\n enumerable: true,\n configurable: true\n });\n /**\n *\n * @param {!string} indexKey\n * @return {?SortedMap.}\n */\n IndexMap.prototype.get = function (indexKey) {\n var sortedMap = util_2.safeGet(this.indexes_, indexKey);\n if (!sortedMap)\n throw new Error('No index defined for ' + indexKey);\n if (sortedMap === fallbackObject) {\n // The index exists, but it falls back to just name comparison. Return null so that the calling code uses the\n // regular child map\n return null;\n }\n else {\n return sortedMap;\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n IndexMap.prototype.hasIndex = function (indexDefinition) {\n return util_2.contains(this.indexSet_, indexDefinition.toString());\n };\n /**\n * @param {!Index} indexDefinition\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.addIndex = function (indexDefinition, existingChildren) {\n util_1.assert(indexDefinition !== KeyIndex_1.KEY_INDEX, \"KeyIndex always exists and isn't meant to be added to the IndexMap.\");\n var childList = [];\n var sawIndexedValue = false;\n var iter = existingChildren.getIterator(Node_1.NamedNode.Wrap);\n var next = iter.getNext();\n while (next) {\n sawIndexedValue =\n sawIndexedValue || indexDefinition.isDefinedOn(next.node);\n childList.push(next);\n next = iter.getNext();\n }\n var newIndex;\n if (sawIndexedValue) {\n newIndex = childSet_1.buildChildSet(childList, indexDefinition.getCompare());\n }\n else {\n newIndex = fallbackObject;\n }\n var indexName = indexDefinition.toString();\n var newIndexSet = util_2.clone(this.indexSet_);\n newIndexSet[indexName] = indexDefinition;\n var newIndexes = util_2.clone(this.indexes_);\n newIndexes[indexName] = newIndex;\n return new IndexMap(newIndexes, newIndexSet);\n };\n /**\n * Ensure that this node is properly tracked in any indexes that we're maintaining\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.addToIndexes = function (namedNode, existingChildren) {\n var _this = this;\n var newIndexes = util_2.map(this.indexes_, function (indexedChildren, indexName) {\n var index = util_2.safeGet(_this.indexSet_, indexName);\n util_1.assert(index, 'Missing index implementation for ' + indexName);\n if (indexedChildren === fallbackObject) {\n // Check to see if we need to index everything\n if (index.isDefinedOn(namedNode.node)) {\n // We need to build this index\n var childList = [];\n var iter = existingChildren.getIterator(Node_1.NamedNode.Wrap);\n var next = iter.getNext();\n while (next) {\n if (next.name != namedNode.name) {\n childList.push(next);\n }\n next = iter.getNext();\n }\n childList.push(namedNode);\n return childSet_1.buildChildSet(childList, index.getCompare());\n }\n else {\n // No change, this remains a fallback\n return fallbackObject;\n }\n }\n else {\n var existingSnap = existingChildren.get(namedNode.name);\n var newChildren = indexedChildren;\n if (existingSnap) {\n newChildren = newChildren.remove(new Node_1.NamedNode(namedNode.name, existingSnap));\n }\n return newChildren.insert(namedNode, namedNode.node);\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n };\n /**\n * Create a new IndexMap instance with the given value removed\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.removeFromIndexes = function (namedNode, existingChildren) {\n var newIndexes = util_2.map(this.indexes_, function (indexedChildren) {\n if (indexedChildren === fallbackObject) {\n // This is the fallback. Just return it, nothing to do in this case\n return indexedChildren;\n }\n else {\n var existingSnap = existingChildren.get(namedNode.name);\n if (existingSnap) {\n return indexedChildren.remove(new Node_1.NamedNode(namedNode.name, existingSnap));\n }\n else {\n // No record of this child\n return indexedChildren;\n }\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n };\n return IndexMap;\n}());\nexports.IndexMap = IndexMap;\n\n//# sourceMappingURL=IndexMap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/IndexMap.js\n// module id = 39\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SortedMap_1 = require(\"../util/SortedMap\");\nvar SortedMap_2 = require(\"../util/SortedMap\");\nvar LOG_2 = Math.log(2);\n/**\n * @constructor\n */\nvar Base12Num = /** @class */ (function () {\n /**\n * @param {number} length\n */\n function Base12Num(length) {\n var logBase2 = function (num) {\n return parseInt((Math.log(num) / LOG_2), 10);\n };\n var bitMask = function (bits) { return parseInt(Array(bits + 1).join('1'), 2); };\n this.count = logBase2(length + 1);\n this.current_ = this.count - 1;\n var mask = bitMask(this.count);\n this.bits_ = (length + 1) & mask;\n }\n /**\n * @return {boolean}\n */\n Base12Num.prototype.nextBitIsOne = function () {\n //noinspection JSBitwiseOperatorUsage\n var result = !(this.bits_ & (0x1 << this.current_));\n this.current_--;\n return result;\n };\n return Base12Num;\n}());\n/**\n * Takes a list of child nodes and constructs a SortedSet using the given comparison\n * function\n *\n * Uses the algorithm described in the paper linked here:\n * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.1458\n *\n * @template K, V\n * @param {Array.} childList Unsorted list of children\n * @param {function(!NamedNode, !NamedNode):number} cmp The comparison method to be used\n * @param {(function(NamedNode):K)=} keyFn An optional function to extract K from a node wrapper, if K's\n * type is not NamedNode\n * @param {(function(K, K):number)=} mapSortFn An optional override for comparator used by the generated sorted map\n * @return {SortedMap.}\n */\nexports.buildChildSet = function (childList, cmp, keyFn, mapSortFn) {\n childList.sort(cmp);\n var buildBalancedTree = function (low, high) {\n var length = high - low;\n var namedNode;\n var key;\n if (length == 0) {\n return null;\n }\n else if (length == 1) {\n namedNode = childList[low];\n key = keyFn ? keyFn(namedNode) : namedNode;\n return new SortedMap_1.LLRBNode(key, namedNode.node, SortedMap_1.LLRBNode.BLACK, null, null);\n }\n else {\n var middle = parseInt((length / 2), 10) + low;\n var left = buildBalancedTree(low, middle);\n var right = buildBalancedTree(middle + 1, high);\n namedNode = childList[middle];\n key = keyFn ? keyFn(namedNode) : namedNode;\n return new SortedMap_1.LLRBNode(key, namedNode.node, SortedMap_1.LLRBNode.BLACK, left, right);\n }\n };\n var buildFrom12Array = function (base12) {\n var node = null;\n var root = null;\n var index = childList.length;\n var buildPennant = function (chunkSize, color) {\n var low = index - chunkSize;\n var high = index;\n index -= chunkSize;\n var childTree = buildBalancedTree(low + 1, high);\n var namedNode = childList[low];\n var key = keyFn ? keyFn(namedNode) : namedNode;\n attachPennant(new SortedMap_1.LLRBNode(key, namedNode.node, color, null, childTree));\n };\n var attachPennant = function (pennant) {\n if (node) {\n node.left = pennant;\n node = pennant;\n }\n else {\n root = pennant;\n node = pennant;\n }\n };\n for (var i = 0; i < base12.count; ++i) {\n var isOne = base12.nextBitIsOne();\n // The number of nodes taken in each slice is 2^(arr.length - (i + 1))\n var chunkSize = Math.pow(2, base12.count - (i + 1));\n if (isOne) {\n buildPennant(chunkSize, SortedMap_1.LLRBNode.BLACK);\n }\n else {\n // current == 2\n buildPennant(chunkSize, SortedMap_1.LLRBNode.BLACK);\n buildPennant(chunkSize, SortedMap_1.LLRBNode.RED);\n }\n }\n return root;\n };\n var base12 = new Base12Num(childList.length);\n var root = buildFrom12Array(base12);\n return new SortedMap_2.SortedMap(mapSortFn || cmp, root);\n};\n\n//# sourceMappingURL=childSet.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/childSet.js\n// module id = 40\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util/util\");\nfunction NAME_ONLY_COMPARATOR(left, right) {\n return util_1.nameCompare(left.name, right.name);\n}\nexports.NAME_ONLY_COMPARATOR = NAME_ONLY_COMPARATOR;\nfunction NAME_COMPARATOR(left, right) {\n return util_1.nameCompare(left, right);\n}\nexports.NAME_COMPARATOR = NAME_COMPARATOR;\n\n//# sourceMappingURL=comparators.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/comparators.js\n// module id = 41\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../../util/util\");\nvar Index_1 = require(\"./Index\");\nvar ChildrenNode_1 = require(\"../ChildrenNode\");\nvar Node_1 = require(\"../Node\");\nvar nodeFromJSON_1 = require(\"../nodeFromJSON\");\n/**\n * @param {!Path} indexPath\n * @constructor\n * @extends {Index}\n */\nvar PathIndex = /** @class */ (function (_super) {\n __extends(PathIndex, _super);\n function PathIndex(indexPath_) {\n var _this = _super.call(this) || this;\n _this.indexPath_ = indexPath_;\n util_1.assert(!indexPath_.isEmpty() && indexPath_.getFront() !== '.priority', \"Can't create PathIndex with empty path or .priority key\");\n return _this;\n }\n /**\n * @param {!Node} snap\n * @return {!Node}\n * @protected\n */\n PathIndex.prototype.extractChild = function (snap) {\n return snap.getChild(this.indexPath_);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.isDefinedOn = function (node) {\n return !node.getChild(this.indexPath_).isEmpty();\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.compare = function (a, b) {\n var aChild = this.extractChild(a.node);\n var bChild = this.extractChild(b.node);\n var indexCmp = aChild.compareTo(bChild);\n if (indexCmp === 0) {\n return util_2.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.makePost = function (indexValue, name) {\n var valueNode = nodeFromJSON_1.nodeFromJSON(indexValue);\n var node = ChildrenNode_1.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, valueNode);\n return new Node_1.NamedNode(name, node);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.maxPost = function () {\n var node = ChildrenNode_1.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, ChildrenNode_1.MAX_NODE);\n return new Node_1.NamedNode(util_2.MAX_NAME, node);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.toString = function () {\n return this.indexPath_.slice().join('/');\n };\n return PathIndex;\n}(Index_1.Index));\nexports.PathIndex = PathIndex;\n\n//# sourceMappingURL=PathIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/PathIndex.js\n// module id = 42\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Path_1 = require(\"./Path\");\nvar SparseSnapshotTree_1 = require(\"../SparseSnapshotTree\");\nvar LeafNode_1 = require(\"../snap/LeafNode\");\nvar nodeFromJSON_1 = require(\"../snap/nodeFromJSON\");\nvar PriorityIndex_1 = require(\"../snap/indexes/PriorityIndex\");\n/**\n * Generate placeholders for deferred values.\n * @param {?Object} values\n * @return {!Object}\n */\nexports.generateWithValues = function (values) {\n values = values || {};\n values['timestamp'] = values['timestamp'] || new Date().getTime();\n return values;\n};\n/**\n * Value to use when firing local events. When writing server values, fire\n * local events with an approximate value, otherwise return value as-is.\n * @param {(Object|string|number|boolean)} value\n * @param {!Object} serverValues\n * @return {!(string|number|boolean)}\n */\nexports.resolveDeferredValue = function (value, serverValues) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n else {\n util_1.assert('.sv' in value, 'Unexpected leaf node or priority contents');\n return serverValues[value['.sv']];\n }\n};\n/**\n * Recursively replace all deferred values and priorities in the tree with the\n * specified generated replacement values.\n * @param {!SparseSnapshotTree} tree\n * @param {!Object} serverValues\n * @return {!SparseSnapshotTree}\n */\nexports.resolveDeferredValueTree = function (tree, serverValues) {\n var resolvedTree = new SparseSnapshotTree_1.SparseSnapshotTree();\n tree.forEachTree(new Path_1.Path(''), function (path, node) {\n resolvedTree.remember(path, exports.resolveDeferredValueSnapshot(node, serverValues));\n });\n return resolvedTree;\n};\n/**\n * Recursively replace all deferred values and priorities in the node with the\n * specified generated replacement values. If there are no server values in the node,\n * it'll be returned as-is.\n * @param {!Node} node\n * @param {!Object} serverValues\n * @return {!Node}\n */\nexports.resolveDeferredValueSnapshot = function (node, serverValues) {\n var rawPri = node.getPriority().val();\n var priority = exports.resolveDeferredValue(rawPri, serverValues);\n var newNode;\n if (node.isLeafNode()) {\n var leafNode = node;\n var value = exports.resolveDeferredValue(leafNode.getValue(), serverValues);\n if (value !== leafNode.getValue() ||\n priority !== leafNode.getPriority().val()) {\n return new LeafNode_1.LeafNode(value, nodeFromJSON_1.nodeFromJSON(priority));\n }\n else {\n return node;\n }\n }\n else {\n var childrenNode = node;\n newNode = childrenNode;\n if (priority !== childrenNode.getPriority().val()) {\n newNode = newNode.updatePriority(new LeafNode_1.LeafNode(priority));\n }\n childrenNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var newChildNode = exports.resolveDeferredValueSnapshot(childNode, serverValues);\n if (newChildNode !== childNode) {\n newNode = newNode.updateImmediateChild(childName, newChildNode);\n }\n });\n return newNode;\n }\n};\n\n//# sourceMappingURL=ServerValues.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/ServerValues.js\n// module id = 43\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"./util/Path\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar CountedSet_1 = require(\"./util/CountedSet\");\n/**\n * Helper class to store a sparse set of snapshots.\n *\n * @constructor\n */\nvar SparseSnapshotTree = /** @class */ (function () {\n function SparseSnapshotTree() {\n /**\n * @private\n * @type {Node}\n */\n this.value_ = null;\n /**\n * @private\n * @type {CountedSet}\n */\n this.children_ = null;\n }\n /**\n * Gets the node stored at the given path if one exists.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {?Node} The retrieved node, or null.\n */\n SparseSnapshotTree.prototype.find = function (path) {\n if (this.value_ != null) {\n return this.value_.getChild(path);\n }\n else if (!path.isEmpty() && this.children_ != null) {\n var childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n var childTree = this.children_.get(childKey);\n return childTree.find(path);\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n };\n /**\n * Stores the given node at the specified path. If there is already a node\n * at a shallower path, it merges the new data into that snapshot node.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @param {!Node} data The new data, or null.\n */\n SparseSnapshotTree.prototype.remember = function (path, data) {\n if (path.isEmpty()) {\n this.value_ = data;\n this.children_ = null;\n }\n else if (this.value_ !== null) {\n this.value_ = this.value_.updateChild(path, data);\n }\n else {\n if (this.children_ == null) {\n this.children_ = new CountedSet_1.CountedSet();\n }\n var childKey = path.getFront();\n if (!this.children_.contains(childKey)) {\n this.children_.add(childKey, new SparseSnapshotTree());\n }\n var child = this.children_.get(childKey);\n path = path.popFront();\n child.remember(path, data);\n }\n };\n /**\n * Purge the data at path from the cache.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {boolean} True if this node should now be removed.\n */\n SparseSnapshotTree.prototype.forget = function (path) {\n if (path.isEmpty()) {\n this.value_ = null;\n this.children_ = null;\n return true;\n }\n else {\n if (this.value_ !== null) {\n if (this.value_.isLeafNode()) {\n // We're trying to forget a node that doesn't exist\n return false;\n }\n else {\n var value = this.value_;\n this.value_ = null;\n var self_1 = this;\n value.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, tree) {\n self_1.remember(new Path_1.Path(key), tree);\n });\n return this.forget(path);\n }\n }\n else if (this.children_ !== null) {\n var childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n var safeToRemove = this.children_.get(childKey).forget(path);\n if (safeToRemove) {\n this.children_.remove(childKey);\n }\n }\n if (this.children_.isEmpty()) {\n this.children_ = null;\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }\n };\n /**\n * Recursively iterates through all of the stored tree and calls the\n * callback on each one.\n *\n * @param {!Path} prefixPath Path to look up node for.\n * @param {!Function} func The function to invoke for each tree.\n */\n SparseSnapshotTree.prototype.forEachTree = function (prefixPath, func) {\n if (this.value_ !== null) {\n func(prefixPath, this.value_);\n }\n else {\n this.forEachChild(function (key, tree) {\n var path = new Path_1.Path(prefixPath.toString() + '/' + key);\n tree.forEachTree(path, func);\n });\n }\n };\n /**\n * Iterates through each immediate child and triggers the callback.\n *\n * @param {!Function} func The function to invoke for each child.\n */\n SparseSnapshotTree.prototype.forEachChild = function (func) {\n if (this.children_ !== null) {\n this.children_.each(function (key, tree) {\n func(key, tree);\n });\n }\n };\n return SparseSnapshotTree;\n}());\nexports.SparseSnapshotTree = SparseSnapshotTree;\n\n//# sourceMappingURL=SparseSnapshotTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SparseSnapshotTree.js\n// module id = 44\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Implements a set with a count of elements.\n *\n * @template K, V\n */\nvar CountedSet = /** @class */ (function () {\n function CountedSet() {\n this.set = {};\n }\n /**\n * @param {!K} item\n * @param {V} val\n */\n CountedSet.prototype.add = function (item, val) {\n this.set[item] = val !== null ? val : true;\n };\n /**\n * @param {!K} key\n * @return {boolean}\n */\n CountedSet.prototype.contains = function (key) {\n return util_1.contains(this.set, key);\n };\n /**\n * @param {!K} item\n * @return {V}\n */\n CountedSet.prototype.get = function (item) {\n return this.contains(item) ? this.set[item] : undefined;\n };\n /**\n * @param {!K} item\n */\n CountedSet.prototype.remove = function (item) {\n delete this.set[item];\n };\n /**\n * Deletes everything in the set\n */\n CountedSet.prototype.clear = function () {\n this.set = {};\n };\n /**\n * True if there's nothing in the set\n * @return {boolean}\n */\n CountedSet.prototype.isEmpty = function () {\n return util_1.isEmpty(this.set);\n };\n /**\n * @return {number} The number of items in the set\n */\n CountedSet.prototype.count = function () {\n return util_1.getCount(this.set);\n };\n /**\n * Run a function on each k,v pair in the set\n * @param {function(K, V)} fn\n */\n CountedSet.prototype.each = function (fn) {\n util_1.forEach(this.set, function (k, v) { return fn(k, v); });\n };\n /**\n * Mostly for debugging\n * @return {Array.} The keys present in this CountedSet\n */\n CountedSet.prototype.keys = function () {\n var keys = [];\n util_1.forEach(this.set, function (k) {\n keys.push(k);\n });\n return keys;\n };\n return CountedSet;\n}());\nexports.CountedSet = CountedSet;\n\n//# sourceMappingURL=CountedSet.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/CountedSet.js\n// module id = 45\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = require(\"./Operation\");\nvar Path_1 = require(\"../util/Path\");\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!Node} snap\n * @constructor\n * @implements {Operation}\n */\nvar Overwrite = /** @class */ (function () {\n function Overwrite(source, path, snap) {\n this.source = source;\n this.path = path;\n this.snap = snap;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.OVERWRITE;\n }\n Overwrite.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new Overwrite(this.source, Path_1.Path.Empty, this.snap.getImmediateChild(childName));\n }\n else {\n return new Overwrite(this.source, this.path.popFront(), this.snap);\n }\n };\n return Overwrite;\n}());\nexports.Overwrite = Overwrite;\n\n//# sourceMappingURL=Overwrite.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/Overwrite.js\n// module id = 46\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = require(\"./view/CacheNode\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar ViewCache_1 = require(\"./view/ViewCache\");\nvar View_1 = require(\"./view/View\");\nvar __referenceConstructor;\n/**\n * SyncPoint represents a single location in a SyncTree with 1 or more event registrations, meaning we need to\n * maintain 1 or more Views at this location to cache server data and raise appropriate events for server changes\n * and user writes (set, transaction, update).\n *\n * It's responsible for:\n * - Maintaining the set of 1 or more views necessary at this location (a SyncPoint with 0 views should be removed).\n * - Proxying user / server operations to the views as appropriate (i.e. applyServerOverwrite,\n * applyUserOverwrite, etc.)\n */\nvar SyncPoint = /** @class */ (function () {\n function SyncPoint() {\n /**\n * The Views being tracked at this location in the tree, stored as a map where the key is a\n * queryId and the value is the View for that query.\n *\n * NOTE: This list will be quite small (usually 1, but perhaps 2 or 3; any more is an odd use case).\n *\n * @type {!Object.}\n * @private\n */\n this.views_ = {};\n }\n Object.defineProperty(SyncPoint, \"__referenceConstructor\", {\n get: function () {\n util_1.assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n },\n set: function (val) {\n util_1.assert(!__referenceConstructor, '__referenceConstructor has already been defined');\n __referenceConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {boolean}\n */\n SyncPoint.prototype.isEmpty = function () {\n return util_2.isEmpty(this.views_);\n };\n /**\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} optCompleteServerCache\n * @return {!Array.}\n */\n SyncPoint.prototype.applyOperation = function (operation, writesCache, optCompleteServerCache) {\n var queryId = operation.source.queryId;\n if (queryId !== null) {\n var view = util_2.safeGet(this.views_, queryId);\n util_1.assert(view != null, 'SyncTree gave us an op for an invalid query.');\n return view.applyOperation(operation, writesCache, optCompleteServerCache);\n }\n else {\n var events_1 = [];\n util_2.forEach(this.views_, function (key, view) {\n events_1 = events_1.concat(view.applyOperation(operation, writesCache, optCompleteServerCache));\n });\n return events_1;\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache Complete server cache, if we have it.\n * @param {boolean} serverCacheComplete\n * @return {!Array.} Events to raise.\n */\n SyncPoint.prototype.addEventRegistration = function (query, eventRegistration, writesCache, serverCache, serverCacheComplete) {\n var queryId = query.queryIdentifier();\n var view = util_2.safeGet(this.views_, queryId);\n if (!view) {\n // TODO: make writesCache take flag for complete server node\n var eventCache = writesCache.calcCompleteEventCache(serverCacheComplete ? serverCache : null);\n var eventCacheComplete = false;\n if (eventCache) {\n eventCacheComplete = true;\n }\n else if (serverCache instanceof ChildrenNode_1.ChildrenNode) {\n eventCache = writesCache.calcCompleteEventChildren(serverCache);\n eventCacheComplete = false;\n }\n else {\n eventCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n eventCacheComplete = false;\n }\n var viewCache = new ViewCache_1.ViewCache(new CacheNode_1.CacheNode(\n /** @type {!Node} */ (eventCache), eventCacheComplete, false), new CacheNode_1.CacheNode(\n /** @type {!Node} */ (serverCache), serverCacheComplete, false));\n view = new View_1.View(query, viewCache);\n this.views_[queryId] = view;\n }\n // This is guaranteed to exist now, we just created anything that was missing\n view.addEventRegistration(eventRegistration);\n return view.getInitialEvents(eventRegistration);\n };\n /**\n * Remove event callback(s). Return cancelEvents if a cancelError is specified.\n *\n * If query is the default query, we'll check all views for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified view(s).\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {{removed:!Array., events:!Array.}} removed queries and any cancel events\n */\n SyncPoint.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var queryId = query.queryIdentifier();\n var removed = [];\n var cancelEvents = [];\n var hadCompleteView = this.hasCompleteView();\n if (queryId === 'default') {\n // When you do ref.off(...), we search all views for the registration to remove.\n var self_1 = this;\n util_2.forEach(this.views_, function (viewQueryId, view) {\n cancelEvents = cancelEvents.concat(view.removeEventRegistration(eventRegistration, cancelError));\n if (view.isEmpty()) {\n delete self_1.views_[viewQueryId];\n // We'll deal with complete views later.\n if (!view\n .getQuery()\n .getQueryParams()\n .loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n });\n }\n else {\n // remove the callback from the specific view.\n var view = util_2.safeGet(this.views_, queryId);\n if (view) {\n cancelEvents = cancelEvents.concat(view.removeEventRegistration(eventRegistration, cancelError));\n if (view.isEmpty()) {\n delete this.views_[queryId];\n // We'll deal with complete views later.\n if (!view\n .getQuery()\n .getQueryParams()\n .loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n }\n }\n if (hadCompleteView && !this.hasCompleteView()) {\n // We removed our last complete view.\n removed.push(new SyncPoint.__referenceConstructor(query.repo, query.path));\n }\n return { removed: removed, events: cancelEvents };\n };\n /**\n * @return {!Array.}\n */\n SyncPoint.prototype.getQueryViews = function () {\n var _this = this;\n var values = Object.keys(this.views_).map(function (key) { return _this.views_[key]; });\n return values.filter(function (view) {\n return !view\n .getQuery()\n .getQueryParams()\n .loadsAllData();\n });\n };\n /**\n *\n * @param {!Path} path The path to the desired complete snapshot\n * @return {?Node} A complete cache, if it exists\n */\n SyncPoint.prototype.getCompleteServerCache = function (path) {\n var serverCache = null;\n util_2.forEach(this.views_, function (key, view) {\n serverCache = serverCache || view.getCompleteServerCache(path);\n });\n return serverCache;\n };\n /**\n * @param {!Query} query\n * @return {?View}\n */\n SyncPoint.prototype.viewForQuery = function (query) {\n var params = query.getQueryParams();\n if (params.loadsAllData()) {\n return this.getCompleteView();\n }\n else {\n var queryId = query.queryIdentifier();\n return util_2.safeGet(this.views_, queryId);\n }\n };\n /**\n * @param {!Query} query\n * @return {boolean}\n */\n SyncPoint.prototype.viewExistsForQuery = function (query) {\n return this.viewForQuery(query) != null;\n };\n /**\n * @return {boolean}\n */\n SyncPoint.prototype.hasCompleteView = function () {\n return this.getCompleteView() != null;\n };\n /**\n * @return {?View}\n */\n SyncPoint.prototype.getCompleteView = function () {\n var completeView = util_2.findValue(this.views_, function (view) {\n return view\n .getQuery()\n .getQueryParams()\n .loadsAllData();\n });\n return completeView || null;\n };\n return SyncPoint;\n}());\nexports.SyncPoint = SyncPoint;\n\n//# sourceMappingURL=SyncPoint.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SyncPoint.js\n// module id = 47\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = require(\"../snap/ChildrenNode\");\nvar CacheNode_1 = require(\"./CacheNode\");\n/**\n * Stores the data we have cached for a view.\n *\n * serverSnap is the cached server data, eventSnap is the cached event data (server data plus any local writes).\n *\n * @constructor\n */\nvar ViewCache = /** @class */ (function () {\n /**\n *\n * @param {!CacheNode} eventCache_\n * @param {!CacheNode} serverCache_\n */\n function ViewCache(eventCache_, serverCache_) {\n this.eventCache_ = eventCache_;\n this.serverCache_ = serverCache_;\n }\n /**\n * @param {!Node} eventSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n ViewCache.prototype.updateEventSnap = function (eventSnap, complete, filtered) {\n return new ViewCache(new CacheNode_1.CacheNode(eventSnap, complete, filtered), this.serverCache_);\n };\n /**\n * @param {!Node} serverSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n ViewCache.prototype.updateServerSnap = function (serverSnap, complete, filtered) {\n return new ViewCache(this.eventCache_, new CacheNode_1.CacheNode(serverSnap, complete, filtered));\n };\n /**\n * @return {!CacheNode}\n */\n ViewCache.prototype.getEventCache = function () {\n return this.eventCache_;\n };\n /**\n * @return {?Node}\n */\n ViewCache.prototype.getCompleteEventSnap = function () {\n return this.eventCache_.isFullyInitialized()\n ? this.eventCache_.getNode()\n : null;\n };\n /**\n * @return {!CacheNode}\n */\n ViewCache.prototype.getServerCache = function () {\n return this.serverCache_;\n };\n /**\n * @return {?Node}\n */\n ViewCache.prototype.getCompleteServerSnap = function () {\n return this.serverCache_.isFullyInitialized()\n ? this.serverCache_.getNode()\n : null;\n };\n /**\n * @const\n * @type {ViewCache}\n */\n ViewCache.Empty = new ViewCache(new CacheNode_1.CacheNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, \n /*fullyInitialized=*/ false, \n /*filtered=*/ false), new CacheNode_1.CacheNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, \n /*fullyInitialized=*/ false, \n /*filtered=*/ false));\n return ViewCache;\n}());\nexports.ViewCache = ViewCache;\n\n//# sourceMappingURL=ViewCache.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/ViewCache.js\n// module id = 48\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Returns the delta from the previous call to get stats.\n *\n * @param collection_ The collection to \"listen\" to.\n * @constructor\n */\nvar StatsListener = /** @class */ (function () {\n function StatsListener(collection_) {\n this.collection_ = collection_;\n this.last_ = null;\n }\n StatsListener.prototype.get = function () {\n var newStats = this.collection_.get();\n var delta = util_1.clone(newStats);\n if (this.last_) {\n util_1.forEach(this.last_, function (stat, value) {\n delta[stat] = delta[stat] - value;\n });\n }\n this.last_ = newStats;\n return delta;\n };\n return StatsListener;\n}());\nexports.StatsListener = StatsListener;\n\n//# sourceMappingURL=StatsListener.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsListener.js\n// module id = 49\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = require(\"@firebase/app\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"./util/util\");\nvar Path_1 = require(\"./util/Path\");\nvar VisibilityMonitor_1 = require(\"./util/VisibilityMonitor\");\nvar OnlineMonitor_1 = require(\"./util/OnlineMonitor\");\nvar util_5 = require(\"@firebase/util\");\nvar Connection_1 = require(\"../realtime/Connection\");\nvar util_6 = require(\"@firebase/util\");\nvar util_7 = require(\"@firebase/util\");\nvar ServerActions_1 = require(\"./ServerActions\");\nvar RECONNECT_MIN_DELAY = 1000;\nvar RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nvar RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nvar RECONNECT_DELAY_MULTIPLIER = 1.3;\nvar RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nvar SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nvar INVALID_AUTH_TOKEN_THRESHOLD = 3;\n/**\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\n *\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\n * in quotes to make sure the closure compiler does not minify them.\n */\nvar PersistentConnection = /** @class */ (function (_super) {\n __extends(PersistentConnection, _super);\n /**\n * @implements {ServerActions}\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param onConnectStatus_\n * @param onServerInfoUpdate_\n * @param authTokenProvider_\n * @param authOverride_\n */\n function PersistentConnection(repoInfo_, onDataUpdate_, onConnectStatus_, onServerInfoUpdate_, authTokenProvider_, authOverride_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.onConnectStatus_ = onConnectStatus_;\n _this.onServerInfoUpdate_ = onServerInfoUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n _this.authOverride_ = authOverride_;\n // Used for diagnostic logging.\n _this.id = PersistentConnection.nextPersistentConnectionId_++;\n _this.log_ = util_4.logWrapper('p:' + _this.id + ':');\n /** @private {Object} */\n _this.interruptReasons_ = {};\n _this.listens_ = {};\n _this.outstandingPuts_ = [];\n _this.outstandingPutCount_ = 0;\n _this.onDisconnectRequestQueue_ = [];\n _this.connected_ = false;\n _this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n _this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n _this.securityDebugCallback_ = null;\n _this.lastSessionId = null;\n /** @private {number|null} */\n _this.establishConnectionTimer_ = null;\n /** @private {boolean} */\n _this.visible_ = false;\n // Before we get connected, we keep a queue of pending messages to send.\n _this.requestCBHash_ = {};\n _this.requestNumber_ = 0;\n /** @private {?{\n * sendRequest(Object),\n * close()\n * }} */\n _this.realtime_ = null;\n /** @private {string|null} */\n _this.authToken_ = null;\n _this.forceTokenRefresh_ = false;\n _this.invalidAuthTokenCount_ = 0;\n _this.firstConnection_ = true;\n _this.lastConnectionAttemptTime_ = null;\n _this.lastConnectionEstablishedTime_ = null;\n if (authOverride_ && !util_7.isNodeSdk()) {\n throw new Error('Auth override specified in options, but not supported on non Node.js platforms');\n }\n _this.scheduleConnect_(0);\n VisibilityMonitor_1.VisibilityMonitor.getInstance().on('visible', _this.onVisible_, _this);\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor_1.OnlineMonitor.getInstance().on('online', _this.onOnline_, _this);\n }\n return _this;\n }\n /**\n * @param {!string} action\n * @param {*} body\n * @param {function(*)=} onResponse\n * @protected\n */\n PersistentConnection.prototype.sendRequest = function (action, body, onResponse) {\n var curReqNum = ++this.requestNumber_;\n var msg = { r: curReqNum, a: action, b: body };\n this.log_(util_2.stringify(msg));\n util_3.assert(this.connected_, \"sendRequest call when we're not connected not allowed.\");\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var queryId = query.queryIdentifier();\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n util_3.assert(query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(), 'listen() called for non-default but complete query');\n util_3.assert(!this.listens_[pathString][queryId], 'listen() called twice for same path/queryId.');\n var listenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n };\n /**\n * @param {!{onComplete(),\n * hashFn():!string,\n * query: !Query,\n * tag: ?number}} listenSpec\n * @private\n */\n PersistentConnection.prototype.sendListen_ = function (listenSpec) {\n var _this = this;\n var query = listenSpec.query;\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n var req = { /*path*/ p: pathString };\n var action = 'q';\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n req['h'] = listenSpec.hashFn();\n this.sendRequest(action, req, function (message) {\n var payload = message['d'];\n var status = message['s'];\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n var currentListenSpec = _this.listens_[pathString] && _this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n _this.log_('listen response', message);\n if (status !== 'ok') {\n _this.removeListen_(pathString, queryId);\n }\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n };\n /**\n * @param {*} payload\n * @param {!Query} query\n * @private\n */\n PersistentConnection.warnOnListenWarnings_ = function (payload, query) {\n if (payload && typeof payload === 'object' && util_1.contains(payload, 'w')) {\n var warnings = util_1.safeGet(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n var indexSpec = '\".indexOn\": \"' +\n query\n .getQueryParams()\n .getIndex()\n .toString() +\n '\"';\n var indexPath = query.path.toString();\n util_4.warn(\"Using an unspecified index. Your data will be downloaded and \" +\n (\"filtered on the client. Consider adding \" + indexSpec + \" at \") +\n (indexPath + \" to your security rules for better performance.\"));\n }\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.refreshAuthToken = function (token) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n }\n else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, function () { });\n }\n }\n this.reduceReconnectDelayIfAdminCredential_(token);\n };\n /**\n * @param {!string} credential\n * @private\n */\n PersistentConnection.prototype.reduceReconnectDelayIfAdminCredential_ = function (credential) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n var isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || util_5.isAdmin(credential)) {\n this.log_('Admin auth credential detected. Reducing max reconnect time.');\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n };\n /**\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\n * a auth revoked (the connection is closed).\n */\n PersistentConnection.prototype.tryAuth = function () {\n var _this = this;\n if (this.connected_ && this.authToken_) {\n var token_1 = this.authToken_;\n var authMethod = util_5.isValidFormat(token_1) ? 'auth' : 'gauth';\n var requestData = { cred: token_1 };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n }\n else if (typeof this.authOverride_ === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, function (res) {\n var status = res['s'];\n var data = res['d'] || 'error';\n if (_this.authToken_ === token_1) {\n if (status === 'ok') {\n _this.invalidAuthTokenCount_ = 0;\n }\n else {\n // Triggers reconnect and force refresh for auth token\n _this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.unlisten = function (query, tag) {\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n util_3.assert(query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(), 'unlisten() called for non-default but complete query');\n var listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n };\n PersistentConnection.prototype.sendUnlisten_ = function (pathString, queryId, queryObj, tag) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n var req = { /*path*/ p: pathString };\n var action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n this.sendRequest(action, req);\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectPut = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'o',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectMerge = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'om',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectCancel = function (pathString, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'oc',\n data: null,\n onComplete: onComplete\n });\n }\n };\n PersistentConnection.prototype.sendOnDisconnect_ = function (action, pathString, data, onComplete) {\n var request = { /*path*/ p: pathString, /*data*/ d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, function (response) {\n if (onComplete) {\n setTimeout(function () {\n onComplete(response['s'], response['d']);\n }, Math.floor(0));\n }\n });\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.put = function (pathString, data, onComplete, hash) {\n this.putInternal('p', pathString, data, onComplete, hash);\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.merge = function (pathString, data, onComplete, hash) {\n this.putInternal('m', pathString, data, onComplete, hash);\n };\n PersistentConnection.prototype.putInternal = function (action, pathString, data, onComplete, hash) {\n var request = {\n /*path*/ p: pathString,\n /*data*/ d: data\n };\n if (hash !== undefined)\n request['h'] = hash;\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action: action,\n request: request,\n onComplete: onComplete\n });\n this.outstandingPutCount_++;\n var index = this.outstandingPuts_.length - 1;\n if (this.connected_) {\n this.sendPut_(index);\n }\n else {\n this.log_('Buffering put: ' + pathString);\n }\n };\n PersistentConnection.prototype.sendPut_ = function (index) {\n var _this = this;\n var action = this.outstandingPuts_[index].action;\n var request = this.outstandingPuts_[index].request;\n var onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n this.sendRequest(action, request, function (message) {\n _this.log_(action + ' response', message);\n delete _this.outstandingPuts_[index];\n _this.outstandingPutCount_--;\n // Clean up array occasionally.\n if (_this.outstandingPutCount_ === 0) {\n _this.outstandingPuts_ = [];\n }\n if (onComplete)\n onComplete(message['s'], message['d']);\n });\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.reportStats = function (stats) {\n var _this = this;\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n var request = { /*counters*/ c: stats };\n this.log_('reportStats', request);\n this.sendRequest(/*stats*/ 's', request, function (result) {\n var status = result['s'];\n if (status !== 'ok') {\n var errorReason = result['d'];\n _this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n };\n /**\n * @param {*} message\n * @private\n */\n PersistentConnection.prototype.onDataMessage_ = function (message) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + util_2.stringify(message));\n var reqNum = message['r'];\n var onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message['b']);\n }\n }\n else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n }\n else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n };\n PersistentConnection.prototype.onDataPush_ = function (action, body) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd')\n this.onDataUpdate_(body['p'], body['d'], \n /*isMerge*/ false, body['t']);\n else if (action === 'm')\n this.onDataUpdate_(body['p'], body['d'], \n /*isMerge=*/ true, body['t']);\n else if (action === 'c')\n this.onListenRevoked_(body['p'], body['q']);\n else if (action === 'ac')\n this.onAuthRevoked_(body['s'], body['d']);\n else if (action === 'sd')\n this.onSecurityDebugPacket_(body);\n else\n util_4.error('Unrecognized action received from server: ' +\n util_2.stringify(action) +\n '\\nAre you using the latest client?');\n };\n PersistentConnection.prototype.onReady_ = function (timestamp, sessionId) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n };\n PersistentConnection.prototype.scheduleConnect_ = function (timeout) {\n var _this = this;\n util_3.assert(!this.realtime_, \"Scheduling a connect when we're already connected/ing?\");\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n this.establishConnectionTimer_ = setTimeout(function () {\n _this.establishConnectionTimer_ = null;\n _this.establishConnection_();\n }, Math.floor(timeout));\n };\n /**\n * @param {boolean} visible\n * @private\n */\n PersistentConnection.prototype.onVisible_ = function (visible) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (visible &&\n !this.visible_ &&\n this.reconnectDelay_ === this.maxReconnectDelay_) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n };\n PersistentConnection.prototype.onOnline_ = function (online) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n };\n PersistentConnection.prototype.onRealtimeDisconnect_ = function () {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n }\n else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n var timeSinceLastConnectSucceeded = new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT)\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n var timeSinceLastConnectAttempt = new Date().getTime() - this.lastConnectionAttemptTime_;\n var reconnectDelay = Math.max(0, this.reconnectDelay_ - timeSinceLastConnectAttempt);\n reconnectDelay = Math.random() * reconnectDelay;\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(this.maxReconnectDelay_, this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER);\n }\n this.onConnectStatus_(false);\n };\n PersistentConnection.prototype.establishConnection_ = function () {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n var onDataMessage_1 = this.onDataMessage_.bind(this);\n var onReady_1 = this.onReady_.bind(this);\n var onDisconnect_1 = this.onRealtimeDisconnect_.bind(this);\n var connId_1 = this.id + ':' + PersistentConnection.nextConnectionId_++;\n var self_1 = this;\n var lastSessionId_1 = this.lastSessionId;\n var canceled_1 = false;\n var connection_1 = null;\n var closeFn_1 = function () {\n if (connection_1) {\n connection_1.close();\n }\n else {\n canceled_1 = true;\n onDisconnect_1();\n }\n };\n var sendRequestFn = function (msg) {\n util_3.assert(connection_1, \"sendRequest call when we're not connected not allowed.\");\n connection_1.sendRequest(msg);\n };\n this.realtime_ = {\n close: closeFn_1,\n sendRequest: sendRequestFn\n };\n var forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_\n .getToken(forceRefresh)\n .then(function (result) {\n if (!canceled_1) {\n util_4.log('getToken() completed. Creating connection.');\n self_1.authToken_ = result && result.accessToken;\n connection_1 = new Connection_1.Connection(connId_1, self_1.repoInfo_, onDataMessage_1, onReady_1, onDisconnect_1, \n /* onKill= */ function (reason) {\n util_4.warn(reason + ' (' + self_1.repoInfo_.toString() + ')');\n self_1.interrupt(SERVER_KILL_INTERRUPT_REASON);\n }, lastSessionId_1);\n }\n else {\n util_4.log('getToken() completed but was canceled');\n }\n })\n .then(null, function (error) {\n self_1.log_('Failed to get token: ' + error);\n if (!canceled_1) {\n if (util_6.CONSTANTS.NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n util_4.warn(error);\n }\n closeFn_1();\n }\n });\n }\n };\n /**\n * @param {string} reason\n */\n PersistentConnection.prototype.interrupt = function (reason) {\n util_4.log('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n }\n else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n };\n /**\n * @param {string} reason\n */\n PersistentConnection.prototype.resume = function (reason) {\n util_4.log('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (util_1.isEmpty(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n };\n PersistentConnection.prototype.handleTimestamp_ = function (timestamp) {\n var delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n };\n PersistentConnection.prototype.cancelSentTransactions_ = function () {\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n var put = this.outstandingPuts_[i];\n if (put && /*hash*/ 'h' in put.request && put.queued) {\n if (put.onComplete)\n put.onComplete('disconnect');\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0)\n this.outstandingPuts_ = [];\n };\n /**\n * @param {!string} pathString\n * @param {Array.<*>=} query\n * @private\n */\n PersistentConnection.prototype.onListenRevoked_ = function (pathString, query) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n var queryId;\n if (!query) {\n queryId = 'default';\n }\n else {\n queryId = query.map(function (q) { return util_4.ObjectToUniqueKey(q); }).join('$');\n }\n var listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete)\n listen.onComplete('permission_denied');\n };\n /**\n * @param {!string} pathString\n * @param {!string} queryId\n * @return {{queries:Array., onComplete:function(string)}}\n * @private\n */\n PersistentConnection.prototype.removeListen_ = function (pathString, queryId) {\n var normalizedPathString = new Path_1.Path(pathString).toString(); // normalize path.\n var listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (util_1.getCount(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n }\n else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n };\n PersistentConnection.prototype.onAuthRevoked_ = function (statusCode, explanation) {\n util_4.log('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n };\n PersistentConnection.prototype.onSecurityDebugPacket_ = function (body) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n }\n else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n };\n PersistentConnection.prototype.restoreState_ = function () {\n var _this = this;\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n util_1.forEach(this.listens_, function (pathString, queries) {\n util_1.forEach(queries, function (key, listenSpec) {\n _this.sendListen_(listenSpec);\n });\n });\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i])\n this.sendPut_(i);\n }\n while (this.onDisconnectRequestQueue_.length) {\n var request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(request.action, request.pathString, request.data, request.onComplete);\n }\n };\n /**\n * Sends client stats for first connection\n * @private\n */\n PersistentConnection.prototype.sendConnectStats_ = function () {\n var stats = {};\n var clientName = 'js';\n if (util_6.CONSTANTS.NODE_ADMIN) {\n clientName = 'admin_node';\n }\n else if (util_6.CONSTANTS.NODE_CLIENT) {\n clientName = 'node';\n }\n stats['sdk.' + clientName + '.' + app_1.default.SDK_VERSION.replace(/\\./g, '-')] = 1;\n if (util_7.isMobileCordova()) {\n stats['framework.cordova'] = 1;\n }\n else if (util_7.isReactNative()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n };\n /**\n * @return {boolean}\n * @private\n */\n PersistentConnection.prototype.shouldReconnect_ = function () {\n var online = OnlineMonitor_1.OnlineMonitor.getInstance().currentlyOnline();\n return util_1.isEmpty(this.interruptReasons_) && online;\n };\n /**\n * @private\n */\n PersistentConnection.nextPersistentConnectionId_ = 0;\n /**\n * Counter for number of connections created. Mainly used for tagging in the logs\n * @type {number}\n * @private\n */\n PersistentConnection.nextConnectionId_ = 0;\n return PersistentConnection;\n}(ServerActions_1.ServerActions));\nexports.PersistentConnection = PersistentConnection;\n\n//# sourceMappingURL=PersistentConnection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/PersistentConnection.js\n// module id = 50\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Base class to be used if you want to emit events. Call the constructor with\n * the set of allowed event names.\n */\nvar EventEmitter = /** @class */ (function () {\n /**\n * @param {!Array.} allowedEvents_\n */\n function EventEmitter(allowedEvents_) {\n this.allowedEvents_ = allowedEvents_;\n this.listeners_ = {};\n util_1.assert(Array.isArray(allowedEvents_) && allowedEvents_.length > 0, 'Requires a non-empty array');\n }\n /**\n * To be called by derived classes to trigger events.\n * @param {!string} eventType\n * @param {...*} var_args\n */\n EventEmitter.prototype.trigger = function (eventType) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (Array.isArray(this.listeners_[eventType])) {\n // Clone the list, since callbacks could add/remove listeners.\n var listeners = this.listeners_[eventType].slice();\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].callback.apply(listeners[i].context, var_args);\n }\n }\n };\n EventEmitter.prototype.on = function (eventType, callback, context) {\n this.validateEventType_(eventType);\n this.listeners_[eventType] = this.listeners_[eventType] || [];\n this.listeners_[eventType].push({ callback: callback, context: context });\n var eventData = this.getInitialEvent(eventType);\n if (eventData) {\n callback.apply(context, eventData);\n }\n };\n EventEmitter.prototype.off = function (eventType, callback, context) {\n this.validateEventType_(eventType);\n var listeners = this.listeners_[eventType] || [];\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].callback === callback &&\n (!context || context === listeners[i].context)) {\n listeners.splice(i, 1);\n return;\n }\n }\n };\n EventEmitter.prototype.validateEventType_ = function (eventType) {\n util_1.assert(this.allowedEvents_.find(function (et) {\n return et === eventType;\n }), 'Unknown event: ' + eventType);\n };\n return EventEmitter;\n}());\nexports.EventEmitter = EventEmitter;\n\n//# sourceMappingURL=EventEmitter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/EventEmitter.js\n// module id = 51\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../core/util/util\");\nvar storage_1 = require(\"../core/storage/storage\");\nvar Constants_1 = require(\"./Constants\");\nvar TransportManager_1 = require(\"./TransportManager\");\n// Abort upgrade attempt if it takes longer than 60s.\nvar UPGRADE_TIMEOUT = 60000;\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nvar DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nvar BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nvar BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\nvar MESSAGE_TYPE = 't';\nvar MESSAGE_DATA = 'd';\nvar CONTROL_SHUTDOWN = 's';\nvar CONTROL_RESET = 'r';\nvar CONTROL_ERROR = 'e';\nvar CONTROL_PONG = 'o';\nvar SWITCH_ACK = 'a';\nvar END_TRANSMISSION = 'n';\nvar PING = 'p';\nvar SERVER_HELLO = 'h';\n/**\n * Creates a new real-time connection to the server using whichever method works\n * best in the current browser.\n *\n * @constructor\n */\nvar Connection = /** @class */ (function () {\n /**\n * @param {!string} id - an id for this connection\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\n */\n function Connection(id, repoInfo_, onMessage_, onReady_, onDisconnect_, onKill_, lastSessionId) {\n this.id = id;\n this.repoInfo_ = repoInfo_;\n this.onMessage_ = onMessage_;\n this.onReady_ = onReady_;\n this.onDisconnect_ = onDisconnect_;\n this.onKill_ = onKill_;\n this.lastSessionId = lastSessionId;\n this.connectionCount = 0;\n this.pendingDataMessages = [];\n this.state_ = 0 /* CONNECTING */;\n this.log_ = util_1.logWrapper('c:' + this.id + ':');\n this.transportManager_ = new TransportManager_1.TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n /**\n * Starts a connection attempt\n * @private\n */\n Connection.prototype.start_ = function () {\n var _this = this;\n var conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(this.nextTransportId_(), this.repoInfo_, undefined, this.lastSessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessageReceived = this.connReceiver_(this.conn_);\n var onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n /*\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\n * still have the context of your originating frame.\n */\n setTimeout(function () {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n _this.conn_ && _this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n var healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = util_1.setTimeoutNonBlocking(function () {\n _this.healthyTimeout_ = null;\n if (!_this.isHealthy_) {\n if (_this.conn_ &&\n _this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has received ' +\n _this.conn_.bytesReceived +\n ' bytes. Marking connection healthy.');\n _this.isHealthy_ = true;\n _this.conn_.markConnectionHealthy();\n }\n else if (_this.conn_ &&\n _this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has sent ' +\n _this.conn_.bytesSent +\n ' bytes. Leaving connection alive.');\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n }\n else {\n _this.log_('Closing unhealthy connection after timeout.');\n _this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms));\n }\n };\n /**\n * @return {!string}\n * @private\n */\n Connection.prototype.nextTransportId_ = function () {\n return 'c:' + this.id + ':' + this.connectionCount++;\n };\n Connection.prototype.disconnReceiver_ = function (conn) {\n var _this = this;\n return function (everConnected) {\n if (conn === _this.conn_) {\n _this.onConnectionLost_(everConnected);\n }\n else if (conn === _this.secondaryConn_) {\n _this.log_('Secondary connection lost.');\n _this.onSecondaryConnectionLost_();\n }\n else {\n _this.log_('closing an old connection');\n }\n };\n };\n Connection.prototype.connReceiver_ = function (conn) {\n var _this = this;\n return function (message) {\n if (_this.state_ != 2 /* DISCONNECTED */) {\n if (conn === _this.rx_) {\n _this.onPrimaryMessageReceived_(message);\n }\n else if (conn === _this.secondaryConn_) {\n _this.onSecondaryMessageReceived_(message);\n }\n else {\n _this.log_('message on old connection');\n }\n }\n };\n };\n /**\n *\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\n */\n Connection.prototype.sendRequest = function (dataMsg) {\n // wrap in a data message envelope and send it on\n var msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n };\n Connection.prototype.tryCleanupConnection = function () {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_('cleaning up and promoting a connection: ' + this.secondaryConn_.connId);\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n };\n Connection.prototype.onSecondaryControl_ = function (controlData) {\n if (MESSAGE_TYPE in controlData) {\n var cmd = controlData[MESSAGE_TYPE];\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n }\n else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (this.tx_ === this.secondaryConn_ ||\n this.rx_ === this.secondaryConn_) {\n this.close();\n }\n }\n else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n };\n Connection.prototype.onSecondaryMessageReceived_ = function (parsedData) {\n var layer = util_1.requireKey('t', parsedData);\n var data = util_1.requireKey('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n }\n else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n }\n else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n };\n Connection.prototype.upgradeIfSecondaryHealthy_ = function () {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n }\n else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.proceedWithUpgrade_ = function () {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n this.tryCleanupConnection();\n };\n Connection.prototype.onPrimaryMessageReceived_ = function (parsedData) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n var layer = util_1.requireKey('t', parsedData);\n var data = util_1.requireKey('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n }\n else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n };\n Connection.prototype.onDataMessage_ = function (message) {\n this.onPrimaryResponse_();\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n };\n Connection.prototype.onPrimaryResponse_ = function () {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n };\n Connection.prototype.onControl_ = function (controlData) {\n var cmd = util_1.requireKey(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n var payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n }\n else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (var i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n }\n else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n }\n else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n }\n else if (cmd === CONTROL_ERROR) {\n util_1.error('Server Error: ' + payload);\n }\n else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n }\n else {\n util_1.error('Unknown control packet command: ' + cmd);\n }\n }\n };\n /**\n *\n * @param {Object} handshake The handshake data returned from the server\n * @private\n */\n Connection.prototype.onHandshake_ = function (handshake) {\n var timestamp = handshake.ts;\n var version = handshake.v;\n var host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == 0 /* CONNECTING */) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (Constants_1.PROTOCOL_VERSION !== version) {\n util_1.warn('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n };\n Connection.prototype.tryStartUpgrade_ = function () {\n var conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n };\n Connection.prototype.startUpgrade_ = function (conn) {\n var _this = this;\n this.secondaryConn_ = new conn(this.nextTransportId_(), this.repoInfo_, this.sessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ =\n conn['responsesRequiredToBeHealthy'] || 0;\n var onMessage = this.connReceiver_(this.secondaryConn_);\n var onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n util_1.setTimeoutNonBlocking(function () {\n if (_this.secondaryConn_) {\n _this.log_('Timed out trying to upgrade.');\n _this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n };\n Connection.prototype.onReset_ = function (host) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === 1 /* CONNECTED */) {\n this.close();\n }\n else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n };\n Connection.prototype.onConnectionEstablished_ = function (conn, timestamp) {\n var _this = this;\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = 1 /* CONNECTED */;\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n }\n else {\n util_1.setTimeoutNonBlocking(function () {\n _this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n };\n Connection.prototype.sendPingOnPrimaryIfNecessary_ = function () {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === 1 /* CONNECTED */) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.onSecondaryConnectionLost_ = function () {\n var conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n };\n /**\n *\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\n * we should flush the host cache\n * @private\n */\n Connection.prototype.onConnectionLost_ = function (everConnected) {\n this.conn_ = null;\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === 0 /* CONNECTING */) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n storage_1.PersistentStorage.remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n }\n else if (this.state_ === 1 /* CONNECTED */) {\n this.log_('Realtime connection lost.');\n }\n this.close();\n };\n /**\n *\n * @param {string} reason\n * @private\n */\n Connection.prototype.onConnectionShutdown_ = function (reason) {\n this.log_('Connection shutdown command received. Shutting down...');\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n this.close();\n };\n Connection.prototype.sendData_ = function (data) {\n if (this.state_ !== 1 /* CONNECTED */) {\n throw 'Connection is not connected';\n }\n else {\n this.tx_.send(data);\n }\n };\n /**\n * Cleans up this connection, calling the appropriate callbacks\n */\n Connection.prototype.close = function () {\n if (this.state_ !== 2 /* DISCONNECTED */) {\n this.log_('Closing realtime connection.');\n this.state_ = 2 /* DISCONNECTED */;\n this.closeConnections_();\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n };\n /**\n *\n * @private\n */\n Connection.prototype.closeConnections_ = function () {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n };\n return Connection;\n}());\nexports.Connection = Connection;\n\n//# sourceMappingURL=Connection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/Connection.js\n// module id = 52\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../core/util/util\");\nvar CountedSet_1 = require(\"../core/util/CountedSet\");\nvar StatsManager_1 = require(\"../core/stats/StatsManager\");\nvar PacketReceiver_1 = require(\"./polling/PacketReceiver\");\nvar Constants_1 = require(\"./Constants\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\n// URL query parameters associated with longpolling\nexports.FIREBASE_LONGPOLL_START_PARAM = 'start';\nexports.FIREBASE_LONGPOLL_CLOSE_COMMAND = 'close';\nexports.FIREBASE_LONGPOLL_COMMAND_CB_NAME = 'pLPCommand';\nexports.FIREBASE_LONGPOLL_DATA_CB_NAME = 'pRTLPCB';\nexports.FIREBASE_LONGPOLL_ID_PARAM = 'id';\nexports.FIREBASE_LONGPOLL_PW_PARAM = 'pw';\nexports.FIREBASE_LONGPOLL_SERIAL_PARAM = 'ser';\nexports.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM = 'cb';\nexports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM = 'seg';\nexports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET = 'ts';\nexports.FIREBASE_LONGPOLL_DATA_PARAM = 'd';\nexports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM = 'disconn';\nexports.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM = 'dframe';\n//Data size constants.\n//TODO: Perf: the maximum length actually differs from browser to browser.\n// We should check what browser we're on and set accordingly.\nvar MAX_URL_DATA_SIZE = 1870;\nvar SEG_HEADER_SIZE = 30; //ie: &seg=8299234&ts=982389123&d=\nvar MAX_PAYLOAD_SIZE = MAX_URL_DATA_SIZE - SEG_HEADER_SIZE;\n/**\n * Keepalive period\n * send a fresh request at minimum every 25 seconds. Opera has a maximum request\n * length of 30 seconds that we can't exceed.\n * @const\n * @type {number}\n */\nvar KEEPALIVE_REQUEST_INTERVAL = 25000;\n/**\n * How long to wait before aborting a long-polling connection attempt.\n * @const\n * @type {number}\n */\nvar LP_CONNECT_TIMEOUT = 30000;\n/**\n * This class manages a single long-polling connection.\n *\n * @constructor\n * @implements {Transport}\n */\nvar BrowserPollConnection = /** @class */ (function () {\n /**\n * @param {string} connId An identifier for this connection, used for logging\n * @param {RepoInfo} repoInfo The info for the endpoint to send data to.\n * @param {string=} transportSessionId Optional transportSessionid if we are reconnecting for an existing\n * transport session\n * @param {string=} lastSessionId Optional lastSessionId if the PersistentConnection has already created a\n * connection previously\n */\n function BrowserPollConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.repoInfo = repoInfo;\n this.transportSessionId = transportSessionId;\n this.lastSessionId = lastSessionId;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.everConnected_ = false;\n this.log_ = util_1.logWrapper(connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.urlFn = function (params) {\n return repoInfo.connectionURL(Constants_1.LONG_POLLING, params);\n };\n }\n /**\n *\n * @param {function(Object)} onMessage Callback when messages arrive\n * @param {function()} onDisconnect Callback with connection lost.\n */\n BrowserPollConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.curSegmentNum = 0;\n this.onDisconnect_ = onDisconnect;\n this.myPacketOrderer = new PacketReceiver_1.PacketReceiver(onMessage);\n this.isClosed_ = false;\n this.connectTimeoutTimer_ = setTimeout(function () {\n _this.log_('Timed out trying to connect.');\n // Make sure we clear the host cache\n _this.onClosed_();\n _this.connectTimeoutTimer_ = null;\n }, Math.floor(LP_CONNECT_TIMEOUT));\n // Ensure we delay the creation of the iframe until the DOM is loaded.\n util_1.executeWhenDOMReady(function () {\n if (_this.isClosed_)\n return;\n //Set up a callback that gets triggered once a connection is set up.\n _this.scriptTagHolder = new FirebaseIFrameScriptHolder(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var command = args[0], arg1 = args[1], arg2 = args[2], arg3 = args[3], arg4 = args[4];\n _this.incrementIncomingBytes_(args);\n if (!_this.scriptTagHolder)\n return; // we closed the connection.\n if (_this.connectTimeoutTimer_) {\n clearTimeout(_this.connectTimeoutTimer_);\n _this.connectTimeoutTimer_ = null;\n }\n _this.everConnected_ = true;\n if (command == exports.FIREBASE_LONGPOLL_START_PARAM) {\n _this.id = arg1;\n _this.password = arg2;\n }\n else if (command === exports.FIREBASE_LONGPOLL_CLOSE_COMMAND) {\n // Don't clear the host cache. We got a response from the server, so we know it's reachable\n if (arg1) {\n // We aren't expecting any more data (other than what the server's already in the process of sending us\n // through our already open polls), so don't send any more.\n _this.scriptTagHolder.sendNewPolls = false;\n // arg1 in this case is the last response number sent by the server. We should try to receive\n // all of the responses up to this one before closing\n _this.myPacketOrderer.closeAfter(arg1, function () {\n _this.onClosed_();\n });\n }\n else {\n _this.onClosed_();\n }\n }\n else {\n throw new Error('Unrecognized command received: ' + command);\n }\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var pN = args[0], data = args[1];\n _this.incrementIncomingBytes_(args);\n _this.myPacketOrderer.handleResponse(pN, data);\n }, function () {\n _this.onClosed_();\n }, _this.urlFn);\n //Send the initial request to connect. The serial number is simply to keep the browser from pulling previous results\n //from cache.\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_START_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = Math.floor(Math.random() * 100000000);\n if (_this.scriptTagHolder.uniqueCallbackIdentifier)\n urlParams[exports.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM] = _this.scriptTagHolder.uniqueCallbackIdentifier;\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (_this.transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = _this.transportSessionId;\n }\n if (_this.lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = _this.lastSessionId;\n }\n if (!util_3.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n var connectURL = _this.urlFn(urlParams);\n _this.log_('Connecting via long-poll to ' + connectURL);\n _this.scriptTagHolder.addTag(connectURL, function () {\n /* do nothing */\n });\n });\n };\n /**\n * Call this when a handshake has completed successfully and we want to consider the connection established\n */\n BrowserPollConnection.prototype.start = function () {\n this.scriptTagHolder.startLongPoll(this.id, this.password);\n this.addDisconnectPingFrame(this.id, this.password);\n };\n /**\n * Forces long polling to be considered as a potential transport\n */\n BrowserPollConnection.forceAllow = function () {\n BrowserPollConnection.forceAllow_ = true;\n };\n /**\n * Forces longpolling to not be considered as a potential transport\n */\n BrowserPollConnection.forceDisallow = function () {\n BrowserPollConnection.forceDisallow_ = true;\n };\n // Static method, use string literal so it can be accessed in a generic way\n BrowserPollConnection.isAvailable = function () {\n // NOTE: In React-Native there's normally no 'document', but if you debug a React-Native app in\n // the Chrome debugger, 'document' is defined, but document.createElement is null (2015/06/08).\n return (BrowserPollConnection.forceAllow_ ||\n (!BrowserPollConnection.forceDisallow_ &&\n typeof document !== 'undefined' &&\n document.createElement != null &&\n !util_1.isChromeExtensionContentScript() &&\n !util_1.isWindowsStoreApp() &&\n !util_3.isNodeSdk()));\n };\n /**\n * No-op for polling\n */\n BrowserPollConnection.prototype.markConnectionHealthy = function () { };\n /**\n * Stops polling and cleans up the iframe\n * @private\n */\n BrowserPollConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.scriptTagHolder) {\n this.scriptTagHolder.close();\n this.scriptTagHolder = null;\n }\n //remove the disconnect frame, which will trigger an XHR call to the server to tell it we're leaving.\n if (this.myDisconnFrame) {\n document.body.removeChild(this.myDisconnFrame);\n this.myDisconnFrame = null;\n }\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n };\n /**\n * Triggered when this transport is closed\n * @private\n */\n BrowserPollConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('Longpoll is closing itself');\n this.shutdown_();\n if (this.onDisconnect_) {\n this.onDisconnect_(this.everConnected_);\n this.onDisconnect_ = null;\n }\n }\n };\n /**\n * External-facing close handler. RealTime has requested we shut down. Kill our connection and tell the server\n * that we've left.\n */\n BrowserPollConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('Longpoll is being closed.');\n this.shutdown_();\n }\n };\n /**\n * Send the JSON object down to the server. It will need to be stringified, base64 encoded, and then\n * broken into chunks (since URLs have a small maximum length).\n * @param {!Object} data The JSON data to transmit.\n */\n BrowserPollConnection.prototype.send = function (data) {\n var dataStr = util_2.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //first, lets get the base64-encoded data\n var base64data = util_2.base64Encode(dataStr);\n //We can only fit a certain amount in each URL, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_1.splitStringBySize(base64data, MAX_PAYLOAD_SIZE);\n //Enqueue each segment for transmission. We assign each chunk a sequential ID and a total number\n //of segments so that we can reassemble the packet on the server.\n for (var i = 0; i < dataSegs.length; i++) {\n this.scriptTagHolder.enqueueSegment(this.curSegmentNum, dataSegs.length, dataSegs[i]);\n this.curSegmentNum++;\n }\n };\n /**\n * This is how we notify the server that we're leaving.\n * We aren't able to send requests with DHTML on a window close event, but we can\n * trigger XHR requests in some browsers (everything but Opera basically).\n * @param {!string} id\n * @param {!string} pw\n */\n BrowserPollConnection.prototype.addDisconnectPingFrame = function (id, pw) {\n if (util_3.isNodeSdk())\n return;\n this.myDisconnFrame = document.createElement('iframe');\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = id;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = pw;\n this.myDisconnFrame.src = this.urlFn(urlParams);\n this.myDisconnFrame.style.display = 'none';\n document.body.appendChild(this.myDisconnFrame);\n };\n /**\n * Used to track the bytes received by this client\n * @param {*} args\n * @private\n */\n BrowserPollConnection.prototype.incrementIncomingBytes_ = function (args) {\n // TODO: This is an annoying perf hit just to track the number of incoming bytes. Maybe it should be opt-in.\n var bytesReceived = util_2.stringify(args).length;\n this.bytesReceived += bytesReceived;\n this.stats_.incrementCounter('bytes_received', bytesReceived);\n };\n return BrowserPollConnection;\n}());\nexports.BrowserPollConnection = BrowserPollConnection;\n/*********************************************************************************************\n * A wrapper around an iframe that is used as a long-polling script holder.\n * @constructor\n *********************************************************************************************/\nvar FirebaseIFrameScriptHolder = /** @class */ (function () {\n /**\n * @param commandCB - The callback to be called when control commands are recevied from the server.\n * @param onMessageCB - The callback to be triggered when responses arrive from the server.\n * @param onDisconnect - The callback to be triggered when this tag holder is closed\n * @param urlFn - A function that provides the URL of the endpoint to send data to.\n */\n function FirebaseIFrameScriptHolder(commandCB, onMessageCB, onDisconnect, urlFn) {\n this.onDisconnect = onDisconnect;\n this.urlFn = urlFn;\n //We maintain a count of all of the outstanding requests, because if we have too many active at once it can cause\n //problems in some browsers.\n /**\n * @type {CountedSet.}\n */\n this.outstandingRequests = new CountedSet_1.CountedSet();\n //A queue of the pending segments waiting for transmission to the server.\n this.pendingSegs = [];\n //A serial number. We use this for two things:\n // 1) A way to ensure the browser doesn't cache responses to polls\n // 2) A way to make the server aware when long-polls arrive in a different order than we started them. The\n // server needs to release both polls in this case or it will cause problems in Opera since Opera can only execute\n // JSONP code in the order it was added to the iframe.\n this.currentSerial = Math.floor(Math.random() * 100000000);\n // This gets set to false when we're \"closing down\" the connection (e.g. we're switching transports but there's still\n // incoming data from the server that we're waiting for).\n this.sendNewPolls = true;\n if (!util_3.isNodeSdk()) {\n //Each script holder registers a couple of uniquely named callbacks with the window. These are called from the\n //iframes where we put the long-polling script tags. We have two callbacks:\n // 1) Command Callback - Triggered for control issues, like starting a connection.\n // 2) Message Callback - Triggered when new data arrives.\n this.uniqueCallbackIdentifier = util_1.LUIDGenerator();\n window[exports.FIREBASE_LONGPOLL_COMMAND_CB_NAME + this.uniqueCallbackIdentifier] = commandCB;\n window[exports.FIREBASE_LONGPOLL_DATA_CB_NAME + this.uniqueCallbackIdentifier] = onMessageCB;\n //Create an iframe for us to add script tags to.\n this.myIFrame = FirebaseIFrameScriptHolder.createIFrame_();\n // Set the iframe's contents.\n var script = '';\n // if we set a javascript url, it's IE and we need to set the document domain. The javascript url is sufficient\n // for ie9, but ie8 needs to do it again in the document itself.\n if (this.myIFrame.src &&\n this.myIFrame.src.substr(0, 'javascript:'.length) === 'javascript:') {\n var currentDomain = document.domain;\n script = '';\n }\n var iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n }\n catch (e) {\n util_1.log('frame writing exception');\n if (e.stack) {\n util_1.log(e.stack);\n }\n util_1.log(e);\n }\n }\n else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n /**\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\n * actually use.\n * @private\n * @return {Element}\n */\n FirebaseIFrameScriptHolder.createIFrame_ = function () {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n var a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n util_1.log('No IE domain setting required');\n }\n }\n catch (e) {\n var domain = document.domain;\n iframe.src =\n \"javascript:void((function(){document.open();document.domain='\" +\n domain +\n \"';document.close();})())\";\n }\n }\n else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n iframe.doc = iframe.contentDocument; // Firefox, Opera, Safari\n }\n else if (iframe.contentWindow) {\n iframe.doc = iframe.contentWindow.document; // Internet Explorer\n }\n else if (iframe.document) {\n iframe.doc = iframe.document; //others?\n }\n return iframe;\n };\n /**\n * Cancel all outstanding queries and remove the frame.\n */\n FirebaseIFrameScriptHolder.prototype.close = function () {\n var _this = this;\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(function () {\n if (_this.myIFrame !== null) {\n document.body.removeChild(_this.myIFrame);\n _this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n if (util_3.isNodeSdk() && this.myID) {\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n var theURL = this.urlFn(urlParams);\n FirebaseIFrameScriptHolder.nodeRestRequest(theURL);\n }\n // Protect from being called recursively.\n var onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n };\n /**\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\n * @param {!string} id - The ID of this connection\n * @param {!string} pw - The password for this connection\n */\n FirebaseIFrameScriptHolder.prototype.startLongPoll = function (id, pw) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) { }\n };\n /**\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\n * too many outstanding requests and we are still alive.\n *\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\n * needed.\n */\n FirebaseIFrameScriptHolder.prototype.newRequest_ = function () {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (this.alive &&\n this.sendNewPolls &&\n this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)) {\n //construct our url\n this.currentSerial++;\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n var theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n var curDataString = '';\n var i = 0;\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n var nextSeg = this.pendingSegs[0];\n if (nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <=\n MAX_URL_DATA_SIZE) {\n //great, the segment will fit. Lets append it.\n var theSeg = this.pendingSegs.shift();\n curDataString =\n curDataString +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM +\n i +\n '=' +\n theSeg.seg +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET +\n i +\n '=' +\n theSeg.ts +\n '&' +\n exports.FIREBASE_LONGPOLL_DATA_PARAM +\n i +\n '=' +\n theSeg.d;\n i++;\n }\n else {\n break;\n }\n }\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * Queue a packet for transmission to the server.\n * @param segnum - A sequential id for this packet segment used for reassembly\n * @param totalsegs - The total number of segments in this packet\n * @param data - The data for this segment.\n */\n FirebaseIFrameScriptHolder.prototype.enqueueSegment = function (segnum, totalsegs, data) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n };\n /**\n * Add a script tag for a regular long-poll request.\n * @param {!string} url - The URL of the script tag.\n * @param {!number} serial - The serial number of the request.\n * @private\n */\n FirebaseIFrameScriptHolder.prototype.addLongPollTag_ = function (url, serial) {\n var _this = this;\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n var doNewRequest = function () {\n _this.outstandingRequests.remove(serial);\n _this.newRequest_();\n };\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n var keepaliveTimeout = setTimeout(doNewRequest, Math.floor(KEEPALIVE_REQUEST_INTERVAL));\n var readyStateCB = function () {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n this.addTag(url, readyStateCB);\n };\n /**\n * Add an arbitrary script tag to the iframe.\n * @param {!string} url - The URL for the script tag source.\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\n */\n FirebaseIFrameScriptHolder.prototype.addTag = function (url, loadCB) {\n var _this = this;\n if (util_3.isNodeSdk()) {\n this.doNodeLongPoll(url, loadCB);\n }\n else {\n setTimeout(function () {\n try {\n // if we're already closed, don't add this poll\n if (!_this.sendNewPolls)\n return;\n var newScript_1 = _this.myIFrame.doc.createElement('script');\n newScript_1.type = 'text/javascript';\n newScript_1.async = true;\n newScript_1.src = url;\n newScript_1.onload = newScript_1.onreadystatechange = function () {\n var rstate = newScript_1.readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript_1.onload = newScript_1.onreadystatechange = null;\n if (newScript_1.parentNode) {\n newScript_1.parentNode.removeChild(newScript_1);\n }\n loadCB();\n }\n };\n newScript_1.onerror = function () {\n util_1.log('Long-poll script failed to load: ' + url);\n _this.sendNewPolls = false;\n _this.close();\n };\n _this.myIFrame.doc.body.appendChild(newScript_1);\n }\n catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n };\n return FirebaseIFrameScriptHolder;\n}());\nexports.FirebaseIFrameScriptHolder = FirebaseIFrameScriptHolder;\n\n//# sourceMappingURL=BrowserPollConnection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/BrowserPollConnection.js\n// module id = 53\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = require(\"@firebase/app\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../core/util/util\");\nvar StatsManager_1 = require(\"../core/stats/StatsManager\");\nvar Constants_1 = require(\"./Constants\");\nvar util_3 = require(\"@firebase/util\");\nvar storage_1 = require(\"../core/storage/storage\");\nvar util_4 = require(\"@firebase/util\");\nvar util_5 = require(\"@firebase/util\");\nvar WEBSOCKET_MAX_FRAME_SIZE = 16384;\nvar WEBSOCKET_KEEPALIVE_INTERVAL = 45000;\nvar WebSocketImpl = null;\nif (typeof MozWebSocket !== 'undefined') {\n WebSocketImpl = MozWebSocket;\n}\nelse if (typeof WebSocket !== 'undefined') {\n WebSocketImpl = WebSocket;\n}\nfunction setWebSocketImpl(impl) {\n WebSocketImpl = impl;\n}\nexports.setWebSocketImpl = setWebSocketImpl;\n/**\n * Create a new websocket connection with the given callbacks.\n * @constructor\n * @implements {Transport}\n */\nvar WebSocketConnection = /** @class */ (function () {\n /**\n * @param {string} connId identifier for this transport\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n */\n function WebSocketConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.keepaliveTimer = null;\n this.frames = null;\n this.totalFrames = 0;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.log_ = util_2.logWrapper(this.connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.connURL = WebSocketConnection.connectionURL_(repoInfo, transportSessionId, lastSessionId);\n }\n /**\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n * @return {string} connection url\n * @private\n */\n WebSocketConnection.connectionURL_ = function (repoInfo, transportSessionId, lastSessionId) {\n var urlParams = {};\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (!util_5.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n if (transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = transportSessionId;\n }\n if (lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = lastSessionId;\n }\n return repoInfo.connectionURL(Constants_1.WEBSOCKET, urlParams);\n };\n /**\n *\n * @param onMessage Callback when messages arrive\n * @param onDisconnect Callback with connection lost.\n */\n WebSocketConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.onDisconnect = onDisconnect;\n this.onMessage = onMessage;\n this.log_('Websocket connecting to ' + this.connURL);\n this.everConnected_ = false;\n // Assume failure until proven otherwise.\n storage_1.PersistentStorage.set('previous_websocket_failure', true);\n try {\n if (util_5.isNodeSdk()) {\n var device = util_3.CONSTANTS.NODE_ADMIN ? 'AdminNode' : 'Node';\n // UA Format: Firebase////\n var options = {\n headers: {\n 'User-Agent': \"Firebase/\" + Constants_1.PROTOCOL_VERSION + \"/\" + app_1.default.SDK_VERSION + \"/\" + process.platform + \"/\" + device\n }\n };\n // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.\n var env = process['env'];\n var proxy = this.connURL.indexOf('wss://') == 0\n ? env['HTTPS_PROXY'] || env['https_proxy']\n : env['HTTP_PROXY'] || env['http_proxy'];\n if (proxy) {\n options['proxy'] = { origin: proxy };\n }\n this.mySock = new WebSocketImpl(this.connURL, [], options);\n }\n else {\n this.mySock = new WebSocketImpl(this.connURL);\n }\n }\n catch (e) {\n this.log_('Error instantiating WebSocket.');\n var error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n return;\n }\n this.mySock.onopen = function () {\n _this.log_('Websocket connected.');\n _this.everConnected_ = true;\n };\n this.mySock.onclose = function () {\n _this.log_('Websocket connection was disconnected.');\n _this.mySock = null;\n _this.onClosed_();\n };\n this.mySock.onmessage = function (m) {\n _this.handleIncomingFrame(m);\n };\n this.mySock.onerror = function (e) {\n _this.log_('WebSocket error. Closing connection.');\n var error = e.message || e.data;\n if (error) {\n _this.log_(error);\n }\n _this.onClosed_();\n };\n };\n /**\n * No-op for websockets, we don't need to do anything once the connection is confirmed as open\n */\n WebSocketConnection.prototype.start = function () { };\n WebSocketConnection.forceDisallow = function () {\n WebSocketConnection.forceDisallow_ = true;\n };\n WebSocketConnection.isAvailable = function () {\n var isOldAndroid = false;\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n var oldAndroidRegex = /Android ([0-9]{0,}\\.[0-9]{0,})/;\n var oldAndroidMatch = navigator.userAgent.match(oldAndroidRegex);\n if (oldAndroidMatch && oldAndroidMatch.length > 1) {\n if (parseFloat(oldAndroidMatch[1]) < 4.4) {\n isOldAndroid = true;\n }\n }\n }\n return (!isOldAndroid &&\n WebSocketImpl !== null &&\n !WebSocketConnection.forceDisallow_);\n };\n /**\n * Returns true if we previously failed to connect with this transport.\n * @return {boolean}\n */\n WebSocketConnection.previouslyFailed = function () {\n // If our persistent storage is actually only in-memory storage,\n // we default to assuming that it previously failed to be safe.\n return (storage_1.PersistentStorage.isInMemoryStorage ||\n storage_1.PersistentStorage.get('previous_websocket_failure') === true);\n };\n WebSocketConnection.prototype.markConnectionHealthy = function () {\n storage_1.PersistentStorage.remove('previous_websocket_failure');\n };\n WebSocketConnection.prototype.appendFrame_ = function (data) {\n this.frames.push(data);\n if (this.frames.length == this.totalFrames) {\n var fullMess = this.frames.join('');\n this.frames = null;\n var jsonMess = util_4.jsonEval(fullMess);\n //handle the message\n this.onMessage(jsonMess);\n }\n };\n /**\n * @param {number} frameCount The number of frames we are expecting from the server\n * @private\n */\n WebSocketConnection.prototype.handleNewFrameCount_ = function (frameCount) {\n this.totalFrames = frameCount;\n this.frames = [];\n };\n /**\n * Attempts to parse a frame count out of some text. If it can't, assumes a value of 1\n * @param {!String} data\n * @return {?String} Any remaining data to be process, or null if there is none\n * @private\n */\n WebSocketConnection.prototype.extractFrameCount_ = function (data) {\n util_1.assert(this.frames === null, 'We already have a frame buffer');\n // TODO: The server is only supposed to send up to 9999 frames (i.e. length <= 4), but that isn't being enforced\n // currently. So allowing larger frame counts (length <= 6). See https://app.asana.com/0/search/8688598998380/8237608042508\n if (data.length <= 6) {\n var frameCount = Number(data);\n if (!isNaN(frameCount)) {\n this.handleNewFrameCount_(frameCount);\n return null;\n }\n }\n this.handleNewFrameCount_(1);\n return data;\n };\n /**\n * Process a websocket frame that has arrived from the server.\n * @param mess The frame data\n */\n WebSocketConnection.prototype.handleIncomingFrame = function (mess) {\n if (this.mySock === null)\n return; // Chrome apparently delivers incoming packets even after we .close() the connection sometimes.\n var data = mess['data'];\n this.bytesReceived += data.length;\n this.stats_.incrementCounter('bytes_received', data.length);\n this.resetKeepAlive();\n if (this.frames !== null) {\n // we're buffering\n this.appendFrame_(data);\n }\n else {\n // try to parse out a frame count, otherwise, assume 1 and process it\n var remainingData = this.extractFrameCount_(data);\n if (remainingData !== null) {\n this.appendFrame_(remainingData);\n }\n }\n };\n /**\n * Send a message to the server\n * @param {Object} data The JSON object to transmit\n */\n WebSocketConnection.prototype.send = function (data) {\n this.resetKeepAlive();\n var dataStr = util_4.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //We can only fit a certain amount in each websocket frame, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_2.splitStringBySize(dataStr, WEBSOCKET_MAX_FRAME_SIZE);\n //Send the length header\n if (dataSegs.length > 1) {\n this.sendString_(String(dataSegs.length));\n }\n //Send the actual data in segments.\n for (var i = 0; i < dataSegs.length; i++) {\n this.sendString_(dataSegs[i]);\n }\n };\n WebSocketConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.keepaliveTimer) {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = null;\n }\n if (this.mySock) {\n this.mySock.close();\n this.mySock = null;\n }\n };\n WebSocketConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is closing itself');\n this.shutdown_();\n // since this is an internal close, trigger the close listener\n if (this.onDisconnect) {\n this.onDisconnect(this.everConnected_);\n this.onDisconnect = null;\n }\n }\n };\n /**\n * External-facing close handler.\n * Close the websocket and kill the connection.\n */\n WebSocketConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is being closed');\n this.shutdown_();\n }\n };\n /**\n * Kill the current keepalive timer and start a new one, to ensure that it always fires N seconds after\n * the last activity.\n */\n WebSocketConnection.prototype.resetKeepAlive = function () {\n var _this = this;\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = setInterval(function () {\n //If there has been no websocket activity for a while, send a no-op\n if (_this.mySock) {\n _this.sendString_('0');\n }\n _this.resetKeepAlive();\n }, Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL));\n };\n /**\n * Send a string over the websocket.\n *\n * @param {string} str String to send.\n * @private\n */\n WebSocketConnection.prototype.sendString_ = function (str) {\n // Firefox seems to sometimes throw exceptions (NS_ERROR_UNEXPECTED) from websocket .send()\n // calls for some unknown reason. We treat these as an error and disconnect.\n // See https://app.asana.com/0/58926111402292/68021340250410\n try {\n this.mySock.send(str);\n }\n catch (e) {\n this.log_('Exception thrown from WebSocket.send():', e.message || e.data, 'Closing connection.');\n setTimeout(this.onClosed_.bind(this), 0);\n }\n };\n /**\n * Number of response before we consider the connection \"healthy.\"\n * @type {number}\n */\n WebSocketConnection.responsesRequiredToBeHealthy = 2;\n /**\n * Time to wait for the connection te become healthy before giving up.\n * @type {number}\n */\n WebSocketConnection.healthyTimeout = 30000;\n return WebSocketConnection;\n}());\nexports.WebSocketConnection = WebSocketConnection;\n\n//# sourceMappingURL=WebSocketConnection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/WebSocketConnection.js\n// module id = 54\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Interface defining the set of actions that can be performed against the Firebase server\n * (basically corresponds to our wire protocol).\n *\n * @interface\n */\nvar ServerActions = /** @class */ (function () {\n function ServerActions() {\n }\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.put = function (pathString, data, onComplete, hash) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, ?string)} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.merge = function (pathString, data, onComplete, hash) { };\n /**\n * Refreshes the auth token for the current connection.\n * @param {string} token The authentication token\n */\n ServerActions.prototype.refreshAuthToken = function (token) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectPut = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectMerge = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectCancel = function (pathString, onComplete) { };\n /**\n * @param {Object.} stats\n */\n ServerActions.prototype.reportStats = function (stats) { };\n return ServerActions;\n}());\nexports.ServerActions = ServerActions;\n\n//# sourceMappingURL=ServerActions.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/ServerActions.js\n// module id = 55\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = require(\"./IndexedFilter\");\nvar PriorityIndex_1 = require(\"../../snap/indexes/PriorityIndex\");\nvar Node_1 = require(\"../../../core/snap/Node\");\nvar ChildrenNode_1 = require(\"../../snap/ChildrenNode\");\n/**\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar RangedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function RangedFilter(params) {\n this.indexedFilter_ = new IndexedFilter_1.IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getStartPost = function () {\n return this.startPost_;\n };\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getEndPost = function () {\n return this.endPost_;\n };\n /**\n * @param {!NamedNode} node\n * @return {boolean}\n */\n RangedFilter.prototype.matches = function (node) {\n return (this.index_.compare(this.getStartPost(), node) <= 0 &&\n this.index_.compare(node, this.getEndPost()) <= 0);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var self = this;\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!self.matches(new Node_1.NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndexedFilter = function () {\n return this.indexedFilter_;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getStartPost_ = function (params) {\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n }\n else {\n return params.getIndex().minPost();\n }\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getEndPost_ = function (params) {\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n }\n else {\n return params.getIndex().maxPost();\n }\n };\n return RangedFilter;\n}());\nexports.RangedFilter = RangedFilter;\n\n//# sourceMappingURL=RangedFilter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/filter/RangedFilter.js\n// module id = 56\n// module chunks = 0","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = require('@firebase/database');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./database/index.js\n// module id = 78\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = require(\"@firebase/app\");\nvar Database_1 = require(\"./src/api/Database\");\nexports.Database = Database_1.Database;\nvar Query_1 = require(\"./src/api/Query\");\nexports.Query = Query_1.Query;\nvar Reference_1 = require(\"./src/api/Reference\");\nexports.Reference = Reference_1.Reference;\nvar util_1 = require(\"./src/core/util/util\");\nexports.enableLogging = util_1.enableLogging;\nvar RepoManager_1 = require(\"./src/core/RepoManager\");\nvar INTERNAL = require(\"./src/api/internal\");\nvar TEST_ACCESS = require(\"./src/api/test_access\");\nvar util_2 = require(\"@firebase/util\");\nvar ServerValue = Database_1.Database.ServerValue;\nexports.ServerValue = ServerValue;\nfunction registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app, unused, url) { return RepoManager_1.RepoManager.getInstance().databaseFromApp(app, url); }, \n // firebase.database namespace properties\n {\n Reference: Reference_1.Reference,\n Query: Query_1.Query,\n Database: Database_1.Database,\n enableLogging: util_1.enableLogging,\n INTERNAL: INTERNAL,\n ServerValue: ServerValue,\n TEST_ACCESS: TEST_ACCESS\n }, null, true);\n if (util_2.isNodeSdk()) {\n module.exports = namespace;\n }\n}\nexports.registerDatabase = registerDatabase;\nregisterDatabase(app_1.default);\nvar DataSnapshot_1 = require(\"./src/api/DataSnapshot\");\nexports.DataSnapshot = DataSnapshot_1.DataSnapshot;\nvar onDisconnect_1 = require(\"./src/api/onDisconnect\");\nexports.OnDisconnect = onDisconnect_1.OnDisconnect;\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/index.js\n// module id = 79\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Wraps a DOM Storage object and:\n * - automatically encode objects as JSON strings before storing them to allow us to store arbitrary types.\n * - prefixes names with \"firebase:\" to avoid collisions with app data.\n *\n * We automatically (see storage.js) create two such wrappers, one for sessionStorage,\n * and one for localStorage.\n *\n * @constructor\n */\nvar DOMStorageWrapper = /** @class */ (function () {\n /**\n * @param {Storage} domStorage_ The underlying storage object (e.g. localStorage or sessionStorage)\n */\n function DOMStorageWrapper(domStorage_) {\n this.domStorage_ = domStorage_;\n // Use a prefix to avoid collisions with other stuff saved by the app.\n this.prefix_ = 'firebase:';\n }\n /**\n * @param {string} key The key to save the value under\n * @param {?Object} value The value being stored, or null to remove the key.\n */\n DOMStorageWrapper.prototype.set = function (key, value) {\n if (value == null) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n }\n else {\n this.domStorage_.setItem(this.prefixedName_(key), util_1.stringify(value));\n }\n };\n /**\n * @param {string} key\n * @return {*} The value that was stored under this key, or null\n */\n DOMStorageWrapper.prototype.get = function (key) {\n var storedVal = this.domStorage_.getItem(this.prefixedName_(key));\n if (storedVal == null) {\n return null;\n }\n else {\n return util_1.jsonEval(storedVal);\n }\n };\n /**\n * @param {string} key\n */\n DOMStorageWrapper.prototype.remove = function (key) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n };\n /**\n * @param {string} name\n * @return {string}\n */\n DOMStorageWrapper.prototype.prefixedName_ = function (name) {\n return this.prefix_ + name;\n };\n DOMStorageWrapper.prototype.toString = function () {\n return this.domStorage_.toString();\n };\n return DOMStorageWrapper;\n}());\nexports.DOMStorageWrapper = DOMStorageWrapper;\n\n//# sourceMappingURL=DOMStorageWrapper.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/storage/DOMStorageWrapper.js\n// module id = 80\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * An in-memory storage implementation that matches the API of DOMStorageWrapper\n * (TODO: create interface for both to implement).\n *\n * @constructor\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n this.cache_ = {};\n this.isInMemoryStorage = true;\n }\n MemoryStorage.prototype.set = function (key, value) {\n if (value == null) {\n delete this.cache_[key];\n }\n else {\n this.cache_[key] = value;\n }\n };\n MemoryStorage.prototype.get = function (key) {\n if (util_1.contains(this.cache_, key)) {\n return this.cache_[key];\n }\n return null;\n };\n MemoryStorage.prototype.remove = function (key) {\n delete this.cache_[key];\n };\n return MemoryStorage;\n}());\nexports.MemoryStorage = MemoryStorage;\n\n//# sourceMappingURL=MemoryStorage.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/storage/MemoryStorage.js\n// module id = 81\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar TransactionResult = /** @class */ (function () {\n /**\n * A type for the resolve value of Firebase.transaction.\n * @constructor\n * @dict\n * @param {boolean} committed\n * @param {DataSnapshot} snapshot\n */\n function TransactionResult(committed, snapshot) {\n this.committed = committed;\n this.snapshot = snapshot;\n }\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n TransactionResult.prototype.toJSON = function () {\n util_1.validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);\n return { committed: this.committed, snapshot: this.snapshot.toJSON() };\n };\n return TransactionResult;\n}());\nexports.TransactionResult = TransactionResult;\n\n//# sourceMappingURL=TransactionResult.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/TransactionResult.js\n// module id = 82\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Fancy ID generator that creates 20-character string identifiers with the\n * following properties:\n *\n * 1. They're based on timestamp so that they sort *after* any existing ids.\n * 2. They contain 72-bits of random data after the timestamp so that IDs won't\n * collide with other clients' IDs.\n * 3. They sort *lexicographically* (so the timestamp is converted to characters\n * that will sort properly).\n * 4. They're monotonically increasing. Even if you generate more than one in\n * the same timestamp, the latter ones will sort after the former ones. We do\n * this by using the previous random bits but \"incrementing\" them by 1 (only\n * in the case of a timestamp collision).\n */\nexports.nextPushId = (function () {\n // Modeled after base64 web-safe chars, but ordered by ASCII.\n var PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n // Timestamp of last push, used to prevent local collisions if you push twice\n // in one ms.\n var lastPushTime = 0;\n // We generate 72-bits of randomness which get turned into 12 characters and\n // appended to the timestamp to prevent collisions with other clients. We\n // store the last characters we generated because in the event of a collision,\n // we'll use those same characters except \"incremented\" by one.\n var lastRandChars = [];\n return function (now) {\n var duplicateTime = now === lastPushTime;\n lastPushTime = now;\n var i;\n var timeStampChars = new Array(8);\n for (i = 7; i >= 0; i--) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n // NOTE: Can't use << here because javascript will convert to int and lose\n // the upper bits.\n now = Math.floor(now / 64);\n }\n util_1.assert(now === 0, 'Cannot push at time == 0');\n var id = timeStampChars.join('');\n if (!duplicateTime) {\n for (i = 0; i < 12; i++) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n }\n else {\n // If the timestamp hasn't changed since last push, use the same random\n // number, except incremented by 1.\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i--) {\n lastRandChars[i] = 0;\n }\n lastRandChars[i]++;\n }\n for (i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n util_1.assert(id.length === 20, 'nextPushId: Length should be 20.');\n return id;\n };\n})();\n\n//# sourceMappingURL=NextPushId.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/NextPushId.js\n// module id = 83\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DataSnapshot_1 = require(\"../../api/DataSnapshot\");\nvar Event_1 = require(\"./Event\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Represents registration for 'value' events.\n */\nvar ValueEventRegistration = /** @class */ (function () {\n /**\n * @param {?function(!DataSnapshot)} callback_\n * @param {?function(Error)} cancelCallback_\n * @param {?Object} context_\n */\n function ValueEventRegistration(callback_, cancelCallback_, context_) {\n this.callback_ = callback_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.respondsTo = function (eventType) {\n return eventType === 'value';\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createEvent = function (change, query) {\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent('value', this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, query.getRef(), index));\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_1 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_1.call(ctx, eventData.error);\n };\n }\n else {\n var cb_1 = this.callback_;\n return function () {\n cb_1.call(ctx, eventData.snapshot);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.matches = function (other) {\n if (!(other instanceof ValueEventRegistration)) {\n return false;\n }\n else if (!other.callback_ || !this.callback_) {\n // If no callback specified, we consider it to match any callback.\n return true;\n }\n else {\n return (other.callback_ === this.callback_ && other.context_ === this.context_);\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.hasAnyCallback = function () {\n return this.callback_ !== null;\n };\n return ValueEventRegistration;\n}());\nexports.ValueEventRegistration = ValueEventRegistration;\n/**\n * Represents the registration of 1 or more child_xxx events.\n *\n * Currently, it is always exactly 1 child_xxx event, but the idea is we might let you\n * register a group of callbacks together in the future.\n *\n * @constructor\n * @implements {EventRegistration}\n */\nvar ChildEventRegistration = /** @class */ (function () {\n /**\n * @param {?Object.} callbacks_\n * @param {?function(Error)} cancelCallback_\n * @param {Object=} context_\n */\n function ChildEventRegistration(callbacks_, cancelCallback_, context_) {\n this.callbacks_ = callbacks_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.respondsTo = function (eventType) {\n var eventToCheck = eventType === 'children_added' ? 'child_added' : eventType;\n eventToCheck =\n eventToCheck === 'children_removed' ? 'child_removed' : eventToCheck;\n return util_1.contains(this.callbacks_, eventToCheck);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createEvent = function (change, query) {\n util_2.assert(change.childName != null, 'Child events should have a childName.');\n var ref = query.getRef().child(/** @type {!string} */ (change.childName));\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent(change.type, this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, ref, index), change.prevName);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_2 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_2.call(ctx, eventData.error);\n };\n }\n else {\n var cb_2 = this.callbacks_[eventData.eventType];\n return function () {\n cb_2.call(ctx, eventData.snapshot, eventData.prevName);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.matches = function (other) {\n if (other instanceof ChildEventRegistration) {\n if (!this.callbacks_ || !other.callbacks_) {\n return true;\n }\n else if (this.context_ === other.context_) {\n var otherCount = util_1.getCount(other.callbacks_);\n var thisCount = util_1.getCount(this.callbacks_);\n if (otherCount === thisCount) {\n // If count is 1, do an exact match on eventType, if either is defined but null, it's a match.\n // If event types don't match, not a match\n // If count is not 1, exact match across all\n if (otherCount === 1) {\n var otherKey /** @type {!string} */ = util_1.getAnyKey(other.callbacks_);\n var thisKey /** @type {!string} */ = util_1.getAnyKey(this.callbacks_);\n return (thisKey === otherKey &&\n (!other.callbacks_[otherKey] ||\n !this.callbacks_[thisKey] ||\n other.callbacks_[otherKey] === this.callbacks_[thisKey]));\n }\n else {\n // Exact match on each key.\n return util_1.every(this.callbacks_, function (eventType, cb) { return other.callbacks_[eventType] === cb; });\n }\n }\n }\n }\n return false;\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.hasAnyCallback = function () {\n return this.callbacks_ !== null;\n };\n return ChildEventRegistration;\n}());\nexports.ChildEventRegistration = ChildEventRegistration;\n\n//# sourceMappingURL=EventRegistration.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/EventRegistration.js\n// module id = 84\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Encapsulates the data needed to raise an event\n * @implements {Event}\n */\nvar DataEvent = /** @class */ (function () {\n /**\n * @param {!string} eventType One of: value, child_added, child_changed, child_moved, child_removed\n * @param {!EventRegistration} eventRegistration The function to call to with the event data. User provided\n * @param {!DataSnapshot} snapshot The data backing the event\n * @param {?string=} prevName Optional, the name of the previous child for child_* events.\n */\n function DataEvent(eventType, eventRegistration, snapshot, prevName) {\n this.eventType = eventType;\n this.eventRegistration = eventRegistration;\n this.snapshot = snapshot;\n this.prevName = prevName;\n }\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getPath = function () {\n var ref = this.snapshot.getRef();\n if (this.eventType === 'value') {\n return ref.path;\n }\n else {\n return ref.getParent().path;\n }\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventType = function () {\n return this.eventType;\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.toString = function () {\n return (this.getPath().toString() +\n ':' +\n this.eventType +\n ':' +\n util_1.stringify(this.snapshot.exportVal()));\n };\n return DataEvent;\n}());\nexports.DataEvent = DataEvent;\nvar CancelEvent = /** @class */ (function () {\n /**\n * @param {EventRegistration} eventRegistration\n * @param {Error} error\n * @param {!Path} path\n */\n function CancelEvent(eventRegistration, error, path) {\n this.eventRegistration = eventRegistration;\n this.error = error;\n this.path = path;\n }\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getPath = function () {\n return this.path;\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventType = function () {\n return 'cancel';\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.toString = function () {\n return this.path.toString() + ':cancel';\n };\n return CancelEvent;\n}());\nexports.CancelEvent = CancelEvent;\n\n//# sourceMappingURL=Event.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/Event.js\n// module id = 85\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util/util\");\nvar AckUserWrite_1 = require(\"./operation/AckUserWrite\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\nvar util_3 = require(\"@firebase/util\");\nvar ImmutableTree_1 = require(\"./util/ImmutableTree\");\nvar ListenComplete_1 = require(\"./operation/ListenComplete\");\nvar Merge_1 = require(\"./operation/Merge\");\nvar Operation_1 = require(\"./operation/Operation\");\nvar Overwrite_1 = require(\"./operation/Overwrite\");\nvar Path_1 = require(\"./util/Path\");\nvar SyncPoint_1 = require(\"./SyncPoint\");\nvar WriteTree_1 = require(\"./WriteTree\");\n/**\n * SyncTree is the central class for managing event callback registration, data caching, views\n * (query processing), and event generation. There are typically two SyncTree instances for\n * each Repo, one for the normal Firebase data, and one for the .info data.\n *\n * It has a number of responsibilities, including:\n * - Tracking all user event callbacks (registered via addEventRegistration() and removeEventRegistration()).\n * - Applying and caching data changes for user set(), transaction(), and update() calls\n * (applyUserOverwrite(), applyUserMerge()).\n * - Applying and caching data changes for server data changes (applyServerOverwrite(),\n * applyServerMerge()).\n * - Generating user-facing events for server and user changes (all of the apply* methods\n * return the set of events that need to be raised as a result).\n * - Maintaining the appropriate set of server listens to ensure we are always subscribed\n * to the correct set of paths and queries to satisfy the current set of user event\n * callbacks (listens are started/stopped using the provided listenProvider).\n *\n * NOTE: Although SyncTree tracks event callbacks and calculates events to raise, the actual\n * events are returned to the caller rather than raised synchronously.\n *\n * @constructor\n */\nvar SyncTree = /** @class */ (function () {\n /**\n * @param {!ListenProvider} listenProvider_ Used by SyncTree to start / stop listening\n * to server data.\n */\n function SyncTree(listenProvider_) {\n this.listenProvider_ = listenProvider_;\n /**\n * Tree of SyncPoints. There's a SyncPoint at any location that has 1 or more views.\n * @type {!ImmutableTree.}\n * @private\n */\n this.syncPointTree_ = ImmutableTree_1.ImmutableTree.Empty;\n /**\n * A tree of all pending user writes (user-initiated set()'s, transaction()'s, update()'s, etc.).\n * @type {!WriteTree}\n * @private\n */\n this.pendingWriteTree_ = new WriteTree_1.WriteTree();\n this.tagToQueryMap_ = {};\n this.queryToTagMap_ = {};\n }\n /**\n * Apply the data changes for a user-generated set() or transaction() call.\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @param {number} writeId\n * @param {boolean=} visible\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserOverwrite = function (path, newData, writeId, visible) {\n // Record pending write.\n this.pendingWriteTree_.addOverwrite(path, newData, writeId, visible);\n if (!visible) {\n return [];\n }\n else {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.User, path, newData));\n }\n };\n /**\n * Apply the data from a user-generated update() call\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserMerge = function (path, changedChildren, writeId) {\n // Record pending merge.\n this.pendingWriteTree_.addMerge(path, changedChildren, writeId);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.User, path, changeTree));\n };\n /**\n * Acknowledge a pending user write that was previously registered with applyUserOverwrite() or applyUserMerge().\n *\n * @param {!number} writeId\n * @param {boolean=} revert True if the given write failed and needs to be reverted\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.ackUserWrite = function (writeId, revert) {\n if (revert === void 0) { revert = false; }\n var write = this.pendingWriteTree_.getWrite(writeId);\n var needToReevaluate = this.pendingWriteTree_.removeWrite(writeId);\n if (!needToReevaluate) {\n return [];\n }\n else {\n var affectedTree_1 = ImmutableTree_1.ImmutableTree.Empty;\n if (write.snap != null) {\n // overwrite\n affectedTree_1 = affectedTree_1.set(Path_1.Path.Empty, true);\n }\n else {\n util_3.forEach(write.children, function (pathString, node) {\n affectedTree_1 = affectedTree_1.set(new Path_1.Path(pathString), node);\n });\n }\n return this.applyOperationToSyncPoints_(new AckUserWrite_1.AckUserWrite(write.path, affectedTree_1, revert));\n }\n };\n /**\n * Apply new server data for the specified path..\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerOverwrite = function (path, newData) {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.Server, path, newData));\n };\n /**\n * Apply new server data to be merged in at the specified path.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerMerge = function (path, changedChildren) {\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.Server, path, changeTree));\n };\n /**\n * Apply a listen complete for a query\n *\n * @param {!Path} path\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyListenComplete = function (path) {\n return this.applyOperationToSyncPoints_(new ListenComplete_1.ListenComplete(Operation_1.OperationSource.Server, path));\n };\n /**\n * Apply new server data for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryOverwrite = function (path, snap, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey != null) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new Overwrite_1.Overwrite(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, snap);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // Query must have been removed already\n return [];\n }\n };\n /**\n * Apply server data to be merged in for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryMerge = function (path, changedChildren, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n var op = new Merge_1.Merge(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, changeTree);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Apply a listen complete for a tagged query\n *\n * @param {!Path} path\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedListenComplete = function (path, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new ListenComplete_1.ListenComplete(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.addEventRegistration = function (query, eventRegistration) {\n var path = query.path;\n var serverCache = null;\n var foundAncestorDefaultView = false;\n // Any covering writes will necessarily be at the root, so really all we need to find is the server cache.\n // Consider optimizing this once there's a better understanding of what actual behavior will be.\n this.syncPointTree_.foreachOnPath(path, function (pathToSyncPoint, sp) {\n var relativePath = Path_1.Path.relativePath(pathToSyncPoint, path);\n serverCache = serverCache || sp.getCompleteServerCache(relativePath);\n foundAncestorDefaultView =\n foundAncestorDefaultView || sp.hasCompleteView();\n });\n var syncPoint = this.syncPointTree_.get(path);\n if (!syncPoint) {\n syncPoint = new SyncPoint_1.SyncPoint();\n this.syncPointTree_ = this.syncPointTree_.set(path, syncPoint);\n }\n else {\n foundAncestorDefaultView =\n foundAncestorDefaultView || syncPoint.hasCompleteView();\n serverCache = serverCache || syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var serverCacheComplete;\n if (serverCache != null) {\n serverCacheComplete = true;\n }\n else {\n serverCacheComplete = false;\n serverCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var subtree = this.syncPointTree_.subtree(path);\n subtree.foreachChild(function (childName, childSyncPoint) {\n var completeCache = childSyncPoint.getCompleteServerCache(Path_1.Path.Empty);\n if (completeCache) {\n serverCache = serverCache.updateImmediateChild(childName, completeCache);\n }\n });\n }\n var viewAlreadyExists = syncPoint.viewExistsForQuery(query);\n if (!viewAlreadyExists && !query.getQueryParams().loadsAllData()) {\n // We need to track a tag for this query\n var queryKey = SyncTree.makeQueryKey_(query);\n util_1.assert(!(queryKey in this.queryToTagMap_), 'View does not exist, but we have a tag');\n var tag = SyncTree.getNextQueryTag_();\n this.queryToTagMap_[queryKey] = tag;\n // Coerce to string to avoid sparse arrays.\n this.tagToQueryMap_['_' + tag] = queryKey;\n }\n var writesCache = this.pendingWriteTree_.childWrites(path);\n var events = syncPoint.addEventRegistration(query, eventRegistration, writesCache, serverCache, serverCacheComplete);\n if (!viewAlreadyExists && !foundAncestorDefaultView) {\n var view /** @type !View */ = syncPoint.viewForQuery(query);\n events = events.concat(this.setupListener_(query, view));\n }\n return events;\n };\n /**\n * Remove event callback(s).\n *\n * If query is the default query, we'll check all queries for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified query/queries.\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, all callbacks are removed.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n SyncTree.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var _this = this;\n // Find the syncPoint first. Then deal with whether or not it has matching listeners\n var path = query.path;\n var maybeSyncPoint = this.syncPointTree_.get(path);\n var cancelEvents = [];\n // A removal on a default query affects all queries at that location. A removal on an indexed query, even one without\n // other query constraints, does *not* affect all queries at that location. So this check must be for 'default', and\n // not loadsAllData().\n if (maybeSyncPoint &&\n (query.queryIdentifier() === 'default' ||\n maybeSyncPoint.viewExistsForQuery(query))) {\n /**\n * @type {{removed: !Array., events: !Array.}}\n */\n var removedAndEvents = maybeSyncPoint.removeEventRegistration(query, eventRegistration, cancelError);\n if (maybeSyncPoint.isEmpty()) {\n this.syncPointTree_ = this.syncPointTree_.remove(path);\n }\n var removed = removedAndEvents.removed;\n cancelEvents = removedAndEvents.events;\n // We may have just removed one of many listeners and can short-circuit this whole process\n // We may also not have removed a default listener, in which case all of the descendant listeners should already be\n // properly set up.\n //\n // Since indexed queries can shadow if they don't have other query constraints, check for loadsAllData(), instead of\n // queryId === 'default'\n var removingDefault = -1 !==\n removed.findIndex(function (query) {\n return query.getQueryParams().loadsAllData();\n });\n var covered = this.syncPointTree_.findOnPath(path, function (relativePath, parentSyncPoint) {\n return parentSyncPoint.hasCompleteView();\n });\n if (removingDefault && !covered) {\n var subtree = this.syncPointTree_.subtree(path);\n // There are potentially child listeners. Determine what if any listens we need to send before executing the\n // removal\n if (!subtree.isEmpty()) {\n // We need to fold over our subtree and collect the listeners to send\n var newViews = this.collectDistinctViewsForSubTree_(subtree);\n // Ok, we've collected all the listens we need. Set them up.\n for (var i = 0; i < newViews.length; ++i) {\n var view = newViews[i], newQuery = view.getQuery();\n var listener = this.createListenerForView_(view);\n this.listenProvider_.startListening(SyncTree.queryForListening_(newQuery), this.tagForQuery_(newQuery), listener.hashFn, listener.onComplete);\n }\n }\n else {\n // There's nothing below us, so nothing we need to start listening on\n }\n }\n // If we removed anything and we're not covered by a higher up listen, we need to stop listening on this query\n // The above block has us covered in terms of making sure we're set up on listens lower in the tree.\n // Also, note that if we have a cancelError, it's already been removed at the provider level.\n if (!covered && removed.length > 0 && !cancelError) {\n // If we removed a default, then we weren't listening on any of the other queries here. Just cancel the one\n // default. Otherwise, we need to iterate through and cancel each individual query\n if (removingDefault) {\n // We don't tag default listeners\n var defaultTag = null;\n this.listenProvider_.stopListening(SyncTree.queryForListening_(query), defaultTag);\n }\n else {\n removed.forEach(function (queryToRemove) {\n var tagToRemove = _this.queryToTagMap_[SyncTree.makeQueryKey_(queryToRemove)];\n _this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToRemove), tagToRemove);\n });\n }\n }\n // Now, clear all of the tags we're tracking for the removed listens\n this.removeTags_(removed);\n }\n else {\n // No-op, this listener must've been already removed\n }\n return cancelEvents;\n };\n /**\n * Returns a complete cache, if we have one, of the data at a particular path. The location must have a listener above\n * it, but as this is only used by transaction code, that should always be the case anyways.\n *\n * Note: this method will *include* hidden writes from transaction with applyLocally set to false.\n * @param {!Path} path The path to the data we want\n * @param {Array.=} writeIdsToExclude A specific set to be excluded\n * @return {?Node}\n */\n SyncTree.prototype.calcCompleteEventCache = function (path, writeIdsToExclude) {\n var includeHiddenSets = true;\n var writeTree = this.pendingWriteTree_;\n var serverCache = this.syncPointTree_.findOnPath(path, function (pathSoFar, syncPoint) {\n var relativePath = Path_1.Path.relativePath(pathSoFar, path);\n var serverCache = syncPoint.getCompleteServerCache(relativePath);\n if (serverCache) {\n return serverCache;\n }\n });\n return writeTree.calcCompleteEventCache(path, serverCache, writeIdsToExclude, includeHiddenSets);\n };\n /**\n * This collapses multiple unfiltered views into a single view, since we only need a single\n * listener for them.\n *\n * @param {!ImmutableTree.} subtree\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.collectDistinctViewsForSubTree_ = function (subtree) {\n return subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (maybeChildSyncPoint && maybeChildSyncPoint.hasCompleteView()) {\n var completeView = maybeChildSyncPoint.getCompleteView();\n return [completeView];\n }\n else {\n // No complete view here, flatten any deeper listens into an array\n var views_1 = [];\n if (maybeChildSyncPoint) {\n views_1 = maybeChildSyncPoint.getQueryViews();\n }\n util_3.forEach(childMap, function (key, childViews) {\n views_1 = views_1.concat(childViews);\n });\n return views_1;\n }\n });\n };\n /**\n * @param {!Array.} queries\n * @private\n */\n SyncTree.prototype.removeTags_ = function (queries) {\n for (var j = 0; j < queries.length; ++j) {\n var removedQuery = queries[j];\n if (!removedQuery.getQueryParams().loadsAllData()) {\n // We should have a tag for this\n var removedQueryKey = SyncTree.makeQueryKey_(removedQuery);\n var removedQueryTag = this.queryToTagMap_[removedQueryKey];\n delete this.queryToTagMap_[removedQueryKey];\n delete this.tagToQueryMap_['_' + removedQueryTag];\n }\n }\n };\n /**\n * Normalizes a query to a query we send the server for listening\n * @param {!Query} query\n * @return {!Query} The normalized query\n * @private\n */\n SyncTree.queryForListening_ = function (query) {\n if (query.getQueryParams().loadsAllData() &&\n !query.getQueryParams().isDefault()) {\n // We treat queries that load all data as default queries\n // Cast is necessary because ref() technically returns Firebase which is actually fb.api.Firebase which inherits\n // from Query\n return /** @type {!Query} */ query.getRef();\n }\n else {\n return query;\n }\n };\n /**\n * For a given new listen, manage the de-duplication of outstanding subscriptions.\n *\n * @param {!Query} query\n * @param {!View} view\n * @return {!Array.} This method can return events to support synchronous data sources\n * @private\n */\n SyncTree.prototype.setupListener_ = function (query, view) {\n var path = query.path;\n var tag = this.tagForQuery_(query);\n var listener = this.createListenerForView_(view);\n var events = this.listenProvider_.startListening(SyncTree.queryForListening_(query), tag, listener.hashFn, listener.onComplete);\n var subtree = this.syncPointTree_.subtree(path);\n // The root of this subtree has our query. We're here because we definitely need to send a listen for that, but we\n // may need to shadow other listens as well.\n if (tag) {\n util_1.assert(!subtree.value.hasCompleteView(), \"If we're adding a query, it shouldn't be shadowed\");\n }\n else {\n // Shadow everything at or below this location, this is a default listener.\n var queriesToStop = subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (!relativePath.isEmpty() &&\n maybeChildSyncPoint &&\n maybeChildSyncPoint.hasCompleteView()) {\n return [maybeChildSyncPoint.getCompleteView().getQuery()];\n }\n else {\n // No default listener here, flatten any deeper queries into an array\n var queries_1 = [];\n if (maybeChildSyncPoint) {\n queries_1 = queries_1.concat(maybeChildSyncPoint.getQueryViews().map(function (view) { return view.getQuery(); }));\n }\n util_3.forEach(childMap, function (key, childQueries) {\n queries_1 = queries_1.concat(childQueries);\n });\n return queries_1;\n }\n });\n for (var i = 0; i < queriesToStop.length; ++i) {\n var queryToStop = queriesToStop[i];\n this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToStop), this.tagForQuery_(queryToStop));\n }\n }\n return events;\n };\n /**\n *\n * @param {!View} view\n * @return {{hashFn: function(), onComplete: function(!string, *)}}\n * @private\n */\n SyncTree.prototype.createListenerForView_ = function (view) {\n var _this = this;\n var query = view.getQuery();\n var tag = this.tagForQuery_(query);\n return {\n hashFn: function () {\n var cache = view.getServerCache() || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return cache.hash();\n },\n onComplete: function (status) {\n if (status === 'ok') {\n if (tag) {\n return _this.applyTaggedListenComplete(query.path, tag);\n }\n else {\n return _this.applyListenComplete(query.path);\n }\n }\n else {\n // If a listen failed, kill all of the listeners here, not just the one that triggered the error.\n // Note that this may need to be scoped to just this listener if we change permissions on filtered children\n var error = util_2.errorForServerCode(status, query);\n return _this.removeEventRegistration(query, \n /*eventRegistration*/ null, error);\n }\n }\n };\n };\n /**\n * Given a query, computes a \"queryKey\" suitable for use in our queryToTagMap_.\n * @private\n * @param {!Query} query\n * @return {string}\n */\n SyncTree.makeQueryKey_ = function (query) {\n return query.path.toString() + '$' + query.queryIdentifier();\n };\n /**\n * Given a queryKey (created by makeQueryKey), parse it back into a path and queryId.\n * @private\n * @param {!string} queryKey\n * @return {{queryId: !string, path: !Path}}\n */\n SyncTree.parseQueryKey_ = function (queryKey) {\n var splitIndex = queryKey.indexOf('$');\n util_1.assert(splitIndex !== -1 && splitIndex < queryKey.length - 1, 'Bad queryKey.');\n return {\n queryId: queryKey.substr(splitIndex + 1),\n path: new Path_1.Path(queryKey.substr(0, splitIndex))\n };\n };\n /**\n * Return the query associated with the given tag, if we have one\n * @param {!number} tag\n * @return {?string}\n * @private\n */\n SyncTree.prototype.queryKeyForTag_ = function (tag) {\n return this.tagToQueryMap_['_' + tag];\n };\n /**\n * Return the tag associated with the given query.\n * @param {!Query} query\n * @return {?number}\n * @private\n */\n SyncTree.prototype.tagForQuery_ = function (query) {\n var queryKey = SyncTree.makeQueryKey_(query);\n return util_3.safeGet(this.queryToTagMap_, queryKey);\n };\n /**\n * Static accessor for query tags.\n * @return {number}\n * @private\n */\n SyncTree.getNextQueryTag_ = function () {\n return SyncTree.nextQueryTag_++;\n };\n /**\n * A helper method to apply tagged operations\n *\n * @param {!Path} queryPath\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyTaggedOperation_ = function (queryPath, operation) {\n var syncPoint = this.syncPointTree_.get(queryPath);\n util_1.assert(syncPoint, \"Missing sync point for query tag that we're tracking\");\n var writesCache = this.pendingWriteTree_.childWrites(queryPath);\n return syncPoint.applyOperation(operation, writesCache, \n /*serverCache=*/ null);\n };\n /**\n * A helper method that visits all descendant and ancestor SyncPoints, applying the operation.\n *\n * NOTES:\n * - Descendant SyncPoints will be visited first (since we raise events depth-first).\n \n * - We call applyOperation() on each SyncPoint passing three things:\n * 1. A version of the Operation that has been made relative to the SyncPoint location.\n * 2. A WriteTreeRef of any writes we have cached at the SyncPoint location.\n * 3. A snapshot Node with cached server data, if we have it.\n \n * - We concatenate all of the events returned by each SyncPoint and return the result.\n *\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyOperationToSyncPoints_ = function (operation) {\n return this.applyOperationHelper_(operation, this.syncPointTree_, \n /*serverCache=*/ null, this.pendingWriteTree_.childWrites(Path_1.Path.Empty));\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n if (operation.path.isEmpty()) {\n return this.applyOperationDescendantsHelper_(operation, syncPointTree, serverCache, writesCache);\n }\n else {\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n var childName = operation.path.getFront();\n var childOperation = operation.operationForChild(childName);\n var childTree = syncPointTree.children.get(childName);\n if (childTree && childOperation) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n events = events.concat(this.applyOperationHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n }\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationDescendantsHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n var _this = this;\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n syncPointTree.children.inorderTraversal(function (childName, childTree) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n var childOperation = operation.operationForChild(childName);\n if (childOperation) {\n events = events.concat(_this.applyOperationDescendantsHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n });\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n };\n /**\n * Static tracker for next query tag.\n * @type {number}\n * @private\n */\n SyncTree.nextQueryTag_ = 1;\n return SyncTree;\n}());\nexports.SyncTree = SyncTree;\n\n//# sourceMappingURL=SyncTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SyncTree.js\n// module id = 86\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Path_1 = require(\"../util/Path\");\nvar Operation_1 = require(\"./Operation\");\nvar AckUserWrite = /** @class */ (function () {\n /**\n *\n * @param {!Path} path\n * @param {!ImmutableTree} affectedTree A tree containing true for each affected path. Affected paths can't overlap.\n * @param {!boolean} revert\n */\n function AckUserWrite(\n /**@inheritDoc */ path, \n /**@inheritDoc */ affectedTree, \n /**@inheritDoc */ revert) {\n this.path = path;\n this.affectedTree = affectedTree;\n this.revert = revert;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.ACK_USER_WRITE;\n /** @inheritDoc */\n this.source = Operation_1.OperationSource.User;\n }\n /**\n * @inheritDoc\n */\n AckUserWrite.prototype.operationForChild = function (childName) {\n if (!this.path.isEmpty()) {\n util_1.assert(this.path.getFront() === childName, 'operationForChild called for unrelated child.');\n return new AckUserWrite(this.path.popFront(), this.affectedTree, this.revert);\n }\n else if (this.affectedTree.value != null) {\n util_1.assert(this.affectedTree.children.isEmpty(), 'affectedTree should not have overlapping affected paths.');\n // All child locations are affected as well; just return same operation.\n return this;\n }\n else {\n var childTree = this.affectedTree.subtree(new Path_1.Path(childName));\n return new AckUserWrite(Path_1.Path.Empty, childTree, this.revert);\n }\n };\n return AckUserWrite;\n}());\nexports.AckUserWrite = AckUserWrite;\n\n//# sourceMappingURL=AckUserWrite.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/AckUserWrite.js\n// module id = 87\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"../util/Path\");\nvar Operation_1 = require(\"./Operation\");\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @constructor\n * @implements {Operation}\n */\nvar ListenComplete = /** @class */ (function () {\n function ListenComplete(source, path) {\n this.source = source;\n this.path = path;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.LISTEN_COMPLETE;\n }\n ListenComplete.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new ListenComplete(this.source, Path_1.Path.Empty);\n }\n else {\n return new ListenComplete(this.source, this.path.popFront());\n }\n };\n return ListenComplete;\n}());\nexports.ListenComplete = ListenComplete;\n\n//# sourceMappingURL=ListenComplete.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/ListenComplete.js\n// module id = 88\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = require(\"./Operation\");\nvar Overwrite_1 = require(\"./Overwrite\");\nvar Path_1 = require(\"../util/Path\");\nvar util_1 = require(\"@firebase/util\");\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!ImmutableTree.} children\n * @constructor\n * @implements {Operation}\n */\nvar Merge = /** @class */ (function () {\n function Merge(\n /**@inheritDoc */ source, \n /**@inheritDoc */ path, \n /**@inheritDoc */ children) {\n this.source = source;\n this.path = path;\n this.children = children;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.MERGE;\n }\n /**\n * @inheritDoc\n */\n Merge.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n var childTree = this.children.subtree(new Path_1.Path(childName));\n if (childTree.isEmpty()) {\n // This child is unaffected\n return null;\n }\n else if (childTree.value) {\n // We have a snapshot for the child in question. This becomes an overwrite of the child.\n return new Overwrite_1.Overwrite(this.source, Path_1.Path.Empty, childTree.value);\n }\n else {\n // This is a merge at a deeper level\n return new Merge(this.source, Path_1.Path.Empty, childTree);\n }\n }\n else {\n util_1.assert(this.path.getFront() === childName, \"Can't get a merge for a child not on the path of the operation\");\n return new Merge(this.source, this.path.popFront(), this.children);\n }\n };\n /**\n * @inheritDoc\n */\n Merge.prototype.toString = function () {\n return ('Operation(' +\n this.path +\n ': ' +\n this.source.toString() +\n ' merge: ' +\n this.children.toString() +\n ')');\n };\n return Merge;\n}());\nexports.Merge = Merge;\n\n//# sourceMappingURL=Merge.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/Merge.js\n// module id = 89\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = require(\"./filter/IndexedFilter\");\nvar ViewProcessor_1 = require(\"./ViewProcessor\");\nvar ChildrenNode_1 = require(\"../snap/ChildrenNode\");\nvar CacheNode_1 = require(\"./CacheNode\");\nvar ViewCache_1 = require(\"./ViewCache\");\nvar EventGenerator_1 = require(\"./EventGenerator\");\nvar util_1 = require(\"@firebase/util\");\nvar Operation_1 = require(\"../operation/Operation\");\nvar Change_1 = require(\"./Change\");\nvar PriorityIndex_1 = require(\"../snap/indexes/PriorityIndex\");\n/**\n * A view represents a specific location and query that has 1 or more event registrations.\n *\n * It does several things:\n * - Maintains the list of event registrations for this location/query.\n * - Maintains a cache of the data visible for this location/query.\n * - Applies new operations (via applyOperation), updates the cache, and based on the event\n * registrations returns the set of events to be raised.\n * @constructor\n */\nvar View = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n * @param {!ViewCache} initialViewCache\n */\n function View(query_, initialViewCache) {\n this.query_ = query_;\n this.eventRegistrations_ = [];\n var params = this.query_.getQueryParams();\n var indexFilter = new IndexedFilter_1.IndexedFilter(params.getIndex());\n var filter = params.getNodeFilter();\n /**\n * @type {ViewProcessor}\n * @private\n */\n this.processor_ = new ViewProcessor_1.ViewProcessor(filter);\n var initialServerCache = initialViewCache.getServerCache();\n var initialEventCache = initialViewCache.getEventCache();\n // Don't filter server node with other filter than index, wait for tagged listen\n var serverSnap = indexFilter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialServerCache.getNode(), null);\n var eventSnap = filter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialEventCache.getNode(), null);\n var newServerCache = new CacheNode_1.CacheNode(serverSnap, initialServerCache.isFullyInitialized(), indexFilter.filtersNodes());\n var newEventCache = new CacheNode_1.CacheNode(eventSnap, initialEventCache.isFullyInitialized(), filter.filtersNodes());\n /**\n * @type {!ViewCache}\n * @private\n */\n this.viewCache_ = new ViewCache_1.ViewCache(newEventCache, newServerCache);\n /**\n * @type {!EventGenerator}\n * @private\n */\n this.eventGenerator_ = new EventGenerator_1.EventGenerator(this.query_);\n }\n /**\n * @return {!Query}\n */\n View.prototype.getQuery = function () {\n return this.query_;\n };\n /**\n * @return {?Node}\n */\n View.prototype.getServerCache = function () {\n return this.viewCache_.getServerCache().getNode();\n };\n /**\n * @param {!Path} path\n * @return {?Node}\n */\n View.prototype.getCompleteServerCache = function (path) {\n var cache = this.viewCache_.getCompleteServerSnap();\n if (cache) {\n // If this isn't a \"loadsAllData\" view, then cache isn't actually a complete cache and\n // we need to see if it contains the child we're interested in.\n if (this.query_.getQueryParams().loadsAllData() ||\n (!path.isEmpty() && !cache.getImmediateChild(path.getFront()).isEmpty())) {\n return cache.getChild(path);\n }\n }\n return null;\n };\n /**\n * @return {boolean}\n */\n View.prototype.isEmpty = function () {\n return this.eventRegistrations_.length === 0;\n };\n /**\n * @param {!EventRegistration} eventRegistration\n */\n View.prototype.addEventRegistration = function (eventRegistration) {\n this.eventRegistrations_.push(eventRegistration);\n };\n /**\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n View.prototype.removeEventRegistration = function (eventRegistration, cancelError) {\n var cancelEvents = [];\n if (cancelError) {\n util_1.assert(eventRegistration == null, 'A cancel should cancel all event registrations.');\n var path_1 = this.query_.path;\n this.eventRegistrations_.forEach(function (registration) {\n cancelError /** @type {!Error} */ = cancelError;\n var maybeEvent = registration.createCancelEvent(cancelError, path_1);\n if (maybeEvent) {\n cancelEvents.push(maybeEvent);\n }\n });\n }\n if (eventRegistration) {\n var remaining = [];\n for (var i = 0; i < this.eventRegistrations_.length; ++i) {\n var existing = this.eventRegistrations_[i];\n if (!existing.matches(eventRegistration)) {\n remaining.push(existing);\n }\n else if (eventRegistration.hasAnyCallback()) {\n // We're removing just this one\n remaining = remaining.concat(this.eventRegistrations_.slice(i + 1));\n break;\n }\n }\n this.eventRegistrations_ = remaining;\n }\n else {\n this.eventRegistrations_ = [];\n }\n return cancelEvents;\n };\n /**\n * Applies the given Operation, updates our cache, and returns the appropriate events.\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @return {!Array.}\n */\n View.prototype.applyOperation = function (operation, writesCache, completeServerCache) {\n if (operation.type === Operation_1.OperationType.MERGE &&\n operation.source.queryId !== null) {\n util_1.assert(this.viewCache_.getCompleteServerSnap(), 'We should always have a full cache before handling merges');\n util_1.assert(this.viewCache_.getCompleteEventSnap(), 'Missing event cache, even though we have a server cache');\n }\n var oldViewCache = this.viewCache_;\n var result = this.processor_.applyOperation(oldViewCache, operation, writesCache, completeServerCache);\n this.processor_.assertIndexed(result.viewCache);\n util_1.assert(result.viewCache.getServerCache().isFullyInitialized() ||\n !oldViewCache.getServerCache().isFullyInitialized(), 'Once a server snap is complete, it should never go back');\n this.viewCache_ = result.viewCache;\n return this.generateEventsForChanges_(result.changes, result.viewCache.getEventCache().getNode(), null);\n };\n /**\n * @param {!EventRegistration} registration\n * @return {!Array.}\n */\n View.prototype.getInitialEvents = function (registration) {\n var eventSnap = this.viewCache_.getEventCache();\n var initialChanges = [];\n if (!eventSnap.getNode().isLeafNode()) {\n var eventNode = eventSnap.getNode();\n eventNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n initialChanges.push(Change_1.Change.childAddedChange(key, childNode));\n });\n }\n if (eventSnap.isFullyInitialized()) {\n initialChanges.push(Change_1.Change.valueChange(eventSnap.getNode()));\n }\n return this.generateEventsForChanges_(initialChanges, eventSnap.getNode(), registration);\n };\n /**\n * @private\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {EventRegistration=} eventRegistration\n * @return {!Array.}\n */\n View.prototype.generateEventsForChanges_ = function (changes, eventCache, eventRegistration) {\n var registrations = eventRegistration\n ? [eventRegistration]\n : this.eventRegistrations_;\n return this.eventGenerator_.generateEventsForChanges(changes, eventCache, registrations);\n };\n return View;\n}());\nexports.View = View;\n\n//# sourceMappingURL=View.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/View.js\n// module id = 90\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = require(\"../operation/Operation\");\nvar util_1 = require(\"@firebase/util\");\nvar ChildChangeAccumulator_1 = require(\"./ChildChangeAccumulator\");\nvar Change_1 = require(\"./Change\");\nvar ChildrenNode_1 = require(\"../snap/ChildrenNode\");\nvar KeyIndex_1 = require(\"../snap/indexes/KeyIndex\");\nvar ImmutableTree_1 = require(\"../util/ImmutableTree\");\nvar Path_1 = require(\"../util/Path\");\nvar CompleteChildSource_1 = require(\"./CompleteChildSource\");\n/**\n * @constructor\n * @struct\n */\nvar ProcessorResult = /** @class */ (function () {\n /**\n * @param {!ViewCache} viewCache\n * @param {!Array.} changes\n */\n function ProcessorResult(viewCache, changes) {\n this.viewCache = viewCache;\n this.changes = changes;\n }\n return ProcessorResult;\n}());\nexports.ProcessorResult = ProcessorResult;\n/**\n * @constructor\n */\nvar ViewProcessor = /** @class */ (function () {\n /**\n * @param {!NodeFilter} filter_\n */\n function ViewProcessor(filter_) {\n this.filter_ = filter_;\n }\n /**\n * @param {!ViewCache} viewCache\n */\n ViewProcessor.prototype.assertIndexed = function (viewCache) {\n util_1.assert(viewCache\n .getEventCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Event snap not indexed');\n util_1.assert(viewCache\n .getServerCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Server snap not indexed');\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @return {!ProcessorResult}\n */\n ViewProcessor.prototype.applyOperation = function (oldViewCache, operation, writesCache, completeCache) {\n var accumulator = new ChildChangeAccumulator_1.ChildChangeAccumulator();\n var newViewCache, filterServerNode;\n if (operation.type === Operation_1.OperationType.OVERWRITE) {\n var overwrite = operation;\n if (overwrite.source.fromUser) {\n newViewCache = this.applyUserOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(overwrite.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered and the\n // update is not at the root in which case it is ok (and necessary) to mark the node unfiltered\n // again\n filterServerNode =\n overwrite.source.tagged ||\n (oldViewCache.getServerCache().isFiltered() &&\n !overwrite.path.isEmpty());\n newViewCache = this.applyServerOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.MERGE) {\n var merge = operation;\n if (merge.source.fromUser) {\n newViewCache = this.applyUserMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(merge.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered\n filterServerNode =\n merge.source.tagged || oldViewCache.getServerCache().isFiltered();\n newViewCache = this.applyServerMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.ACK_USER_WRITE) {\n var ackUserWrite = operation;\n if (!ackUserWrite.revert) {\n newViewCache = this.ackUserWrite_(oldViewCache, ackUserWrite.path, ackUserWrite.affectedTree, writesCache, completeCache, accumulator);\n }\n else {\n newViewCache = this.revertUserWrite_(oldViewCache, ackUserWrite.path, writesCache, completeCache, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.LISTEN_COMPLETE) {\n newViewCache = this.listenComplete_(oldViewCache, operation.path, writesCache, accumulator);\n }\n else {\n throw util_1.assertionError('Unknown operation type: ' + operation.type);\n }\n var changes = accumulator.getChanges();\n ViewProcessor.maybeAddValueEvent_(oldViewCache, newViewCache, changes);\n return new ProcessorResult(newViewCache, changes);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!ViewCache} newViewCache\n * @param {!Array.} accumulator\n * @private\n */\n ViewProcessor.maybeAddValueEvent_ = function (oldViewCache, newViewCache, accumulator) {\n var eventSnap = newViewCache.getEventCache();\n if (eventSnap.isFullyInitialized()) {\n var isLeafOrEmpty = eventSnap.getNode().isLeafNode() || eventSnap.getNode().isEmpty();\n var oldCompleteSnap = oldViewCache.getCompleteEventSnap();\n if (accumulator.length > 0 ||\n !oldViewCache.getEventCache().isFullyInitialized() ||\n (isLeafOrEmpty &&\n !eventSnap\n .getNode()\n .equals(/** @type {!Node} */ (oldCompleteSnap))) ||\n !eventSnap\n .getNode()\n .getPriority()\n .equals(oldCompleteSnap.getPriority())) {\n accumulator.push(Change_1.Change.valueChange(\n /** @type {!Node} */ newViewCache.getCompleteEventSnap()));\n }\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} changePath\n * @param {!WriteTreeRef} writesCache\n * @param {!CompleteChildSource} source\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.generateEventCacheAfterServerEvent_ = function (viewCache, changePath, writesCache, source, accumulator) {\n var oldEventSnap = viewCache.getEventCache();\n if (writesCache.shadowingWrite(changePath) != null) {\n // we have a shadowing write, ignore changes\n return viewCache;\n }\n else {\n var newEventCache = void 0, serverNode = void 0;\n if (changePath.isEmpty()) {\n // TODO: figure out how this plays with \"sliding ack windows\"\n util_1.assert(viewCache.getServerCache().isFullyInitialized(), 'If change path is empty, we must have complete server data');\n if (viewCache.getServerCache().isFiltered()) {\n // We need to special case this, because we need to only apply writes to complete children, or\n // we might end up raising events for incomplete children. If the server data is filtered deep\n // writes cannot be guaranteed to be complete\n var serverCache = viewCache.getCompleteServerSnap();\n var completeChildren = serverCache instanceof ChildrenNode_1.ChildrenNode\n ? serverCache\n : ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var completeEventChildren = writesCache.calcCompleteEventChildren(completeChildren);\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeEventChildren, accumulator);\n }\n else {\n var completeNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeNode, accumulator);\n }\n }\n else {\n var childKey = changePath.getFront();\n if (childKey == '.priority') {\n util_1.assert(changePath.getLength() == 1, \"Can't have a priority with additional path components\");\n var oldEventNode = oldEventSnap.getNode();\n serverNode = viewCache.getServerCache().getNode();\n // we might have overwrites for this priority\n var updatedPriority = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventNode, serverNode);\n if (updatedPriority != null) {\n newEventCache = this.filter_.updatePriority(oldEventNode, updatedPriority);\n }\n else {\n // priority didn't change, keep old node\n newEventCache = oldEventSnap.getNode();\n }\n }\n else {\n var childChangePath = changePath.popFront();\n // update child\n var newEventChild = void 0;\n if (oldEventSnap.isCompleteForChild(childKey)) {\n serverNode = viewCache.getServerCache().getNode();\n var eventChildUpdate = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventSnap.getNode(), serverNode);\n if (eventChildUpdate != null) {\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey)\n .updateChild(childChangePath, eventChildUpdate);\n }\n else {\n // Nothing changed, just keep the old child\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey);\n }\n }\n else {\n newEventChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n }\n if (newEventChild != null) {\n newEventCache = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newEventChild, childChangePath, source, accumulator);\n }\n else {\n // no complete child available or no change\n newEventCache = oldEventSnap.getNode();\n }\n }\n }\n return viewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized() || changePath.isEmpty(), this.filter_.filtersNodes());\n }\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, filterServerNode, accumulator) {\n var oldServerSnap = oldViewCache.getServerCache();\n var newServerCache;\n var serverFilter = filterServerNode\n ? this.filter_\n : this.filter_.getIndexedFilter();\n if (changePath.isEmpty()) {\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), changedSnap, null);\n }\n else if (serverFilter.filtersNodes() && !oldServerSnap.isFiltered()) {\n // we want to filter the server node, but we didn't filter the server node yet, so simulate a full update\n var newServerNode = oldServerSnap\n .getNode()\n .updateChild(changePath, changedSnap);\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), newServerNode, null);\n }\n else {\n var childKey = changePath.getFront();\n if (!oldServerSnap.isCompleteForPath(changePath) &&\n changePath.getLength() > 1) {\n // We don't update incomplete nodes with updates intended for other listeners\n return oldViewCache;\n }\n var childChangePath = changePath.popFront();\n var childNode = oldServerSnap.getNode().getImmediateChild(childKey);\n var newChildNode = childNode.updateChild(childChangePath, changedSnap);\n if (childKey == '.priority') {\n newServerCache = serverFilter.updatePriority(oldServerSnap.getNode(), newChildNode);\n }\n else {\n newServerCache = serverFilter.updateChild(oldServerSnap.getNode(), childKey, newChildNode, childChangePath, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, null);\n }\n }\n var newViewCache = oldViewCache.updateServerSnap(newServerCache, oldServerSnap.isFullyInitialized() || changePath.isEmpty(), serverFilter.filtersNodes());\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, newViewCache, completeCache);\n return this.generateEventCacheAfterServerEvent_(newViewCache, changePath, writesCache, source, accumulator);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, accumulator) {\n var oldEventSnap = oldViewCache.getEventCache();\n var newViewCache, newEventCache;\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, oldViewCache, completeCache);\n if (changePath.isEmpty()) {\n newEventCache = this.filter_.updateFullNode(oldViewCache.getEventCache().getNode(), changedSnap, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, true, this.filter_.filtersNodes());\n }\n else {\n var childKey = changePath.getFront();\n if (childKey === '.priority') {\n newEventCache = this.filter_.updatePriority(oldViewCache.getEventCache().getNode(), changedSnap);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized(), oldEventSnap.isFiltered());\n }\n else {\n var childChangePath = changePath.popFront();\n var oldChild = oldEventSnap.getNode().getImmediateChild(childKey);\n var newChild = void 0;\n if (childChangePath.isEmpty()) {\n // Child overwrite, we can replace the child\n newChild = changedSnap;\n }\n else {\n var childNode = source.getCompleteChild(childKey);\n if (childNode != null) {\n if (childChangePath.getBack() === '.priority' &&\n childNode.getChild(childChangePath.parent()).isEmpty()) {\n // This is a priority update on an empty node. If this node exists on the server, the\n // server will send down the priority in the update, so ignore for now\n newChild = childNode;\n }\n else {\n newChild = childNode.updateChild(childChangePath, changedSnap);\n }\n }\n else {\n // There is no complete child node available\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n }\n if (!oldChild.equals(newChild)) {\n var newEventSnap = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newChild, childChangePath, source, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventSnap, oldEventSnap.isFullyInitialized(), this.filter_.filtersNodes());\n }\n else {\n newViewCache = oldViewCache;\n }\n }\n }\n return newViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {string} childKey\n * @return {boolean}\n * @private\n */\n ViewProcessor.cacheHasChild_ = function (viewCache, childKey) {\n return viewCache.getEventCache().isCompleteForChild(childKey);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, accumulator) {\n var _this = this;\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (!ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!Node} node\n * @param {ImmutableTree.} merge\n * @return {!Node}\n * @private\n */\n ViewProcessor.prototype.applyMerge_ = function (node, merge) {\n merge.foreach(function (relativePath, childNode) {\n node = node.updateChild(relativePath, childNode);\n });\n return node;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, filterServerNode, accumulator) {\n var _this = this;\n // If we don't have a cache yet, this merge was intended for a previously listen in the same location. Ignore it and\n // wait for the complete data update coming soon.\n if (viewCache\n .getServerCache()\n .getNode()\n .isEmpty() &&\n !viewCache.getServerCache().isFullyInitialized()) {\n return viewCache;\n }\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n var viewMergeTree;\n if (path.isEmpty()) {\n viewMergeTree = changedChildren;\n }\n else {\n viewMergeTree = ImmutableTree_1.ImmutableTree.Empty.setTree(path, changedChildren);\n }\n var serverNode = viewCache.getServerCache().getNode();\n viewMergeTree.children.inorderTraversal(function (childKey, childTree) {\n if (serverNode.hasChild(childKey)) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n viewMergeTree.children.inorderTraversal(function (childKey, childMergeTree) {\n var isUnknownDeepMerge = !viewCache.getServerCache().isCompleteForChild(childKey) &&\n childMergeTree.value == null;\n if (!serverNode.hasChild(childKey) && !isUnknownDeepMerge) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childMergeTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} ackPath\n * @param {!ImmutableTree} affectedTree\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.ackUserWrite_ = function (viewCache, ackPath, affectedTree, writesCache, completeCache, accumulator) {\n if (writesCache.shadowingWrite(ackPath) != null) {\n return viewCache;\n }\n // Only filter server node if it is currently filtered\n var filterServerNode = viewCache.getServerCache().isFiltered();\n // Essentially we'll just get our existing server cache for the affected paths and re-apply it as a server update\n // now that it won't be shadowed.\n var serverCache = viewCache.getServerCache();\n if (affectedTree.value != null) {\n // This is an overwrite.\n if ((ackPath.isEmpty() && serverCache.isFullyInitialized()) ||\n serverCache.isCompleteForPath(ackPath)) {\n return this.applyServerOverwrite_(viewCache, ackPath, serverCache.getNode().getChild(ackPath), writesCache, completeCache, filterServerNode, accumulator);\n }\n else if (ackPath.isEmpty()) {\n // This is a goofy edge case where we are acking data at this location but don't have full data. We\n // should just re-apply whatever we have in our cache as a merge.\n var changedChildren_1 = ImmutableTree_1.ImmutableTree.Empty;\n serverCache.getNode().forEachChild(KeyIndex_1.KEY_INDEX, function (name, node) {\n changedChildren_1 = changedChildren_1.set(new Path_1.Path(name), node);\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_1, writesCache, completeCache, filterServerNode, accumulator);\n }\n else {\n return viewCache;\n }\n }\n else {\n // This is a merge.\n var changedChildren_2 = ImmutableTree_1.ImmutableTree.Empty;\n affectedTree.foreach(function (mergePath, value) {\n var serverCachePath = ackPath.child(mergePath);\n if (serverCache.isCompleteForPath(serverCachePath)) {\n changedChildren_2 = changedChildren_2.set(mergePath, serverCache.getNode().getChild(serverCachePath));\n }\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_2, writesCache, completeCache, filterServerNode, accumulator);\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.listenComplete_ = function (viewCache, path, writesCache, accumulator) {\n var oldServerNode = viewCache.getServerCache();\n var newViewCache = viewCache.updateServerSnap(oldServerNode.getNode(), oldServerNode.isFullyInitialized() || path.isEmpty(), oldServerNode.isFiltered());\n return this.generateEventCacheAfterServerEvent_(newViewCache, path, writesCache, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, accumulator);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.revertUserWrite_ = function (viewCache, path, writesCache, completeServerCache, accumulator) {\n var complete;\n if (writesCache.shadowingWrite(path) != null) {\n return viewCache;\n }\n else {\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, viewCache, completeServerCache);\n var oldEventCache = viewCache.getEventCache().getNode();\n var newEventCache = void 0;\n if (path.isEmpty() || path.getFront() === '.priority') {\n var newNode = void 0;\n if (viewCache.getServerCache().isFullyInitialized()) {\n newNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n }\n else {\n var serverChildren = viewCache.getServerCache().getNode();\n util_1.assert(serverChildren instanceof ChildrenNode_1.ChildrenNode, 'serverChildren would be complete if leaf node');\n newNode = writesCache.calcCompleteEventChildren(serverChildren);\n }\n newNode = newNode;\n newEventCache = this.filter_.updateFullNode(oldEventCache, newNode, accumulator);\n }\n else {\n var childKey = path.getFront();\n var newChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n if (newChild == null &&\n viewCache.getServerCache().isCompleteForChild(childKey)) {\n newChild = oldEventCache.getImmediateChild(childKey);\n }\n if (newChild != null) {\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, newChild, path.popFront(), source, accumulator);\n }\n else if (viewCache\n .getEventCache()\n .getNode()\n .hasChild(childKey)) {\n // No complete child available, delete the existing one, if any\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE, path.popFront(), source, accumulator);\n }\n else {\n newEventCache = oldEventCache;\n }\n if (newEventCache.isEmpty() &&\n viewCache.getServerCache().isFullyInitialized()) {\n // We might have reverted all child writes. Maybe the old event was a leaf node\n complete = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n if (complete.isLeafNode()) {\n newEventCache = this.filter_.updateFullNode(newEventCache, complete, accumulator);\n }\n }\n }\n complete =\n viewCache.getServerCache().isFullyInitialized() ||\n writesCache.shadowingWrite(Path_1.Path.Empty) != null;\n return viewCache.updateEventSnap(newEventCache, complete, this.filter_.filtersNodes());\n }\n };\n return ViewProcessor;\n}());\nexports.ViewProcessor = ViewProcessor;\n\n//# sourceMappingURL=ViewProcessor.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/ViewProcessor.js\n// module id = 91\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Change_1 = require(\"./Change\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * @constructor\n */\nvar ChildChangeAccumulator = /** @class */ (function () {\n function ChildChangeAccumulator() {\n this.changeMap_ = {};\n }\n /**\n * @param {!Change} change\n */\n ChildChangeAccumulator.prototype.trackChildChange = function (change) {\n var type = change.type;\n var childKey /** @type {!string} */ = change.childName;\n util_2.assert(type == Change_1.Change.CHILD_ADDED ||\n type == Change_1.Change.CHILD_CHANGED ||\n type == Change_1.Change.CHILD_REMOVED, 'Only child changes supported for tracking');\n util_2.assert(childKey !== '.priority', 'Only non-priority child changes can be tracked.');\n var oldChange = util_1.safeGet(this.changeMap_, childKey);\n if (oldChange) {\n var oldType = oldChange.type;\n if (type == Change_1.Change.CHILD_ADDED && oldType == Change_1.Change.CHILD_REMOVED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n delete this.changeMap_[childKey];\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childRemovedChange(childKey, oldChange.oldSnap);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n this.changeMap_[childKey] = Change_1.Change.childAddedChange(childKey, change.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.oldSnap);\n }\n else {\n throw util_2.assertionError('Illegal combination of changes: ' +\n change +\n ' occurred after ' +\n oldChange);\n }\n }\n else {\n this.changeMap_[childKey] = change;\n }\n };\n /**\n * @return {!Array.}\n */\n ChildChangeAccumulator.prototype.getChanges = function () {\n return util_1.getValues(this.changeMap_);\n };\n return ChildChangeAccumulator;\n}());\nexports.ChildChangeAccumulator = ChildChangeAccumulator;\n\n//# sourceMappingURL=ChildChangeAccumulator.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/ChildChangeAccumulator.js\n// module id = 92\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = require(\"./CacheNode\");\n/**\n * An implementation of CompleteChildSource that never returns any additional children\n *\n * @private\n * @constructor\n * @implements CompleteChildSource\n */\nvar NoCompleteChildSource_ = /** @class */ (function () {\n function NoCompleteChildSource_() {\n }\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getCompleteChild = function (childKey) {\n return null;\n };\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getChildAfterChild = function (index, child, reverse) {\n return null;\n };\n return NoCompleteChildSource_;\n}());\nexports.NoCompleteChildSource_ = NoCompleteChildSource_;\n/**\n * Singleton instance.\n * @const\n * @type {!CompleteChildSource}\n */\nexports.NO_COMPLETE_CHILD_SOURCE = new NoCompleteChildSource_();\n/**\n * An implementation of CompleteChildSource that uses a WriteTree in addition to any other server data or\n * old event caches available to calculate complete children.\n *\n *\n * @implements CompleteChildSource\n */\nvar WriteTreeCompleteChildSource = /** @class */ (function () {\n /**\n * @param {!WriteTreeRef} writes_\n * @param {!ViewCache} viewCache_\n * @param {?Node} optCompleteServerCache_\n */\n function WriteTreeCompleteChildSource(writes_, viewCache_, optCompleteServerCache_) {\n if (optCompleteServerCache_ === void 0) { optCompleteServerCache_ = null; }\n this.writes_ = writes_;\n this.viewCache_ = viewCache_;\n this.optCompleteServerCache_ = optCompleteServerCache_;\n }\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getCompleteChild = function (childKey) {\n var node = this.viewCache_.getEventCache();\n if (node.isCompleteForChild(childKey)) {\n return node.getNode().getImmediateChild(childKey);\n }\n else {\n var serverNode = this.optCompleteServerCache_ != null\n ? new CacheNode_1.CacheNode(this.optCompleteServerCache_, true, false)\n : this.viewCache_.getServerCache();\n return this.writes_.calcCompleteChild(childKey, serverNode);\n }\n };\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getChildAfterChild = function (index, child, reverse) {\n var completeServerData = this.optCompleteServerCache_ != null\n ? this.optCompleteServerCache_\n : this.viewCache_.getCompleteServerSnap();\n var nodes = this.writes_.calcIndexedSlice(completeServerData, child, 1, reverse, index);\n if (nodes.length === 0) {\n return null;\n }\n else {\n return nodes[0];\n }\n };\n return WriteTreeCompleteChildSource;\n}());\nexports.WriteTreeCompleteChildSource = WriteTreeCompleteChildSource;\n\n//# sourceMappingURL=CompleteChildSource.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/CompleteChildSource.js\n// module id = 93\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = require(\"../snap/Node\");\nvar Change_1 = require(\"./Change\");\nvar util_1 = require(\"@firebase/util\");\n/**\n * An EventGenerator is used to convert \"raw\" changes (Change) as computed by the\n * CacheDiffer into actual events (Event) that can be raised. See generateEventsForChanges()\n * for details.\n *\n * @constructor\n */\nvar EventGenerator = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n */\n function EventGenerator(query_) {\n this.query_ = query_;\n /**\n * @private\n * @type {!Index}\n */\n this.index_ = this.query_.getQueryParams().getIndex();\n }\n /**\n * Given a set of raw changes (no moved events and prevName not specified yet), and a set of\n * EventRegistrations that should be notified of these changes, generate the actual events to be raised.\n *\n * Notes:\n * - child_moved events will be synthesized at this time for any child_changed events that affect\n * our index.\n * - prevName will be calculated based on the index ordering.\n *\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {!Array.} eventRegistrations\n * @return {!Array.}\n */\n EventGenerator.prototype.generateEventsForChanges = function (changes, eventCache, eventRegistrations) {\n var _this = this;\n var events = [];\n var moves = [];\n changes.forEach(function (change) {\n if (change.type === Change_1.Change.CHILD_CHANGED &&\n _this.index_.indexedValueChanged(change.oldSnap, change.snapshotNode)) {\n moves.push(Change_1.Change.childMovedChange(change.childName, change.snapshotNode));\n }\n });\n this.generateEventsForType_(events, Change_1.Change.CHILD_REMOVED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_ADDED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_MOVED, moves, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_CHANGED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.VALUE, changes, eventRegistrations, eventCache);\n return events;\n };\n /**\n * Given changes of a single change type, generate the corresponding events.\n *\n * @param {!Array.} events\n * @param {!string} eventType\n * @param {!Array.} changes\n * @param {!Array.} registrations\n * @param {!Node} eventCache\n * @private\n */\n EventGenerator.prototype.generateEventsForType_ = function (events, eventType, changes, registrations, eventCache) {\n var _this = this;\n var filteredChanges = changes.filter(function (change) { return change.type === eventType; });\n filteredChanges.sort(this.compareChanges_.bind(this));\n filteredChanges.forEach(function (change) {\n var materializedChange = _this.materializeSingleChange_(change, eventCache);\n registrations.forEach(function (registration) {\n if (registration.respondsTo(change.type)) {\n events.push(registration.createEvent(materializedChange, _this.query_));\n }\n });\n });\n };\n /**\n * @param {!Change} change\n * @param {!Node} eventCache\n * @return {!Change}\n * @private\n */\n EventGenerator.prototype.materializeSingleChange_ = function (change, eventCache) {\n if (change.type === 'value' || change.type === 'child_removed') {\n return change;\n }\n else {\n change.prevName = eventCache.getPredecessorChildName(\n /** @type {!string} */\n change.childName, change.snapshotNode, this.index_);\n return change;\n }\n };\n /**\n * @param {!Change} a\n * @param {!Change} b\n * @return {number}\n * @private\n */\n EventGenerator.prototype.compareChanges_ = function (a, b) {\n if (a.childName == null || b.childName == null) {\n throw util_1.assertionError('Should only compare child_ events.');\n }\n var aWrapped = new Node_1.NamedNode(a.childName, a.snapshotNode);\n var bWrapped = new Node_1.NamedNode(b.childName, b.snapshotNode);\n return this.index_.compare(aWrapped, bWrapped);\n };\n return EventGenerator;\n}());\nexports.EventGenerator = EventGenerator;\n\n//# sourceMappingURL=EventGenerator.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/EventGenerator.js\n// module id = 94\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar Path_1 = require(\"./util/Path\");\nvar CompoundWrite_1 = require(\"./CompoundWrite\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\n/**\n * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them\n * with underlying server data (to create \"event cache\" data). Pending writes are added with addOverwrite()\n * and addMerge(), and removed with removeWrite().\n *\n * @constructor\n */\nvar WriteTree = /** @class */ (function () {\n function WriteTree() {\n /**\n * A tree tracking the result of applying all visible writes. This does not include transactions with\n * applyLocally=false or writes that are completely shadowed by other writes.\n *\n * @type {!CompoundWrite}\n * @private\n */\n this.visibleWrites_ = CompoundWrite_1.CompoundWrite.Empty;\n /**\n * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary\n * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also\n * used by transactions).\n *\n * @type {!Array.}\n * @private\n */\n this.allWrites_ = [];\n this.lastWriteId_ = -1;\n }\n /**\n * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.\n *\n * @param {!Path} path\n * @return {!WriteTreeRef}\n */\n WriteTree.prototype.childWrites = function (path) {\n return new WriteTreeRef(path, this);\n };\n /**\n * Record a new overwrite from user code.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} writeId\n * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches\n */\n WriteTree.prototype.addOverwrite = function (path, snap, writeId, visible) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older write on top of newer ones');\n if (visible === undefined) {\n visible = true;\n }\n this.allWrites_.push({\n path: path,\n snap: snap,\n writeId: writeId,\n visible: visible\n });\n if (visible) {\n this.visibleWrites_ = this.visibleWrites_.addWrite(path, snap);\n }\n this.lastWriteId_ = writeId;\n };\n /**\n * Record a new merge from user code.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n */\n WriteTree.prototype.addMerge = function (path, changedChildren, writeId) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older merge on top of newer ones');\n this.allWrites_.push({\n path: path,\n children: changedChildren,\n writeId: writeId,\n visible: true\n });\n this.visibleWrites_ = this.visibleWrites_.addWrites(path, changedChildren);\n this.lastWriteId_ = writeId;\n };\n /**\n * @param {!number} writeId\n * @return {?WriteRecord}\n */\n WriteTree.prototype.getWrite = function (writeId) {\n for (var i = 0; i < this.allWrites_.length; i++) {\n var record = this.allWrites_[i];\n if (record.writeId === writeId) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates\n * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.\n *\n * @param {!number} writeId\n * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise\n * events as a result).\n */\n WriteTree.prototype.removeWrite = function (writeId) {\n // Note: disabling this check. It could be a transaction that preempted another transaction, and thus was applied\n // out of order.\n //const validClear = revert || this.allWrites_.length === 0 || writeId <= this.allWrites_[0].writeId;\n //assert(validClear, \"Either we don't have this write, or it's the first one in the queue\");\n var _this = this;\n var idx = this.allWrites_.findIndex(function (s) {\n return s.writeId === writeId;\n });\n util_2.assert(idx >= 0, 'removeWrite called with nonexistent writeId.');\n var writeToRemove = this.allWrites_[idx];\n this.allWrites_.splice(idx, 1);\n var removedWriteWasVisible = writeToRemove.visible;\n var removedWriteOverlapsWithOtherWrites = false;\n var i = this.allWrites_.length - 1;\n while (removedWriteWasVisible && i >= 0) {\n var currentWrite = this.allWrites_[i];\n if (currentWrite.visible) {\n if (i >= idx &&\n this.recordContainsPath_(currentWrite, writeToRemove.path)) {\n // The removed write was completely shadowed by a subsequent write.\n removedWriteWasVisible = false;\n }\n else if (writeToRemove.path.contains(currentWrite.path)) {\n // Either we're covering some writes or they're covering part of us (depending on which came first).\n removedWriteOverlapsWithOtherWrites = true;\n }\n }\n i--;\n }\n if (!removedWriteWasVisible) {\n return false;\n }\n else if (removedWriteOverlapsWithOtherWrites) {\n // There's some shadowing going on. Just rebuild the visible writes from scratch.\n this.resetTree_();\n return true;\n }\n else {\n // There's no shadowing. We can safely just remove the write(s) from visibleWrites.\n if (writeToRemove.snap) {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(writeToRemove.path);\n }\n else {\n var children = writeToRemove.children;\n util_1.forEach(children, function (childName) {\n _this.visibleWrites_ = _this.visibleWrites_.removeWrite(writeToRemove.path.child(childName));\n });\n }\n return true;\n }\n };\n /**\n * Return a complete snapshot for the given path if there's visible write data at that path, else null.\n * No server data is considered.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.getCompleteWriteData = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden\n * writes), attempt to calculate a complete snapshot for the given path\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude An optional set to be excluded\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteEventCache = function (treePath, completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n if (!writeIdsToExclude && !includeHiddenWrites) {\n var shadowingNode = this.visibleWrites_.getCompleteNode(treePath);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n var subMerge = this.visibleWrites_.childCompoundWrite(treePath);\n if (subMerge.isEmpty()) {\n return completeServerCache;\n }\n else if (completeServerCache == null &&\n !subMerge.hasCompleteWrite(Path_1.Path.Empty)) {\n // We wouldn't have a complete snapshot, since there's no underlying data and no complete shadow\n return null;\n }\n else {\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return subMerge.apply(layeredCache);\n }\n }\n }\n else {\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n if (!includeHiddenWrites && merge.isEmpty()) {\n return completeServerCache;\n }\n else {\n // If the server cache is null, and we don't have a complete cache, we need to return null\n if (!includeHiddenWrites &&\n completeServerCache == null &&\n !merge.hasCompleteWrite(Path_1.Path.Empty)) {\n return null;\n }\n else {\n var filter = function (write) {\n return ((write.visible || includeHiddenWrites) &&\n (!writeIdsToExclude ||\n !~writeIdsToExclude.indexOf(write.writeId)) &&\n (write.path.contains(treePath) || treePath.contains(write.path)));\n };\n var mergeAtPath = WriteTree.layerTree_(this.allWrites_, filter, treePath);\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return mergeAtPath.apply(layeredCache);\n }\n }\n }\n };\n /**\n * With optional, underlying server data, attempt to return a children node of children that we have complete data for.\n * Used when creating new views, to pre-fill their complete event children snapshot.\n *\n * @param {!Path} treePath\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTree.prototype.calcCompleteEventChildren = function (treePath, completeServerChildren) {\n var completeChildren = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var topLevelSet = this.visibleWrites_.getCompleteNode(treePath);\n if (topLevelSet) {\n if (!topLevelSet.isLeafNode()) {\n // we're shadowing everything. Return the children.\n topLevelSet.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childSnap) {\n completeChildren = completeChildren.updateImmediateChild(childName, childSnap);\n });\n }\n return completeChildren;\n }\n else if (completeServerChildren) {\n // Layer any children we have on top of this\n // We know we don't have a top-level set, so just enumerate existing children\n var merge_1 = this.visibleWrites_.childCompoundWrite(treePath);\n completeServerChildren.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var node = merge_1\n .childCompoundWrite(new Path_1.Path(childName))\n .apply(childNode);\n completeChildren = completeChildren.updateImmediateChild(childName, node);\n });\n // Add any complete children we have from the set\n merge_1.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n else {\n // We don't have anything to layer on top of. Layer on any children we have\n // Note that we can return an empty snap if we have a defined delete\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n merge.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n };\n /**\n * Given that the underlying server data has updated, determine what, if anything, needs to be\n * applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events\n *\n * Either existingEventSnap or existingServerSnap must exist\n *\n * @param {!Path} treePath\n * @param {!Path} childPath\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcEventCacheAfterServerOverwrite = function (treePath, childPath, existingEventSnap, existingServerSnap) {\n util_2.assert(existingEventSnap || existingServerSnap, 'Either existingEventSnap or existingServerSnap must exist');\n var path = treePath.child(childPath);\n if (this.visibleWrites_.hasCompleteWrite(path)) {\n // At this point we can probably guarantee that we're in case 2, meaning no events\n // May need to check visibility while doing the findRootMostValueAndPath call\n return null;\n }\n else {\n // No complete shadowing. We're either partially shadowing or not shadowing at all.\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n if (childMerge.isEmpty()) {\n // We're not shadowing at all. Case 1\n return existingServerSnap.getChild(childPath);\n }\n else {\n // This could be more efficient if the serverNode + updates doesn't change the eventSnap\n // However this is tricky to find out, since user updates don't necessary change the server\n // snap, e.g. priority updates on empty nodes, or deep deletes. Another special case is if the server\n // adds nodes, but doesn't change any existing writes. It is therefore not enough to\n // only check if the updates change the serverNode.\n // Maybe check if the merge tree contains these special cases and only do a full overwrite in that case?\n return childMerge.apply(existingServerSnap.getChild(childPath));\n }\n }\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!Path} treePath\n * @param {!string} childKey\n * @param {!CacheNode} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteChild = function (treePath, childKey, existingServerSnap) {\n var path = treePath.child(childKey);\n var shadowingNode = this.visibleWrites_.getCompleteNode(path);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n if (existingServerSnap.isCompleteForChild(childKey)) {\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n return childMerge.apply(existingServerSnap.getNode().getImmediateChild(childKey));\n }\n else {\n return null;\n }\n }\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.shadowingWrite = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window.\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTree.prototype.calcIndexedSlice = function (treePath, completeServerData, startPost, count, reverse, index) {\n var toIterate;\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n var shadowingNode = merge.getCompleteNode(Path_1.Path.Empty);\n if (shadowingNode != null) {\n toIterate = shadowingNode;\n }\n else if (completeServerData != null) {\n toIterate = merge.apply(completeServerData);\n }\n else {\n // no children to iterate on\n return [];\n }\n toIterate = toIterate.withIndex(index);\n if (!toIterate.isEmpty() && !toIterate.isLeafNode()) {\n var nodes = [];\n var cmp = index.getCompare();\n var iter = reverse\n ? toIterate.getReverseIteratorFrom(startPost, index)\n : toIterate.getIteratorFrom(startPost, index);\n var next = iter.getNext();\n while (next && nodes.length < count) {\n if (cmp(next, startPost) !== 0) {\n nodes.push(next);\n }\n next = iter.getNext();\n }\n return nodes;\n }\n else {\n return [];\n }\n };\n /**\n * @param {!WriteRecord} writeRecord\n * @param {!Path} path\n * @return {boolean}\n * @private\n */\n WriteTree.prototype.recordContainsPath_ = function (writeRecord, path) {\n if (writeRecord.snap) {\n return writeRecord.path.contains(path);\n }\n else {\n // findKey can return undefined, so use !! to coerce to boolean\n return !!util_1.findKey(writeRecord.children, function (childSnap, childName) {\n return writeRecord.path.child(childName).contains(path);\n });\n }\n };\n /**\n * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots\n * @private\n */\n WriteTree.prototype.resetTree_ = function () {\n this.visibleWrites_ = WriteTree.layerTree_(this.allWrites_, WriteTree.DefaultFilter_, Path_1.Path.Empty);\n if (this.allWrites_.length > 0) {\n this.lastWriteId_ = this.allWrites_[this.allWrites_.length - 1].writeId;\n }\n else {\n this.lastWriteId_ = -1;\n }\n };\n /**\n * The default filter used when constructing the tree. Keep everything that's visible.\n *\n * @param {!WriteRecord} write\n * @return {boolean}\n * @private\n */\n WriteTree.DefaultFilter_ = function (write) {\n return write.visible;\n };\n /**\n * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of\n * event data at that path.\n *\n * @param {!Array.} writes\n * @param {!function(!WriteRecord):boolean} filter\n * @param {!Path} treeRoot\n * @return {!CompoundWrite}\n * @private\n */\n WriteTree.layerTree_ = function (writes, filter, treeRoot) {\n var compoundWrite = CompoundWrite_1.CompoundWrite.Empty;\n for (var i = 0; i < writes.length; ++i) {\n var write = writes[i];\n // Theory, a later set will either:\n // a) abort a relevant transaction, so no need to worry about excluding it from calculating that transaction\n // b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction\n if (filter(write)) {\n var writePath = write.path;\n var relativePath = void 0;\n if (write.snap) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrite(relativePath, write.snap);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, write.snap.getChild(relativePath));\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else if (write.children) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrites(relativePath, write.children);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n if (relativePath.isEmpty()) {\n compoundWrite = compoundWrite.addWrites(Path_1.Path.Empty, write.children);\n }\n else {\n var child = util_1.safeGet(write.children, relativePath.getFront());\n if (child) {\n // There exists a child in this node that matches the root path\n var deepNode = child.getChild(relativePath.popFront());\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, deepNode);\n }\n }\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else {\n throw util_2.assertionError('WriteRecord should have .snap or .children');\n }\n }\n }\n return compoundWrite;\n };\n return WriteTree;\n}());\nexports.WriteTree = WriteTree;\n/**\n * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods\n * just proxy to the underlying WriteTree.\n *\n * @constructor\n */\nvar WriteTreeRef = /** @class */ (function () {\n /**\n * @param {!Path} path\n * @param {!WriteTree} writeTree\n */\n function WriteTreeRef(path, writeTree) {\n this.treePath_ = path;\n this.writeTree_ = writeTree;\n }\n /**\n * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used\n * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node\n * can lead to a more expensive calculation.\n *\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude Optional writes to exclude.\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteEventCache = function (completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n return this.writeTree_.calcCompleteEventCache(this.treePath_, completeServerCache, writeIdsToExclude, includeHiddenWrites);\n };\n /**\n * If possible, returns a children node containing all of the complete children we have data for. The returned data is a\n * mix of the given server data and write data.\n *\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTreeRef.prototype.calcCompleteEventChildren = function (completeServerChildren) {\n return this.writeTree_.calcCompleteEventChildren(this.treePath_, completeServerChildren);\n };\n /**\n * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,\n * if anything, needs to be applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events should be raised\n *\n * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert\n *\n * @param {!Path} path\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcEventCacheAfterServerOverwrite = function (path, existingEventSnap, existingServerSnap) {\n return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_, path, existingEventSnap, existingServerSnap);\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTreeRef.prototype.shadowingWrite = function (path) {\n return this.writeTree_.shadowingWrite(this.treePath_.child(path));\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window\n *\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTreeRef.prototype.calcIndexedSlice = function (completeServerData, startPost, count, reverse, index) {\n return this.writeTree_.calcIndexedSlice(this.treePath_, completeServerData, startPost, count, reverse, index);\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!string} childKey\n * @param {!CacheNode} existingServerCache\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteChild = function (childKey, existingServerCache) {\n return this.writeTree_.calcCompleteChild(this.treePath_, childKey, existingServerCache);\n };\n /**\n * Return a WriteTreeRef for a child.\n *\n * @param {string} childName\n * @return {!WriteTreeRef}\n */\n WriteTreeRef.prototype.child = function (childName) {\n return new WriteTreeRef(this.treePath_.child(childName), this.writeTree_);\n };\n return WriteTreeRef;\n}());\nexports.WriteTreeRef = WriteTreeRef;\n\n//# sourceMappingURL=WriteTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/WriteTree.js\n// module id = 95\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ImmutableTree_1 = require(\"./util/ImmutableTree\");\nvar Path_1 = require(\"./util/Path\");\nvar util_1 = require(\"@firebase/util\");\nvar Node_1 = require(\"./snap/Node\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * This class holds a collection of writes that can be applied to nodes in unison. It abstracts away the logic with\n * dealing with priority writes and multiple nested writes. At any given path there is only allowed to be one write\n * modifying that path. Any write to an existing path or shadowing an existing path will modify that existing write\n * to reflect the write added.\n *\n * @constructor\n * @param {!ImmutableTree.} writeTree\n */\nvar CompoundWrite = /** @class */ (function () {\n function CompoundWrite(writeTree_) {\n this.writeTree_ = writeTree_;\n }\n /**\n * @param {!Path} path\n * @param {!Node} node\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrite = function (path, node) {\n if (path.isEmpty()) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(node));\n }\n else {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n var rootMostPath = rootmost.path;\n var value = rootmost.value;\n var relativePath = Path_1.Path.relativePath(rootMostPath, path);\n value = value.updateChild(relativePath, node);\n return new CompoundWrite(this.writeTree_.set(rootMostPath, value));\n }\n else {\n var subtree = new ImmutableTree_1.ImmutableTree(node);\n var newWriteTree = this.writeTree_.setTree(path, subtree);\n return new CompoundWrite(newWriteTree);\n }\n }\n };\n /**\n * @param {!Path} path\n * @param {!Object.} updates\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrites = function (path, updates) {\n var newWrite = this;\n util_1.forEach(updates, function (childKey, node) {\n newWrite = newWrite.addWrite(path.child(childKey), node);\n });\n return newWrite;\n };\n /**\n * Will remove a write at the given path and deeper paths. This will not modify a write at a higher\n * location, which must be removed by calling this method with that path.\n *\n * @param {!Path} path The path at which a write and all deeper writes should be removed\n * @return {!CompoundWrite} The new CompoundWrite with the removed path\n */\n CompoundWrite.prototype.removeWrite = function (path) {\n if (path.isEmpty()) {\n return CompoundWrite.Empty;\n }\n else {\n var newWriteTree = this.writeTree_.setTree(path, ImmutableTree_1.ImmutableTree.Empty);\n return new CompoundWrite(newWriteTree);\n }\n };\n /**\n * Returns whether this CompoundWrite will fully overwrite a node at a given location and can therefore be\n * considered \"complete\".\n *\n * @param {!Path} path The path to check for\n * @return {boolean} Whether there is a complete write at that path\n */\n CompoundWrite.prototype.hasCompleteWrite = function (path) {\n return this.getCompleteNode(path) != null;\n };\n /**\n * Returns a node for a path if and only if the node is a \"complete\" overwrite at that path. This will not aggregate\n * writes from deeper paths, but will return child nodes from a more shallow path.\n *\n * @param {!Path} path The path to get a complete write\n * @return {?Node} The node if complete at that path, or null otherwise.\n */\n CompoundWrite.prototype.getCompleteNode = function (path) {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n return this.writeTree_\n .get(rootmost.path)\n .getChild(Path_1.Path.relativePath(rootmost.path, path));\n }\n else {\n return null;\n }\n };\n /**\n * Returns all children that are guaranteed to be a complete overwrite.\n *\n * @return {!Array.} A list of all complete children.\n */\n CompoundWrite.prototype.getCompleteChildren = function () {\n var children = [];\n var node = this.writeTree_.value;\n if (node != null) {\n // If it's a leaf node, it has no children; so nothing to do.\n if (!node.isLeafNode()) {\n node.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n children.push(new Node_1.NamedNode(childName, childNode));\n });\n }\n }\n else {\n this.writeTree_.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value != null) {\n children.push(new Node_1.NamedNode(childName, childTree.value));\n }\n });\n }\n return children;\n };\n /**\n * @param {!Path} path\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.childCompoundWrite = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else {\n var shadowingNode = this.getCompleteNode(path);\n if (shadowingNode != null) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(shadowingNode));\n }\n else {\n return new CompoundWrite(this.writeTree_.subtree(path));\n }\n }\n };\n /**\n * Returns true if this CompoundWrite is empty and therefore does not modify any nodes.\n * @return {boolean} Whether this CompoundWrite is empty\n */\n CompoundWrite.prototype.isEmpty = function () {\n return this.writeTree_.isEmpty();\n };\n /**\n * Applies this CompoundWrite to a node. The node is returned with all writes from this CompoundWrite applied to the\n * node\n * @param {!Node} node The node to apply this CompoundWrite to\n * @return {!Node} The node with all writes applied\n */\n CompoundWrite.prototype.apply = function (node) {\n return CompoundWrite.applySubtreeWrite_(Path_1.Path.Empty, this.writeTree_, node);\n };\n /**\n * @type {!CompoundWrite}\n */\n CompoundWrite.Empty = new CompoundWrite(new ImmutableTree_1.ImmutableTree(null));\n /**\n * @param {!Path} relativePath\n * @param {!ImmutableTree.} writeTree\n * @param {!Node} node\n * @return {!Node}\n * @private\n */\n CompoundWrite.applySubtreeWrite_ = function (relativePath, writeTree, node) {\n if (writeTree.value != null) {\n // Since there a write is always a leaf, we're done here\n return node.updateChild(relativePath, writeTree.value);\n }\n else {\n var priorityWrite_1 = null;\n writeTree.children.inorderTraversal(function (childKey, childTree) {\n if (childKey === '.priority') {\n // Apply priorities at the end so we don't update priorities for either empty nodes or forget\n // to apply priorities to empty nodes that are later filled\n util_2.assert(childTree.value !== null, 'Priority writes must always be leaf nodes');\n priorityWrite_1 = childTree.value;\n }\n else {\n node = CompoundWrite.applySubtreeWrite_(relativePath.child(childKey), childTree, node);\n }\n });\n // If there was a priority write, we only apply it if the node is not empty\n if (!node.getChild(relativePath).isEmpty() && priorityWrite_1 !== null) {\n node = node.updateChild(relativePath.child('.priority'), priorityWrite_1);\n }\n return node;\n }\n };\n return CompoundWrite;\n}());\nexports.CompoundWrite = CompoundWrite;\n\n//# sourceMappingURL=CompoundWrite.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/CompoundWrite.js\n// module id = 96\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\n/**\n * Mutable object which basically just stores a reference to the \"latest\" immutable snapshot.\n *\n * @constructor\n */\nvar SnapshotHolder = /** @class */ (function () {\n function SnapshotHolder() {\n this.rootNode_ = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n SnapshotHolder.prototype.getNode = function (path) {\n return this.rootNode_.getChild(path);\n };\n SnapshotHolder.prototype.updateSnapshot = function (path, newSnapshotNode) {\n this.rootNode_ = this.rootNode_.updateChild(path, newSnapshotNode);\n };\n return SnapshotHolder;\n}());\nexports.SnapshotHolder = SnapshotHolder;\n\n//# sourceMappingURL=SnapshotHolder.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SnapshotHolder.js\n// module id = 97\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util/util\");\n/**\n * Abstraction around FirebaseApp's token fetching capabilities.\n */\nvar AuthTokenProvider = /** @class */ (function () {\n /**\n * @param {!FirebaseApp} app_\n */\n function AuthTokenProvider(app_) {\n this.app_ = app_;\n }\n /**\n * @param {boolean} forceRefresh\n * @return {!Promise}\n */\n AuthTokenProvider.prototype.getToken = function (forceRefresh) {\n return this.app_['INTERNAL']['getToken'](forceRefresh).then(null, \n // .catch\n function (error) {\n // TODO: Need to figure out all the cases this is raised and whether\n // this makes sense.\n if (error && error.code === 'auth/token-not-initialized') {\n util_1.log('Got auth/token-not-initialized error. Treating as null token.');\n return null;\n }\n else {\n return Promise.reject(error);\n }\n });\n };\n AuthTokenProvider.prototype.addTokenChangeListener = function (listener) {\n // TODO: We might want to wrap the listener and call it with no args to\n // avoid a leaky abstraction, but that makes removing the listener harder.\n this.app_['INTERNAL']['addAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.removeTokenChangeListener = function (listener) {\n this.app_['INTERNAL']['removeAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.notifyForInvalidToken = function () {\n var errorMessage = 'Provided authentication credentials for the app named \"' +\n this.app_.name +\n '\" are invalid. This usually indicates your app was not ' +\n 'initialized correctly. ';\n if ('credential' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"credential\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else if ('serviceAccount' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"serviceAccount\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else {\n errorMessage +=\n 'Make sure the \"apiKey\" and \"databaseURL\" properties provided to ' +\n 'initializeApp() match the values provided for your app at ' +\n 'https://console.firebase.google.com/.';\n }\n util_1.warn(errorMessage);\n };\n return AuthTokenProvider;\n}());\nexports.AuthTokenProvider = AuthTokenProvider;\n\n//# sourceMappingURL=AuthTokenProvider.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/AuthTokenProvider.js\n// module id = 98\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Tracks a collection of stats.\n *\n * @constructor\n */\nvar StatsCollection = /** @class */ (function () {\n function StatsCollection() {\n this.counters_ = {};\n }\n StatsCollection.prototype.incrementCounter = function (name, amount) {\n if (amount === void 0) { amount = 1; }\n if (!util_2.contains(this.counters_, name))\n this.counters_[name] = 0;\n this.counters_[name] += amount;\n };\n StatsCollection.prototype.get = function () {\n return util_1.deepCopy(this.counters_);\n };\n return StatsCollection;\n}());\nexports.StatsCollection = StatsCollection;\n\n//# sourceMappingURL=StatsCollection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsCollection.js\n// module id = 99\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar StatsListener_1 = require(\"./StatsListener\");\n// Assuming some apps may have a short amount of time on page, and a bulk of firebase operations probably\n// happen on page load, we try to report our first set of stats pretty quickly, but we wait at least 10\n// seconds to try to ensure the Firebase connection is established / settled.\nvar FIRST_STATS_MIN_TIME = 10 * 1000;\nvar FIRST_STATS_MAX_TIME = 30 * 1000;\n// We'll continue to report stats on average every 5 minutes.\nvar REPORT_STATS_INTERVAL = 5 * 60 * 1000;\n/**\n * @constructor\n */\nvar StatsReporter = /** @class */ (function () {\n /**\n * @param collection\n * @param server_\n */\n function StatsReporter(collection, server_) {\n this.server_ = server_;\n this.statsToReport_ = {};\n this.statsListener_ = new StatsListener_1.StatsListener(collection);\n var timeout = FIRST_STATS_MIN_TIME +\n (FIRST_STATS_MAX_TIME - FIRST_STATS_MIN_TIME) * Math.random();\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(timeout));\n }\n StatsReporter.prototype.includeStat = function (stat) {\n this.statsToReport_[stat] = true;\n };\n StatsReporter.prototype.reportStats_ = function () {\n var _this = this;\n var stats = this.statsListener_.get();\n var reportedStats = {};\n var haveStatsToReport = false;\n util_1.forEach(stats, function (stat, value) {\n if (value > 0 && util_1.contains(_this.statsToReport_, stat)) {\n reportedStats[stat] = value;\n haveStatsToReport = true;\n }\n });\n if (haveStatsToReport) {\n this.server_.reportStats(reportedStats);\n }\n // queue our next run.\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(Math.random() * 2 * REPORT_STATS_INTERVAL));\n };\n return StatsReporter;\n}());\nexports.StatsReporter = StatsReporter;\n\n//# sourceMappingURL=StatsReporter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsReporter.js\n// module id = 100\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util/util\");\n/**\n * The event queue serves a few purposes:\n * 1. It ensures we maintain event order in the face of event callbacks doing operations that result in more\n * events being queued.\n * 2. raiseQueuedEvents() handles being called reentrantly nicely. That is, if in the course of raising events,\n * raiseQueuedEvents() is called again, the \"inner\" call will pick up raising events where the \"outer\" call\n * left off, ensuring that the events are still raised synchronously and in order.\n * 3. You can use raiseEventsAtPath and raiseEventsForChangedPath to ensure only relevant previously-queued\n * events are raised synchronously.\n *\n * NOTE: This can all go away if/when we move to async events.\n *\n * @constructor\n */\nvar EventQueue = /** @class */ (function () {\n function EventQueue() {\n /**\n * @private\n * @type {!Array.}\n */\n this.eventLists_ = [];\n /**\n * Tracks recursion depth of raiseQueuedEvents_, for debugging purposes.\n * @private\n * @type {!number}\n */\n this.recursionDepth_ = 0;\n }\n /**\n * @param {!Array.} eventDataList The new events to queue.\n */\n EventQueue.prototype.queueEvents = function (eventDataList) {\n // We group events by path, storing them in a single EventList, to make it easier to skip over them quickly.\n var currList = null;\n for (var i = 0; i < eventDataList.length; i++) {\n var eventData = eventDataList[i];\n var eventPath = eventData.getPath();\n if (currList !== null && !eventPath.equals(currList.getPath())) {\n this.eventLists_.push(currList);\n currList = null;\n }\n if (currList === null) {\n currList = new EventList(eventPath);\n }\n currList.add(eventData);\n }\n if (currList) {\n this.eventLists_.push(currList);\n }\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones)\n * for the specified path.\n *\n * It is assumed that the new events are all for the specified path.\n *\n * @param {!Path} path The path to raise events for.\n * @param {!Array.} eventDataList The new events to raise.\n */\n EventQueue.prototype.raiseEventsAtPath = function (path, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.equals(path);\n });\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones) for\n * locations related to the specified change path (i.e. all ancestors and descendants).\n *\n * It is assumed that the new events are all related (ancestor or descendant) to the specified path.\n *\n * @param {!Path} changedPath The path to raise events for.\n * @param {!Array.} eventDataList The events to raise\n */\n EventQueue.prototype.raiseEventsForChangedPath = function (changedPath, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.contains(changedPath) || changedPath.contains(eventPath);\n });\n };\n /**\n * @param {!function(!Path):boolean} predicate\n * @private\n */\n EventQueue.prototype.raiseQueuedEventsMatchingPredicate_ = function (predicate) {\n this.recursionDepth_++;\n var sentAll = true;\n for (var i = 0; i < this.eventLists_.length; i++) {\n var eventList = this.eventLists_[i];\n if (eventList) {\n var eventPath = eventList.getPath();\n if (predicate(eventPath)) {\n this.eventLists_[i].raise();\n this.eventLists_[i] = null;\n }\n else {\n sentAll = false;\n }\n }\n }\n if (sentAll) {\n this.eventLists_ = [];\n }\n this.recursionDepth_--;\n };\n return EventQueue;\n}());\nexports.EventQueue = EventQueue;\n/**\n * @param {!Path} path\n * @constructor\n */\nvar EventList = /** @class */ (function () {\n function EventList(path_) {\n this.path_ = path_;\n /**\n * @type {!Array.}\n * @private\n */\n this.events_ = [];\n }\n /**\n * @param {!Event} eventData\n */\n EventList.prototype.add = function (eventData) {\n this.events_.push(eventData);\n };\n /**\n * Iterates through the list and raises each event\n */\n EventList.prototype.raise = function () {\n for (var i = 0; i < this.events_.length; i++) {\n var eventData = this.events_[i];\n if (eventData !== null) {\n this.events_[i] = null;\n var eventFn = eventData.getEventRunner();\n if (util_1.logger) {\n util_1.log('event: ' + eventData.toString());\n }\n util_1.exceptionGuard(eventFn);\n }\n }\n };\n /**\n * @return {!Path}\n */\n EventList.prototype.getPath = function () {\n return this.path_;\n };\n return EventList;\n}());\nexports.EventList = EventList;\n\n//# sourceMappingURL=EventQueue.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/EventQueue.js\n// module id = 101\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EventEmitter_1 = require(\"./EventEmitter\");\nvar util_1 = require(\"@firebase/util\");\n/**\n * @extends {EventEmitter}\n */\nvar VisibilityMonitor = /** @class */ (function (_super) {\n __extends(VisibilityMonitor, _super);\n function VisibilityMonitor() {\n var _this = _super.call(this, ['visible']) || this;\n var hidden;\n var visibilityChange;\n if (typeof document !== 'undefined' &&\n typeof document.addEventListener !== 'undefined') {\n if (typeof document['hidden'] !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n visibilityChange = 'visibilitychange';\n hidden = 'hidden';\n }\n else if (typeof document['mozHidden'] !== 'undefined') {\n visibilityChange = 'mozvisibilitychange';\n hidden = 'mozHidden';\n }\n else if (typeof document['msHidden'] !== 'undefined') {\n visibilityChange = 'msvisibilitychange';\n hidden = 'msHidden';\n }\n else if (typeof document['webkitHidden'] !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange';\n hidden = 'webkitHidden';\n }\n }\n // Initially, we always assume we are visible. This ensures that in browsers\n // without page visibility support or in cases where we are never visible\n // (e.g. chrome extension), we act as if we are visible, i.e. don't delay\n // reconnects\n _this.visible_ = true;\n if (visibilityChange) {\n document.addEventListener(visibilityChange, function () {\n var visible = !document[hidden];\n if (visible !== _this.visible_) {\n _this.visible_ = visible;\n _this.trigger('visible', visible);\n }\n }, false);\n }\n return _this;\n }\n VisibilityMonitor.getInstance = function () {\n return new VisibilityMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n VisibilityMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'visible', 'Unknown event type: ' + eventType);\n return [this.visible_];\n };\n return VisibilityMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.VisibilityMonitor = VisibilityMonitor;\n\n//# sourceMappingURL=VisibilityMonitor.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/VisibilityMonitor.js\n// module id = 102\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar EventEmitter_1 = require(\"./EventEmitter\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Monitors online state (as reported by window.online/offline events).\n *\n * The expectation is that this could have many false positives (thinks we are online\n * when we're not), but no false negatives. So we can safely use it to determine when\n * we definitely cannot reach the internet.\n *\n * @extends {EventEmitter}\n */\nvar OnlineMonitor = /** @class */ (function (_super) {\n __extends(OnlineMonitor, _super);\n function OnlineMonitor() {\n var _this = _super.call(this, ['online']) || this;\n _this.online_ = true;\n // We've had repeated complaints that Cordova apps can get stuck \"offline\", e.g.\n // https://forum.ionicframework.com/t/firebase-connection-is-lost-and-never-come-back/43810\n // It would seem that the 'online' event does not always fire consistently. So we disable it\n // for Cordova.\n if (typeof window !== 'undefined' &&\n typeof window.addEventListener !== 'undefined' &&\n !util_2.isMobileCordova()) {\n window.addEventListener('online', function () {\n if (!_this.online_) {\n _this.online_ = true;\n _this.trigger('online', true);\n }\n }, false);\n window.addEventListener('offline', function () {\n if (_this.online_) {\n _this.online_ = false;\n _this.trigger('online', false);\n }\n }, false);\n }\n return _this;\n }\n OnlineMonitor.getInstance = function () {\n return new OnlineMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n OnlineMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'online', 'Unknown event type: ' + eventType);\n return [this.online_];\n };\n /**\n * @return {boolean}\n */\n OnlineMonitor.prototype.currentlyOnline = function () {\n return this.online_;\n };\n return OnlineMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.OnlineMonitor = OnlineMonitor;\n\n//# sourceMappingURL=OnlineMonitor.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/OnlineMonitor.js\n// module id = 103\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BrowserPollConnection_1 = require(\"./BrowserPollConnection\");\nvar WebSocketConnection_1 = require(\"./WebSocketConnection\");\nvar util_1 = require(\"../core/util/util\");\n/**\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\n * lifecycle.\n *\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\n * they are available.\n * @constructor\n */\nvar TransportManager = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\n */\n function TransportManager(repoInfo) {\n this.initTransports_(repoInfo);\n }\n Object.defineProperty(TransportManager, \"ALL_TRANSPORTS\", {\n /**\n * @const\n * @type {!Array.}\n */\n get: function () {\n return [BrowserPollConnection_1.BrowserPollConnection, WebSocketConnection_1.WebSocketConnection];\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {!RepoInfo} repoInfo\n * @private\n */\n TransportManager.prototype.initTransports_ = function (repoInfo) {\n var isWebSocketsAvailable = WebSocketConnection_1.WebSocketConnection && WebSocketConnection_1.WebSocketConnection['isAvailable']();\n var isSkipPollConnection = isWebSocketsAvailable && !WebSocketConnection_1.WebSocketConnection.previouslyFailed();\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable)\n util_1.warn(\"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\");\n isSkipPollConnection = true;\n }\n if (isSkipPollConnection) {\n this.transports_ = [WebSocketConnection_1.WebSocketConnection];\n }\n else {\n var transports_1 = (this.transports_ = []);\n util_1.each(TransportManager.ALL_TRANSPORTS, function (i, transport) {\n if (transport && transport['isAvailable']()) {\n transports_1.push(transport);\n }\n });\n }\n };\n /**\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\n * initial transport to use\n */\n TransportManager.prototype.initialTransport = function () {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n }\n else {\n throw new Error('No transports available');\n }\n };\n /**\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\n * transport, or null\n */\n TransportManager.prototype.upgradeTransport = function () {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n }\n else {\n return null;\n }\n };\n return TransportManager;\n}());\nexports.TransportManager = TransportManager;\n\n//# sourceMappingURL=TransportManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/TransportManager.js\n// module id = 104\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../../core/util/util\");\n/**\n * This class ensures the packets from the server arrive in order\n * This class takes data from the server and ensures it gets passed into the callbacks in order.\n * @constructor\n */\nvar PacketReceiver = /** @class */ (function () {\n /**\n * @param onMessage_\n */\n function PacketReceiver(onMessage_) {\n this.onMessage_ = onMessage_;\n this.pendingResponses = [];\n this.currentResponseNum = 0;\n this.closeAfterResponse = -1;\n this.onClose = null;\n }\n PacketReceiver.prototype.closeAfter = function (responseNum, callback) {\n this.closeAfterResponse = responseNum;\n this.onClose = callback;\n if (this.closeAfterResponse < this.currentResponseNum) {\n this.onClose();\n this.onClose = null;\n }\n };\n /**\n * Each message from the server comes with a response number, and an array of data. The responseNumber\n * allows us to ensure that we process them in the right order, since we can't be guaranteed that all\n * browsers will respond in the same order as the requests we sent\n * @param {number} requestNum\n * @param {Array} data\n */\n PacketReceiver.prototype.handleResponse = function (requestNum, data) {\n var _this = this;\n this.pendingResponses[requestNum] = data;\n var _loop_1 = function () {\n var toProcess = this_1.pendingResponses[this_1.currentResponseNum];\n delete this_1.pendingResponses[this_1.currentResponseNum];\n var _loop_2 = function (i) {\n if (toProcess[i]) {\n util_1.exceptionGuard(function () {\n _this.onMessage_(toProcess[i]);\n });\n }\n };\n for (var i = 0; i < toProcess.length; ++i) {\n _loop_2(i);\n }\n if (this_1.currentResponseNum === this_1.closeAfterResponse) {\n if (this_1.onClose) {\n this_1.onClose();\n this_1.onClose = null;\n }\n return \"break\";\n }\n this_1.currentResponseNum++;\n };\n var this_1 = this;\n while (this.pendingResponses[this.currentResponseNum]) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n };\n return PacketReceiver;\n}());\nexports.PacketReceiver = PacketReceiver;\n\n//# sourceMappingURL=PacketReceiver.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/polling/PacketReceiver.js\n// module id = 105\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util/util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"@firebase/util\");\nvar util_5 = require(\"@firebase/util\");\nvar ServerActions_1 = require(\"./ServerActions\");\n/**\n * An implementation of ServerActions that communicates with the server via REST requests.\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\n * persistent connection (using WebSockets or long-polling)\n */\nvar ReadonlyRestClient = /** @class */ (function (_super) {\n __extends(ReadonlyRestClient, _super);\n /**\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param {AuthTokenProvider} authTokenProvider_\n * @implements {ServerActions}\n */\n function ReadonlyRestClient(repoInfo_, onDataUpdate_, authTokenProvider_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n /** @private {function(...[*])} */\n _this.log_ = util_2.logWrapper('p:rest:');\n /**\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\n * that's been removed. :-/\n *\n * @private {!Object.}\n */\n _this.listens_ = {};\n return _this;\n }\n ReadonlyRestClient.prototype.reportStats = function (stats) {\n throw new Error('Method not implemented.');\n };\n /**\n * @param {!Query} query\n * @param {?number=} tag\n * @return {string}\n * @private\n */\n ReadonlyRestClient.getListenId_ = function (query, tag) {\n if (tag !== undefined) {\n return 'tag$' + tag;\n }\n else {\n util_1.assert(query.getQueryParams().isDefault(), \"should have a tag if it's not a default query.\");\n return query.path.toString();\n }\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var _this = this;\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + query.queryIdentifier());\n // Mark this listener so we can tell if it's removed.\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n var thisListen = {};\n this.listens_[listenId] = thisListen;\n var queryStringParamaters = query\n .getQueryParams()\n .toRestQueryStringParameters();\n this.restRequest_(pathString + '.json', queryStringParamaters, function (error, result) {\n var data = result;\n if (error === 404) {\n data = null;\n error = null;\n }\n if (error === null) {\n _this.onDataUpdate_(pathString, data, /*isMerge=*/ false, tag);\n }\n if (util_4.safeGet(_this.listens_, listenId) === thisListen) {\n var status_1;\n if (!error) {\n status_1 = 'ok';\n }\n else if (error == 401) {\n status_1 = 'permission_denied';\n }\n else {\n status_1 = 'rest_error:' + error;\n }\n onComplete(status_1, null);\n }\n });\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.unlisten = function (query, tag) {\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.refreshAuthToken = function (token) {\n // no-op since we just always call getToken.\n };\n /**\n * Performs a REST request to the given path, with the provided query string parameters,\n * and any auth credentials we have.\n *\n * @param {!string} pathString\n * @param {!Object.} queryStringParameters\n * @param {?function(?number, *=)} callback\n * @private\n */\n ReadonlyRestClient.prototype.restRequest_ = function (pathString, queryStringParameters, callback) {\n var _this = this;\n if (queryStringParameters === void 0) { queryStringParameters = {}; }\n queryStringParameters['format'] = 'export';\n this.authTokenProvider_\n .getToken(/*forceRefresh=*/ false)\n .then(function (authTokenData) {\n var authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n var url = (_this.repoInfo_.secure ? 'https://' : 'http://') +\n _this.repoInfo_.host +\n pathString +\n '?' +\n util_5.querystring(queryStringParameters);\n _this.log_('Sending REST request for ' + url);\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (callback && xhr.readyState === 4) {\n _this.log_('REST Response for ' + url + ' received. status:', xhr.status, 'response:', xhr.responseText);\n var res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = util_3.jsonEval(xhr.responseText);\n }\n catch (e) {\n util_2.warn('Failed to parse JSON response for ' +\n url +\n ': ' +\n xhr.responseText);\n }\n callback(null, res);\n }\n else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n util_2.warn('Got unsuccessful REST response for ' +\n url +\n ' Status: ' +\n xhr.status);\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n xhr.open('GET', url, /*asynchronous=*/ true);\n xhr.send();\n });\n };\n return ReadonlyRestClient;\n}(ServerActions_1.ServerActions));\nexports.ReadonlyRestClient = ReadonlyRestClient;\n\n//# sourceMappingURL=ReadonlyRestClient.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/ReadonlyRestClient.js\n// module id = 106\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar KeyIndex_1 = require(\"../snap/indexes/KeyIndex\");\nvar PriorityIndex_1 = require(\"../snap/indexes/PriorityIndex\");\nvar ValueIndex_1 = require(\"../snap/indexes/ValueIndex\");\nvar PathIndex_1 = require(\"../snap/indexes/PathIndex\");\nvar IndexedFilter_1 = require(\"./filter/IndexedFilter\");\nvar LimitedFilter_1 = require(\"./filter/LimitedFilter\");\nvar RangedFilter_1 = require(\"./filter/RangedFilter\");\nvar util_3 = require(\"@firebase/util\");\n/**\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\n * user-facing API level, so it is not done here.\n * @constructor\n */\nvar QueryParams = /** @class */ (function () {\n function QueryParams() {\n this.limitSet_ = false;\n this.startSet_ = false;\n this.startNameSet_ = false;\n this.endSet_ = false;\n this.endNameSet_ = false;\n this.limit_ = 0;\n this.viewFrom_ = '';\n this.indexStartValue_ = null;\n this.indexStartName_ = '';\n this.indexEndValue_ = null;\n this.indexEndName_ = '';\n this.index_ = PriorityIndex_1.PRIORITY_INDEX;\n }\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasStart = function () {\n return this.startSet_;\n };\n /**\n * @return {boolean} True if it would return from left.\n */\n QueryParams.prototype.isViewFromLeft = function () {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n }\n else {\n return (this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT);\n }\n };\n /**\n * Only valid to call if hasStart() returns true\n * @return {*}\n */\n QueryParams.prototype.getIndexStartValue = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n };\n /**\n * Only valid to call if hasStart() returns true.\n * Returns the starting key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexStartName = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n }\n else {\n return util_2.MIN_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasEnd = function () {\n return this.endSet_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * @return {*}\n */\n QueryParams.prototype.getIndexEndValue = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * Returns the end key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexEndName = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n }\n else {\n return util_2.MAX_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasLimit = function () {\n return this.limitSet_;\n };\n /**\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\n */\n QueryParams.prototype.hasAnchoredLimit = function () {\n return this.limitSet_ && this.viewFrom_ !== '';\n };\n /**\n * Only valid to call if hasLimit() returns true\n * @return {!number}\n */\n QueryParams.prototype.getLimit = function () {\n util_1.assert(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n };\n /**\n * @return {!Index}\n */\n QueryParams.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @return {!QueryParams}\n * @private\n */\n QueryParams.prototype.copy_ = function () {\n var copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limit = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToFirst = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToLast = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.startAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n }\n else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.endAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n }\n else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n };\n /**\n * @param {!Index} index\n * @return {!QueryParams}\n */\n QueryParams.prototype.orderBy = function (index) {\n var newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n };\n /**\n * @return {!Object}\n */\n QueryParams.prototype.getQueryObject = function () {\n var WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n var obj = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n var viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n }\n else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PriorityIndex_1.PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.loadsAllData = function () {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.isDefault = function () {\n return this.loadsAllData() && this.index_ == PriorityIndex_1.PRIORITY_INDEX;\n };\n /**\n * @return {!NodeFilter}\n */\n QueryParams.prototype.getNodeFilter = function () {\n if (this.loadsAllData()) {\n return new IndexedFilter_1.IndexedFilter(this.getIndex());\n }\n else if (this.hasLimit()) {\n return new LimitedFilter_1.LimitedFilter(this);\n }\n else {\n return new RangedFilter_1.RangedFilter(this);\n }\n };\n /**\n * Returns a set of REST query string parameters representing this query.\n *\n * @return {!Object.} query string parameters\n */\n QueryParams.prototype.toRestQueryStringParameters = function () {\n var REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n var qs = {};\n if (this.isDefault()) {\n return qs;\n }\n var orderBy;\n if (this.index_ === PriorityIndex_1.PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n }\n else if (this.index_ === ValueIndex_1.VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n }\n else if (this.index_ === KeyIndex_1.KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n }\n else {\n util_1.assert(this.index_ instanceof PathIndex_1.PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = util_3.stringify(orderBy);\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = util_3.stringify(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + util_3.stringify(this.indexStartName_);\n }\n }\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = util_3.stringify(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + util_3.stringify(this.indexEndName_);\n }\n }\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n }\n else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n return qs;\n };\n /**\n * Wire Protocol Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n /**\n * REST Query Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n /**\n * Default, empty query parameters\n * @type {!QueryParams}\n * @const\n */\n QueryParams.DEFAULT = new QueryParams();\n return QueryParams;\n}());\nexports.QueryParams = QueryParams;\n\n//# sourceMappingURL=QueryParams.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/QueryParams.js\n// module id = 107\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RangedFilter_1 = require(\"./RangedFilter\");\nvar ChildrenNode_1 = require(\"../../snap/ChildrenNode\");\nvar Node_1 = require(\"../../snap/Node\");\nvar util_1 = require(\"@firebase/util\");\nvar Change_1 = require(\"../Change\");\n/**\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar LimitedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function LimitedFilter(params) {\n this.rangedFilter_ = new RangedFilter_1.RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.rangedFilter_.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n }\n else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_\n .getIndexedFilter()\n .updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n }\n else {\n return this.fullLimitUpdateChild_(snap, key, newChild, source, optChangeAccumulator);\n }\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n var filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n }\n else {\n if (this.limit_ * 2 < newSnap.numChildren() &&\n newSnap.isIndexed(this.index_)) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n var iterator = void 0;\n if (this.reverse_) {\n iterator = newSnap.getReverseIteratorFrom(this.rangedFilter_.getEndPost(), this.index_);\n }\n else {\n iterator = newSnap.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_);\n }\n var count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n var next = iterator.getNext();\n var inRange = void 0;\n if (this.reverse_) {\n inRange =\n this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n }\n else {\n inRange =\n this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n }\n else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n }\n else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var startPost = void 0;\n var endPost = void 0;\n var cmp = void 0;\n var iterator = void 0;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n var indexCompare_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCompare_1(b, a); };\n }\n else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n var count = 0;\n var foundStartPost = false;\n while (iterator.hasNext()) {\n var next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n var inRange = foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n }\n else {\n filtered = filtered.updateImmediateChild(next.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n }\n }\n }\n return this.rangedFilter_\n .getIndexedFilter()\n .updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndexedFilter = function () {\n return this.rangedFilter_.getIndexedFilter();\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!Node} snap\n * @param {string} childKey\n * @param {!Node} childSnap\n * @param {!CompleteChildSource} source\n * @param {?ChildChangeAccumulator} changeAccumulator\n * @return {!Node}\n * @private\n */\n LimitedFilter.prototype.fullLimitUpdateChild_ = function (snap, childKey, childSnap, source, changeAccumulator) {\n // TODO: rename all cache stuff etc to general snap terminology\n var cmp;\n if (this.reverse_) {\n var indexCmp_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCmp_1(b, a); };\n }\n else {\n cmp = this.index_.getCompare();\n }\n var oldEventCache = snap;\n util_1.assert(oldEventCache.numChildren() == this.limit_, '');\n var newChildNamedNode = new Node_1.NamedNode(childKey, childSnap);\n var windowBoundary = this.reverse_\n ? oldEventCache.getFirstChild(this.index_)\n : oldEventCache.getLastChild(this.index_);\n var inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n var oldChildSnap = oldEventCache.getImmediateChild(childKey);\n var nextChild = source.getChildAfterChild(this.index_, windowBoundary, this.reverse_);\n while (nextChild != null &&\n (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(this.index_, nextChild, this.reverse_);\n }\n var compareNext = nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n var remainsInWindow = inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childChangedChange(childKey, childSnap, oldChildSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n }\n else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(childKey, oldChildSnap));\n }\n var newEventCache = oldEventCache.updateImmediateChild(childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var nextChildInRange = nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(nextChild.name, nextChild.node));\n }\n return newEventCache.updateImmediateChild(nextChild.name, nextChild.node);\n }\n else {\n return newEventCache;\n }\n }\n }\n else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n }\n else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(windowBoundary.name, windowBoundary.node));\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(childKey, childSnap));\n }\n return oldEventCache\n .updateImmediateChild(childKey, childSnap)\n .updateImmediateChild(windowBoundary.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n else {\n return snap;\n }\n }\n else {\n return snap;\n }\n };\n return LimitedFilter;\n}());\nexports.LimitedFilter = LimitedFilter;\n\n//# sourceMappingURL=LimitedFilter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/filter/LimitedFilter.js\n// module id = 108\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Reference_1 = require(\"../api/Reference\");\nvar DataSnapshot_1 = require(\"../api/DataSnapshot\");\nvar Path_1 = require(\"./util/Path\");\nvar Tree_1 = require(\"./util/Tree\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar util_2 = require(\"./util/util\");\nvar ServerValues_1 = require(\"./util/ServerValues\");\nvar validation_1 = require(\"./util/validation\");\nvar util_3 = require(\"@firebase/util\");\nvar nodeFromJSON_1 = require(\"./snap/nodeFromJSON\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\nvar Repo_1 = require(\"./Repo\");\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n/**\n * @enum {number}\n */\nvar TransactionStatus;\n(function (TransactionStatus) {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n TransactionStatus[TransactionStatus[\"RUN\"] = 0] = \"RUN\";\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n TransactionStatus[TransactionStatus[\"SENT\"] = 1] = \"SENT\";\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n TransactionStatus[TransactionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n TransactionStatus[TransactionStatus[\"SENT_NEEDS_ABORT\"] = 3] = \"SENT_NEEDS_ABORT\";\n // Temporary state used to mark transactions that need to be aborted.\n TransactionStatus[TransactionStatus[\"NEEDS_ABORT\"] = 4] = \"NEEDS_ABORT\";\n})(TransactionStatus = exports.TransactionStatus || (exports.TransactionStatus = {}));\n/**\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\n * @type {number}\n * @const\n * @private\n */\nRepo_1.Repo.MAX_TRANSACTION_RETRIES_ = 25;\n/**\n * Setup the transaction data structures\n * @private\n */\nRepo_1.Repo.prototype.transactions_init_ = function () {\n /**\n * Stores queues of outstanding transactions for Firebase locations.\n *\n * @type {!Tree.>}\n * @private\n */\n this.transactionQueueTree_ = new Tree_1.Tree();\n};\n/**\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\n *\n * @param {!Path} path Path at which to do transaction.\n * @param {function(*):*} transactionUpdate Update callback.\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\n */\nRepo_1.Repo.prototype.startTransaction = function (path, transactionUpdate, onComplete, applyLocally) {\n this.log_('transaction on ' + path);\n // Add a watch to make sure we get server updates.\n var valueCallback = function () { };\n var watchRef = new Reference_1.Reference(this, path);\n watchRef.on('value', valueCallback);\n var unwatcher = function () {\n watchRef.off('value', valueCallback);\n };\n // Initialize transaction.\n var transaction = {\n path: path,\n update: transactionUpdate,\n onComplete: onComplete,\n // One of TransactionStatus enums.\n status: null,\n // Used when combining transactions at different locations to figure out which one goes first.\n order: util_2.LUIDGenerator(),\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n // Function to call to clean up our .on() listener.\n unwatcher: unwatcher,\n // Stores why a transaction was aborted.\n abortReason: null,\n currentWriteId: null,\n currentInputSnapshot: null,\n currentOutputSnapshotRaw: null,\n currentOutputSnapshotResolved: null\n };\n // Run transaction initially.\n var currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n var newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n var snapshot = new DataSnapshot_1.DataSnapshot(transaction.currentInputSnapshot, new Reference_1.Reference(this, transaction.path), PriorityIndex_1.PRIORITY_INDEX);\n transaction.onComplete(null, false, snapshot);\n }\n }\n else {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newVal, transaction.path);\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n var queueNode = this.transactionQueueTree_.subTree(path);\n var nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n queueNode.setValue(nodeQueue);\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n var priorityForNode = void 0;\n if (typeof newVal === 'object' &&\n newVal !== null &&\n util_3.contains(newVal, '.priority')) {\n priorityForNode = util_3.safeGet(newVal, '.priority');\n util_1.assert(validation_1.isValidPriority(priorityForNode), 'Invalid priority returned by transaction. ' +\n 'Priority must be a valid string, finite number, server value, or null.');\n }\n else {\n var currentNode = this.serverSyncTree_.calcCompleteEventCache(path) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, priorityForNode);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, transaction.currentWriteId, transaction.applyLocally);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n this.sendReadyTransactions_();\n }\n};\n/**\n * @param {!Path} path\n * @param {Array.=} excludeSets A specific set to exclude\n * @return {Node}\n * @private\n */\nRepo_1.Repo.prototype.getLatestState_ = function (path, excludeSets) {\n return (this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n};\n/**\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\n * complete.\n *\n * Externally it's called with no arguments, but it calls itself recursively with a particular\n * transactionQueueTree node to recurse through the tree.\n *\n * @param {Tree.>=} node transactionQueueTree node to start at.\n * @private\n */\nRepo_1.Repo.prototype.sendReadyTransactions_ = function (node) {\n var _this = this;\n if (node === void 0) { node = this.transactionQueueTree_; }\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n if (node.getValue() !== null) {\n var queue = this.buildTransactionQueue_(node);\n util_1.assert(queue.length > 0, 'Sending zero length transaction queue');\n var allRun = queue.every(function (transaction) { return transaction.status === TransactionStatus.RUN; });\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n }\n else if (node.hasChildren()) {\n node.forEachChild(function (childNode) {\n _this.sendReadyTransactions_(childNode);\n });\n }\n};\n/**\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\n *\n * @param {!Path} path The location of the queue.\n * @param {!Array.} queue Queue of transactions under the specified location.\n * @private\n */\nRepo_1.Repo.prototype.sendTransactionQueue_ = function (path, queue) {\n var _this = this;\n // Mark transactions as sent and increment retry count!\n var setsToIgnore = queue.map(function (txn) {\n return txn.currentWriteId;\n });\n var latestState = this.getLatestState_(path, setsToIgnore);\n var snapToSend = latestState;\n var latestHash = latestState.hash();\n for (var i = 0; i < queue.length; i++) {\n var txn = queue[i];\n util_1.assert(txn.status === TransactionStatus.RUN, 'tryToSendTransactionQueue_: items in queue should all be run.');\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n var relativePath = Path_1.Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(relativePath /**@type {!Node} */, txn.currentOutputSnapshotRaw);\n }\n var dataToSend = snapToSend.val(true);\n var pathToSend = path;\n // Send the put.\n this.server_.put(pathToSend.toString(), dataToSend, function (status) {\n _this.log_('transaction put response', {\n path: pathToSend.toString(),\n status: status\n });\n var events = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(_this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId));\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n var node = queue[i].currentOutputSnapshotResolved;\n var ref = new Reference_1.Reference(_this, queue[i].path);\n var snapshot = new DataSnapshot_1.DataSnapshot(node, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, true, snapshot));\n }\n queue[i].unwatcher();\n }\n // Now remove the completed transactions.\n _this.pruneCompletedTransactionsBelowNode_(_this.transactionQueueTree_.subTree(path));\n // There may be pending transactions that we can now send.\n _this.sendReadyTransactions_();\n _this.eventQueue_.raiseEventsForChangedPath(path, events);\n // Finally, trigger onComplete callbacks.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT)\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n else\n queue[i].status = TransactionStatus.RUN;\n }\n }\n else {\n util_2.warn('transaction at ' + pathToSend.toString() + ' failed: ' + status);\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n _this.rerunTransactions_(path);\n }\n }, latestHash);\n};\n/**\n * Finds all transactions dependent on the data at changedPath and reruns them.\n *\n * Should be called any time cached data changes.\n *\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\n * be raised for.\n *\n * @param {!Path} changedPath The path in mergedData that changed.\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactions_ = function (changedPath) {\n var rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n var path = rootMostTransactionNode.path();\n var queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n return path;\n};\n/**\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\n *\n * @param {Array.} queue The queue of transactions to run.\n * @param {!Path} path The path the queue is for.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactionQueue_ = function (queue, path) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n var events = [];\n // Ignore all of the sets we're going to re-run.\n var txnsToRerun = queue.filter(function (q) {\n return q.status === TransactionStatus.RUN;\n });\n var setsToIgnore = txnsToRerun.map(function (q) {\n return q.currentWriteId;\n });\n for (var i = 0; i < queue.length; i++) {\n var transaction = queue[i];\n var relativePath = Path_1.Path.relativePath(path, transaction.path);\n var abortTransaction = false, abortReason = void 0;\n util_1.assert(relativePath !== null, 'rerunTransactionsUnderNode_: relativePath should not be null.');\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= Repo_1.Repo.MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else {\n // This code reruns a transaction\n var currentNode = this.getLatestState_(transaction.path, setsToIgnore);\n transaction.currentInputSnapshot = currentNode;\n var newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newData, transaction.path);\n var newDataNode = nodeFromJSON_1.nodeFromJSON(newData);\n var hasExplicitPriority = typeof newData === 'object' &&\n newData != null &&\n util_3.contains(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n var oldWriteId = transaction.currentWriteId;\n var serverValues = this.generateServerValues();\n var newNodeResolved = ServerValues_1.resolveDeferredValueSnapshot(newDataNode, serverValues);\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(this.serverSyncTree_.applyUserOverwrite(transaction.path, newNodeResolved, transaction.currentWriteId, transaction.applyLocally));\n events = events.concat(this.serverSyncTree_.ackUserWrite(oldWriteId, true));\n }\n else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function (unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n var ref = new Reference_1.Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n var lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n var snapshot = new DataSnapshot_1.DataSnapshot(lastInput, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n }\n else {\n callbacks.push(queue[i].onComplete.bind(null, new Error(abortReason), false, null));\n }\n }\n }\n }\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n // Now fire callbacks, now that we're in a good, known state.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n/**\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\n * the node for the given path if there are no pending transactions on any ancestor.\n *\n * @param {!Path} path The location to start at.\n * @return {!Tree.>} The rootmost node with a transaction.\n * @private\n */\nRepo_1.Repo.prototype.getAncestorTransactionNode_ = function (path) {\n var front;\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n var transactionNode = this.transactionQueueTree_;\n while ((front = path.getFront()) !== null &&\n transactionNode.getValue() === null) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n return transactionNode;\n};\n/**\n * Builds the queue of all transactions at or below the specified transactionNode.\n *\n * @param {!Tree.>} transactionNode\n * @return {Array.} The generated queue.\n * @private\n */\nRepo_1.Repo.prototype.buildTransactionQueue_ = function (transactionNode) {\n // Walk any child transaction queues and aggregate them into a single queue.\n var transactionQueue = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function (a, b) {\n return a.order - b.order;\n });\n return transactionQueue;\n};\n/**\n * @param {!Tree.>} node\n * @param {Array.} queue\n * @private\n */\nRepo_1.Repo.prototype.aggregateTransactionQueuesForNode_ = function (node, queue) {\n var _this = this;\n var nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (var i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n node.forEachChild(function (child) {\n _this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n/**\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\n *\n * @param {!Tree.>} node\n * @private\n */\nRepo_1.Repo.prototype.pruneCompletedTransactionsBelowNode_ = function (node) {\n var _this = this;\n var queue = node.getValue();\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n node.forEachChild(function (childNode) {\n _this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n/**\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\n * since we consider them incompatible with transactions.\n *\n * @param {!Path} path Path for which we want to abort related transactions.\n * @return {!Path}\n * @private\n */\nRepo_1.Repo.prototype.abortTransactions_ = function (path) {\n var _this = this;\n var affectedPath = this.getAncestorTransactionNode_(path).path();\n var transactionNode = this.transactionQueueTree_.subTree(path);\n transactionNode.forEachAncestor(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n this.abortTransactionsOnNode_(transactionNode);\n transactionNode.forEachDescendant(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n return affectedPath;\n};\n/**\n * Abort transactions stored in this transaction queue node.\n *\n * @param {!Tree.>} node Node to abort transactions for.\n * @private\n */\nRepo_1.Repo.prototype.abortTransactionsOnNode_ = function (node) {\n var queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n var events = [];\n var lastSent = -1;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n }\n else if (queue[i].status === TransactionStatus.SENT) {\n util_1.assert(lastSent === i - 1, 'All SENT items should be at beginning of queue.');\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n }\n else {\n util_1.assert(queue[i].status === TransactionStatus.RUN, 'Unexpected transaction status in abort');\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true));\n if (queue[i].onComplete) {\n var snapshot = null;\n callbacks.push(queue[i].onComplete.bind(null, new Error('set'), false, snapshot));\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n }\n else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n};\n\n//# sourceMappingURL=Repo_transaction.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/Repo_transaction.js\n// module id = 109\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Path_1 = require(\"./Path\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Node in a Tree.\n */\nvar TreeNode = /** @class */ (function () {\n function TreeNode() {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n this.children = {};\n this.childCount = 0;\n this.value = null;\n }\n return TreeNode;\n}());\nexports.TreeNode = TreeNode;\n/**\n * A light-weight tree, traversable by path. Nodes can have both values and children.\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\n * children.\n */\nvar Tree = /** @class */ (function () {\n /**\n * @template T\n * @param {string=} name_ Optional name of the node.\n * @param {Tree=} parent_ Optional parent node.\n * @param {TreeNode=} node_ Optional node to wrap.\n */\n function Tree(name_, parent_, node_) {\n if (name_ === void 0) { name_ = ''; }\n if (parent_ === void 0) { parent_ = null; }\n if (node_ === void 0) { node_ = new TreeNode(); }\n this.name_ = name_;\n this.parent_ = parent_;\n this.node_ = node_;\n }\n /**\n * Returns a sub-Tree for the given path.\n *\n * @param {!(string|Path)} pathObj Path to look up.\n * @return {!Tree.} Tree for path.\n */\n Tree.prototype.subTree = function (pathObj) {\n // TODO: Require pathObj to be Path?\n var path = pathObj instanceof Path_1.Path ? pathObj : new Path_1.Path(pathObj);\n var child = this, next;\n while ((next = path.getFront()) !== null) {\n var childNode = util_2.safeGet(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n return child;\n };\n /**\n * Returns the data associated with this tree node.\n *\n * @return {?T} The data or null if no data exists.\n */\n Tree.prototype.getValue = function () {\n return this.node_.value;\n };\n /**\n * Sets data to this tree node.\n *\n * @param {!T} value Value to set.\n */\n Tree.prototype.setValue = function (value) {\n util_1.assert(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n };\n /**\n * Clears the contents of the tree node (its value and all children).\n */\n Tree.prototype.clear = function () {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n };\n /**\n * @return {boolean} Whether the tree has any children.\n */\n Tree.prototype.hasChildren = function () {\n return this.node_.childCount > 0;\n };\n /**\n * @return {boolean} Whether the tree is empty (no value or children).\n */\n Tree.prototype.isEmpty = function () {\n return this.getValue() === null && !this.hasChildren();\n };\n /**\n * Calls action for each child of this tree node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachChild = function (action) {\n var _this = this;\n util_2.forEach(this.node_.children, function (child, childTree) {\n action(new Tree(child, _this, childTree));\n });\n };\n /**\n * Does a depth-first traversal of this node's descendants, calling action for each one.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\n * false.\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\n * parent.\n */\n Tree.prototype.forEachDescendant = function (action, includeSelf, childrenFirst) {\n if (includeSelf && !childrenFirst)\n action(this);\n this.forEachChild(function (child) {\n child.forEachDescendant(action, /*includeSelf=*/ true, childrenFirst);\n });\n if (includeSelf && childrenFirst)\n action(this);\n };\n /**\n * Calls action on each ancestor node.\n *\n * @param {function(!Tree.)} action Action to be called on each parent; return\n * true to abort.\n * @param {boolean=} includeSelf Whether to call action on this node as well.\n * @return {boolean} true if the action callback returned true.\n */\n Tree.prototype.forEachAncestor = function (action, includeSelf) {\n var node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n };\n /**\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\n * is found, action is called on it and traversal does not continue inside the node.\n * Action is *not* called on this node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachImmediateDescendantWithValue = function (action) {\n this.forEachChild(function (child) {\n if (child.getValue() !== null)\n action(child);\n else\n child.forEachImmediateDescendantWithValue(action);\n });\n };\n /**\n * @return {!Path} The path of this tree node, as a Path.\n */\n Tree.prototype.path = function () {\n return new Path_1.Path(this.parent_ === null\n ? this.name_\n : this.parent_.path() + '/' + this.name_);\n };\n /**\n * @return {string} The name of the tree node.\n */\n Tree.prototype.name = function () {\n return this.name_;\n };\n /**\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\n */\n Tree.prototype.parent = function () {\n return this.parent_;\n };\n /**\n * Adds or removes this child from its parent based on whether it's empty or not.\n *\n * @private\n */\n Tree.prototype.updateParents_ = function () {\n if (this.parent_ !== null)\n this.parent_.updateChild_(this.name_, this);\n };\n /**\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\n *\n * @param {string} childName The name of the child to update.\n * @param {!Tree.} child The child to update.\n * @private\n */\n Tree.prototype.updateChild_ = function (childName, child) {\n var childEmpty = child.isEmpty();\n var childExists = util_2.contains(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n }\n else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n };\n return Tree;\n}());\nexports.Tree = Tree;\n\n//# sourceMappingURL=Tree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/Tree.js\n// module id = 110\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar WebSocketConnection_1 = require(\"../realtime/WebSocketConnection\");\nvar BrowserPollConnection_1 = require(\"../realtime/BrowserPollConnection\");\n/**\n * INTERNAL methods for internal-use only (tests, etc.).\n *\n * Customers shouldn't use these or else should be aware that they could break at any time.\n *\n * @const\n */\nexports.forceLongPolling = function () {\n WebSocketConnection_1.WebSocketConnection.forceDisallow();\n BrowserPollConnection_1.BrowserPollConnection.forceAllow();\n};\nexports.forceWebSockets = function () {\n BrowserPollConnection_1.BrowserPollConnection.forceDisallow();\n};\n/* Used by App Manager */\nexports.isWebSocketsAvailable = function () {\n return WebSocketConnection_1.WebSocketConnection['isAvailable']();\n};\nexports.setSecurityDebugCallback = function (ref, callback) {\n ref.repo.persistentConnection_.securityDebugCallback_ = callback;\n};\nexports.stats = function (ref, showDelta) {\n ref.repo.stats(showDelta);\n};\nexports.statsIncrementCounter = function (ref, metric) {\n ref.repo.statsIncrementCounter(metric);\n};\nexports.dataUpdateCount = function (ref) {\n return ref.repo.dataUpdateCount;\n};\nexports.interceptServerData = function (ref, callback) {\n return ref.repo.interceptServerData_(callback);\n};\n\n//# sourceMappingURL=internal.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/internal.js\n// module id = 111\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RepoInfo_1 = require(\"../core/RepoInfo\");\nvar PersistentConnection_1 = require(\"../core/PersistentConnection\");\nvar RepoManager_1 = require(\"../core/RepoManager\");\nvar Connection_1 = require(\"../realtime/Connection\");\nexports.DataConnection = PersistentConnection_1.PersistentConnection;\n/**\n * @param {!string} pathString\n * @param {function(*)} onComplete\n */\nPersistentConnection_1.PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n/**\n * @param {*} data\n * @param {function(*)} onEcho\n */\nPersistentConnection_1.PersistentConnection.prototype.echo = function (data, onEcho) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n// RealTimeConnection properties that we use in tests.\nexports.RealTimeConnection = Connection_1.Connection;\n/**\n * @param {function(): string} newHash\n * @return {function()}\n */\nexports.hijackHash = function (newHash) {\n var oldPut = PersistentConnection_1.PersistentConnection.prototype.put;\n PersistentConnection_1.PersistentConnection.prototype.put = function (pathString, data, opt_onComplete, opt_hash) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function () {\n PersistentConnection_1.PersistentConnection.prototype.put = oldPut;\n };\n};\n/**\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\n */\nexports.ConnectionTarget = RepoInfo_1.RepoInfo;\n/**\n * @param {!Query} query\n * @return {!string}\n */\nexports.queryIdentifier = function (query) {\n return query.queryIdentifier();\n};\n/**\n * @param {!Query} firebaseRef\n * @return {!Object}\n */\nexports.listens = function (firebaseRef) {\n return firebaseRef.repo.persistentConnection_.listens_;\n};\n/**\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\n *\n * @param {boolean} forceRestClient\n */\nexports.forceRestClient = function (forceRestClient) {\n RepoManager_1.RepoManager.getInstance().forceRestClient(forceRestClient);\n};\n\n//# sourceMappingURL=test_access.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/test_access.js\n// module id = 112\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/firebase/firebase-firestore.js b/lib/firebase/firebase-firestore.js new file mode 100644 index 00000000..0e530932 --- /dev/null +++ b/lib/firebase/firebase-firestore.js @@ -0,0 +1,7 @@ +/*! + * @license Firebase v4.6.1 + * Build: rev-0ea11f2 + * Terms: https://firebase.google.com/terms/ + */ +try{webpackJsonpFirebase([1],{113:function(t,e,n){n(114)},114:function(t,e,n){"use strict";function r(){return Qt}function i(t){Qt=t}function o(t,e){for(var n=[],r=2;rr)throw new zt(Ht.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+P(e.length,"argument")+".")}function I(t,e,n,r){if(!(e instanceof Array)||e.length20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=k(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":u("Unknown wrong type: "+typeof t)}function k(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/,n=e.exec(""+t.constructor);if(n&&n.length>1)return n[1]}return null}function R(t,e,n){if(void 0===n)throw new zt(Ht.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+_(e)+" argument, but it was undefined.")}function O(t,e,n){y(e,function(e,r){if(n.indexOf(e)<0)throw new zt(Ht.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))})}function M(t,e,n,r){var i=A(r);return new zt(Ht.INVALID_ARGUMENT,"Function "+t+"() requires its "+_(n)+" argument to be a "+e+", but it was: "+i)}function _(t){switch(t){case 1:return"first";case 2:return"second";case 3:return"third";default:return t+"th"}}function P(t,e){return t+" "+e+(1===t?"":"s")}function L(t,e){return te?1:0}function x(t,e){return null!==t&&void 0!==t?!(!e||!t.equals(e)):t===e}function B(t,e){if(t.length!==e.length)return!1;for(var n=0;ne?1:t===e?0:isNaN(t)?isNaN(e)?0:-1:1}function K(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function Q(t){return null===t||void 0===t}function G(t){return Pe(t)&&t<=_e&&t>=Me}function W(t,e,n){if(n.equals(ve.INSTANCE)){if(e!==xe.EQUAL)throw new zt(Ht.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new Ue(t)}if(n.equals(Te.NAN)){if(e!==xe.EQUAL)throw new zt(Ht.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new Fe(t)}return new Be(t,e,n)}function H(t){switch(t){case Ht.OK:return u("Treated status OK as error");case Ht.CANCELLED:case Ht.UNKNOWN:case Ht.DEADLINE_EXCEEDED:case Ht.RESOURCE_EXHAUSTED:case Ht.INTERNAL:case Ht.UNAVAILABLE:case Ht.UNAUTHENTICATED:return!1;case Ht.INVALID_ARGUMENT:case Ht.NOT_FOUND:case Ht.ALREADY_EXISTS:case Ht.PERMISSION_DENIED:case Ht.FAILED_PRECONDITION:case Ht.ABORTED:case Ht.OUT_OF_RANGE:case Ht.UNIMPLEMENTED:case Ht.DATA_LOSS:return!0;default:return u("Unknown status code: "+t)}}function z(t){var e=en[t];if(void 0!==e)return X(e)}function X(t){switch(t){case en.OK:return Ht.OK;case en.CANCELLED:return Ht.CANCELLED;case en.UNKNOWN:return Ht.UNKNOWN;case en.DEADLINE_EXCEEDED:return Ht.DEADLINE_EXCEEDED;case en.RESOURCE_EXHAUSTED:return Ht.RESOURCE_EXHAUSTED;case en.INTERNAL:return Ht.INTERNAL;case en.UNAVAILABLE:return Ht.UNAVAILABLE;case en.UNAUTHENTICATED:return Ht.UNAUTHENTICATED;case en.INVALID_ARGUMENT:return Ht.INVALID_ARGUMENT;case en.NOT_FOUND:return Ht.NOT_FOUND;case en.ALREADY_EXISTS:return Ht.ALREADY_EXISTS;case en.PERMISSION_DENIED:return Ht.PERMISSION_DENIED;case en.FAILED_PRECONDITION:return Ht.FAILED_PRECONDITION;case en.ABORTED:return Ht.ABORTED;case en.OUT_OF_RANGE:return Ht.OUT_OF_RANGE;case en.UNIMPLEMENTED:return Ht.UNIMPLEMENTED;case en.DATA_LOSS:return Ht.DATA_LOSS;default:return u("Unknown status code: "+t)}}function Y(t){if(void 0===t)return en.OK;switch(t){case Ht.OK:return en.OK;case Ht.CANCELLED:return en.CANCELLED;case Ht.UNKNOWN:return en.UNKNOWN;case Ht.DEADLINE_EXCEEDED:return en.DEADLINE_EXCEEDED;case Ht.RESOURCE_EXHAUSTED:return en.RESOURCE_EXHAUSTED;case Ht.INTERNAL:return en.INTERNAL;case Ht.UNAVAILABLE:return en.UNAVAILABLE;case Ht.UNAUTHENTICATED:return en.UNAUTHENTICATED;case Ht.INVALID_ARGUMENT:return en.INVALID_ARGUMENT;case Ht.NOT_FOUND:return en.NOT_FOUND;case Ht.ALREADY_EXISTS:return en.ALREADY_EXISTS;case Ht.PERMISSION_DENIED:return en.PERMISSION_DENIED;case Ht.FAILED_PRECONDITION:return en.FAILED_PRECONDITION;case Ht.ABORTED:return en.ABORTED;case Ht.OUT_OF_RANGE:return en.OUT_OF_RANGE;case Ht.UNIMPLEMENTED:return en.UNIMPLEMENTED;case Ht.DATA_LOSS:return en.DATA_LOSS;default:return u("Unknown status code: "+t)}}function J(t){switch(t){case 200:return Ht.OK;case 400:return Ht.INVALID_ARGUMENT;case 401:return Ht.UNAUTHENTICATED;case 403:return Ht.PERMISSION_DENIED;case 404:return Ht.NOT_FOUND;case 409:return Ht.ABORTED;case 416:return Ht.OUT_OF_RANGE;case 429:return Ht.RESOURCE_EXHAUSTED;case 499:return Ht.CANCELLED;case 500:return Ht.UNKNOWN;case 501:return Ht.UNIMPLEMENTED;case 503:return Ht.UNAVAILABLE;case 504:return Ht.DEADLINE_EXCEEDED;default:return t>=200&&t<300?Ht.OK:t>=400&&t<500?Ht.FAILED_PRECONDITION:t>=500&&t<600?Ht.INTERNAL:Ht.UNKNOWN}}function Z(){return fn}function $(){return pn}function tt(){return dn}function et(){return yn}function nt(t,e){e.length>0&&(t.resumeToken=e)}function rt(t,e){c(!Q(t),e+" is missing")}function it(t){return"number"==typeof t?t:"string"==typeof t?parseInt(t,10):u("can't parse "+t)}function ot(t,e,n){return e===n||!e&&n in t}function at(t){if(t.search(xn)>=0)throw new zt(Ht.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(Ln.bind.apply(Ln,[void 0].concat(t.split("."))))}catch(e){throw new zt(Ht.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}function st(t,e){var n=function(t){switch(t){case Bn.Added:return 1;case Bn.Modified:case Bn.Metadata:return 2;case Bn.Removed:return 0;default:return u("Unknown ChangeType: "+t)}};return n(t)-n(e)}function ut(t){for(var e="",n=0;n0&&(e=ht(e)),e=ct(t.get(n),e);return ht(e)}function ct(t,e){for(var n=e,r=t.length,i=0;i=2,"Invalid path "+t),2===e)return c(t.charAt(0)===ur&&t.charAt(1)===cr,"Non-empty path "+t+" had length 2"),ie.EMPTY_PATH;for(var n=e-2,r=[],i="",o=0;on)&&u('Invalid encoded resource path: "'+t+'"'),t.charAt(a+1)){case cr:var s=t.substring(o,a),h=void 0;0===i.length?h=s:(i+=s,h=i,i=""),r.push(h);break;case hr:i+=t.substring(o,a),i+="\0";break;case lr:i+=t.substring(o,a+1);break;default:u('Invalid encoded resource path: "'+t+'"')}o=a+2}return new ie(r)}function ft(t,e){c(0===e,"Unexpected upgrade from version "+e),t.createObjectStore(dr.store,{keyPath:dr.keyPath}),t.createObjectStore(yr.store,{keyPath:yr.keyPath}),t.createObjectStore(wr.store,{keyPath:wr.keyPath}).createIndex(wr.documentTargetsIndex,wr.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(br.store,{keyPath:br.keyPath}).createIndex(br.queryTargetsIndexName,br.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(mr.store),t.createObjectStore(vr.store),t.createObjectStore(pr.store),t.createObjectStore(Ir.store)}function pt(t){return new Wn(function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){n(t.target.error)}})}function dt(t){return c("string"==typeof t,"Persisting non-string stream token not supported."),t}function yt(t){return vt(t,yr.store)}function mt(t){return vt(t,mr.store)}function gt(t){return vt(t,dr.store)}function vt(t,e){return t instanceof Nr?t.store(e):u("Invalid transaction object provided!")}function bt(t){return Tt(t,br.store)}function wt(t){return Tt(t,Ir.store)}function It(t){return Tt(t,wr.store)}function Tt(t,e){return t instanceof Nr?t.store(e):u("Invalid transaction object provided!")}function Et(t){return t instanceof Nr?t.store(vr.store):u("Invalid transaction object provided!")}function St(t){return t.path.toArray()}function Nt(t){return void 0!==t.documents}function Dt(t){if(!t)return new ai;switch(t.type){case"google-auth":return new ui(t.client);case"gapi":return new hi(t.client,t.sessionIndex||"0");case"provider":return t.client;default:throw new zt(Ht.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}function Ct(t){return At(t,["next","error","complete"])}function At(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=e;r=0,"Index for document not found"),i=i.delete(n.doc.key)),n.type!==Bn.Removed&&(i=i.add(n.doc),a=i.indexOf(n.doc.key)),{type:Ut(n.type),doc:r,oldIndex:o,newIndex:a}})}function Ut(t){switch(t){case Bn.Added:return"added";case Bn.Modified:case Bn.Metadata:return"modified";case Bn.Removed:return"removed";default:return u("Unknown change type: "+t)}}function Ft(t){t.INTERNAL.registerService("firestore",function(t){return new Ci(t)},g(Ki))}function Vt(t){Ft(t)}Object.defineProperty(e,"__esModule",{value:!0});var qt,jt=n(6),Kt=jt.default.SDK_VERSION;!function(t){t[t.DEBUG=0]="DEBUG",t[t.ERROR=1]="ERROR",t[t.SILENT=2]="SILENT"}(qt=qt||(qt={}));var Qt=qt.ERROR,Gt=function(){function t(){}return t.setPlatform=function(e){t.platform&&u("Platform already defined"),t.platform=e},t.getPlatform=function(){return t.platform||u("Platform not set"),t.platform},t}(),Wt=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ht={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},zt=function(t){function e(e,n){var r=t.call(this,n)||this;return r.code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return Wt(e,t),e}(Error),Xt=function(){function t(){}return t.newId=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",n=0;n<20;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return c(20===e.length,"Invalid auto ID: "+e),e},t}(),Yt=function(){function t(t){q(),this.e=t}return t.fromBase64String=function(e){v("Blob.fromBase64String",arguments,1),T("Blob.fromBase64String","string",1,e),q();try{return new t(Gt.getPlatform().atob(e))}catch(t){throw new zt(Ht.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},t.fromUint8Array=function(e){if(v("Blob.fromUint8Array",arguments,1),V(),!(e instanceof Uint8Array))throw M("Blob.fromUint8Array","Uint8Array",1,e);return new t(Array.prototype.map.call(e,function(t){return String.fromCharCode(t)}).join(""))},t.prototype.toBase64=function(){return v("Blob.toBase64",arguments,0),q(),Gt.getPlatform().btoa(this.e)},t.prototype.toUint8Array=function(){v("Blob.toUint8Array",arguments,0),V();for(var t=new Uint8Array(this.e.length),e=0;e90)throw new zt(Ht.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new zt(Ht.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this.p=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.p},enumerable:!0,configurable:!0}),t.prototype.n=function(t){return this._lat===t._lat&&this.p===t.p},t.prototype.r=function(t){return L(this._lat,t._lat)||L(this.p,t.p)},t}(),$t=function(){function t(t,e,n,r){this.databaseId=t,this.persistenceKey=e,this.host=n,this.ssl=r}return t}(),te="(default)",ee=function(){function t(t,e){this.projectId=t,this.database=e||te}return Object.defineProperty(t.prototype,"isDefaultDatabase",{get:function(){return this.database===te},enumerable:!0,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t.prototype.compareTo=function(t){return L(this.projectId,t.projectId)||L(this.database,t.database)},t}(),ne=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),re=function(){function t(t,e,n){this.init(t,e,n)}return t.prototype.init=function(t,e,n){void 0===e?e=0:e>t.length&&u("offset "+e+" out of range "+t.length),void 0===n?n=t.length-e:n>t.length-e&&u("length "+n+" out of range "+(t.length-e)),this.segments=t,this.offset=e,this.len=n},t.prototype.construct=function(t,e,n){var r=Object.create(Object.getPrototypeOf(this));return r.init(t,e,n),r},Object.defineProperty(t.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),t.prototype.equals=function(e){return 0===t.comparator(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach(function(t){n.push(t)}):"string"==typeof e?n.push(e):u("Unknown parameter type for Path.child(): "+e),this.construct(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.popFirst=function(t){return t=void 0===t?1:t,c(this.length>=t,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+t,this.length-t)},t.prototype.popLast=function(){return c(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},t.prototype.firstSegment=function(){return c(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},t.prototype.lastSegment=function(){return c(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},t.prototype.get=function(t){return c(to)return 1}return t.lengthe.length?1:0},t}(),ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ne(e,t),e.prototype.canonicalString=function(){return this.toArray().join("/")},e.prototype.toString=function(){return this.canonicalString()},e.fromString=function(t){if(t.indexOf("//")>=0)throw new zt(Ht.INVALID_ARGUMENT,"Invalid path ("+t+"). Paths must not contain // in them.");return new e(t.split("/").filter(function(t){return t.length>0}))},e.EMPTY_PATH=new e([]),e}(re),oe=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ne(e,t),e.isValidIdentifier=function(t){return oe.test(t)},e.prototype.canonicalString=function(){return this.toArray().map(function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.isValidIdentifier(t)||(t="`"+t+"`"),t}).join(".")},e.prototype.toString=function(){return this.canonicalString()},e.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},e.keyField=function(){return new e(["__name__"])},e.fromServerFormat=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new zt(Ht.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i0&&(e=e.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e=this.root,n=null;!e.isEmpty();){var r=this.comparator(t,e.key);if(0===r){if(e.left.isEmpty())return n?n.key:null;for(e=e.left;!e.right.isEmpty();)e=e.right;return e.key}r<0?e=e.left:r>0&&(n=e,e=e.right)}throw u("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.isEmpty();){var r=this.comparator(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),t.prototype.minKey=function(){return this.root.minKey()},t.prototype.maxKey=function(){return this.root.maxKey()},t.prototype.inorderTraversal=function(t){return this.root.inorderTraversal(t)},t.prototype.forEach=function(t){this.inorderTraversal(function(e,n){return t(e,n),!1})},t.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},t.prototype.getIterator=function(t){return new le(this.root,null,this.comparator,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new le(this.root,t,this.comparator,!1,e)},t.prototype.getReverseIterator=function(t){return new le(this.root,null,this.comparator,!0,t)},t.prototype.getReverseIteratorFrom=function(t,e){return new le(this.root,t,this.comparator,!0,e)},t}(),le=function(){function t(t,e,n,r,i){this.resultGenerator=i||null,this.isReverse=r,this.nodeStack=[];for(var o=1;!t.isEmpty();)if(o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse?t.left:t.right;else{if(0===o){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return t.prototype.getNext=function(){c(this.nodeStack.length>0,"getNext() called on iterator when hasNext() is false.");var t,e=this.nodeStack.pop();if(t=this.resultGenerator?this.resultGenerator(e.key,e.value):{key:e.key,value:e.value},this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack.length>0},t.prototype.peek=function(){if(0===this.nodeStack.length)return null;var t=this.nodeStack[this.nodeStack.length-1];return this.resultGenerator?this.resultGenerator(t.key,t.value):{key:t.key,value:t.value}},t}(),fe=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},t.prototype.minKey=function(){return this.min().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n)),r.fixUp()},t.prototype.removeMin=function(){if(this.left.isEmpty())return t.EMPTY;var e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(e,i.key)){if(i.right.isEmpty())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()},t.prototype.isRed=function(){return this.color},t.prototype.fixUp=function(){var t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t},t.prototype.moveRedLeft=function(){var t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t},t.prototype.moveRedRight=function(){var t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t},t.prototype.rotateLeft=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth=function(){var t=this.check();return Math.pow(2,t)<=this.size+1},t.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw u("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw u("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check();if(t!==this.right.check())throw u("Black depths differ");return t+(this.isRed()?0:1)},t.EMPTY=null,t.RED=!0,t.BLACK=!1,t}(),pe=function(){function t(){this.size=0}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new fe(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.isRed=function(){return!1},t.prototype.checkMaxDepth=function(){return!0},t.prototype.check=function(){return 0},t}();fe.EMPTY=new pe;var de,ye=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.NullValue=0]="NullValue",t[t.BooleanValue=1]="BooleanValue",t[t.NumberValue=2]="NumberValue",t[t.TimestampValue=3]="TimestampValue",t[t.StringValue=4]="StringValue",t[t.BlobValue=5]="BlobValue",t[t.RefValue=6]="RefValue",t[t.GeoPointValue=7]="GeoPointValue",t[t.ArrayValue=8]="ArrayValue",t[t.ObjectValue=9]="ObjectValue"}(de=de||(de={}));var me,ge=function(){function t(){}return t.prototype.toString=function(){var t=this.value();return null===t?"null":""+t},t.prototype.defaultCompareTo=function(t){return c(this.typeOrder!==t.typeOrder,"Default compareTo should not be used for values of same type."),L(this.typeOrder,t.typeOrder)},t}(),ve=function(t){function e(){var e=t.call(this)||this;return e.typeOrder=de.NullValue,e.internalValue=null,e}return ye(e,t),e.prototype.value=function(){return null},e.prototype.equals=function(t){return t instanceof e},e.prototype.compareTo=function(t){return t instanceof e?0:this.defaultCompareTo(t)},e.INSTANCE=new e,e}(ge),be=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.BooleanValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue},e.prototype.equals=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?L(this,t):this.defaultCompareTo(t)},e.of=function(t){return t?e.TRUE:e.FALSE},e.TRUE=new e(!0),e.FALSE=new e(!1),e}(ge),we=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.NumberValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue},e.prototype.compareTo=function(t){return t instanceof e?j(this.internalValue,t.internalValue):this.defaultCompareTo(t)},e}(ge),Ie=function(t){function e(e){return t.call(this,e)||this}return ye(e,t),e.prototype.equals=function(t){return t instanceof e&&K(this.internalValue,t.internalValue)},e}(we),Te=function(t){function e(e){var n=t.call(this,e)||this;return n.internalValue=e,n}return ye(e,t),e.prototype.equals=function(t){return t instanceof e&&K(this.internalValue,t.internalValue)},e.NAN=new e(NaN),e.POSITIVE_INFINITY=new e(1/0),e.NEGATIVE_INFINITY=new e(-1/0),e}(we),Ee=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.StringValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue},e.prototype.equals=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?L(this.internalValue,t.internalValue):this.defaultCompareTo(t)},e}(ge),Se=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.TimestampValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue.toDate()},e.prototype.equals=function(t){return t instanceof e&&this.internalValue.equals(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue.compareTo(t.internalValue):t instanceof Ne?-1:this.defaultCompareTo(t)},e}(ge),Ne=function(t){function e(e){var n=t.call(this)||this;return n.localWriteTime=e,n.typeOrder=de.TimestampValue,n}return ye(e,t),e.prototype.value=function(){return null},e.prototype.equals=function(t){return t instanceof e&&this.localWriteTime.equals(t.localWriteTime)},e.prototype.compareTo=function(t){return t instanceof e?this.localWriteTime.compareTo(t.localWriteTime):t instanceof Se?1:this.defaultCompareTo(t)},e.prototype.toString=function(){return""},e}(ge),De=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.BlobValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue},e.prototype.equals=function(t){return t instanceof e&&this.internalValue.n(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue.r(t.internalValue):this.defaultCompareTo(t)},e}(ge),Ce=function(t){function e(e,n){var r=t.call(this)||this;return r.databaseId=e,r.key=n,r.typeOrder=de.RefValue,r}return ye(e,t),e.prototype.value=function(){return this.key},e.prototype.equals=function(t){return t instanceof e&&this.key.equals(t.key)&&this.databaseId.equals(t.databaseId)},e.prototype.compareTo=function(t){if(t instanceof e){var n=this.databaseId.compareTo(t.databaseId);return 0!==n?n:se.comparator(this.key,t.key)}return this.defaultCompareTo(t)},e}(ge),Ae=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.GeoPointValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue},e.prototype.equals=function(t){return t instanceof e&&this.internalValue.n(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue.r(t.internalValue):this.defaultCompareTo(t)},e}(ge),ke=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.ObjectValue,n}return ye(e,t),e.prototype.value=function(){var t={};return this.internalValue.inorderTraversal(function(e,n){t[e]=n.value()}),t},e.prototype.forEach=function(t){this.internalValue.inorderTraversal(t)},e.prototype.equals=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext();if(i.key!==o.key||!i.value.equals(o.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext(),a=L(i.key,o.key)||i.value.compareTo(o.value);if(a)return a}return L(n.hasNext(),r.hasNext())}return this.defaultCompareTo(t)},e.prototype.set=function(t,n){if(c(!t.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===t.length)return this.setChild(t.firstSegment(),n);var r=this.child(t.firstSegment());r instanceof e||(r=e.EMPTY);var i=r.set(t.popFirst(),n);return this.setChild(t.firstSegment(),i)},e.prototype.delete=function(t){if(c(!t.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===t.length)return new e(this.internalValue.remove(t.firstSegment()));var n=this.child(t.firstSegment());if(n instanceof e){var r=n.delete(t.popFirst());return new e(this.internalValue.insert(t.firstSegment(),r))}return this},e.prototype.contains=function(t){return void 0!==this.field(t)},e.prototype.field=function(t){c(!t.isEmpty(),"Can't get field of empty path");var n=this;return t.forEach(function(t){n=n instanceof e?n.internalValue.get(t)||void 0:void 0}),n},e.prototype.toString=function(){return JSON.stringify(this.value())},e.prototype.child=function(t){return this.internalValue.get(t)||void 0},e.prototype.setChild=function(t,n){return new e(this.internalValue.insert(t,n))},e.EMPTY=new e(new he(L)),e}(ge),Re=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=de.ArrayValue,n}return ye(e,t),e.prototype.value=function(){return this.internalValue.map(function(t){return t.value()})},e.prototype.forEach=function(t){this.internalValue.forEach(t)},e.prototype.equals=function(t){if(t instanceof e){if(this.internalValue.length!==t.internalValue.length)return!1;for(var n=0;n0?this.explicitOrderBy[this.explicitOrderBy.length-1].dir:Ve.ASCENDING;this.memoizedOrderBy.push(a===Ve.ASCENDING?Ke:Qe)}}}return this.memoizedOrderBy},enumerable:!0,configurable:!0}),t.prototype.addFilter=function(e){c(null==this.getInequalityFilterField()||!(e instanceof Be)||!e.isInequality()||e.field.equals(this.getInequalityFilterField()),"Query must only have one inequality field."),c(!se.isDocumentKey(this.path),"No filtering allowed for document query");var n=this.filters.concat([e]);return new t(this.path,this.explicitOrderBy.slice(),n,this.limit,this.startAt,this.endAt)},t.prototype.addOrderBy=function(e){c(!se.isDocumentKey(this.path),"No ordering allowed for document query"),c(!this.startAt&&!this.endAt,"Bounds must be set after orderBy");var n=this.explicitOrderBy.concat([e]);return new t(this.path,n,this.filters.slice(),this.limit,this.startAt,this.endAt)},t.prototype.withLimit=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),e,this.startAt,this.endAt)},t.prototype.withStartAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,e,this.endAt)},t.prototype.withEndAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,e)},t.prototype.canonicalId=function(){if(null===this.memoizedCanonicalId){var t=this.path.canonicalString();t+="|f:";for(var e=0,n=this.filters;e0&&(t+=", filters: ["+this.filters.join(", ")+"]"),Q(this.limit)||(t+=", limit: "+this.limit),this.explicitOrderBy.length>0&&(t+=", orderBy: ["+this.explicitOrderBy.join(", ")+"]"),this.startAt&&(t+=", startAt: "+this.startAt.canonicalId()),this.endAt&&(t+=", endAt: "+this.endAt.canonicalId()),t+")"},t.prototype.equals=function(t){if(this.limit!==t.limit)return!1;if(this.orderBy.length!==t.orderBy.length)return!1;for(var e=0;e0?this.explicitOrderBy[0].field:null},t.prototype.getInequalityFilterField=function(){for(var t=0,e=this.filters;t=":return t.GREATER_THAN_OR_EQUAL;case">":return t.GREATER_THAN;default:return u("Unknown relation: "+e)}},t.prototype.toString=function(){return this.name},t.prototype.equals=function(t){return this.name===t.name},t.LESS_THAN=new t("<"),t.LESS_THAN_OR_EQUAL=new t("<="),t.EQUAL=new t("=="),t.GREATER_THAN=new t(">"),t.GREATER_THAN_OR_EQUAL=new t(">="),t}(),Be=function(){function t(t,e,n){this.field=t,this.op=e,this.value=n}return t.prototype.matches=function(t){if(this.field.isKeyField()){c(this.value instanceof Ce,"Comparing on key, but filter value not a RefValue");var e=this.value,n=se.comparator(t.key,e.key);return this.matchesComparison(n)}var r=t.field(this.field);return void 0!==r&&this.matchesValue(r)},t.prototype.matchesValue=function(t){return this.value.typeOrder===t.typeOrder&&this.matchesComparison(t.compareTo(this.value))},t.prototype.matchesComparison=function(t){switch(this.op){case xe.LESS_THAN:return t<0;case xe.LESS_THAN_OR_EQUAL:return t<=0;case xe.EQUAL:return 0===t;case xe.GREATER_THAN:return t>0;case xe.GREATER_THAN_OR_EQUAL:return t>=0;default:return u("Unknown relation op"+this.op)}},t.prototype.isInequality=function(){return this.op!==xe.EQUAL},t.prototype.canonicalId=function(){return this.field.canonicalString()+""+this.op+this.value},t.prototype.equals=function(e){return e instanceof t&&this.op.equals(e.op)&&this.field.equals(e.field)&&this.value.equals(e.value)},t.prototype.toString=function(){return this.field.canonicalString()+" "+this.op+" "+this.value.value()},t}(),Ue=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field);return void 0!==e&&null===e.value()},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS null"},t.prototype.toString=function(){return this.field.canonicalString()+" IS null"},t.prototype.equals=function(e){return e instanceof t&&this.field.equals(e.field)},t}(),Fe=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field).value();return"number"==typeof e&&isNaN(e)},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.toString=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.equals=function(e){return e instanceof t&&this.field.equals(e.field)},t}(),Ve=function(){function t(t){this.name=t}return t.prototype.toString=function(){return this.name},t.ASCENDING=new t("asc"),t.DESCENDING=new t("desc"),t}(),qe=function(){function t(t,e){this.position=t,this.before=e}return t.prototype.canonicalId=function(){for(var t=this.before?"b:":"a:",e=0,n=this.position;e=0,"timestamp nanoseconds out of range: "+e),c(e<1e9,"timestamp nanoseconds out of range"+e),c(t>=-62135596800,"timestamp seconds out of range: "+t),c(t<253402300800,"timestamp seconds out of range"+t)}return t.now=function(){return t.fromEpochMilliseconds(Date.now())},t.fromDate=function(e){return t.fromEpochMilliseconds(e.getTime())},t.fromEpochMilliseconds=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.fromISOString=function(e){var n=0,r=Ge.exec(e);if(c(!!r,"invalid timestamp: "+e),r[1]){var i=r[1];i=(i+"000000000").substr(0,9),n=parseInt(i,10)}var o=new Date(e);return new t(Math.floor(o.getTime()/1e3),n)},t.prototype.toDate=function(){return new Date(this.toEpochMilliseconds())},t.prototype.toEpochMilliseconds=function(){return 1e3*this.seconds+this.nanos/1e6},t.prototype.compareTo=function(t){return this.seconds===t.seconds?L(this.nanos,t.nanos):L(this.seconds,t.seconds)},t.prototype.equals=function(t){return t.seconds===this.seconds&&t.nanos===this.nanos},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanos="+this.nanos+")"},t}(),He=function(){function t(t){this.timestamp=t}return t.fromMicroseconds=function(e){var n=Math.floor(e/1e6);return new t(new We(n,e%1e6*1e3))},t.fromTimestamp=function(e){return new t(e)},t.forDeletedDoc=function(){return t.MIN},t.prototype.compareTo=function(t){return this.timestamp.compareTo(t.timestamp)},t.prototype.equals=function(t){return this.timestamp.equals(t.timestamp)},t.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanos/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp+")"},t.prototype.toTimestamp=function(){return this.timestamp},t.MIN=new t(new We(0,0)),t}();!function(t){t[t.Listen=0]="Listen",t[t.ExistenceFilterMismatch=1]="ExistenceFilterMismatch",t[t.LimboResolution=2]="LimboResolution"}(me=me||(me={}));var ze,Xe=function(){function t(t,e,n,r,i){void 0===r&&(r=He.MIN),void 0===i&&(i=h()),this.query=t,this.targetId=e,this.purpose=n,this.snapshotVersion=r,this.resumeToken=i}return t.prototype.update=function(e){return new t(this.query,this.targetId,this.purpose,e.snapshotVersion,e.resumeToken)},t.prototype.equals=function(t){return this.targetId===t.targetId&&this.purpose===t.purpose&&this.snapshotVersion.equals(t.snapshotVersion)&&this.resumeToken===t.resumeToken&&this.query.equals(t.query)},t}(),Ye=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Je=function(){function t(t){this.fields=t}return t.prototype.equals=function(t){return B(this.fields,t.fields)},t}(),Ze=function(){function t(){}return t.prototype.equals=function(e){return e instanceof t},t.instance=new t,t}(),$e=function(){function t(t,e){this.field=t,this.transform=e}return t.prototype.equals=function(t){return this.field.equals(t.field)&&this.transform.equals(t.transform)},t}(),tn=function(){function t(t,e){this.version=t,this.transformResults=e}return t}();!function(t){t[t.Set=0]="Set",t[t.Patch=1]="Patch",t[t.Transform=2]="Transform",t[t.Delete=3]="Delete"}(ze=ze||(ze={}));var en,nn=function(){function t(t,e){this.updateTime=t,this.exists=e,c(void 0===t||void 0===e,'Precondition can specify "exists" or "updateTime" but not both')}return t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!0,configurable:!0}),t.prototype.isValidFor=function(t){return void 0!==this.updateTime?t instanceof ue&&t.version.equals(this.updateTime):void 0!==this.exists?this.exists?t instanceof ue:null===t||t instanceof ce:(c(this.isNone,"Precondition should be empty"),!0)},t.prototype.equals=function(t){return x(this.updateTime,t.updateTime)&&this.exists===t.exists},t.NONE=new t,t}(),rn=function(){function t(){}return t.prototype.verifyKeyMatches=function(t){null!=t&&c(t.key.equals(this.key),"Can only apply a mutation to a document with the same key")},t.getPostMutationVersion=function(t){return t instanceof ue?t.version:He.MIN},t}(),on=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.value=n,i.precondition=r,i.type=ze.Set,i}return Ye(e,t),e.prototype.applyToRemoteDocument=function(t,e){this.verifyKeyMatches(t),c(null==e.transformResults,"Transform results received by SetMutation.");var n=rn.getPostMutationVersion(t);return new ue(this.key,n,this.value,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var n=rn.getPostMutationVersion(t);return new ue(this.key,n,this.value,{hasLocalMutations:!0})},e.prototype.equals=function(t){return t instanceof e&&this.key.equals(t.key)&&this.value.equals(t.value)&&this.precondition.equals(t.precondition)},e}(rn),an=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.key=e,o.data=n,o.fieldMask=r,o.precondition=i,o.type=ze.Patch,o}return Ye(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),c(null==e.transformResults,"Transform results received by PatchMutation."),!this.precondition.isValidFor(t))return t;var n=rn.getPostMutationVersion(t),r=this.patchDocument(t);return new ue(this.key,n,r,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var n=rn.getPostMutationVersion(t),r=this.patchDocument(t);return new ue(this.key,n,r,{hasLocalMutations:!0})},e.prototype.equals=function(t){return t instanceof e&&this.key.equals(t.key)&&this.fieldMask.equals(t.fieldMask)&&this.precondition.equals(t.precondition)},e.prototype.patchDocument=function(t){var e;return e=t instanceof ue?t.data:ke.EMPTY,this.patchObject(e)},e.prototype.patchObject=function(t){for(var e=0,n=this.fieldMask.fields;e=0)return;e(r.key)}},t.prototype.forEachWhile=function(t,e){var n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();)if(!t(n.getNext().key))return},t.prototype.firstAfterOrEqual=function(t){var e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null},t.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.isEmpty=function(){return this.data.isEmpty()},t.prototype.unionWith=function(t){var e=this;return t.forEach(function(t){e=e.add(t)}),e},t.prototype.equals=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.getIterator(),r=e.data.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(0!==this.comparator(i,o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){return t.push(e)}),"SortedSet("+t+")"},t.prototype.copy=function(e){var n=new t(this.comparator);return n.data=e,n},t}(),fn=new he(se.comparator),pn=new he(se.comparator),dn=new he(se.comparator),yn=new ln(se.comparator),mn=function(){function t(t,e,n){this.snapshotVersion=t,this.targetChanges=e,this.documentUpdates=n}return t.prototype.addDocumentUpdate=function(t){this.documentUpdates=this.documentUpdates.insert(t.key,t)},t.prototype.handleExistenceFilterMismatch=function(t){this.targetChanges[t]={mapping:new bn,snapshotVersion:He.MIN,currentStatusUpdate:hn.MarkNotCurrent,resumeToken:h()}},t}();!function(t){t[t.None=0]="None",t[t.MarkNotCurrent=1]="MarkNotCurrent",t[t.MarkCurrent=2]="MarkCurrent"}(hn=hn||(hn={}));var gn,vn=et(),bn=function(){function t(){this.docs=vn}return Object.defineProperty(t.prototype,"documents",{get:function(){return this.docs},enumerable:!0,configurable:!0}),t.prototype.add=function(t){this.docs=this.docs.add(t)},t.prototype.delete=function(t){this.docs=this.docs.delete(t)},t.prototype.equals=function(t){return null!==t&&this.docs.equals(t.docs)},t}(),wn=function(){function t(){this.addedDocuments=vn,this.removedDocuments=vn}return t.prototype.applyToKeySet=function(t){var e=t;return this.addedDocuments.forEach(function(t){return e=e.add(t)}),this.removedDocuments.forEach(function(t){return e=e.delete(t)}),e},t.prototype.add=function(t){this.addedDocuments=this.addedDocuments.add(t),this.removedDocuments=this.removedDocuments.delete(t)},t.prototype.delete=function(t){this.addedDocuments=this.addedDocuments.delete(t),this.removedDocuments=this.removedDocuments.add(t)},t.prototype.equals=function(t){return null!==t&&this.addedDocuments.equals(t.addedDocuments)&&this.removedDocuments.equals(t.removedDocuments)},t}(),In=function(){function t(t,e,n,r){this.updatedTargetIds=t,this.removedTargetIds=e,this.key=n,this.newDoc=r}return t}(),Tn=function(){function t(t,e){this.targetId=t,this.existenceFilter=e}return t}();!function(t){t[t.NoChange=0]="NoChange",t[t.Added=1]="Added",t[t.Removed=2]="Removed",t[t.Current=3]="Current",t[t.Reset=4]="Reset"}(gn=gn||(gn={}));var En=function(){function t(t,e,n,r){void 0===n&&(n=h()),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r}return t}(),Sn=function(){function t(t,e,n){this.snapshotVersion=t,this.listenTargets=e,this.existenceFilters={},this.targetChanges={},this.documentUpdates=Z(),this.frozen=!1,this.pendingTargetResponses=g(n)}return t.prototype.add=function(t){c(!this.frozen,"Trying to modify frozen WatchChangeAggregator."),t instanceof In?this.addDocumentChange(t):t instanceof En?this.addTargetChange(t):t instanceof Tn?this.addExistenceFilterChange(t):u("Unknown watch change: "+t)},t.prototype.addChanges=function(t){var e=this;c(!this.frozen,"Trying to modify frozen WatchChangeAggregator."),t.forEach(function(t){return e.add(t)})},t.prototype.createRemoteEvent=function(){var t=this,e=this.targetChanges;return d(this.targetChanges,function(n){t.isActiveTarget(n)||delete e[n]}),this.frozen=!0,new mn(this.snapshotVersion,e,this.documentUpdates)},t.prototype.ensureTargetChange=function(t){var e=this.targetChanges[t];return e||(e={currentStatusUpdate:hn.None,snapshotVersion:this.snapshotVersion,mapping:new wn,resumeToken:h()},this.targetChanges[t]=e),e},t.prototype.isActiveTarget=function(t){return!f(this.pendingTargetResponses,t)&&f(this.listenTargets,t)},t.prototype.addDocumentChange=function(t){for(var e=!1,n=0,r=t.updatedTargetIds;n4&&"documents"===t.get(4),"tried to deserialize invalid key "+t),t.popFirst(5)},t.prototype.isValidResourceName=function(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)},t.prototype.toValue=function(t){if(t instanceof ve)return{nullValue:"NULL_VALUE"};if(t instanceof be)return{booleanValue:t.value()};if(t instanceof Ie)return{integerValue:""+t.value()};if(t instanceof Te){var e=t.value();if(this.options.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:t.value()}}return t instanceof Ee?{stringValue:t.value()}:t instanceof ke?{mapValue:this.toMapValue(t)}:t instanceof Re?{arrayValue:this.toArrayValue(t)}:t instanceof Se?{timestampValue:this.toTimestamp(t.internalValue)}:t instanceof Ae?{geoPointValue:{latitude:t.value().latitude,longitude:t.value().longitude}}:t instanceof De?{bytesValue:this.toBytes(t.value())}:t instanceof Ce?{referenceValue:this.toResourceName(t.databaseId,t.key.path)}:u("Unknown FieldValue "+JSON.stringify(t))},t.prototype.fromValue=function(t){var e=this,n=t.value_type;if(ot(t,n,"nullValue"))return ve.INSTANCE;if(ot(t,n,"booleanValue"))return be.of(t.booleanValue);if(ot(t,n,"integerValue"))return new Ie(it(t.integerValue));if(ot(t,n,"doubleValue")){if(this.options.useProto3Json){if("NaN"===t.doubleValue)return Te.NAN;if("Infinity"===t.doubleValue)return Te.POSITIVE_INFINITY;if("-Infinity"===t.doubleValue)return Te.NEGATIVE_INFINITY}return new Te(t.doubleValue)}if(ot(t,n,"stringValue"))return new Ee(t.stringValue);if(ot(t,n,"mapValue"))return this.fromFields(t.mapValue.fields||{});if(ot(t,n,"arrayValue")){rt(t.arrayValue,"arrayValue");var r=t.arrayValue.values||[];return new Re(r.map(function(t){return e.fromValue(t)}))}if(ot(t,n,"timestampValue"))return rt(t.timestampValue,"timestampValue"),new Se(this.fromTimestamp(t.timestampValue));if(ot(t,n,"geoPointValue")){rt(t.geoPointValue,"geoPointValue");var i=t.geoPointValue.latitude||0,o=t.geoPointValue.longitude||0;return new Ae(new Zt(i,o))}if(ot(t,n,"bytesValue")){rt(t.bytesValue,"bytesValue");var a=this.fromBlob(t.bytesValue);return new De(a)}if(ot(t,n,"referenceValue")){rt(t.referenceValue,"referenceValue");var s=this.fromResourceName(t.referenceValue),c=new ee(s.get(1),s.get(3)),h=new se(this.extractLocalPathFromResourceName(s));return new Ce(c,h)}return u("Unknown Value proto "+JSON.stringify(t))},t.prototype.toMutationDocument=function(t,e){return{name:this.toName(t),fields:this.toFields(e)}},t.prototype.toDocument=function(t){return c(!t.hasLocalMutations,"Can't serialize documents with mutations."),{name:this.toName(t.key),fields:this.toFields(t.data),updateTime:this.toTimestamp(t.version.toTimestamp())}},t.prototype.fromDocument=function(t){return new ue(this.fromName(t.name),this.fromVersion(t.updateTime),this.fromFields(t.fields||{}),{hasLocalMutations:!1})},t.prototype.toFields=function(t){var e=this,n={};return t.forEach(function(t,r){n[t]=e.toValue(r)}),n},t.prototype.fromFields=function(t){var e=this,n=t,r=ke.EMPTY;return y(n,function(t,n){r=r.set(new ae([t]),e.fromValue(n))}),r},t.prototype.toMapValue=function(t){return{fields:this.toFields(t)}},t.prototype.toArrayValue=function(t){var e=this,n=[];return t.forEach(function(t){n.push(e.toValue(t))}),{values:n}},t.prototype.fromFound=function(t){c(!!t.found,"Tried to deserialize a found document from a missing document."),rt(t.found.name,"doc.found.name"),rt(t.found.updateTime,"doc.found.updateTime");var e=this.fromName(t.found.name),n=this.fromVersion(t.found.updateTime),r=this.fromFields(t.found.fields||{});return new ue(e,n,r,{hasLocalMutations:!1})},t.prototype.fromMissing=function(t){c(!!t.missing,"Tried to deserialize a missing document from a found document."),c(!!t.readTime,"Tried to deserialize a missing document without a read time.");var e=this.fromName(t.missing),n=this.fromVersion(t.readTime);return new ce(e,n)},t.prototype.fromMaybeDocument=function(t){var e=t.result_type;return ot(t,e,"found")?this.fromFound(t):ot(t,e,"missing")?this.fromMissing(t):u("invalid batch get response: "+JSON.stringify(t))},t.prototype.toWatchTargetChangeState=function(t){switch(t){case gn.Added:return"ADD";case gn.Current:return"CURRENT";case gn.NoChange:return"NO_CHANGE";case gn.Removed:return"REMOVE";case gn.Reset:return"RESET";default:return u("Unknown WatchTargetChangeState: "+t)}},t.prototype.toTestWatchChange=function(t){if(t instanceof Tn)return{filter:{count:t.existenceFilter.count,targetId:t.targetId}};if(t instanceof In){if(t.newDoc instanceof ue){var e=t.newDoc;return{documentChange:{document:{name:this.toName(e.key),fields:this.toFields(e.data),updateTime:this.toVersion(e.version)},targetIds:t.updatedTargetIds,removedTargetIds:t.removedTargetIds}}}if(t.newDoc instanceof ce){var e=t.newDoc;return{documentDelete:{document:this.toName(e.key),readTime:this.toVersion(e.version),removedTargetIds:t.removedTargetIds}}}if(null===t.newDoc)return{documentRemove:{document:this.toName(t.key),removedTargetIds:t.removedTargetIds}}}if(t instanceof En){var n=void 0;return t.cause&&(n={code:Y(t.cause.code),message:t.cause.message}),{targetChange:{targetChangeType:this.toWatchTargetChangeState(t.state),targetIds:t.targetIds,resumeToken:this.unsafeCastProtoByteString(t.resumeToken),cause:n}}}return u("Unrecognized watch change: "+JSON.stringify(t))},t.prototype.fromWatchChange=function(t){var e,n=t.change_type;if(ot(t,n,"targetChange")){rt(t.targetChange,"targetChange");var r=this.fromWatchTargetChangeState(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=t.targetChange.resumeToken||this.emptyByteString(),a=t.targetChange.cause,s=a&&this.fromRpcStatus(a);e=new En(r,i,o,s||null)}else if(ot(t,n,"documentChange")){rt(t.documentChange,"documentChange"),rt(t.documentChange.document,"documentChange.name"),rt(t.documentChange.document.name,"documentChange.document.name"),rt(t.documentChange.document.updateTime,"documentChange.document.updateTime");var c=t.documentChange,h=this.fromName(c.document.name),l=this.fromVersion(c.document.updateTime),f=this.fromFields(c.document.fields||{}),p=new ue(h,l,f,{hasLocalMutations:!1}),d=c.targetIds||[],y=c.removedTargetIds||[];e=new In(d,y,p.key,p)}else if(ot(t,n,"documentDelete")){rt(t.documentDelete,"documentDelete"),rt(t.documentDelete.document,"documentDelete.document");var m=t.documentDelete,h=this.fromName(m.document),l=m.readTime?this.fromVersion(m.readTime):He.forDeletedDoc(),p=new ce(h,l),y=m.removedTargetIds||[];e=new In([],y,p.key,p)}else if(ot(t,n,"documentRemove")){rt(t.documentRemove,"documentRemove"),rt(t.documentRemove.document,"documentRemove");var g=t.documentRemove,h=this.fromName(g.document),y=g.removedTargetIds||[];e=new In([],y,h,null)}else{if(!ot(t,n,"filter"))return u("Unknown change type "+JSON.stringify(t));rt(t.filter,"filter"),rt(t.filter.targetId,"filter.targetId");var v=t.filter,b=v.count||0,w=new cn(b),I=v.targetId;e=new Tn(I,w)}return e},t.prototype.fromWatchTargetChangeState=function(t){return"NO_CHANGE"===t?gn.NoChange:"ADD"===t?gn.Added:"REMOVE"===t?gn.Removed:"CURRENT"===t?gn.Current:"RESET"===t?gn.Reset:u("Got unexpected TargetChange.state: "+t)},t.prototype.versionFromListenResponse=function(t){if(!ot(t,t.response_type,"targetChange"))return He.MIN;var e=t.targetChange;return e.targetIds&&e.targetIds.length?He.MIN:e.readTime?this.fromVersion(e.readTime):He.MIN},t.prototype.toMutation=function(t){var e,n=this;if(t instanceof on)e={update:this.toMutationDocument(t.key,t.value)};else if(t instanceof un)e={delete:this.toName(t.key)};else if(t instanceof an)e={update:this.toMutationDocument(t.key,t.data),updateMask:this.toDocumentMask(t.fieldMask)};else{if(!(t instanceof sn))return u("Unknown mutation type "+t.type);e={transform:{document:this.toName(t.key),fieldTransforms:t.fieldTransforms.map(function(t){return n.toFieldTransform(t)})}}}return t.precondition.isNone||(e.currentDocument=this.toPrecondition(t.precondition)),e},t.prototype.fromMutation=function(t){var e=this,n=t.currentDocument?this.fromPrecondition(t.currentDocument):nn.NONE;if(t.update){rt(t.update.name,"name");var r=this.fromName(t.update.name),i=this.fromFields(t.update.fields||{});if(t.updateMask){var o=this.fromDocumentMask(t.updateMask);return new an(r,i,o,n)}return new on(r,i,n)}if(t.delete){var r=this.fromName(t.delete);return new un(r,n)}if(t.transform){var r=this.fromName(t.transform.document),a=t.transform.fieldTransforms.map(function(t){return e.fromFieldTransform(t)});return c(!0===n.exists,'Transforms only support precondition "exists == true"'),new sn(r,a)}return u("unknown mutation proto: "+JSON.stringify(t))},t.prototype.toPrecondition=function(t){return c(!t.isNone,"Can't serialize an empty precondition"),void 0!==t.updateTime?{updateTime:this.toVersion(t.updateTime)}:void 0!==t.exists?{exists:t.exists}:u("Unknown precondition")},t.prototype.fromPrecondition=function(t){return void 0!==t.updateTime?nn.updateTime(this.fromVersion(t.updateTime)):void 0!==t.exists?nn.exists(t.exists):nn.NONE},t.prototype.fromWriteResult=function(t){var e=this,n=t.updateTime?this.fromVersion(t.updateTime):null,r=null;return t.transformResults&&(r=t.transformResults.map(function(t){return e.fromValue(t)})),new tn(n,r)},t.prototype.fromWriteResults=function(t){var e=this;return(t||[]).map(function(t){return e.fromWriteResult(t)})},t.prototype.toFieldTransform=function(t){return c(t.transform instanceof Ze,"Unknown transform: "+t.transform),{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"}},t.prototype.fromFieldTransform=function(t){c("REQUEST_TIME"===t.setToServerValue,"Unknown transform proto: "+JSON.stringify(t));var e=ae.fromServerFormat(t.fieldPath);return new $e(e,Ze.instance)},t.prototype.toDocumentsTarget=function(t){return{documents:[this.toQueryPath(t.path)]}},t.prototype.fromDocumentsTarget=function(t){var e=t.documents.length;c(1===e,"DocumentsTarget contained other than 1 document: "+e);var n=t.documents[0];return Le.atPath(this.fromQueryPath(n))},t.prototype.toQueryTarget=function(t){var e={structuredQuery:{}};if(t.path.isEmpty())e.parent=this.toQueryPath(ie.EMPTY_PATH);else{var n=t.path;c(n.length%2!=0,"Document queries with filters are not supported."),e.parent=this.toQueryPath(n.popLast()),e.structuredQuery.from=[{collectionId:n.lastSegment()}]}var r=this.toFilter(t.filters);r&&(e.structuredQuery.where=r);var i=this.toOrder(t.orderBy);i&&(e.structuredQuery.orderBy=i);var o=this.toLimit(t.limit);return void 0!==o&&(e.structuredQuery.limit=o),t.startAt&&(e.structuredQuery.startAt=this.toCursor(t.startAt)),t.endAt&&(e.structuredQuery.endAt=this.toCursor(t.endAt)),e},t.prototype.fromQueryTarget=function(t){var e=this.fromQueryPath(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0;if(r>0){c(1===r,"StructuredQuery.from with more than one collection is not supported.");var i=n.from[0];e=e.child(i.collectionId)}var o=[];n.where&&(o=this.fromFilter(n.where));var a=[];n.orderBy&&(a=this.fromOrder(n.orderBy));var s=null;n.limit&&(s=n.limit);var u=null;n.startAt&&(u=this.fromCursor(n.startAt));var h=null;return n.endAt&&(h=this.fromCursor(n.endAt)),new Le(e,a,o,s,u,h)},t.prototype.toListenRequestLabels=function(t){var e=this.toLabel(t.purpose);return null==e?null:{"goog-listen-tags":e}},t.prototype.toLabel=function(t){switch(t){case me.Listen:return null;case me.ExistenceFilterMismatch:return"existence-filter-mismatch";case me.LimboResolution:return"limbo-document";default:return u("Unrecognized query purpose: "+t)}},t.prototype.toTarget=function(t){var e,n=t.query;return e=n.isDocumentQuery()?{documents:this.toDocumentsTarget(n)}:{query:this.toQueryTarget(n)},e.targetId=t.targetId,t.resumeToken.length>0&&(e.resumeToken=this.unsafeCastProtoByteString(t.resumeToken)),e},t.prototype.toFilter=function(t){var e=this;if(0!==t.length){var n=t.map(function(t){return t instanceof Be?e.toRelationFilter(t):e.toUnaryFilter(t)});return 1===n.length?n[0]:{compositeFilter:{op:"AND",filters:n}}}},t.prototype.fromFilter=function(t){var e=this;return t?void 0!==t.unaryFilter?[this.fromUnaryFilter(t)]:void 0!==t.fieldFilter?[this.fromRelationFilter(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map(function(t){return e.fromFilter(t)}).reduce(function(t,e){return t.concat(e)}):u("Unknown filter: "+JSON.stringify(t)):[]},t.prototype.toOrder=function(t){var e=this;if(0!==t.length)return t.map(function(t){return e.toPropertyOrder(t)})},t.prototype.fromOrder=function(t){var e=this;return t.map(function(t){return e.fromPropertyOrder(t)})},t.prototype.toLimit=function(t){if(!Q(t))return t},t.prototype.toCursor=function(t){var e=this;return{before:t.before,values:t.position.map(function(t){return e.toValue(t)})}},t.prototype.fromCursor=function(t){var e=this,n=!!t.before,r=t.values.map(function(t){return e.fromValue(t)});return new qe(r,n)},t.prototype.toDirection=function(t){return Nn[t.name]},t.prototype.fromDirection=function(t){switch(t){case"ASCENDING":return Ve.ASCENDING;case"DESCENDING":return Ve.DESCENDING;default:return}},t.prototype.toOperatorName=function(t){return Dn[t.name]},t.prototype.fromOperatorName=function(t){switch(t){case"EQUAL":return xe.EQUAL;case"GREATER_THAN":return xe.GREATER_THAN;case"GREATER_THAN_OR_EQUAL":return xe.GREATER_THAN_OR_EQUAL;case"LESS_THAN":return xe.LESS_THAN;case"LESS_THAN_OR_EQUAL":return xe.LESS_THAN_OR_EQUAL;case"OPERATOR_UNSPECIFIED":return u("Unspecified relation");default:return u("Unknown relation")}},t.prototype.toFieldPathReference=function(t){return{fieldPath:t.canonicalString()}},t.prototype.fromFieldPathReference=function(t){return ae.fromServerFormat(t.fieldPath)},t.prototype.toPropertyOrder=function(t){return{field:this.toFieldPathReference(t.field),direction:this.toDirection(t.dir)}},t.prototype.fromPropertyOrder=function(t){return new je(this.fromFieldPathReference(t.field),this.fromDirection(t.direction))},t.prototype.toRelationFilter=function(t){return t instanceof Be?{fieldFilter:{field:this.toFieldPathReference(t.field),op:this.toOperatorName(t.op),value:this.toValue(t.value)}}:u("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromRelationFilter=function(t){return new Be(this.fromFieldPathReference(t.fieldFilter.field),this.fromOperatorName(t.fieldFilter.op),this.fromValue(t.fieldFilter.value))},t.prototype.toUnaryFilter=function(t){return t instanceof Fe?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NAN"}}:t instanceof Ue?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NULL"}}:u("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromUnaryFilter=function(t){switch(t.unaryFilter.op){case"IS_NAN":var e=this.fromFieldPathReference(t.unaryFilter.field);return new Fe(e);case"IS_NULL":var n=this.fromFieldPathReference(t.unaryFilter.field);return new Ue(n);case"OPERATOR_UNSPECIFIED":return u("Unspecified filter");default:return u("Unknown filter")}},t.prototype.toDocumentMask=function(t){return{fieldPaths:t.fields.map(function(t){return t.canonicalString()})}},t.prototype.fromDocumentMask=function(t){var e=t.fieldPaths||[],n=e.map(function(t){return ae.fromServerFormat(t)});return new Je(n)},t}(),An=n(115),kn=function(){function t(t){this.wrappedOnOpen=null,this.wrappedOnClose=null,this.wrappedOnMessage=null,this.sendFn=t.sendFn,this.closeFn=t.closeFn}return t.prototype.onOpen=function(t){c(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=t},t.prototype.onClose=function(t){c(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=t},t.prototype.onMessage=function(t){c(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=t},t.prototype.close=function(){this.closeFn()},t.prototype.send=function(t){this.sendFn(t)},t.prototype.callOnOpen=function(){c(null!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},t.prototype.callOnClose=function(t){c(null!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(t)},t.prototype.callOnMessage=function(t){c(null!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(t)},t}(),Rn="Connection",On="gl-js/ fire/"+Kt,Mn=function(){function t(t){this.databaseId=t.databaseId,this.pool=new An.XhrIoPool;var e=t.ssl?"https":"http";this.baseUrl=e+"://"+t.host}return t.prototype.modifyHeadersForRequest=function(t,e){if(e)for(var n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n]);t["X-Goog-Api-Client"]=On,t["google-cloud-resource-prefix"]="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},t.prototype.invoke=function(t,e,n){var r=this,i=this.makeUrl(t);return new Promise(function(s,c){r.pool.getObject(function(h){h.listenOnce(An.EventType.COMPLETE,function(){try{switch(h.getLastErrorCode()){case An.ErrorCode.NO_ERROR:var e=h.getResponseJson();o(Rn,"XHR received:",JSON.stringify(e)),s(e);break;case An.ErrorCode.TIMEOUT:a('RPC "'+t+'" timed out, retrying.'),c(new zt(Ht.DEADLINE_EXCEEDED,"Request time out"));break;case An.ErrorCode.HTTP_ERROR:var n=h.getStatus();a('RPC "'+t+'" failed with status:',n,"response text:",h.getResponseText()),n>0?c(new zt(J(n),"Server responded with status "+h.getStatusText())):(a(Rn,'RPC "'+t+'" failed, retrying.'),c(new zt(Ht.UNAVAILABLE,"Connection failed.")));break;default:u('RPC "'+t+'" failed with unanticipated webchannel error '+h.getLastErrorCode()+": "+h.getLastError()+", giving up.")}}finally{o(Rn,'RPC "'+t+'" completed.'),r.pool.releaseObject(h)}});var l=JSON.stringify(e);o(Rn,"XHR sending: ",i+" "+l);var f={"Content-Type":"text/plain"};r.modifyHeadersForRequest(f,n),h.send(i,"POST",l,f,15)})})},t.prototype.openStream=function(e,n){var r=t.RPC_STREAM_SERVICE_MAPPING[e],i=t.RPC_STREAM_NAME_MAPPING[e];r&&i||u("Unknown RPC name: "+e);var a=[this.baseUrl,"/",r,"/",i,"/channel"],s=Object(An.createWebChannelTransport)(),h={backgroundChannelTest:!0,httpSessionIdParam:"gsessionid",initMessageHeaders:{},sendRawJson:!0,supportsCrossDomainXhr:!0};this.modifyHeadersForRequest(h.initMessageHeaders,n);var l=a.join("");o(Rn,"Creating WebChannel: "+l+" "+h);var f=s.createWebChannel(l,h),p=!1,d=!1,y=new kn({sendFn:function(t){d?o(Rn,"Not sending because WebChannel is closed:",t):(p||(o(Rn,"Opening WebChannel transport."),f.open(),p=!0),o(Rn,"WebChannel sending:",t),f.send(t))},closeFn:function(){return f.close()}}),m=function(t,e){f.listen(t,function(t){try{e(t)}catch(t){setTimeout(function(){throw t},0)}})};return m(An.WebChannel.EventType.OPEN,function(){d||o(Rn,"WebChannel transport opened.")}),m(An.WebChannel.EventType.CLOSE,function(){d||(d=!0,o(Rn,"WebChannel transport closed"),y.callOnClose())}),m(An.WebChannel.EventType.ERROR,function(t){d||(d=!0,o(Rn,"WebChannel transport errored:",t),y.callOnClose(new zt(Ht.UNAVAILABLE,"The operation could not be completed")))}),m(An.WebChannel.EventType.MESSAGE,function(t){if(!d){var e=t.data[0];c(!!e,"Got a webchannel message without data.");var n=e.error||e[0]&&e[0].error;if(n){o(Rn,"WebChannel received error:",n);var r=n.status,i=z(r),a=n.message;void 0===i&&(i=Ht.INTERNAL,a="Unknown error status: "+r+" with message "+n.message),d=!0,y.callOnClose(new zt(i,a)),f.close()}else o(Rn,"WebChannel received:",e),y.callOnMessage(e)}}),setTimeout(function(){y.callOnOpen()},0),y},t.prototype.makeUrl=function(t){var e=[this.baseUrl,"/","v1beta1"];return e.push("/projects/"),e.push(this.databaseId.projectId),e.push("/databases/"),e.push(this.databaseId.database),e.push("/documents"),e.push(":"),e.push(t),e.join("")},t.RPC_STREAM_SERVICE_MAPPING={Write:"google.firestore.v1beta1.Firestore",Listen:"google.firestore.v1beta1.Firestore"},t.RPC_STREAM_NAME_MAPPING={Write:"Write",Listen:"Listen"},t}(),_n=function(){function t(){this.emptyByteString="",this.base64Available="undefined"!=typeof atob}return t.prototype.loadConnection=function(t){return Promise.resolve(new Mn(t))},t.prototype.newSerializer=function(t){return new Cn(t,{useProto3Json:!0})},t.prototype.atob=function(t){return atob(t)},t.prototype.btoa=function(t){return btoa(t)},t}();Gt.setPlatform(new _n);var Pn,Ln=function(){function t(){for(var t=[],e=0;e=0&&(r.listeners.splice(i,1),n=0===r.listeners.length)}return n?(this.queries.delete(e),this.syncEngine.unlisten(e)):Promise.resolve()},t.prototype.onChange=function(t){for(var e=0,n=t;e0||t.syncStateChanged,"We got a new snapshot with no changes?"),!this.options.includeDocumentMetadataChanges){for(var e=[],n=0,r=t.docChanges;n0)return!0;var e=this.snap&&this.snap.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeQueryMetadataChanges},t.prototype.raiseInitialEvent=function(e){c(!this.raisedInitialEvent,"Trying to raise initial events for second time"),e={query:e.query,docs:e.docs,oldDocs:qn.emptySet(e.docs),docChanges:t.getInitialViewChanges(e),fromCache:e.fromCache,hasPendingWrites:e.hasPendingWrites,syncStateChanged:!0},this.raisedInitialEvent=!0,this.queryObserver.next(e)},t.getInitialViewChanges=function(t){var e=[];return t.docs.forEach(function(t){e.push({type:Bn.Added,doc:t})}),e},t}(),Wn=function(){function t(t){var e=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=null,this.isDone=!1,this.callbackAttached=!1,t(function(t){e.isDone=!0,e.result=t,e.nextCallback&&e.nextCallback(t)},function(t){e.isDone=!0,e.error=t,e.catchCallback&&e.catchCallback(t)})}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.callbackAttached&&u("Called next() or catch() twice for PersistencePromise"),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t(function(t,i){r.nextCallback=function(n){r.wrapSuccess(e,n).next(t,i)},r.catchCallback=function(e){r.wrapFailure(n,e).next(t,i)}})},t.prototype.toPromise=function(){var t=this;return new Promise(function(e,n){t.next(e,n)})},t.prototype.wrapUserFunction=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.wrapSuccess=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.resolve(n)},t.prototype.wrapFailure=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.reject(n)},t.resolve=function(e){return new t(function(t,n){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.waitFor=function(e){return e.reduce(function(t,e,n){return t.next(function(){return e})},t.resolve())},t.map=function(e){var n=[],r=!0,i=t.resolve(null);return e.reduce(function(t,e){return t.next(function(t){return r||n.push(t),r=!1,e})},i).next(function(t){return n.push(t),n})},t}(),Hn=function(){function t(){this.isEager=!0,this.sources=[],this.potentialGarbage=et()}return t.prototype.addGarbageSource=function(t){this.sources.push(t),t.setGarbageCollector(this)},t.prototype.removeGarbageSource=function(t){this.sources.splice(this.sources.indexOf(t),1),t.setGarbageCollector(null)},t.prototype.addPotentialGarbageKey=function(t){this.potentialGarbage=this.potentialGarbage.add(t)},t.prototype.collectGarbage=function(t){var e=this,n=[],r=et();return this.potentialGarbage.forEach(function(i){var o=e.documentHasAnyReferences(t,i);n.push(o.next(function(t){return t||(r=r.add(i)),Wn.resolve()}))}),this.potentialGarbage=et(),Wn.waitFor(n).next(function(){return r})},t.prototype.documentHasAnyReferences=function(t,e){var n=Wn.resolve(!1);return this.sources.map(function(n){return function(){return n.containsKey(t,e)}}).reduce(function(t,e){return t.next(function(t){return t?Wn.resolve(!0):e()})},n)},t}(),zn=function(){function t(t,e,n){this.query=t,this.addedKeys=e,this.removedKeys=n}return t.fromSnapshot=function(e){for(var n=et(),r=et(),i=0,o=e.docChanges;i>Jn<=t?n|this.generatorId:(n|this.generatorId)-(1<=0,"Got negative number of retries for transaction.");var r=this.remoteStore.createTransaction();return function(){try{var e=t(r);return!Q(e)&&e.catch&&e.then?e.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(i){return r.commit().then(function(){return i}).catch(function(r){return 0===e?Promise.reject(r):n.runTransaction(t,e-1)})})},t.prototype.applyRemoteEvent=function(t){var e=this;return this.assertSubscribed("applyRemoteEvent()"),d(t.targetChanges,function(n,r){var i=e.limboKeysByTarget[n];i&&r.currentStatusUpdate===hn.MarkCurrent&&!t.documentUpdates.get(i)&&t.addDocumentUpdate(new ce(i,t.snapshotVersion))}),this.localStore.applyRemoteEvent(t).then(function(n){return e.emitNewSnapsAndNotifyLocalStore(n,t)})},t.prototype.rejectListen=function(t,e){var n=this;this.assertSubscribed("rejectListens()");var r=this.limboKeysByTarget[t];if(r){this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboKeysByTarget[t];var i=new he(se.comparator);i=i.insert(r,new ce(r,He.forDeletedDoc()));var o=new mn(He.MIN,{},i);return this.applyRemoteEvent(o)}var a=this.queryViewsByTarget[t];return c(!!a,"Unknown targetId: "+t),this.localStore.releaseQuery(a.query).then(function(){return n.removeAndCleanupQuery(a).then(function(){n.errorHandler(a.query,e)})})},t.prototype.applySuccessfulWrite=function(t){var e=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(t.batch.batchId,null),this.localStore.acknowledgeBatch(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.rejectFailedWrite=function(t,e){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(t,e),this.localStore.rejectBatch(t).then(function(t){return n.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.addMutationCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new he(L)),n=n.insert(t,e),this.mutationUserCallbacks[this.currentUser.toKey()]=n},t.prototype.processUserCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(t);r&&(c(t===n.minKey(),"Mutation callbacks processed out-of-order?"),e?r.reject(e):r.resolve(),n=n.remove(t)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},t.prototype.removeAndCleanupQuery=function(t){return this.queryViewsByQuery.delete(t.query),delete this.queryViewsByTarget[t.targetId],this.limboDocumentRefs.removeReferencesForId(t.targetId),this.gcLimboDocuments()},t.prototype.updateTrackedLimbos=function(t,e){for(var n=0,r=e;n0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0)},t.prototype.runTransaction=function(t,e,n){var r=new Nr(this.db,t,e),i=n(r).catch(function(t){return r.abort(),Wn.reject(t)}).toPromise();return r.completionPromise.then(function(){return i})},t.prototype.close=function(){this.db.close()},t}(),Sr=function(){function t(t){this.dbCursor=t,this.shouldStop=!1,this.nextKey=null}return Object.defineProperty(t.prototype,"isDone",{get:function(){return this.shouldStop},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipToKey",{get:function(){return this.nextKey},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.dbCursor=t},enumerable:!0,configurable:!0}),t.prototype.done=function(){this.shouldStop=!0},t.prototype.skip=function(t){this.nextKey=t},t.prototype.delete=function(){return pt(this.dbCursor.delete())},t}(),Nr=function(){function t(t,e,n){var r=this;this.aborted=!1,this.transaction=t.transaction(n,e),this.completionPromise=new Promise(function(t,e){r.transaction.onabort=r.transaction.oncomplete=function(e){t()},r.transaction.onerror=function(t){e(t.target.error)}})}return t.prototype.abort=function(){this.aborted||(o("SimpleDb","Aborting transaction."),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return c(!!e,"Object store not part of transaction: "+t),new Dr(e)},t}(),Dr=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(o("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(o("SimpleDb","PUT",this.store.name,"",t),n=this.store.put(t)),pt(n)},t.prototype.get=function(t){var e=this;return pt(this.store.get(t)).next(function(n){return void 0===n&&(n=null),o("SimpleDb","GET",e.store.name,t,n),n})},t.prototype.delete=function(t){return o("SimpleDb","DELETE",this.store.name,t),pt(this.store.delete(t))},t.prototype.loadAll=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.iterateCursor(n,function(t,e){r.push(e)}).next(function(){return r})},t.prototype.deleteAll=function(t,e){o("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,function(t,e,n){return n.delete()})},t.prototype.iterate=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.iterateCursor(r,e)},t.prototype.iterateCursor=function(t,e){var n=[];return new Wn(function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(!i)return void r();var o=new Sr(i),a=e(i.primaryKey,i.value,o);a instanceof Wn&&n.push(a),o.isDone?r():null===o.skipToKey?i.continue():i.continue(o.skipToKey)}}).next(function(){return Wn.waitFor(n)})},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:(c(void 0===e,"3rd argument must not be defined if 2nd is a range."),e=t)),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.keysOnly?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}(),Cr=function(){function t(t,e){this.userId=t,this.serializer=e,this.garbageCollector=null}return t.forUser=function(e,n){return c(""!==e.uid,"UserID must not be an empty string."),new t(e.isUnauthenticated()?"":e.uid,n)},t.prototype.start=function(e){var n=this;return t.loadNextBatchIdFromDb(e).next(function(t){return n.nextBatchId=t,gt(e).get(n.userId)}).next(function(t){return t||(t=new dr(n.userId,or,"")),n.metadata=t,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(e).next(function(t){return c(t,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=or,gt(e).put(n.metadata)}):Wn.resolve()})},t.loadNextBatchIdFromDb=function(t){var e=or;return yt(t).iterate({reverse:!0},function(t,n,r){var i=t[0];if(t[1]>e&&(e=n.batchId),""===i)r.done();else{var o=U(i);r.skip([o])}}).next(function(){return e+1})},t.prototype.checkEmpty=function(t){var e=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return yt(t).iterate({range:n},function(t,n,r){e=!1,r.done()}).next(function(){return e})},t.prototype.getNextBatchId=function(t){return Wn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return Wn.resolve(this.metadata.lastAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;return c(r>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=r,this.metadata.lastStreamToken=dt(n),gt(t).put(this.metadata)},t.prototype.getLastStreamToken=function(t){return Wn.resolve(this.metadata.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.metadata.lastStreamToken=dt(e),gt(t).put(this.metadata)},t.prototype.addMutationBatch=function(t,e,n){var r=this,i=this.nextBatchId;this.nextBatchId++;var o=new ar(i,e,n),a=this.serializer.toDbMutationBatch(this.userId,o);return yt(t).put(a).next(function(){for(var e=[],o=0,a=n;oe,"Should have found mutation after "+e),i=n.serializer.fromDbMutationBatch(r)),o.done()}).next(function(){return i})},t.prototype.getAllMutationBatches=function(t){var e=this,n=IDBKeyRange.bound(this.keyForBatchId(or),this.keyForBatchId(Number.POSITIVE_INFINITY));return yt(t).loadAll(n).next(function(t){return t.map(function(t){return e.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this,r=IDBKeyRange.bound(this.keyForBatchId(or),this.keyForBatchId(e));return yt(t).loadAll(r).next(function(t){return t.map(function(t){return n.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=mr.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return mt(t).iterate({range:i},function(r,i,a){var s=r[0],c=r[1],h=r[2],l=lt(c);if(s!==n.userId||!e.path.equals(l))return void a.done();var f=n.keyForBatchId(h);return yt(t).get(f).next(function(t){null===t&&u("Dangling document-mutation reference found: "+r+" which points to "+f),o.push(n.serializer.fromDbMutationBatch(t))})}).next(function(){return o})},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this;c(!e.isDocumentQuery(),"Document queries shouldn't go down this path");var r=e.path,i=r.length+1,o=mr.prefixForPath(this.userId,r),a=(o[1],IDBKeyRange.lowerBound(o)),s=new ln(L);return mt(t).iterate({range:a},function(t,e,o){var a=t[0],u=t[1],c=t[2],h=lt(u);if(a!==n.userId||!r.isPrefixOf(h))return void o.done();h.length===i&&(s=s.add(c))}).next(function(){var e=[],r=[];return s.forEach(function(i){var o=n.keyForBatchId(i);r.push(yt(t).get(o).next(function(t){null===t&&u("Dangling document-mutation reference found, which points to "+o),e.push(n.serializer.fromDbMutationBatch(t))}))}),Wn.waitFor(r).next(function(){return e})})},t.prototype.removeMutationBatches=function(t,e){for(var n=yt(t),r=mt(t),i=[],o=this,a=0,s=e;athis.metadata.highestTargetId?(this.metadata.highestTargetId=r,i.next(function(){return wt(t).put(Ir.key,n.metadata)})):i},t.prototype.removeQueryData=function(t,e){return this.removeMatchingKeysForTargetId(t,e.targetId).next(function(){bt(t).delete(e.targetId)})},t.prototype.getQueryData=function(t,e){var n=this,r=e.canonicalId(),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),o=null;return bt(t).iterate({range:i,index:br.queryTargetsIndexName},function(t,r,i){var a=n.serializer.fromDbTarget(r);e.equals(a.query)&&(o=a,i.done())}).next(function(){return o})},t.prototype.addMatchingKeys=function(t,e,n){var r=[],i=It(t);return e.forEach(function(t){var e=ut(t.path);r.push(i.put(new wr(n,e)))}),Wn.waitFor(r)},t.prototype.removeMatchingKeys=function(t,e,n){var r=this,i=[],o=It(t);return e.forEach(function(t){var e=ut(t.path);i.push(o.delete([n,e])),null!==r.garbageCollector&&r.garbageCollector.addPotentialGarbageKey(t)}),Wn.waitFor(i)},t.prototype.removeMatchingKeysForTargetId=function(t,e){var n=It(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return this.notifyGCForRemovedKeys(t,r).next(function(){return n.delete(r)})},t.prototype.notifyGCForRemovedKeys=function(t,e){var n=this,r=It(t);return null!==this.garbageCollector&&this.garbageCollector.isEager?r.iterate({range:e,keysOnly:!0},function(t,e,r){var i=lt(t[1]),o=new se(i);c(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(o)}):Wn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=It(t),i=et();return r.iterate({range:n,keysOnly:!0},function(t,e,n){var r=lt(t[1]),o=new se(r);i=i.add(o)}).next(function(){return i})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){c(null!==t,"Persistence Transaction cannot be null for query cache containsKey");var n=ut(e.path),r=IDBKeyRange.bound([n],[F(n)],!1,!0),i=0;return It(t).iterate({index:wr.documentTargetsIndex,keysOnly:!0,range:r},function(t,e,n){i++,n.done()}).next(function(){return i>0})},t}(),kr=function(){function t(t){this.serializer=t}return t.prototype.addEntry=function(t,e){return Et(t).put(St(e.key),this.serializer.toDbRemoteDocument(e))},t.prototype.removeEntry=function(t,e){return Et(t).delete(St(e))},t.prototype.getEntry=function(t,e){var n=this;return Et(t).get(St(e)).next(function(t){return t?n.serializer.fromDbRemoteDocument(t):null})},t.prototype.getDocumentsMatchingQuery=function(t,e){var n=this,r=$(),i=e.path.toArray(),o=IDBKeyRange.lowerBound(i);return Et(t).iterate({range:o},function(t,i,o){var a=n.serializer.fromDbRemoteDocument(i);e.path.isPrefixOf(a.key.path)?a instanceof ue&&e.matches(a)&&(r=r.insert(a.key,a)):o.done()}).next(function(){return r})},t}(),Rr=function(){function t(t){this.remoteSerializer=t}return t.prototype.fromDbRemoteDocument=function(t){if(t.document)return this.remoteSerializer.fromDocument(t.document);if(t.noDocument){var e=se.fromSegments(t.noDocument.path),n=t.noDocument.readTime,r=new We(n.seconds,n.nanos);return new ce(e,He.fromTimestamp(r))}return u("Unexpected DbRemoteDocument")},t.prototype.toDbRemoteDocument=function(t){if(t instanceof ue){var e=this.remoteSerializer.toDocument(t);return new vr(null,e)}var n=t.key.path.toArray(),r=t.version.toTimestamp(),i=new fr(r.seconds,r.nanos);return new vr(new gr(n,i),null)},t.prototype.toDbMutationBatch=function(t,e){var n=this,r=e.mutations.map(function(t){return n.remoteSerializer.toMutation(t)});return new yr(t,e.batchId,e.localWriteTime.toEpochMilliseconds(),r)},t.prototype.fromDbMutationBatch=function(t){var e=this,n=t.mutations.map(function(t){return e.remoteSerializer.fromMutation(t)}),r=We.fromEpochMilliseconds(t.localWriteTimeMs);return new ar(t.batchId,r,n)},t.prototype.fromDbTarget=function(t){var e,n=new We(t.readTime.seconds,t.readTime.nanos),r=He.fromTimestamp(n);return e=Nt(t.query)?this.remoteSerializer.fromDocumentsTarget(t.query):this.remoteSerializer.fromQueryTarget(t.query),new Xe(e,t.targetId,me.Listen,r,t.resumeToken)},t.prototype.toDbTarget=function(t){c(me.Listen===t.purpose,"Only queries with purpose "+me.Listen+" may be stored, got "+t.purpose);var e,n=t.snapshotVersion.toTimestamp(),r=new fr(n.seconds,n.nanos);e=t.query.isDocumentQuery()?this.remoteSerializer.toDocumentsTarget(t.query):this.remoteSerializer.toQueryTarget(t.query),c("string"==typeof t.resumeToken,"Persisting non-string resume token not supported.");var i=t.resumeToken;return new br(t.targetId,t.query.canonicalId(),r,i,0,e)},t}(),Or="There is another tab open with offline persistence enabled. Only one such tab is allowed at a time. The other tab must be closed or persistence must be disabled.",Mr=function(){function t(e,n){this.ownerId=this.generateOwnerId(),this.dbName=e+t.MAIN_DATABASE,this.serializer=new Rr(n),this.localStoragePrefix=e}return t.prototype.start=function(){var e=this;return t.isAvailable()?(c(!this.started,"IndexedDbPersistence double-started!"),this.started=!0,Er.openOrCreate(this.dbName,1,ft).then(function(t){e.simpleDb=t}).then(function(){return e.tryAcquireOwnerLease()}).then(function(){e.scheduleOwnerLeaseRefreshes(),e.attachWindowUnloadHook()})):(this.persistenceError=new zt(Ht.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled."),Promise.reject(this.persistenceError))},t.prototype.shutdown=function(){var t=this;return c(this.started,"IndexedDbPersistence shutdown without start!"),this.started=!1,this.detachWindowUnloadHook(),this.stopOwnerLeaseRefreshes(),this.releaseOwnerLease().then(function(){t.simpleDb.close()})},t.prototype.getMutationQueue=function(t){return Cr.forUser(t,this.serializer)},t.prototype.getQueryCache=function(){return new Ar(this.serializer)},t.prototype.getRemoteDocumentCache=function(){return new kr(this.serializer)},t.prototype.runTransaction=function(t,e){var n=this;return this.persistenceError?Promise.reject(this.persistenceError):(o("IndexedDbPersistence","Starting transaction:",t),this.simpleDb.runTransaction("readwrite",Tr,function(t){return n.ensureOwnerLease(t).next(function(){return e(t)})}))},t.isAvailable=function(){return Er.isAvailable()},t.buildStoragePrefix=function(t){var e=t.databaseId.projectId;return t.databaseId.isDefaultDatabase||(e+="."+t.databaseId.database),"firestore/"+t.persistenceKey+"/"+e+"/"},t.prototype.tryAcquireOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[pr.store],function(e){var n=e.store(pr.store);return n.get("owner").next(function(e){if(t.validOwner(e))return o("IndexedDbPersistence","Valid owner already. Failing. Current owner:",e),t.persistenceError=new zt(Ht.FAILED_PRECONDITION,Or),Wn.reject(t.persistenceError);var r=new pr(t.ownerId,Date.now());return o("IndexedDbPersistence","No valid owner. Acquiring owner lease. Current owner:",e,"New owner:",r),n.put("owner",r)})})},t.prototype.releaseOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[pr.store],function(e){var n=e.store(pr.store);return n.get("owner").next(function(e){return null!==e&&e.ownerId===t.ownerId?(o("IndexedDbPersistence","Releasing owner lease."),n.delete("owner")):Wn.resolve()})})},t.prototype.ensureOwnerLease=function(t){var e=this;return t.store(pr.store).get("owner").next(function(t){return null===t||t.ownerId!==e.ownerId?(e.persistenceError=new zt(Ht.FAILED_PRECONDITION,Or),Wn.reject(e.persistenceError)):Wn.resolve()})},t.prototype.validOwner=function(t){var e=Date.now(),n=e-5e3,r=e;return!(null===t||t.leaseTimestampMsr?(a("Persistence owner-lease is in the future. Discarding.",t),1):t.ownerId===this.getZombiedOwnerId()))},t.prototype.scheduleOwnerLeaseRefreshes=function(){var t=this;this.ownerLeaseRefreshHandle=setInterval(function(){t.runTransaction("Refresh owner timestamp",function(e){return e.store(pr.store).put("owner",new pr(t.ownerId,Date.now()))}).catch(function(e){a(e),t.stopOwnerLeaseRefreshes()})},4e3)},t.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},t.prototype.attachWindowUnloadHook=function(){var t=this;this.windowUnloadHandler=function(){t.setZombiedOwnerId(t.ownerId),t.shutdown()},window.addEventListener("unload",this.windowUnloadHandler)},t.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},t.prototype.getZombiedOwnerId=function(){try{var t=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return o("IndexedDbPersistence","Zombied ownerID from LocalStorage:",t),t}catch(t){return a("IndexedDbPersistence","Failed to get zombie owner id.",t),null}},t.prototype.setZombiedOwnerId=function(t){try{null===t?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),t)}catch(t){a("IndexedDbPersistence","Failed to set zombie owner id.",t)}},t.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},t.prototype.generateOwnerId=function(){return Xt.newId()},t.MAIN_DATABASE="main",t}(),_r=function(){function t(t,e){this.remoteDocumentCache=t,this.mutationQueue=e}return t.prototype.getDocument=function(t,e){var n=this;return this.remoteDocumentCache.getEntry(t,e).next(function(r){return n.computeLocalDocument(t,e,r)})},t.prototype.getDocuments=function(t,e){var n=this,r=[],i=Z();return e.forEach(function(e){r.push(n.getDocument(t,e).next(function(t){t||(t=new ce(e,He.forDeletedDoc())),i=i.insert(e,t)}))}),Wn.waitFor(r).next(function(){return i})},t.prototype.getDocumentsMatchingQuery=function(t,e){return se.isDocumentKey(e.path)?this.getDocumentsMatchingDocumentQuery(t,e.path):this.getDocumentsMatchingCollectionQuery(t,e)},t.prototype.getDocumentsMatchingDocumentQuery=function(t,e){return this.getDocument(t,new se(e)).next(function(t){var e=$();return t instanceof ue&&(e=e.insert(t.key,t)),e})},t.prototype.getDocumentsMatchingCollectionQuery=function(t,e){var n,r=this;return this.remoteDocumentCache.getDocumentsMatchingQuery(t,e).next(function(e){return r.computeLocalDocuments(t,e)}).next(function(i){return n=i,r.mutationQueue.getAllMutationBatchesAffectingQuery(t,e)}).next(function(e){for(var i=et(),o=0,a=e;o0?e.mutationQueue.removeMutationBatches(t,n):Wn.resolve()})},t.prototype.localWrite=function(t){var e=this;return this.persistence.runTransaction("Locally write mutations",function(n){var r,i=We.now();return e.mutationQueue.addMutationBatch(n,i,t).next(function(t){r=t;var i=r.keys();return e.localDocuments.getDocuments(n,i)}).next(function(t){return{batchId:r.batchId,changes:t}})})},t.prototype.acknowledgeBatch=function(t){var e=this;return this.persistence.runTransaction("Acknowledge batch",function(n){var r;return e.mutationQueue.acknowledgeBatch(n,t.batch,t.streamToken).next(function(){if(e.shouldHoldBatchResult(t.commitVersion))return e.heldBatchResults.push(t),r=et(),Wn.resolve();var i=new Pr(e.remoteDocuments);return e.releaseBatchResults(n,[t],i).next(function(t){return r=t,i.apply(n)})}).next(function(){return e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,r)})})},t.prototype.rejectBatch=function(t){var e=this;return this.persistence.runTransaction("Reject batch",function(n){var r,i;return e.mutationQueue.lookupMutationBatch(n,t).next(function(i){return c(null!=i,"Attempt to reject nonexistent batch!"),r=i,e.mutationQueue.getHighestAcknowledgedBatchId(n).next(function(e){return c(t>e,"Acknowledged batches can't be rejected."),r})}).next(function(){return e.removeMutationBatch(n,r)}).next(function(t){return i=t,e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,i)})})},t.prototype.getLastStreamToken=function(){var t=this;return this.persistence.runTransaction("Get last stream token",function(e){return t.mutationQueue.getLastStreamToken(e)})},t.prototype.setLastStreamToken=function(t){var e=this;return this.persistence.runTransaction("Set last stream token",function(n){return e.mutationQueue.setLastStreamToken(n,t)})},t.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},t.prototype.applyRemoteEvent=function(t){var e=this,n=new Pr(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(r){var i=[];d(t.targetChanges,function(t,n){var o=e.targetIds[t];if(o){var a=n.mapping;if(a)if(a instanceof bn)i.push(e.queryCache.removeMatchingKeysForTargetId(r,t).next(function(){return e.queryCache.addMatchingKeys(r,a.documents,t)}));else{if(!(a instanceof wn))return u("Unknown mapping type: "+JSON.stringify(a));i.push(e.queryCache.removeMatchingKeys(r,a.removedDocuments,t).next(function(){return e.queryCache.addMatchingKeys(r,a.addedDocuments,t)}))}var s=n.resumeToken;s.length>0&&(o=o.update({resumeToken:s,snapshotVersion:n.snapshotVersion}),e.targetIds[t]=o,i.push(e.queryCache.addQueryData(r,o)))}});var a=et();t.documentUpdates.forEach(function(t,s){a=a.add(t),i.push(n.getEntry(r,t).next(function(r){null==r||s.version.equals(He.MIN)||s.version.compareTo(r.version)>=0?n.addEntry(s):o("LocalStore","Ignoring outdated watch update for ",t,". Current version:",r.version," Watch version:",s.version),e.garbageCollector.addPotentialGarbageKey(t)}))});var s=e.queryCache.getLastRemoteSnapshotVersion(),h=t.snapshotVersion;h.equals(He.MIN)||(c(h.compareTo(s)>=0,"Watch stream reverted to previous snapshot?? "+h+" < "+s),i.push(e.queryCache.setLastRemoteSnapshotVersion(r,h)));var l;return Wn.waitFor(i).next(function(){return e.releaseHeldBatchResults(r,n)}).next(function(t){return l=t,n.apply(r)}).next(function(){return e.localDocuments.getDocuments(r,a.unionWith(l))})})},t.prototype.notifyLocalViewChanges=function(t){var e=this;return this.persistence.runTransaction("Notify local view changes",function(n){for(var r=[],i=0,o=t;i0},t.prototype.releaseBatchResults=function(t,e,n){for(var r=this,i=Wn.resolve(),o=0,a=e;othis.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var i=this.indexOfExistingBatchId(r,"acknowledged"),o=this.mutationQueue[i];return c(r===o.batchId,"Queue ordering failure: expected batch "+r+", got batch "+o.batchId),c(!o.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=r,this.lastStreamToken=n,Wn.resolve()},t.prototype.getLastStreamToken=function(t){return Wn.resolve(this.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.lastStreamToken=e,Wn.resolve()},t.prototype.addMutationBatch=function(t,e,n){c(0!==n.length,"Mutation batches should not be empty");var r=this.nextBatchId;this.nextBatchId++,this.mutationQueue.length>0&&c(this.mutationQueue[this.mutationQueue.length-1].batchId=n?r=n:r++,Wn.resolve(this.getAllLiveMutationBatchesBeforeIndex(r))},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=new Yn(e,0),i=new Yn(e,Number.POSITIVE_INFINITY),o=[];return this.batchesByDocumentKey.forEachInRange([r,i],function(t){c(e.equals(t.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(t.targetOrBatchId);c(null!==r,"Batches in the index must exist in the main table"),o.push(r)}),Wn.resolve(o)},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this,r=e.path,i=r.length+1,o=r;se.isDocumentKey(o)||(o=o.child(""));var a=new Yn(new se(o),0),s=new ln(L);this.batchesByDocumentKey.forEachWhile(function(t){var e=t.key.path;return!!r.isPrefixOf(e)&&(e.length===i&&(s=s.add(t.targetOrBatchId)),!0)},a);var u=[];return s.forEach(function(t){var e=n.findMutationBatch(t);null!==e&&u.push(e)}),Wn.resolve(u)},t.prototype.removeMutationBatches=function(t,e){var n=e.length;c(n>0,"Should not remove mutations when none exist.");var r=e[0].batchId,i=this.mutationQueue.length,o=this.indexOfExistingBatchId(r,"removed");c(this.mutationQueue[o].batchId===r,"Removed batches must exist in the queue");for(var a=1,s=o+1;a=0&&n=this.mutationQueue.length)return null;var n=this.mutationQueue[e];return c(n.batchId===t,"If found batch must match"),n.isTombstone()?null:n},t}(),Br=function(){function t(){this.queries=new jn(function(t){return t.canonicalId()}),this.lastRemoteSnapshotVersion=He.MIN,this.highestTargetId=0,this.references=new Xn}return t.prototype.start=function(t){return Wn.resolve()},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.getHighestTargetId=function(){return this.highestTargetId},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,Wn.resolve()},t.prototype.addQueryData=function(t,e){this.queries.set(e.query,e);var n=e.targetId;return n>this.highestTargetId&&(this.highestTargetId=n),Wn.resolve()},t.prototype.removeQueryData=function(t,e){return this.queries.delete(e.query),this.references.removeReferencesForId(e.targetId),Wn.resolve()},t.prototype.getQueryData=function(t,e){var n=this.queries.get(e)||null;return Wn.resolve(n)},t.prototype.addMatchingKeys=function(t,e,n){return this.references.addReferences(e,n),Wn.resolve()},t.prototype.removeMatchingKeys=function(t,e,n){return this.references.removeReferences(e,n),Wn.resolve()},t.prototype.removeMatchingKeysForTargetId=function(t,e){return this.references.removeReferencesForId(e),Wn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=this.references.referencesForId(e);return Wn.resolve(n)},t.prototype.setGarbageCollector=function(t){this.references.setGarbageCollector(t)},t.prototype.containsKey=function(t,e){return this.references.containsKey(t,e)},t}(),Ur=function(){function t(){this.docs=Z()}return t.prototype.addEntry=function(t,e){return this.docs=this.docs.insert(e.key,e),Wn.resolve()},t.prototype.removeEntry=function(t,e){return this.docs=this.docs.remove(e),Wn.resolve()},t.prototype.getEntry=function(t,e){return Wn.resolve(this.docs.get(e))},t.prototype.getDocumentsMatchingQuery=function(t,e){for(var n=$(),r=new se(e.path.child("")),i=this.docs.getIteratorFrom(r);i.hasNext();){var o=i.getNext(),a=o.key,s=o.value;if(!e.path.isPrefixOf(a.path))break;s instanceof ue&&e.matches(s)&&(n=n.insert(s.key,s))}return Wn.resolve(n)},t}(),Fr=function(){function t(){this.mutationQueues={},this.remoteDocumentCache=new Ur,this.queryCache=new Br,this.started=!1}return t.prototype.start=function(){return c(!this.started,"MemoryPersistence double-started!"),this.started=!0,Promise.resolve()},t.prototype.shutdown=function(){return c(this.started,"MemoryPersistence shutdown without start!"),this.started=!1,Promise.resolve()},t.prototype.getMutationQueue=function(t){var e=this.mutationQueues[t.toKey()];return e||(e=new xr,this.mutationQueues[t.toKey()]=e),e},t.prototype.getQueryCache=function(){return this.queryCache},t.prototype.getRemoteDocumentCache=function(){return this.remoteDocumentCache},t.prototype.runTransaction=function(t,e){return o("MemoryPersistence","Starting transaction:",t),e(new Vr).toPromise()},t}(),Vr=function(){function t(){}return t}(),qr=function(){function t(){this.isEager=!1}return t.prototype.addGarbageSource=function(t){},t.prototype.removeGarbageSource=function(t){},t.prototype.addPotentialGarbageKey=function(t){},t.prototype.collectGarbage=function(t){return Wn.resolve(et())},t}(),jr=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t}(),Kr=function(){function t(t,e,n){this.initialDelayMs=t,this.backoffFactor=e,this.maxDelayMs=n,this.reset()}return t.prototype.reset=function(){this.currentBaseMs=0},t.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},t.prototype.backoffAndWait=function(){var t=new jr,e=this.currentBaseMs+this.jitterDelayMs();return this.currentBaseMs>0&&o("ExponentialBackoff","Backing off for "+e+" ms (base delay: "+this.currentBaseMs+" ms)"),setTimeout(function(){t.resolve()},e),this.currentBaseMs*=this.backoffFactor,this.currentBaseMsthis.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs),t.promise},t.prototype.jitterDelayMs=function(){return(Math.random()-.5)*this.currentBaseMs},t}(),Qr=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Initial=0]="Initial",t[t.Auth=1]="Auth",t[t.Open=2]="Open",t[t.Error=3]="Error",t[t.Backoff=4]="Backoff",t[t.Stopped=5]="Stopped"}(Zn||(Zn={}));var Gr,Wr=1e3,Hr=6e4,zr=1.5,Xr=function(){function t(t,e,n,r,i){this.queue=t,this.connection=e,this.credentialsProvider=n,this.stream=null,this.listener=null,this.backoff=new Kr(i||Wr,zr,Hr),this.state=Zn.Initial,this.listener=r}return t.prototype.isStarted=function(){return this.state===Zn.Backoff||this.state===Zn.Auth||this.state===Zn.Open},t.prototype.isOpen=function(){return this.state===Zn.Open},t.prototype.start=function(){if(this.state===Zn.Error)return void this.performBackoff();c(this.state===Zn.Initial,"Already started"),this.auth()},t.prototype.stop=function(){this.state=Zn.Stopped,this.listener=null,null!==this.stream&&(this.stream.close(),this.stream=null)},t.prototype.inhibitBackoff=function(){c(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=Zn.Initial,this.backoff.reset()},t.prototype.auth=function(){var t=this;c(this.state===Zn.Initial,"Must be in initial state to auth"),this.state=Zn.Auth,this.credentialsProvider.getToken(!1).then(function(e){t.startStream(e)},function(e){t.queue.schedule(function(){if(t.state!==Zn.Stopped){var n=new zt(Ht.UNKNOWN,"Fetching auth token failed: "+e.message);return t.handleStreamClose(n)}return Promise.resolve()})})},t.prototype.startStream=function(t){var e=this;if(this.state!==Zn.Stopped){c(this.state===Zn.Auth,"Trying to start stream in a non-auth state");var n=function(t){e.queue.schedule(function(){return e.state!==Zn.Stopped?t():Promise.resolve()})};null!==this.listener&&(this.stream=this.startRpc(t),this.stream.onOpen(function(){n(function(){return c(e.state===Zn.Auth,"Expected stream to be in state auth, but was "+e.state),e.state=Zn.Open,e.listener.onOpen()})}),this.stream.onClose(function(t){n(function(){return e.handleStreamClose(t)})}),this.stream.onMessage(function(t){n(function(){return e.onMessage(t)})}))}},t.prototype.performBackoff=function(){var t=this;c(this.state===Zn.Error,"Should only perform backoff in an error case"),this.state=Zn.Backoff,this.backoff.backoffAndWait().then(function(){t.queue.schedule(function(){return t.state===Zn.Stopped?Promise.resolve():(t.state=Zn.Initial,t.start(),c(t.isStarted(),"PersistentStream should have started"),Promise.resolve())})})},t.prototype.handleStreamClose=function(t){return c(this.isStarted(),"Can't handle server close on non-started stream"),o("PersistentStream","close with error: "+t),this.stream=null,this.state=Zn.Error,t&&t.code===Ht.RESOURCE_EXHAUSTED&&(o("PersistentStream","Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()),this.listener.onClose(t)},t}(),Yr=function(t){function e(e,n,r,i,o,a,s){var u=t.call(this,n,r,i,a,s)||this;return u.databaseInfo=e,u.serializer=o,u}return Qr(e,t),e.prototype.startRpc=function(t){return this.connection.openStream("Listen",t)},e.prototype.onMessage=function(t){this.backoff.reset();var e=this.serializer.fromWatchChange(t),n=this.serializer.versionFromListenResponse(t);return this.listener.onWatchChange(e,n)},e.prototype.watch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.addTarget=this.serializer.toTarget(t);var n=this.serializer.toListenRequestLabels(t);n&&(e.labels=n),this.stream.send(e)},e.prototype.unwatch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.removeTarget=t,this.stream.send(e)},e}(Xr),Jr=function(t){function e(e,n,r,i,o,a,s){var u=t.call(this,n,r,i,a,s)||this;return u.databaseInfo=e,u.serializer=o,u.y=!1,u}return Qr(e,t),Object.defineProperty(e.prototype,"handshakeComplete",{get:function(){return this.y},enumerable:!0,configurable:!0}),e.prototype.start=function(){this.y=!1,t.prototype.start.call(this)},e.prototype.startRpc=function(t){return this.connection.openStream("Write",t)},e.prototype.onMessage=function(t){if(c(!!t.streamToken,"Got a write response without a stream token"),this.lastStreamToken=t.streamToken,this.y){this.backoff.reset();var e=this.serializer.fromWriteResults(t.writeResults),n=this.serializer.fromVersion(t.commitTime);return this.listener.onMutationResult(n,e)}return c(!t.writeResults||0===t.writeResults.length,"Got mutation results for handshake"),this.y=!0,this.listener.onHandshakeComplete()},e.prototype.writeHandshake=function(){c(this.isOpen(),"Writing handshake requires an opened stream"),c(!this.y,"Handshake already completed");var t={};t.database=this.serializer.encodedDatabaseId,this.stream.send(t)},e.prototype.writeMutations=function(t){var e=this;c(this.isOpen(),"Writing mutations requires an opened stream"),c(this.y,"Handshake must be complete before writing mutations"),c(this.lastStreamToken.length>0,"Trying to write mutation without a token");var n={streamToken:this.lastStreamToken,writes:t.map(function(t){return e.serializer.toMutation(t)})};this.stream.send(n)},e}(Xr),Zr=function(){function t(t,e,n,r,i,o){this.databaseInfo=t,this.queue=e,this.connection=n,this.credentials=r,this.serializer=i,this.initialBackoffDelay=o}return t.prototype.newPersistentWriteStream=function(t){return new Jr(this.databaseInfo,this.queue,this.connection,this.credentials,this.serializer,t,this.initialBackoffDelay)},t.prototype.newPersistentWatchStream=function(t){return new Yr(this.databaseInfo,this.queue,this.connection,this.credentials,this.serializer,t,this.initialBackoffDelay)},t.prototype.commit=function(t){var e=this,n={writes:t.map(function(t){return e.serializer.toMutation(t)})};return this.invokeRPC("commit",n).then(function(t){return e.serializer.fromWriteResults(t.writeResults)})},t.prototype.lookup=function(t){var e=this,n={documents:t.map(function(t){return e.serializer.toName(t)})};return this.invokeRPC("batchGet",n).then(function(n){var r=Z();n.forEach(function(t){var n=e.serializer.fromMaybeDocument(t);r=r.insert(n.key,n)});var i=[];return t.forEach(function(t){var e=r.get(t);c(!!e,"Missing entity in write response for "+t),i.push(e)}),i})},t.prototype.invokeRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invoke(t,e,r)})},t}(),$r=function(){function t(t){this.datastore=t,this.readVersions=tt(),this.mutations=[],this.committed=!1}return t.prototype.recordVersion=function(t){var e=t.version;t instanceof ce&&(e=He.forDeletedDoc());var n=this.readVersions.get(t.key);if(null!==n){if(!e.equals(n))throw new zt(Ht.ABORTED,"Document version changed between two reads.")}else this.readVersions=this.readVersions.insert(t.key,e)},t.prototype.lookup=function(t){var e=this;return this.committed?Promise.reject("Transaction has already completed."):this.mutations.length>0?Promise.reject("Transactions lookups are invalid after writes."):this.datastore.lookup(t).then(function(t){return t.forEach(function(t){return e.recordVersion(t)}),t})},t.prototype.write=function(t){if(this.committed)throw new zt(Ht.FAILED_PRECONDITION,"Transaction has already completed.");this.mutations=this.mutations.concat(t)},t.prototype.precondition=function(t){var e=this.readVersions.get(t);return e?nn.updateTime(e):nn.NONE},t.prototype.preconditionForUpdate=function(t){var e=this.readVersions.get(t);if(e&&e.equals(He.forDeletedDoc()))throw new zt(Ht.FAILED_PRECONDITION,"Can't update a document that doesn't exist.");return e?nn.updateTime(e):nn.exists(!0)},t.prototype.set=function(t,e){this.write(e.toMutations(t,this.precondition(t)))},t.prototype.update=function(t,e){this.write(e.toMutations(t,this.preconditionForUpdate(t)))},t.prototype.delete=function(t){this.write([new un(t,this.precondition(t))]),this.readVersions=this.readVersions.insert(t,He.forDeletedDoc())},t.prototype.commit=function(){var t=this,e=this.readVersions;return this.mutations.forEach(function(t){e=e.remove(t.key)}),e.isEmpty()?this.datastore.commit(this.mutations).then(function(){t.committed=!0}):Promise.reject(Error("Every document read in a transaction must also be written."))},t}(),ti=function(){function t(t,e,n,r,i){this.databaseInfo=t,this.asyncQueue=e,this.localStore=n,this.datastore=r,this.onlineStateHandler=i,this.pendingWrites=[],this.lastBatchSeen=or,this.listenTargets={},this.pendingTargetResponses={},this.accumulatedWatchChanges=[],this.watchStream=null,this.writeStream=null,this.watchStreamOnlineState=Pn.Unknown,this.watchStreamFailures=0}return t.prototype.start=function(){return this.enableNetwork()},t.prototype.setOnlineStateToHealthy=function(){this.updateAndBroadcastOnlineState(Pn.Healthy)},t.prototype.setOnlineStateToUnknown=function(){this.watchStreamFailures=0,this.updateAndBroadcastOnlineState(Pn.Unknown)},t.prototype.updateOnlineStateAfterFailure=function(){this.watchStreamOnlineState===Pn.Healthy?this.setOnlineStateToUnknown():++this.watchStreamFailures>=2&&this.updateAndBroadcastOnlineState(Pn.Failed)},t.prototype.updateAndBroadcastOnlineState=function(t){var e=this.watchStreamOnlineState!==t;this.watchStreamOnlineState=t,e&&this.onlineStateHandler(t)},t.prototype.isNetworkEnabled=function(){return c(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},t.prototype.enableNetwork=function(){var t=this;return c(null==this.watchStream,"enableNetwork() called with non-null watchStream."),c(null==this.writeStream,"enableNetwork() called with non-null writeStream."),this.watchStream=this.datastore.newPersistentWatchStream({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.writeStream=this.datastore.newPersistentWriteStream({onOpen:this.onWriteStreamOpen.bind(this),onClose:this.onWriteStreamClose.bind(this),onHandshakeComplete:this.onWriteHandshakeComplete.bind(this),onMutationResult:this.onMutationResult.bind(this)}),this.localStore.getLastStreamToken().then(function(e){return t.writeStream.lastStreamToken=e,t.shouldStartWatchStream()&&t.startWatchStream(),t.updateAndBroadcastOnlineState(Pn.Unknown),t.fillWritePipeline()})},t.prototype.disableNetwork=function(){return this.updateAndBroadcastOnlineState(Pn.Failed),this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null,Promise.resolve()},t.prototype.shutdown=function(){return o("RemoteStore","RemoteStore shutting down."),this.disableNetwork(),Promise.resolve(void 0)},t.prototype.listen=function(t){c(!f(this.listenTargets,t.targetId),"listen called with duplicate targetId!"),this.listenTargets[t.targetId]=t,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(t)},t.prototype.unlisten=function(t){c(f(this.listenTargets,t),"unlisten called without assigned target ID!"),this.listenTargets[t],delete this.listenTargets[t],this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendUnwatchRequest(t)},t.prototype.sendWatchRequest=function(t){this.recordPendingTargetRequest(t.targetId),this.watchStream.watch(t)},t.prototype.sendUnwatchRequest=function(t){this.recordPendingTargetRequest(t),this.watchStream.unwatch(t)},t.prototype.recordPendingTargetRequest=function(t){this.pendingTargetResponses[t]=(this.pendingTargetResponses[t]||0)+1},t.prototype.startWatchStream=function(){c(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchStream.start()},t.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!m(this.listenTargets)},t.prototype.cleanUpWatchStreamState=function(){this.accumulatedWatchChanges=[],this.pendingTargetResponses={}},t.prototype.onWatchStreamOpen=function(){var t=this;return d(this.listenTargets,function(e,n){t.sendWatchRequest(n)}),Promise.resolve()},t.prototype.onWatchStreamClose=function(t){return c(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(this.updateOnlineStateAfterFailure(),this.startWatchStream()):this.setOnlineStateToUnknown(),Promise.resolve()},t.prototype.onWatchStreamChange=function(t,e){if(this.setOnlineStateToHealthy(),t instanceof En&&t.state===gn.Removed&&t.cause)return this.handleTargetError(t);if(this.accumulatedWatchChanges.push(t),!e.equals(He.MIN)&&e.compareTo(this.localStore.getLastRemoteSnapshotVersion())>=0){var n=this.accumulatedWatchChanges;return this.accumulatedWatchChanges=[],this.handleWatchChangeBatch(e,n)}return Promise.resolve()},t.prototype.handleWatchChangeBatch=function(t,e){var n=this,r=new Sn(t,this.listenTargets,this.pendingTargetResponses);r.addChanges(e);var i=r.createRemoteEvent();this.pendingTargetResponses=r.pendingTargetResponses;var o=[];return d(r.existenceFilters,function(e,r){var a=n.listenTargets[e];if(a){var s=a.query;if(s.isDocumentQuery())if(0===r.count){var u=new se(s.path),h=new ce(u,t);i.addDocumentUpdate(h)}else c(1===r.count,"Single document existence filter with count: "+r.count);else{var l=n.localStore.remoteDocumentKeys(e).then(function(t){if(i.targetChanges[e]){var o=i.targetChanges[e].mapping;null!==o&&(o instanceof wn?t=o.applyToKeySet(t):(c(o instanceof bn,"Expected either reset or update mapping but got something else: "+o),t=o.documents))}if(t.size!==r.count){i.handleExistenceFilterMismatch(e);var u=new Xe(s,e,a.purpose);n.listenTargets[e]=u,n.sendUnwatchRequest(e);var h=new Xe(s,e,me.ExistenceFilterMismatch);n.sendWatchRequest(h)}});o.push(l)}}}),Promise.all(o).then(function(){return d(i.targetChanges,function(t,e){if(e.resumeToken.length>0){var r=n.listenTargets[t];r&&(n.listenTargets[t]=r.update({resumeToken:e.resumeToken,snapshotVersion:e.snapshotVersion}))}}),n.syncEngine.applyRemoteEvent(i)})},t.prototype.handleTargetError=function(t){var e=this;c(!!t.cause,"Handling target error without a cause");var n=t.cause,r=Promise.resolve();return t.targetIds.forEach(function(t){r=r.then(function(){return f(e.listenTargets,t)?(delete e.listenTargets[t],e.syncEngine.rejectListen(t,n)):Promise.resolve()})}),r},t.prototype.cleanUpWriteStreamState=function(){this.lastBatchSeen=or,this.pendingWrites=[]},t.prototype.fillWritePipeline=function(){var t=this;return this.canWriteMutations()?this.localStore.nextMutationBatch(this.lastBatchSeen).then(function(e){return null===e?Promise.resolve():(t.commit(e),t.fillWritePipeline())}):Promise.resolve()},t.prototype.canWriteMutations=function(){return this.isNetworkEnabled()&&this.pendingWrites.length<10},t.prototype.outstandingWrites=function(){return this.pendingWrites.length},t.prototype.commit=function(t){c(this.canWriteMutations(),"commit called when batches can't be written"),this.lastBatchSeen=t.batchId,this.pendingWrites.push(t),this.shouldStartWriteStream()?this.startWriteStream():this.isNetworkEnabled()&&this.writeStream.handshakeComplete&&this.writeStream.writeMutations(t.mutations)},t.prototype.shouldStartWriteStream=function(){return this.isNetworkEnabled()&&!this.writeStream.isStarted()&&this.pendingWrites.length>0},t.prototype.startWriteStream=function(){c(this.shouldStartWriteStream(),"startWriteStream() called when shouldStartWriteStream() is false."),this.writeStream.start()},t.prototype.onWriteStreamOpen=function(){return this.writeStream.writeHandshake(),Promise.resolve()},t.prototype.onWriteHandshakeComplete=function(){var t=this;return this.localStore.setLastStreamToken(this.writeStream.lastStreamToken).then(function(){for(var e=0,n=t.pendingWrites;e0,"Got result for empty pending writes");var r=this.pendingWrites.shift(),i=sr.from(r,t,e,this.writeStream.lastStreamToken);return this.syncEngine.applySuccessfulWrite(i).then(function(){return n.fillWritePipeline()})},t.prototype.onWriteStreamClose=function(t){var e=this;if(c(this.isNetworkEnabled(),"onWriteStreamClose() should only be called when the network is enabled"),this.pendingWrites.length>0){c(!!t,"We have pending writes, but the write stream closed without an error");var n=void 0;return n=this.writeStream.handshakeComplete?this.handleWriteError(t):this.handleHandshakeError(t),n.then(function(){e.shouldStartWriteStream()&&e.startWriteStream()})}return Promise.resolve()},t.prototype.handleHandshakeError=function(t){return H(t.code)||t.code===Ht.ABORTED?(o("RemoteStore","RemoteStore error before completed handshake; resetting stream token: ",this.writeStream.lastStreamToken),this.writeStream.lastStreamToken=h(),this.localStore.setLastStreamToken(h())):Promise.resolve()},t.prototype.handleWriteError=function(t){var e=this;if(H(t.code)){var n=this.pendingWrites.shift();return this.writeStream.inhibitBackoff(),this.syncEngine.rejectFailedWrite(n.batchId,t).then(function(){return e.fillWritePipeline()})}return Promise.resolve()},t.prototype.createTransaction=function(){return new $r(this.datastore)},t.prototype.handleUserChange=function(t){return o("RemoteStore","RemoteStore changing users: uid=",t.uid),this.disableNetwork(),this.enableNetwork()},t}(),ei=function(){function t(t,e,n,r){this.platform=t,this.databaseInfo=e,this.credentials=n,this.asyncQueue=r}return t.prototype.start=function(t){var e=this,n=new jr,r=new jr,i=!1;return this.credentials.setUserChangeListener(function(o){i?e.asyncQueue.schedule(function(){return e.handleUserChange(o)}):(i=!0,e.initializePersistence(t,r).then(function(){return e.initializeRest(o)}).then(n.resolve,n.reject))}),this.asyncQueue.schedule(function(){return n.promise}),r.promise},t.prototype.enableNetwork=function(){var t=this;return this.asyncQueue.schedule(function(){return t.remoteStore.enableNetwork()})},t.prototype.initializePersistence=function(t,e){var n=this;return t?this.startIndexedDbPersistence().then(e.resolve).catch(function(t){return e.reject(t),n.canFallback(t)?(console.warn("Error enabling offline storage. Falling back to storage disabled: "+t),n.startMemoryPersistence()):Promise.reject(t)}):(e.resolve(),this.startMemoryPersistence())},t.prototype.canFallback=function(t){return t.code===Ht.FAILED_PRECONDITION||t.code===Ht.UNIMPLEMENTED},t.prototype.startIndexedDbPersistence=function(){this.garbageCollector=new qr;var t=Mr.buildStoragePrefix(this.databaseInfo),e=new Cn(this.databaseInfo.databaseId,{useProto3Json:!0});return this.persistence=new Mr(t,e),this.persistence.start()},t.prototype.startMemoryPersistence=function(){return this.garbageCollector=new Hn,this.persistence=new Fr,this.persistence.start()},t.prototype.initializeRest=function(t){var e=this;return this.platform.loadConnection(this.databaseInfo).then(function(n){e.localStore=new Lr(e.persistence,t,e.garbageCollector);var r=e.platform.newSerializer(e.databaseInfo.databaseId),i=new Zr(e.databaseInfo,e.asyncQueue,n,e.credentials,r),o=function(t){e.eventMgr.onOnlineStateChanged(t)};return e.remoteStore=new ti(e.databaseInfo,e.asyncQueue,e.localStore,i,o),e.syncEngine=new ir(e.localStore,e.remoteStore,t),e.remoteStore.syncEngine=e.syncEngine,e.eventMgr=new Qn(e.syncEngine),e.localStore.start()}).then(function(){return e.remoteStore.start()})},t.prototype.handleUserChange=function(t){return this.asyncQueue.verifyOperationInProgress(),o("FirestoreClient","User Changed: "+t.uid),this.syncEngine.handleUserChange(t)},t.prototype.disableNetwork=function(){var t=this;return this.asyncQueue.schedule(function(){return t.remoteStore.disableNetwork()})},t.prototype.shutdown=function(){var t=this;return this.asyncQueue.schedule(function(){return t.credentials.removeUserChangeListener(),t.remoteStore.shutdown()}).then(function(){return t.persistence.shutdown()})},t.prototype.listen=function(t,e,n){var r=this,i=new Gn(t,e,n);return this.asyncQueue.schedule(function(){return r.eventMgr.listen(i)}),i},t.prototype.unlisten=function(t){var e=this;this.asyncQueue.schedule(function(){return e.eventMgr.unlisten(t)})},t.prototype.write=function(t){var e=this,n=new jr;return this.asyncQueue.schedule(function(){return e.syncEngine.write(t,n)}),n.promise},t.prototype.databaseId=function(){return this.databaseInfo.databaseId},t.prototype.transaction=function(t){var e=this;return this.asyncQueue.schedule(function(){return Promise.resolve()}).then(function(){return e.syncEngine.runTransaction(t)})},t}(),ni=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.scheduleEvent(this.observer.next,t)},t.prototype.error=function(t){this.scheduleEvent(this.observer.error,t)},t.prototype.mute=function(){this.muted=!0},t.prototype.scheduleEvent=function(t,e){var n=this;this.muted||setTimeout(function(){n.muted||t(e)},0)},t}(),ri=function(){function t(){this.tail=Promise.resolve(),this.delayedOpCount=0,this.operationInProgress=!1}return t.prototype.schedule=function(t,e){var n=this;if(this.failure&&u("AsyncQueue is already failed: "+this.failure.message),(e||0)>0){this.delayedOpCount++;var r=new jr;return setTimeout(function(){n.scheduleInternal(function(){return t().then(function(t){r.resolve(t)})}),n.delayedOpCount--},e),r.promise}return this.scheduleInternal(t)},t.prototype.scheduleInternal=function(t){var e=this;return this.tail=this.tail.then(function(){return e.operationInProgress=!0,t().catch(function(t){throw e.failure=t,e.operationInProgress=!1,a("INTERNAL UNHANDLED ERROR: ",t.stack||t.message),t}).then(function(){e.operationInProgress=!1})}),this.tail},t.prototype.verifyOperationInProgress=function(){c(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},t.prototype.drain=function(){return c(0===this.delayedOpCount,"draining doesn't handle delayed ops."),this.schedule(function(){return Promise.resolve(void 0)})},t}(),ii=function(){function t(t){this.uid=t}return t.prototype.isUnauthenticated=function(){return null==this.uid},t.prototype.toKey=function(){return this.isUnauthenticated()?"anonymous-user":"uid:"+this.uid},t.prototype.equals=function(t){return t.uid===this.uid},t.UNAUTHENTICATED=new t(null),t.GOOGLE_CREDENTIALS=new t("google-credentials-uid"),t.FIRST_PARTY=new t("first-party-uid"),t}(),oi=function(){function t(t,e){this.user=e,this.type="OAuth",this.authHeaders={Authorization:"Bearer "+t}}return t}(),ai=function(){function t(){this.userListener=null}return t.prototype.getToken=function(t){return Promise.resolve(null)},t.prototype.setUserChangeListener=function(t){c(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,t(ii.UNAUTHENTICATED)},t.prototype.removeUserChangeListener=function(){c(null!==this.userListener,"removeUserChangeListener() when no listener registered"),this.userListener=null},t}(),si=function(){function t(t){var e=this;this.app=t,this.tokenListener=null,this.userCounter=0,this.userListener=null,this.tokenListener=function(){var t=e.getUser();e.currentUser&&t.equals(e.currentUser)||(e.currentUser=t,e.userCounter++,e.userListener&&e.userListener(e.currentUser))},this.userCounter=0,this.app.INTERNAL.addAuthTokenListener(this.tokenListener)}return t.prototype.getToken=function(t){var e=this;c(null!=this.tokenListener,"getToken cannot be called after listener removed.");var n=this.userCounter;return this.app.INTERNAL.getToken(t).then(function(t){if(e.userCounter!==n)throw new zt(Ht.ABORTED,"getToken aborted due to uid change.");return t?(c("string"==typeof t.accessToken,"Invalid tokenData returned from getToken():"+t),new oi(t.accessToken,e.currentUser)):null})},t.prototype.setUserChangeListener=function(t){c(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,this.currentUser&&t(this.currentUser)},t.prototype.removeUserChangeListener=function(){c(null!=this.tokenListener,"removeUserChangeListener() called twice"),c(null!==this.userListener,"removeUserChangeListener() called when no listener registered"),this.app.INTERNAL.removeAuthTokenListener(this.tokenListener),this.tokenListener=null,this.userListener=null},t.prototype.getUser=function(){"function"!=typeof this.app.INTERNAL.getUid&&u("This version of the Firestore SDK requires at least version 3.7.0 of firebase.js.");var t=this.app.INTERNAL.getUid();return c(null===t||"string"==typeof t,"Received invalid UID: "+t),new ii(t)},t}(),ui=function(){function t(t){this.authClient=t}return t.prototype.getToken=function(t){var e=this;return new Promise(function(t,n){e.authClient.getAccessToken(function(e,r){e?n(e):t(new oi(r,ii.GOOGLE_CREDENTIALS))})})},t.prototype.setUserChangeListener=function(t){t(ii.GOOGLE_CREDENTIALS)},t.prototype.removeUserChangeListener=function(){},t}(),ci=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,this.type="FirstParty",this.user=ii.FIRST_PARTY,c(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return Object.defineProperty(t.prototype,"authHeaders",{get:function(){return{Authorization:this.gapi.auth.getAuthHeaderValueForFirstParty([]),"X-Goog-AuthUser":this.sessionIndex}},enumerable:!0,configurable:!0}),t}(),hi=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,c(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return t.prototype.getToken=function(t){return Promise.resolve(new ci(this.gapi,this.sessionIndex))},t.prototype.setUserChangeListener=function(t){t(ii.FIRST_PARTY)},t.prototype.removeUserChangeListener=function(){},t}(),li=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fi=function(){function t(){}return t.delete=function(){return pi.instance},t.serverTimestamp=function(){return di.instance},t}(),pi=function(t){function e(){return t.call(this)||this}return li(e,t),e.instance=new e,e}(fi),di=function(t){function e(){return t.call(this)||this}return li(e,t),e.instance=new e,e}(fi),yi=l(fi,"Use FieldValue.() instead."),mi=/^__.*__$/,gi=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[];return null!==this.fieldMask?n.push(new an(t,this.data,this.fieldMask,e)):n.push(new on(t,this.data,e)),this.fieldTransforms.length>0&&n.push(new sn(t,this.fieldTransforms)),n},t}(),vi=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[new an(t,this.data,this.fieldMask,e)];return this.fieldTransforms.length>0&&n.push(new sn(t,this.fieldTransforms)),n},t}();!function(t){t[t.Set=0]="Set",t[t.Update=1]="Update",t[t.MergeSet=2]="MergeSet",t[t.QueryValue=3]="QueryValue"}(Gr||(Gr={}));var bi=function(){function t(t,e,n,r,i,o){this.dataSource=t,this.methodName=e,this.path=n,this.arrayElement=r,void 0===i&&this.validatePath(),this.arrayElement=void 0!==r&&r,this.fieldTransforms=i||[],this.fieldMask=o||[]}return t.prototype.childContextForField=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePathSegment(e),r},t.prototype.childContextForFieldPath=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePath(),r},t.prototype.childContextForArray=function(e){return new t(this.dataSource,this.methodName,null,!0,this.fieldTransforms,this.fieldMask)},t.prototype.createError=function(t){var e=null===this.path||this.path.isEmpty()?"":" (found in field "+this.path+")";return new zt(Ht.INVALID_ARGUMENT,"Function "+this.methodName+"() called with invalid data. "+t+e)},t.prototype.validatePath=function(){if(null!==this.path)for(var t=0;t0,"FieldValue.delete() at the top level should have already been handled."),e.createError("FieldValue.delete() can only appear at the top level of your update data")):e.createError("FieldValue.delete() can only be used with update() and set() with {merge:true}")}if(t instanceof di){if(!kt(e.dataSource))throw e.createError("FieldValue.serverTimestamp() can only be used with set() and update()");if(null===e.path)throw e.createError("FieldValue.serverTimestamp() is not currently supported inside arrays");return e.fieldTransforms.push(new $e(e.path,Ze.instance)),null}return u("Unknown FieldValue type: "+t)}throw e.createError("Unsupported field value: "+A(t))},t}(),Ti=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ei="firestore.googleapis.com",Si=!0,Ni=function(){function t(t){if(void 0===t.host){if(void 0!==t.ssl)throw new zt(Ht.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=Ei,this.ssl=Si}else S("settings","string","host",t.host),this.host=t.host,N("settings","boolean","ssl",t.ssl),this.ssl=p(t.ssl,Si);O("settings",t,["host","ssl","credentials"]),N("settings","object","credentials",t.credentials),this.credentials=t.credentials}return t.prototype.equals=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials},t}(),Di=function(){function t(){}return t}(),Ci=function(){function t(e){var n=this;this.INTERNAL={delete:function(){return n.k?n.k.shutdown():Promise.resolve()},disableNetwork:function(){return n.k.disableNetwork()},enableNetwork:function(){return n.k.enableNetwork()}};var r=new Di;if("object"==typeof e.options){var i=e;r.firebaseApp=i,r.databaseId=t.databaseIdFromApp(i),r.persistenceKey=r.firebaseApp.name,r.credentials=new si(i)}else{var o=e;if(!o.projectId)throw new zt(Ht.INVALID_ARGUMENT,"Must provide projectId");r.databaseId=new ee(o.projectId,o.database),r.persistenceKey="[DEFAULT]",r.credentials=new ai}r.settings=new Ni({}),this._=r,this._databaseId=r.databaseId}return t.prototype.settings=function(t){if(v("Firestore.settings",arguments,1),T("Firestore.settings","object",1,t),f(t,"persistence"))throw new zt(Ht.INVALID_ARGUMENT,'"persistence" is now specified with a separate call to firestore.enablePersistence().');var e=new Ni(t);if(this.k&&!this._.settings.equals(e))throw new zt(Ht.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this._.settings=e,void 0!==e.credentials&&(this._.credentials=Dt(e.credentials))},t.prototype.enablePersistence=function(){if(this.k)throw new zt(Ht.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");return this.configureClient(!0)},t.prototype.ensureClientConfigured=function(){return this.k||this.configureClient(!1),this.k},t.prototype.configureClient=function(t){var e=this;c(!!this._.settings.host,"FirestoreSettings.host cannot be falsey"),c(!this.k,"configureClient() called multiple times");var n=new $t(this._.databaseId,this._.persistenceKey,this._.settings.host,this._.settings.ssl),r=function(t){if(t instanceof Ri){var n=e._.databaseId,r=t.firestore._.databaseId;if(!r.equals(n))throw new zt(Ht.INVALID_ARGUMENT,"Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return new wi(e._.databaseId,t.x)}return t};return this._dataConverter=new Ii(r),this.k=new ei(Gt.getPlatform(),n,this._.credentials,new ri),this.k.start(t)},t.databaseIdFromApp=function(t){var e=t.options;if(!f(e,"projectId")){if(f(e,"firestoreId"))throw new zt(Ht.INVALID_ARGUMENT,'"firestoreId" is now specified as "projectId" in firebase.initializeApp.');throw new zt(Ht.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.')}if(f(e,"firestoreOptions"))throw new zt(Ht.INVALID_ARGUMENT,'"firestoreOptions" values are now specified with Firestore.settings()');var n=e.projectId;if(!n||"string"!=typeof n)throw new zt(Ht.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new ee(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this._.firebaseApp)throw new zt(Ht.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._.firebaseApp},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(v("Firestore.collection",arguments,1),T("Firestore.collection","string",1,t),!t)throw new zt(Ht.INVALID_ARGUMENT,"Must provide a non-empty collection path to collection()");return this.ensureClientConfigured(),new Pi(ie.fromString(t),this)},t.prototype.doc=function(t){if(v("Firestore.doc",arguments,1),T("Firestore.doc","string",1,t),!t)throw new zt(Ht.INVALID_ARGUMENT,"Must provide a non-empty document path to doc()");return this.ensureClientConfigured(),Ri.forPath(ie.fromString(t),this)},t.prototype.runTransaction=function(t){var e=this;return v("Firestore.runTransaction",arguments,1),T("Firestore.runTransaction","function",1,t),this.ensureClientConfigured().transaction(function(n){return t(new Ai(e,n))})},t.prototype.batch=function(){return this.ensureClientConfigured(),new ki(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(r()){case qt.DEBUG:return"debug";case qt.ERROR:return"error";case qt.SILENT:return"silent";default:return u("Unknown log level: "+r())}},enumerable:!0,configurable:!0}),t.setLogLevel=function(t){switch(v("Firestore.setLogLevel",arguments,1),T("Firestore.setLogLevel","string",1,t),t){case"debug":i(qt.DEBUG);break;case"error":i(qt.ERROR);break;case"silent":i(qt.SILENT);break;default:throw new zt(Ht.INVALID_ARGUMENT,"Invalid log level: "+t)}},t}(),Ai=function(){function t(t,e){this.q=t,this.Q=e}return t.prototype.get=function(t){var e=this;v("Transaction.get",arguments,1);var n=xt("Transaction.get",t,this.q);return this.Q.lookup([n.x]).then(function(t){if(!t||1!==t.length)return u("Mismatch in docs returned from document lookup.");var r=t[0];return r instanceof ce?new Oi(e.q,n.x,null,!1):new Oi(e.q,n.x,r,!1)})},t.prototype.set=function(t,e,n){w("Transaction.set",arguments,2,3);var r=xt("Transaction.set",t,this.q);n=Lt("Transaction.set",n);var i=n.merge?this.q._dataConverter.parseMergeData("Transaction.set",e):this.q._dataConverter.parseSetData("Transaction.set",e);return this.Q.set(r.x,i),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i0?this.q.ensureClientConfigured().write(this.z):Promise.resolve()},t.prototype.verifyNotCommitted=function(){if(this.tt)throw new zt(Ht.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),Ri=function(){function t(t,e){this.x=t,this.firestore=e,this.k=this.firestore.ensureClientConfigured()}return t.forPath=function(e,n){if(e.length%2!=0)throw new zt(Ht.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e.canonicalString()+" has "+e.length);return new t(new se(e),n)},Object.defineProperty(t.prototype,"id",{get:function(){return this.x.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new Pi(this.x.path.popLast(),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.x.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(v("DocumentReference.collection",arguments,1),T("DocumentReference.collection","string",1,t),!t)throw new zt(Ht.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=ie.fromString(t);return new Pi(this.x.path.child(e),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw M("isEqual","DocumentReference",1,e);return this.firestore===e.firestore&&this.x.equals(e.x)},t.prototype.set=function(t,e){w("DocumentReference.set",arguments,1,2),e=Lt("DocumentReference.set",e);var n=e.merge?this.firestore._dataConverter.parseMergeData("DocumentReference.set",t):this.firestore._dataConverter.parseSetData("DocumentReference.set",t);return this.k.write(n.toMutations(this.x,nn.NONE))},t.prototype.update=function(t,e){for(var n=[],r=2;r0)throw new zt(Ht.INVALID_ARGUMENT,"Too many arguments provided to "+t+"().");var i=e;if(!i.exists)throw new zt(Ht.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+t+"().");return this.boundFromDocument(t,i.et,r)}var o=[e].concat(n);return this.boundFromFields(t,o,r)},t.prototype.boundFromDocument=function(t,e,n){for(var r=[],i=0,o=this.rt.orderBy;ir.length)throw new zt(Ht.INVALID_ARGUMENT,"Too many arguments provided to "+t+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var i=[],o=0;o, or >=) must be on the same field. But you have inequality filters on '"+e+"' and '"+t.field+"'");var n=this.rt.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(t.field,n)}},t.prototype.validateNewOrderBy=function(t){if(null===this.rt.getFirstOrderByField()){var e=this.rt.getInequalityFilterField();null!==e&&this.validateOrderByAndInequalityMatch(e,t.field)}},t.prototype.validateOrderByAndInequalityMatch=function(t,e){if(!e.equals(t))throw new zt(Ht.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t+"' and so you must also use '"+t+"' as your first Query.orderBy(), but your first Query.orderBy() is on field '"+e+"' instead.")},t}(),_i=function(){function t(t,e,n){this.q=t,this.it=e,this.ot=n,this._cachedChanges=null,this.metadata={fromCache:n.fromCache,hasPendingWrites:n.hasPendingWrites}}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach(function(e){return t.push(e)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this.ot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.ot.docs.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;w("QuerySnapshot.forEach",arguments,1,2),T("QuerySnapshot.forEach","function",1,t),this.ot.docs.forEach(function(r){t.call(e,n.convertToDocumentImpl(r))})},Object.defineProperty(t.prototype,"query",{get:function(){return new Mi(this.it,this.q)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"docChanges",{get:function(){return this._cachedChanges||(this._cachedChanges=Bt(this.q,this.ot)),this._cachedChanges},enumerable:!0,configurable:!0}),t.prototype.convertToDocumentImpl=function(t){return new Oi(this.q,t.key,t,this.metadata.fromCache)},t}(),Pi=function(t){function e(e,n){var r=t.call(this,Le.atPath(e),n)||this;if(e.length%2!=1)throw new zt(Ht.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.canonicalString()+" has "+e.length);return r}return Ti(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.rt.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.rt.path.popLast();return t.isEmpty()?null:new Ri(new se(t),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.rt.path.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.doc=function(t){if(w("CollectionReference.doc",arguments,0,1),0===arguments.length&&(t=Xt.newId()),T("CollectionReference.doc","string",1,t),""===t)throw new zt(Ht.INVALID_ARGUMENT,"Document path must be a non-empty string");var e=ie.fromString(t);return Ri.forPath(this.rt.path.child(e),this.firestore)},e.prototype.add=function(t){v("CollectionReference.add",arguments,1),T("CollectionReference.add","object",1,t);var e=this.doc();return e.set(t).then(function(){return e})},e}(Mi),Li=l(Ci,"Use firebase.firestore() instead."),xi=l(Ai,"Use firebase.firestore().runTransaction() instead."),Bi=l(ki,"Use firebase.firestore().batch() instead."),Ui=l(Ri,"Use firebase.firestore().doc() instead."),Fi=l(Oi),Vi=l(Mi),qi=l(_i),ji=l(Pi,"Use firebase.firestore().collection() instead."),Ki={Firestore:Li,GeoPoint:Zt,Blob:Jt,Transaction:xi,WriteBatch:Bi,DocumentReference:Ui,DocumentSnapshot:Fi,Query:Vi,QuerySnapshot:qi,CollectionReference:ji,FieldPath:Ln,FieldValue:yi,setLogLevel:Ci.setLogLevel};e.registerFirestore=Vt,Vt(jt.default)},115:function(module,exports,__webpack_require__){(function(){function l(t){return"string"==typeof t}function aa(){}function ba(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function n(t){return"array"==ba(t)}function ca(t){var e=ba(t);return"array"==e||"object"==e&&"number"==typeof t.length}function da(t){return"function"==ba(t)}function p(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function fa(t,e,n){return t.call.apply(t.bind,arguments)}function ha(t,e,n){if(!t)throw Error();if(2e?1:0}function na(t,e){e.unshift(t),ja.call(this,ka.apply(null,e)),e.shift()}function oa(t,e){throw new na("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function w(){0!=qa&&(ra[this[q]||(this[q]=++ea)]=this),this.i=this.i,this.v=this.v}function ua(t){t:{for(var e=va,n=t.length,r=l(t)?t.split(""):t,i=0;ie?null:l(t)?t.charAt(e):t[e]}function wa(t){if(!n(t))for(var e=t.length-1;0<=e;e--)delete t[e];t.length=0}function xa(t){return Array.prototype.concat.apply([],arguments)}function ya(t){var e=t.length;if(0r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=e.a;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){e.a=r[i];var o=yb(r[i],t,!0,e);n=n&&o}for(i=0;is.length)){var u=s[1];if(n(u)&&!(1>u.length)){var c=u[0];if("noop"!=c&&"stop"!=c&&"close"!=c)for(var h=1;he.length?Kc:(e=e.substr(r,n),t.C=r+n,e))}function Pc(e){e.T=t()+e.P,Xc(e,e.P)}function Xc(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=xc(r(t.eb,t),e)}function Rc(t){t.o&&(k.clearTimeout(t.o),t.o=null)}function Vc(t){t.m.Ka()||t.s||t.m.wa(t)}function Uc(t){Rc(t);var e=t.G;e&&"function"==typeof e.Y&&e.Y(),t.G=null,Yb(t.F),cc(t.M),t.a&&(e=t.a,t.a=null,e.abort(),e.Y())}function Tc(t,e){try{t.m.Na(t,e),uc()}catch(e){sc(t.b,e,"Error in httprequest callback")}}function Yc(t){if(t.A&&"function"==typeof t.A)return t.A();if(l(t))return t.split("");if(ca(t)){for(var e=[],n=t.length,r=0;r2*t.c&&$c(t),!0)}function $c(t){if(t.c!=t.a.length){for(var e=0,n=0;ee)throw Error("Bad port number "+e);t.i=e}else t.i=null}function hd(t,e,n){e instanceof kd?(t.c=e,qd(t.c,t.h)):(n||(e=ld(e,rd)),t.c=new kd(e,0,t.h))}function R(t,e,n){t.c.set(e,n)}function Qc(t,e,r){n(r)||(r=[r+""]),sd(t.c,e,r)}function Mc(e){return R(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^t()).toString(36)),e}function td(t){return t instanceof Q?M(t):new Q(t,void 0)}function ud(t,e,n,r){var i=new Q(null,void 0);return t&&ed(i,t),e&&fd(i,e),n&&gd(i,n),r&&(i.a=r),i}function jd(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function ld(t,e,n){return l(t)?(t=encodeURI(t).replace(e,vd),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function vd(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)}function kd(t,e,n){this.b=this.a=null,this.c=t||null,this.f=!!n}function S(t){t.a||(t.a=new O,t.b=0,t.c&&dd(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function xd(t,e){S(t),e=wd(t,e),P(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,bd(t.a,e))}function yd(t,e){return S(t),e=wd(t,e),P(t.a.b,e)}function sd(t,e,n){xd(t,e),0=t.c}function Td(t,e){return t.b?t.b==e:!!t.a&&t.a.contains(e)}function Rd(t,e){t.a?t.a.add(e):t.b=e}function Ud(t,e){this.a=t,this.b=e}function Vd(t,e){this.a=t,this.b=e}function Wd(){this.a=new Vd}function Xd(t,e,n){var r=n||"";try{Zc(t,function(t,n){var i=t;p(t)&&(i=Eb(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}function Yd(t,e){var n=new qc;I(n,"TestLoadImage: loading "+t);var r=new Image;r.onload=ia(Zd,n,r,"TestLoadImage: loaded",!0,e),r.onerror=ia(Zd,n,r,"TestLoadImage: error",!1,e),r.onabort=ia(Zd,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=ia(Zd,n,r,"TestLoadImage: timeout",!1,e),k.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}function Zd(t,e,n,r,i){try{I(t,n),e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(e){sc(t,e)}}function U(t){B.call(this),this.headers=new O,this.G=t||null,this.f=!1,this.F=this.a=null,this.M=this.s="",this.j=0,this.g="",this.h=this.I=this.o=this.H=!1,this.l=0,this.B=null,this.N=$d,this.C=this.m=!1}function ee(t){return z&&Ua(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}function va(t){return"content-type"==t.toLowerCase()}function ce(t,e){t.f=!1,t.a&&(t.h=!0,t.a.abort(),t.h=!1),t.g=e,t.j=5,fe(t),ge(t)}function fe(t){t.H||(t.H=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function he(t){if(t.f&&void 0!==goog)if(t.F[1]&&4==N(t)&&2==t.V())H(t.b,V(t,"Local request error detected and ignored"));else if(t.o&&4==N(t))Zb(t.Ma,0,t);else if(t.dispatchEvent("readystatechange"),4==N(t)){H(t.b,V(t,"Request complete")),t.f=!1;try{var e=t.V();t:switch(e){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break t;default:n=!1}var r;if(!(r=n)){var i;if(i=0===e){var o=(t.s+"").match(cd)[1]||null;if(!o&&k.self&&k.self.location){var a=k.self.location.protocol;o=a.substr(0,a.length-1)}i=!ae.test(o?o.toLowerCase():"")}r=i}r?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.V()+"]",fe(t))}finally{ge(t)}}}function ge(t,e){if(t.a){de(t);var n=t.a,r=t.F[0]?aa:null;t.a=null,t.F=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&F(t,"Problem encountered resetting onreadystatechange: "+e.message)}}}function de(t){t.a&&t.C&&(t.a.ontimeout=null),"number"==typeof t.B&&(k.clearTimeout(t.B),t.B=null)}function N(t){return t.a?t.a.readyState:0}function V(t,e){return e+" ["+t.M+" "+t.s+" "+t.V()+"]"}function ie(t){var e="";return Ba(t,function(t,n){e+=n,e+=":",e+=t,e+="\r\n"}),e}function je(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}if(r)return t;if(n=ie(n),l(t)){if(e=encodeURIComponent(e+""),n=null!=n?"="+encodeURIComponent(n+""):"",e+=n){if(n=t.indexOf("#"),0>n&&(n=t.length),0>(r=t.indexOf("?"))||r>n){r=n;var i=""}else i=t.substring(r+1,n);t=[t.substr(0,r),i,t.substr(n)],n=t[1],t[1]=e?n?n+"&"+e:e:n,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return R(t,e,n),t}function ke(t,e,n){this.za=e||0,this.Ba=0,this.h=[],this.l=[],this.a=new qc,this.J=n||new Md,this.ia=this.ya=this.H=this.ja=this.b=this.N=this.j=this.ha=this.f=this.P=this.i=null,this.Va=this.I=0,this.ka=this.C=this.s=this.m=this.o=this.c=null,this.v=this.Aa=this.S=-1,this.ga=this.B=this.G=0,this.T=t&&t.supportsCrossDomainXhr||!1,this.M="",this.g=new Od(t&&t.concurrentRequestLimit),this.la=new Wd,this.F=!t||void 0===t.backgroundChannelTest||t.backgroundChannelTest,this.Ua=t&&t.fastHandshake||!1}function le(e){if(I(e.a,"disconnect()"),me(e),3==e.D){var n=e.I++,r=M(e.H);R(r,"SID",e.M),R(r,"RID",n),R(r,"TYPE","terminate"),ne(e,r),n=new L(e,e.a,0,n,void 0),n.I=2,n.l=Mc(M(r)),r=!1,k.navigator&&k.navigator.sendBeacon&&(r=k.navigator.sendBeacon(""+n.l,"")),r||((new Image).src=n.l),n.H=t(),Pc(n)}oe(e)}function me(t){t.C&&(t.C.abort(),t.C=null),t.b&&(t.b.cancel(),t.b=null),t.m&&(k.clearTimeout(t.m),t.m=null),pe(t),t.g.cancel(),t.o&&(k.clearTimeout(t.o),t.o=null)}function qe(t,e){if(1e3==t.h.length){var n="Already have 1000 queued maps upon queueing "+Eb(e),r=t.a.a;r&&F(r,n)}t.h.push(new Ud(t.Va++,e)),3==t.D&&re(t)}function re(t){Sd(t.g)||t.o||(t.o=xc(r(t.Pa,t),0),t.G=0)}function te(t,e){if(e){t.h=t.l.concat(t.h),t.l.length=0;var n=t.I-1}else n=t.I++;e=se(t);var r=M(t.H);R(r,"SID",t.M),R(r,"RID",n),R(r,"AID",t.S),ne(t,r),t.f&&t.i&&je(r,t.f,t.i),n=new L(t,t.a,0,n,t.G+1),null===t.f&&(n.h=t.i),n.setTimeout(Math.round(1e4)+Math.round(1e4*Math.random())),Rd(t.g,n),Lc(n,r,e)}function ne(t,e){t.c&&Zc({},function(t,n){R(e,n,t)})}function se(t){var e=Math.min(t.h.length,1e3),n=t.c?r(t.c.Wa,t.c,t):null,i=t.h,o=["count="+e];if(0this.c)throw Error(Je);this.a=new Ge,this.b=new T,this.g=null,this.aa()}function Ke(t){if("function"==typeof t.Y)t.Y();else for(var e in t)t[e]=null}function Le(t,e){this.a=t,this.b=e}function Me(t){if(this.a=[],t)t:{if(t instanceof Me){var e=t.O();if(t=t.A(),0>=this.u()){for(var n=this.a,r=0;r>1,t[r].a>n.a);)t[e]=t[r],e=r;t[e]=n}function Oe(){Me.call(this)}function Y(t,e){this.f=new Oe,Ie.call(this,t,e)}function Z(t,e,n,r){this.l=t,this.j=!!r,Y.call(this,e,n)}var g,goog=goog||{},k=this,q="closure_uid_"+(1e9*Math.random()>>>0),ea=0,t=Date.now||function(){return+new Date};u(ja,Error),ja.prototype.name="CustomError";var la=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};u(na,ja),na.prototype.name="AssertionError";var qa=0,ra={};w.prototype.i=!1,w.prototype.Y=function(){if(!this.i&&(this.i=!0,this.w(),0!=qa)){var t=this[q]||(this[q]=++ea);delete ra[t]}},w.prototype.w=function(){if(this.v)for(;this.v.length;)this.v.shift()()};var sa=Array.prototype.indexOf?function(t,e,n){return Array.prototype.indexOf.call(t,e,n)}:function(t,e,n){if(n=null==n?0:0>n?Math.max(0,t.length+n):n,l(t))return l(e)&&1==e.length?t.indexOf(e,n):-1;for(;nparseFloat(Qa)){Pa=Ta+"";break t}}Pa=Qa}var Ja={},Va,Wa=k.document;Va=Wa&&z?Oa()||("CSS1Compat"==Wa.compatMode?parseInt(Pa,10):5):void 0;var Xa=Object.freeze||function(t){return t},Ya=!z||9<=+Va,Za=z&&!Ua("9"),$a=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return k.addEventListener("test",aa,e),k.removeEventListener("test",aa,e),t}();A.prototype.b=function(){this.Qa=!1},u(ab,A);var bb=Xa({2:"touch",3:"pen",4:"mouse"});ab.prototype.b=function(){ab.L.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,Za)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}};var cb="closure_listenable_"+(1e6*Math.random()|0),eb=0;hb.prototype.add=function(t,e,n,r,i){var o=""+t;(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ib(t,e,r,i);return-1>>0);u(B,w),B.prototype[cb]=!0,g=B.prototype,g.addEventListener=function(t,e,n,r){ob(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){wb(this,t,e,n,r)},g.dispatchEvent=function(t){var e,n=this.J;if(n)for(e=[];n;n=n.J)e.push(n);n=this.P;var r=t.type||t;if(l(t))t=new A(t,n);else if(t instanceof A)t.target=t.target||n;else{var i=t;t=new A(r,n),Ga(t,i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.a=e[o];i=Bb(a,r,!0,t)&&i}if(a=t.a=n,i=Bb(a,r,!0,t)&&i,i=Bb(a,r,!1,t)&&i,e)for(o=0;o=lc(this).value)for(da(e)&&(e=e()),t=new dc(t,e+"",this.f),n&&(t.a=n),n="log:"+t.b,(t=k.console)&&t.timeStamp&&t.timeStamp(n),(t=k.msWriteProfilerMark)&&t(n),n=this;n;)n=n.a};var mc={},nc=null,J=new B;u(tc,A),u(vc,A),u(wc,A);var yc={NO_ERROR:0,kb:1,rb:2,qb:3,nb:4,pb:5,sb:6,Sa:7,TIMEOUT:8,vb:9},zc={mb:"complete",zb:"success",Ta:"error",Sa:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",tb:"incrementaldata",wb:"progress",ob:"downloadprogress",Ab:"uploadprogress"};Ac.prototype.a=null;var Dc;u(Ec,Ac),Dc=new Ec;var Gc=45e3,Hc=250,Jc={},Kc={};g=L.prototype,g.setTimeout=function(t){this.P=t},g.gb=function(t){t=t.target;var e=this.G;e&&3==N(t)?(I(this.b,"Throttling readystatechange."),e.Ya()):this.Ra(t)},g.Ra=function(t){try{if(t==this.a){var e=N(this.a),n=this.a.Ga();if(!(3>e||3==e&&!Ka&&!this.a.U())){this.s||4!=e||7==n||uc(),Rc(this);var r=this.a.V();this.v=r;var i=this.a.U();if(i||I(this.b,"No response text for uri "+this.g+" status "+r),this.c=200==r,I(this.b,"XMLHTTP RESP ("+this.f+") [ attempt "+this.S+"]: "+this.j+"\n"+this.g+"\n"+e+" "+r),this.c)this.J?(Sc(this,e,i),Ka&&this.c&&3==e&&(this.M.$(this.F,"tick",this.fb),this.F.start())):(rc(this.b,this.f,i,null),Tc(this,i)),4==e&&Uc(this),this.c&&!this.s&&(4==e?this.m.wa(this):(this.c=!1,Pc(this)));else{if(400==r&&0e&&this.ka&&0==this.B&&!this.s&&(this.s=xc(r(this.ab,this),6e3)));else I(this.a,"Bad POST response data returned"),W(this,11)}else if(this.b==t&&pe(this),!/^[\s\xa0]*$/.test(e))for(e=i=this.la.a.parse(e),i=0;ie-this.g)){for(var n;0this.c&&0=i)o=void 0;else{if(1==i)wa(r);else{r[0]=r.pop(),r=0,n=n.a,i=n.length;for(var a=n[r];r>1;){var s=2*r+1,u=2*r+2;if(s=ua.a)break;n[r]=n[s],r=s}n[r]=a}o=o.b}o.apply(this,[e])}},g.ma=function(t){Y.L.ma.call(this,t),this.ua()},g.aa=function(){Y.L.aa.call(this),this.ua()},g.w=function(){Y.L.w.call(this),k.clearTimeout(void 0),wa(this.f.a),this.f=null},u(Z,Y),Z.prototype.qa=function(){var t=new U,e=this.l;return e&&e.forEach(function(e,n){t.headers.set(n,e)}),this.j&&(t.m=!0),t},Z.prototype.va=function(t){return!t.i&&!t.a},Be.prototype.createWebChannel=Be.prototype.a,X.prototype.send=X.prototype.l,X.prototype.open=X.prototype.j,X.prototype.close=X.prototype.close,yc.NO_ERROR=0,yc.TIMEOUT=8,yc.HTTP_ERROR=6,zc.COMPLETE="complete",Dd.EventType=Ed,Ed.OPEN="a",Ed.CLOSE="b",Ed.ERROR="c",Ed.MESSAGE="d",B.prototype.listen=B.prototype.$,Z.prototype.getObject=Z.prototype.ca,Z.prototype.releaseObject=Z.prototype.hb,U.prototype.listenOnce=U.prototype.Ia,U.prototype.getLastError=U.prototype.$a,U.prototype.getLastErrorCode=U.prototype.Ga,U.prototype.getStatus=U.prototype.V,U.prototype.getStatusText=U.prototype.Ha,U.prototype.getResponseJson=U.prototype.Za,U.prototype.getResponseText=U.prototype.U,U.prototype.getResponseText=U.prototype.U,U.prototype.send=U.prototype.ta,module.exports={createWebChannelTransport:Fe,ErrorCode:yc,EventType:zc,WebChannel:Dd,XhrIoPool:Z}}).call("undefined"!=typeof window?window:this)}},[113])}catch(t){throw Error("Cannot instantiate firebase-firestore.js - be sure to load firebase-app.js first.")} +//# sourceMappingURL=firebase-firestore.js.map \ No newline at end of file diff --git a/lib/firebase/firebase-firestore.js.map b/lib/firebase/firebase-firestore.js.map new file mode 100644 index 00000000..0ee4c424 --- /dev/null +++ b/lib/firebase/firebase-firestore.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///firebase-firestore.js","webpack:///./firestore/index.js","webpack:///../firestore/dist/esm/src/util/log.js","webpack:///../firestore/dist/esm/src/util/assert.js","webpack:///../firestore/dist/esm/src/platform/platform.js","webpack:///../firestore/dist/esm/src/util/api.js","webpack:///../firestore/dist/esm/src/util/obj.js","webpack:///../firestore/dist/esm/src/util/input_validation.js","webpack:///../firestore/dist/esm/src/util/misc.js","webpack:///../firestore/dist/esm/src/api/blob.js","webpack:///../firestore/dist/esm/src/model/field_value.js","webpack:///../firestore/dist/esm/src/util/types.js","webpack:///../firestore/dist/esm/src/core/query.js","webpack:///../firestore/dist/esm/src/remote/rpc_error.js","webpack:///../firestore/dist/esm/src/model/collections.js","webpack:///../firestore/dist/esm/src/remote/watch_change.js","webpack:///../firestore/dist/esm/src/remote/serializer.js","webpack:///../firestore/dist/esm/src/api/field_path.js","webpack:///../firestore/dist/esm/src/core/view.js","webpack:///../firestore/dist/esm/src/local/encoded_resource_path.js","webpack:///../firestore/dist/esm/src/local/indexeddb_schema.js","webpack:///../firestore/dist/esm/src/local/simple_db.js","webpack:///../firestore/dist/esm/src/local/indexeddb_mutation_queue.js","webpack:///../firestore/dist/esm/src/local/indexeddb_query_cache.js","webpack:///../firestore/dist/esm/src/local/indexeddb_remote_document_cache.js","webpack:///../firestore/dist/esm/src/local/local_serializer.js","webpack:///../firestore/dist/esm/src/api/credentials.js","webpack:///../firestore/dist/esm/src/api/observer.js","webpack:///../firestore/dist/esm/src/api/user_data_converter.js","webpack:///../firestore/dist/esm/src/api/database.js","webpack:///../firestore/dist/esm/src/platform/config.js","webpack:///../firestore/dist/esm/index.js","webpack:///../firestore/dist/esm/src/core/version.js","webpack:///../firestore/dist/esm/src/util/error.js","webpack:///../firestore/dist/esm/src/api/geo_point.js","webpack:///../firestore/dist/esm/src/core/database_info.js","webpack:///../firestore/dist/esm/src/model/path.js","webpack:///../firestore/dist/esm/src/model/document_key.js","webpack:///../firestore/dist/esm/src/model/document.js","webpack:///../firestore/dist/esm/src/util/sorted_map.js","webpack:///../firestore/dist/esm/src/local/query_data.js","webpack:///../firestore/dist/esm/src/core/timestamp.js","webpack:///../firestore/dist/esm/src/core/snapshot_version.js","webpack:///../firestore/dist/esm/src/model/mutation.js","webpack:///../firestore/dist/esm/src/remote/existence_filter.js","webpack:///../firestore/dist/esm/src/util/sorted_set.js","webpack:///../firestore/dist/esm/src/remote/remote_event.js","webpack:///../firestore/dist/esm/src/remote/stream_bridge.js","webpack:///../firestore/dist/esm/src/platform_browser/webchannel_connection.js","webpack:///../firestore/dist/esm/src/platform_browser/browser_platform.js","webpack:///../firestore/dist/esm/src/platform_browser/browser_init.js","webpack:///../firestore/dist/esm/src/core/types.js","webpack:///../firestore/dist/esm/src/core/view_snapshot.js","webpack:///../firestore/dist/esm/src/core/target_id_generator.js","webpack:///../firestore/dist/esm/src/model/document_set.js","webpack:///../firestore/dist/esm/src/util/obj_map.js","webpack:///../firestore/dist/esm/src/core/event_manager.js","webpack:///../firestore/dist/esm/src/local/persistence_promise.js","webpack:///../firestore/dist/esm/src/local/eager_garbage_collector.js","webpack:///../firestore/dist/esm/src/local/local_view_changes.js","webpack:///../firestore/dist/esm/src/local/reference_set.js","webpack:///../firestore/dist/esm/src/remote/persistent_stream.js","webpack:///../firestore/dist/esm/src/core/sync_engine.js","webpack:///../firestore/dist/esm/src/model/mutation_batch.js","webpack:///../firestore/dist/esm/src/local/indexeddb_persistence.js","webpack:///../firestore/dist/esm/src/local/local_documents_view.js","webpack:///../firestore/dist/esm/src/local/remote_document_change_buffer.js","webpack:///../firestore/dist/esm/src/local/local_store.js","webpack:///../firestore/dist/esm/src/local/memory_mutation_queue.js","webpack:///../firestore/dist/esm/src/local/memory_query_cache.js","webpack:///../firestore/dist/esm/src/local/memory_remote_document_cache.js","webpack:///../firestore/dist/esm/src/local/memory_persistence.js","webpack:///../firestore/dist/esm/src/local/no_op_garbage_collector.js","webpack:///../firestore/dist/esm/src/util/promise.js","webpack:///../firestore/dist/esm/src/remote/backoff.js","webpack:///../firestore/dist/esm/src/remote/datastore.js","webpack:///../firestore/dist/esm/src/core/transaction.js","webpack:///../firestore/dist/esm/src/remote/remote_store.js","webpack:///../firestore/dist/esm/src/core/firestore_client.js","webpack:///../firestore/dist/esm/src/util/async_observer.js","webpack:///../firestore/dist/esm/src/util/async_queue.js","webpack:///../firestore/dist/esm/src/auth/user.js","webpack:///../firestore/dist/esm/src/api/field_value.js","webpack:///../webchannel-wrapper/dist/index.js"],"names":["webpackJsonpFirebase","113","module","exports","__webpack_require__","114","__webpack_exports__","getLogLevel","logLevel","setLogLevel","newLevel","debug","tag","msg","obj","_i","arguments","length","LogLevel","DEBUG","time","Date","toISOString","args","map","argToString","console","log","apply","SDK_VERSION","concat","log_error","ERROR","error","JSON","stringify","e","fail","failure","message","Error","assert","assertion","emptyByteString","platform_PlatformSupport","getPlatform","makeConstructorPrivate","cls","optionalMessage","PublicConstructor","FirestoreError","Code","INVALID_ARGUMENT","prototype","staticProperty","hasOwnProperty","contains","key","Object","call","defaulted","value","defaultValue","undefined","forEachNumber","fn","num","parseInt","isNaN","forEach","isEmpty","shallowCopy","result","validateExactNumberOfArgs","functionName","numberOfArgs","formatPlural","validateAtLeastNumberOfArgs","minNumberOfArgs","validateBetweenNumberOfArgs","maxNumberOfArgs","validateNamedArrayAtLeastNumberOfElements","name","minNumberOfElements","Array","validateArgType","type","position","argument","validateType","ordinal","validateOptionalArgType","validateNamedType","optionName","validateNamedOptionalType","inputName","input","isPlainObject","description","valueDescription","getPrototypeOf","substring","customObjectName","tryGetCustomObjectType","constructor","funcNameRegex","results","exec","validateDefined","validateOptionNames","options","optionNames","_","indexOf","join","invalidClassError","str","primitiveComparator","left","right","equals","arrayEquals","i","immediatePredecessor","s","lastIndex","charAt","String","fromCharCode","charCodeAt","immediateSuccessor","assertUint8ArrayAvailable","Uint8Array","UNIMPLEMENTED","assertBase64Available","base64Available","numericComparator","numericEquals","isNullOrUndefined","isSafeInteger","isInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","fieldFilter","field","op","NullValue","INSTANCE","query_RelationOp","EQUAL","NullFilter","DoubleValue","NAN","NanFilter","query_RelationFilter","isPermanentError","code","OK","CANCELLED","UNKNOWN","DEADLINE_EXCEEDED","RESOURCE_EXHAUSTED","INTERNAL","UNAVAILABLE","UNAUTHENTICATED","NOT_FOUND","ALREADY_EXISTS","PERMISSION_DENIED","FAILED_PRECONDITION","ABORTED","OUT_OF_RANGE","DATA_LOSS","mapCodeFromRpcStatus","status","RpcCode","mapCodeFromRpcCode","mapRpcCodeFromCode","mapCodeFromHttpStatus","maybeDocumentMap","EMPTY_MAYBE_DOCUMENT_MAP","documentMap","EMPTY_DOCUMENT_MAP","documentVersionMap","EMPTY_DOCUMENT_VERSION_MAP","documentKeySet","EMPTY_DOCUMENT_KEY_SET","applyResumeToken","change","resumeToken","assertPresent","parseInt64","hasTag","fromDotSeparatedString","path","search","RESERVED","field_path_FieldPath","bind","split","compareChangeType","c1","c2","order","ChangeType","Added","Modified","Metadata","Removed","encode","encodeSeparator","encodeSegment","get","segment","resultBuf","c","escapeChar","encodedNul","encodedEscape","encodedSeparatorChar","decode","path_ResourcePath","EMPTY_PATH","lastReasonableEscapeIndex","segments","segmentBuilder","start","end","currentPiece","push","createOrUpgradeDb","db","oldVersion","createObjectStore","DbMutationQueue","store","keyPath","DbMutationBatch","DbTargetDocument","createIndex","documentTargetsIndex","documentTargetsKeyPath","unique","DbTarget","queryTargetsIndexName","queryTargetsKeyPath","indexeddb_schema_DbDocumentMutation","DbRemoteDocument","DbOwner","DbTargetGlobal","wrapRequest","request","persistence_promise_PersistencePromise","resolve","reject","onsuccess","event","target","onerror","validateStreamToken","token","mutationsStore","txn","getStore","documentMutationsStore","mutationQueuesStore","simple_db_SimpleDbTransaction","targetsStore","indexeddb_query_cache_getStore","globalTargetStore","documentTargetStore","remoteDocumentsStore","dbKey","docKey","toArray","isDocumentQuery","dbQuery","documents","makeCredentialsProvider","credentials","credentials_EmptyCredentialsProvider","credentials_GoogleCredentialsProvider","client","credentials_FirstPartyCredentialsProvider","sessionIndex","isPartialObserver","implementsAnyMethods","methods","object","methods_1","method","isWrite","dataSource","UserDataSource","Set","MergeSet","Update","QueryValue","looksLikeJsonObject","geo_point_GeoPoint","blob_Blob","DocumentKeyReference","FieldValueImpl","validatePlainObject","context","createError","fieldPathFromArgument","methodName","_internalPath","fieldPathFromDotSeparatedString","errorMessage","validateSetOptions","merge","validateReference","documentRef","firestore","database_DocumentReference","changesFromSnapshot","snapshot","oldDocs","lastDoc_1","index_1","docChanges","doc","database_DocumentSnapshot","fromCache","query","docComparator","oldIndex","newIndex","indexTracker_1","delete","add","resultChangeType","configureForFirebase","firebase","registerService","app","database_Firestore","firestoreNamespace","registerFirestore","instance","defineProperty","esm","PlatformSupport","setPlatform","platform","__extends","this","extendStatics","setPrototypeOf","__proto__","d","b","p","__","create","_super","_this","toString","misc_AutoId","AutoId","newId","chars","autoId","Math","floor","random","Blob","binaryString","_binaryString","fromBase64String","base64","atob","fromUint8Array","array","char","toBase64","btoa","toUint8Array","buffer","_equals","other","_compareTo","PublicBlob","GeoPoint","latitude","longitude","isFinite","_lat","_long","enumerable","configurable","DatabaseInfo","databaseId","persistenceKey","host","ssl","DEFAULT_DATABASE_NAME","database_info_DatabaseId","DatabaseId","projectId","database","compareTo","path___extends","path_Path","Path","offset","init","len","construct","comparator","child","nameOrPath","slice","limit","popFirst","size","popLast","firstSegment","lastSegment","index","isPrefixOf","p1","p2","min","ResourcePath","canonicalString","fromString","filter","identifierRegExp","path_FieldPath","FieldPath","isValidIdentifier","test","replace","isKeyField","keyField","fromServerFormat","current","addCurrentSegment","inBackticks","next","document_key_DocumentKey","DocumentKey","isDocumentKey","k1","k2","fromSegments","fromPathString","EMPTY","document_Document","Document","version","data","hasLocalMutations","fieldValue","compareByKey","d1","d2","compareByField","v1","v2","document_NoDocument","NoDocument","sorted_map_SortedMap","SortedMap","root","sorted_map_LLRBNode","insert","copy","BLACK","remove","node","cmp","getPredecessorKey","rightParent","prunedNodes","minKey","maxKey","inorderTraversal","action","k","v","reverseTraversal","getIterator","resultGenerator","sorted_map_SortedMapIterator","getIteratorFrom","getReverseIterator","getReverseIteratorFrom","SortedMapIterator","startKey","isReverse","nodeStack","getNext","pop","hasNext","peek","LLRBNode","color","RED","n","fixUp","removeMin","isRed","moveRedLeft","smallest","rotateRight","moveRedRight","rotateLeft","colorFlip","nl","nr","checkMaxDepth","blackDepth","check","pow","LLRBEmptyNode","TypeOrder","field_value___extends","QueryPurpose","field_value_FieldValue","FieldValue","val","defaultCompareTo","typeOrder","internalValue","field_value_BooleanValue","BooleanValue","of","TRUE","FALSE","NumberValue","IntegerValue","NaN","POSITIVE_INFINITY","Infinity","NEGATIVE_INFINITY","field_value_StringValue","StringValue","TimestampValue","toDate","ServerTimestampValue","localWriteTime","BlobValue","field_value_RefValue","RefValue","GeoPointValue","field_value_ObjectValue","ObjectValue","it1","it2","next1","next2","set","to","setChild","newChild","pathSegment","childName","field_value_ArrayValue","ArrayValue","minLength","NumberAsAny","Number","query_Query","Query","explicitOrderBy","filters","startAt","endAt","memoizedCanonicalId","memoizedOrderBy","assertValidBound","atPath","inequalityField","getInequalityFilterField","firstOrderByField","getFirstOrderByField","KEY_ORDERING_ASC","query_OrderBy","foundKeyOrdering","_a","orderBy","lastDirection","dir","Direction","ASCENDING","KEY_ORDERING_DESC","addFilter","isInequality","newFilters","addOrderBy","newOrderBy","withLimit","withStartAt","bound","withEndAt","canonicalId","_b","_c","comparedOnKeyField","comp","compare","matches","matchesAncestor","matchesOrderBy","matchesFilters","matchesBounds","hasLimit","docPath","sortsBeforeDocument","RelationOp","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN_OR_EQUAL","GREATER_THAN","RelationFilter","refValue","comparison","matchesComparison","matchesValue","DESCENDING","query_Bound","Bound","before","component","orderByComponent","docValue","thisPosition","otherPosition","OrderBy","isKeyOrderBy","isoRegExp","RegExp","timestamp_Timestamp","Timestamp","seconds","nanos","now","fromEpochMilliseconds","fromDate","date","getTime","milliseconds","fromISOString","utc","fraction","nanoStr","substr","toEpochMilliseconds","snapshot_version_SnapshotVersion","SnapshotVersion","timestamp","fromMicroseconds","fromTimestamp","forDeletedDoc","MIN","toMicroseconds","toTimestamp","MutationType","query_data_QueryData","QueryData","targetId","purpose","snapshotVersion","update","updated","mutation___extends","mutation_FieldMask","FieldMask","fields","ServerTimestampTransform","FieldTransform","transform","MutationResult","transformResults","mutation_Precondition","Precondition","updateTime","exists","isValidFor","maybeDoc","isNone","NONE","mutation_Mutation","Mutation","verifyKeyMatches","getPostMutationVersion","mutation_SetMutation","SetMutation","precondition","applyToRemoteDocument","mutationResult","applyToLocalView","mutation_PatchMutation","PatchMutation","fieldMask","Patch","newData","patchDocument","patchObject","fieldPath","newValue","mutation_TransformMutation","TransformMutation","fieldTransforms","Transform","requireDocument","transformObject","localTransformResults","fieldTransform","mutation_DeleteMutation","DeleteMutation","Delete","ExistenceFilter","count","CurrentStatusUpdate","sorted_set_SortedSet","SortedSet","fromMapKeys","keys","has","elem","first","last","cb","forEachInRange","range","iter","forEachWhile","firstAfterOrEqual","unionWith","thisIt","otherIt","thisElem","otherElem","remote_event_RemoteEvent","RemoteEvent","targetChanges","documentUpdates","addDocumentUpdate","handleExistenceFilterMismatch","mapping","ResetMapping","currentStatusUpdate","MarkNotCurrent","WatchTargetChangeState","EMPTY_KEY_SET","docs","UpdateMapping","addedDocuments","removedDocuments","applyToKeySet","DocumentWatchChange","updatedTargetIds","removedTargetIds","newDoc","ExistenceFilterChange","existenceFilter","watch_change_WatchTargetChange","WatchTargetChange","state","targetIds","cause","watch_change_WatchChangeAggregator","WatchChangeAggregator","listenTargets","pendingTargetResponses","existenceFilters","frozen","watchChange","addDocumentChange","addTargetChange","addExistenceFilterChange","addChanges","watchChanges","createRemoteEvent","isActiveTarget","ensureTargetChange","None","docChange","relevant","targetChange","NoChange","recordTargetResponse","Current","MarkCurrent","Reset","newCount","DIRECTIONS","dirs","OPERATORS","ops","serializer_JsonProtoSerializer","JsonProtoSerializer","useProto3Json","unsafeCastProtoByteString","byteString","fromRpcStatus","toBytes","bytes","fromBlob","blob","toVersion","fromVersion","toResourceName","fullyQualifiedPrefixPath","fromResourceName","resource","isValidResourceName","toName","fromName","extractLocalPathFromResourceName","toQueryPath","encodedDatabaseId","fromQueryPath","resourceName","toValue","nullValue","booleanValue","integerValue","doubleValue","stringValue","mapValue","toMapValue","arrayValue","toArrayValue","timestampValue","geoPointValue","bytesValue","referenceValue","fromValue","fromFields","values","dbId","toMutationDocument","toFields","toDocument","document","fromDocument","fromFound","found","fromMissing","missing","readTime","fromMaybeDocument","toWatchTargetChangeState","toTestWatchChange","documentChange","documentDelete","documentRemove","targetChangeType","fromWatchChange","fromWatchTargetChangeState","causeProto","entityChange","docDelete","docRemove","versionFromListenResponse","toMutation","mutation","updateMask","toDocumentMask","toFieldTransform","currentDocument","toPrecondition","fromMutation","proto","fromPrecondition","fromDocumentMask","fromFieldTransform","fromWriteResult","fromWriteResults","protos","setToServerValue","toDocumentsTarget","fromDocumentsTarget","documentsTarget","toQueryTarget","structuredQuery","parent","from","collectionId","where","toFilter","toOrder","toLimit","toCursor","fromQueryTarget","fromCount","filterBy","fromFilter","fromOrder","fromCursor","toListenRequestLabels","queryData","toLabel","goog-listen-tags","Listen","ExistenceFilterMismatch","LimboResolution","toTarget","toRelationFilter","toUnaryFilter","compositeFilter","unaryFilter","fromUnaryFilter","fromRelationFilter","f","reduce","accum","orderBys","toPropertyOrder","fromPropertyOrder","cursor","toDirection","fromDirection","toOperatorName","fromOperatorName","toFieldPathReference","fromFieldPathReference","fieldReference","direction","nanField","nullField","fieldPaths","paths","dist","stream_bridge_StreamBridge","StreamBridge","wrappedOnOpen","wrappedOnClose","wrappedOnMessage","sendFn","closeFn","onOpen","callback","onClose","onMessage","close","send","callOnOpen","callOnClose","err","callOnMessage","LOG_TAG","X_GOOG_API_CLIENT_VALUE","webchannel_connection_WebChannelConnection","WebChannelConnection","info","pool","baseUrl","modifyHeadersForRequest","headers","header","authHeaders","invoke","rpcName","url","makeUrl","Promise","getObject","xhr","listenOnce","COMPLETE","getLastErrorCode","NO_ERROR","json","getResponseJson","TIMEOUT","HTTP_ERROR","status_1","getStatus","getResponseText","getStatusText","getLastError","releaseObject","requestString","Content-Type","openStream","rpcService","RPC_STREAM_SERVICE_MAPPING","rpcUrlName","RPC_STREAM_NAME_MAPPING","urlParts","webchannelTransport","backgroundChannelTest","httpSessionIdParam","initMessageHeaders","sendRawJson","supportsCrossDomainXhr","channel","createWebChannel","opened","closed","streamBridge","open","unguardedEventListen","listen","param","setTimeout","EventType","OPEN","CLOSE","MESSAGE","msgData","status_2","Write","browser_platform_BrowserPlatform","BrowserPlatform","loadConnection","databaseInfo","newSerializer","encoded","raw","OnlineState","fieldNames","documentId","_DOCUMENT_ID","SyncState","GeneratorIds","view_snapshot_DocumentChangeSet","DocumentChangeSet","changeMap","track","oldChange","getChanges","changes","document_set_DocumentSet","DocumentSet","keyedMap","sortedSet","emptySet","oldSet","prevDoc","thisDoc","otherDoc","docStrings","newSet","obj_map_ObjectMap","ObjectMap","mapKeyFn","inner","id","matches_1","otherKey","splice","entries","entries_1","QueryListenersInfo","listeners","event_manager_EventManager","EventManager","syncEngine","queries","q","onlineState","Unknown","subscribe","onChange","onError","listener","firstListen","queryInfo","onOnlineStateChanged","viewSnap","onViewSnapshot","then","unlisten","lastListen","viewSnaps","viewSnaps_1","event_manager_QueryListener","QueryListener","queryObserver","raisedInitialEvent","snap","syncStateChanged","includeDocumentMetadataChanges","hasPendingWrites","shouldRaiseEvent","shouldRaiseInitialEvent","raiseInitialEvent","maybeOnline","Failed","waitForSyncWhenOnline","hasPendingWritesChanged","includeQueryMetadataChanges","getInitialViewChanges","PersistencePromise","nextCallback","catchCallback","isDone","callbackAttached","catch","nextFn","catchFn","wrapFailure","wrapSuccess","toPromise","wrapUserFunction","waitFor","all","promise","nextPromise","idx","initial","eager_garbage_collector_EagerGarbageCollector","EagerGarbageCollector","isEager","sources","potentialGarbage","addGarbageSource","garbageSource","setGarbageCollector","removeGarbageSource","addPotentialGarbageKey","collectGarbage","promises","garbageKeys","hasRefsPromise","documentHasAnyReferences","hasRefs","source","containsKey","local_view_changes_LocalViewChanges","LocalViewChanges","addedKeys","removedKeys","fromSnapshot","viewSnapshot","reference_set_ReferenceSet","ReferenceSet","refsByKey","reference_set_DocReference","refsByTarget","compareByTargetId","garbageCollector","addReference","ref","addReferences","removeReference","removeRef","removeReferences","removeReferencesForId","emptyKey","startRef","endRef","removeAllReferences","referencesForId","firstRef","DocReference","targetOrBatchId","RESERVED_BITS","PersistentStreamState","TargetIdGenerator","generatorId","initAfter","afterWithoutGenerator","afterGenerator","previousId","forLocalStore","LocalStore","forSyncEngine","SyncEngine","AddedLimboDocument","RemovedLimboDocument","view_View","View","syncedDocuments","syncState","limboDocuments","mutatedKeys","documentSet","computeDocChanges","previousChanges","changeSet","oldDocumentSet","newMutatedKeys","newDocumentSet","needsRefill","lastDocInLimit","newMaybeDoc","oldDoc","docsEqual","applyChanges","sort","limboChanges","applyTargetChange","synced","newSyncState","Synced","Local","shouldBeInLimbo","targetMapping","oldLimboDocuments","QueryView","view","sync_engine_SyncEngine","localStore","remoteStore","currentUser","viewHandler","errorHandler","queryViewsByQuery","queryViewsByTarget","limboTargetsByKey","limboKeysByTarget","limboDocumentRefs","limboCollector","mutationUserCallbacks","targetIdGenerator","assertSubscribed","allocateQuery","executeQuery","remoteDocumentKeys","remoteKeys","viewDocChanges","viewChange","queryView","releaseQuery","removeAndCleanupQuery","write","batch","userCallback","localWrite","addMutationCallback","batchId","emitNewSnapsAndNotifyLocalStore","fillWritePipeline","wrapUpdateFunctionError","runTransaction","updateFunction","retries","transaction","createTransaction","userPromise","commit","applyRemoteEvent","remoteEvent","limboKey","rejectListen","docMap","event_1","queryView_1","applySuccessfulWrite","mutationBatchResult","processUserCallback","acknowledgeBatch","rejectFailedWrite","rejectBatch","newCallbacks","toKey","gcLimboDocuments","updateTrackedLimbos","limboChanges_1","limboChange","trackLimboChange","limboTargetId","currentLimboDocs","newSnaps","docChangesInAllViews","queriesProcessed","notifyLocalViewChanges","fnName","handleUserChange","user","BATCHID_UNKNOWN","mutation_batch_MutationBatch","MutationBatch","mutations","batchResult","mutationResults","keySet","isTombstone","toTombstone","mutation_batch_MutationBatchResult","MutationBatchResult","commitVersion","streamToken","docVersions","versionMap","DbTimestamp","ownerId","leaseTimestampMs","userId","lastAcknowledgedBatchId","lastStreamToken","localWriteTimeMs","DbDocumentMutation","prefixForUser","prefixForPath","PLACEHOLDER","DbNoDocument","noDocument","lastListenSequenceNumber","highestTargetId","highestListenSequenceNumber","lastRemoteSnapshotVersion","ALL_STORES","simple_db_SimpleDb","SimpleDb","openOrCreate","runUpgrade","isAvailable","window","indexedDB","onupgradeneeded","deleteDatabase","ua","navigator","userAgent","mode","objectStores","transactionFn","transactionFnResult","abort","completionPromise","IterationController","dbCursor","shouldStop","nextKey","done","skip","SimpleDbTransaction","objectStoresNames","aborted","onabort","oncomplete","storeName","objectStore","simple_db_SimpleDbStore","SimpleDbStore","put","keyOrValue","loadAll","indexOrRange","iterateCursor","deleteAll","keysOnly","control","iterate","optionsOrCallback","cursorRequest","controller","userResult","primaryKey","skipToKey","continue","indexName","reverse","openKeyCursor","openCursor","indexeddb_mutation_queue_IndexedDbMutationQueue","IndexedDbMutationQueue","serializer","forUser","uid","isUnauthenticated","loadNextBatchIdFromDb","nextBatchId","metadata","checkEmpty","empty","maxBatchId","nextUser","IDBKeyRange","keyForBatchId","getNextBatchId","getHighestAcknowledgedBatchId","getLastStreamToken","setLastStreamToken","addMutationBatch","dbBatch","toDbMutationBatch","mutations_1","indexKey","lookupMutationBatch","fromDbMutationBatch","getNextMutationBatchAfterBatchId","lowerBound","foundBatch","getAllMutationBatches","dbBatches","getAllMutationBatchesThroughBatchId","getAllMutationBatchesAffectingDocumentKey","documentKey","indexPrefix","indexStart","userID","encodedPath","batchID","mutationKey","getAllMutationBatchesAffectingQuery","queryPath","immediateChildrenLength","uniqueBatchIDs","removeMutationBatches","batches","indexTxn","this_1","batches_1","only","numDeleted","removePromise","performConsistencyCheck","startRange","danglingMutationReferences","gc","indexeddb_query_cache_IndexedDbQueryCache","IndexedDbQueryCache","lastSavedVersion","getHighestTargetId","getLastRemoteSnapshotVersion","setLastRemoteSnapshotVersion","addQueryData","addedQueryPromise","toDbTarget","removeQueryData","removeMatchingKeysForTargetId","getQueryData","fromDbTarget","addMatchingKeys","removeMatchingKeys","notifyGCForRemovedKeys","getMatchingKeysForTargetId","indexeddb_remote_document_cache_IndexedDbRemoteDocumentCache","IndexedDbRemoteDocumentCache","addEntry","maybeDocument","toDbRemoteDocument","removeEntry","getEntry","dbRemoteDoc","fromDbRemoteDocument","getDocumentsMatchingQuery","local_serializer_LocalSerializer","LocalSerializer","remoteSerializer","remoteDoc","serializedMutations","m","dbTarget","queryProto","dbTimestamp","EXISTING_OWNER_ERROR_MSG","indexeddb_persistence_IndexedDbPersistence","IndexedDbPersistence","prefix","generateOwnerId","dbName","MAIN_DATABASE","localStoragePrefix","started","simpleDb","tryAcquireOwnerLease","scheduleOwnerLeaseRefreshes","attachWindowUnloadHook","persistenceError","shutdown","detachWindowUnloadHook","stopOwnerLeaseRefreshes","releaseOwnerLease","getMutationQueue","getQueryCache","getRemoteDocumentCache","operation","ensureOwnerLease","buildStoragePrefix","isDefaultDatabase","dbOwner","validOwner","newDbOwner","minAcceptable","maxAcceptable","getZombiedOwnerId","ownerLeaseRefreshHandle","setInterval","reason","clearInterval","windowUnloadHandler","setZombiedOwnerId","addEventListener","removeEventListener","zombiedOwnerId","localStorage","getItem","zombiedOwnerLocalStorageKey","zombieOwnerId","removeItem","setItem","local_documents_view_LocalDocumentsView","LocalDocumentsView","remoteDocumentCache","mutationQueue","getDocument","computeLocalDocument","getDocuments","getDocumentsMatchingDocumentQuery","getDocumentsMatchingCollectionQuery","queryResults","computeLocalDocuments","promisedResults","matchingMutationBatches","matchingKeys","matchingMutationBatches_1","mutatedDoc","remote_document_change_buffer_RemoteDocumentChangeBuffer","RemoteDocumentChangeBuffer","assertChanges","bufferedEntry","local_store_LocalStore","persistence","initialUser","localViewReferences","heldBatchResults","remoteDocuments","queryCache","localDocuments","startMutationQueue","startQueryCache","oldBatches","promisedOldBatches","newBatches","changedKeys","_d","highestAck","ackedBatches","promisedBatch","changedDocuments","affected","shouldHoldBatchResult","documentBuffer_1","releaseBatchResults","promisedAffectedKeys","toReject","affectedKeys","promisedToReject","lastAcked","removeMutationBatch","documentBuffer","changedDocKeys","existingDoc","lastRemoteVersion","remoteVersion","releasedWriteKeys","releaseHeldBatchResults","promisedReleasedWriteKeys","viewChanges","viewChanges_1","nextMutationBatch","afterBatchId","readDocument","cached","documentBuffer_2","garbage","toRelease","isRemoteUpToVersion","batchResults","promiseChain","batchResults_1","applyWriteToRemoteDocuments","affectedDocs","batches_2","docKeys","ackVersion","memory_mutation_queue_MemoryMutationQueue","MemoryMutationQueue","highestAcknowledgedBatchId","batchesByDocumentKey","batchIndex","indexOfExistingBatchId","findMutationBatch","max","rawIndex","indexOfBatchId","getAllLiveMutationBatchesBeforeIndex","endIndex","immediateChildrenPathLength","startPath","rowKeyPath","batchCount","firstBatchId","queueCount","startIndex","queueIndex","length_1","references","memory_query_cache_MemoryQueryCache","MemoryQueryCache","memory_remote_document_cache_MemoryRemoteDocumentCache","MemoryRemoteDocumentCache","iterator","memory_persistence_MemoryPersistence","MemoryPersistence","mutationQueues","queue","MemoryPersistenceTransaction","no_op_garbage_collector_NoOpGarbageCollector","NoOpGarbageCollector","Deferred","backoff_ExponentialBackoff","ExponentialBackoff","initialDelayMs","backoffFactor","maxDelayMs","reset","currentBaseMs","resetToMax","backoffAndWait","def","delayWithJitterMs","jitterDelayMs","persistent_stream___extends","BACKOFF_INITIAL_DELAY_MS","BACKOFF_MAX_DELAY_MS","BACKOFF_FACTOR","persistent_stream_PersistentStream","PersistentStream","connection","credentialsProvider","initialBackoffDelay","stream","backoff","Initial","isStarted","Backoff","Auth","Open","isOpen","performBackoff","auth","stop","Stopped","inhibitBackoff","getToken","startStream","schedule","rpcError","handleStreamClose","dispatchIfNotStopped","startRpc","PersistentListenStream","watchChangeProto","onWatchChange","watch","addTarget","labels","unwatch","removeTarget","persistent_stream_PersistentWriteStream","PersistentWriteStream","handshakeComplete_","responseProto","writeResults","commitTime","onMutationResult","onHandshakeComplete","writeHandshake","writeMutations","writes","datastore_Datastore","Datastore","newPersistentWriteStream","newPersistentWatchStream","params","invokeRPC","response","lookup","transaction_Transaction","Transaction","datastore","readVersions","committed","recordVersion","docVersion","existingVersion","preconditionForUpdate","toMutations","unwritten","remote_store_RemoteStore","RemoteStore","asyncQueue","onlineStateHandler","pendingWrites","lastBatchSeen","accumulatedWatchChanges","watchStream","writeStream","watchStreamOnlineState","watchStreamFailures","enableNetwork","setOnlineStateToHealthy","updateAndBroadcastOnlineState","Healthy","setOnlineStateToUnknown","updateOnlineStateAfterFailure","didChange","isNetworkEnabled","onWatchStreamOpen","onWatchStreamClose","onWatchStreamChange","onWriteStreamOpen","onWriteStreamClose","onWriteHandshakeComplete","shouldStartWatchStream","startWatchStream","disableNetwork","cleanUpWatchStreamState","cleanUpWriteStreamState","sendWatchRequest","sendUnwatchRequest","recordPendingTargetRequest","handleTargetError","handleWatchChangeBatch","aggregator","deletedDoc","trackedRemote","newQueryData","requestQueryData","canWriteMutations","outstandingWrites","shouldStartWriteStream","startWriteStream","handshakeComplete","shift","success","errorHandling","handleWriteError","handleHandshakeError","firestore_client_FirestoreClient","FirestoreClient","usePersistence","initializationDone","persistenceResult","initialized","setUserChangeListener","initializePersistence","initializeRest","startIndexedDbPersistence","canFallback","warn","startMemoryPersistence","storagePrefix","onlineStateChangedHandler","eventMgr","verifyOperationInProgress","removeUserChangeListener","observer","deferred","AsyncObserver","muted","scheduleEvent","mute","eventHandler","async_queue_AsyncQueue","AsyncQueue","tail","delayedOpCount","operationInProgress","delay","deferred_1","scheduleInternal","stack","drain","User","otherUser","GOOGLE_CREDENTIALS","FIRST_PARTY","OAuthToken","Authorization","EmptyCredentialsProvider","userListener","forceRefresh","credentials_FirebaseCredentialsProvider","FirebaseCredentialsProvider","tokenListener","userCounter","newUser","getUser","addAuthTokenListener","initialUserCounter","tokenData","accessToken","removeAuthTokenListener","getUid","currentUid","GoogleCredentialsProvider","authClient","tokenLiteral","credentials_FirstPartyToken","FirstPartyToken","gapi","X-Goog-AuthUser","FirstPartyCredentialsProvider","api_field_value___extends","DeleteFieldValueImpl","serverTimestamp","ServerTimestampFieldValueImpl","PublicFieldValue","RESERVED_FIELD_REGEX","user_data_converter_ParsedSetData","ParsedSetData","user_data_converter_ParsedUpdateData","ParsedUpdateData","user_data_converter_ParseContext","ParseContext","arrayElement","validatePath","childContextForField","childPath","validatePathSegment","childContextForFieldPath","childContextForArray","fieldDescription","user_data_converter_UserDataConverter","UserDataConverter","preConverter","parseSetData","updateData","parseData","parseMergeData","parseUpdateData","fieldMaskPaths","childContext","runPreConverter","parsedValue","mask","parseUpdateVarargs","moreFieldsAndValues","value_1","parseQueryValue","parsed","parseArray","parseObject","parseScalarValue","entryIndex","array_1","entry","parsedEntry","database___extends","DEFAULT_HOST","DEFAULT_SSL","database_FirestoreSettings","FirestoreSettings","settings","FirestoreConfig","Firestore","databaseIdOrApp","_firestoreClient","config","firebaseApp","databaseIdFromApp","external_1","_config","_databaseId","settingsLiteral","newSettings","enablePersistence","configureClient","ensureClientConfigured","thisDb","otherDb","_key","_dataConverter","collection","pathString","database_CollectionReference","forPath","database_Transaction","database_WriteBatch","SILENT","level","_firestore","_transaction","fieldOrUpdateData","WriteBatch","_mutations","_committed","verifyNotCommitted","DocumentReference","isEqual","onSnapshot","includeMetadataChanges","currArg","internalOptions","complete","onSnapshotInternal","errHandler","asyncObserver","internalListener","DocumentSnapshot","_document","_fromCache","convertObject","convertValue","convertArray","database_Query","_query","opStr","validateNewFilter","directionStr","validateNewOrderBy","docOrField","boundFromDocOrFields","startAfter","endBefore","boundFromDocument","allFields","boundFromFields","components","rawValue","wrapped","database_QuerySnapshot","firestoreClient","existingField","validateOrderByAndInequalityMatch","inequality","QuerySnapshot","_originalQuery","_snapshot","_cachedChanges","thisArg","convertToDocumentImpl","CollectionReference","parentPath","docRef","PublicFirestore","PublicTransaction","PublicWriteBatch","PublicDocumentReference","PublicDocumentSnapshot","PublicQuery","PublicQuerySnapshot","PublicCollectionReference","115","l","a","aa","ba","propertyIsEnumerable","ca","da","fa","ha","unshift","r","Function","ia","u","L","Bb","ja","captureStackTrace","ka","ma","na","oa","w","qa","ra","ea","va","wa","xa","ya","y","x","Ba","Ca","Da","Ea","Ga","Fa","Ha","Ia","Ja","Oa","documentMode","Ua","la","Pa","h","A","Qa","ab","relatedTarget","button","screenY","screenX","clientY","clientX","metaKey","shiftKey","altKey","ctrlKey","pointerId","pointerType","changedTouches","srcElement","Ma","nodeName","fromElement","toElement","pageX","pageY","bb","defaultPrevented","fb","src","capture","eb","X","gb","hb","jb","sa","kb","ib","ob","once","pb","qb","$","rb","sb","lb","tb","$a","attachEvent","ub","nb","vb","Ya","wb","xb","detachEvent","mb","yb","zb","keyCode","returnValue","parentNode","Ab","handleEvent","B","P","J","Cb","Db","eval","Eb","Fb","Gb","Boolean","Hb","valueOf","Kb","Ib","Lb","g","Mb","Ob","Pb","Nb","Qb","Sb","MessageChannel","postMessage","createElement","style","display","documentElement","appendChild","contentWindow","location","protocol","origin","port1","onmessage","port2","onreadystatechange","removeChild","Ub","Tb","Vb","setImmediate","Window","Rb","C","Wb","Xb","t","Yb","Z","K","clearTimeout","Zb","$b","ac","W","D","cc","dc","fc","E","lc","F","G","hc","oc","nc","mc","jc","lastIndexOf","pc","ic","H","kc","qc","rc","parse","Sa","Jb","Pe","I","sc","tc","uc","dispatchEvent","vc","wc","xc","Ac","Bc","Cc","Ec","Fc","ActiveXObject","XMLHttpRequest","S","M","Gc","Hc","T","o","j","N","Ic","Lc","Mc","Nc","Oc","Pc","Qc","Ra","ta","Sc","Wc","Kc","Jc","Tc","Uc","Vc","Xc","Rc","Ka","Y","Na","Yc","Zc","O","ad","bd","$c","dd","decodeURIComponent","Q","ed","fd","gd","hd","match","cd","jd","kd","qd","ld","rd","R","sd","abs","td","ud","decodeURI","encodeURI","vd","xd","wd","yd","toLowerCase","zd","Bd","Ad","Cd","Dd","Fd","Gd","Hd","Id","Jd","Kd","Md","Nd","Od","Pd","pa","La","Qd","Rd","Sd","Td","Ud","Vd","Wd","Xd","encodeURIComponent","Yd","Image","onload","Zd","ontimeout","U","$d","ee","z","timeout","ce","fe","ge","he","goog","V","self","ae","de","readyState","ie","je","ke","za","Va","Aa","ga","concurrentRequestLimit","fastHandshake","le","me","ne","sendBeacon","oe","cancel","pe","qe","re","te","se","round","Wa","ue","ve","we","xe","Ld","ye","hostname","port","ze","Ae","Be","testUrl","messageUrlParams","messageHeaders","clientProtocolHeaderRequired","X-Client-Protocol","httpHeadersOverwriteParam","Ce","De","Ee","Ge","He","Ie","Je","Ke","Le","Me","Ne","Oe","trim","Ta","parseFloat","compatMode","Xa","freeze","Za","2","3","4","preventDefault","\"","\\","/","\b","\f","\n","\r","\t","\u000b","bc","ec","timeStamp","msWriteProfilerMark","yc","zc","Dc","md","nd","od","pd","Ed","getResponseHeader","be","toUpperCase","FormData","setRequestHeader","responseType","withCredentials","statusText","responseText","__data__","Fe","createWebChannelTransport","ErrorCode","WebChannel","XhrIoPool"],"mappings":";;;;;AAKA,IACQA,sBAAsB,IAExBC,IACA,SAAUC,EAAQC,EAASC,GCOjCA,EAAA,MDgBMC,IACA,SAAUH,EAAQI,EAAqBF,GAE7C,YEVA,SAAAG,KACA,MAAAC,IAEA,QAAAC,GAAAC,GACAF,GAAAE,EAEA,QAAAC,GAAAC,EAAAC,GAEA,OADAC,MACAC,EAAA,EAAoBA,EAAAC,UAAAC,OAAuBF,IAC3CD,EAAAC,EAAA,GAAAC,UAAAD,EAEA,IAAAP,IAAAU,GAAAC,MAAA,CACA,GAAAC,IAAA,GAAAC,OAAAC,cACAC,EAAAT,EAAAU,IAAAC,EACAC,SAAAC,IAAAC,MAAAF,SAAA,cAAAG,GAAA,KAAAT,EAAA,KAAAR,EAAA,MAAAC,GAAAiB,OAAAP,KAGA,QAAAQ,GAAAlB,GAEA,OADAC,MACAC,EAAA,EAAoBA,EAAAC,UAAAC,OAAuBF,IAC3CD,EAAAC,EAAA,GAAAC,UAAAD,EAEA,IAAAP,IAAAU,GAAAc,MAAA,CACA,GAAAZ,IAAA,GAAAC,OAAAC,cACAC,EAAAT,EAAAU,IAAAC,EACAC,SAAAO,MAAAL,MAAAF,SAAA,cAAAG,GAAA,KAAAT,EAAA,KAAAP,GAAAiB,OAAAP,KAMA,QAAAE,GAAAX,GACA,mBAAAA,GACA,MAAAA,EAGA,KACA,MAAAoB,MAAAC,UAAArB,GAEA,MAAAsB,GAEA,MAAAtB,IC1CA,QAAAuB,GAAAC,GAGA,GAAAC,GAAA,cAAAV,GAAA,gCAAAS,CAKA,MAJAP,GAAAQ,GAIAC,MAAAD,GAMA,QAAAE,GAAAC,EAAAH,GACAG,GACAL,EAAAE,GCGA,QAAAI,KACA,MAAAC,IAAAC,cAAAF,gBCfA,QAAAG,GAAAC,EAAAC,GACA,QAAAC,KACA,GAAAhB,GAAA,8BAKA,MAJAe,KACAf,GAAA,IAC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AA05B,cAAA0uC,EAAApoE,UAAAk4D,GAAyCkQ,EAAApoE,UAAAo5B,gBAAAgvC,EAAApoE,UAAA4sE,GAA2CxE,EAAApoE,UAAAy5B,gBAAA2uC,EAAApoE,UAAAooE,EAA0CA,EAAApoE,UAAAy5B,gBAAA2uC,EAAApoE,UAAAooE,EAA0CA,EAAApoE,UAAAw3B,KAAA4wC,EAAApoE,UAAAwjE,GAAgC3mE,OAAAC,SAAgBmyE,0BAAAD,GAAAE,UAAApB,GAAAzyC,UAAA0yC,GAAAoB,WAAA1I,GAAA2I,UAAA1P,KAAmFp/D,KAAA,mBAAA+tC,eAAA/7B,SnF2qgB5U,MACO,MAAM1T,GACN,KAAUO,OACR","file":"firebase-firestore.js","sourcesContent":["/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\ntry {\n webpackJsonpFirebase([1],{\n\n/***/ 113:\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n__webpack_require__(114);\n\n\n/***/ }),\n\n/***/ 114:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ../app/dist/esm/index.js + 1 modules\nvar esm = __webpack_require__(6);\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/version.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** The semver (www.semver.org) version of the SDK. */\nvar SDK_VERSION = esm[\"default\"].SDK_VERSION;\n\n//# sourceMappingURL=version.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/log.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* tslint:disable:no-console */\n\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel[LogLevel[\"SILENT\"] = 2] = \"SILENT\";\n})(LogLevel = LogLevel || (LogLevel = {}));\nvar logLevel = LogLevel.ERROR;\n// Helper methods are needed because variables can't be exported as read/write\nfunction getLogLevel() {\n return logLevel;\n}\nfunction setLogLevel(newLevel) {\n logLevel = newLevel;\n}\nfunction debug(tag, msg) {\n var obj = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n obj[_i - 2] = arguments[_i];\n }\n if (logLevel <= LogLevel.DEBUG) {\n var time = new Date().toISOString();\n var args = obj.map(argToString);\n console.log.apply(console, [\"Firestore (\" + SDK_VERSION + \") \" + time + \" [\" + tag + \"]: \" + msg].concat(args));\n }\n}\nfunction log_error(msg) {\n var obj = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n obj[_i - 1] = arguments[_i];\n }\n if (logLevel <= LogLevel.ERROR) {\n var time = new Date().toISOString();\n var args = obj.map(argToString);\n console.error.apply(console, [\"Firestore (\" + SDK_VERSION + \") \" + time + \": \" + msg].concat(args));\n }\n}\n/**\n * Converts an additional log parameter to a string representation.\n */\nfunction argToString(obj) {\n if (typeof obj === 'string') {\n return obj;\n }\n else {\n try {\n return JSON.stringify(obj);\n }\n catch (e) {\n // Converting to JSON failed, just log the object directly\n return obj;\n }\n }\n}\n\n//# sourceMappingURL=log.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/assert.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * Unconditionally fails, throwing an Error with the given message.\n *\n * Returns any so it can be used in expressions:\n * @example\n * let futureVar = fail('not implemented yet');\n */\nfunction fail(failure) {\n // Log the failure in addition to throw an exception, just in case the\n // exception is swallowed.\n var message = \"FIRESTORE (\" + SDK_VERSION + \") INTERNAL ASSERTION FAILED: \" + failure;\n log_error(message);\n // NOTE: We don't use FirestoreError here because these are internal failures\n // that cannot be handled by the user. (Also it would create a circular\n // dependency between the error and assert modules which doesn't work.)\n throw new Error(message);\n}\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n */\nfunction assert(assertion, message) {\n if (!assertion) {\n fail(message);\n }\n}\n\n//# sourceMappingURL=assert.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/platform/platform.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Provides singleton helpers where setup code can inject a platform at runtime.\n * setPlatform needs to be set before Firestore is used and must be set exactly\n * once.\n */\nvar platform_PlatformSupport = /** @class */ (function () {\n function PlatformSupport() {\n }\n PlatformSupport.setPlatform = function (platform) {\n if (PlatformSupport.platform) {\n fail('Platform already defined');\n }\n PlatformSupport.platform = platform;\n };\n PlatformSupport.getPlatform = function () {\n if (!PlatformSupport.platform) {\n fail('Platform not set');\n }\n return PlatformSupport.platform;\n };\n return PlatformSupport;\n}());\n\n/**\n * Returns the representation of an empty \"proto\" byte string for the\n * platform.\n */\nfunction emptyByteString() {\n return platform_PlatformSupport.getPlatform().emptyByteString;\n}\n\n//# sourceMappingURL=platform.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/error.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n// TODO(mcg): Change to a string enum once we've upgraded to typescript 2.4.\n// tslint:disable-next-line:variable-name Intended to look like a TS 2.4 enum\nvar Code = {\n // Causes are copied from:\n // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n /** Not an error; returned on success. */\n OK: 'ok',\n /** The operation was cancelled (typically by the caller). */\n CANCELLED: 'cancelled',\n /** Unknown error or an error from a different error domain. */\n UNKNOWN: 'unknown',\n /**\n * Client specified an invalid argument. Note that this differs from\n * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are\n * problematic regardless of the state of the system (e.g., a malformed file\n * name).\n */\n INVALID_ARGUMENT: 'invalid-argument',\n /**\n * Deadline expired before operation could complete. For operations that\n * change the state of the system, this error may be returned even if the\n * operation has completed successfully. For example, a successful response\n * from a server could have been delayed long enough for the deadline to\n * expire.\n */\n DEADLINE_EXCEEDED: 'deadline-exceeded',\n /** Some requested entity (e.g., file or directory) was not found. */\n NOT_FOUND: 'not-found',\n /**\n * Some entity that we attempted to create (e.g., file or directory) already\n * exists.\n */\n ALREADY_EXISTS: 'already-exists',\n /**\n * The caller does not have permission to execute the specified operation.\n * PERMISSION_DENIED must not be used for rejections caused by exhausting\n * some resource (use RESOURCE_EXHAUSTED instead for those errors).\n * PERMISSION_DENIED must not be used if the caller can not be identified\n * (use UNAUTHENTICATED instead for those errors).\n */\n PERMISSION_DENIED: 'permission-denied',\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n */\n UNAUTHENTICATED: 'unauthenticated',\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or perhaps the\n * entire file system is out of space.\n */\n RESOURCE_EXHAUSTED: 'resource-exhausted',\n /**\n * Operation was rejected because the system is not in a state required for\n * the operation's execution. For example, directory to be deleted may be\n * non-empty, an rmdir operation is applied to a non-directory, etc.\n *\n * A litmus test that may help a service implementor in deciding\n * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:\n * (a) Use UNAVAILABLE if the client can retry just the failing call.\n * (b) Use ABORTED if the client should retry at a higher-level\n * (e.g., restarting a read-modify-write sequence).\n * (c) Use FAILED_PRECONDITION if the client should not retry until\n * the system state has been explicitly fixed. E.g., if an \"rmdir\"\n * fails because the directory is non-empty, FAILED_PRECONDITION\n * should be returned since the client should not retry unless\n * they have first fixed up the directory by deleting files from it.\n * (d) Use FAILED_PRECONDITION if the client performs conditional\n * REST Get/Update/Delete on a resource and the resource on the\n * server does not match the condition. E.g., conflicting\n * read-modify-write on the same resource.\n */\n FAILED_PRECONDITION: 'failed-precondition',\n /**\n * The operation was aborted, typically due to a concurrency issue like\n * sequencer check failures, transaction aborts, etc.\n *\n * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n * and UNAVAILABLE.\n */\n ABORTED: 'aborted',\n /**\n * Operation was attempted past the valid range. E.g., seeking or reading\n * past end of file.\n *\n * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed\n * if the system state changes. For example, a 32-bit file system will\n * generate INVALID_ARGUMENT if asked to read at an offset that is not in the\n * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from\n * an offset past the current file size.\n *\n * There is a fair bit of overlap between FAILED_PRECONDITION and\n * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)\n * when it applies so that callers who are iterating through a space can\n * easily look for an OUT_OF_RANGE error to detect when they are done.\n */\n OUT_OF_RANGE: 'out-of-range',\n /** Operation is not implemented or not supported/enabled in this service. */\n UNIMPLEMENTED: 'unimplemented',\n /**\n * Internal errors. Means some invariants expected by underlying System has\n * been broken. If you see one of these errors, Something is very broken.\n */\n INTERNAL: 'internal',\n /**\n * The service is currently unavailable. This is a most likely a transient\n * condition and may be corrected by retrying with a backoff.\n *\n * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n * and UNAVAILABLE.\n */\n UNAVAILABLE: 'unavailable',\n /** Unrecoverable data loss or corruption. */\n DATA_LOSS: 'data-loss'\n};\n/**\n * An error class used for Firestore-generated errors. Ideally we should be\n * using FirebaseError, but integrating with it is overly arduous at the moment,\n * so we define our own compatible error class (with a `name` of 'FirebaseError'\n * and compatible `code` and `message` fields.)\n */\nvar FirestoreError = /** @class */ (function (_super) {\n __extends(FirestoreError, _super);\n function FirestoreError(code, message) {\n var _this = _super.call(this, message) || this;\n _this.code = code;\n _this.message = message;\n _this.name = 'FirebaseError';\n // HACK: We write a toString property directly because Error is not a real\n // class and so inheritance does not work correctly. We could alternatively\n // do the same \"back-door inheritance\" trick that FirebaseError does.\n _this.toString = function () { return _this.name + \": [code=\" + _this.code + \"]: \" + _this.message; };\n return _this;\n }\n return FirestoreError;\n}(Error));\n\n\n//# sourceMappingURL=error.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/api.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// We are doing some heavy reflective stuff, lots of any casting necessary\n/* tslint:disable:no-any */\n\n/**\n * Helper function to prevent instantiation through the constructor.\n *\n * This method creates a new constructor that throws when it's invoked.\n * The prototype of that constructor is then set to the prototype of the hidden\n * \"class\" to expose all the prototype methods and allow for instanceof\n * checks.\n *\n * To also make all the static methods available, all properties of the\n * original constructor are copied to the new constructor.\n */\nfunction makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\n }\n // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n PublicConstructor.prototype = cls.prototype;\n // Copy any static methods/members\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n return PublicConstructor;\n}\n\n//# sourceMappingURL=api.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/obj.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction contains(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\nfunction get(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key) ? obj[key] : null;\n}\nfunction obj_size(obj) {\n var count = 0;\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n count++;\n }\n }\n return count;\n}\n/** Returns the given value if it's defined or the defaultValue otherwise. */\nfunction defaulted(value, defaultValue) {\n return value !== undefined ? value : defaultValue;\n}\nfunction forEachNumber(obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var num = parseInt(key, 10);\n if (!isNaN(num)) {\n fn(num, obj[key]);\n }\n }\n }\n}\nfunction forEach(obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn(key, obj[key]);\n }\n }\n}\nfunction lookupOrInsert(obj, key, valFn) {\n if (!contains(obj, key)) {\n obj[key] = valFn();\n }\n return obj[key];\n}\nfunction isEmpty(obj) {\n assert(obj != null && typeof obj === 'object', 'isEmpty() expects object parameter.');\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n}\nfunction shallowCopy(obj) {\n assert(obj && typeof obj === 'object', 'shallowCopy() expects object parameter.');\n var result = {};\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n//# sourceMappingURL=obj.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/input_validation.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * Validates the invocation of functionName has the exact number of arguments.\n *\n * Forward the magic \"arguments\" variable as second parameter on which the\n * parameter validation is performed:\n * validateExactNumberOfArgs('myFunction', arguments, 2);\n */\nfunction validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}\n/**\n * Validates the invocation of functionName has at least the provided number of\n * arguments (but can have many more).\n *\n * Forward the magic \"arguments\" variable as second parameter on which the\n * parameter validation is performed:\n * validateAtLeastNumberOfArgs('myFunction', arguments, 2);\n */\nfunction validateAtLeastNumberOfArgs(functionName, args, minNumberOfArgs) {\n if (args.length < minNumberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires at least \" +\n formatPlural(minNumberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}\n/**\n * Validates the invocation of functionName has number of arguments between\n * the values provided.\n *\n * Forward the magic \"arguments\" variable as second parameter on which the\n * parameter validation is performed:\n * validateBetweenNumberOfArgs('myFunction', arguments, 2, 3);\n */\nfunction validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs + \" and \" +\n (maxNumberOfArgs + \" arguments, but was called with \") +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}\n/**\n * Validates the provided argument is an array and has as least the expected\n * number of elements.\n */\nfunction validateNamedArrayAtLeastNumberOfElements(functionName, value, name, minNumberOfElements) {\n if (!(value instanceof Array) || value.length < minNumberOfElements) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + name + \" argument to be an \" +\n 'array with at least ' +\n (formatPlural(minNumberOfElements, 'element') + \".\"));\n }\n}\n/**\n * Validates the provided positional argument has the native JavaScript type\n * using typeof checks.\n */\nfunction validateArgType(functionName, type, position, argument) {\n validateType(functionName, type, ordinal(position) + \" argument\", argument);\n}\n/**\n * Validates the provided argument has the native JavaScript type using\n * typeof checks or is undefined.\n */\nfunction validateOptionalArgType(functionName, type, position, argument) {\n if (argument !== undefined) {\n validateArgType(functionName, type, position, argument);\n }\n}\n/**\n * Validates the provided named option has the native JavaScript type using\n * typeof checks.\n */\nfunction validateNamedType(functionName, type, optionName, argument) {\n validateType(functionName, type, optionName + \" option\", argument);\n}\n/**\n * Validates the provided named option has the native JavaScript type using\n * typeof checks or is undefined.\n */\nfunction validateNamedOptionalType(functionName, type, optionName, argument) {\n if (argument !== undefined) {\n validateNamedType(functionName, type, optionName, argument);\n }\n}\n/** Helper to validate the type of a provided input. */\nfunction validateType(functionName, type, inputName, input) {\n if (typeof input !== type || (type === 'object' && !isPlainObject(input))) {\n var description = valueDescription(input);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + inputName + \" \" +\n (\"to be of type \" + type + \", but it was: \" + description));\n }\n}\n/**\n * Returns true iff it's a non-null object without a custom prototype\n * (i.e. excludes Array, Date, etc.).\n */\nfunction isPlainObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n Object.getPrototypeOf(input) === Object.prototype);\n}\n/** Returns a string describing the type / value of the provided input. */\nfunction valueDescription(input) {\n if (input === undefined) {\n return 'undefined';\n }\n else if (input === null) {\n return 'null';\n }\n else if (typeof input === 'string') {\n if (input.length > 20) {\n input = input.substring(0, 20) + \"...\";\n }\n return JSON.stringify(input);\n }\n else if (typeof input === 'number' || typeof input === 'boolean') {\n return '' + input;\n }\n else if (typeof input === 'object') {\n if (input instanceof Array) {\n return 'an array';\n }\n else {\n var customObjectName = tryGetCustomObjectType(input);\n if (customObjectName) {\n return \"a custom \" + customObjectName + \" object\";\n }\n else {\n return 'an object';\n }\n }\n }\n else if (typeof input === 'function') {\n return 'a function';\n }\n else {\n return fail('Unknown wrong type: ' + typeof input);\n }\n}\n/** Hacky method to try to get the constructor name for an object. */\nfunction tryGetCustomObjectType(input) {\n if (input.constructor) {\n var funcNameRegex = /function\\s+([^\\s(]+)\\s*\\(/;\n var results = funcNameRegex.exec(input.constructor.toString());\n if (results && results.length > 1) {\n return results[1];\n }\n }\n return null;\n}\n/** Validates the provided argument is defined. */\nfunction validateDefined(functionName, position, argument) {\n if (argument === undefined) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires a valid \" + ordinal(position) + \" \" +\n \"argument, but it was undefined.\");\n }\n}\n/**\n * Validates the provided positional argument is an object, and its keys and\n * values match the expected keys and types provided in optionTypes.\n */\nfunction validateOptionNames(functionName, options, optionNames) {\n forEach(options, function (key, _) {\n if (optionNames.indexOf(key) < 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Unknown option '\" + key + \"' passed to function \" + functionName + \"(). \" +\n 'Available options: ' +\n optionNames.join(', '));\n }\n });\n}\n/**\n * Helper method to throw an error that the provided argument did not pass\n * an instanceof check.\n */\nfunction invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}\n/** Converts a number to its english word representation */\nfunction ordinal(num) {\n switch (num) {\n case 1:\n return 'first';\n case 2:\n return 'second';\n case 3:\n return 'third';\n default:\n return num + 'th';\n }\n}\n/**\n * Formats the given word as plural conditionally given the preceding number.\n */\nfunction formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}\n\n//# sourceMappingURL=input_validation.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/misc.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// tslint:disable-next-line:class-as-namespace\nvar misc_AutoId = /** @class */ (function () {\n function AutoId() {\n }\n AutoId.newId = function () {\n // Alphanumeric characters\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var autoId = '';\n for (var i = 0; i < 20; i++) {\n autoId += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n assert(autoId.length === 20, 'Invalid auto ID: ' + autoId);\n return autoId;\n };\n return AutoId;\n}());\n\nfunction primitiveComparator(left, right) {\n if (left < right)\n return -1;\n if (left > right)\n return 1;\n return 0;\n}\n/** Helper to compare nullable (or undefined-able) objects using equals(). */\nfunction equals(left, right) {\n if (left !== null && left !== undefined) {\n return !!(right && left.equals(right));\n }\n else {\n // HACK: Explicitly cast since TypeScript's type narrowing apparently isn't\n // smart enough.\n return left === right;\n }\n}\n/** Helper to compare arrays using equals(). */\nfunction arrayEquals(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (!left[i].equals(right[i])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Returns the largest lexicographically smaller string of equal or smaller\n * length. Returns an empty string if there is no such predecessor (if the input\n * is empty).\n *\n * Strings returned from this method can be invalid UTF-16 but this is sufficent\n * in use for indexeddb because that depends on lexicographical ordering but\n * shouldn't be used elsewhere.\n */\nfunction immediatePredecessor(s) {\n // We can decrement the last character in the string and be done\n // unless that character is 0 (0x0000), in which case we have to erase the\n // last character.\n var lastIndex = s.length - 1;\n if (s.length === 0) {\n // Special case the empty string.\n return '';\n }\n else if (s.charAt(lastIndex) === '\\0') {\n return s.substring(0, lastIndex);\n }\n else {\n return (s.substring(0, lastIndex) +\n String.fromCharCode(s.charCodeAt(lastIndex) - 1));\n }\n}\n/**\n * Returns the immediate lexicographically-following string. This is useful to\n * construct an inclusive range for indexeddb iterators.\n */\nfunction immediateSuccessor(s) {\n // Return the input string, with an additional NUL byte appended.\n return s + '\\0';\n}\n\n//# sourceMappingURL=misc.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/blob.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(Code.UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.');\n }\n}\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available() {\n if (!platform_PlatformSupport.getPlatform().base64Available) {\n throw new FirestoreError(Code.UNIMPLEMENTED, 'Blobs are unavailable in Firestore in this environment.');\n }\n}\n/**\n * Immutable class holding a blob (binary data).\n * This class is directly exposed in the public API.\n *\n * Note that while you can't hide the constructor in JavaScript code, we are\n * using the hack above to make sure no-one outside this module can call it.\n */\nvar blob_Blob = /** @class */ (function () {\n function Blob(binaryString) {\n assertBase64Available();\n this._binaryString = binaryString;\n }\n Blob.fromBase64String = function (base64) {\n validateExactNumberOfArgs('Blob.fromBase64String', arguments, 1);\n validateArgType('Blob.fromBase64String', 'string', 1, base64);\n assertBase64Available();\n try {\n var binaryString = platform_PlatformSupport.getPlatform().atob(base64);\n return new Blob(binaryString);\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Failed to construct Blob from Base64 string: ' + e);\n }\n };\n Blob.fromUint8Array = function (array) {\n validateExactNumberOfArgs('Blob.fromUint8Array', arguments, 1);\n assertUint8ArrayAvailable();\n if (!(array instanceof Uint8Array)) {\n throw invalidClassError('Blob.fromUint8Array', 'Uint8Array', 1, array);\n }\n // We can't call array.map directly because it expects the return type to\n // be a Uint8Array, whereas we can convert it to a regular array by invoking\n // map on the Array prototype.\n var binaryString = Array.prototype.map\n .call(array, function (char) {\n return String.fromCharCode(char);\n })\n .join('');\n return new Blob(binaryString);\n };\n Blob.prototype.toBase64 = function () {\n validateExactNumberOfArgs('Blob.toBase64', arguments, 0);\n assertBase64Available();\n return platform_PlatformSupport.getPlatform().btoa(this._binaryString);\n };\n Blob.prototype.toUint8Array = function () {\n validateExactNumberOfArgs('Blob.toUint8Array', arguments, 0);\n assertUint8ArrayAvailable();\n var buffer = new Uint8Array(this._binaryString.length);\n for (var i = 0; i < this._binaryString.length; i++) {\n buffer[i] = this._binaryString.charCodeAt(i);\n }\n return buffer;\n };\n Blob.prototype.toString = function () {\n return 'Blob(base64: ' + this.toBase64() + ')';\n };\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n Blob.prototype._equals = function (other) {\n return this._binaryString === other._binaryString;\n };\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n Blob.prototype._compareTo = function (other) {\n return primitiveComparator(this._binaryString, other._binaryString);\n };\n return Blob;\n}());\n\n// Public instance that disallows construction at runtime. This constructor is\n// used when exporting Blob on firebase.firestore.Blob and will be called Blob\n// publicly. Internally we still use Blob which has a type checked private\n// constructor. Note that Blob and PublicBlob can be used interchangeably in\n// instanceof checks.\n// For our internal TypeScript code PublicBlob doesn't exist as a type, and so\n// we need to use Blob as type and export it too.\n// tslint:disable-next-line:variable-name We're treating this as a class name.\nvar PublicBlob = makeConstructorPrivate(blob_Blob, 'Use Blob.fromUint8Array() or Blob.fromBase64String() instead.');\n\n//# sourceMappingURL=blob.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/geo_point.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * Immutable class representing a geo point as latitude-longitude pair.\n * This class is directly exposed in the public API, including its constructor.\n */\nvar geo_point_GeoPoint = /** @class */ (function () {\n function GeoPoint(latitude, longitude) {\n validateExactNumberOfArgs('GeoPoint', arguments, 2);\n validateArgType('GeoPoint', 'number', 1, latitude);\n validateArgType('GeoPoint', 'number', 2, longitude);\n if (!isFinite(latitude) || latitude < -90 || latitude > 90) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Latitude must be a number between -90 and 90, but was: ' + latitude);\n }\n if (!isFinite(longitude) || longitude < -180 || longitude > 180) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Longitude must be a number between -180 and 180, but was: ' + longitude);\n }\n this._lat = latitude;\n this._long = longitude;\n }\n Object.defineProperty(GeoPoint.prototype, \"latitude\", {\n /**\n * Returns the latitude of this geo point, a number between -90 and 90.\n */\n get: function () {\n return this._lat;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GeoPoint.prototype, \"longitude\", {\n /**\n * Returns the longitude of this geo point, a number between -180 and 180.\n */\n get: function () {\n return this._long;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n GeoPoint.prototype._equals = function (other) {\n return this._lat === other._lat && this._long === other._long;\n };\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n GeoPoint.prototype._compareTo = function (other) {\n return (primitiveComparator(this._lat, other._lat) ||\n primitiveComparator(this._long, other._long));\n };\n return GeoPoint;\n}());\n\n\n//# sourceMappingURL=geo_point.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/database_info.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar DatabaseInfo = /** @class */ (function () {\n /**\n * Constructs a DatabaseInfo using the provided host, databaseId and\n * persistenceKey.\n *\n * @param databaseId The database to use.\n * @param persistenceKey A unique identifier for this Firestore's local\n * storage (used in conjunction with the databaseId).\n * @param host The Firestore backend host to connect to.\n * @param ssl Whether to use SSL when connecting.\n */\n function DatabaseInfo(databaseId, persistenceKey, host, ssl) {\n this.databaseId = databaseId;\n this.persistenceKey = persistenceKey;\n this.host = host;\n this.ssl = ssl;\n }\n return DatabaseInfo;\n}());\n\n/** The default database name for a project. */\nvar DEFAULT_DATABASE_NAME = '(default)';\n/** Represents the database ID a Firestore client is associated with. */\nvar database_info_DatabaseId = /** @class */ (function () {\n function DatabaseId(projectId, database) {\n this.projectId = projectId;\n this.database = database ? database : DEFAULT_DATABASE_NAME;\n }\n Object.defineProperty(DatabaseId.prototype, \"isDefaultDatabase\", {\n get: function () {\n return this.database === DEFAULT_DATABASE_NAME;\n },\n enumerable: true,\n configurable: true\n });\n DatabaseId.prototype.equals = function (other) {\n return (other instanceof DatabaseId &&\n other.projectId === this.projectId &&\n other.database === this.database);\n };\n DatabaseId.prototype.compareTo = function (other) {\n return (primitiveComparator(this.projectId, other.projectId) ||\n primitiveComparator(this.database, other.database));\n };\n return DatabaseId;\n}());\n\n\n//# sourceMappingURL=database_info.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/path.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar path___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar DOCUMENT_KEY_NAME = '__name__';\n/**\n * Path represents an ordered sequence of string segments.\n */\nvar path_Path = /** @class */ (function () {\n function Path(segments, offset, length) {\n this.init(segments, offset, length);\n }\n /**\n * An initialization method that can be called from outside the constructor.\n * We need this so that we can have a non-static construct method that returns\n * the polymorphic `this` type.\n */\n Path.prototype.init = function (segments, offset, length) {\n if (offset === undefined) {\n offset = 0;\n }\n else if (offset > segments.length) {\n fail('offset ' + offset + ' out of range ' + segments.length);\n }\n if (length === undefined) {\n length = segments.length - offset;\n }\n else if (length > segments.length - offset) {\n fail('length ' + length + ' out of range ' + (segments.length - offset));\n }\n this.segments = segments;\n this.offset = offset;\n this.len = length;\n };\n /**\n * Constructs a new instance of Path using the same concrete type as `this`.\n * We need this instead of using the normal constructor, because polymorphic\n * `this` doesn't work on static methods.\n */\n Path.prototype.construct = function (segments, offset, length) {\n var path = Object.create(Object.getPrototypeOf(this));\n path.init(segments, offset, length);\n return path;\n };\n Object.defineProperty(Path.prototype, \"length\", {\n get: function () {\n return this.len;\n },\n enumerable: true,\n configurable: true\n });\n Path.prototype.equals = function (other) {\n return Path.comparator(this, other) === 0;\n };\n Path.prototype.child = function (nameOrPath) {\n var segments = this.segments.slice(this.offset, this.limit());\n if (nameOrPath instanceof Path) {\n nameOrPath.forEach(function (segment) {\n segments.push(segment);\n });\n }\n else if (typeof nameOrPath === 'string') {\n segments.push(nameOrPath);\n }\n else {\n fail('Unknown parameter type for Path.child(): ' + nameOrPath);\n }\n return this.construct(segments);\n };\n /** The index of one past the last segment of the path. */\n Path.prototype.limit = function () {\n return this.offset + this.length;\n };\n Path.prototype.popFirst = function (size) {\n size = size === undefined ? 1 : size;\n assert(this.length >= size, \"Can't call popFirst() with less segments\");\n return this.construct(this.segments, this.offset + size, this.length - size);\n };\n Path.prototype.popLast = function () {\n assert(!this.isEmpty(), \"Can't call popLast() on empty path\");\n return this.construct(this.segments, this.offset, this.length - 1);\n };\n Path.prototype.firstSegment = function () {\n assert(!this.isEmpty(), \"Can't call firstSegment() on empty path\");\n return this.segments[this.offset];\n };\n Path.prototype.lastSegment = function () {\n assert(!this.isEmpty(), \"Can't call lastSegment() on empty path\");\n return this.segments[this.limit() - 1];\n };\n Path.prototype.get = function (index) {\n assert(index < this.length, 'Index out of range');\n return this.segments[this.offset + index];\n };\n Path.prototype.isEmpty = function () {\n return this.length === 0;\n };\n Path.prototype.isPrefixOf = function (other) {\n if (other.length < this.length) {\n return false;\n }\n for (var i = 0; i < this.length; i++) {\n if (this.get(i) !== other.get(i)) {\n return false;\n }\n }\n return true;\n };\n Path.prototype.forEach = function (fn) {\n for (var i = this.offset, end = this.limit(); i < end; i++) {\n fn(this.segments[i]);\n }\n };\n Path.prototype.toArray = function () {\n return this.segments.slice(this.offset, this.limit());\n };\n Path.comparator = function (p1, p2) {\n var len = Math.min(p1.length, p2.length);\n for (var i = 0; i < len; i++) {\n var left = p1.get(i);\n var right = p2.get(i);\n if (left < right)\n return -1;\n if (left > right)\n return 1;\n }\n if (p1.length < p2.length)\n return -1;\n if (p1.length > p2.length)\n return 1;\n return 0;\n };\n return Path;\n}());\n\n/**\n * A slash-separated path for navigating resources (documents and collections)\n * within Firestore.\n */\nvar path_ResourcePath = /** @class */ (function (_super) {\n path___extends(ResourcePath, _super);\n function ResourcePath() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ResourcePath.prototype.canonicalString = function () {\n // NOTE: The client is ignorant of any path segments containing escape\n // sequences (e.g. __id123__) and just passes them through raw (they exist\n // for legacy reasons and should not be used frequently).\n return this.toArray().join('/');\n };\n ResourcePath.prototype.toString = function () {\n return this.canonicalString();\n };\n /**\n * Creates a resource path from the given slash-delimited string.\n */\n ResourcePath.fromString = function (path) {\n // NOTE: The client is ignorant of any path segments containing escape\n // sequences (e.g. __id123__) and just passes them through raw (they exist\n // for legacy reasons and should not be used frequently).\n if (path.indexOf('//') >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid path (\" + path + \"). Paths must not contain // in them.\");\n }\n // We may still have an empty segment at the beginning or end if they had a\n // leading or trailing slash (which we allow).\n var segments = path.split('/').filter(function (segment) { return segment.length > 0; });\n return new ResourcePath(segments);\n };\n ResourcePath.EMPTY_PATH = new ResourcePath([]);\n return ResourcePath;\n}(path_Path));\n\nvar identifierRegExp = /^[_a-zA-Z][_a-zA-Z0-9]*$/;\n/** A dot-separated path for navigating sub-objects within a document. */\nvar path_FieldPath = /** @class */ (function (_super) {\n path___extends(FieldPath, _super);\n function FieldPath() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Returns true if the string could be used as a segment in a field path\n * without escaping.\n */\n FieldPath.isValidIdentifier = function (segment) {\n return identifierRegExp.test(segment);\n };\n FieldPath.prototype.canonicalString = function () {\n return this.toArray()\n .map(function (str) {\n str = str.replace('\\\\', '\\\\\\\\').replace('`', '\\\\`');\n if (!FieldPath.isValidIdentifier(str)) {\n str = '`' + str + '`';\n }\n return str;\n })\n .join('.');\n };\n FieldPath.prototype.toString = function () {\n return this.canonicalString();\n };\n /**\n * Returns true if this field references the key of a document.\n */\n FieldPath.prototype.isKeyField = function () {\n return this.length === 1 && this.get(0) === DOCUMENT_KEY_NAME;\n };\n /**\n * The field designating the key of a document.\n */\n FieldPath.keyField = function () {\n return new FieldPath([DOCUMENT_KEY_NAME]);\n };\n /**\n * Parses a field string from the given server-formatted string.\n *\n * - Splitting the empty string is not allowed (for now at least).\n * - Empty segments within the string (e.g. if there are two consecutive\n * separators) are not allowed.\n *\n * TODO(b/37244157): we should make this more strict. Right now, it allows\n * non-identifier path components, even if they aren't escaped.\n */\n FieldPath.fromServerFormat = function (path) {\n var segments = [];\n var current = '';\n var i = 0;\n var addCurrentSegment = function () {\n if (current.length === 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, begin \" +\n \"with '.', end with '.', or contain '..'\");\n }\n segments.push(current);\n current = '';\n };\n var inBackticks = false;\n while (i < path.length) {\n var c = path[i];\n if (c === '\\\\') {\n if (i + 1 === path.length) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Path has trailing escape character: ' + path);\n }\n var next = path[i + 1];\n if (!(next === '\\\\' || next === '.' || next === '`')) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Path has invalid escape sequence: ' + path);\n }\n current += next;\n i += 2;\n }\n else if (c === '`') {\n inBackticks = !inBackticks;\n i++;\n }\n else if (c === '.' && !inBackticks) {\n addCurrentSegment();\n i++;\n }\n else {\n current += c;\n i++;\n }\n }\n addCurrentSegment();\n if (inBackticks) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Unterminated ` in path: ' + path);\n }\n return new FieldPath(segments);\n };\n FieldPath.EMPTY_PATH = new FieldPath([]);\n return FieldPath;\n}(path_Path));\n\n\n//# sourceMappingURL=path.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/document_key.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar document_key_DocumentKey = /** @class */ (function () {\n function DocumentKey(path) {\n this.path = path;\n assert(DocumentKey.isDocumentKey(path), 'Invalid DocumentKey with an odd number of segments: ' +\n path.toArray().join('/'));\n }\n DocumentKey.prototype.equals = function (other) {\n return (other !== null && path_ResourcePath.comparator(this.path, other.path) === 0);\n };\n DocumentKey.prototype.toString = function () {\n return this.path.toString();\n };\n DocumentKey.comparator = function (k1, k2) {\n return path_ResourcePath.comparator(k1.path, k2.path);\n };\n DocumentKey.isDocumentKey = function (path) {\n return path.length % 2 === 0;\n };\n /**\n * Creates and returns a new document key with the given segments.\n *\n * @param path The segments of the path to the document\n * @return A new instance of DocumentKey\n */\n DocumentKey.fromSegments = function (segments) {\n return new DocumentKey(new path_ResourcePath(segments.slice()));\n };\n /**\n * Creates and returns a new document key using '/' to split the string into\n * segments.\n *\n * @param path The slash-separated path string to the document\n * @return A new instance of DocumentKey\n */\n DocumentKey.fromPathString = function (path) {\n return new DocumentKey(path_ResourcePath.fromString(path));\n };\n DocumentKey.EMPTY = new DocumentKey(new path_ResourcePath([]));\n return DocumentKey;\n}());\n\n\n//# sourceMappingURL=document_key.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/document.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar document_Document = /** @class */ (function () {\n function Document(key, version, data, options) {\n this.key = key;\n this.version = version;\n this.data = data;\n this.hasLocalMutations = options.hasLocalMutations;\n }\n Document.prototype.field = function (path) {\n return this.data.field(path);\n };\n Document.prototype.fieldValue = function (path) {\n var field = this.field(path);\n return field ? field.value() : undefined;\n };\n Document.prototype.value = function () {\n return this.data.value();\n };\n Document.prototype.equals = function (other) {\n return (other instanceof Document &&\n this.key.equals(other.key) &&\n this.version.equals(other.version) &&\n this.data.equals(other.data) &&\n this.hasLocalMutations === other.hasLocalMutations);\n };\n Document.prototype.toString = function () {\n return (\"Document(\" + this.key + \", \" + this.version + \", \" + this.data.toString() + \", \" +\n (\"{hasLocalMutations: \" + this.hasLocalMutations + \"})\"));\n };\n Document.compareByKey = function (d1, d2) {\n return document_key_DocumentKey.comparator(d1.key, d2.key);\n };\n Document.compareByField = function (field, d1, d2) {\n var v1 = d1.field(field);\n var v2 = d2.field(field);\n if (v1 !== undefined && v2 !== undefined) {\n return v1.compareTo(v2);\n }\n else {\n return fail(\"Trying to compare documents on fields that don't exist\");\n }\n };\n return Document;\n}());\n\n/**\n * A class representing a deleted document.\n * Version is set to 0 if we don't point to any specific time, otherwise it\n * denotes time we know it didn't exist at.\n */\nvar document_NoDocument = /** @class */ (function () {\n function NoDocument(key, version) {\n this.key = key;\n this.version = version;\n }\n NoDocument.prototype.toString = function () {\n return \"NoDocument(\" + this.key + \", \" + this.version + \")\";\n };\n NoDocument.prototype.equals = function (other) {\n return (other && other.version.equals(this.version) && other.key.equals(this.key));\n };\n NoDocument.compareByKey = function (d1, d2) {\n return document_key_DocumentKey.comparator(d1.key, d2.key);\n };\n return NoDocument;\n}());\n\n\n//# sourceMappingURL=document.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/sorted_map.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// An immutable sorted map implementation, based on a Left-leaning Red-Black\n// tree.\nvar sorted_map_SortedMap = /** @class */ (function () {\n function SortedMap(comparator, root) {\n this.comparator = comparator;\n this.root = root ? root : sorted_map_LLRBNode.EMPTY;\n }\n // Returns a copy of the map, with the specified key/value added or replaced.\n SortedMap.prototype.insert = function (key, value) {\n return new SortedMap(this.comparator, this.root\n .insert(key, value, this.comparator)\n .copy(null, null, sorted_map_LLRBNode.BLACK, null, null));\n };\n // Returns a copy of the map, with the specified key removed.\n SortedMap.prototype.remove = function (key) {\n return new SortedMap(this.comparator, this.root\n .remove(key, this.comparator)\n .copy(null, null, sorted_map_LLRBNode.BLACK, null, null));\n };\n // Returns the value of the node with the given key, or null.\n SortedMap.prototype.get = function (key) {\n var node = this.root;\n while (!node.isEmpty()) {\n var cmp = this.comparator(key, node.key);\n if (cmp === 0) {\n return node.value;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n };\n // Returns the key of the item *before* the specified key, or null if key is\n // the first item.\n SortedMap.prototype.getPredecessorKey = function (key) {\n var node = this.root;\n var rightParent = null;\n while (!node.isEmpty()) {\n var cmp = this.comparator(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty())\n node = node.right;\n return node.key;\n }\n else if (rightParent) {\n return rightParent.key;\n }\n else {\n return null; // first item.\n }\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n throw fail('Attempted to find predecessor key for a nonexistent key.' +\n ' What gives?');\n };\n // Returns the index of the element in this sorted map, or -1 if it doesn't\n // exist.\n SortedMap.prototype.indexOf = function (key) {\n // Number of nodes that were pruned when descending right\n var prunedNodes = 0;\n var node = this.root;\n while (!node.isEmpty()) {\n var cmp = this.comparator(key, node.key);\n if (cmp === 0) {\n return prunedNodes + node.left.size;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else {\n // Count all nodes left of the node plus the node itself\n prunedNodes += node.left.size + 1;\n node = node.right;\n }\n }\n // Node not found\n return -1;\n };\n SortedMap.prototype.isEmpty = function () {\n return this.root.isEmpty();\n };\n Object.defineProperty(SortedMap.prototype, \"size\", {\n // Returns the total number of nodes in the map.\n get: function () {\n return this.root.size;\n },\n enumerable: true,\n configurable: true\n });\n // Returns the minimum key in the map.\n SortedMap.prototype.minKey = function () {\n return this.root.minKey();\n };\n // Returns the maximum key in the map.\n SortedMap.prototype.maxKey = function () {\n return this.root.maxKey();\n };\n // Traverses the map in key order and calls the specified action function\n // for each key/value pair. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n SortedMap.prototype.inorderTraversal = function (action) {\n return this.root.inorderTraversal(action);\n };\n SortedMap.prototype.forEach = function (fn) {\n this.inorderTraversal(function (k, v) {\n fn(k, v);\n return false;\n });\n };\n // Traverses the map in reverse key order and calls the specified action\n // function for each key/value pair. If action returns true, traversal is\n // aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n SortedMap.prototype.reverseTraversal = function (action) {\n return this.root.reverseTraversal(action);\n };\n SortedMap.prototype.getIterator = function (resultGenerator) {\n return new sorted_map_SortedMapIterator(this.root, null, this.comparator, false, resultGenerator);\n };\n SortedMap.prototype.getIteratorFrom = function (key, resultGenerator) {\n return new sorted_map_SortedMapIterator(this.root, key, this.comparator, false, resultGenerator);\n };\n SortedMap.prototype.getReverseIterator = function (resultGenerator) {\n return new sorted_map_SortedMapIterator(this.root, null, this.comparator, true, resultGenerator);\n };\n SortedMap.prototype.getReverseIteratorFrom = function (key, resultGenerator) {\n return new sorted_map_SortedMapIterator(this.root, key, this.comparator, true, resultGenerator);\n };\n return SortedMap;\n}()); // end SortedMap\n\n// An iterator over an LLRBNode.\nvar sorted_map_SortedMapIterator = /** @class */ (function () {\n function SortedMapIterator(node, startKey, comparator, isReverse, resultGenerator) {\n this.resultGenerator = resultGenerator || null;\n this.isReverse = isReverse;\n this.nodeStack = [];\n var cmp = 1;\n while (!node.isEmpty()) {\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse)\n cmp *= -1;\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse) {\n node = node.left;\n }\n else {\n node = node.right;\n }\n }\n else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack,\n // but stop iterating;\n this.nodeStack.push(node);\n break;\n }\n else {\n // This node is greater than our start key, add it to the stack and move\n // to the next one\n this.nodeStack.push(node);\n if (this.isReverse) {\n node = node.right;\n }\n else {\n node = node.left;\n }\n }\n }\n }\n SortedMapIterator.prototype.getNext = function () {\n assert(this.nodeStack.length > 0, 'getNext() called on iterator when hasNext() is false.');\n var node = this.nodeStack.pop();\n var result;\n if (this.resultGenerator)\n result = this.resultGenerator(node.key, node.value);\n else\n result = { key: node.key, value: node.value };\n if (this.isReverse) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack.push(node);\n node = node.right;\n }\n }\n else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack.push(node);\n node = node.left;\n }\n }\n return result;\n };\n SortedMapIterator.prototype.hasNext = function () {\n return this.nodeStack.length > 0;\n };\n SortedMapIterator.prototype.peek = function () {\n if (this.nodeStack.length === 0)\n return null;\n var node = this.nodeStack[this.nodeStack.length - 1];\n if (this.resultGenerator) {\n return this.resultGenerator(node.key, node.value);\n }\n else {\n return { key: node.key, value: node.value };\n }\n };\n return SortedMapIterator;\n}()); // end SortedMapIterator\n\n// Represents a node in a Left-leaning Red-Black tree.\nvar sorted_map_LLRBNode = /** @class */ (function () {\n function LLRBNode(key, value, color, left, right) {\n this.key = key;\n this.value = value;\n this.color = color != null ? color : LLRBNode.RED;\n this.left = left != null ? left : LLRBNode.EMPTY;\n this.right = right != null ? right : LLRBNode.EMPTY;\n this.size = this.left.size + 1 + this.right.size;\n }\n // Returns a copy of the current node, optionally replacing pieces of it.\n LLRBNode.prototype.copy = function (key, value, color, left, right) {\n return new LLRBNode(key != null ? key : this.key, value != null ? value : this.value, color != null ? color : this.color, left != null ? left : this.left, right != null ? right : this.right);\n };\n LLRBNode.prototype.isEmpty = function () {\n return false;\n };\n // Traverses the tree in key order and calls the specified action function\n // for each node. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n LLRBNode.prototype.inorderTraversal = function (action) {\n return (this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action));\n };\n // Traverses the tree in reverse key order and calls the specified action\n // function for each node. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n LLRBNode.prototype.reverseTraversal = function (action) {\n return (this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action));\n };\n // Returns the minimum node in the tree.\n LLRBNode.prototype.min = function () {\n if (this.left.isEmpty()) {\n return this;\n }\n else {\n return this.left.min();\n }\n };\n // Returns the maximum key in the tree.\n LLRBNode.prototype.minKey = function () {\n return this.min().key;\n };\n // Returns the maximum key in the tree.\n LLRBNode.prototype.maxKey = function () {\n if (this.right.isEmpty()) {\n return this.key;\n }\n else {\n return this.right.maxKey();\n }\n };\n // Returns new tree, with the key/value added.\n LLRBNode.prototype.insert = function (key, value, comparator) {\n var n = this;\n var cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n }\n else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n }\n else {\n n = n.copy(null, null, null, null, n.right.insert(key, value, comparator));\n }\n return n.fixUp();\n };\n LLRBNode.prototype.removeMin = function () {\n if (this.left.isEmpty()) {\n return LLRBNode.EMPTY;\n }\n var n = this;\n if (!n.left.isRed() && !n.left.left.isRed())\n n = n.moveRedLeft();\n n = n.copy(null, null, null, n.left.removeMin(), null);\n return n.fixUp();\n };\n // Returns new tree, with the specified item removed.\n LLRBNode.prototype.remove = function (key, comparator) {\n var smallest;\n var n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed() && !n.left.left.isRed()) {\n n = n.moveRedLeft();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n }\n else {\n if (n.left.isRed())\n n = n.rotateRight();\n if (!n.right.isEmpty() && !n.right.isRed() && !n.right.left.isRed()) {\n n = n.moveRedRight();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return LLRBNode.EMPTY;\n }\n else {\n smallest = n.right.min();\n n = n.copy(smallest.key, smallest.value, null, null, n.right.removeMin());\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp();\n };\n LLRBNode.prototype.isRed = function () {\n return this.color;\n };\n // Returns new tree after performing any needed rotations.\n LLRBNode.prototype.fixUp = function () {\n var n = this;\n if (n.right.isRed() && !n.left.isRed())\n n = n.rotateLeft();\n if (n.left.isRed() && n.left.left.isRed())\n n = n.rotateRight();\n if (n.left.isRed() && n.right.isRed())\n n = n.colorFlip();\n return n;\n };\n LLRBNode.prototype.moveRedLeft = function () {\n var n = this.colorFlip();\n if (n.right.left.isRed()) {\n n = n.copy(null, null, null, null, n.right.rotateRight());\n n = n.rotateLeft();\n n = n.colorFlip();\n }\n return n;\n };\n LLRBNode.prototype.moveRedRight = function () {\n var n = this.colorFlip();\n if (n.left.left.isRed()) {\n n = n.rotateRight();\n n = n.colorFlip();\n }\n return n;\n };\n LLRBNode.prototype.rotateLeft = function () {\n var nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null);\n };\n LLRBNode.prototype.rotateRight = function () {\n var nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr);\n };\n LLRBNode.prototype.colorFlip = function () {\n var left = this.left.copy(null, null, !this.left.color, null, null);\n var right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n };\n // For testing.\n LLRBNode.prototype.checkMaxDepth = function () {\n var blackDepth = this.check();\n if (Math.pow(2.0, blackDepth) <= this.size + 1) {\n return true;\n }\n else {\n return false;\n }\n };\n // In a balanced RB tree, the black-depth (number of black nodes) from root to\n // leaves is equal on both sides. This function verifies that or asserts.\n LLRBNode.prototype.check = function () {\n if (this.isRed() && this.left.isRed()) {\n throw fail('Red node has red child(' + this.key + ',' + this.value + ')');\n }\n if (this.right.isRed()) {\n throw fail('Right child of (' + this.key + ',' + this.value + ') is red');\n }\n var blackDepth = this.left.check();\n if (blackDepth !== this.right.check()) {\n throw fail('Black depths differ');\n }\n else {\n return blackDepth + (this.isRed() ? 0 : 1);\n }\n };\n LLRBNode.EMPTY = null;\n LLRBNode.RED = true;\n LLRBNode.BLACK = false;\n return LLRBNode;\n}()); // end LLRBNode\n\n// Represents an empty node (a leaf node in the Red-Black Tree).\nvar LLRBEmptyNode = /** @class */ (function () {\n function LLRBEmptyNode() {\n this.size = 0;\n }\n // Returns a copy of the current node.\n LLRBEmptyNode.prototype.copy = function (key, value, color, left, right) {\n return this;\n };\n // Returns a copy of the tree, with the specified key/value added.\n LLRBEmptyNode.prototype.insert = function (key, value, comparator) {\n return new sorted_map_LLRBNode(key, value);\n };\n // Returns a copy of the tree, with the specified key removed.\n LLRBEmptyNode.prototype.remove = function (key, comparator) {\n return this;\n };\n LLRBEmptyNode.prototype.isEmpty = function () {\n return true;\n };\n LLRBEmptyNode.prototype.inorderTraversal = function (action) {\n return false;\n };\n LLRBEmptyNode.prototype.reverseTraversal = function (action) {\n return false;\n };\n LLRBEmptyNode.prototype.minKey = function () {\n return null;\n };\n LLRBEmptyNode.prototype.maxKey = function () {\n return null;\n };\n LLRBEmptyNode.prototype.isRed = function () {\n return false;\n };\n // For testing.\n LLRBEmptyNode.prototype.checkMaxDepth = function () {\n return true;\n };\n LLRBEmptyNode.prototype.check = function () {\n return 0;\n };\n return LLRBEmptyNode;\n}()); // end LLRBEmptyNode\n\nsorted_map_LLRBNode.EMPTY = new LLRBEmptyNode();\n\n//# sourceMappingURL=sorted_map.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/field_value.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar field_value___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar TypeOrder;\n(function (TypeOrder) {\n // This order is defined by the backend.\n TypeOrder[TypeOrder[\"NullValue\"] = 0] = \"NullValue\";\n TypeOrder[TypeOrder[\"BooleanValue\"] = 1] = \"BooleanValue\";\n TypeOrder[TypeOrder[\"NumberValue\"] = 2] = \"NumberValue\";\n TypeOrder[TypeOrder[\"TimestampValue\"] = 3] = \"TimestampValue\";\n TypeOrder[TypeOrder[\"StringValue\"] = 4] = \"StringValue\";\n TypeOrder[TypeOrder[\"BlobValue\"] = 5] = \"BlobValue\";\n TypeOrder[TypeOrder[\"RefValue\"] = 6] = \"RefValue\";\n TypeOrder[TypeOrder[\"GeoPointValue\"] = 7] = \"GeoPointValue\";\n TypeOrder[TypeOrder[\"ArrayValue\"] = 8] = \"ArrayValue\";\n TypeOrder[TypeOrder[\"ObjectValue\"] = 9] = \"ObjectValue\";\n})(TypeOrder = TypeOrder || (TypeOrder = {}));\n/**\n * A field value represents a datatype as stored by Firestore.\n */\nvar field_value_FieldValue = /** @class */ (function () {\n function FieldValue() {\n }\n FieldValue.prototype.toString = function () {\n var val = this.value();\n return val === null ? 'null' : val.toString();\n };\n FieldValue.prototype.defaultCompareTo = function (other) {\n assert(this.typeOrder !== other.typeOrder, 'Default compareTo should not be used for values of same type.');\n var cmp = primitiveComparator(this.typeOrder, other.typeOrder);\n return cmp;\n };\n return FieldValue;\n}());\n\nvar NullValue = /** @class */ (function (_super) {\n field_value___extends(NullValue, _super);\n function NullValue() {\n var _this = _super.call(this) || this;\n _this.typeOrder = TypeOrder.NullValue;\n // internalValue is unused but we add it to work around\n // https://github.com/Microsoft/TypeScript/issues/15585\n _this.internalValue = null;\n return _this;\n }\n NullValue.prototype.value = function () {\n return null;\n };\n NullValue.prototype.equals = function (other) {\n return other instanceof NullValue;\n };\n NullValue.prototype.compareTo = function (other) {\n if (other instanceof NullValue) {\n return 0;\n }\n return this.defaultCompareTo(other);\n };\n NullValue.INSTANCE = new NullValue();\n return NullValue;\n}(field_value_FieldValue));\n\nvar field_value_BooleanValue = /** @class */ (function (_super) {\n field_value___extends(BooleanValue, _super);\n function BooleanValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.BooleanValue;\n return _this;\n }\n BooleanValue.prototype.value = function () {\n return this.internalValue;\n };\n BooleanValue.prototype.equals = function (other) {\n return (other instanceof BooleanValue &&\n this.internalValue === other.internalValue);\n };\n BooleanValue.prototype.compareTo = function (other) {\n if (other instanceof BooleanValue) {\n return primitiveComparator(this, other);\n }\n return this.defaultCompareTo(other);\n };\n BooleanValue.of = function (value) {\n return value ? BooleanValue.TRUE : BooleanValue.FALSE;\n };\n BooleanValue.TRUE = new BooleanValue(true);\n BooleanValue.FALSE = new BooleanValue(false);\n return BooleanValue;\n}(field_value_FieldValue));\n\n/** Base class for IntegerValue and DoubleValue. */\nvar NumberValue = /** @class */ (function (_super) {\n field_value___extends(NumberValue, _super);\n function NumberValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.NumberValue;\n return _this;\n }\n NumberValue.prototype.value = function () {\n return this.internalValue;\n };\n NumberValue.prototype.compareTo = function (other) {\n if (other instanceof NumberValue) {\n return numericComparator(this.internalValue, other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return NumberValue;\n}(field_value_FieldValue));\n\n/** Utility function to compare doubles (using Firestore semantics for NaN). */\nfunction numericComparator(left, right) {\n if (left < right) {\n return -1;\n }\n else if (left > right) {\n return 1;\n }\n else if (left === right) {\n return 0;\n }\n else {\n // one or both are NaN.\n if (isNaN(left)) {\n return isNaN(right) ? 0 : -1;\n }\n else {\n return 1;\n }\n }\n}\n/**\n * Utility function to check numbers for equality using Firestore semantics\n * (NaN === NaN, -0.0 !== 0.0).\n */\nfunction numericEquals(left, right) {\n // Implemented based on Object.is() polyfill from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n if (left === right) {\n // +0 != -0\n return left !== 0 || 1 / left === 1 / right;\n }\n else {\n // NaN == NaN\n return left !== left && right !== right;\n }\n}\nvar IntegerValue = /** @class */ (function (_super) {\n field_value___extends(IntegerValue, _super);\n function IntegerValue(internalValue) {\n return _super.call(this, internalValue) || this;\n }\n IntegerValue.prototype.equals = function (other) {\n // NOTE: DoubleValue and IntegerValue instances may compareTo() the same,\n // but that doesn't make them equal via equals().\n if (other instanceof IntegerValue) {\n return numericEquals(this.internalValue, other.internalValue);\n }\n else {\n return false;\n }\n };\n return IntegerValue;\n}(NumberValue));\n\nvar DoubleValue = /** @class */ (function (_super) {\n field_value___extends(DoubleValue, _super);\n function DoubleValue(internalValue) {\n var _this = _super.call(this, internalValue) || this;\n _this.internalValue = internalValue;\n return _this;\n }\n DoubleValue.prototype.equals = function (other) {\n // NOTE: DoubleValue and IntegerValue instances may compareTo() the same,\n // but that doesn't make them equal via equals().\n if (other instanceof DoubleValue) {\n return numericEquals(this.internalValue, other.internalValue);\n }\n else {\n return false;\n }\n };\n DoubleValue.NAN = new DoubleValue(NaN);\n DoubleValue.POSITIVE_INFINITY = new DoubleValue(Infinity);\n DoubleValue.NEGATIVE_INFINITY = new DoubleValue(-Infinity);\n return DoubleValue;\n}(NumberValue));\n\n// TODO(b/37267885): Add truncation support\nvar field_value_StringValue = /** @class */ (function (_super) {\n field_value___extends(StringValue, _super);\n function StringValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.StringValue;\n return _this;\n }\n StringValue.prototype.value = function () {\n return this.internalValue;\n };\n StringValue.prototype.equals = function (other) {\n return (other instanceof StringValue && this.internalValue === other.internalValue);\n };\n StringValue.prototype.compareTo = function (other) {\n if (other instanceof StringValue) {\n return primitiveComparator(this.internalValue, other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return StringValue;\n}(field_value_FieldValue));\n\nvar TimestampValue = /** @class */ (function (_super) {\n field_value___extends(TimestampValue, _super);\n function TimestampValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.TimestampValue;\n return _this;\n }\n TimestampValue.prototype.value = function () {\n return this.internalValue.toDate();\n };\n TimestampValue.prototype.equals = function (other) {\n return (other instanceof TimestampValue &&\n this.internalValue.equals(other.internalValue));\n };\n TimestampValue.prototype.compareTo = function (other) {\n if (other instanceof TimestampValue) {\n return this.internalValue.compareTo(other.internalValue);\n }\n else if (other instanceof ServerTimestampValue) {\n // Concrete timestamps come before server timestamps.\n return -1;\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n return TimestampValue;\n}(field_value_FieldValue));\n\n/**\n * Represents a locally-applied ServerTimestamp.\n *\n * Notes:\n * - ServerTimestampValue instances are created as the result of applying a\n * TransformMutation (see TransformMutation.applyTo()). They can only exist in\n * the local view of a document. Therefore they do not need to be parsed or\n * serialized.\n * - When evaluated locally (e.g. for snapshot.data()), they evaluate to null.\n * - With respect to other ServerTimestampValues, they sort by their\n * localWriteTime.\n */\nvar ServerTimestampValue = /** @class */ (function (_super) {\n field_value___extends(ServerTimestampValue, _super);\n function ServerTimestampValue(localWriteTime) {\n var _this = _super.call(this) || this;\n _this.localWriteTime = localWriteTime;\n _this.typeOrder = TypeOrder.TimestampValue;\n return _this;\n }\n ServerTimestampValue.prototype.value = function () {\n return null;\n };\n ServerTimestampValue.prototype.equals = function (other) {\n return (other instanceof ServerTimestampValue &&\n this.localWriteTime.equals(other.localWriteTime));\n };\n ServerTimestampValue.prototype.compareTo = function (other) {\n if (other instanceof ServerTimestampValue) {\n return this.localWriteTime.compareTo(other.localWriteTime);\n }\n else if (other instanceof TimestampValue) {\n // Server timestamps come after all concrete timestamps.\n return 1;\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n ServerTimestampValue.prototype.toString = function () {\n return '';\n };\n return ServerTimestampValue;\n}(field_value_FieldValue));\n\nvar BlobValue = /** @class */ (function (_super) {\n field_value___extends(BlobValue, _super);\n function BlobValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.BlobValue;\n return _this;\n }\n BlobValue.prototype.value = function () {\n return this.internalValue;\n };\n BlobValue.prototype.equals = function (other) {\n return (other instanceof BlobValue &&\n this.internalValue._equals(other.internalValue));\n };\n BlobValue.prototype.compareTo = function (other) {\n if (other instanceof BlobValue) {\n return this.internalValue._compareTo(other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return BlobValue;\n}(field_value_FieldValue));\n\nvar field_value_RefValue = /** @class */ (function (_super) {\n field_value___extends(RefValue, _super);\n function RefValue(databaseId, key) {\n var _this = _super.call(this) || this;\n _this.databaseId = databaseId;\n _this.key = key;\n _this.typeOrder = TypeOrder.RefValue;\n return _this;\n }\n RefValue.prototype.value = function () {\n return this.key;\n };\n RefValue.prototype.equals = function (other) {\n if (other instanceof RefValue) {\n return (this.key.equals(other.key) && this.databaseId.equals(other.databaseId));\n }\n else {\n return false;\n }\n };\n RefValue.prototype.compareTo = function (other) {\n if (other instanceof RefValue) {\n var cmp = this.databaseId.compareTo(other.databaseId);\n return cmp !== 0 ? cmp : document_key_DocumentKey.comparator(this.key, other.key);\n }\n return this.defaultCompareTo(other);\n };\n return RefValue;\n}(field_value_FieldValue));\n\nvar GeoPointValue = /** @class */ (function (_super) {\n field_value___extends(GeoPointValue, _super);\n function GeoPointValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.GeoPointValue;\n return _this;\n }\n GeoPointValue.prototype.value = function () {\n return this.internalValue;\n };\n GeoPointValue.prototype.equals = function (other) {\n return (other instanceof GeoPointValue &&\n this.internalValue._equals(other.internalValue));\n };\n GeoPointValue.prototype.compareTo = function (other) {\n if (other instanceof GeoPointValue) {\n return this.internalValue._compareTo(other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return GeoPointValue;\n}(field_value_FieldValue));\n\nvar field_value_ObjectValue = /** @class */ (function (_super) {\n field_value___extends(ObjectValue, _super);\n function ObjectValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.ObjectValue;\n return _this;\n }\n ObjectValue.prototype.value = function () {\n var result = {};\n this.internalValue.inorderTraversal(function (key, val) {\n result[key] = val.value();\n });\n return result;\n };\n ObjectValue.prototype.forEach = function (action) {\n this.internalValue.inorderTraversal(action);\n };\n ObjectValue.prototype.equals = function (other) {\n if (other instanceof ObjectValue) {\n var it1 = this.internalValue.getIterator();\n var it2 = other.internalValue.getIterator();\n while (it1.hasNext() && it2.hasNext()) {\n var next1 = it1.getNext();\n var next2 = it2.getNext();\n if (next1.key !== next2.key || !next1.value.equals(next2.value)) {\n return false;\n }\n }\n return !it1.hasNext() && !it2.hasNext();\n }\n return false;\n };\n ObjectValue.prototype.compareTo = function (other) {\n if (other instanceof ObjectValue) {\n var it1 = this.internalValue.getIterator();\n var it2 = other.internalValue.getIterator();\n while (it1.hasNext() && it2.hasNext()) {\n var next1 = it1.getNext();\n var next2 = it2.getNext();\n var cmp = primitiveComparator(next1.key, next2.key) ||\n next1.value.compareTo(next2.value);\n if (cmp) {\n return cmp;\n }\n }\n // Only equal if both iterators are exhausted\n return primitiveComparator(it1.hasNext(), it2.hasNext());\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n ObjectValue.prototype.set = function (path, to) {\n assert(!path.isEmpty(), 'Cannot set field for empty path on ObjectValue');\n if (path.length === 1) {\n return this.setChild(path.firstSegment(), to);\n }\n else {\n var child = this.child(path.firstSegment());\n if (!(child instanceof ObjectValue)) {\n child = ObjectValue.EMPTY;\n }\n var newChild = child.set(path.popFirst(), to);\n return this.setChild(path.firstSegment(), newChild);\n }\n };\n ObjectValue.prototype.delete = function (path) {\n assert(!path.isEmpty(), 'Cannot delete field for empty path on ObjectValue');\n if (path.length === 1) {\n return new ObjectValue(this.internalValue.remove(path.firstSegment()));\n }\n else {\n // nested field\n var child = this.child(path.firstSegment());\n if (child instanceof ObjectValue) {\n var newChild = child.delete(path.popFirst());\n return new ObjectValue(this.internalValue.insert(path.firstSegment(), newChild));\n }\n else {\n // Don't actually change a primitive value to an object for a delete\n return this;\n }\n }\n };\n ObjectValue.prototype.contains = function (path) {\n return this.field(path) !== undefined;\n };\n ObjectValue.prototype.field = function (path) {\n assert(!path.isEmpty(), \"Can't get field of empty path\");\n var field = this;\n path.forEach(function (pathSegment) {\n if (field instanceof ObjectValue) {\n field = field.internalValue.get(pathSegment) || undefined;\n }\n else {\n field = undefined;\n }\n });\n return field;\n };\n ObjectValue.prototype.toString = function () {\n return JSON.stringify(this.value());\n };\n ObjectValue.prototype.child = function (childName) {\n return this.internalValue.get(childName) || undefined;\n };\n ObjectValue.prototype.setChild = function (childName, value) {\n return new ObjectValue(this.internalValue.insert(childName, value));\n };\n ObjectValue.EMPTY = new ObjectValue(new sorted_map_SortedMap(primitiveComparator));\n return ObjectValue;\n}(field_value_FieldValue));\n\nvar field_value_ArrayValue = /** @class */ (function (_super) {\n field_value___extends(ArrayValue, _super);\n function ArrayValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.ArrayValue;\n return _this;\n }\n ArrayValue.prototype.value = function () {\n return this.internalValue.map(function (v) { return v.value(); });\n };\n ArrayValue.prototype.forEach = function (action) {\n this.internalValue.forEach(action);\n };\n ArrayValue.prototype.equals = function (other) {\n if (other instanceof ArrayValue) {\n if (this.internalValue.length !== other.internalValue.length) {\n return false;\n }\n for (var i = 0; i < this.internalValue.length; i++) {\n if (!this.internalValue[i].equals(other.internalValue[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n };\n ArrayValue.prototype.compareTo = function (other) {\n if (other instanceof ArrayValue) {\n var minLength = Math.min(this.internalValue.length, other.internalValue.length);\n for (var i = 0; i < minLength; i++) {\n var cmp = this.internalValue[i].compareTo(other.internalValue[i]);\n if (cmp) {\n return cmp;\n }\n }\n return primitiveComparator(this.internalValue.length, other.internalValue.length);\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n ArrayValue.prototype.toString = function () {\n return JSON.stringify(this.value());\n };\n return ArrayValue;\n}(field_value_FieldValue));\n\n\n//# sourceMappingURL=field_value.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/types.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Untyped Number alias we can use to check for ES6 methods / properties.\n// tslint:disable-next-line:no-any variable-name\nvar NumberAsAny = Number;\n/**\n * Minimum safe integer in Javascript because of floating point precision.\n * Added to not rely on ES6 features.\n */\nvar MIN_SAFE_INTEGER = NumberAsAny.MIN_SAFE_INTEGER || -(Math.pow(2, 53) - 1);\n/**\n * Maximum safe integer in Javascript because of floating point precision.\n * Added to not rely on ES6 features.\n */\nvar MAX_SAFE_INTEGER = NumberAsAny.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;\n/**\n * Returns whether an number is an integer, uses native implementation if\n * available.\n * Added to not rely on ES6 features.\n * @param value The value to test for being an integer\n */\nvar isInteger = NumberAsAny.isInteger ||\n (function (value) {\n return typeof value === 'number' &&\n isFinite(value) &&\n Math.floor(value) === value;\n });\n/**\n * Returns whether a variable is either undefined or null.\n */\nfunction isNullOrUndefined(value) {\n return value === null || value === undefined;\n}\n/**\n * Returns whether a value is an integer and in the safe integer range\n * @param value The value to test for being an integer and in the safe range\n */\nfunction isSafeInteger(value) {\n return (isInteger(value) &&\n value <= MAX_SAFE_INTEGER &&\n value >= MIN_SAFE_INTEGER);\n}\n/**\n * Safely checks if the number is NaN.\n */\nfunction safeIsNaN(value) {\n if (NumberAsAny.IsNaN) {\n return NumberAsAny.IsNaN(value);\n }\n else {\n return typeof value === 'number' && isNaN(value);\n }\n}\n\n//# sourceMappingURL=types.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/query.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\nvar query_Query = /** @class */ (function () {\n function Query(path, explicitOrderBy, filters, limit, startAt, endAt) {\n if (explicitOrderBy === void 0) { explicitOrderBy = []; }\n if (filters === void 0) { filters = []; }\n if (limit === void 0) { limit = null; }\n if (startAt === void 0) { startAt = null; }\n if (endAt === void 0) { endAt = null; }\n this.path = path;\n this.explicitOrderBy = explicitOrderBy;\n this.filters = filters;\n this.limit = limit;\n this.startAt = startAt;\n this.endAt = endAt;\n this.memoizedCanonicalId = null;\n this.memoizedOrderBy = null;\n if (this.startAt) {\n this.assertValidBound(this.startAt);\n }\n if (this.endAt) {\n this.assertValidBound(this.endAt);\n }\n }\n Query.atPath = function (path) {\n return new Query(path);\n };\n Object.defineProperty(Query.prototype, \"orderBy\", {\n get: function () {\n if (this.memoizedOrderBy === null) {\n var inequalityField = this.getInequalityFilterField();\n var firstOrderByField = this.getFirstOrderByField();\n if (inequalityField !== null && firstOrderByField === null) {\n // In order to implicitly add key ordering, we must also add the\n // inequality filter field for it to be a valid query.\n // Note that the default inequality field and key ordering is ascending.\n if (inequalityField.isKeyField()) {\n this.memoizedOrderBy = [KEY_ORDERING_ASC];\n }\n else {\n this.memoizedOrderBy = [\n new query_OrderBy(inequalityField),\n KEY_ORDERING_ASC\n ];\n }\n }\n else {\n assert(inequalityField === null ||\n (firstOrderByField !== null &&\n inequalityField.equals(firstOrderByField)), 'First orderBy should match inequality field.');\n this.memoizedOrderBy = [];\n var foundKeyOrdering = false;\n for (var _i = 0, _a = this.explicitOrderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n this.memoizedOrderBy.push(orderBy);\n if (orderBy.field.isKeyField()) {\n foundKeyOrdering = true;\n }\n }\n if (!foundKeyOrdering) {\n // The order of the implicit key ordering always matches the last\n // explicit order by\n var lastDirection = this.explicitOrderBy.length > 0\n ? this.explicitOrderBy[this.explicitOrderBy.length - 1].dir\n : Direction.ASCENDING;\n this.memoizedOrderBy.push(lastDirection === Direction.ASCENDING\n ? KEY_ORDERING_ASC\n : KEY_ORDERING_DESC);\n }\n }\n }\n return this.memoizedOrderBy;\n },\n enumerable: true,\n configurable: true\n });\n Query.prototype.addFilter = function (filter) {\n assert(this.getInequalityFilterField() == null ||\n !(filter instanceof query_RelationFilter) ||\n !filter.isInequality() ||\n filter.field.equals(this.getInequalityFilterField()), 'Query must only have one inequality field.');\n assert(!document_key_DocumentKey.isDocumentKey(this.path), 'No filtering allowed for document query');\n var newFilters = this.filters.concat([filter]);\n return new Query(this.path, this.explicitOrderBy.slice(), newFilters, this.limit, this.startAt, this.endAt);\n };\n Query.prototype.addOrderBy = function (orderBy) {\n assert(!document_key_DocumentKey.isDocumentKey(this.path), 'No ordering allowed for document query');\n assert(!this.startAt && !this.endAt, 'Bounds must be set after orderBy');\n // TODO(dimond): validate that orderBy does not list the same key twice.\n var newOrderBy = this.explicitOrderBy.concat([orderBy]);\n return new Query(this.path, newOrderBy, this.filters.slice(), this.limit, this.startAt, this.endAt);\n };\n Query.prototype.withLimit = function (limit) {\n return new Query(this.path, this.explicitOrderBy.slice(), this.filters.slice(), limit, this.startAt, this.endAt);\n };\n Query.prototype.withStartAt = function (bound) {\n return new Query(this.path, this.explicitOrderBy.slice(), this.filters.slice(), this.limit, bound, this.endAt);\n };\n Query.prototype.withEndAt = function (bound) {\n return new Query(this.path, this.explicitOrderBy.slice(), this.filters.slice(), this.limit, this.startAt, bound);\n };\n // TODO(b/29183165): This is used to get a unique string from a query to, for\n // example, use as a dictionary key, but the implementation is subject to\n // collisions. Make it collision-free.\n Query.prototype.canonicalId = function () {\n if (this.memoizedCanonicalId === null) {\n var canonicalId = this.path.canonicalString();\n canonicalId += '|f:';\n for (var _i = 0, _a = this.filters; _i < _a.length; _i++) {\n var filter = _a[_i];\n canonicalId += filter.canonicalId();\n canonicalId += ',';\n }\n canonicalId += '|ob:';\n // TODO(dimond): make this collision resistant\n for (var _b = 0, _c = this.orderBy; _b < _c.length; _b++) {\n var orderBy = _c[_b];\n canonicalId += orderBy.canonicalId();\n canonicalId += ',';\n }\n if (!isNullOrUndefined(this.limit)) {\n canonicalId += '|l:';\n canonicalId += this.limit;\n }\n if (this.startAt) {\n canonicalId += '|lb:';\n canonicalId += this.startAt.canonicalId();\n }\n if (this.endAt) {\n canonicalId += '|ub:';\n canonicalId += this.endAt.canonicalId();\n }\n this.memoizedCanonicalId = canonicalId;\n }\n return this.memoizedCanonicalId;\n };\n Query.prototype.toString = function () {\n var str = 'Query(' + this.path.canonicalString();\n if (this.filters.length > 0) {\n str += \", filters: [\" + this.filters.join(', ') + \"]\";\n }\n if (!isNullOrUndefined(this.limit)) {\n str += ', limit: ' + this.limit;\n }\n if (this.explicitOrderBy.length > 0) {\n str += \", orderBy: [\" + this.explicitOrderBy.join(', ') + \"]\";\n }\n if (this.startAt) {\n str += ', startAt: ' + this.startAt.canonicalId();\n }\n if (this.endAt) {\n str += ', endAt: ' + this.endAt.canonicalId();\n }\n return str + ')';\n };\n Query.prototype.equals = function (other) {\n if (this.limit !== other.limit) {\n return false;\n }\n if (this.orderBy.length !== other.orderBy.length) {\n return false;\n }\n for (var i = 0; i < this.orderBy.length; i++) {\n if (!this.orderBy[i].equals(other.orderBy[i])) {\n return false;\n }\n }\n if (this.filters.length !== other.filters.length) {\n return false;\n }\n for (var i = 0; i < this.filters.length; i++) {\n if (!this.filters[i].equals(other.filters[i])) {\n return false;\n }\n }\n if (!this.path.equals(other.path)) {\n return false;\n }\n if (this.startAt !== null\n ? !this.startAt.equals(other.startAt)\n : other.startAt !== null) {\n return false;\n }\n return this.endAt !== null\n ? this.endAt.equals(other.endAt)\n : other.endAt === null;\n };\n Query.prototype.docComparator = function (d1, d2) {\n var comparedOnKeyField = false;\n for (var _i = 0, _a = this.orderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n var comp = orderBy.compare(d1, d2);\n if (comp !== 0)\n return comp;\n comparedOnKeyField = comparedOnKeyField || orderBy.field.isKeyField();\n }\n // Assert that we actually compared by key\n assert(comparedOnKeyField, \"orderBy used that doesn't compare on key field\");\n return 0;\n };\n Query.prototype.matches = function (doc) {\n return (this.matchesAncestor(doc) &&\n this.matchesOrderBy(doc) &&\n this.matchesFilters(doc) &&\n this.matchesBounds(doc));\n };\n Query.prototype.hasLimit = function () {\n return !isNullOrUndefined(this.limit);\n };\n Query.prototype.getFirstOrderByField = function () {\n return this.explicitOrderBy.length > 0\n ? this.explicitOrderBy[0].field\n : null;\n };\n Query.prototype.getInequalityFilterField = function () {\n for (var _i = 0, _a = this.filters; _i < _a.length; _i++) {\n var filter = _a[_i];\n if (filter instanceof query_RelationFilter && filter.isInequality()) {\n return filter.field;\n }\n }\n return null;\n };\n Query.prototype.isDocumentQuery = function () {\n return document_key_DocumentKey.isDocumentKey(this.path) && this.filters.length === 0;\n };\n Query.prototype.matchesAncestor = function (doc) {\n var docPath = doc.key.path;\n if (document_key_DocumentKey.isDocumentKey(this.path)) {\n // exact match for document queries\n return this.path.equals(docPath);\n }\n else {\n // shallow ancestor queries by default\n return (this.path.isPrefixOf(docPath) && this.path.length === docPath.length - 1);\n }\n };\n /**\n * A document must have a value for every ordering clause in order to show up\n * in the results.\n */\n Query.prototype.matchesOrderBy = function (doc) {\n for (var _i = 0, _a = this.explicitOrderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n // order by key always matches\n if (!orderBy.field.isKeyField() &&\n doc.field(orderBy.field) === undefined) {\n return false;\n }\n }\n return true;\n };\n Query.prototype.matchesFilters = function (doc) {\n for (var _i = 0, _a = this.filters; _i < _a.length; _i++) {\n var filter = _a[_i];\n if (!filter.matches(doc)) {\n return false;\n }\n }\n return true;\n };\n /**\n * Makes sure a document is within the bounds, if provided.\n */\n Query.prototype.matchesBounds = function (doc) {\n if (this.startAt && !this.startAt.sortsBeforeDocument(this.orderBy, doc)) {\n return false;\n }\n if (this.endAt && this.endAt.sortsBeforeDocument(this.orderBy, doc)) {\n return false;\n }\n return true;\n };\n Query.prototype.assertValidBound = function (bound) {\n assert(bound.position.length <= this.orderBy.length, 'Bound is longer than orderBy');\n };\n return Query;\n}());\n\nvar query_RelationOp = /** @class */ (function () {\n function RelationOp(name) {\n this.name = name;\n }\n RelationOp.fromString = function (op) {\n switch (op) {\n case '<':\n return RelationOp.LESS_THAN;\n case '<=':\n return RelationOp.LESS_THAN_OR_EQUAL;\n case '==':\n return RelationOp.EQUAL;\n case '>=':\n return RelationOp.GREATER_THAN_OR_EQUAL;\n case '>':\n return RelationOp.GREATER_THAN;\n default:\n return fail('Unknown relation: ' + op);\n }\n };\n RelationOp.prototype.toString = function () {\n return this.name;\n };\n RelationOp.prototype.equals = function (other) {\n return this.name === other.name;\n };\n RelationOp.LESS_THAN = new RelationOp('<');\n RelationOp.LESS_THAN_OR_EQUAL = new RelationOp('<=');\n RelationOp.EQUAL = new RelationOp('==');\n RelationOp.GREATER_THAN = new RelationOp('>');\n RelationOp.GREATER_THAN_OR_EQUAL = new RelationOp('>=');\n return RelationOp;\n}());\n\nvar query_RelationFilter = /** @class */ (function () {\n function RelationFilter(field, op, value) {\n this.field = field;\n this.op = op;\n this.value = value;\n }\n RelationFilter.prototype.matches = function (doc) {\n if (this.field.isKeyField()) {\n assert(this.value instanceof field_value_RefValue, 'Comparing on key, but filter value not a RefValue');\n var refValue = this.value;\n var comparison = document_key_DocumentKey.comparator(doc.key, refValue.key);\n return this.matchesComparison(comparison);\n }\n else {\n var val = doc.field(this.field);\n return val !== undefined && this.matchesValue(val);\n }\n };\n RelationFilter.prototype.matchesValue = function (value) {\n // Only compare types with matching backend order (such as double and int).\n if (this.value.typeOrder !== value.typeOrder) {\n return false;\n }\n return this.matchesComparison(value.compareTo(this.value));\n };\n RelationFilter.prototype.matchesComparison = function (comparison) {\n switch (this.op) {\n case query_RelationOp.LESS_THAN:\n return comparison < 0;\n case query_RelationOp.LESS_THAN_OR_EQUAL:\n return comparison <= 0;\n case query_RelationOp.EQUAL:\n return comparison === 0;\n case query_RelationOp.GREATER_THAN:\n return comparison > 0;\n case query_RelationOp.GREATER_THAN_OR_EQUAL:\n return comparison >= 0;\n default:\n return fail('Unknown relation op' + this.op);\n }\n };\n RelationFilter.prototype.isInequality = function () {\n return this.op !== query_RelationOp.EQUAL;\n };\n RelationFilter.prototype.canonicalId = function () {\n // TODO(b/29183165): Technically, this won't be unique if two values have\n // the same description, such as the int 3 and the string \"3\". So we should\n // add the types in here somehow, too.\n return (this.field.canonicalString() + this.op.toString() + this.value.toString());\n };\n RelationFilter.prototype.equals = function (other) {\n if (other instanceof RelationFilter) {\n return (this.op.equals(other.op) &&\n this.field.equals(other.field) &&\n this.value.equals(other.value));\n }\n else {\n return false;\n }\n };\n RelationFilter.prototype.toString = function () {\n return this.field.canonicalString() + \" \" + this.op + \" \" + this.value.value();\n };\n return RelationFilter;\n}());\n\n/**\n * Filter that matches 'null' values.\n */\nvar NullFilter = /** @class */ (function () {\n function NullFilter(field) {\n this.field = field;\n }\n NullFilter.prototype.matches = function (doc) {\n var val = doc.field(this.field);\n return val !== undefined && val.value() === null;\n };\n NullFilter.prototype.canonicalId = function () {\n return this.field.canonicalString() + ' IS null';\n };\n NullFilter.prototype.toString = function () {\n return this.field.canonicalString() + \" IS null\";\n };\n NullFilter.prototype.equals = function (other) {\n if (other instanceof NullFilter) {\n return this.field.equals(other.field);\n }\n else {\n return false;\n }\n };\n return NullFilter;\n}());\n\n/**\n * Filter that matches 'NaN' values.\n */\nvar NanFilter = /** @class */ (function () {\n function NanFilter(field) {\n this.field = field;\n }\n NanFilter.prototype.matches = function (doc) {\n var val = doc.field(this.field).value();\n return typeof val === 'number' && isNaN(val);\n };\n NanFilter.prototype.canonicalId = function () {\n return this.field.canonicalString() + ' IS NaN';\n };\n NanFilter.prototype.toString = function () {\n return this.field.canonicalString() + \" IS NaN\";\n };\n NanFilter.prototype.equals = function (other) {\n if (other instanceof NanFilter) {\n return this.field.equals(other.field);\n }\n else {\n return false;\n }\n };\n return NanFilter;\n}());\n\n/**\n * Creates a filter based on the provided arguments.\n */\nfunction fieldFilter(field, op, value) {\n if (value.equals(NullValue.INSTANCE)) {\n if (op !== query_RelationOp.EQUAL) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You can only perform equals ' + 'comparisons on null.');\n }\n return new NullFilter(field);\n }\n else if (value.equals(DoubleValue.NAN)) {\n if (op !== query_RelationOp.EQUAL) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You can only perform equals ' + 'comparisons on NaN.');\n }\n return new NanFilter(field);\n }\n else {\n return new query_RelationFilter(field, op, value);\n }\n}\n/**\n * The direction of sorting in an order by.\n */\nvar Direction = /** @class */ (function () {\n function Direction(name) {\n this.name = name;\n }\n Direction.prototype.toString = function () {\n return this.name;\n };\n Direction.ASCENDING = new Direction('asc');\n Direction.DESCENDING = new Direction('desc');\n return Direction;\n}());\n\n/**\n * Represents a bound of a query.\n *\n * The bound is specified with the given components representing a position and\n * whether it's just before or just after the position (relative to whatever the\n * query order is).\n *\n * The position represents a logical index position for a query. It's a prefix\n * of values for the (potentially implicit) order by clauses of a query.\n *\n * Bound provides a function to determine whether a document comes before or\n * after a bound. This is influenced by whether the position is just before or\n * just after the provided values.\n */\nvar query_Bound = /** @class */ (function () {\n function Bound(position, before) {\n this.position = position;\n this.before = before;\n }\n Bound.prototype.canonicalId = function () {\n // TODO(b/29183165): Make this collision robust.\n var canonicalId = this.before ? 'b:' : 'a:';\n for (var _i = 0, _a = this.position; _i < _a.length; _i++) {\n var component = _a[_i];\n canonicalId += component.toString();\n }\n return canonicalId;\n };\n /**\n * Returns true if a document sorts before a bound using the provided sort\n * order.\n */\n Bound.prototype.sortsBeforeDocument = function (orderBy, doc) {\n assert(this.position.length <= orderBy.length, \"Bound has more components than query's orderBy\");\n var comparison = 0;\n for (var i = 0; i < this.position.length; i++) {\n var orderByComponent = orderBy[i];\n var component = this.position[i];\n if (orderByComponent.field.isKeyField()) {\n assert(component instanceof field_value_RefValue, 'Bound has a non-key value where the key path is being used.');\n comparison = document_key_DocumentKey.comparator(component.key, doc.key);\n }\n else {\n var docValue = doc.field(orderByComponent.field);\n assert(docValue !== undefined, 'Field should exist since document matched the orderBy already.');\n comparison = component.compareTo(docValue);\n }\n if (orderByComponent.dir === Direction.DESCENDING) {\n comparison = comparison * -1;\n }\n if (comparison !== 0) {\n break;\n }\n }\n return this.before ? comparison <= 0 : comparison < 0;\n };\n Bound.prototype.equals = function (other) {\n if (other === null) {\n return false;\n }\n if (this.before !== other.before ||\n this.position.length !== other.position.length) {\n return false;\n }\n for (var i = 0; i < this.position.length; i++) {\n var thisPosition = this.position[i];\n var otherPosition = other.position[i];\n return thisPosition.equals(otherPosition);\n }\n return true;\n };\n return Bound;\n}());\n\n/**\n * An ordering on a field, in some Direction. Direction defaults to ASCENDING.\n */\nvar query_OrderBy = /** @class */ (function () {\n function OrderBy(field, dir) {\n this.field = field;\n if (dir === undefined) {\n dir = Direction.ASCENDING;\n }\n this.dir = dir;\n this.isKeyOrderBy = field.isKeyField();\n }\n OrderBy.prototype.compare = function (d1, d2) {\n var comparison = this.isKeyOrderBy\n ? document_Document.compareByKey(d1, d2)\n : document_Document.compareByField(this.field, d1, d2);\n switch (this.dir) {\n case Direction.ASCENDING:\n return comparison;\n case Direction.DESCENDING:\n return -1 * comparison;\n default:\n return fail('Unknown direction: ' + this.dir);\n }\n };\n OrderBy.prototype.canonicalId = function () {\n // TODO(b/29183165): Make this collision robust.\n return this.field.canonicalString() + this.dir.toString();\n };\n OrderBy.prototype.toString = function () {\n return this.field.canonicalString() + \" (\" + this.dir + \")\";\n };\n OrderBy.prototype.equals = function (other) {\n return this.dir === other.dir && this.field.equals(other.field);\n };\n return OrderBy;\n}());\n\nvar KEY_ORDERING_ASC = new query_OrderBy(path_FieldPath.keyField(), Direction.ASCENDING);\nvar KEY_ORDERING_DESC = new query_OrderBy(path_FieldPath.keyField(), Direction.DESCENDING);\n\n//# sourceMappingURL=query.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/timestamp.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// A RegExp matching ISO 8601 UTC timestamps with optional fraction.\nvar isoRegExp = new RegExp(/^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.(\\d+))?Z$/);\nvar timestamp_Timestamp = /** @class */ (function () {\n function Timestamp(seconds, nanos) {\n this.seconds = seconds;\n this.nanos = nanos;\n assert(nanos >= 0, 'timestamp nanoseconds out of range: ' + nanos);\n assert(nanos < 1e9, 'timestamp nanoseconds out of range' + nanos);\n // Midnight at the beginning of 1/1/1 is the earliest Firestore supports.\n assert(seconds >= -62135596800, 'timestamp seconds out of range: ' + seconds);\n // This will break in the year 10,000.\n assert(seconds < 253402300800, 'timestamp seconds out of range' + seconds);\n }\n Timestamp.now = function () {\n return Timestamp.fromEpochMilliseconds(Date.now());\n };\n Timestamp.fromDate = function (date) {\n return Timestamp.fromEpochMilliseconds(date.getTime());\n };\n Timestamp.fromEpochMilliseconds = function (milliseconds) {\n var seconds = Math.floor(milliseconds / 1000);\n var nanos = (milliseconds - seconds * 1000) * 1e6;\n return new Timestamp(seconds, nanos);\n };\n Timestamp.fromISOString = function (utc) {\n // The date string can have higher precision (nanos) than the Date class\n // (millis), so we do some custom parsing here.\n // Parse the nanos right out of the string.\n var nanos = 0;\n var fraction = isoRegExp.exec(utc);\n assert(!!fraction, 'invalid timestamp: ' + utc);\n if (fraction[1]) {\n // Pad the fraction out to 9 digits (nanos).\n var nanoStr = fraction[1];\n nanoStr = (nanoStr + '000000000').substr(0, 9);\n nanos = parseInt(nanoStr, 10);\n }\n // Parse the date to get the seconds.\n var date = new Date(utc);\n var seconds = Math.floor(date.getTime() / 1000);\n return new Timestamp(seconds, nanos);\n };\n Timestamp.prototype.toDate = function () {\n return new Date(this.toEpochMilliseconds());\n };\n Timestamp.prototype.toEpochMilliseconds = function () {\n return this.seconds * 1000 + this.nanos / 1e6;\n };\n Timestamp.prototype.compareTo = function (other) {\n if (this.seconds === other.seconds) {\n return primitiveComparator(this.nanos, other.nanos);\n }\n return primitiveComparator(this.seconds, other.seconds);\n };\n Timestamp.prototype.equals = function (other) {\n return other.seconds === this.seconds && other.nanos === this.nanos;\n };\n Timestamp.prototype.toString = function () {\n return 'Timestamp(seconds=' + this.seconds + ', nanos=' + this.nanos + ')';\n };\n return Timestamp;\n}());\n\n\n//# sourceMappingURL=timestamp.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/snapshot_version.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A version of a document in Firestore. This corresponds to the version\n * timestamp, such as update_time or read_time.\n */\nvar snapshot_version_SnapshotVersion = /** @class */ (function () {\n function SnapshotVersion(timestamp) {\n this.timestamp = timestamp;\n }\n // TODO(b/34176344): Once we no longer need to use the old alpha protos,\n // delete this constructor and use a timestamp-backed version everywhere.\n SnapshotVersion.fromMicroseconds = function (value) {\n var seconds = Math.floor(value / 1e6);\n var nanos = (value % 1e6) * 1e3;\n return new SnapshotVersion(new timestamp_Timestamp(seconds, nanos));\n };\n SnapshotVersion.fromTimestamp = function (value) {\n return new SnapshotVersion(value);\n };\n SnapshotVersion.forDeletedDoc = function () {\n return SnapshotVersion.MIN;\n };\n SnapshotVersion.prototype.compareTo = function (other) {\n return this.timestamp.compareTo(other.timestamp);\n };\n SnapshotVersion.prototype.equals = function (other) {\n return this.timestamp.equals(other.timestamp);\n };\n /** Returns a number representation of the version for use in spec tests. */\n SnapshotVersion.prototype.toMicroseconds = function () {\n // Convert to microseconds.\n return this.timestamp.seconds * 1e6 + this.timestamp.nanos / 1000;\n };\n SnapshotVersion.prototype.toString = function () {\n return 'SnapshotVersion(' + this.timestamp.toString() + ')';\n };\n SnapshotVersion.prototype.toTimestamp = function () {\n return this.timestamp;\n };\n SnapshotVersion.MIN = new SnapshotVersion(new timestamp_Timestamp(0, 0));\n return SnapshotVersion;\n}());\n\n\n//# sourceMappingURL=snapshot_version.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/query_data.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/** An enumeration of the different purposes we have for queries. */\nvar QueryPurpose;\n(function (QueryPurpose) {\n /** A regular, normal query. */\n QueryPurpose[QueryPurpose[\"Listen\"] = 0] = \"Listen\";\n /**\n * The query was used to refill a query after an existence filter mismatch.\n */\n QueryPurpose[QueryPurpose[\"ExistenceFilterMismatch\"] = 1] = \"ExistenceFilterMismatch\";\n /** The query was used to resolve a limbo document. */\n QueryPurpose[QueryPurpose[\"LimboResolution\"] = 2] = \"LimboResolution\";\n})(QueryPurpose = QueryPurpose || (QueryPurpose = {}));\n/**\n * An immutable set of metadata that the local store tracks for each query.\n */\nvar query_data_QueryData = /** @class */ (function () {\n function QueryData(\n /** The query being listened to. */\n query, \n /**\n * The target ID to which the query corresponds; Assigned by the\n * LocalStore for user listens and by the SyncEngine for limbo watches.\n */\n targetId, \n /** The purpose of the query. */\n purpose, \n /** The latest snapshot version seen for this target. */\n snapshotVersion, \n /**\n * An opaque, server-assigned token that allows watching a query to be\n * resumed after disconnecting without retransmitting all the data that\n * matches the query. The resume token essentially identifies a point in\n * time from which the server should resume sending results.\n */\n resumeToken) {\n if (snapshotVersion === void 0) { snapshotVersion = snapshot_version_SnapshotVersion.MIN; }\n if (resumeToken === void 0) { resumeToken = emptyByteString(); }\n this.query = query;\n this.targetId = targetId;\n this.purpose = purpose;\n this.snapshotVersion = snapshotVersion;\n this.resumeToken = resumeToken;\n }\n /**\n * Creates a new query data instance with an updated snapshot version and\n * resume token.\n */\n QueryData.prototype.update = function (updated) {\n return new QueryData(this.query, this.targetId, this.purpose, updated.snapshotVersion, updated.resumeToken);\n };\n QueryData.prototype.equals = function (other) {\n return (this.targetId === other.targetId &&\n this.purpose === other.purpose &&\n this.snapshotVersion.equals(other.snapshotVersion) &&\n this.resumeToken === other.resumeToken &&\n this.query.equals(other.query));\n };\n return QueryData;\n}());\n\n\n//# sourceMappingURL=query_data.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/mutation.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar mutation___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n/**\n * Provides a set of fields that can be used to partially patch a document.\n * FieldMask is used in conjunction with ObjectValue.\n * Examples:\n * foo - Overwrites foo entirely with the provided value. If foo is not\n * present in the companion ObjectValue, the field is deleted.\n * foo.bar - Overwrites only the field bar of the object foo.\n * If foo is not an object, foo is replaced with an object\n * containing foo\n */\nvar mutation_FieldMask = /** @class */ (function () {\n function FieldMask(fields) {\n this.fields = fields;\n // TODO(dimond): validation of FieldMask\n }\n FieldMask.prototype.equals = function (other) {\n return arrayEquals(this.fields, other.fields);\n };\n return FieldMask;\n}());\n\n/** Transforms a value into a server-generated timestamp. */\nvar ServerTimestampTransform = /** @class */ (function () {\n function ServerTimestampTransform() {\n }\n ServerTimestampTransform.prototype.equals = function (other) {\n return other instanceof ServerTimestampTransform;\n };\n ServerTimestampTransform.instance = new ServerTimestampTransform();\n return ServerTimestampTransform;\n}());\n\n/** A field path and the TransformOperation to perform upon it. */\nvar FieldTransform = /** @class */ (function () {\n function FieldTransform(field, transform) {\n this.field = field;\n this.transform = transform;\n }\n FieldTransform.prototype.equals = function (other) {\n return (this.field.equals(other.field) && this.transform.equals(other.transform));\n };\n return FieldTransform;\n}());\n\n/** The result of successfully applying a mutation to the backend. */\nvar MutationResult = /** @class */ (function () {\n function MutationResult(\n /**\n * The version at which the mutation was committed or null for a delete.\n */\n version, \n /**\n * The resulting fields returned from the backend after a\n * TransformMutation has been committed. Contains one FieldValue for each\n * FieldTransform that was in the mutation.\n *\n * Will be null if the mutation was not a TransformMutation.\n */\n transformResults) {\n this.version = version;\n this.transformResults = transformResults;\n }\n return MutationResult;\n}());\n\nvar MutationType;\n(function (MutationType) {\n MutationType[MutationType[\"Set\"] = 0] = \"Set\";\n MutationType[MutationType[\"Patch\"] = 1] = \"Patch\";\n MutationType[MutationType[\"Transform\"] = 2] = \"Transform\";\n MutationType[MutationType[\"Delete\"] = 3] = \"Delete\";\n})(MutationType = MutationType || (MutationType = {}));\n/**\n * Encodes a precondition for a mutation. This follows the model that the\n * backend accepts with the special case of an explicit \"empty\" precondition\n * (meaning no precondition).\n */\nvar mutation_Precondition = /** @class */ (function () {\n function Precondition(updateTime, exists) {\n this.updateTime = updateTime;\n this.exists = exists;\n assert(updateTime === undefined || exists === undefined, 'Precondition can specify \"exists\" or \"updateTime\" but not both');\n }\n /** Creates a new Precondition with an exists flag. */\n Precondition.exists = function (exists) {\n return new Precondition(undefined, exists);\n };\n /** Creates a new Precondition based on a version a document exists at. */\n Precondition.updateTime = function (version) {\n return new Precondition(version);\n };\n Object.defineProperty(Precondition.prototype, \"isNone\", {\n /** Returns whether this Precondition is empty. */\n get: function () {\n return this.updateTime === undefined && this.exists === undefined;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns true if the preconditions is valid for the given document\n * (or null if no document is available).\n */\n Precondition.prototype.isValidFor = function (maybeDoc) {\n if (this.updateTime !== undefined) {\n return (maybeDoc instanceof document_Document && maybeDoc.version.equals(this.updateTime));\n }\n else if (this.exists !== undefined) {\n if (this.exists) {\n return maybeDoc instanceof document_Document;\n }\n else {\n return maybeDoc === null || maybeDoc instanceof document_NoDocument;\n }\n }\n else {\n assert(this.isNone, 'Precondition should be empty');\n return true;\n }\n };\n Precondition.prototype.equals = function (other) {\n return (equals(this.updateTime, other.updateTime) &&\n this.exists === other.exists);\n };\n Precondition.NONE = new Precondition();\n return Precondition;\n}());\n\n/**\n * A mutation describes a self-contained change to a document. Mutations can\n * create, replace, delete, and update subsets of documents.\n *\n * Mutations not only act on the value of the document but also it version.\n * In the case of Set, Patch, and Transform mutations we preserve the existing\n * version. In the case of Delete mutations, we reset the version to 0.\n *\n * Here's the expected transition table.\n *\n * MUTATION APPLIED TO RESULTS IN\n *\n * SetMutation Document(v3) Document(v3)\n * SetMutation NoDocument(v3) Document(v0)\n * SetMutation null Document(v0)\n * PatchMutation Document(v3) Document(v3)\n * PatchMutation NoDocument(v3) NoDocument(v3)\n * PatchMutation null null\n * TransformMutation Document(v3) Document(v3)\n * TransformMutation NoDocument(v3) NoDocument(v3)\n * TransformMutation null null\n * DeleteMutation Document(v3) NoDocument(v0)\n * DeleteMutation NoDocument(v3) NoDocument(v0)\n * DeleteMutation null NoDocument(v0)\n *\n * Note that TransformMutations don't create Documents (in the case of being\n * applied to a NoDocument), even though they would on the backend. This is\n * because the client always combines the TransformMutation with a SetMutation\n * or PatchMutation and we only want to apply the transform if the prior\n * mutation resulted in a Document (always true for a SetMutation, but not\n * necessarily for a PatchMutation).\n *\n * ## Subclassing Notes\n *\n * Subclasses of Mutation need to implement applyToRemoteDocument() and\n * applyToLocalView() to implement the actual behavior of applying the mutation\n * to some source document.\n */\nvar mutation_Mutation = /** @class */ (function () {\n function Mutation() {\n }\n Mutation.prototype.verifyKeyMatches = function (maybeDoc) {\n if (maybeDoc != null) {\n assert(maybeDoc.key.equals(this.key), 'Can only apply a mutation to a document with the same key');\n }\n };\n /**\n * Returns the version from the given document for use as the result of a\n * mutation. Mutations are defined to return the version of the base document\n * only if it is an existing document. Deleted and unknown documents have a\n * post-mutation version of SnapshotVersion.MIN.\n */\n Mutation.getPostMutationVersion = function (maybeDoc) {\n if (maybeDoc instanceof document_Document) {\n return maybeDoc.version;\n }\n else {\n return snapshot_version_SnapshotVersion.MIN;\n }\n };\n return Mutation;\n}());\n\n/**\n * A mutation that creates or replaces the document at the given key with the\n * object value contents.\n */\nvar mutation_SetMutation = /** @class */ (function (_super) {\n mutation___extends(SetMutation, _super);\n function SetMutation(key, value, precondition) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.value = value;\n _this.precondition = precondition;\n _this.type = MutationType.Set;\n return _this;\n }\n SetMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults == null, 'Transform results received by SetMutation.');\n // Unlike applyToLocalView, if we're applying a mutation to a remote\n // document the server has accepted the mutation so the precondition must\n // have held.\n var version = mutation_Mutation.getPostMutationVersion(maybeDoc);\n return new document_Document(this.key, version, this.value, {\n hasLocalMutations: false\n });\n };\n SetMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var version = mutation_Mutation.getPostMutationVersion(maybeDoc);\n return new document_Document(this.key, version, this.value, {\n hasLocalMutations: true\n });\n };\n SetMutation.prototype.equals = function (other) {\n return (other instanceof SetMutation &&\n this.key.equals(other.key) &&\n this.value.equals(other.value) &&\n this.precondition.equals(other.precondition));\n };\n return SetMutation;\n}(mutation_Mutation));\n\n/**\n * A mutation that modifies fields of the document at the given key with the\n * given values. The values are applied through a field mask:\n *\n * * When a field is in both the mask and the values, the corresponding field\n * is updated.\n * * When a field is in neither the mask nor the values, the corresponding\n * field is unmodified.\n * * When a field is in the mask but not in the values, the corresponding field\n * is deleted.\n * * When a field is not in the mask but is in the values, the values map is\n * ignored.\n */\nvar mutation_PatchMutation = /** @class */ (function (_super) {\n mutation___extends(PatchMutation, _super);\n function PatchMutation(key, data, fieldMask, precondition) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.data = data;\n _this.fieldMask = fieldMask;\n _this.precondition = precondition;\n _this.type = MutationType.Patch;\n return _this;\n }\n PatchMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults == null, 'Transform results received by PatchMutation.');\n // TODO(mcg): Relax enforcement of this precondition\n //\n // We shouldn't actually enforce the precondition since it already passed on\n // the backend, but we may not have a local version of the document to\n // patch, so we use the precondition to prevent incorrectly putting a\n // partial document into our cache.\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var version = mutation_Mutation.getPostMutationVersion(maybeDoc);\n var newData = this.patchDocument(maybeDoc);\n return new document_Document(this.key, version, newData, {\n hasLocalMutations: false\n });\n };\n PatchMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var version = mutation_Mutation.getPostMutationVersion(maybeDoc);\n var newData = this.patchDocument(maybeDoc);\n return new document_Document(this.key, version, newData, {\n hasLocalMutations: true\n });\n };\n PatchMutation.prototype.equals = function (other) {\n return (other instanceof PatchMutation &&\n this.key.equals(other.key) &&\n this.fieldMask.equals(other.fieldMask) &&\n this.precondition.equals(other.precondition));\n };\n /**\n * Patches the data of document if available or creates a new document. Note\n * that this does not check whether or not the precondition of this patch\n * holds.\n */\n PatchMutation.prototype.patchDocument = function (maybeDoc) {\n var data;\n if (maybeDoc instanceof document_Document) {\n data = maybeDoc.data;\n }\n else {\n data = field_value_ObjectValue.EMPTY;\n }\n return this.patchObject(data);\n };\n PatchMutation.prototype.patchObject = function (data) {\n for (var _i = 0, _a = this.fieldMask.fields; _i < _a.length; _i++) {\n var fieldPath = _a[_i];\n var newValue = this.data.field(fieldPath);\n if (newValue !== undefined) {\n data = data.set(fieldPath, newValue);\n }\n else {\n data = data.delete(fieldPath);\n }\n }\n return data;\n };\n return PatchMutation;\n}(mutation_Mutation));\n\n/**\n * A mutation that modifies specific fields of the document with transform\n * operations. Currently the only supported transform is a server timestamp, but\n * IP Address, increment(n), etc. could be supported in the future.\n *\n * It is somewhat similar to a PatchMutation in that it patches specific fields\n * and has no effect when applied to a null or NoDocument (see comment on\n * Mutation for rationale).\n */\nvar mutation_TransformMutation = /** @class */ (function (_super) {\n mutation___extends(TransformMutation, _super);\n function TransformMutation(key, fieldTransforms) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.fieldTransforms = fieldTransforms;\n _this.type = MutationType.Transform;\n // NOTE: We set a precondition of exists: true as a safety-check, since we\n // always combine TransformMutations with a SetMutation or PatchMutation which\n // (if successful) should end up with an existing document.\n _this.precondition = mutation_Precondition.exists(true);\n return _this;\n }\n TransformMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults != null, 'Transform results missing for TransformMutation.');\n var transformResults = mutationResult.transformResults;\n // TODO(mcg): Relax enforcement of this precondition\n //\n // We shouldn't actually enforce the precondition since it already passed on\n // the backend, but we may not have a local version of the document to\n // patch, so we use the precondition to prevent incorrectly putting a\n // partial document into our cache.\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var doc = this.requireDocument(maybeDoc);\n var newData = this.transformObject(doc.data, transformResults);\n return new document_Document(this.key, doc.version, newData, {\n hasLocalMutations: false\n });\n };\n TransformMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var doc = this.requireDocument(maybeDoc);\n var transformResults = this.localTransformResults(localWriteTime);\n var newData = this.transformObject(doc.data, transformResults);\n return new document_Document(this.key, doc.version, newData, {\n hasLocalMutations: true\n });\n };\n TransformMutation.prototype.equals = function (other) {\n return (other instanceof TransformMutation &&\n this.key.equals(other.key) &&\n arrayEquals(this.fieldTransforms, other.fieldTransforms) &&\n this.precondition.equals(other.precondition));\n };\n /**\n * Asserts that the given MaybeDocument is actually a Document and verifies\n * that it matches the key for this mutation. Since we only support\n * transformations with precondition exists this method is guaranteed to be\n * safe.\n */\n TransformMutation.prototype.requireDocument = function (maybeDoc) {\n assert(maybeDoc instanceof document_Document, 'Unknown MaybeDocument type ' + maybeDoc);\n var doc = maybeDoc;\n assert(doc.key.equals(this.key), 'Can only transform a document with the same key');\n return doc;\n };\n /**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use when applying a\n * TransformMutation locally.\n *\n * @param localWriteTime The local time of the transform mutation (used to\n * generate ServerTimestampValues).\n * @return The transform results list.\n */\n TransformMutation.prototype.localTransformResults = function (localWriteTime) {\n var transformResults = [];\n for (var _i = 0, _a = this.fieldTransforms; _i < _a.length; _i++) {\n var fieldTransform = _a[_i];\n var transform = fieldTransform.transform;\n if (transform instanceof ServerTimestampTransform) {\n transformResults.push(new ServerTimestampValue(localWriteTime));\n }\n else {\n return fail('Encountered unknown transform: ' + transform);\n }\n }\n return transformResults;\n };\n TransformMutation.prototype.transformObject = function (data, transformResults) {\n assert(transformResults.length === this.fieldTransforms.length, 'TransformResults length mismatch.');\n for (var i = 0; i < this.fieldTransforms.length; i++) {\n var fieldTransform = this.fieldTransforms[i];\n var transform = fieldTransform.transform;\n var fieldPath = fieldTransform.field;\n if (transform instanceof ServerTimestampTransform) {\n data = data.set(fieldPath, transformResults[i]);\n }\n else {\n return fail('Encountered unknown transform: ' + transform);\n }\n }\n return data;\n };\n return TransformMutation;\n}(mutation_Mutation));\n\n/** A mutation that deletes the document at the given key. */\nvar mutation_DeleteMutation = /** @class */ (function (_super) {\n mutation___extends(DeleteMutation, _super);\n function DeleteMutation(key, precondition) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.precondition = precondition;\n _this.type = MutationType.Delete;\n return _this;\n }\n DeleteMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults == null, 'Transform results received by DeleteMutation.');\n // Unlike applyToLocalView, if we're applying a mutation to a remote\n // document the server has accepted the mutation so the precondition must\n // have held.\n return new document_NoDocument(this.key, snapshot_version_SnapshotVersion.MIN);\n };\n DeleteMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n if (maybeDoc) {\n assert(maybeDoc.key.equals(this.key), 'Can only apply mutation to document with same key');\n }\n return new document_NoDocument(this.key, snapshot_version_SnapshotVersion.forDeletedDoc());\n };\n DeleteMutation.prototype.equals = function (other) {\n return (other instanceof DeleteMutation &&\n this.key.equals(other.key) &&\n this.precondition.equals(other.precondition));\n };\n return DeleteMutation;\n}(mutation_Mutation));\n\n\n//# sourceMappingURL=mutation.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/existence_filter.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ExistenceFilter = /** @class */ (function () {\n // TODO(b/33078163): just use simplest form of existence filter for now\n function ExistenceFilter(count) {\n this.count = count;\n }\n ExistenceFilter.prototype.equals = function (other) {\n return other && other.count === this.count;\n };\n return ExistenceFilter;\n}());\n\n\n//# sourceMappingURL=existence_filter.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/rpc_error.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * Error Codes describing the different ways GRPC can fail. These are copied\n * directly from GRPC's sources here:\n *\n * https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n *\n * Important! The names of these identifiers matter because the string forms\n * are used for reverse lookups from the webchannel stream. Do NOT change the\n * names of these identifiers.\n */\nvar RpcCode;\n(function (RpcCode) {\n RpcCode[RpcCode[\"OK\"] = 0] = \"OK\";\n RpcCode[RpcCode[\"CANCELLED\"] = 1] = \"CANCELLED\";\n RpcCode[RpcCode[\"UNKNOWN\"] = 2] = \"UNKNOWN\";\n RpcCode[RpcCode[\"INVALID_ARGUMENT\"] = 3] = \"INVALID_ARGUMENT\";\n RpcCode[RpcCode[\"DEADLINE_EXCEEDED\"] = 4] = \"DEADLINE_EXCEEDED\";\n RpcCode[RpcCode[\"NOT_FOUND\"] = 5] = \"NOT_FOUND\";\n RpcCode[RpcCode[\"ALREADY_EXISTS\"] = 6] = \"ALREADY_EXISTS\";\n RpcCode[RpcCode[\"PERMISSION_DENIED\"] = 7] = \"PERMISSION_DENIED\";\n RpcCode[RpcCode[\"UNAUTHENTICATED\"] = 16] = \"UNAUTHENTICATED\";\n RpcCode[RpcCode[\"RESOURCE_EXHAUSTED\"] = 8] = \"RESOURCE_EXHAUSTED\";\n RpcCode[RpcCode[\"FAILED_PRECONDITION\"] = 9] = \"FAILED_PRECONDITION\";\n RpcCode[RpcCode[\"ABORTED\"] = 10] = \"ABORTED\";\n RpcCode[RpcCode[\"OUT_OF_RANGE\"] = 11] = \"OUT_OF_RANGE\";\n RpcCode[RpcCode[\"UNIMPLEMENTED\"] = 12] = \"UNIMPLEMENTED\";\n RpcCode[RpcCode[\"INTERNAL\"] = 13] = \"INTERNAL\";\n RpcCode[RpcCode[\"UNAVAILABLE\"] = 14] = \"UNAVAILABLE\";\n RpcCode[RpcCode[\"DATA_LOSS\"] = 15] = \"DATA_LOSS\";\n})(RpcCode || (RpcCode = {}));\nfunction isPermanentError(code) {\n switch (code) {\n case Code.OK:\n return fail('Treated status OK as error');\n case Code.CANCELLED:\n case Code.UNKNOWN:\n case Code.DEADLINE_EXCEEDED:\n case Code.RESOURCE_EXHAUSTED:\n case Code.INTERNAL:\n case Code.UNAVAILABLE:\n // Unauthenticated means something went wrong with our token and we need\n // to retry with new credentials which will happen automatically.\n // TODO(b/37325376): Give up after second unauthenticated error.\n case Code.UNAUTHENTICATED:\n return false;\n case Code.INVALID_ARGUMENT:\n case Code.NOT_FOUND:\n case Code.ALREADY_EXISTS:\n case Code.PERMISSION_DENIED:\n case Code.FAILED_PRECONDITION:\n // Aborted might be retried in some scenarios, but that is dependant on\n // the context and should handled individually by the calling code.\n // See https://cloud.google.com/apis/design/errors.\n case Code.ABORTED:\n case Code.OUT_OF_RANGE:\n case Code.UNIMPLEMENTED:\n case Code.DATA_LOSS:\n return true;\n default:\n return fail('Unknown status code: ' + code);\n }\n}\n/**\n * Maps an error Code from a GRPC status identifier like 'NOT_FOUND'.\n *\n * @returns The Code equivalent to the given status string or undefined if\n * there is no match.\n */\nfunction mapCodeFromRpcStatus(status) {\n // tslint:disable-next-line:no-any lookup by string\n var code = RpcCode[status];\n if (code === undefined) {\n return undefined;\n }\n return mapCodeFromRpcCode(code);\n}\n/**\n * Maps an error Code from GRPC status code number, like 0, 1, or 14. These\n * are not the same as HTTP status codes.\n *\n * @returns The Code equivalent to the given GRPC status code. Fails if there\n * is no match.\n */\nfunction mapCodeFromRpcCode(code) {\n switch (code) {\n case RpcCode.OK:\n return Code.OK;\n case RpcCode.CANCELLED:\n return Code.CANCELLED;\n case RpcCode.UNKNOWN:\n return Code.UNKNOWN;\n case RpcCode.DEADLINE_EXCEEDED:\n return Code.DEADLINE_EXCEEDED;\n case RpcCode.RESOURCE_EXHAUSTED:\n return Code.RESOURCE_EXHAUSTED;\n case RpcCode.INTERNAL:\n return Code.INTERNAL;\n case RpcCode.UNAVAILABLE:\n return Code.UNAVAILABLE;\n case RpcCode.UNAUTHENTICATED:\n return Code.UNAUTHENTICATED;\n case RpcCode.INVALID_ARGUMENT:\n return Code.INVALID_ARGUMENT;\n case RpcCode.NOT_FOUND:\n return Code.NOT_FOUND;\n case RpcCode.ALREADY_EXISTS:\n return Code.ALREADY_EXISTS;\n case RpcCode.PERMISSION_DENIED:\n return Code.PERMISSION_DENIED;\n case RpcCode.FAILED_PRECONDITION:\n return Code.FAILED_PRECONDITION;\n case RpcCode.ABORTED:\n return Code.ABORTED;\n case RpcCode.OUT_OF_RANGE:\n return Code.OUT_OF_RANGE;\n case RpcCode.UNIMPLEMENTED:\n return Code.UNIMPLEMENTED;\n case RpcCode.DATA_LOSS:\n return Code.DATA_LOSS;\n default:\n return fail('Unknown status code: ' + code);\n }\n}\n/**\n * Maps an RPC code from a Code. This is the reverse operation from\n * mapCodeFromRpcCode and should really only be used in tests.\n */\nfunction mapRpcCodeFromCode(code) {\n if (code === undefined) {\n return RpcCode.OK;\n }\n switch (code) {\n case Code.OK:\n return RpcCode.OK;\n case Code.CANCELLED:\n return RpcCode.CANCELLED;\n case Code.UNKNOWN:\n return RpcCode.UNKNOWN;\n case Code.DEADLINE_EXCEEDED:\n return RpcCode.DEADLINE_EXCEEDED;\n case Code.RESOURCE_EXHAUSTED:\n return RpcCode.RESOURCE_EXHAUSTED;\n case Code.INTERNAL:\n return RpcCode.INTERNAL;\n case Code.UNAVAILABLE:\n return RpcCode.UNAVAILABLE;\n case Code.UNAUTHENTICATED:\n return RpcCode.UNAUTHENTICATED;\n case Code.INVALID_ARGUMENT:\n return RpcCode.INVALID_ARGUMENT;\n case Code.NOT_FOUND:\n return RpcCode.NOT_FOUND;\n case Code.ALREADY_EXISTS:\n return RpcCode.ALREADY_EXISTS;\n case Code.PERMISSION_DENIED:\n return RpcCode.PERMISSION_DENIED;\n case Code.FAILED_PRECONDITION:\n return RpcCode.FAILED_PRECONDITION;\n case Code.ABORTED:\n return RpcCode.ABORTED;\n case Code.OUT_OF_RANGE:\n return RpcCode.OUT_OF_RANGE;\n case Code.UNIMPLEMENTED:\n return RpcCode.UNIMPLEMENTED;\n case Code.DATA_LOSS:\n return RpcCode.DATA_LOSS;\n default:\n return fail('Unknown status code: ' + code);\n }\n}\n/**\n * Converts an HTTP Status Code to the equivalent error code.\n *\n * @param status An HTTP Status Code, like 200, 404, 503, etc.\n * @returns The equivalent Code. Unknown status codes are mapped to\n * Code.UNKNOWN.\n */\nfunction mapCodeFromHttpStatus(status) {\n // The canonical error codes for Google APIs [1] specify mapping onto HTTP\n // status codes but the mapping is not bijective. In each case of ambiguity\n // this function chooses a primary error.\n //\n // [1]\n // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto\n switch (status) {\n case 200:// OK\n return Code.OK;\n case 400:// Bad Request\n return Code.INVALID_ARGUMENT;\n // Other possibilities based on the forward mapping\n // return Code.FAILED_PRECONDITION;\n // return Code.OUT_OF_RANGE;\n case 401:// Unauthorized\n return Code.UNAUTHENTICATED;\n case 403:// Forbidden\n return Code.PERMISSION_DENIED;\n case 404:// Not Found\n return Code.NOT_FOUND;\n case 409:// Conflict\n return Code.ABORTED;\n // Other possibilities:\n // return Code.ALREADY_EXISTS;\n case 416:// Range Not Satisfiable\n return Code.OUT_OF_RANGE;\n case 429:// Too Many Requests\n return Code.RESOURCE_EXHAUSTED;\n case 499:// Client Closed Request\n return Code.CANCELLED;\n case 500:// Internal Server Error\n return Code.UNKNOWN;\n // Other possibilities:\n // return Code.INTERNAL;\n // return Code.DATA_LOSS;\n case 501:// Unimplemented\n return Code.UNIMPLEMENTED;\n case 503:// Service Unavailable\n return Code.UNAVAILABLE;\n case 504:// Gateway Timeout\n return Code.DEADLINE_EXCEEDED;\n default:\n if (status >= 200 && status < 300)\n return Code.OK;\n if (status >= 400 && status < 500)\n return Code.FAILED_PRECONDITION;\n if (status >= 500 && status < 600)\n return Code.INTERNAL;\n return Code.UNKNOWN;\n }\n}\n\n//# sourceMappingURL=rpc_error.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/sorted_set.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * SortedSet is an immutable (copy-on-write) collection that holds elements\n * in order specified by the provided comparator.\n *\n * NOTE: if provided comparator returns 0 for two elements, we consider them to\n * be equal!\n */\nvar sorted_set_SortedSet = /** @class */ (function () {\n function SortedSet(comparator) {\n this.comparator = comparator;\n this.data = new sorted_map_SortedMap(this.comparator);\n }\n /**\n * Creates a SortedSet from the keys of the map.\n * This is currently implemented as an O(n) copy.\n */\n SortedSet.fromMapKeys = function (map) {\n var keys = new SortedSet(map.comparator);\n map.forEach(function (key) {\n keys = keys.add(key);\n });\n return keys;\n };\n SortedSet.prototype.has = function (elem) {\n return this.data.get(elem) !== null;\n };\n SortedSet.prototype.first = function () {\n return this.data.minKey();\n };\n SortedSet.prototype.last = function () {\n return this.data.maxKey();\n };\n Object.defineProperty(SortedSet.prototype, \"size\", {\n get: function () {\n return this.data.size;\n },\n enumerable: true,\n configurable: true\n });\n SortedSet.prototype.indexOf = function (elem) {\n return this.data.indexOf(elem);\n };\n /** Iterates elements in order defined by \"comparator\" */\n SortedSet.prototype.forEach = function (cb) {\n this.data.inorderTraversal(function (k, v) {\n cb(k);\n return false;\n });\n };\n /** Iterates over `elem`s such that: range[0] <= elem < range[1]. */\n SortedSet.prototype.forEachInRange = function (range, cb) {\n var iter = this.data.getIteratorFrom(range[0]);\n while (iter.hasNext()) {\n var elem = iter.getNext();\n if (this.comparator(elem.key, range[1]) >= 0)\n return;\n cb(elem.key);\n }\n };\n /**\n * Iterates over `elem`s such that: start <= elem until false is returned.\n */\n SortedSet.prototype.forEachWhile = function (cb, start) {\n var iter;\n if (start !== undefined) {\n iter = this.data.getIteratorFrom(start);\n }\n else {\n iter = this.data.getIterator();\n }\n while (iter.hasNext()) {\n var elem = iter.getNext();\n var result = cb(elem.key);\n if (!result)\n return;\n }\n };\n /** Finds the least element greater than or equal to `elem`. */\n SortedSet.prototype.firstAfterOrEqual = function (elem) {\n var iter = this.data.getIteratorFrom(elem);\n return iter.hasNext() ? iter.getNext().key : null;\n };\n /** Inserts or updates an element */\n SortedSet.prototype.add = function (elem) {\n return this.copy(this.data.remove(elem).insert(elem, true));\n };\n /** Deletes an element */\n SortedSet.prototype.delete = function (elem) {\n if (!this.has(elem))\n return this;\n return this.copy(this.data.remove(elem));\n };\n SortedSet.prototype.isEmpty = function () {\n return this.data.isEmpty();\n };\n SortedSet.prototype.unionWith = function (other) {\n var result = this;\n other.forEach(function (elem) {\n result = result.add(elem);\n });\n return result;\n };\n SortedSet.prototype.equals = function (other) {\n if (!(other instanceof SortedSet))\n return false;\n if (this.size !== other.size)\n return false;\n var thisIt = this.data.getIterator();\n var otherIt = other.data.getIterator();\n while (thisIt.hasNext()) {\n var thisElem = thisIt.getNext().key;\n var otherElem = otherIt.getNext().key;\n if (this.comparator(thisElem, otherElem) !== 0)\n return false;\n }\n return true;\n };\n SortedSet.prototype.toString = function () {\n var result = [];\n this.forEach(function (elem) { return result.push(elem); });\n return 'SortedSet(' + result.toString() + ')';\n };\n SortedSet.prototype.copy = function (data) {\n var result = new SortedSet(this.comparator);\n result.data = data;\n return result;\n };\n return SortedSet;\n}());\n\n\n//# sourceMappingURL=sorted_set.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/collections.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar EMPTY_MAYBE_DOCUMENT_MAP = new sorted_map_SortedMap(document_key_DocumentKey.comparator);\nfunction maybeDocumentMap() {\n return EMPTY_MAYBE_DOCUMENT_MAP;\n}\nvar EMPTY_DOCUMENT_MAP = new sorted_map_SortedMap(document_key_DocumentKey.comparator);\nfunction documentMap() {\n return EMPTY_DOCUMENT_MAP;\n}\nvar EMPTY_DOCUMENT_VERSION_MAP = new sorted_map_SortedMap(document_key_DocumentKey.comparator);\nfunction documentVersionMap() {\n return EMPTY_DOCUMENT_VERSION_MAP;\n}\nvar EMPTY_DOCUMENT_KEY_SET = new sorted_set_SortedSet(document_key_DocumentKey.comparator);\nfunction documentKeySet() {\n return EMPTY_DOCUMENT_KEY_SET;\n}\n\n//# sourceMappingURL=collections.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/remote_event.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * An event from the RemoteStore. It is split into targetChanges (changes to the\n * state or the set of documents in our watched targets) and documentUpdates\n * (changes to the actual documents).\n */\nvar remote_event_RemoteEvent = /** @class */ (function () {\n function RemoteEvent(\n /**\n * The snapshot version this event brings us up to, or MIN if not set.\n */\n snapshotVersion, \n /**\n * A map from target to changes to the target. See TargetChange.\n */\n targetChanges, \n /**\n * A set of which documents have changed or been deleted, along with the\n * doc's new values (if not deleted).\n */\n documentUpdates) {\n this.snapshotVersion = snapshotVersion;\n this.targetChanges = targetChanges;\n this.documentUpdates = documentUpdates;\n }\n RemoteEvent.prototype.addDocumentUpdate = function (doc) {\n this.documentUpdates = this.documentUpdates.insert(doc.key, doc);\n };\n RemoteEvent.prototype.handleExistenceFilterMismatch = function (targetId) {\n /*\n * An existence filter mismatch will reset the query and we need to reset\n * the mapping to contain no documents and an empty resume token.\n *\n * Note:\n * * The reset mapping is empty, specifically forcing the consumer of the\n * change to forget all keys for this targetID;\n * * The resume snapshot for this target must be reset\n * * The target must be unacked because unwatching and rewatching\n * introduces a race for changes.\n */\n this.targetChanges[targetId] = {\n mapping: new ResetMapping(),\n snapshotVersion: snapshot_version_SnapshotVersion.MIN,\n currentStatusUpdate: CurrentStatusUpdate.MarkNotCurrent,\n resumeToken: emptyByteString()\n };\n };\n return RemoteEvent;\n}());\n\n/**\n * Represents an update to the current status of a target, either explicitly\n * having no new state, or the new value to set. Note \"current\" has special\n * meaning for in the RPC protocol that implies that a target is both up-to-date\n * and consistent with the rest of the watch stream.\n */\nvar CurrentStatusUpdate;\n(function (CurrentStatusUpdate) {\n /** The current status is not affected and should not be modified. */\n CurrentStatusUpdate[CurrentStatusUpdate[\"None\"] = 0] = \"None\";\n /** The target must be marked as no longer \"current\". */\n CurrentStatusUpdate[CurrentStatusUpdate[\"MarkNotCurrent\"] = 1] = \"MarkNotCurrent\";\n /** The target must be marked as \"current\". */\n CurrentStatusUpdate[CurrentStatusUpdate[\"MarkCurrent\"] = 2] = \"MarkCurrent\";\n})(CurrentStatusUpdate = CurrentStatusUpdate || (CurrentStatusUpdate = {}));\nvar EMPTY_KEY_SET = documentKeySet();\nvar ResetMapping = /** @class */ (function () {\n function ResetMapping() {\n this.docs = EMPTY_KEY_SET;\n }\n Object.defineProperty(ResetMapping.prototype, \"documents\", {\n get: function () {\n return this.docs;\n },\n enumerable: true,\n configurable: true\n });\n ResetMapping.prototype.add = function (key) {\n this.docs = this.docs.add(key);\n };\n ResetMapping.prototype.delete = function (key) {\n this.docs = this.docs.delete(key);\n };\n ResetMapping.prototype.equals = function (other) {\n return other !== null && this.docs.equals(other.docs);\n };\n return ResetMapping;\n}());\n\nvar UpdateMapping = /** @class */ (function () {\n function UpdateMapping() {\n this.addedDocuments = EMPTY_KEY_SET;\n this.removedDocuments = EMPTY_KEY_SET;\n }\n UpdateMapping.prototype.applyToKeySet = function (keys) {\n var result = keys;\n this.addedDocuments.forEach(function (key) { return (result = result.add(key)); });\n this.removedDocuments.forEach(function (key) { return (result = result.delete(key)); });\n return result;\n };\n UpdateMapping.prototype.add = function (key) {\n this.addedDocuments = this.addedDocuments.add(key);\n this.removedDocuments = this.removedDocuments.delete(key);\n };\n UpdateMapping.prototype.delete = function (key) {\n this.addedDocuments = this.addedDocuments.delete(key);\n this.removedDocuments = this.removedDocuments.add(key);\n };\n UpdateMapping.prototype.equals = function (other) {\n return (other !== null &&\n this.addedDocuments.equals(other.addedDocuments) &&\n this.removedDocuments.equals(other.removedDocuments));\n };\n return UpdateMapping;\n}());\n\n\n//# sourceMappingURL=remote_event.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/watch_change.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/**\n * Represents a changed document and a list of target ids to which this change\n * applies.\n *\n * If document has been deleted NoDocument will be provided.\n */\nvar DocumentWatchChange = /** @class */ (function () {\n function DocumentWatchChange(\n /** The new document applies to all of these targets. */\n updatedTargetIds, \n /** The new document is removed from all of these targets. */\n removedTargetIds, \n /** The key of the document for this change. */\n key, \n /**\n * The new document or NoDocument if it was deleted. Is null if the\n * document went out of view without the server sending a new document.\n */\n newDoc) {\n this.updatedTargetIds = updatedTargetIds;\n this.removedTargetIds = removedTargetIds;\n this.key = key;\n this.newDoc = newDoc;\n }\n return DocumentWatchChange;\n}());\n\nvar ExistenceFilterChange = /** @class */ (function () {\n function ExistenceFilterChange(targetId, existenceFilter) {\n this.targetId = targetId;\n this.existenceFilter = existenceFilter;\n }\n return ExistenceFilterChange;\n}());\n\nvar WatchTargetChangeState;\n(function (WatchTargetChangeState) {\n WatchTargetChangeState[WatchTargetChangeState[\"NoChange\"] = 0] = \"NoChange\";\n WatchTargetChangeState[WatchTargetChangeState[\"Added\"] = 1] = \"Added\";\n WatchTargetChangeState[WatchTargetChangeState[\"Removed\"] = 2] = \"Removed\";\n WatchTargetChangeState[WatchTargetChangeState[\"Current\"] = 3] = \"Current\";\n WatchTargetChangeState[WatchTargetChangeState[\"Reset\"] = 4] = \"Reset\";\n})(WatchTargetChangeState = WatchTargetChangeState || (WatchTargetChangeState = {}));\nvar watch_change_WatchTargetChange = /** @class */ (function () {\n function WatchTargetChange(\n /** What kind of change occurred to the watch target. */\n state, \n /** The target IDs that were added/removed/set. */\n targetIds, \n /**\n * An opaque, server-assigned token that allows watching a query to be\n * resumed after disconnecting without retransmitting all the data that\n * matches the query. The resume token essentially identifies a point in\n * time from which the server should resume sending results.\n */\n resumeToken, \n /** An RPC error indicating why the watch failed. */\n cause) {\n if (resumeToken === void 0) { resumeToken = emptyByteString(); }\n if (cause === void 0) { cause = null; }\n this.state = state;\n this.targetIds = targetIds;\n this.resumeToken = resumeToken;\n this.cause = cause;\n }\n return WatchTargetChange;\n}());\n\n/**\n * A helper class to accumulate watch changes into a RemoteEvent and other\n * target information.\n */\nvar watch_change_WatchChangeAggregator = /** @class */ (function () {\n function WatchChangeAggregator(snapshotVersion, listenTargets, pendingTargetResponses) {\n this.snapshotVersion = snapshotVersion;\n this.listenTargets = listenTargets;\n /** The existence filter - if any - for the given target IDs. */\n this.existenceFilters = {};\n /** Keeps track of the current target mappings */\n this.targetChanges = {};\n /** Keeps track of document to update */\n this.documentUpdates = maybeDocumentMap();\n /** Whether this aggregator was frozen and can no longer be modified */\n this.frozen = false;\n this.pendingTargetResponses = shallowCopy(pendingTargetResponses);\n }\n /** Aggregates a watch change into the current state */\n WatchChangeAggregator.prototype.add = function (watchChange) {\n assert(!this.frozen, 'Trying to modify frozen WatchChangeAggregator.');\n if (watchChange instanceof DocumentWatchChange) {\n this.addDocumentChange(watchChange);\n }\n else if (watchChange instanceof watch_change_WatchTargetChange) {\n this.addTargetChange(watchChange);\n }\n else if (watchChange instanceof ExistenceFilterChange) {\n this.addExistenceFilterChange(watchChange);\n }\n else {\n fail('Unknown watch change: ' + watchChange);\n }\n };\n /** Aggregates all provided watch changes to the current state in order */\n WatchChangeAggregator.prototype.addChanges = function (watchChanges) {\n var _this = this;\n assert(!this.frozen, 'Trying to modify frozen WatchChangeAggregator.');\n watchChanges.forEach(function (change) { return _this.add(change); });\n };\n /**\n * Converts the current state into a remote event with the snapshot version\n * provided via the constructor.\n */\n WatchChangeAggregator.prototype.createRemoteEvent = function () {\n var _this = this;\n var targetChanges = this.targetChanges;\n // Remove all the non-active targets from the remote event.\n forEachNumber(this.targetChanges, function (targetId) {\n if (!_this.isActiveTarget(targetId)) {\n delete targetChanges[targetId];\n }\n });\n // Mark this aggregator as frozen so no further modifications are made\n this.frozen = true;\n return new remote_event_RemoteEvent(this.snapshotVersion, targetChanges, this.documentUpdates);\n };\n WatchChangeAggregator.prototype.ensureTargetChange = function (targetId) {\n var change = this.targetChanges[targetId];\n if (!change) {\n // Create an UpdateMapping by default, since resets are always explicit.\n change = {\n currentStatusUpdate: CurrentStatusUpdate.None,\n snapshotVersion: this.snapshotVersion,\n mapping: new UpdateMapping(),\n resumeToken: emptyByteString()\n };\n this.targetChanges[targetId] = change;\n }\n return change;\n };\n /**\n * We need to wait for watch to ack targets before we process those events,\n * so to know if a target is active, there must be no pending acks we're\n * waiting for and it must be in the current list of targets that the client\n * cares about.\n *\n * This method is visible for testing.\n */\n WatchChangeAggregator.prototype.isActiveTarget = function (targetId) {\n return (!contains(this.pendingTargetResponses, targetId) &&\n contains(this.listenTargets, targetId));\n };\n WatchChangeAggregator.prototype.addDocumentChange = function (docChange) {\n var relevant = false;\n for (var _i = 0, _a = docChange.updatedTargetIds; _i < _a.length; _i++) {\n var targetId = _a[_i];\n if (this.isActiveTarget(targetId)) {\n var change = this.ensureTargetChange(targetId);\n change.mapping.add(docChange.key);\n relevant = true;\n }\n }\n for (var _b = 0, _c = docChange.removedTargetIds; _b < _c.length; _b++) {\n var targetId = _c[_b];\n if (this.isActiveTarget(targetId)) {\n var change = this.ensureTargetChange(targetId);\n change.mapping.delete(docChange.key);\n relevant = true;\n }\n }\n // Only update the document if there is a new document to replace to an\n // active target that is being listened to, this might be just a target\n // update instead.\n if (docChange.newDoc && relevant) {\n this.documentUpdates = this.documentUpdates.insert(docChange.key, docChange.newDoc);\n }\n };\n WatchChangeAggregator.prototype.addTargetChange = function (targetChange) {\n var _this = this;\n targetChange.targetIds.forEach(function (targetId) {\n var change = _this.ensureTargetChange(targetId);\n switch (targetChange.state) {\n case WatchTargetChangeState.NoChange:\n if (_this.isActiveTarget(targetId)) {\n // Creating the change above satisfies the semantics of no-change.\n applyResumeToken(change, targetChange.resumeToken);\n }\n break;\n case WatchTargetChangeState.Added:\n // We need to decrement the number of pending acks needed from watch\n // for this targetId.\n _this.recordTargetResponse(targetId);\n if (!contains(_this.pendingTargetResponses, targetId)) {\n // We have a freshly added target, so we need to reset any state\n // that we had previously This can happen e.g. when remove and add\n // back a target for existence filter mismatches.\n change.mapping = new UpdateMapping();\n change.currentStatusUpdate = CurrentStatusUpdate.None;\n delete _this.existenceFilters[targetId];\n }\n applyResumeToken(change, targetChange.resumeToken);\n break;\n case WatchTargetChangeState.Removed:\n // We need to keep track of removed targets to we can\n // post-filter and remove any target changes.\n // We need to decrement the number of pending acks needed from watch\n // for this targetId.\n _this.recordTargetResponse(targetId);\n assert(!targetChange.cause, 'WatchChangeAggregator does not handle errored targets');\n break;\n case WatchTargetChangeState.Current:\n if (_this.isActiveTarget(targetId)) {\n change.currentStatusUpdate = CurrentStatusUpdate.MarkCurrent;\n applyResumeToken(change, targetChange.resumeToken);\n }\n break;\n case WatchTargetChangeState.Reset:\n if (_this.isActiveTarget(targetId)) {\n // Overwrite any existing target mapping with a reset\n // mapping. Every subsequent update will modify the reset\n // mapping, not an update mapping.\n change.mapping = new ResetMapping();\n applyResumeToken(change, targetChange.resumeToken);\n }\n break;\n default:\n fail('Unknown target watch change state: ' + targetChange.state);\n }\n });\n };\n /**\n * Record that we get a watch target add/remove by decrementing the number of\n * pending target responses that we have.\n */\n WatchChangeAggregator.prototype.recordTargetResponse = function (targetId) {\n var newCount = (this.pendingTargetResponses[targetId] || 0) - 1;\n if (newCount === 0) {\n delete this.pendingTargetResponses[targetId];\n }\n else {\n this.pendingTargetResponses[targetId] = newCount;\n }\n };\n WatchChangeAggregator.prototype.addExistenceFilterChange = function (change) {\n if (this.isActiveTarget(change.targetId)) {\n this.existenceFilters[change.targetId] = change.existenceFilter;\n }\n };\n return WatchChangeAggregator;\n}());\n\n/**\n * Applies the resume token to the TargetChange, but only when it has a new\n * value. null and empty resumeTokens are discarded.\n */\nfunction applyResumeToken(change, resumeToken) {\n if (resumeToken.length > 0) {\n change.resumeToken = resumeToken;\n }\n}\n\n//# sourceMappingURL=watch_change.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/serializer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar DIRECTIONS = (function () {\n var dirs = {};\n dirs[Direction.ASCENDING.name] = 'ASCENDING';\n dirs[Direction.DESCENDING.name] = 'DESCENDING';\n return dirs;\n})();\nvar OPERATORS = (function () {\n var ops = {};\n ops[query_RelationOp.LESS_THAN.name] = 'LESS_THAN';\n ops[query_RelationOp.LESS_THAN_OR_EQUAL.name] = 'LESS_THAN_OR_EQUAL';\n ops[query_RelationOp.GREATER_THAN.name] = 'GREATER_THAN';\n ops[query_RelationOp.GREATER_THAN_OR_EQUAL.name] = 'GREATER_THAN_OR_EQUAL';\n ops[query_RelationOp.EQUAL.name] = 'EQUAL';\n return ops;\n})();\nfunction assertPresent(value, description) {\n assert(!isNullOrUndefined(value), description + ' is missing');\n}\nfunction parseInt64(value) {\n // TODO(bjornick): Handle int64 greater than 53 bits.\n if (typeof value === 'number') {\n return value;\n }\n else if (typeof value === 'string') {\n return parseInt(value, 10);\n }\n else {\n return fail(\"can't parse \" + value);\n }\n}\n/**\n * Generates JsonObject values for the Datastore API suitable for sending to\n * either GRPC stub methods or via the JSON/HTTP REST API.\n * TODO(klimt): We can remove the databaseId argument if we keep the full\n * resource name in documents.\n */\nvar serializer_JsonProtoSerializer = /** @class */ (function () {\n function JsonProtoSerializer(databaseId, options) {\n this.databaseId = databaseId;\n this.options = options;\n }\n JsonProtoSerializer.prototype.emptyByteString = function () {\n if (this.options.useProto3Json) {\n return '';\n }\n else {\n return new Uint8Array(0);\n }\n };\n JsonProtoSerializer.prototype.unsafeCastProtoByteString = function (byteString) {\n // byteStrings can be either string or UInt8Array, but the typings say\n // it's always a string. Cast as string to avoid type check failing\n return byteString;\n };\n JsonProtoSerializer.prototype.fromRpcStatus = function (status) {\n var code = status.code === undefined\n ? Code.UNKNOWN\n : mapCodeFromRpcCode(status.code);\n return new FirestoreError(code, status.message || '');\n };\n /**\n * Returns a value for a Date that's appropriate to put into a proto.\n * DO NOT USE THIS FOR ANYTHING ELSE.\n * This method cheats. It's typed as returning \"string\" because that's what\n * our generated proto interfaces say dates must be. But it's easier and safer\n * to actually return a Timestamp proto.\n */\n JsonProtoSerializer.prototype.toTimestamp = function (timestamp) {\n return {\n seconds: timestamp.seconds,\n nanos: timestamp.nanos\n // tslint:disable-next-line:no-any\n };\n };\n JsonProtoSerializer.prototype.fromTimestamp = function (date) {\n // The json interface (for the browser) will return an iso timestamp string,\n // while the proto js library (for node) will return a\n // google.protobuf.Timestamp instance.\n if (typeof date === 'string') {\n // TODO(b/37282237): Use strings for Proto3 timestamps\n // assert(this.options.useProto3Json,\n // 'The timestamp string format requires Proto3.');\n return timestamp_Timestamp.fromISOString(date);\n }\n else {\n assert(!!date, 'Cannot deserialize null or undefined timestamp.');\n // TODO(b/37282237): Use strings for Proto3 timestamps\n // assert(!this.options.useProto3Json,\n // 'The timestamp instance format requires Proto JS.');\n var seconds = parseInt64(date.seconds || '0');\n var nanos = date.nanos || 0;\n return new timestamp_Timestamp(seconds, nanos);\n }\n };\n /**\n * Returns a value for bytes that's appropriate to put in a proto.\n * DO NOT USE THIS FOR ANYTHING ELSE.\n * This method cheats. It's typed as returning \"string\" because that's what\n * our generated proto interfaces say bytes must be. But it should return\n * an Uint8Array in Node.\n */\n JsonProtoSerializer.prototype.toBytes = function (bytes) {\n if (this.options.useProto3Json) {\n return bytes.toBase64();\n }\n else {\n // The typings say it's a string, but it needs to be a Uint8Array in Node.\n return this.unsafeCastProtoByteString(bytes.toUint8Array());\n }\n };\n /**\n * Parse the blob from the protos into the internal Blob class. Note that the\n * typings assume all blobs are strings, but they are actually Uint8Arrays\n * on Node.\n */\n JsonProtoSerializer.prototype.fromBlob = function (blob) {\n if (typeof blob === 'string') {\n assert(this.options.useProto3Json, 'Expected bytes to be passed in as Uint8Array, but got a string instead.');\n return blob_Blob.fromBase64String(blob);\n }\n else {\n assert(!this.options.useProto3Json, 'Expected bytes to be passed in as string, but got something else instead.');\n return blob_Blob.fromUint8Array(blob);\n }\n };\n JsonProtoSerializer.prototype.toVersion = function (version) {\n return this.toTimestamp(version.toTimestamp());\n };\n JsonProtoSerializer.prototype.fromVersion = function (version) {\n assert(!!version, \"Trying to deserialize version that isn't set\");\n return snapshot_version_SnapshotVersion.fromTimestamp(this.fromTimestamp(version));\n };\n JsonProtoSerializer.prototype.toResourceName = function (databaseId, path) {\n return this.fullyQualifiedPrefixPath(databaseId)\n .child('documents')\n .child(path)\n .canonicalString();\n };\n JsonProtoSerializer.prototype.fromResourceName = function (name) {\n var resource = path_ResourcePath.fromString(name);\n assert(this.isValidResourceName(resource), 'Tried to deserialize invalid key ' + resource.toString());\n return resource;\n };\n JsonProtoSerializer.prototype.toName = function (key) {\n return this.toResourceName(this.databaseId, key.path);\n };\n JsonProtoSerializer.prototype.fromName = function (name) {\n var resource = this.fromResourceName(name);\n assert(resource.get(1) === this.databaseId.projectId, 'Tried to deserialize key from different project: ' +\n resource.get(1) +\n ' vs ' +\n this.databaseId.projectId);\n assert((!resource.get(3) && !this.databaseId.database) ||\n resource.get(3) === this.databaseId.database, 'Tried to deserialize key from different database: ' +\n resource.get(3) +\n ' vs ' +\n this.databaseId.database);\n return new document_key_DocumentKey(this.extractLocalPathFromResourceName(resource));\n };\n JsonProtoSerializer.prototype.toQueryPath = function (path) {\n if (path.length === 0) {\n // If the path is empty, the backend requires we leave off the /documents\n // at the end.\n return this.encodedDatabaseId;\n }\n return this.toResourceName(this.databaseId, path);\n };\n JsonProtoSerializer.prototype.fromQueryPath = function (name) {\n var resourceName = this.fromResourceName(name);\n if (resourceName.length === 4) {\n return path_ResourcePath.EMPTY_PATH;\n }\n return this.extractLocalPathFromResourceName(resourceName);\n };\n Object.defineProperty(JsonProtoSerializer.prototype, \"encodedDatabaseId\", {\n get: function () {\n var path = new path_ResourcePath([\n 'projects',\n this.databaseId.projectId,\n 'databases',\n this.databaseId.database\n ]);\n return path.canonicalString();\n },\n enumerable: true,\n configurable: true\n });\n JsonProtoSerializer.prototype.fullyQualifiedPrefixPath = function (databaseId) {\n return new path_ResourcePath([\n 'projects',\n databaseId.projectId,\n 'databases',\n databaseId.database\n ]);\n };\n JsonProtoSerializer.prototype.extractLocalPathFromResourceName = function (resourceName) {\n assert(resourceName.length > 4 && resourceName.get(4) === 'documents', 'tried to deserialize invalid key ' + resourceName.toString());\n return resourceName.popFirst(5);\n };\n JsonProtoSerializer.prototype.isValidResourceName = function (path) {\n // Resource names have at least 4 components (project ID, database ID)\n return (path.length >= 4 &&\n path.get(0) === 'projects' &&\n path.get(2) === 'databases');\n };\n JsonProtoSerializer.prototype.toValue = function (val) {\n if (val instanceof NullValue) {\n return { nullValue: 'NULL_VALUE' };\n }\n else if (val instanceof field_value_BooleanValue) {\n return { booleanValue: val.value() };\n }\n else if (val instanceof IntegerValue) {\n return { integerValue: '' + val.value() };\n }\n else if (val instanceof DoubleValue) {\n var doubleValue = val.value();\n if (this.options.useProto3Json) {\n // Proto 3 let's us encode NaN and Infinity as string values as\n // expected by the backend. This is currently not checked by our unit\n // tests because they rely on protobuf.js.\n if (isNaN(doubleValue)) {\n return { doubleValue: 'NaN' };\n }\n else if (doubleValue === Infinity) {\n return { doubleValue: 'Infinity' };\n }\n else if (doubleValue === -Infinity) {\n return { doubleValue: '-Infinity' };\n }\n }\n return { doubleValue: val.value() };\n }\n else if (val instanceof field_value_StringValue) {\n return { stringValue: val.value() };\n }\n else if (val instanceof field_value_ObjectValue) {\n return { mapValue: this.toMapValue(val) };\n }\n else if (val instanceof field_value_ArrayValue) {\n return { arrayValue: this.toArrayValue(val) };\n }\n else if (val instanceof TimestampValue) {\n return {\n timestampValue: this.toTimestamp(val.internalValue)\n };\n }\n else if (val instanceof GeoPointValue) {\n return {\n geoPointValue: {\n latitude: val.value().latitude,\n longitude: val.value().longitude\n }\n };\n }\n else if (val instanceof BlobValue) {\n return {\n bytesValue: this.toBytes(val.value())\n };\n }\n else if (val instanceof field_value_RefValue) {\n return {\n referenceValue: this.toResourceName(val.databaseId, val.key.path)\n };\n }\n else {\n return fail('Unknown FieldValue ' + JSON.stringify(val));\n }\n };\n JsonProtoSerializer.prototype.fromValue = function (obj) {\n var _this = this;\n // tslint:disable-next-line:no-any\n var type = obj['value_type'];\n if (hasTag(obj, type, 'nullValue')) {\n return NullValue.INSTANCE;\n }\n else if (hasTag(obj, type, 'booleanValue')) {\n return field_value_BooleanValue.of(obj.booleanValue);\n }\n else if (hasTag(obj, type, 'integerValue')) {\n return new IntegerValue(parseInt64(obj.integerValue));\n }\n else if (hasTag(obj, type, 'doubleValue')) {\n if (this.options.useProto3Json) {\n // Proto 3 uses the string values 'NaN' and 'Infinity'.\n if (obj.doubleValue === 'NaN') {\n return DoubleValue.NAN;\n }\n else if (obj.doubleValue === 'Infinity') {\n return DoubleValue.POSITIVE_INFINITY;\n }\n else if (obj.doubleValue === '-Infinity') {\n return DoubleValue.NEGATIVE_INFINITY;\n }\n }\n return new DoubleValue(obj.doubleValue);\n }\n else if (hasTag(obj, type, 'stringValue')) {\n return new field_value_StringValue(obj.stringValue);\n }\n else if (hasTag(obj, type, 'mapValue')) {\n return this.fromFields(obj.mapValue.fields || {});\n }\n else if (hasTag(obj, type, 'arrayValue')) {\n // \"values\" is not present if the array is empty\n assertPresent(obj.arrayValue, 'arrayValue');\n var values = obj.arrayValue.values || [];\n return new field_value_ArrayValue(values.map(function (v) { return _this.fromValue(v); }));\n }\n else if (hasTag(obj, type, 'timestampValue')) {\n assertPresent(obj.timestampValue, 'timestampValue');\n return new TimestampValue(this.fromTimestamp(obj.timestampValue));\n }\n else if (hasTag(obj, type, 'geoPointValue')) {\n assertPresent(obj.geoPointValue, 'geoPointValue');\n var latitude = obj.geoPointValue.latitude || 0;\n var longitude = obj.geoPointValue.longitude || 0;\n return new GeoPointValue(new geo_point_GeoPoint(latitude, longitude));\n }\n else if (hasTag(obj, type, 'bytesValue')) {\n assertPresent(obj.bytesValue, 'bytesValue');\n var blob = this.fromBlob(obj.bytesValue);\n return new BlobValue(blob);\n }\n else if (hasTag(obj, type, 'referenceValue')) {\n assertPresent(obj.referenceValue, 'referenceValue');\n var resourceName = this.fromResourceName(obj.referenceValue);\n var dbId = new database_info_DatabaseId(resourceName.get(1), resourceName.get(3));\n var key = new document_key_DocumentKey(this.extractLocalPathFromResourceName(resourceName));\n return new field_value_RefValue(dbId, key);\n }\n else {\n return fail('Unknown Value proto ' + JSON.stringify(obj));\n }\n };\n /** Creates an api.Document from key and fields (but no create/update time) */\n JsonProtoSerializer.prototype.toMutationDocument = function (key, fields) {\n return {\n name: this.toName(key),\n fields: this.toFields(fields)\n };\n };\n JsonProtoSerializer.prototype.toDocument = function (document) {\n assert(!document.hasLocalMutations, \"Can't serialize documents with mutations.\");\n return {\n name: this.toName(document.key),\n fields: this.toFields(document.data),\n updateTime: this.toTimestamp(document.version.toTimestamp())\n };\n };\n JsonProtoSerializer.prototype.fromDocument = function (document) {\n return new document_Document(this.fromName(document.name), this.fromVersion(document.updateTime), this.fromFields(document.fields || {}), { hasLocalMutations: false });\n };\n JsonProtoSerializer.prototype.toFields = function (fields) {\n var _this = this;\n var result = {};\n fields.forEach(function (key, value) {\n result[key] = _this.toValue(value);\n });\n return result;\n };\n JsonProtoSerializer.prototype.fromFields = function (object) {\n var _this = this;\n // Proto map gets mapped to Object, so cast it.\n var map = object;\n var result = field_value_ObjectValue.EMPTY;\n forEach(map, function (key, value) {\n result = result.set(new path_FieldPath([key]), _this.fromValue(value));\n });\n return result;\n };\n JsonProtoSerializer.prototype.toMapValue = function (map) {\n return {\n fields: this.toFields(map)\n };\n };\n JsonProtoSerializer.prototype.toArrayValue = function (array) {\n var _this = this;\n var result = [];\n array.forEach(function (value) {\n result.push(_this.toValue(value));\n });\n return { values: result };\n };\n JsonProtoSerializer.prototype.fromFound = function (doc) {\n assert(!!doc.found, 'Tried to deserialize a found document from a missing document.');\n assertPresent(doc.found.name, 'doc.found.name');\n assertPresent(doc.found.updateTime, 'doc.found.updateTime');\n var key = this.fromName(doc.found.name);\n var version = this.fromVersion(doc.found.updateTime);\n var fields = this.fromFields(doc.found.fields || {});\n return new document_Document(key, version, fields, { hasLocalMutations: false });\n };\n JsonProtoSerializer.prototype.fromMissing = function (result) {\n assert(!!result.missing, 'Tried to deserialize a missing document from a found document.');\n assert(!!result.readTime, 'Tried to deserialize a missing document without a read time.');\n var key = this.fromName(result.missing);\n var version = this.fromVersion(result.readTime);\n return new document_NoDocument(key, version);\n };\n JsonProtoSerializer.prototype.fromMaybeDocument = function (result) {\n // tslint:disable-next-line:no-any\n var type = result['result_type'];\n if (hasTag(result, type, 'found')) {\n return this.fromFound(result);\n }\n else if (hasTag(result, type, 'missing')) {\n return this.fromMissing(result);\n }\n return fail('invalid batch get response: ' + JSON.stringify(result));\n };\n JsonProtoSerializer.prototype.toWatchTargetChangeState = function (state) {\n switch (state) {\n case WatchTargetChangeState.Added:\n return 'ADD';\n case WatchTargetChangeState.Current:\n return 'CURRENT';\n case WatchTargetChangeState.NoChange:\n return 'NO_CHANGE';\n case WatchTargetChangeState.Removed:\n return 'REMOVE';\n case WatchTargetChangeState.Reset:\n return 'RESET';\n default:\n return fail('Unknown WatchTargetChangeState: ' + state);\n }\n };\n JsonProtoSerializer.prototype.toTestWatchChange = function (watchChange) {\n if (watchChange instanceof ExistenceFilterChange) {\n return {\n filter: {\n count: watchChange.existenceFilter.count,\n targetId: watchChange.targetId\n }\n };\n }\n if (watchChange instanceof DocumentWatchChange) {\n if (watchChange.newDoc instanceof document_Document) {\n var doc = watchChange.newDoc;\n return {\n documentChange: {\n document: {\n name: this.toName(doc.key),\n fields: this.toFields(doc.data),\n updateTime: this.toVersion(doc.version)\n },\n targetIds: watchChange.updatedTargetIds,\n removedTargetIds: watchChange.removedTargetIds\n }\n };\n }\n else if (watchChange.newDoc instanceof document_NoDocument) {\n var doc = watchChange.newDoc;\n return {\n documentDelete: {\n document: this.toName(doc.key),\n readTime: this.toVersion(doc.version),\n removedTargetIds: watchChange.removedTargetIds\n }\n };\n }\n else if (watchChange.newDoc === null) {\n return {\n documentRemove: {\n document: this.toName(watchChange.key),\n removedTargetIds: watchChange.removedTargetIds\n }\n };\n }\n }\n if (watchChange instanceof watch_change_WatchTargetChange) {\n var cause = undefined;\n if (watchChange.cause) {\n cause = {\n code: mapRpcCodeFromCode(watchChange.cause.code),\n message: watchChange.cause.message\n };\n }\n return {\n targetChange: {\n targetChangeType: this.toWatchTargetChangeState(watchChange.state),\n targetIds: watchChange.targetIds,\n resumeToken: this.unsafeCastProtoByteString(watchChange.resumeToken),\n cause: cause\n }\n };\n }\n return fail('Unrecognized watch change: ' + JSON.stringify(watchChange));\n };\n JsonProtoSerializer.prototype.fromWatchChange = function (change) {\n // tslint:disable-next-line:no-any\n var type = change['change_type'];\n var watchChange;\n if (hasTag(change, type, 'targetChange')) {\n assertPresent(change.targetChange, 'targetChange');\n // proto3 default value is unset in JSON (undefined), so use 'NO_CHANGE'\n // if unset\n var state = this.fromWatchTargetChangeState(change.targetChange.targetChangeType || 'NO_CHANGE');\n var targetIds = change.targetChange.targetIds || [];\n var resumeToken = change.targetChange.resumeToken || this.emptyByteString();\n var causeProto = change.targetChange.cause;\n var cause = causeProto && this.fromRpcStatus(causeProto);\n watchChange = new watch_change_WatchTargetChange(state, targetIds, resumeToken, cause || null);\n }\n else if (hasTag(change, type, 'documentChange')) {\n assertPresent(change.documentChange, 'documentChange');\n assertPresent(change.documentChange.document, 'documentChange.name');\n assertPresent(change.documentChange.document.name, 'documentChange.document.name');\n assertPresent(change.documentChange.document.updateTime, 'documentChange.document.updateTime');\n var entityChange = change.documentChange;\n var key = this.fromName(entityChange.document.name);\n var version = this.fromVersion(entityChange.document.updateTime);\n var fields = this.fromFields(entityChange.document.fields || {});\n var doc = new document_Document(key, version, fields, {\n hasLocalMutations: false\n });\n var updatedTargetIds = entityChange.targetIds || [];\n var removedTargetIds = entityChange.removedTargetIds || [];\n watchChange = new DocumentWatchChange(updatedTargetIds, removedTargetIds, doc.key, doc);\n }\n else if (hasTag(change, type, 'documentDelete')) {\n assertPresent(change.documentDelete, 'documentDelete');\n assertPresent(change.documentDelete.document, 'documentDelete.document');\n var docDelete = change.documentDelete;\n var key = this.fromName(docDelete.document);\n var version = docDelete.readTime\n ? this.fromVersion(docDelete.readTime)\n : snapshot_version_SnapshotVersion.forDeletedDoc();\n var doc = new document_NoDocument(key, version);\n var removedTargetIds = docDelete.removedTargetIds || [];\n watchChange = new DocumentWatchChange([], removedTargetIds, doc.key, doc);\n }\n else if (hasTag(change, type, 'documentRemove')) {\n assertPresent(change.documentRemove, 'documentRemove');\n assertPresent(change.documentRemove.document, 'documentRemove');\n var docRemove = change.documentRemove;\n var key = this.fromName(docRemove.document);\n var removedTargetIds = docRemove.removedTargetIds || [];\n watchChange = new DocumentWatchChange([], removedTargetIds, key, null);\n }\n else if (hasTag(change, type, 'filter')) {\n // TODO(dimond): implement existence filter parsing with strategy.\n assertPresent(change.filter, 'filter');\n assertPresent(change.filter.targetId, 'filter.targetId');\n var filter = change.filter;\n var count = filter.count || 0;\n var existenceFilter = new ExistenceFilter(count);\n var targetId = filter.targetId;\n watchChange = new ExistenceFilterChange(targetId, existenceFilter);\n }\n else {\n return fail('Unknown change type ' + JSON.stringify(change));\n }\n return watchChange;\n };\n JsonProtoSerializer.prototype.fromWatchTargetChangeState = function (state) {\n if (state === 'NO_CHANGE') {\n return WatchTargetChangeState.NoChange;\n }\n else if (state === 'ADD') {\n return WatchTargetChangeState.Added;\n }\n else if (state === 'REMOVE') {\n return WatchTargetChangeState.Removed;\n }\n else if (state === 'CURRENT') {\n return WatchTargetChangeState.Current;\n }\n else if (state === 'RESET') {\n return WatchTargetChangeState.Reset;\n }\n else {\n return fail('Got unexpected TargetChange.state: ' + state);\n }\n };\n JsonProtoSerializer.prototype.versionFromListenResponse = function (change) {\n // We have only reached a consistent snapshot for the entire stream if there\n // is a read_time set and it applies to all targets (i.e. the list of\n // targets is empty). The backend is guaranteed to send such responses.\n // tslint:disable-next-line:no-any\n var type = change['response_type'];\n if (!hasTag(change, type, 'targetChange')) {\n return snapshot_version_SnapshotVersion.MIN;\n }\n var targetChange = change.targetChange;\n if (targetChange.targetIds && targetChange.targetIds.length) {\n return snapshot_version_SnapshotVersion.MIN;\n }\n if (!targetChange.readTime) {\n return snapshot_version_SnapshotVersion.MIN;\n }\n return this.fromVersion(targetChange.readTime);\n };\n JsonProtoSerializer.prototype.toMutation = function (mutation) {\n var _this = this;\n var result;\n if (mutation instanceof mutation_SetMutation) {\n result = {\n update: this.toMutationDocument(mutation.key, mutation.value)\n };\n }\n else if (mutation instanceof mutation_DeleteMutation) {\n result = { delete: this.toName(mutation.key) };\n }\n else if (mutation instanceof mutation_PatchMutation) {\n result = {\n update: this.toMutationDocument(mutation.key, mutation.data),\n updateMask: this.toDocumentMask(mutation.fieldMask)\n };\n }\n else if (mutation instanceof mutation_TransformMutation) {\n result = {\n transform: {\n document: this.toName(mutation.key),\n fieldTransforms: mutation.fieldTransforms.map(function (transform) {\n return _this.toFieldTransform(transform);\n })\n }\n };\n }\n else {\n return fail('Unknown mutation type ' + mutation.type);\n }\n if (!mutation.precondition.isNone) {\n result.currentDocument = this.toPrecondition(mutation.precondition);\n }\n return result;\n };\n JsonProtoSerializer.prototype.fromMutation = function (proto) {\n var _this = this;\n var precondition = proto.currentDocument\n ? this.fromPrecondition(proto.currentDocument)\n : mutation_Precondition.NONE;\n if (proto.update) {\n assertPresent(proto.update.name, 'name');\n var key = this.fromName(proto.update.name);\n var value = this.fromFields(proto.update.fields || {});\n if (proto.updateMask) {\n var fieldMask = this.fromDocumentMask(proto.updateMask);\n return new mutation_PatchMutation(key, value, fieldMask, precondition);\n }\n else {\n return new mutation_SetMutation(key, value, precondition);\n }\n }\n else if (proto.delete) {\n var key = this.fromName(proto.delete);\n return new mutation_DeleteMutation(key, precondition);\n }\n else if (proto.transform) {\n var key = this.fromName(proto.transform.document);\n var fieldTransforms = proto.transform.fieldTransforms.map(function (transform) {\n return _this.fromFieldTransform(transform);\n });\n assert(precondition.exists === true, 'Transforms only support precondition \"exists == true\"');\n return new mutation_TransformMutation(key, fieldTransforms);\n }\n else {\n return fail('unknown mutation proto: ' + JSON.stringify(proto));\n }\n };\n JsonProtoSerializer.prototype.toPrecondition = function (precondition) {\n assert(!precondition.isNone, \"Can't serialize an empty precondition\");\n if (precondition.updateTime !== undefined) {\n return {\n updateTime: this.toVersion(precondition.updateTime)\n };\n }\n else if (precondition.exists !== undefined) {\n return { exists: precondition.exists };\n }\n else {\n return fail('Unknown precondition');\n }\n };\n JsonProtoSerializer.prototype.fromPrecondition = function (precondition) {\n if (precondition.updateTime !== undefined) {\n return mutation_Precondition.updateTime(this.fromVersion(precondition.updateTime));\n }\n else if (precondition.exists !== undefined) {\n return mutation_Precondition.exists(precondition.exists);\n }\n else {\n return mutation_Precondition.NONE;\n }\n };\n JsonProtoSerializer.prototype.fromWriteResult = function (proto) {\n var _this = this;\n // NOTE: Deletes don't have an updateTime.\n var version = proto.updateTime\n ? this.fromVersion(proto.updateTime)\n : null;\n var transformResults = null;\n if (proto.transformResults) {\n transformResults = proto.transformResults.map(function (result) {\n return _this.fromValue(result);\n });\n }\n return new MutationResult(version, transformResults);\n };\n JsonProtoSerializer.prototype.fromWriteResults = function (protos) {\n var _this = this;\n return (protos || []).map(function (proto) { return _this.fromWriteResult(proto); });\n };\n JsonProtoSerializer.prototype.toFieldTransform = function (fieldTransform) {\n assert(fieldTransform.transform instanceof ServerTimestampTransform, 'Unknown transform: ' + fieldTransform.transform);\n return {\n fieldPath: fieldTransform.field.canonicalString(),\n setToServerValue: 'REQUEST_TIME'\n };\n };\n JsonProtoSerializer.prototype.fromFieldTransform = function (proto) {\n assert(proto.setToServerValue === 'REQUEST_TIME', 'Unknown transform proto: ' + JSON.stringify(proto));\n var fieldPath = path_FieldPath.fromServerFormat(proto.fieldPath);\n return new FieldTransform(fieldPath, ServerTimestampTransform.instance);\n };\n JsonProtoSerializer.prototype.toDocumentsTarget = function (query) {\n return { documents: [this.toQueryPath(query.path)] };\n };\n JsonProtoSerializer.prototype.fromDocumentsTarget = function (documentsTarget) {\n var count = documentsTarget.documents.length;\n assert(count === 1, 'DocumentsTarget contained other than 1 document: ' + count);\n var name = documentsTarget.documents[0];\n return query_Query.atPath(this.fromQueryPath(name));\n };\n JsonProtoSerializer.prototype.toQueryTarget = function (query) {\n // Dissect the path into parent, collectionId, and optional key filter.\n var result = { structuredQuery: {} };\n if (query.path.isEmpty()) {\n result.parent = this.toQueryPath(path_ResourcePath.EMPTY_PATH);\n }\n else {\n var path = query.path;\n assert(path.length % 2 !== 0, 'Document queries with filters are not supported.');\n result.parent = this.toQueryPath(path.popLast());\n result.structuredQuery.from = [{ collectionId: path.lastSegment() }];\n }\n var where = this.toFilter(query.filters);\n if (where) {\n result.structuredQuery.where = where;\n }\n var orderBy = this.toOrder(query.orderBy);\n if (orderBy) {\n result.structuredQuery.orderBy = orderBy;\n }\n var limit = this.toLimit(query.limit);\n if (limit !== undefined) {\n result.structuredQuery.limit = limit;\n }\n if (query.startAt) {\n result.structuredQuery.startAt = this.toCursor(query.startAt);\n }\n if (query.endAt) {\n result.structuredQuery.endAt = this.toCursor(query.endAt);\n }\n return result;\n };\n JsonProtoSerializer.prototype.fromQueryTarget = function (target) {\n var path = this.fromQueryPath(target.parent);\n var query = target.structuredQuery;\n var fromCount = query.from ? query.from.length : 0;\n if (fromCount > 0) {\n assert(fromCount === 1, 'StructuredQuery.from with more than one collection is not supported.');\n var from = query.from[0];\n path = path.child(from.collectionId);\n }\n var filterBy = [];\n if (query.where) {\n filterBy = this.fromFilter(query.where);\n }\n var orderBy = [];\n if (query.orderBy) {\n orderBy = this.fromOrder(query.orderBy);\n }\n var limit = null;\n if (query.limit) {\n limit = query.limit;\n }\n var startAt = null;\n if (query.startAt) {\n startAt = this.fromCursor(query.startAt);\n }\n var endAt = null;\n if (query.endAt) {\n endAt = this.fromCursor(query.endAt);\n }\n return new query_Query(path, orderBy, filterBy, limit, startAt, endAt);\n };\n JsonProtoSerializer.prototype.toListenRequestLabels = function (queryData) {\n var value = this.toLabel(queryData.purpose);\n if (value == null) {\n return null;\n }\n else {\n return {\n 'goog-listen-tags': value\n };\n }\n };\n JsonProtoSerializer.prototype.toLabel = function (purpose) {\n switch (purpose) {\n case QueryPurpose.Listen:\n return null;\n case QueryPurpose.ExistenceFilterMismatch:\n return 'existence-filter-mismatch';\n case QueryPurpose.LimboResolution:\n return 'limbo-document';\n default:\n return fail('Unrecognized query purpose: ' + purpose);\n }\n };\n JsonProtoSerializer.prototype.toTarget = function (queryData) {\n var result;\n var query = queryData.query;\n if (query.isDocumentQuery()) {\n result = { documents: this.toDocumentsTarget(query) };\n }\n else {\n result = { query: this.toQueryTarget(query) };\n }\n result.targetId = queryData.targetId;\n if (queryData.resumeToken.length > 0) {\n result.resumeToken = this.unsafeCastProtoByteString(queryData.resumeToken);\n }\n return result;\n };\n JsonProtoSerializer.prototype.toFilter = function (filters) {\n var _this = this;\n if (filters.length === 0)\n return;\n var protos = filters.map(function (filter) {\n return filter instanceof query_RelationFilter\n ? _this.toRelationFilter(filter)\n : _this.toUnaryFilter(filter);\n });\n if (protos.length === 1) {\n return protos[0];\n }\n return { compositeFilter: { op: 'AND', filters: protos } };\n };\n JsonProtoSerializer.prototype.fromFilter = function (filter) {\n var _this = this;\n if (!filter) {\n return [];\n }\n else if (filter.unaryFilter !== undefined) {\n return [this.fromUnaryFilter(filter)];\n }\n else if (filter.fieldFilter !== undefined) {\n return [this.fromRelationFilter(filter)];\n }\n else if (filter.compositeFilter !== undefined) {\n return filter.compositeFilter.filters\n .map(function (f) { return _this.fromFilter(f); })\n .reduce(function (accum, current) { return accum.concat(current); });\n }\n else {\n return fail('Unknown filter: ' + JSON.stringify(filter));\n }\n };\n JsonProtoSerializer.prototype.toOrder = function (orderBys) {\n var _this = this;\n if (orderBys.length === 0)\n return;\n return orderBys.map(function (order) { return _this.toPropertyOrder(order); });\n };\n JsonProtoSerializer.prototype.fromOrder = function (orderBys) {\n var _this = this;\n return orderBys.map(function (order) { return _this.fromPropertyOrder(order); });\n };\n JsonProtoSerializer.prototype.toLimit = function (limit) {\n if (!isNullOrUndefined(limit)) {\n return limit;\n }\n return;\n };\n JsonProtoSerializer.prototype.toCursor = function (cursor) {\n var _this = this;\n return {\n before: cursor.before,\n values: cursor.position.map(function (component) { return _this.toValue(component); })\n };\n };\n JsonProtoSerializer.prototype.fromCursor = function (cursor) {\n var _this = this;\n var before = !!cursor.before;\n var position = cursor.values.map(function (component) { return _this.fromValue(component); });\n return new query_Bound(position, before);\n };\n // visible for testing\n JsonProtoSerializer.prototype.toDirection = function (dir) {\n return DIRECTIONS[dir.name];\n };\n // visible for testing\n JsonProtoSerializer.prototype.fromDirection = function (dir) {\n switch (dir) {\n case 'ASCENDING':\n return Direction.ASCENDING;\n case 'DESCENDING':\n return Direction.DESCENDING;\n default:\n return undefined;\n }\n };\n // visible for testing\n JsonProtoSerializer.prototype.toOperatorName = function (op) {\n return OPERATORS[op.name];\n };\n JsonProtoSerializer.prototype.fromOperatorName = function (op) {\n switch (op) {\n case 'EQUAL':\n return query_RelationOp.EQUAL;\n case 'GREATER_THAN':\n return query_RelationOp.GREATER_THAN;\n case 'GREATER_THAN_OR_EQUAL':\n return query_RelationOp.GREATER_THAN_OR_EQUAL;\n case 'LESS_THAN':\n return query_RelationOp.LESS_THAN;\n case 'LESS_THAN_OR_EQUAL':\n return query_RelationOp.LESS_THAN_OR_EQUAL;\n case 'OPERATOR_UNSPECIFIED':\n return fail('Unspecified relation');\n default:\n return fail('Unknown relation');\n }\n };\n JsonProtoSerializer.prototype.toFieldPathReference = function (path) {\n return { fieldPath: path.canonicalString() };\n };\n JsonProtoSerializer.prototype.fromFieldPathReference = function (fieldReference) {\n return path_FieldPath.fromServerFormat(fieldReference.fieldPath);\n };\n // visible for testing\n JsonProtoSerializer.prototype.toPropertyOrder = function (orderBy) {\n return {\n field: this.toFieldPathReference(orderBy.field),\n direction: this.toDirection(orderBy.dir)\n };\n };\n JsonProtoSerializer.prototype.fromPropertyOrder = function (orderBy) {\n return new query_OrderBy(this.fromFieldPathReference(orderBy.field), this.fromDirection(orderBy.direction));\n };\n // visible for testing\n JsonProtoSerializer.prototype.toRelationFilter = function (filter) {\n if (filter instanceof query_RelationFilter) {\n return {\n fieldFilter: {\n field: this.toFieldPathReference(filter.field),\n op: this.toOperatorName(filter.op),\n value: this.toValue(filter.value)\n }\n };\n }\n else {\n return fail('Unrecognized filter: ' + JSON.stringify(filter));\n }\n };\n JsonProtoSerializer.prototype.fromRelationFilter = function (filter) {\n return new query_RelationFilter(this.fromFieldPathReference(filter.fieldFilter.field), this.fromOperatorName(filter.fieldFilter.op), this.fromValue(filter.fieldFilter.value));\n };\n // visible for testing\n JsonProtoSerializer.prototype.toUnaryFilter = function (filter) {\n if (filter instanceof NanFilter) {\n return {\n unaryFilter: {\n field: this.toFieldPathReference(filter.field),\n op: 'IS_NAN'\n }\n };\n }\n else if (filter instanceof NullFilter) {\n return {\n unaryFilter: {\n field: this.toFieldPathReference(filter.field),\n op: 'IS_NULL'\n }\n };\n }\n else {\n return fail('Unrecognized filter: ' + JSON.stringify(filter));\n }\n };\n JsonProtoSerializer.prototype.fromUnaryFilter = function (filter) {\n switch (filter.unaryFilter.op) {\n case 'IS_NAN':\n var nanField = this.fromFieldPathReference(filter.unaryFilter.field);\n return new NanFilter(nanField);\n case 'IS_NULL':\n var nullField = this.fromFieldPathReference(filter.unaryFilter.field);\n return new NullFilter(nullField);\n case 'OPERATOR_UNSPECIFIED':\n return fail('Unspecified filter');\n default:\n return fail('Unknown filter');\n }\n };\n JsonProtoSerializer.prototype.toDocumentMask = function (fieldMask) {\n return {\n fieldPaths: fieldMask.fields.map(function (field) { return field.canonicalString(); })\n };\n };\n JsonProtoSerializer.prototype.fromDocumentMask = function (proto) {\n var paths = proto.fieldPaths || [];\n var fields = paths.map(function (path) { return path_FieldPath.fromServerFormat(path); });\n return new mutation_FieldMask(fields);\n };\n return JsonProtoSerializer;\n}());\n\n/**\n * Checks for a specific oneof tag in a protocol buffer message.\n *\n * This intentionally accommodates two distinct cases:\n *\n * 1) Messages containing a type tag: these are the format produced by GRPC in\n * return values. These may contain default-value mappings for all tags in the\n * oneof but the type tag specifies which one was actually set.\n *\n * 2) Messages that don't contain a type tag: these are the format required by\n * GRPC as inputs. If we emitted objects with type tags, ProtoBuf.js would\n * choke claiming that the tags aren't fields in the Message.\n *\n * Allowing both formats here makes the serializer able to consume the outputs\n * it produces: for all messages it supports, fromX(toX(value)) == value.\n *\n * Note that case 2 suffers from ambiguity: if multiple tags are present\n * without a type tag then the callers are structured in such a way that the\n * first invocation will win. Since we only parse in this mode when parsing\n * the output of a serialize method this works, but it's not a general\n * solution.\n *\n * Unfortunately there is no general solution here because proto3 makes it\n * impossible to distinguish unset from explicitly set fields: both have the\n * default value for the type. Without the type tag but multiple value tags\n * it's possible to have default values for each tag in the oneof and not be\n * able to know which was actually in effect.\n */\nfunction hasTag(obj, type, tag) {\n return type === tag || (!type && tag in obj);\n}\n\n//# sourceMappingURL=serializer.js.map\n\n// EXTERNAL MODULE: ../webchannel-wrapper/dist/index.js\nvar dist = __webpack_require__(115);\nvar dist_default = /*#__PURE__*/__webpack_require__.n(dist);\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/stream_bridge.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Provides a simple helper class that implements the Stream interface to\n * bridge to other implementations that are streams but do not implement the\n * interface. The stream callbacks are invoked with the callOn... methods.\n */\nvar stream_bridge_StreamBridge = /** @class */ (function () {\n function StreamBridge(args) {\n this.wrappedOnOpen = null;\n this.wrappedOnClose = null;\n this.wrappedOnMessage = null;\n this.sendFn = args.sendFn;\n this.closeFn = args.closeFn;\n }\n StreamBridge.prototype.onOpen = function (callback) {\n assert(!this.wrappedOnOpen, 'Called onOpen on stream twice!');\n this.wrappedOnOpen = callback;\n };\n StreamBridge.prototype.onClose = function (callback) {\n assert(!this.wrappedOnClose, 'Called onClose on stream twice!');\n this.wrappedOnClose = callback;\n };\n StreamBridge.prototype.onMessage = function (callback) {\n assert(!this.wrappedOnMessage, 'Called onMessage on stream twice!');\n this.wrappedOnMessage = callback;\n };\n StreamBridge.prototype.close = function () {\n this.closeFn();\n };\n StreamBridge.prototype.send = function (msg) {\n this.sendFn(msg);\n };\n StreamBridge.prototype.callOnOpen = function () {\n assert(this.wrappedOnOpen !== null, 'Cannot call onOpen because no callback ' + 'was set');\n this.wrappedOnOpen();\n };\n StreamBridge.prototype.callOnClose = function (err) {\n assert(this.wrappedOnClose !== null, 'Cannot call onClose because no ' + 'callback was set');\n this.wrappedOnClose(err);\n };\n StreamBridge.prototype.callOnMessage = function (msg) {\n assert(this.wrappedOnMessage !== null, 'Cannot call onMessage because no ' + 'callback was set');\n this.wrappedOnMessage(msg);\n };\n return StreamBridge;\n}());\n\n\n//# sourceMappingURL=stream_bridge.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/platform_browser/webchannel_connection.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\nvar LOG_TAG = 'Connection';\nvar RPC_URL_VERSION = 'v1beta1';\n// TODO(b/38203344): The SDK_VERSION is set independently from Firebase because\n// we are doing out-of-band releases. Once we release as part of Firebase, we\n// should use the Firebase version instead.\nvar X_GOOG_API_CLIENT_VALUE = 'gl-js/ fire/' + SDK_VERSION;\nvar XHR_TIMEOUT_SECS = 15;\nvar webchannel_connection_WebChannelConnection = /** @class */ (function () {\n function WebChannelConnection(info) {\n this.databaseId = info.databaseId;\n this.pool = new dist[\"XhrIoPool\"]();\n var proto = info.ssl ? 'https' : 'http';\n this.baseUrl = proto + '://' + info.host;\n }\n /**\n * Modifies the headers for a request, adding any authorization token if\n * present and any additional headers for the request.\n */\n WebChannelConnection.prototype.modifyHeadersForRequest = function (headers, token) {\n if (token) {\n for (var header in token.authHeaders) {\n if (token.authHeaders.hasOwnProperty(header)) {\n headers[header] = token.authHeaders[header];\n }\n }\n }\n headers['X-Goog-Api-Client'] = X_GOOG_API_CLIENT_VALUE;\n // This header is used to improve routing and project isolation by the\n // backend.\n headers['google-cloud-resource-prefix'] =\n \"projects/\" + this.databaseId.projectId + \"/\" +\n (\"databases/\" + this.databaseId.database);\n };\n WebChannelConnection.prototype.invoke = function (rpcName, request, token) {\n var _this = this;\n var url = this.makeUrl(rpcName);\n return new Promise(function (resolve, reject) {\n _this.pool.getObject(function (xhr) {\n xhr.listenOnce(dist[\"EventType\"].COMPLETE, function () {\n try {\n switch (xhr.getLastErrorCode()) {\n case dist[\"ErrorCode\"].NO_ERROR:\n var json = xhr.getResponseJson();\n debug(LOG_TAG, 'XHR received:', JSON.stringify(json));\n resolve(json);\n break;\n case dist[\"ErrorCode\"].TIMEOUT:\n log_error('RPC \"' + rpcName + '\" timed out, retrying.');\n reject(new FirestoreError(Code.DEADLINE_EXCEEDED, 'Request time out'));\n break;\n case dist[\"ErrorCode\"].HTTP_ERROR:\n var status_1 = xhr.getStatus();\n log_error('RPC \"' + rpcName + '\" failed with status:', status_1, 'response text:', xhr.getResponseText());\n if (status_1 > 0) {\n reject(new FirestoreError(mapCodeFromHttpStatus(status_1), 'Server responded with status ' + xhr.getStatusText()));\n }\n else {\n // If we received an HTTP_ERROR but there's no status code,\n // it's most probably a connection issue, let's retry.\n log_error(LOG_TAG, 'RPC \"' + rpcName + '\" failed, retrying.');\n reject(new FirestoreError(Code.UNAVAILABLE, 'Connection failed.'));\n }\n break;\n default:\n fail('RPC \"' +\n rpcName +\n '\" failed with unanticipated ' +\n 'webchannel error ' +\n xhr.getLastErrorCode() +\n ': ' +\n xhr.getLastError() +\n ', giving up.');\n }\n }\n finally {\n debug(LOG_TAG, 'RPC \"' + rpcName + '\" completed.');\n _this.pool.releaseObject(xhr);\n }\n });\n var requestString = JSON.stringify(request);\n debug(LOG_TAG, 'XHR sending: ', url + ' ' + requestString);\n // Content-Type: text/plain will avoid preflight requests which might\n // mess with CORS and redirects by proxies. If we add custom headers\n // we will need to change this code to potentially use the\n // $httpOverwrite parameter supported by ESF to avoid\n // triggering preflight requests.\n var headers = { 'Content-Type': 'text/plain' };\n _this.modifyHeadersForRequest(headers, token);\n xhr.send(url, 'POST', requestString, headers, XHR_TIMEOUT_SECS);\n });\n });\n };\n WebChannelConnection.prototype.openStream = function (rpcName, token) {\n var rpcService = WebChannelConnection.RPC_STREAM_SERVICE_MAPPING[rpcName];\n var rpcUrlName = WebChannelConnection.RPC_STREAM_NAME_MAPPING[rpcName];\n if (!rpcService || !rpcUrlName) {\n fail('Unknown RPC name: ' + rpcName);\n }\n var urlParts = [\n this.baseUrl,\n '/',\n rpcService,\n '/',\n rpcUrlName,\n '/channel'\n ];\n var webchannelTransport = Object(dist[\"createWebChannelTransport\"])();\n var request = {\n // Background channel test avoids the initial two test calls and decreases\n // initial cold start time.\n // TODO(dimond): wenboz@ mentioned this might affect use with proxies and\n // we should monitor closely for any reports.\n backgroundChannelTest: true,\n // Required for backend stickiness, routing behavior is based on this\n // parameter.\n httpSessionIdParam: 'gsessionid',\n initMessageHeaders: {},\n sendRawJson: true,\n supportsCrossDomainXhr: true\n };\n this.modifyHeadersForRequest(request.initMessageHeaders, token);\n var url = urlParts.join('');\n debug(LOG_TAG, 'Creating WebChannel: ' + url + ' ' + request);\n // tslint:disable-next-line:no-any Because listen isn't defined on it.\n var channel = webchannelTransport.createWebChannel(url, request);\n // WebChannel supports sending the first message with the handshake - saving\n // a network round trip. However, it will have to call send in the same\n // JS event loop as open. In order to enforce this, we delay actually\n // opening the WebChannel until send is called. Whether we have called\n // open is tracked with this variable.\n var opened = false;\n // A flag to determine whether the stream was closed (by us or through an\n // error/close event) to avoid delivering multiple close events or sending\n // on a closed stream\n var closed = false;\n // tslint:disable-next-line:no-any\n var streamBridge = new stream_bridge_StreamBridge({\n sendFn: function (msg) {\n if (!closed) {\n if (!opened) {\n debug(LOG_TAG, 'Opening WebChannel transport.');\n channel.open();\n opened = true;\n }\n debug(LOG_TAG, 'WebChannel sending:', msg);\n channel.send(msg);\n }\n else {\n debug(LOG_TAG, 'Not sending because WebChannel is closed:', msg);\n }\n },\n closeFn: function () { return channel.close(); }\n });\n // Closure events are guarded and exceptions are swallowed, so catch any\n // exception and rethrow using a setTimeout so they become visible again.\n // Note that eventually this function could go away if we are confident\n // enough the code is exception free.\n var unguardedEventListen = function (type, fn) {\n // TODO(dimond): closure typing seems broken because WebChannel does\n // not implement goog.events.Listenable\n channel.listen(type, function (param) {\n try {\n fn(param);\n }\n catch (e) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n });\n };\n unguardedEventListen(dist[\"WebChannel\"].EventType.OPEN, function () {\n if (!closed) {\n debug(LOG_TAG, 'WebChannel transport opened.');\n }\n });\n unguardedEventListen(dist[\"WebChannel\"].EventType.CLOSE, function () {\n if (!closed) {\n closed = true;\n debug(LOG_TAG, 'WebChannel transport closed');\n streamBridge.callOnClose();\n }\n });\n unguardedEventListen(dist[\"WebChannel\"].EventType.ERROR, function (err) {\n if (!closed) {\n closed = true;\n debug(LOG_TAG, 'WebChannel transport errored:', err);\n streamBridge.callOnClose(new FirestoreError(Code.UNAVAILABLE, 'The operation could not be completed'));\n }\n });\n unguardedEventListen(dist[\"WebChannel\"].EventType.MESSAGE, function (msg) {\n if (!closed) {\n // WebChannel delivers message events as array. If batching\n // is not enabled (it's off by default) each message will be\n // delivered alone, resulting in a single element array.\n var msgData = msg.data[0];\n assert(!!msgData, 'Got a webchannel message without data.');\n // TODO(b/35143891): There is a bug in One Platform that caused errors\n // (and only errors) to be wrapped in an extra array. To be forward\n // compatible with the bug we need to check either condition. The latter\n // can be removed once the fix has been rolled out.\n var error = msgData.error || (msgData[0] && msgData[0].error);\n if (error) {\n debug(LOG_TAG, 'WebChannel received error:', error);\n // error.status will be a string like 'OK' or 'NOT_FOUND'.\n var status_2 = error.status;\n var code = mapCodeFromRpcStatus(status_2);\n var message = error.message;\n if (code === undefined) {\n code = Code.INTERNAL;\n message =\n 'Unknown error status: ' +\n status_2 +\n ' with message ' +\n error.message;\n }\n // Mark closed so no further events are propagated\n closed = true;\n streamBridge.callOnClose(new FirestoreError(code, message));\n channel.close();\n }\n else {\n debug(LOG_TAG, 'WebChannel received:', msgData);\n streamBridge.callOnMessage(msgData);\n }\n }\n });\n setTimeout(function () {\n // Technically we could/should wait for the WebChannel opened event,\n // but because we want to send the first message with the WebChannel\n // handshake we pretend the channel opened here (asynchronously), and\n // then delay the actual open until the first message is sent.\n streamBridge.callOnOpen();\n }, 0);\n return streamBridge;\n };\n // visible for testing\n WebChannelConnection.prototype.makeUrl = function (rpcName) {\n var url = [this.baseUrl, '/', RPC_URL_VERSION];\n url.push('/projects/');\n url.push(this.databaseId.projectId);\n url.push('/databases/');\n url.push(this.databaseId.database);\n url.push('/documents');\n url.push(':');\n url.push(rpcName);\n return url.join('');\n };\n /**\n * Mapping from RPC name to service providing the RPC.\n * For streaming RPCs only.\n */\n WebChannelConnection.RPC_STREAM_SERVICE_MAPPING = {\n Write: 'google.firestore.v1beta1.Firestore',\n Listen: 'google.firestore.v1beta1.Firestore'\n };\n /**\n * Mapping from RPC name to actual RPC name in URLs.\n * For streaming RPCs only.\n */\n WebChannelConnection.RPC_STREAM_NAME_MAPPING = {\n Write: 'Write',\n Listen: 'Listen'\n };\n return WebChannelConnection;\n}());\n\n\n//# sourceMappingURL=webchannel_connection.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/platform_browser/browser_platform.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar browser_platform_BrowserPlatform = /** @class */ (function () {\n function BrowserPlatform() {\n this.emptyByteString = '';\n this.base64Available = typeof atob !== 'undefined';\n }\n BrowserPlatform.prototype.loadConnection = function (databaseInfo) {\n return Promise.resolve(new webchannel_connection_WebChannelConnection(databaseInfo));\n };\n BrowserPlatform.prototype.newSerializer = function (databaseId) {\n return new serializer_JsonProtoSerializer(databaseId, { useProto3Json: true });\n };\n BrowserPlatform.prototype.atob = function (encoded) {\n return atob(encoded);\n };\n BrowserPlatform.prototype.btoa = function (raw) {\n return btoa(raw);\n };\n return BrowserPlatform;\n}());\n\n\n//# sourceMappingURL=browser_platform.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/platform_browser/browser_init.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * This code needs to run before Firestore is used. This can be achieved in\n * several ways:\n * 1) Through the JSCompiler compiling this code and then (automatically)\n * executing it before exporting the Firestore symbols.\n * 2) Through importing this module first in a Firestore main module\n */\nplatform_PlatformSupport.setPlatform(new browser_platform_BrowserPlatform());\n\n//# sourceMappingURL=browser_init.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/field_path.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n// tslint:disable:strip-private-property-underscore\n/**\n * A FieldPath refers to a field in a document. The path may consist of a single\n * field name (referring to a top-level field in the document), or a list of\n * field names (referring to a nested field in the document).\n */\nvar field_path_FieldPath = /** @class */ (function () {\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames A list of field names.\n */\n function FieldPath() {\n var fieldNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fieldNames[_i] = arguments[_i];\n }\n validateNamedArrayAtLeastNumberOfElements('FieldPath', fieldNames, 'fieldNames', 1);\n for (var i = 0; i < fieldNames.length; ++i) {\n validateArgType('FieldPath', 'string', i, fieldNames[i]);\n if (fieldNames[i].length === 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). \" +\n 'Field names must not be empty.');\n }\n }\n this._internalPath = new path_FieldPath(fieldNames);\n }\n FieldPath.documentId = function () {\n return FieldPath._DOCUMENT_ID;\n };\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n FieldPath._DOCUMENT_ID = new FieldPath(path_FieldPath.keyField().canonicalString());\n return FieldPath;\n}());\n\n/**\n * Matches any characters in a field path string that are reserved.\n */\nvar RESERVED = new RegExp('[~\\\\*/\\\\[\\\\]]');\n/**\n * Parses a field path string into a FieldPath, treating dots as separators.\n */\nfunction fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (field_path_FieldPath.bind.apply(field_path_FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}\n\n//# sourceMappingURL=field_path.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/types.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Describes the online state of the Firestore client */\nvar OnlineState;\n(function (OnlineState) {\n /**\n * The Firestore client is in an unknown online state. This means the client\n * is either not actively trying to establish a connection or it was\n * previously in an unknown state and is trying to establish a connection.\n */\n OnlineState[OnlineState[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The client is connected and the connections are healthy. This state is\n * reached after a successful connection and there has been at least one\n * succesful message received from the backends.\n */\n OnlineState[OnlineState[\"Healthy\"] = 1] = \"Healthy\";\n /**\n * The client has tried to establish a connection but has failed.\n * This state is reached after either a connection attempt failed or a\n * healthy stream was closed for unexpected reasons.\n */\n OnlineState[OnlineState[\"Failed\"] = 2] = \"Failed\";\n})(OnlineState = OnlineState || (OnlineState = {}));\n\n//# sourceMappingURL=types.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/view_snapshot.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar ChangeType;\n(function (ChangeType) {\n ChangeType[ChangeType[\"Added\"] = 0] = \"Added\";\n ChangeType[ChangeType[\"Removed\"] = 1] = \"Removed\";\n ChangeType[ChangeType[\"Modified\"] = 2] = \"Modified\";\n ChangeType[ChangeType[\"Metadata\"] = 3] = \"Metadata\";\n})(ChangeType = ChangeType || (ChangeType = {}));\nvar SyncState;\n(function (SyncState) {\n SyncState[SyncState[\"Local\"] = 0] = \"Local\";\n SyncState[SyncState[\"Synced\"] = 1] = \"Synced\";\n})(SyncState = SyncState || (SyncState = {}));\n/**\n * DocumentChangeSet keeps track of a set of changes to docs in a query, merging\n * duplicate events for the same doc.\n */\nvar view_snapshot_DocumentChangeSet = /** @class */ (function () {\n function DocumentChangeSet() {\n this.changeMap = new sorted_map_SortedMap(document_key_DocumentKey.comparator);\n }\n DocumentChangeSet.prototype.track = function (change) {\n var key = change.doc.key;\n var oldChange = this.changeMap.get(key);\n if (!oldChange) {\n this.changeMap = this.changeMap.insert(key, change);\n return;\n }\n // Merge the new change with the existing change.\n if (change.type !== ChangeType.Added &&\n oldChange.type === ChangeType.Metadata) {\n this.changeMap = this.changeMap.insert(key, change);\n }\n else if (change.type === ChangeType.Metadata &&\n oldChange.type !== ChangeType.Removed) {\n this.changeMap = this.changeMap.insert(key, {\n type: oldChange.type,\n doc: change.doc\n });\n }\n else if (change.type === ChangeType.Modified &&\n oldChange.type === ChangeType.Modified) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Modified,\n doc: change.doc\n });\n }\n else if (change.type === ChangeType.Modified &&\n oldChange.type === ChangeType.Added) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Added,\n doc: change.doc\n });\n }\n else if (change.type === ChangeType.Removed &&\n oldChange.type === ChangeType.Added) {\n this.changeMap = this.changeMap.remove(key);\n }\n else if (change.type === ChangeType.Removed &&\n oldChange.type === ChangeType.Modified) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Removed,\n doc: oldChange.doc\n });\n }\n else if (change.type === ChangeType.Added &&\n oldChange.type === ChangeType.Removed) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Modified,\n doc: change.doc\n });\n }\n else {\n // This includes these cases, which don't make sense:\n // Added->Added\n // Removed->Removed\n // Modified->Added\n // Removed->Modified\n // Metadata->Added\n // Removed->Metadata\n fail('unsupported combination of changes: ' +\n JSON.stringify(change) +\n ' after ' +\n JSON.stringify(oldChange));\n }\n };\n DocumentChangeSet.prototype.getChanges = function () {\n var changes = [];\n this.changeMap.inorderTraversal(function (key, change) {\n changes.push(change);\n });\n return changes;\n };\n return DocumentChangeSet;\n}());\n\n\n//# sourceMappingURL=view_snapshot.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/document_set.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n/**\n * DocumentSet is an immutable (copy-on-write) collection that holds documents\n * in order specified by the provided comparator. We always add a document key\n * comparator on top of what is provided to guarantee document equality based on\n * the key.\n */\nvar document_set_DocumentSet = /** @class */ (function () {\n /** The default ordering is by key if the comparator is omitted */\n function DocumentSet(comp) {\n // We are adding document key comparator to the end as it's the only\n // guaranteed unique property of a document.\n if (comp) {\n this.comparator = function (d1, d2) {\n return comp(d1, d2) || document_key_DocumentKey.comparator(d1.key, d2.key);\n };\n }\n else {\n this.comparator = function (d1, d2) {\n return document_key_DocumentKey.comparator(d1.key, d2.key);\n };\n }\n this.keyedMap = documentMap();\n this.sortedSet = new sorted_map_SortedMap(this.comparator);\n }\n /**\n * Returns an empty copy of the existing DocumentSet, using the same\n * comparator.\n */\n DocumentSet.emptySet = function (oldSet) {\n return new DocumentSet(oldSet.comparator);\n };\n DocumentSet.prototype.has = function (key) {\n return this.keyedMap.get(key) != null;\n };\n DocumentSet.prototype.get = function (key) {\n return this.keyedMap.get(key);\n };\n DocumentSet.prototype.first = function () {\n return this.sortedSet.minKey();\n };\n DocumentSet.prototype.last = function () {\n return this.sortedSet.maxKey();\n };\n DocumentSet.prototype.isEmpty = function () {\n return this.sortedSet.isEmpty();\n };\n /**\n * Returns previous document or null if it's a first doc.\n *\n * @param key A key that MUST be present in the DocumentSet.\n */\n DocumentSet.prototype.prevDoc = function (key) {\n assert(this.has(key), 'Trying to get a previous document to non-existing key: ' + key);\n var doc = this.keyedMap.get(key);\n return this.sortedSet.getPredecessorKey(doc);\n };\n /**\n * Returns the index of the provided key in the document set, or -1 if the\n * document key is not present in the set;\n */\n DocumentSet.prototype.indexOf = function (key) {\n var doc = this.keyedMap.get(key);\n return doc ? this.sortedSet.indexOf(doc) : -1;\n };\n Object.defineProperty(DocumentSet.prototype, \"size\", {\n get: function () {\n return this.sortedSet.size;\n },\n enumerable: true,\n configurable: true\n });\n /** Iterates documents in order defined by \"comparator\" */\n DocumentSet.prototype.forEach = function (cb) {\n this.sortedSet.inorderTraversal(function (k, v) {\n cb(k);\n return false;\n });\n };\n /** Inserts or updates a document with the same key */\n DocumentSet.prototype.add = function (doc) {\n // First remove the element if we have it.\n var set = this.delete(doc.key);\n return set.copy(set.keyedMap.insert(doc.key, doc), set.sortedSet.insert(doc, null));\n };\n /** Deletes a document with a given key */\n DocumentSet.prototype.delete = function (key) {\n var doc = this.get(key);\n if (!doc) {\n return this;\n }\n return this.copy(this.keyedMap.remove(key), this.sortedSet.remove(doc));\n };\n DocumentSet.prototype.equals = function (other) {\n if (!(other instanceof DocumentSet))\n return false;\n if (this.size !== other.size)\n return false;\n var thisIt = this.sortedSet.getIterator();\n var otherIt = other.sortedSet.getIterator();\n while (thisIt.hasNext()) {\n var thisDoc = thisIt.getNext().key;\n var otherDoc = otherIt.getNext().key;\n if (!thisDoc.equals(otherDoc))\n return false;\n }\n return true;\n };\n DocumentSet.prototype.toString = function () {\n var docStrings = [];\n this.forEach(function (doc) {\n docStrings.push(doc.toString());\n });\n if (docStrings.length === 0) {\n return 'DocumentSet ()';\n }\n else {\n return 'DocumentSet (\\n ' + docStrings.join(' \\n') + '\\n)';\n }\n };\n DocumentSet.prototype.copy = function (keyedMap, sortedSet) {\n var newSet = new DocumentSet();\n newSet.comparator = this.comparator;\n newSet.keyedMap = keyedMap;\n newSet.sortedSet = sortedSet;\n return newSet;\n };\n return DocumentSet;\n}());\n\n\n//# sourceMappingURL=document_set.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/obj_map.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A map implementation that uses objects as keys. Objects must implement the\n * Equatable interface and must be immutable. Entries in the map are stored\n * together with the key being produced from the mapKeyFn. This map\n * automatically handles collisions of keys.\n */\nvar obj_map_ObjectMap = /** @class */ (function () {\n function ObjectMap(mapKeyFn) {\n this.mapKeyFn = mapKeyFn;\n /**\n * The inner map for a key -> value pair. Due to the possibility of\n * collisions we keep a list of entries that we do a linear search through\n * to find an actual match. Note that collisions should be rare, so we still\n * expect near constant time lookups in practice.\n */\n this.inner = {};\n }\n /** Get a value for this key, or undefined if it does not exist. */\n ObjectMap.prototype.get = function (key) {\n var id = this.mapKeyFn(key);\n var matches = this.inner[id];\n if (matches === undefined) {\n return undefined;\n }\n for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {\n var _a = matches_1[_i], otherKey = _a[0], value = _a[1];\n if (otherKey.equals(key)) {\n return value;\n }\n }\n return undefined;\n };\n ObjectMap.prototype.has = function (key) {\n return this.get(key) !== undefined;\n };\n /** Put this key and value in the map. */\n ObjectMap.prototype.set = function (key, value) {\n var id = this.mapKeyFn(key);\n var matches = this.inner[id];\n if (matches === undefined) {\n this.inner[id] = [[key, value]];\n return;\n }\n for (var i = 0; i < matches.length; i++) {\n if (matches[i][0].equals(key)) {\n matches[i] = [key, value];\n return;\n }\n }\n matches.push([key, value]);\n };\n /**\n * Remove this key from the map. Returns a boolean if anything was deleted.\n */\n ObjectMap.prototype.delete = function (key) {\n var id = this.mapKeyFn(key);\n var matches = this.inner[id];\n if (matches === undefined) {\n return false;\n }\n for (var i = 0; i < matches.length; i++) {\n if (matches[i][0].equals(key)) {\n if (matches.length === 1) {\n delete this.inner[id];\n }\n else {\n matches.splice(i, 1);\n }\n return true;\n }\n }\n return false;\n };\n ObjectMap.prototype.forEach = function (fn) {\n forEach(this.inner, function (_, entries) {\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n fn(k, v);\n }\n });\n };\n ObjectMap.prototype.isEmpty = function () {\n return isEmpty(this.inner);\n };\n return ObjectMap;\n}());\n\n\n//# sourceMappingURL=obj_map.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/event_manager.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/**\n * Holds the listeners and the last received ViewSnapshot for a query being\n * tracked by EventManager.\n */\nvar QueryListenersInfo = /** @class */ (function () {\n function QueryListenersInfo() {\n this.listeners = [];\n }\n return QueryListenersInfo;\n}());\n/**\n * EventManager is responsible for mapping queries to query event emitters.\n * It handles \"fan-out\". -- Identical queries will re-use the same watch on the\n * backend.\n */\nvar event_manager_EventManager = /** @class */ (function () {\n function EventManager(syncEngine) {\n this.syncEngine = syncEngine;\n this.queries = new obj_map_ObjectMap(function (q) {\n return q.canonicalId();\n });\n this.onlineState = OnlineState.Unknown;\n this.syncEngine.subscribe(this.onChange.bind(this), this.onError.bind(this));\n }\n EventManager.prototype.listen = function (listener) {\n var query = listener.query;\n var firstListen = false;\n var queryInfo = this.queries.get(query);\n if (!queryInfo) {\n firstListen = true;\n queryInfo = new QueryListenersInfo();\n this.queries.set(query, queryInfo);\n }\n queryInfo.listeners.push(listener);\n listener.onOnlineStateChanged(this.onlineState);\n if (queryInfo.viewSnap)\n listener.onViewSnapshot(queryInfo.viewSnap);\n if (firstListen) {\n return this.syncEngine.listen(query).then(function (targetId) {\n queryInfo.targetId = targetId;\n return targetId;\n });\n }\n else {\n return Promise.resolve(queryInfo.targetId);\n }\n };\n EventManager.prototype.unlisten = function (listener) {\n var query = listener.query;\n var lastListen = false;\n var queryInfo = this.queries.get(query);\n if (queryInfo) {\n var i = queryInfo.listeners.indexOf(listener);\n if (i >= 0) {\n queryInfo.listeners.splice(i, 1);\n lastListen = queryInfo.listeners.length === 0;\n }\n }\n if (lastListen) {\n this.queries.delete(query);\n return this.syncEngine.unlisten(query);\n }\n else {\n return Promise.resolve();\n }\n };\n EventManager.prototype.onChange = function (viewSnaps) {\n for (var _i = 0, viewSnaps_1 = viewSnaps; _i < viewSnaps_1.length; _i++) {\n var viewSnap = viewSnaps_1[_i];\n var query = viewSnap.query;\n var queryInfo = this.queries.get(query);\n if (queryInfo) {\n for (var _a = 0, _b = queryInfo.listeners; _a < _b.length; _a++) {\n var listener = _b[_a];\n listener.onViewSnapshot(viewSnap);\n }\n queryInfo.viewSnap = viewSnap;\n }\n }\n };\n EventManager.prototype.onError = function (query, error) {\n var queryInfo = this.queries.get(query);\n if (queryInfo) {\n for (var _i = 0, _a = queryInfo.listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener.onError(error);\n }\n }\n // Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()\n // after an error.\n this.queries.delete(query);\n };\n EventManager.prototype.onOnlineStateChanged = function (onlineState) {\n this.onlineState = onlineState;\n this.queries.forEach(function (_, queryInfo) {\n for (var _i = 0, _a = queryInfo.listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener.onOnlineStateChanged(onlineState);\n }\n });\n };\n return EventManager;\n}());\n\n/**\n * QueryListener takes a series of internal view snapshots and determines\n * when to raise the event.\n *\n * It uses an Observer to dispatch events.\n */\nvar event_manager_QueryListener = /** @class */ (function () {\n function QueryListener(query, queryObserver, options) {\n this.query = query;\n this.queryObserver = queryObserver;\n /**\n * Initial snapshots (e.g. from cache) may not be propagated to the wrapped\n * observer. This flag is set to true once we've actually raised an event.\n */\n this.raisedInitialEvent = false;\n this.onlineState = OnlineState.Unknown;\n this.options = options || {};\n }\n QueryListener.prototype.onViewSnapshot = function (snap) {\n assert(snap.docChanges.length > 0 || snap.syncStateChanged, 'We got a new snapshot with no changes?');\n if (!this.options.includeDocumentMetadataChanges) {\n // Remove the metadata only changes.\n var docChanges = [];\n for (var _i = 0, _a = snap.docChanges; _i < _a.length; _i++) {\n var docChange = _a[_i];\n if (docChange.type !== ChangeType.Metadata) {\n docChanges.push(docChange);\n }\n }\n snap = {\n query: snap.query,\n docs: snap.docs,\n oldDocs: snap.oldDocs,\n docChanges: docChanges,\n fromCache: snap.fromCache,\n hasPendingWrites: snap.hasPendingWrites,\n syncStateChanged: snap.syncStateChanged\n };\n }\n if (!this.raisedInitialEvent) {\n if (this.shouldRaiseInitialEvent(snap, this.onlineState)) {\n this.raiseInitialEvent(snap);\n }\n }\n else if (this.shouldRaiseEvent(snap)) {\n this.queryObserver.next(snap);\n }\n this.snap = snap;\n };\n QueryListener.prototype.onError = function (error) {\n this.queryObserver.error(error);\n };\n QueryListener.prototype.onOnlineStateChanged = function (onlineState) {\n this.onlineState = onlineState;\n if (this.snap &&\n !this.raisedInitialEvent &&\n this.shouldRaiseInitialEvent(this.snap, onlineState)) {\n this.raiseInitialEvent(this.snap);\n }\n };\n QueryListener.prototype.shouldRaiseInitialEvent = function (snap, onlineState) {\n assert(!this.raisedInitialEvent, 'Determining whether to raise first event but already had first event');\n // Always raise the first event when we're synced\n if (!snap.fromCache) {\n return true;\n }\n // NOTE: We consider OnlineState.Unknown as online (it should become Failed\n // or Online if we wait long enough).\n var maybeOnline = onlineState !== OnlineState.Failed;\n // Don't raise the event if we're online, aren't synced yet (checked\n // above) and are waiting for a sync.\n if (this.options.waitForSyncWhenOnline && maybeOnline) {\n assert(snap.fromCache, 'Waiting for sync, but snapshot is not from cache');\n return false;\n }\n // Raise data from cache if we have any documents or we are offline\n return !snap.docs.isEmpty() || onlineState === OnlineState.Failed;\n };\n QueryListener.prototype.shouldRaiseEvent = function (snap) {\n // We don't need to handle includeDocumentMetadataChanges here because\n // the Metadata only changes have already been stripped out if needed.\n // At this point the only changes we will see are the ones we should\n // propagate.\n if (snap.docChanges.length > 0) {\n return true;\n }\n var hasPendingWritesChanged = this.snap && this.snap.hasPendingWrites !== snap.hasPendingWrites;\n if (snap.syncStateChanged || hasPendingWritesChanged) {\n return this.options.includeQueryMetadataChanges === true;\n }\n // Generally we should have hit one of the cases above, but it's possible\n // to get here if there were only metadata docChanges and they got\n // stripped out.\n return false;\n };\n QueryListener.prototype.raiseInitialEvent = function (snap) {\n assert(!this.raisedInitialEvent, 'Trying to raise initial events for second time');\n snap = {\n query: snap.query,\n docs: snap.docs,\n oldDocs: document_set_DocumentSet.emptySet(snap.docs),\n docChanges: QueryListener.getInitialViewChanges(snap),\n fromCache: snap.fromCache,\n hasPendingWrites: snap.hasPendingWrites,\n syncStateChanged: true\n };\n this.raisedInitialEvent = true;\n this.queryObserver.next(snap);\n };\n /** Returns changes as if all documents in the snap were added. */\n QueryListener.getInitialViewChanges = function (snap) {\n var result = [];\n snap.docs.forEach(function (doc) {\n result.push({ type: ChangeType.Added, doc: doc });\n });\n return result;\n };\n return QueryListener;\n}());\n\n\n//# sourceMappingURL=event_manager.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/persistence_promise.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * PersistencePromise<> is essentially a re-implementation of Promise<> except\n * it has a .next() method instead of .then() and .next() and .catch() callbacks\n * are executed synchronously when a PersistencePromise resolves rather than\n * asynchronously (Promise<> implementations use setImmediate() or similar).\n *\n * This is necessary to interoperate with IndexedDB which will automatically\n * commit transactions if control is returned to the event loop without\n * synchronously initiating another operation on the transaction.\n *\n * NOTE: .then() and .catch() only allow a single consumer, unlike normal\n * Promises.\n */\nvar persistence_promise_PersistencePromise = /** @class */ (function () {\n function PersistencePromise(callback) {\n var _this = this;\n // NOTE: next/catchCallback will always point to our own wrapper functions,\n // not the user's raw next() or catch() callbacks.\n this.nextCallback = null;\n this.catchCallback = null;\n // When the operation resolves, we'll set result or error and mark isDone.\n this.result = undefined;\n this.error = null;\n this.isDone = false;\n // Set to true when .then() or .catch() are called and prevents additional\n // chaining.\n this.callbackAttached = false;\n callback(function (value) {\n _this.isDone = true;\n _this.result = value;\n if (_this.nextCallback) {\n // value should be defined unless T is Void, but we can't express\n // that in the type system.\n _this.nextCallback(value);\n }\n }, function (error) {\n _this.isDone = true;\n _this.error = error;\n if (_this.catchCallback) {\n _this.catchCallback(error);\n }\n });\n }\n PersistencePromise.prototype.catch = function (fn) {\n return this.next(undefined, fn);\n };\n PersistencePromise.prototype.next = function (nextFn, catchFn) {\n var _this = this;\n if (this.callbackAttached) {\n fail('Called next() or catch() twice for PersistencePromise');\n }\n this.callbackAttached = true;\n if (this.isDone) {\n if (!this.error) {\n return this.wrapSuccess(nextFn, this.result);\n }\n else {\n return this.wrapFailure(catchFn, this.error);\n }\n }\n else {\n return new PersistencePromise(function (resolve, reject) {\n _this.nextCallback = function (value) {\n _this.wrapSuccess(nextFn, value).next(resolve, reject);\n };\n _this.catchCallback = function (error) {\n _this.wrapFailure(catchFn, error).next(resolve, reject);\n };\n });\n }\n };\n PersistencePromise.prototype.toPromise = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.next(resolve, reject);\n });\n };\n PersistencePromise.prototype.wrapUserFunction = function (fn) {\n try {\n var result = fn();\n if (result instanceof PersistencePromise) {\n return result;\n }\n else {\n return PersistencePromise.resolve(result);\n }\n }\n catch (e) {\n return PersistencePromise.reject(e);\n }\n };\n PersistencePromise.prototype.wrapSuccess = function (nextFn, value) {\n if (nextFn) {\n return this.wrapUserFunction(function () { return nextFn(value); });\n }\n else {\n // If there's no nextFn, then R must be the same as T but we\n // can't express that in the type system.\n return PersistencePromise.resolve(value);\n }\n };\n PersistencePromise.prototype.wrapFailure = function (catchFn, error) {\n if (catchFn) {\n return this.wrapUserFunction(function () { return catchFn(error); });\n }\n else {\n return PersistencePromise.reject(error);\n }\n };\n PersistencePromise.resolve = function (result) {\n return new PersistencePromise(function (resolve, reject) {\n resolve(result);\n });\n };\n PersistencePromise.reject = function (error) {\n return new PersistencePromise(function (resolve, reject) {\n reject(error);\n });\n };\n PersistencePromise.waitFor = function (all) {\n return all.reduce(function (promise, nextPromise, idx) {\n return promise.next(function () {\n return nextPromise;\n });\n }, PersistencePromise.resolve());\n };\n PersistencePromise.map = function (all) {\n var results = [];\n var first = true;\n // initial is ignored, so we can cheat on the type.\n var initial = PersistencePromise.resolve(null);\n return all\n .reduce(function (promise, nextPromise) {\n return promise.next(function (result) {\n if (!first) {\n results.push(result);\n }\n first = false;\n return nextPromise;\n });\n }, initial)\n .next(function (result) {\n results.push(result);\n return results;\n });\n };\n return PersistencePromise;\n}());\n\n\n//# sourceMappingURL=persistence_promise.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/eager_garbage_collector.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * A garbage collector implementation that eagerly collects documents as soon as\n * they're no longer referenced in any of its registered GarbageSources.\n *\n * This implementation keeps track of a set of keys that are potentially garbage\n * without keeping an exact reference count. During collectGarbage, the\n * collector verifies that all potential garbage keys actually have no\n * references by consulting its list of garbage sources.\n */\nvar eager_garbage_collector_EagerGarbageCollector = /** @class */ (function () {\n function EagerGarbageCollector() {\n this.isEager = true;\n /**\n * The garbage collectible sources to double-check during garbage collection.\n */\n this.sources = [];\n /**\n * A set of potentially garbage keys.\n * PORTING NOTE: This would be a mutable set if Javascript had one.\n */\n this.potentialGarbage = documentKeySet();\n }\n EagerGarbageCollector.prototype.addGarbageSource = function (garbageSource) {\n this.sources.push(garbageSource);\n garbageSource.setGarbageCollector(this);\n };\n EagerGarbageCollector.prototype.removeGarbageSource = function (garbageSource) {\n this.sources.splice(this.sources.indexOf(garbageSource), 1);\n garbageSource.setGarbageCollector(null);\n };\n EagerGarbageCollector.prototype.addPotentialGarbageKey = function (key) {\n this.potentialGarbage = this.potentialGarbage.add(key);\n };\n EagerGarbageCollector.prototype.collectGarbage = function (txn) {\n var _this = this;\n var promises = [];\n var garbageKeys = documentKeySet();\n this.potentialGarbage.forEach(function (key) {\n var hasRefsPromise = _this.documentHasAnyReferences(txn, key);\n promises.push(hasRefsPromise.next(function (hasRefs) {\n // If there are no references, get the key.\n if (!hasRefs) {\n garbageKeys = garbageKeys.add(key);\n }\n return persistence_promise_PersistencePromise.resolve();\n }));\n });\n // Clear locally retained potential keys and returned confirmed garbage.\n this.potentialGarbage = documentKeySet();\n return persistence_promise_PersistencePromise.waitFor(promises).next(function () { return garbageKeys; });\n };\n EagerGarbageCollector.prototype.documentHasAnyReferences = function (txn, key) {\n var initial = persistence_promise_PersistencePromise.resolve(false);\n return this.sources\n .map(function (source) { return function () { return source.containsKey(txn, key); }; })\n .reduce(function (promise, nextPromise) {\n return promise.next(function (result) {\n if (result) {\n return persistence_promise_PersistencePromise.resolve(true);\n }\n else {\n return nextPromise();\n }\n });\n }, initial);\n };\n return EagerGarbageCollector;\n}());\n\n\n//# sourceMappingURL=eager_garbage_collector.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/local_view_changes.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * A set of changes to what documents are currently in view and out of view for\n * a given query. These changes are sent to the LocalStore by the View (via\n * the SyncEngine) and are used to pin / unpin documents as appropriate.\n */\nvar local_view_changes_LocalViewChanges = /** @class */ (function () {\n function LocalViewChanges(query, addedKeys, removedKeys) {\n this.query = query;\n this.addedKeys = addedKeys;\n this.removedKeys = removedKeys;\n }\n LocalViewChanges.fromSnapshot = function (viewSnapshot) {\n var addedKeys = documentKeySet();\n var removedKeys = documentKeySet();\n for (var _i = 0, _a = viewSnapshot.docChanges; _i < _a.length; _i++) {\n var docChange = _a[_i];\n switch (docChange.type) {\n case ChangeType.Added:\n addedKeys = addedKeys.add(docChange.doc.key);\n break;\n case ChangeType.Removed:\n removedKeys = removedKeys.add(docChange.doc.key);\n break;\n default:\n }\n }\n return new LocalViewChanges(viewSnapshot.query, addedKeys, removedKeys);\n };\n return LocalViewChanges;\n}());\n\n\n//# sourceMappingURL=local_view_changes.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/reference_set.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/**\n * A collection of references to a document from some kind of numbered entity\n * (either a target ID or batch ID). As references are added to or removed from\n * the set corresponding events are emitted to a registered garbage collector.\n *\n * Each reference is represented by a DocumentReference object. Each of them\n * contains enough information to uniquely identify the reference. They are all\n * stored primarily in a set sorted by key. A document is considered garbage if\n * there's no references in that set (this can be efficiently checked thanks to\n * sorting by key).\n *\n * ReferenceSet also keeps a secondary set that contains references sorted by\n * IDs. This one is used to efficiently implement removal of all references by\n * some target ID.\n */\nvar reference_set_ReferenceSet = /** @class */ (function () {\n function ReferenceSet() {\n // A set of outstanding references to a document sorted by key.\n this.refsByKey = new sorted_set_SortedSet(reference_set_DocReference.compareByKey);\n // A set of outstanding references to a document sorted by target id.\n this.refsByTarget = new sorted_set_SortedSet(reference_set_DocReference.compareByTargetId);\n /** Keeps track of keys that have references */\n this.garbageCollector = null;\n }\n /** Returns true if the reference set contains no references. */\n ReferenceSet.prototype.isEmpty = function () {\n return this.refsByKey.isEmpty();\n };\n /** Adds a reference to the given document key for the given ID. */\n ReferenceSet.prototype.addReference = function (key, id) {\n var ref = new reference_set_DocReference(key, id);\n this.refsByKey = this.refsByKey.add(ref);\n this.refsByTarget = this.refsByTarget.add(ref);\n };\n /** Add references to the given document keys for the given ID. */\n ReferenceSet.prototype.addReferences = function (keys, id) {\n var _this = this;\n keys.forEach(function (key) { return _this.addReference(key, id); });\n };\n /**\n * Removes a reference to the given document key for the given\n * ID.\n */\n ReferenceSet.prototype.removeReference = function (key, id) {\n this.removeRef(new reference_set_DocReference(key, id));\n };\n ReferenceSet.prototype.removeReferences = function (keys, id) {\n var _this = this;\n keys.forEach(function (key) { return _this.removeReference(key, id); });\n };\n /**\n * Clears all references with a given ID. Calls removeRef() for each key\n * removed.\n */\n ReferenceSet.prototype.removeReferencesForId = function (id) {\n var _this = this;\n var emptyKey = document_key_DocumentKey.EMPTY;\n var startRef = new reference_set_DocReference(emptyKey, id);\n var endRef = new reference_set_DocReference(emptyKey, id + 1);\n this.refsByTarget.forEachInRange([startRef, endRef], function (ref) {\n _this.removeRef(ref);\n });\n };\n ReferenceSet.prototype.removeAllReferences = function () {\n var _this = this;\n this.refsByKey.forEach(function (ref) { return _this.removeRef(ref); });\n };\n ReferenceSet.prototype.removeRef = function (ref) {\n this.refsByKey = this.refsByKey.delete(ref);\n this.refsByTarget = this.refsByTarget.delete(ref);\n if (this.garbageCollector !== null) {\n this.garbageCollector.addPotentialGarbageKey(ref.key);\n }\n };\n ReferenceSet.prototype.referencesForId = function (id) {\n var emptyKey = document_key_DocumentKey.EMPTY;\n var startRef = new reference_set_DocReference(emptyKey, id);\n var endRef = new reference_set_DocReference(emptyKey, id + 1);\n var keys = documentKeySet();\n this.refsByTarget.forEachInRange([startRef, endRef], function (ref) {\n keys = keys.add(ref.key);\n });\n return keys;\n };\n ReferenceSet.prototype.setGarbageCollector = function (garbageCollector) {\n this.garbageCollector = garbageCollector;\n };\n ReferenceSet.prototype.containsKey = function (txn, key) {\n var ref = new reference_set_DocReference(key, 0);\n var firstRef = this.refsByKey.firstAfterOrEqual(ref);\n return persistence_promise_PersistencePromise.resolve(firstRef !== null && key.equals(firstRef.key));\n };\n return ReferenceSet;\n}());\n\nvar reference_set_DocReference = /** @class */ (function () {\n function DocReference(key, targetOrBatchId) {\n this.key = key;\n this.targetOrBatchId = targetOrBatchId;\n }\n /** Compare by key then by ID */\n DocReference.compareByKey = function (left, right) {\n return (document_key_DocumentKey.comparator(left.key, right.key) ||\n primitiveComparator(left.targetOrBatchId, right.targetOrBatchId));\n };\n /** Compare by ID then by key */\n DocReference.compareByTargetId = function (left, right) {\n return (primitiveComparator(left.targetOrBatchId, right.targetOrBatchId) ||\n document_key_DocumentKey.comparator(left.key, right.key));\n };\n return DocReference;\n}());\n\n\n//# sourceMappingURL=reference_set.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/target_id_generator.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar RESERVED_BITS = 1;\nvar GeneratorIds;\n(function (GeneratorIds) {\n GeneratorIds[GeneratorIds[\"LocalStore\"] = 0] = \"LocalStore\";\n GeneratorIds[GeneratorIds[\"SyncEngine\"] = 1] = \"SyncEngine\";\n})(GeneratorIds || (GeneratorIds = {}));\n/**\n * TargetIdGenerator generates monotonically increasing integer IDs. There are\n * separate generators for different scopes. While these generators will operate\n * independently of each other, they are scoped, such that no two generators\n * will ever produce the same ID. This is useful, because sometimes the backend\n * may group IDs from separate parts of the client into the same ID space.\n */\nvar TargetIdGenerator = /** @class */ (function () {\n function TargetIdGenerator(generatorId, initAfter) {\n if (initAfter === void 0) { initAfter = 0; }\n this.generatorId = generatorId;\n // Replace the generator part of initAfter with this generator's ID.\n var afterWithoutGenerator = (initAfter >> RESERVED_BITS) << RESERVED_BITS;\n var afterGenerator = initAfter - afterWithoutGenerator;\n if (afterGenerator >= generatorId) {\n // For example, if:\n // this.generatorId = 0b0000\n // after = 0b1011\n // afterGenerator = 0b0001\n // Then:\n // previous = 0b1010\n // next = 0b1100\n this.previousId = afterWithoutGenerator | this.generatorId;\n }\n else {\n // For example, if:\n // this.generatorId = 0b0001\n // after = 0b1010\n // afterGenerator = 0b0000\n // Then:\n // previous = 0b1001\n // next = 0b1011\n this.previousId =\n (afterWithoutGenerator | this.generatorId) - (1 << RESERVED_BITS);\n }\n }\n TargetIdGenerator.prototype.next = function () {\n this.previousId += 1 << RESERVED_BITS;\n return this.previousId;\n };\n TargetIdGenerator.forLocalStore = function (initAfter) {\n if (initAfter === void 0) { initAfter = 0; }\n return new TargetIdGenerator(GeneratorIds.LocalStore, initAfter);\n };\n TargetIdGenerator.forSyncEngine = function () {\n return new TargetIdGenerator(GeneratorIds.SyncEngine);\n };\n return TargetIdGenerator;\n}());\n\n\n//# sourceMappingURL=target_id_generator.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/view.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\nvar AddedLimboDocument = /** @class */ (function () {\n function AddedLimboDocument(key) {\n this.key = key;\n }\n return AddedLimboDocument;\n}());\n\nvar RemovedLimboDocument = /** @class */ (function () {\n function RemovedLimboDocument(key) {\n this.key = key;\n }\n return RemovedLimboDocument;\n}());\n\n/**\n * View is responsible for computing the final merged truth of what docs are in\n * a query. It gets notified of local and remote changes to docs, and applies\n * the query filters and limits to determine the most correct possible results.\n */\nvar view_View = /** @class */ (function () {\n function View(query, \n /** Documents included in the remote target */\n syncedDocuments) {\n this.query = query;\n this.syncedDocuments = syncedDocuments;\n this.syncState = null;\n /**\n * A flag whether the view is current with the backend. A view is considered\n * current after it has seen the current flag from the backend and did not\n * lose consistency within the watch stream (e.g. because of an existence\n * filter mismatch).\n */\n this.current = false;\n /** Documents in the view but not in the remote target */\n this.limboDocuments = documentKeySet();\n /** Document Keys that have local changes */\n this.mutatedKeys = documentKeySet();\n this.documentSet = new document_set_DocumentSet(query.docComparator.bind(query));\n }\n /**\n * Iterates over a set of doc changes, applies the query limit, and computes\n * what the new results should be, what the changes were, and whether we may\n * need to go back to the local cache for more results. Does not make any\n * changes to the view.\n * @param docChanges The doc changes to apply to this view.\n * @param previousChanges If this is being called with a refill, then start\n * with this set of docs and changes instead of the current view.\n * @return a new set of docs, changes, and refill flag.\n */\n View.prototype.computeDocChanges = function (docChanges, previousChanges) {\n var _this = this;\n var changeSet = previousChanges\n ? previousChanges.changeSet\n : new view_snapshot_DocumentChangeSet();\n var oldDocumentSet = previousChanges\n ? previousChanges.documentSet\n : this.documentSet;\n var newMutatedKeys = previousChanges\n ? previousChanges.mutatedKeys\n : this.mutatedKeys;\n var newDocumentSet = oldDocumentSet;\n var needsRefill = false;\n // Track the last doc in a (full) limit. This is necessary, because some\n // update (a delete, or an update moving a doc past the old limit) might\n // mean there is some other document in the local cache that either should\n // come (1) between the old last limit doc and the new last document, in the\n // case of updates, or (2) after the new last document, in the case of\n // deletes. So we keep this doc at the old limit to compare the updates to.\n //\n // Note that this should never get used in a refill (when previousChanges is\n // set), because there will only be adds -- no deletes or updates.\n var lastDocInLimit = this.query.hasLimit() && oldDocumentSet.size === this.query.limit\n ? oldDocumentSet.last()\n : null;\n docChanges.inorderTraversal(function (key, newMaybeDoc) {\n var oldDoc = oldDocumentSet.get(key);\n var newDoc = newMaybeDoc instanceof document_Document ? newMaybeDoc : null;\n if (newDoc) {\n assert(key.equals(newDoc.key), 'Mismatching keys found in document changes: ' +\n key +\n ' != ' +\n newDoc.key);\n newDoc = _this.query.matches(newDoc) ? newDoc : null;\n }\n if (newDoc) {\n newDocumentSet = newDocumentSet.add(newDoc);\n if (newDoc.hasLocalMutations) {\n newMutatedKeys = newMutatedKeys.add(key);\n }\n else {\n newMutatedKeys = newMutatedKeys.delete(key);\n }\n }\n else {\n newDocumentSet = newDocumentSet.delete(key);\n newMutatedKeys = newMutatedKeys.delete(key);\n }\n // Calculate change\n if (oldDoc && newDoc) {\n var docsEqual = oldDoc.data.equals(newDoc.data);\n if (!docsEqual ||\n oldDoc.hasLocalMutations !== newDoc.hasLocalMutations) {\n // only report a change if document actually changed\n if (docsEqual) {\n changeSet.track({ type: ChangeType.Metadata, doc: newDoc });\n }\n else {\n changeSet.track({ type: ChangeType.Modified, doc: newDoc });\n }\n if (lastDocInLimit &&\n _this.query.docComparator(newDoc, lastDocInLimit) > 0) {\n // This doc moved from inside the limit to after the limit.\n // That means there may be some doc in the local cache that's\n // actually less than this one.\n needsRefill = true;\n }\n }\n }\n else if (!oldDoc && newDoc) {\n changeSet.track({ type: ChangeType.Added, doc: newDoc });\n }\n else if (oldDoc && !newDoc) {\n changeSet.track({ type: ChangeType.Removed, doc: oldDoc });\n if (lastDocInLimit) {\n // A doc was removed from a full limit query. We'll need to\n // requery from the local cache to see if we know about some other\n // doc that should be in the results.\n needsRefill = true;\n }\n }\n });\n if (this.query.hasLimit()) {\n // TODO(klimt): Make DocumentSet size be constant time.\n while (newDocumentSet.size > this.query.limit) {\n var oldDoc = newDocumentSet.last();\n newDocumentSet = newDocumentSet.delete(oldDoc.key);\n changeSet.track({ type: ChangeType.Removed, doc: oldDoc });\n }\n }\n assert(!needsRefill || !previousChanges, 'View was refilled using docs that themselves needed refilling.');\n return {\n documentSet: newDocumentSet,\n changeSet: changeSet,\n needsRefill: needsRefill,\n mutatedKeys: newMutatedKeys\n };\n };\n /**\n * Updates the view with the given ViewDocumentChanges and updates limbo docs\n * and sync state from the given (optional) target change.\n * @param docChanges The set of changes to make to the view's docs.\n * @param targetChange A target change to apply for computing limbo docs and\n * sync state.\n * @return A new ViewChange with the given docs, changes, and sync state.\n */\n View.prototype.applyChanges = function (docChanges, targetChange) {\n var _this = this;\n assert(!docChanges.needsRefill, 'Cannot apply changes that need a refill');\n var oldDocs = this.documentSet;\n this.documentSet = docChanges.documentSet;\n this.mutatedKeys = docChanges.mutatedKeys;\n // Sort changes based on type and query comparator\n var changes = docChanges.changeSet.getChanges();\n changes.sort(function (c1, c2) {\n return (compareChangeType(c1.type, c2.type) ||\n _this.query.docComparator(c1.doc, c2.doc));\n });\n var limboChanges = this.applyTargetChange(targetChange);\n var synced = this.limboDocuments.size === 0 && this.current;\n var newSyncState = synced ? SyncState.Synced : SyncState.Local;\n var syncStateChanged = newSyncState !== this.syncState;\n this.syncState = newSyncState;\n if (changes.length === 0 && !syncStateChanged) {\n // no changes\n return { limboChanges: limboChanges };\n }\n else {\n return {\n snapshot: {\n query: this.query,\n docs: docChanges.documentSet,\n oldDocs: oldDocs,\n docChanges: changes,\n fromCache: newSyncState === SyncState.Local,\n syncStateChanged: syncStateChanged,\n hasPendingWrites: !docChanges.mutatedKeys.isEmpty()\n },\n limboChanges: limboChanges\n };\n }\n };\n /**\n * Returns whether the doc for the given key should be in limbo.\n */\n View.prototype.shouldBeInLimbo = function (key) {\n // If the remote end says it's part of this query, it's not in limbo.\n if (this.syncedDocuments.has(key)) {\n return false;\n }\n // The local store doesn't think it's a result, so it shouldn't be in limbo.\n if (!this.documentSet.has(key)) {\n return false;\n }\n // If there are local changes to the doc, they might explain why the server\n // doesn't know that it's part of the query. So don't put it in limbo.\n // TODO(klimt): Ideally, we would only consider changes that might actually\n // affect this specific query.\n if (this.documentSet.get(key).hasLocalMutations) {\n return false;\n }\n // Everything else is in limbo.\n return true;\n };\n /**\n * Updates syncedDocuments, current, and limbo docs based on the given change.\n * Returns the list of changes to which docs are in limbo.\n */\n View.prototype.applyTargetChange = function (targetChange) {\n var _this = this;\n if (targetChange) {\n var targetMapping = targetChange.mapping;\n if (targetMapping instanceof ResetMapping) {\n this.syncedDocuments = targetMapping.documents;\n }\n else if (targetMapping instanceof UpdateMapping) {\n this.syncedDocuments = targetMapping.applyToKeySet(this.syncedDocuments);\n }\n switch (targetChange.currentStatusUpdate) {\n case CurrentStatusUpdate.MarkCurrent:\n this.current = true;\n break;\n case CurrentStatusUpdate.MarkNotCurrent:\n this.current = false;\n break;\n case CurrentStatusUpdate.None:\n break;\n default:\n fail('Unknown current status update: ' + targetChange.currentStatusUpdate);\n }\n }\n // Recompute the set of limbo docs.\n // TODO(klimt): Do this incrementally so that it's not quadratic when\n // updating many documents.\n var oldLimboDocuments = this.limboDocuments;\n this.limboDocuments = documentKeySet();\n if (this.current) {\n this.documentSet.forEach(function (doc) {\n if (_this.shouldBeInLimbo(doc.key)) {\n _this.limboDocuments = _this.limboDocuments.add(doc.key);\n }\n });\n }\n // Diff the new limbo docs with the old limbo docs.\n var changes = [];\n oldLimboDocuments.forEach(function (key) {\n if (!_this.limboDocuments.has(key)) {\n changes.push(new RemovedLimboDocument(key));\n }\n });\n this.limboDocuments.forEach(function (key) {\n if (!oldLimboDocuments.has(key)) {\n changes.push(new AddedLimboDocument(key));\n }\n });\n return changes;\n };\n return View;\n}());\n\nfunction compareChangeType(c1, c2) {\n var order = function (change) {\n switch (change) {\n case ChangeType.Added:\n return 1;\n case ChangeType.Modified:\n return 2;\n case ChangeType.Metadata:\n // A metadata change is converted to a modified change at the public\n // api layer. Since we sort by document key and then change type,\n // metadata and modified changes must be sorted equivalently.\n return 2;\n case ChangeType.Removed:\n return 0;\n default:\n return fail('Unknown ChangeType: ' + change);\n }\n };\n return order(c1) - order(c2);\n}\n\n//# sourceMappingURL=view.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/sync_engine.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar sync_engine_LOG_TAG = 'SyncEngine';\n/**\n * QueryView contains all of the data that SyncEngine needs to keep track of for\n * a particular query.\n */\nvar QueryView = /** @class */ (function () {\n function QueryView(\n /**\n * The query itself.\n */\n query, \n /**\n * The target number created by the client that is used in the watch\n * stream to identify this query.\n */\n targetId, \n /**\n * An identifier from the datastore backend that indicates the last state\n * of the results that was received. This can be used to indicate where\n * to continue receiving new doc changes for the query.\n */\n resumeToken, \n /**\n * The view is responsible for computing the final merged truth of what\n * docs are in the query. It gets notified of local and remote changes,\n * and applies the query filters and limits to determine the most correct\n * possible results.\n */\n view) {\n this.query = query;\n this.targetId = targetId;\n this.resumeToken = resumeToken;\n this.view = view;\n }\n return QueryView;\n}());\n/**\n * SyncEngine is the central controller in the client SDK architecture. It is\n * the glue code between the EventManager, LocalStore, and RemoteStore. Some of\n * SyncEngine's responsibilities include:\n * 1. Coordinating client requests and remote events between the EventManager\n * and the local and remote data stores.\n * 2. Managing a View object for each query, providing the unified view between\n * the local and remote data stores.\n * 3. Notifying the RemoteStore when the LocalStore has new mutations in its\n * queue that need sending to the backend.\n *\n * The SyncEngine’s methods should only ever be called by methods running in the\n * global async queue.\n */\nvar sync_engine_SyncEngine = /** @class */ (function () {\n function SyncEngine(localStore, remoteStore, currentUser) {\n this.localStore = localStore;\n this.remoteStore = remoteStore;\n this.currentUser = currentUser;\n this.viewHandler = null;\n this.errorHandler = null;\n this.queryViewsByQuery = new obj_map_ObjectMap(function (q) {\n return q.canonicalId();\n });\n this.queryViewsByTarget = {};\n this.limboTargetsByKey = new sorted_map_SortedMap(document_key_DocumentKey.comparator);\n this.limboKeysByTarget = {};\n this.limboDocumentRefs = new reference_set_ReferenceSet();\n this.limboCollector = new eager_garbage_collector_EagerGarbageCollector();\n /** Stores user completion handlers, indexed by User and BatchId. */\n this.mutationUserCallbacks = {};\n this.targetIdGenerator = TargetIdGenerator.forSyncEngine();\n }\n /** Subscribes view and error handler. Can be called only once. */\n SyncEngine.prototype.subscribe = function (viewHandler, errorHandler) {\n assert(viewHandler !== null && errorHandler !== null, 'View and error handlers cannot be null');\n assert(this.viewHandler === null && this.errorHandler === null, 'SyncEngine already has a subscriber.');\n this.viewHandler = viewHandler;\n this.errorHandler = errorHandler;\n this.limboCollector.addGarbageSource(this.limboDocumentRefs);\n };\n /**\n * Initiates the new listen, resolves promise when listen enqueued to the\n * server. All the subsequent view snapshots or errors are sent to the\n * subscribed handlers. Returns the targetId of the query.\n */\n SyncEngine.prototype.listen = function (query) {\n var _this = this;\n this.assertSubscribed('listen()');\n assert(!this.queryViewsByQuery.has(query), 'We already listen to the query: ' + query);\n return this.localStore.allocateQuery(query).then(function (queryData) {\n return _this.localStore\n .executeQuery(query)\n .then(function (docs) {\n return _this.localStore\n .remoteDocumentKeys(queryData.targetId)\n .then(function (remoteKeys) {\n var view = new view_View(query, remoteKeys);\n var viewDocChanges = view.computeDocChanges(docs);\n var viewChange = view.applyChanges(viewDocChanges);\n assert(viewChange.limboChanges.length === 0, 'View returned limbo docs before target ack from the server.');\n assert(!!viewChange.snapshot, 'applyChanges for new view should always return a snapshot');\n var data = new QueryView(query, queryData.targetId, queryData.resumeToken, view);\n _this.queryViewsByQuery.set(query, data);\n _this.queryViewsByTarget[queryData.targetId] = data;\n _this.viewHandler([viewChange.snapshot]);\n _this.remoteStore.listen(queryData);\n });\n })\n .then(function () {\n return queryData.targetId;\n });\n });\n };\n /** Stops listening to the query. */\n SyncEngine.prototype.unlisten = function (query) {\n var _this = this;\n this.assertSubscribed('unlisten()');\n var queryView = this.queryViewsByQuery.get(query);\n assert(!!queryView, 'Trying to unlisten on query not found:' + query);\n return this.localStore.releaseQuery(query).then(function () {\n _this.remoteStore.unlisten(queryView.targetId);\n return _this.removeAndCleanupQuery(queryView).then(function () {\n return _this.localStore.collectGarbage();\n });\n });\n };\n /**\n * Initiates the write of local mutation batch which involves adding the\n * writes to the mutation queue, notifying the remote store about new\n * mutations and raising events for any changes this write caused.\n *\n * The promise returned by this call is resolved when the above steps\n * have completed, *not* when the write was acked by the backend. The\n * userCallback is resolved once the write was acked/rejected by the\n * backend (or failed locally for any other reason).\n */\n SyncEngine.prototype.write = function (batch, userCallback) {\n var _this = this;\n this.assertSubscribed('write()');\n return this.localStore\n .localWrite(batch)\n .then(function (result) {\n _this.addMutationCallback(result.batchId, userCallback);\n return _this.emitNewSnapsAndNotifyLocalStore(result.changes);\n })\n .then(function () {\n return _this.remoteStore.fillWritePipeline();\n });\n };\n // TODO(klimt): Wrap the given error in a standard Firestore error object.\n SyncEngine.prototype.wrapUpdateFunctionError = function (error) {\n return error;\n };\n /**\n * Takes an updateFunction in which a set of reads and writes can be performed\n * atomically. In the updateFunction, the client can read and write values\n * using the supplied transaction object. After the updateFunction, all\n * changes will be committed. If some other client has changed any of the data\n * referenced, then the updateFunction will be called again. If the\n * updateFunction still fails after the given number of retries, then the\n * transaction will be rejection.\n *\n * The transaction object passed to the updateFunction contains methods for\n * accessing documents and collections. Unlike other datastore access, data\n * accessed with the transaction will not reflect local changes that have not\n * been committed. For this reason, it is required that all reads are\n * performed before any writes. Transactions must be performed while online.\n *\n * The promise returned is resolved when the transaction is fully committed.\n */\n SyncEngine.prototype.runTransaction = function (updateFunction, retries) {\n var _this = this;\n if (retries === void 0) { retries = 5; }\n assert(retries >= 0, 'Got negative number of retries for transaction.');\n var transaction = this.remoteStore.createTransaction();\n var wrappedUpdateFunction = function () {\n try {\n var userPromise = updateFunction(transaction);\n if (isNullOrUndefined(userPromise) ||\n !userPromise.catch ||\n !userPromise.then) {\n return Promise.reject(Error('Transaction callback must return a Promise'));\n }\n return userPromise.catch(function (e) {\n return Promise.reject(_this.wrapUpdateFunctionError(e));\n });\n }\n catch (e) {\n return Promise.reject(_this.wrapUpdateFunctionError(e));\n }\n };\n return wrappedUpdateFunction().then(function (result) {\n return transaction\n .commit()\n .then(function () {\n return result;\n })\n .catch(function (error) {\n if (retries === 0) {\n return Promise.reject(error);\n }\n // TODO(klimt): Put in a retry delay?\n return _this.runTransaction(updateFunction, retries - 1);\n });\n });\n };\n SyncEngine.prototype.applyRemoteEvent = function (remoteEvent) {\n var _this = this;\n this.assertSubscribed('applyRemoteEvent()');\n // Make sure limbo documents are deleted if there were no results\n forEachNumber(remoteEvent.targetChanges, function (targetId, targetChange) {\n var limboKey = _this.limboKeysByTarget[targetId];\n if (limboKey &&\n targetChange.currentStatusUpdate ===\n CurrentStatusUpdate.MarkCurrent &&\n !remoteEvent.documentUpdates.get(limboKey)) {\n // When listening to a query the server responds with a snapshot\n // containing documents matching the query and a current marker\n // telling us we're now in sync. It's possible for these to arrive\n // as separate remote events or as a single remote event.\n // For a document query, there will be no documents sent in the\n // response if the document doesn't exist.\n //\n // If the snapshot arrives separately from the current marker,\n // we handle it normally and updateTrackedLimbos will resolve the\n // limbo status of the document, removing it from limboDocumentRefs.\n // This works because clients only initiate limbo resolution when\n // a target is current and because all current targets are\n // always at a consistent snapshot.\n //\n // However, if the document doesn't exist and the current marker\n // arrives, the document is not present in the snapshot and our\n // normal view handling would consider the document to remain in\n // limbo indefinitely because there are no updates to the document.\n // To avoid this, we specially handle this just this case here:\n // synthesizing a delete.\n //\n // TODO(dimond): Ideally we would have an explicit lookup query\n // instead resulting in an explicit delete message and we could\n // remove this special logic.\n remoteEvent.addDocumentUpdate(new document_NoDocument(limboKey, remoteEvent.snapshotVersion));\n }\n });\n return this.localStore.applyRemoteEvent(remoteEvent).then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes, remoteEvent);\n });\n };\n SyncEngine.prototype.rejectListen = function (targetId, err) {\n var _this = this;\n this.assertSubscribed('rejectListens()');\n var limboKey = this.limboKeysByTarget[targetId];\n if (limboKey) {\n // Since this query failed, we won't want to manually unlisten to it.\n // So go ahead and remove it from bookkeeping.\n this.limboTargetsByKey = this.limboTargetsByKey.remove(limboKey);\n delete this.limboKeysByTarget[targetId];\n // TODO(klimt): We really only should do the following on permission\n // denied errors, but we don't have the cause code here.\n // It's a limbo doc. Create a synthetic event saying it was deleted.\n // This is kind of a hack. Ideally, we would have a method in the local\n // store to purge a document. However, it would be tricky to keep all of\n // the local store's invariants with another method.\n var docMap = new sorted_map_SortedMap(document_key_DocumentKey.comparator);\n docMap = docMap.insert(limboKey, new document_NoDocument(limboKey, snapshot_version_SnapshotVersion.forDeletedDoc()));\n var event_1 = new remote_event_RemoteEvent(snapshot_version_SnapshotVersion.MIN, {}, docMap);\n return this.applyRemoteEvent(event_1);\n }\n else {\n var queryView_1 = this.queryViewsByTarget[targetId];\n assert(!!queryView_1, 'Unknown targetId: ' + targetId);\n return this.localStore.releaseQuery(queryView_1.query).then(function () {\n return _this.removeAndCleanupQuery(queryView_1).then(function () {\n _this.errorHandler(queryView_1.query, err);\n });\n });\n }\n };\n SyncEngine.prototype.applySuccessfulWrite = function (mutationBatchResult) {\n var _this = this;\n this.assertSubscribed('applySuccessfulWrite()');\n // The local store may or may not be able to apply the write result and\n // raise events immediately (depending on whether the watcher is caught\n // up), so we raise user callbacks first so that they consistently happen\n // before listen events.\n this.processUserCallback(mutationBatchResult.batch.batchId, \n /*error=*/ null);\n return this.localStore\n .acknowledgeBatch(mutationBatchResult)\n .then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes);\n });\n };\n SyncEngine.prototype.rejectFailedWrite = function (batchId, error) {\n var _this = this;\n this.assertSubscribed('rejectFailedWrite()');\n // The local store may or may not be able to apply the write result and\n // raise events immediately (depending on whether the watcher is caught up),\n // so we raise user callbacks first so that they consistently happen before\n // listen events.\n this.processUserCallback(batchId, error);\n return this.localStore.rejectBatch(batchId).then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes);\n });\n };\n SyncEngine.prototype.addMutationCallback = function (batchId, callback) {\n var newCallbacks = this.mutationUserCallbacks[this.currentUser.toKey()];\n if (!newCallbacks) {\n newCallbacks = new sorted_map_SortedMap(primitiveComparator);\n }\n newCallbacks = newCallbacks.insert(batchId, callback);\n this.mutationUserCallbacks[this.currentUser.toKey()] = newCallbacks;\n };\n /**\n * Resolves or rejects the user callback for the given batch and then discards\n * it.\n */\n SyncEngine.prototype.processUserCallback = function (batchId, error) {\n var newCallbacks = this.mutationUserCallbacks[this.currentUser.toKey()];\n // NOTE: Mutations restored from persistence won't have callbacks, so it's\n // okay for there to be no callback for this ID.\n if (newCallbacks) {\n var callback = newCallbacks.get(batchId);\n if (callback) {\n assert(batchId === newCallbacks.minKey(), 'Mutation callbacks processed out-of-order?');\n if (error) {\n callback.reject(error);\n }\n else {\n callback.resolve();\n }\n newCallbacks = newCallbacks.remove(batchId);\n }\n this.mutationUserCallbacks[this.currentUser.toKey()] = newCallbacks;\n }\n };\n SyncEngine.prototype.removeAndCleanupQuery = function (queryView) {\n this.queryViewsByQuery.delete(queryView.query);\n delete this.queryViewsByTarget[queryView.targetId];\n this.limboDocumentRefs.removeReferencesForId(queryView.targetId);\n return this.gcLimboDocuments();\n };\n SyncEngine.prototype.updateTrackedLimbos = function (targetId, limboChanges) {\n for (var _i = 0, limboChanges_1 = limboChanges; _i < limboChanges_1.length; _i++) {\n var limboChange = limboChanges_1[_i];\n if (limboChange instanceof AddedLimboDocument) {\n this.limboDocumentRefs.addReference(limboChange.key, targetId);\n this.trackLimboChange(limboChange);\n }\n else if (limboChange instanceof RemovedLimboDocument) {\n debug(sync_engine_LOG_TAG, 'Document no longer in limbo: ' + limboChange.key);\n this.limboDocumentRefs.removeReference(limboChange.key, targetId);\n }\n else {\n fail('Unknown limbo change: ' + JSON.stringify(limboChange));\n }\n }\n return this.gcLimboDocuments();\n };\n SyncEngine.prototype.trackLimboChange = function (limboChange) {\n var key = limboChange.key;\n if (!this.limboTargetsByKey.get(key)) {\n debug(sync_engine_LOG_TAG, 'New document in limbo: ' + key);\n var limboTargetId = this.targetIdGenerator.next();\n var query = query_Query.atPath(key.path);\n this.limboKeysByTarget[limboTargetId] = key;\n this.remoteStore.listen(new query_data_QueryData(query, limboTargetId, QueryPurpose.Listen));\n this.limboTargetsByKey = this.limboTargetsByKey.insert(key, limboTargetId);\n }\n };\n SyncEngine.prototype.gcLimboDocuments = function () {\n var _this = this;\n // HACK: We can use a null transaction here, because we know that the\n // reference set is entirely within memory and doesn't need a store engine.\n return this.limboCollector\n .collectGarbage(null)\n .next(function (keys) {\n keys.forEach(function (key) {\n var limboTargetId = _this.limboTargetsByKey.get(key);\n if (limboTargetId === null) {\n // This target already got removed, because the query failed.\n return;\n }\n _this.remoteStore.unlisten(limboTargetId);\n _this.limboTargetsByKey = _this.limboTargetsByKey.remove(key);\n delete _this.limboKeysByTarget[limboTargetId];\n });\n })\n .toPromise();\n };\n // Visible for testing\n SyncEngine.prototype.currentLimboDocs = function () {\n return this.limboTargetsByKey;\n };\n SyncEngine.prototype.emitNewSnapsAndNotifyLocalStore = function (changes, remoteEvent) {\n var _this = this;\n var newSnaps = [];\n var docChangesInAllViews = [];\n var queriesProcessed = [];\n this.queryViewsByQuery.forEach(function (_, queryView) {\n queriesProcessed.push(Promise.resolve()\n .then(function () {\n var viewDocChanges = queryView.view.computeDocChanges(changes);\n if (!viewDocChanges.needsRefill) {\n return viewDocChanges;\n }\n // The query has a limit and some docs were removed, so we need\n // to re-run the query against the local store to make sure we\n // didn't lose any good docs that had been past the limit.\n return _this.localStore.executeQuery(queryView.query).then(function (docs) {\n return queryView.view.computeDocChanges(docs, viewDocChanges);\n });\n })\n .then(function (viewDocChanges) {\n var targetChange = remoteEvent && remoteEvent.targetChanges[queryView.targetId];\n var viewChange = queryView.view.applyChanges(viewDocChanges, targetChange);\n return _this.updateTrackedLimbos(queryView.targetId, viewChange.limboChanges).then(function () {\n if (viewChange.snapshot) {\n newSnaps.push(viewChange.snapshot);\n var docChanges = local_view_changes_LocalViewChanges.fromSnapshot(viewChange.snapshot);\n docChangesInAllViews.push(docChanges);\n }\n });\n }));\n });\n return Promise.all(queriesProcessed)\n .then(function () {\n _this.viewHandler(newSnaps);\n return _this.localStore.notifyLocalViewChanges(docChangesInAllViews);\n })\n .then(function () {\n return _this.localStore.collectGarbage();\n });\n };\n SyncEngine.prototype.assertSubscribed = function (fnName) {\n assert(this.viewHandler !== null && this.errorHandler !== null, 'Trying to call ' + fnName + ' before calling subscribe().');\n };\n SyncEngine.prototype.handleUserChange = function (user) {\n var _this = this;\n this.currentUser = user;\n return this.localStore\n .handleUserChange(user)\n .then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes);\n })\n .then(function () {\n return _this.remoteStore.handleUserChange(user);\n });\n };\n return SyncEngine;\n}());\n\n\n//# sourceMappingURL=sync_engine.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/model/mutation_batch.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar BATCHID_UNKNOWN = -1;\n/**\n * A batch of mutations that will be sent as one unit to the backend.\n */\nvar mutation_batch_MutationBatch = /** @class */ (function () {\n function MutationBatch(batchId, localWriteTime, mutations) {\n this.batchId = batchId;\n this.localWriteTime = localWriteTime;\n this.mutations = mutations;\n }\n /**\n * Applies all the mutations in this MutationBatch to the specified document\n * to create a new remote document\n *\n * @param docKey The key of the document to apply mutations to.\n * @param maybeDoc The document to apply mutations to.\n * @param batchResult The result of applying the MutationBatch to the\n * backend.\n */\n MutationBatch.prototype.applyToRemoteDocument = function (docKey, maybeDoc, batchResult) {\n if (maybeDoc) {\n assert(maybeDoc.key.equals(docKey), \"applyToRemoteDocument: key \" + docKey + \" should match maybeDoc key\\n \" + maybeDoc.key);\n }\n var mutationResults = batchResult.mutationResults;\n assert(mutationResults.length === this.mutations.length, \"Mismatch between mutations length\\n (\" + this.mutations.length + \") and mutation results length\\n (\" + mutationResults.length + \").\");\n for (var i = 0; i < this.mutations.length; i++) {\n var mutation = this.mutations[i];\n if (mutation.key.equals(docKey)) {\n var mutationResult = mutationResults[i];\n maybeDoc = mutation.applyToRemoteDocument(maybeDoc, mutationResult);\n }\n }\n return maybeDoc;\n };\n /**\n * Computes the local view of a document given all the mutations in this\n * batch.\n *\n * @param docKey The key of the document to apply mutations to.\n * @param maybeDoc The document to apply mutations to.\n */\n MutationBatch.prototype.applyToLocalView = function (docKey, maybeDoc) {\n if (maybeDoc) {\n assert(maybeDoc.key.equals(docKey), \"applyToLocalDocument: key \" + docKey + \" should match maybeDoc key\\n \" + maybeDoc.key);\n }\n for (var i = 0; i < this.mutations.length; i++) {\n var mutation = this.mutations[i];\n if (mutation.key.equals(docKey)) {\n maybeDoc = mutation.applyToLocalView(maybeDoc, this.localWriteTime);\n }\n }\n return maybeDoc;\n };\n MutationBatch.prototype.keys = function () {\n var keySet = documentKeySet();\n for (var _i = 0, _a = this.mutations; _i < _a.length; _i++) {\n var mutation = _a[_i];\n keySet = keySet.add(mutation.key);\n }\n return keySet;\n };\n MutationBatch.prototype.equals = function (other) {\n return (this.batchId === other.batchId &&\n arrayEquals(this.mutations, other.mutations));\n };\n /**\n * Returns true if this mutation batch has already been removed from the\n * mutation queue.\n *\n * Note that not all implementations of the MutationQueue necessarily use\n * tombstones as part of their implementation and generally speaking no code\n * outside the mutation queues should really care about this.\n */\n MutationBatch.prototype.isTombstone = function () {\n return this.mutations.length === 0;\n };\n /** Converts this batch into a tombstone */\n MutationBatch.prototype.toTombstone = function () {\n return new MutationBatch(this.batchId, this.localWriteTime, []);\n };\n return MutationBatch;\n}());\n\n/** The result of applying a mutation batch to the backend. */\nvar mutation_batch_MutationBatchResult = /** @class */ (function () {\n function MutationBatchResult(batch, commitVersion, mutationResults, streamToken, \n /**\n * A pre-computed mapping from each mutated document to the resulting\n * version.\n */\n docVersions) {\n this.batch = batch;\n this.commitVersion = commitVersion;\n this.mutationResults = mutationResults;\n this.streamToken = streamToken;\n this.docVersions = docVersions;\n }\n /**\n * Creates a new MutationBatchResult for the given batch and results. There\n * must be one result for each mutation in the batch. This static factory\n * caches a document=>version mapping (docVersions).\n */\n MutationBatchResult.from = function (batch, commitVersion, results, streamToken) {\n assert(batch.mutations.length === results.length, 'Mutations sent ' +\n batch.mutations.length +\n ' must equal results received ' +\n results.length);\n var versionMap = documentVersionMap();\n var mutations = batch.mutations;\n for (var i = 0; i < mutations.length; i++) {\n var version = results[i].version;\n if (version === null) {\n // deletes don't have a version, so we substitute the commitVersion\n // of the entire batch.\n version = commitVersion;\n }\n versionMap = versionMap.insert(mutations[i].key, version);\n }\n return new MutationBatchResult(batch, commitVersion, results, streamToken, versionMap);\n };\n return MutationBatchResult;\n}());\n\n\n//# sourceMappingURL=mutation_batch.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/encoded_resource_path.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar escapeChar = '\\u0001';\nvar encodedSeparatorChar = '\\u0001';\nvar encodedNul = '\\u0010';\nvar encodedEscape = '\\u0011';\n/**\n * Encodes a resource path into a IndexedDb-compatible string form.\n */\nfunction encode(path) {\n var result = '';\n for (var i = 0; i < path.length; i++) {\n if (result.length > 0) {\n result = encodeSeparator(result);\n }\n result = encodeSegment(path.get(i), result);\n }\n return encodeSeparator(result);\n}\n/** Encodes a single segment of a resource path into the given result */\nfunction encodeSegment(segment, resultBuf) {\n var result = resultBuf;\n var length = segment.length;\n for (var i = 0; i < length; i++) {\n var c = segment.charAt(i);\n switch (c) {\n case '\\0':\n result += escapeChar + encodedNul;\n break;\n case escapeChar:\n result += escapeChar + encodedEscape;\n break;\n default:\n result += c;\n }\n }\n return result;\n}\n/** Encodes a path separator into the given result */\nfunction encodeSeparator(result) {\n return result + escapeChar + encodedSeparatorChar;\n}\n/**\n * Decodes the given IndexedDb-compatible string form of a resource path into\n * a ResourcePath instance. Note that this method is not suitable for use with\n * decoding resource names from the server; those are One Platform format\n * strings.\n */\nfunction decode(path) {\n // Event the empty path must encode as a path of at least length 2. A path\n // with exactly 2 must be the empty path.\n var length = path.length;\n assert(length >= 2, 'Invalid path ' + path);\n if (length === 2) {\n assert(path.charAt(0) === escapeChar && path.charAt(1) === encodedSeparatorChar, 'Non-empty path ' + path + ' had length 2');\n return path_ResourcePath.EMPTY_PATH;\n }\n // Escape characters cannot exist past the second-to-last position in the\n // source value.\n var lastReasonableEscapeIndex = length - 2;\n var segments = [];\n var segmentBuilder = '';\n for (var start = 0; start < length;) {\n // The last two characters of a valid encoded path must be a separator, so\n // there must be an end to this segment.\n var end = path.indexOf(escapeChar, start);\n if (end < 0 || end > lastReasonableEscapeIndex) {\n fail('Invalid encoded resource path: \"' + path + '\"');\n }\n var next = path.charAt(end + 1);\n switch (next) {\n case encodedSeparatorChar:\n var currentPiece = path.substring(start, end);\n var segment = void 0;\n if (segmentBuilder.length === 0) {\n // Avoid copying for the common case of a segment that excludes \\0\n // and \\001\n segment = currentPiece;\n }\n else {\n segmentBuilder += currentPiece;\n segment = segmentBuilder;\n segmentBuilder = '';\n }\n segments.push(segment);\n break;\n case encodedNul:\n segmentBuilder += path.substring(start, end);\n segmentBuilder += '\\0';\n break;\n case encodedEscape:\n // The escape character can be used in the output to encode itself.\n segmentBuilder += path.substring(start, end + 1);\n break;\n default:\n fail('Invalid encoded resource path: \"' + path + '\"');\n }\n start = end + 2;\n }\n return new path_ResourcePath(segments);\n}\n/**\n * Computes the prefix successor of the given path, computed by encode above.\n * A prefix successor is the first key that cannot be prefixed by the given\n * path. It's useful for defining the end of a prefix scan such that all keys\n * in the scan have the same prefix.\n *\n * Note that this is not a general prefix successor implementation, which is\n * tricky to get right with Strings, given that they encode down to UTF-8.\n * Instead this relies on the fact that all paths encoded by this class are\n * always terminated with a separator, and so a successor can always be\n * cheaply computed by incrementing the last character of the path.\n */\nfunction prefixSuccessor(path) {\n var c = path.charCodeAt(path.length - 1);\n // TODO(mcg): this really should be a general thing, but not worth it right\n // now\n assert(c === 1, 'successor may only operate on paths generated by encode');\n return path.substring(0, path.length - 1) + String.fromCharCode(c + 1);\n}\n\n//# sourceMappingURL=encoded_resource_path.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/indexeddb_schema.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar SCHEMA_VERSION = 1;\n/** Performs database creation and (in the future) upgrades between versions. */\nfunction createOrUpgradeDb(db, oldVersion) {\n assert(oldVersion === 0, 'Unexpected upgrade from version ' + oldVersion);\n db.createObjectStore(DbMutationQueue.store, {\n keyPath: DbMutationQueue.keyPath\n });\n // TODO(mikelehen): Get rid of \"as any\" if/when TypeScript fixes their\n // types. https://github.com/Microsoft/TypeScript/issues/14322\n db.createObjectStore(\n // tslint:disable-next-line:no-any\n DbMutationBatch.store, { keyPath: DbMutationBatch.keyPath });\n var targetDocumentsStore = db.createObjectStore(\n // tslint:disable-next-line:no-any\n DbTargetDocument.store, { keyPath: DbTargetDocument.keyPath });\n targetDocumentsStore.createIndex(DbTargetDocument.documentTargetsIndex, DbTargetDocument.documentTargetsKeyPath, { unique: true });\n var targetStore = db.createObjectStore(DbTarget.store, {\n keyPath: DbTarget.keyPath\n });\n // NOTE: This is unique only because the TargetId is the suffix.\n targetStore.createIndex(DbTarget.queryTargetsIndexName, DbTarget.queryTargetsKeyPath, { unique: true });\n // NOTE: keys for these stores are specified explicitly rather than using a\n // keyPath.\n db.createObjectStore(indexeddb_schema_DbDocumentMutation.store);\n db.createObjectStore(DbRemoteDocument.store);\n db.createObjectStore(DbOwner.store);\n db.createObjectStore(DbTargetGlobal.store);\n}\n/**\n * Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.\n */\nvar DbTimestamp = /** @class */ (function () {\n function DbTimestamp(seconds, nanos) {\n this.seconds = seconds;\n this.nanos = nanos;\n }\n return DbTimestamp;\n}());\n\n/**\n * A singleton object to be stored in the 'owner' store in IndexedDb.\n *\n * A given database can be owned by a single tab at a given time. That tab\n * must validate that it is still the owner before every write operation and\n * should regularly write an updated timestamp to prevent other tabs from\n * \"stealing\" ownership of the db.\n */\nvar DbOwner = /** @class */ (function () {\n function DbOwner(ownerId, leaseTimestampMs) {\n this.ownerId = ownerId;\n this.leaseTimestampMs = leaseTimestampMs;\n }\n /** Name of the IndexedDb object store. */\n DbOwner.store = 'owner';\n return DbOwner;\n}());\n\n/**\n * An object to be stored in the 'mutationQueues' store in IndexedDb.\n *\n * Each user gets a single queue of MutationBatches to apply to the server.\n * DbMutationQueue tracks the metadata about the queue.\n */\nvar DbMutationQueue = /** @class */ (function () {\n function DbMutationQueue(\n /**\n * The normalized user ID to which this queue belongs.\n */\n userId, \n /**\n * An identifier for the highest numbered batch that has been acknowledged\n * by the server. All MutationBatches in this queue with batchIds less\n * than or equal to this value are considered to have been acknowledged by\n * the server.\n */\n lastAcknowledgedBatchId, \n /**\n * A stream token that was previously sent by the server.\n *\n * See StreamingWriteRequest in datastore.proto for more details about\n * usage.\n *\n * After sending this token, earlier tokens may not be used anymore so\n * only a single stream token is retained.\n */\n lastStreamToken) {\n this.userId = userId;\n this.lastAcknowledgedBatchId = lastAcknowledgedBatchId;\n this.lastStreamToken = lastStreamToken;\n }\n /** Name of the IndexedDb object store. */\n DbMutationQueue.store = 'mutationQueues';\n /** Keys are automatically assigned via the userId property. */\n DbMutationQueue.keyPath = 'userId';\n return DbMutationQueue;\n}());\n\n/**\n * An object to be stored in the 'mutations' store in IndexedDb.\n *\n * Represents a batch of user-level mutations intended to be sent to the server\n * in a single write. Each user-level batch gets a separate DbMutationBatch\n * with a new batchId.\n */\nvar DbMutationBatch = /** @class */ (function () {\n function DbMutationBatch(\n /**\n * The normalized user ID to which this batch belongs.\n */\n userId, \n /**\n * An identifier for this batch, allocated by the mutation queue in a\n * monotonically increasing manner.\n */\n batchId, \n /**\n * The local write time of the batch, stored as milliseconds since the\n * epoch.\n */\n localWriteTimeMs, \n /**\n * A list of mutations to apply. All mutations will be applied atomically.\n *\n * Mutations are serialized via JsonProtoSerializer.toMutation().\n */\n mutations) {\n this.userId = userId;\n this.batchId = batchId;\n this.localWriteTimeMs = localWriteTimeMs;\n this.mutations = mutations;\n }\n /** Name of the IndexedDb object store. */\n DbMutationBatch.store = 'mutations';\n /** Keys are automatically assigned via the userId, batchId properties. */\n DbMutationBatch.keyPath = ['userId', 'batchId'];\n return DbMutationBatch;\n}());\n\n/**\n * An object to be stored in the 'documentMutations' store in IndexedDb.\n *\n * A manually maintained index of all the mutation batches that affect a given\n * document key. The rows in this table are references based on the contents of\n * DbMutationBatch.mutations.\n */\nvar indexeddb_schema_DbDocumentMutation = /** @class */ (function () {\n function DbDocumentMutation() {\n }\n /**\n * Creates a [userId] key for use in the DbDocumentMutations index to iterate\n * over all of a user's document mutations.\n */\n DbDocumentMutation.prefixForUser = function (userId) {\n return [userId];\n };\n /**\n * Creates a [userId, encodedPath] key for use in the DbDocumentMutations\n * index to iterate over all at document mutations for a given path or lower.\n */\n DbDocumentMutation.prefixForPath = function (userId, path) {\n return [userId, encode(path)];\n };\n /**\n * Creates a full index key of [userId, encodedPath, batchId] for inserting\n * and deleting into the DbDocumentMutations index.\n */\n DbDocumentMutation.key = function (userId, path, batchId) {\n return [userId, encode(path), batchId];\n };\n DbDocumentMutation.store = 'documentMutations';\n /**\n * Because we store all the useful information for this store in the key,\n * there is no useful information to store as the value. The raw (unencoded)\n * path cannot be stored because IndexedDb doesn't store prototype\n * information.\n */\n DbDocumentMutation.PLACEHOLDER = new DbDocumentMutation();\n return DbDocumentMutation;\n}());\n\n/**\n * Represents the known absence of a document at a particular version.\n * Stored in IndexedDb as part of a DbRemoteDocument object.\n */\nvar DbNoDocument = /** @class */ (function () {\n function DbNoDocument(path, readTime) {\n this.path = path;\n this.readTime = readTime;\n }\n return DbNoDocument;\n}());\n\n/**\n * An object to be stored in the 'remoteDocuments' store in IndexedDb. It\n * represents either a cached document (if it exists) or a cached \"no-document\"\n * (if it is known to not exist).\n *\n * Note: This is the persisted equivalent of a MaybeDocument and could perhaps\n * be made more general if necessary.\n */\nvar DbRemoteDocument = /** @class */ (function () {\n function DbRemoteDocument(\n /**\n * Set to an instance of a DbNoDocument if it is known that no document\n * exists.\n */\n noDocument, \n /**\n * Set to an instance of a Document if there's a cached version of the\n * document.\n */\n document) {\n this.noDocument = noDocument;\n this.document = document;\n }\n DbRemoteDocument.store = 'remoteDocuments';\n return DbRemoteDocument;\n}());\n\n/**\n * An object to be stored in the 'targets' store in IndexedDb.\n *\n * This is based on and should be kept in sync with the proto used in the iOS\n * client.\n *\n * Each query the client listens to against the server is tracked on disk so\n * that the query can be efficiently resumed on restart.\n */\nvar DbTarget = /** @class */ (function () {\n function DbTarget(\n /**\n * An auto-generated sequential numeric identifier for the query.\n *\n * Queries are stored using their canonicalId as the key, but these\n * canonicalIds can be quite long so we additionally assign a unique\n * queryId which can be used by referenced data structures (e.g.\n * indexes) to minimize the on-disk cost.\n */\n targetId, \n /**\n * The canonical string representing this query. This is not unique.\n */\n canonicalId, \n /**\n * The last readTime received from the Watch Service for this query.\n *\n * This is the same value as TargetChange.read_time in the protos.\n */\n readTime, \n /**\n * An opaque, server-assigned token that allows watching a query to be\n * resumed after disconnecting without retransmitting all the data\n * that matches the query. The resume token essentially identifies a\n * point in time from which the server should resume sending results.\n *\n * This is related to the snapshotVersion in that the resumeToken\n * effectively also encodes that value, but the resumeToken is opaque\n * and sometimes encodes additional information.\n *\n * A consequence of this is that the resumeToken should be used when\n * asking the server to reason about where this client is in the watch\n * stream, but the client should use the snapshotVersion for its own\n * purposes.\n *\n * This is the same value as TargetChange.resume_token in the protos.\n */\n resumeToken, \n /**\n * A sequence number representing the last time this query was\n * listened to, used for garbage collection purposes.\n *\n * Conventionally this would be a timestamp value, but device-local\n * clocks are unreliable and they must be able to create new listens\n * even while disconnected. Instead this should be a monotonically\n * increasing number that's incremented on each listen call.\n *\n * This is different from the queryId since the queryId is an\n * immutable identifier assigned to the Query on first use while\n * lastListenSequenceNumber is updated every time the query is\n * listened to.\n */\n lastListenSequenceNumber, \n /**\n * The query for this target.\n *\n * Because canonical ids are not unique we must store the actual query. We\n * use the proto to have an object we can persist without having to\n * duplicate translation logic to and from a `Query` object.\n */\n query) {\n this.targetId = targetId;\n this.canonicalId = canonicalId;\n this.readTime = readTime;\n this.resumeToken = resumeToken;\n this.lastListenSequenceNumber = lastListenSequenceNumber;\n this.query = query;\n }\n DbTarget.store = 'targets';\n /** Keys are automatically assigned via the targetId property. */\n DbTarget.keyPath = 'targetId';\n /** The name of the queryTargets index. */\n DbTarget.queryTargetsIndexName = 'queryTargetsIndex';\n /**\n * The index of all canonicalIds to the targets that they match. This is not\n * a unique mapping because canonicalId does not promise a unique name for all\n * possible queries, so we append the targetId to make the mapping unique.\n */\n DbTarget.queryTargetsKeyPath = ['canonicalId', 'targetId'];\n return DbTarget;\n}());\n\n/**\n * An object representing an association between a target and a document.\n * Stored in the targetDocument object store to store the documents tracked by a\n * particular target.\n */\nvar DbTargetDocument = /** @class */ (function () {\n function DbTargetDocument(\n /**\n * The targetId identifying a target.\n */\n targetId, \n /**\n * The path to the document, as encoded in the key.\n */\n path) {\n this.targetId = targetId;\n this.path = path;\n }\n /** Name of the IndexedDb object store. */\n DbTargetDocument.store = 'targetDocuments';\n /** Keys are automatically assigned via the targetId, path properties. */\n DbTargetDocument.keyPath = ['targetId', 'path'];\n /** The index name for the reverse index. */\n DbTargetDocument.documentTargetsIndex = 'documentTargetsIndex';\n /** We also need to create the reverse index for these properties. */\n DbTargetDocument.documentTargetsKeyPath = ['path', 'targetId'];\n return DbTargetDocument;\n}());\n\n/**\n * A record of global state tracked across all Targets, tracked separately\n * to avoid the need for extra indexes.\n *\n * This should be kept in-sync with the proto used in the iOS client.\n */\nvar DbTargetGlobal = /** @class */ (function () {\n function DbTargetGlobal(\n /**\n * The highest numbered target id across all targets.\n *\n * See DbTarget.targetId.\n */\n highestTargetId, \n /**\n * The highest numbered lastListenSequenceNumber across all targets.\n *\n * See DbTarget.lastListenSequenceNumber.\n */\n highestListenSequenceNumber, \n /**\n * A global snapshot version representing the last consistent snapshot we\n * received from the backend. This is monotonically increasing and any\n * snapshots received from the backend prior to this version (e.g. for\n * targets resumed with a resumeToken) should be suppressed (buffered)\n * until the backend has caught up to this snapshot version again. This\n * prevents our cache from ever going backwards in time.\n */\n lastRemoteSnapshotVersion) {\n this.highestTargetId = highestTargetId;\n this.highestListenSequenceNumber = highestListenSequenceNumber;\n this.lastRemoteSnapshotVersion = lastRemoteSnapshotVersion;\n }\n /**\n * The key string used for the single object that exists in the\n * DbTargetGlobal store.\n */\n DbTargetGlobal.key = 'targetGlobalKey';\n DbTargetGlobal.store = 'targetGlobal';\n return DbTargetGlobal;\n}());\n\n/**\n * The list of all IndexedDB stored used by the SDK. This is used when creating\n * transactions so that access across all stores is done atomically.\n */\nvar ALL_STORES = [\n DbMutationQueue.store,\n DbMutationBatch.store,\n indexeddb_schema_DbDocumentMutation.store,\n DbRemoteDocument.store,\n DbTarget.store,\n DbOwner.store,\n DbTargetGlobal.store,\n DbTargetDocument.store\n];\n\n//# sourceMappingURL=indexeddb_schema.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/simple_db.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar simple_db_LOG_TAG = 'SimpleDb';\n/**\n * Provides a wrapper around IndexedDb with a simplified interface that uses\n * Promise-like return values to chain operations. Real promises cannot be used\n * since .then() continuations are executed asynchronously (e.g. via\n * .setImmediate), which would cause IndexedDB to end the transaction.\n * See PersistencePromise for more details.\n */\nvar simple_db_SimpleDb = /** @class */ (function () {\n function SimpleDb(db) {\n this.db = db;\n }\n /** Opens the specified database, creating or upgrading it if necessary. */\n SimpleDb.openOrCreate = function (name, version, runUpgrade) {\n assert(SimpleDb.isAvailable(), 'IndexedDB not supported in current environment.');\n debug(simple_db_LOG_TAG, 'Opening database:', name);\n return new persistence_promise_PersistencePromise(function (resolve, reject) {\n // TODO(mikelehen): Investigate browser compatibility.\n // https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB\n // suggests IE9 and older WebKit browsers handle upgrade\n // differently.\n var request = window.indexedDB.open(name, version);\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(new SimpleDb(db));\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onupgradeneeded = function (event) {\n debug(simple_db_LOG_TAG, 'Database \"' + name + '\" requires upgrade from version:', event.oldVersion);\n // TODO(mikelehen): If/when we need to do an actual data\n // migration, we'll want to wrap db in a SimpleDb and have the\n // runUpgrade function return a PersistencePromise, since we'll\n // likely need to do async reads and writes. For now we're\n // cheating and just passing the raw IndexedDB in, since\n // createObjectStore(), etc. are synchronous.\n var db = event.target.result;\n runUpgrade(db, event.oldVersion);\n };\n }).toPromise();\n };\n /** Deletes the specified database. */\n SimpleDb.delete = function (name) {\n debug(simple_db_LOG_TAG, 'Removing database:', name);\n return wrapRequest(window.indexedDB.deleteDatabase(name)).toPromise();\n };\n /** Returns true if IndexedDB is available in the current environment. */\n SimpleDb.isAvailable = function () {\n if (typeof window === 'undefined' || window.indexedDB == null) {\n return false;\n }\n // We extensively use indexed array values and compound keys,\n // which IE and Edge do not support. However, they still have indexedDB\n // defined on the window, so we need to check for them here and make sure\n // to return that persistence is not enabled for those browsers.\n // For tracking support of this feature, see here:\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/\n // Check the UA string to find out the browser.\n var ua = window.navigator.userAgent;\n // IE 10\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n // IE 11\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n // Edge\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,\n // like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n if (ua.indexOf('MSIE ') > 0 ||\n ua.indexOf('Trident/') > 0 ||\n ua.indexOf('Edge/') > 0) {\n return false;\n }\n else {\n return true;\n }\n };\n SimpleDb.prototype.runTransaction = function (mode, objectStores, transactionFn) {\n var transaction = new simple_db_SimpleDbTransaction(this.db, mode, objectStores);\n var transactionFnResult = transactionFn(transaction)\n .catch(function (error) {\n // Abort the transaction if there was an\n // error.\n transaction.abort();\n return persistence_promise_PersistencePromise.reject(error);\n })\n .toPromise();\n // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to\n // fire), but still return the original transactionFnResult back to the\n // caller.\n return transaction.completionPromise.then(function () { return transactionFnResult; });\n };\n SimpleDb.prototype.close = function () {\n this.db.close();\n };\n return SimpleDb;\n}());\n\n/**\n * A controller for iterating over a key range or index. It allows an iterate\n * callback to delete the currently-referenced object, or jump to a new key\n * within the key range or index.\n */\nvar IterationController = /** @class */ (function () {\n function IterationController(dbCursor) {\n this.dbCursor = dbCursor;\n this.shouldStop = false;\n this.nextKey = null;\n }\n Object.defineProperty(IterationController.prototype, \"isDone\", {\n get: function () {\n return this.shouldStop;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(IterationController.prototype, \"skipToKey\", {\n get: function () {\n return this.nextKey;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(IterationController.prototype, \"cursor\", {\n set: function (value) {\n this.dbCursor = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * This function can be called to stop iteration at any point.\n */\n IterationController.prototype.done = function () {\n this.shouldStop = true;\n };\n /**\n * This function can be called to skip to that next key, which could be\n * an index or a primary key.\n */\n IterationController.prototype.skip = function (key) {\n this.nextKey = key;\n };\n /**\n * Delete the current cursor value from the object store.\n *\n * NOTE: You CANNOT do this with a keysOnly query.\n */\n IterationController.prototype.delete = function () {\n return wrapRequest(this.dbCursor.delete());\n };\n return IterationController;\n}());\n\n/**\n * Wraps an IDBTransaction and exposes a store() method to get a handle to a\n * specific object store.\n */\nvar simple_db_SimpleDbTransaction = /** @class */ (function () {\n function SimpleDbTransaction(db, mode, objectStoresNames) {\n var _this = this;\n this.aborted = false;\n this.transaction = db.transaction(objectStoresNames, mode);\n this.completionPromise = new Promise(function (resolve, reject) {\n // We consider aborting to be \"normal\" and just resolve the promise.\n // May need to revisit if/when we actually need to abort transactions.\n _this.transaction.onabort = _this.transaction.oncomplete = function (event) {\n resolve();\n };\n _this.transaction.onerror = function (event) {\n reject(event.target.error);\n };\n });\n }\n SimpleDbTransaction.prototype.abort = function () {\n if (!this.aborted) {\n debug(simple_db_LOG_TAG, 'Aborting transaction.');\n this.aborted = true;\n this.transaction.abort();\n }\n };\n /**\n * Returns a SimpleDbStore for the specified store. All\n * operations performed on the SimpleDbStore happen within the context of this\n * transaction and it cannot be used anymore once the transaction is\n * completed.\n *\n * Note that we can't actually enforce that the KeyType and ValueType are\n * correct, but they allow type safety through the rest of the consuming code.\n */\n SimpleDbTransaction.prototype.store = function (storeName) {\n var store = this.transaction.objectStore(storeName);\n assert(!!store, 'Object store not part of transaction: ' + storeName);\n return new simple_db_SimpleDbStore(store);\n };\n return SimpleDbTransaction;\n}());\n\n/**\n * A wrapper around an IDBObjectStore providing an API that:\n *\n * 1) Has generic KeyType / ValueType parameters to provide strongly-typed\n * methods for acting against the object store.\n * 2) Deals with IndexedDB's onsuccess / onerror event callbacks, making every\n * method return a PersistencePromise instead.\n * 3) Provides a higher-level API to avoid needing to do excessive wrapping of\n * intermediate IndexedDB types (IDBCursorWithValue, etc.)\n */\nvar simple_db_SimpleDbStore = /** @class */ (function () {\n function SimpleDbStore(store) {\n this.store = store;\n }\n SimpleDbStore.prototype.put = function (keyOrValue, value) {\n var request;\n if (value !== undefined) {\n debug(simple_db_LOG_TAG, 'PUT', this.store.name, keyOrValue, value);\n request = this.store.put(value, keyOrValue);\n }\n else {\n debug(simple_db_LOG_TAG, 'PUT', this.store.name, '', keyOrValue);\n request = this.store.put(keyOrValue);\n }\n return wrapRequest(request);\n };\n /**\n * Gets the object with the specified key from the specified store, or null\n * if no object exists with the specified key.\n *\n * @key The key of the object to get.\n * @return The object with the specified key or null if no object exists.\n */\n SimpleDbStore.prototype.get = function (key) {\n var _this = this;\n var request = this.store.get(key);\n // tslint:disable-next-line:no-any We're doing an unsafe cast to ValueType.\n return wrapRequest(request).next(function (result) {\n // Normalize nonexistence to null.\n if (result === undefined) {\n result = null;\n }\n debug(simple_db_LOG_TAG, 'GET', _this.store.name, key, result);\n return result;\n });\n };\n SimpleDbStore.prototype.delete = function (key) {\n debug(simple_db_LOG_TAG, 'DELETE', this.store.name, key);\n var request = this.store.delete(key);\n return wrapRequest(request);\n };\n SimpleDbStore.prototype.loadAll = function (indexOrRange, range) {\n var cursor = this.cursor(this.options(indexOrRange, range));\n var results = [];\n return this.iterateCursor(cursor, function (key, value) {\n results.push(value);\n }).next(function () {\n return results;\n });\n };\n SimpleDbStore.prototype.deleteAll = function (indexOrRange, range) {\n debug(simple_db_LOG_TAG, 'DELETE ALL', this.store.name);\n var options = this.options(indexOrRange, range);\n options.keysOnly = false;\n var cursor = this.cursor(options);\n return this.iterateCursor(cursor, function (key, value, control) {\n // NOTE: Calling delete() on a cursor is documented as more efficient than\n // calling delete() on an object store with a single key\n // (https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete),\n // however, this requires us *not* to use a keysOnly cursor\n // (https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/delete). We\n // may want to compare the performance of each method.\n return control.delete();\n });\n };\n SimpleDbStore.prototype.iterate = function (optionsOrCallback, callback) {\n var options;\n if (!callback) {\n options = {};\n callback = optionsOrCallback;\n }\n else {\n options = optionsOrCallback;\n }\n var cursor = this.cursor(options);\n return this.iterateCursor(cursor, callback);\n };\n SimpleDbStore.prototype.iterateCursor = function (cursorRequest, fn) {\n var results = [];\n return new persistence_promise_PersistencePromise(function (resolve, reject) {\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (!cursor) {\n resolve();\n return;\n }\n var controller = new IterationController(cursor);\n var userResult = fn(cursor.primaryKey, cursor.value, controller);\n if (userResult instanceof persistence_promise_PersistencePromise) {\n results.push(userResult);\n }\n if (controller.isDone) {\n resolve();\n }\n else if (controller.skipToKey === null) {\n cursor.continue();\n }\n else {\n cursor.continue(controller.skipToKey);\n }\n };\n }).next(function () {\n return persistence_promise_PersistencePromise.waitFor(results);\n });\n };\n SimpleDbStore.prototype.options = function (indexOrRange, range) {\n var indexName = undefined;\n if (indexOrRange !== undefined) {\n if (typeof indexOrRange === 'string') {\n indexName = indexOrRange;\n }\n else {\n assert(range === undefined, '3rd argument must not be defined if 2nd is a range.');\n range = indexOrRange;\n }\n }\n return { index: indexName, range: range };\n };\n SimpleDbStore.prototype.cursor = function (options) {\n var direction = 'next';\n if (options.reverse) {\n direction = 'prev';\n }\n if (options.index) {\n var index = this.store.index(options.index);\n if (options.keysOnly) {\n return index.openKeyCursor(options.range, direction);\n }\n else {\n return index.openCursor(options.range, direction);\n }\n }\n else {\n return this.store.openCursor(options.range, direction);\n }\n };\n return SimpleDbStore;\n}());\n\n/**\n * Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror\n * handlers to resolve / reject the PersistencePromise as appropriate.\n */\nfunction wrapRequest(request) {\n return new persistence_promise_PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}\n\n//# sourceMappingURL=simple_db.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/indexeddb_mutation_queue.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n/** A mutation queue for a specific user, backed by IndexedDB. */\nvar indexeddb_mutation_queue_IndexedDbMutationQueue = /** @class */ (function () {\n function IndexedDbMutationQueue(\n /**\n * The normalized userId (e.g. null UID => \"\" userId) used to store /\n * retrieve mutations.\n */\n userId, serializer) {\n this.userId = userId;\n this.serializer = serializer;\n this.garbageCollector = null;\n }\n /**\n * Creates a new mutation queue for the given user.\n * @param user The user for which to create a mutation queue.\n * @param serializer The serializer to use when persisting to IndexedDb.\n */\n IndexedDbMutationQueue.forUser = function (user, serializer) {\n // TODO(mcg): Figure out what constraints there are on userIDs\n // In particular, are there any reserved characters? are empty ids allowed?\n // For the moment store these together in the same mutations table assuming\n // that empty userIDs aren't allowed.\n assert(user.uid !== '', 'UserID must not be an empty string.');\n var userId = user.isUnauthenticated() ? '' : user.uid;\n return new IndexedDbMutationQueue(userId, serializer);\n };\n IndexedDbMutationQueue.prototype.start = function (transaction) {\n var _this = this;\n return IndexedDbMutationQueue.loadNextBatchIdFromDb(transaction)\n .next(function (nextBatchId) {\n _this.nextBatchId = nextBatchId;\n return mutationQueuesStore(transaction).get(_this.userId);\n })\n .next(function (metadata) {\n if (!metadata) {\n metadata = new DbMutationQueue(_this.userId, BATCHID_UNKNOWN, \n /*lastStreamToken=*/ '');\n }\n _this.metadata = metadata;\n // On restart, nextBatchId may end up lower than\n // lastAcknowledgedBatchId since it's computed from the queue\n // contents, and there may be no mutations in the queue. In this\n // case, we need to reset lastAcknowledgedBatchId (which is safe\n // since the queue must be empty).\n if (_this.metadata.lastAcknowledgedBatchId >= _this.nextBatchId) {\n return _this.checkEmpty(transaction).next(function (empty) {\n assert(empty, 'Reset nextBatchID is only possible when the queue is empty');\n _this.metadata.lastAcknowledgedBatchId = BATCHID_UNKNOWN;\n return mutationQueuesStore(transaction).put(_this.metadata);\n });\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n });\n };\n /**\n * Returns one larger than the largest batch ID that has been stored. If there\n * are no mutations returns 0. Note that batch IDs are global.\n */\n IndexedDbMutationQueue.loadNextBatchIdFromDb = function (txn) {\n var maxBatchId = BATCHID_UNKNOWN;\n return mutationsStore(txn)\n .iterate({ reverse: true }, function (key, batch, control) {\n var userId = key[0], batchId = key[1];\n if (batchId > maxBatchId) {\n maxBatchId = batch.batchId;\n }\n if (userId === '') {\n // We can't compute a predecessor for the empty string, since it\n // is lexographically first. That also means that no other\n // userIds can come before this one, so we can just exit early.\n control.done();\n }\n else {\n var nextUser = immediatePredecessor(userId);\n control.skip([nextUser]);\n }\n })\n .next(function () { return maxBatchId + 1; });\n };\n IndexedDbMutationQueue.prototype.checkEmpty = function (transaction) {\n var empty = true;\n var range = IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY), this.keyForBatchId(Number.POSITIVE_INFINITY));\n return mutationsStore(transaction)\n .iterate({ range: range }, function (key, value, control) {\n empty = false;\n control.done();\n })\n .next(function () { return empty; });\n };\n IndexedDbMutationQueue.prototype.getNextBatchId = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.nextBatchId);\n };\n IndexedDbMutationQueue.prototype.getHighestAcknowledgedBatchId = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.metadata.lastAcknowledgedBatchId);\n };\n IndexedDbMutationQueue.prototype.acknowledgeBatch = function (transaction, batch, streamToken) {\n var batchId = batch.batchId;\n assert(batchId > this.metadata.lastAcknowledgedBatchId, 'Mutation batchIDs must be acknowledged in order');\n this.metadata.lastAcknowledgedBatchId = batchId;\n this.metadata.lastStreamToken = validateStreamToken(streamToken);\n return mutationQueuesStore(transaction).put(this.metadata);\n };\n IndexedDbMutationQueue.prototype.getLastStreamToken = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.metadata.lastStreamToken);\n };\n IndexedDbMutationQueue.prototype.setLastStreamToken = function (transaction, streamToken) {\n this.metadata.lastStreamToken = validateStreamToken(streamToken);\n return mutationQueuesStore(transaction).put(this.metadata);\n };\n IndexedDbMutationQueue.prototype.addMutationBatch = function (transaction, localWriteTime, mutations) {\n var _this = this;\n var batchId = this.nextBatchId;\n this.nextBatchId++;\n var batch = new mutation_batch_MutationBatch(batchId, localWriteTime, mutations);\n var dbBatch = this.serializer.toDbMutationBatch(this.userId, batch);\n return mutationsStore(transaction)\n .put(dbBatch)\n .next(function () {\n var promises = [];\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n var encodedPath = encode(mutation.key.path);\n var indexKey = indexeddb_schema_DbDocumentMutation.key(_this.userId, mutation.key.path, batchId);\n documentMutationsStore(transaction).put(indexKey, indexeddb_schema_DbDocumentMutation.PLACEHOLDER);\n }\n return persistence_promise_PersistencePromise.waitFor(promises);\n })\n .next(function () {\n return batch;\n });\n };\n IndexedDbMutationQueue.prototype.lookupMutationBatch = function (transaction, batchId) {\n var _this = this;\n return mutationsStore(transaction)\n .get(this.keyForBatchId(batchId))\n .next(function (dbBatch) {\n return dbBatch ? _this.serializer.fromDbMutationBatch(dbBatch) : null;\n });\n };\n IndexedDbMutationQueue.prototype.getNextMutationBatchAfterBatchId = function (transaction, batchId) {\n var _this = this;\n var range = IDBKeyRange.lowerBound(this.keyForBatchId(batchId + 1));\n var foundBatch = null;\n return mutationsStore(transaction)\n .iterate({ range: range }, function (key, dbBatch, control) {\n if (dbBatch.userId === _this.userId) {\n assert(dbBatch.batchId > batchId, 'Should have found mutation after ' + batchId);\n foundBatch = _this.serializer.fromDbMutationBatch(dbBatch);\n }\n control.done();\n })\n .next(function () { return foundBatch; });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatches = function (transaction) {\n var _this = this;\n var range = IDBKeyRange.bound(this.keyForBatchId(BATCHID_UNKNOWN), this.keyForBatchId(Number.POSITIVE_INFINITY));\n return mutationsStore(transaction)\n .loadAll(range)\n .next(function (dbBatches) {\n return dbBatches.map(function (dbBatch) { return _this.serializer.fromDbMutationBatch(dbBatch); });\n });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatchesThroughBatchId = function (transaction, batchId) {\n var _this = this;\n var range = IDBKeyRange.bound(this.keyForBatchId(BATCHID_UNKNOWN), this.keyForBatchId(batchId));\n return mutationsStore(transaction)\n .loadAll(range)\n .next(function (dbBatches) {\n return dbBatches.map(function (dbBatch) { return _this.serializer.fromDbMutationBatch(dbBatch); });\n });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatchesAffectingDocumentKey = function (transaction, documentKey) {\n var _this = this;\n // Scan the document-mutation index starting with a prefix starting with\n // the given documentKey.\n var indexPrefix = indexeddb_schema_DbDocumentMutation.prefixForPath(this.userId, documentKey.path);\n var indexStart = IDBKeyRange.lowerBound(indexPrefix);\n var results = [];\n return documentMutationsStore(transaction)\n .iterate({ range: indexStart }, function (indexKey, _, control) {\n var userID = indexKey[0], encodedPath = indexKey[1], batchID = indexKey[2];\n // Only consider rows matching exactly the specific key of\n // interest. Note that because we order by path first, and we\n // order terminators before path separators, we'll encounter all\n // the index rows for documentKey contiguously. In particular, all\n // the rows for documentKey will occur before any rows for\n // documents nested in a subcollection beneath documentKey so we\n // can stop as soon as we hit any such row.\n var path = decode(encodedPath);\n if (userID !== _this.userId || !documentKey.path.equals(path)) {\n control.done();\n return;\n }\n var mutationKey = _this.keyForBatchId(batchID);\n // Look up the mutation batch in the store.\n // PORTING NOTE: because iteration is callback driven in the web,\n // we just look up the key instead of keeping an open iterator\n // like iOS.\n return mutationsStore(transaction)\n .get(mutationKey)\n .next(function (dbBatch) {\n if (dbBatch === null) {\n fail('Dangling document-mutation reference found: ' +\n indexKey +\n ' which points to ' +\n mutationKey);\n }\n results.push(_this.serializer.fromDbMutationBatch(dbBatch));\n });\n })\n .next(function () { return results; });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatchesAffectingQuery = function (transaction, query) {\n var _this = this;\n assert(!query.isDocumentQuery(), \"Document queries shouldn't go down this path\");\n var queryPath = query.path;\n var immediateChildrenLength = queryPath.length + 1;\n // TODO(mcg): Actually implement a single-collection query\n //\n // This is actually executing an ancestor query, traversing the whole\n // subtree below the collection which can be horrifically inefficient for\n // some structures. The right way to solve this is to implement the full\n // value index, but that's not in the cards in the near future so this is\n // the best we can do for the moment.\n //\n // Since we don't yet index the actual properties in the mutations, our\n // current approach is to just return all mutation batches that affect\n // documents in the collection being queried.\n var indexPrefix = indexeddb_schema_DbDocumentMutation.prefixForPath(this.userId, queryPath);\n var encodedQueryPath = indexPrefix[1];\n var indexStart = IDBKeyRange.lowerBound(indexPrefix);\n // Collect up unique batchIDs encountered during a scan of the index. Use a\n // SortedSet to accumulate batch IDs so they can be traversed in order in a\n // scan of the main table.\n var uniqueBatchIDs = new sorted_set_SortedSet(primitiveComparator);\n return documentMutationsStore(transaction)\n .iterate({ range: indexStart }, function (indexKey, _, control) {\n var userID = indexKey[0], encodedPath = indexKey[1], batchID = indexKey[2];\n var path = decode(encodedPath);\n if (userID !== _this.userId || !queryPath.isPrefixOf(path)) {\n control.done();\n return;\n }\n // Rows with document keys more than one segment longer than the\n // query path can't be matches. For example, a query on 'rooms'\n // can't match the document /rooms/abc/messages/xyx.\n // TODO(mcg): we'll need a different scanner when we implement\n // ancestor queries.\n if (path.length !== immediateChildrenLength) {\n return;\n }\n uniqueBatchIDs = uniqueBatchIDs.add(batchID);\n })\n .next(function () {\n var results = [];\n var promises = [];\n // TODO(rockwood): Implement this using iterate.\n uniqueBatchIDs.forEach(function (batchID) {\n var mutationKey = _this.keyForBatchId(batchID);\n promises.push(mutationsStore(transaction)\n .get(mutationKey)\n .next(function (mutation) {\n if (mutation === null) {\n fail('Dangling document-mutation reference found, ' +\n 'which points to ' +\n mutationKey);\n }\n results.push(_this.serializer.fromDbMutationBatch(mutation));\n }));\n });\n return persistence_promise_PersistencePromise.waitFor(promises).next(function () { return results; });\n });\n };\n IndexedDbMutationQueue.prototype.removeMutationBatches = function (transaction, batches) {\n var txn = mutationsStore(transaction);\n var indexTxn = documentMutationsStore(transaction);\n var promises = [];\n var _loop_1 = function (batch) {\n var range = IDBKeyRange.only(this_1.keyForBatchId(batch.batchId));\n var numDeleted = 0;\n var removePromise = txn.iterate({ range: range }, function (key, value, control) {\n numDeleted++;\n return control.delete();\n });\n promises.push(removePromise.next(function () {\n assert(numDeleted === 1, 'Dangling document-mutation reference found: Missing batch ' +\n batch.batchId);\n }));\n for (var _i = 0, _a = batch.mutations; _i < _a.length; _i++) {\n var mutation = _a[_i];\n var indexKey = indexeddb_schema_DbDocumentMutation.key(this_1.userId, mutation.key.path, batch.batchId);\n promises.push(indexTxn.delete(indexKey));\n if (this_1.garbageCollector !== null) {\n this_1.garbageCollector.addPotentialGarbageKey(mutation.key);\n }\n }\n };\n var this_1 = this;\n for (var _i = 0, batches_1 = batches; _i < batches_1.length; _i++) {\n var batch = batches_1[_i];\n _loop_1(batch);\n }\n return persistence_promise_PersistencePromise.waitFor(promises);\n };\n IndexedDbMutationQueue.prototype.performConsistencyCheck = function (txn) {\n var _this = this;\n return this.checkEmpty(txn).next(function (empty) {\n if (!empty) {\n return persistence_promise_PersistencePromise.resolve();\n }\n // Verify that there are no entries in the documentMutations index if\n // the queue is empty.\n var startRange = IDBKeyRange.lowerBound(indexeddb_schema_DbDocumentMutation.prefixForUser(_this.userId));\n var danglingMutationReferences = [];\n return documentMutationsStore(txn)\n .iterate({ range: startRange }, function (key, _, control) {\n var userID = key[0];\n if (userID !== _this.userId) {\n control.done();\n return;\n }\n else {\n var path = decode(key[1]);\n danglingMutationReferences.push(path);\n }\n })\n .next(function () {\n assert(danglingMutationReferences.length === 0, 'Document leak -- detected dangling mutation references when queue is empty. Dangling keys: ' +\n danglingMutationReferences.map(function (p) { return p.canonicalString(); }));\n });\n });\n };\n IndexedDbMutationQueue.prototype.setGarbageCollector = function (gc) {\n this.garbageCollector = gc;\n };\n IndexedDbMutationQueue.prototype.containsKey = function (txn, key) {\n var _this = this;\n var indexKey = indexeddb_schema_DbDocumentMutation.prefixForPath(this.userId, key.path);\n var encodedPath = indexKey[1];\n var startRange = IDBKeyRange.lowerBound(indexKey);\n var containsKey = false;\n return documentMutationsStore(txn)\n .iterate({ range: startRange, keysOnly: true }, function (key, _, control) {\n var userID = key[0], keyPath = key[1], batchID = key[2];\n if (userID === _this.userId && keyPath === encodedPath) {\n containsKey = true;\n }\n control.done();\n })\n .next(function () { return containsKey; });\n };\n /**\n * Creates a [userId, batchId] key for use with the DbMutationQueue object\n * store.\n */\n IndexedDbMutationQueue.prototype.keyForBatchId = function (batchId) {\n return [this.userId, batchId];\n };\n return IndexedDbMutationQueue;\n}());\n\nfunction validateStreamToken(token) {\n assert(typeof token === 'string', 'Persisting non-string stream token not supported.');\n return token;\n}\n/**\n * Helper to get a typed SimpleDbStore for the mutations object store.\n */\nfunction mutationsStore(txn) {\n return getStore(txn, DbMutationBatch.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction documentMutationsStore(txn) {\n return getStore(txn, indexeddb_schema_DbDocumentMutation.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}\n/**\n * Helper to get a typed SimpleDbStore from a transaction.\n */\nfunction getStore(txn, store) {\n if (txn instanceof simple_db_SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}\n\n//# sourceMappingURL=indexeddb_mutation_queue.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/indexeddb_query_cache.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\nvar indexeddb_query_cache_IndexedDbQueryCache = /** @class */ (function () {\n function IndexedDbQueryCache(serializer) {\n this.serializer = serializer;\n /**\n * The last received snapshot version. We store this seperately from the\n * metadata to avoid the extra conversion to/from DbTimestamp.\n */\n this.lastRemoteSnapshotVersion = snapshot_version_SnapshotVersion.MIN;\n /**\n * A cached copy of the metadata for the query cache.\n */\n this.metadata = new DbTargetGlobal(\n /*highestTargetId=*/ 0, \n /*lastListenSequenceNumber=*/ 0, snapshot_version_SnapshotVersion.MIN.toTimestamp());\n /** The garbage collector to notify about potential garbage keys. */\n this.garbageCollector = null;\n }\n IndexedDbQueryCache.prototype.start = function (transaction) {\n var _this = this;\n return globalTargetStore(transaction)\n .get(DbTargetGlobal.key)\n .next(function (metadata) {\n if (metadata !== null) {\n _this.metadata = metadata;\n var lastSavedVersion = metadata.lastRemoteSnapshotVersion;\n _this.lastRemoteSnapshotVersion = snapshot_version_SnapshotVersion.fromTimestamp(new timestamp_Timestamp(lastSavedVersion.seconds, lastSavedVersion.nanos));\n }\n return persistence_promise_PersistencePromise.resolve();\n });\n };\n IndexedDbQueryCache.prototype.getHighestTargetId = function () {\n return this.metadata.highestTargetId;\n };\n IndexedDbQueryCache.prototype.getLastRemoteSnapshotVersion = function () {\n return this.lastRemoteSnapshotVersion;\n };\n IndexedDbQueryCache.prototype.setLastRemoteSnapshotVersion = function (transaction, snapshotVersion) {\n this.lastRemoteSnapshotVersion = snapshotVersion;\n this.metadata.lastRemoteSnapshotVersion = snapshotVersion.toTimestamp();\n return globalTargetStore(transaction).put(DbTargetGlobal.key, this.metadata);\n };\n IndexedDbQueryCache.prototype.addQueryData = function (transaction, queryData) {\n var _this = this;\n var targetId = queryData.targetId;\n var addedQueryPromise = targetsStore(transaction).put(this.serializer.toDbTarget(queryData));\n if (targetId > this.metadata.highestTargetId) {\n this.metadata.highestTargetId = targetId;\n return addedQueryPromise.next(function () {\n return globalTargetStore(transaction).put(DbTargetGlobal.key, _this.metadata);\n });\n }\n else {\n return addedQueryPromise;\n }\n };\n IndexedDbQueryCache.prototype.removeQueryData = function (transaction, queryData) {\n return this.removeMatchingKeysForTargetId(transaction, queryData.targetId).next(function () {\n targetsStore(transaction).delete(queryData.targetId);\n });\n };\n IndexedDbQueryCache.prototype.getQueryData = function (transaction, query) {\n var _this = this;\n // Iterating by the canonicalId may yield more than one result because\n // canonicalId values are not required to be unique per target. This query\n // depends on the queryTargets index to be efficent.\n var canonicalId = query.canonicalId();\n var range = IDBKeyRange.bound([canonicalId, Number.NEGATIVE_INFINITY], [canonicalId, Number.POSITIVE_INFINITY]);\n var result = null;\n return targetsStore(transaction)\n .iterate({ range: range, index: DbTarget.queryTargetsIndexName }, function (key, value, control) {\n var found = _this.serializer.fromDbTarget(value);\n // After finding a potential match, check that the query is\n // actually equal to the requested query.\n if (query.equals(found.query)) {\n result = found;\n control.done();\n }\n })\n .next(function () { return result; });\n };\n IndexedDbQueryCache.prototype.addMatchingKeys = function (txn, keys, targetId) {\n // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n // Indexeddb.\n var promises = [];\n var store = documentTargetStore(txn);\n keys.forEach(function (key) {\n var path = encode(key.path);\n promises.push(store.put(new DbTargetDocument(targetId, path)));\n });\n return persistence_promise_PersistencePromise.waitFor(promises);\n };\n IndexedDbQueryCache.prototype.removeMatchingKeys = function (txn, keys, targetId) {\n var _this = this;\n // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n // IndexedDb.\n var promises = [];\n var store = documentTargetStore(txn);\n keys.forEach(function (key) {\n var path = encode(key.path);\n promises.push(store.delete([targetId, path]));\n if (_this.garbageCollector !== null) {\n _this.garbageCollector.addPotentialGarbageKey(key);\n }\n });\n return persistence_promise_PersistencePromise.waitFor(promises);\n };\n IndexedDbQueryCache.prototype.removeMatchingKeysForTargetId = function (txn, targetId) {\n var store = documentTargetStore(txn);\n var range = IDBKeyRange.bound([targetId], [targetId + 1], \n /*lowerOpen=*/ false, \n /*upperOpen=*/ true);\n return this.notifyGCForRemovedKeys(txn, range).next(function () {\n return store.delete(range);\n });\n };\n IndexedDbQueryCache.prototype.notifyGCForRemovedKeys = function (txn, range) {\n var _this = this;\n var store = documentTargetStore(txn);\n if (this.garbageCollector !== null && this.garbageCollector.isEager) {\n // In order to generate garbage events properly, we need to read these\n // keys before deleting.\n return store.iterate({ range: range, keysOnly: true }, function (key, _, control) {\n var path = decode(key[1]);\n var docKey = new document_key_DocumentKey(path);\n // Paranoid assertion in case the the collector is set to null\n // during the iteration.\n assert(_this.garbageCollector !== null, 'GarbageCollector for query cache set to null during key removal.');\n _this.garbageCollector.addPotentialGarbageKey(docKey);\n });\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n };\n IndexedDbQueryCache.prototype.getMatchingKeysForTargetId = function (txn, targetId) {\n var promises = [];\n var range = IDBKeyRange.bound([targetId], [targetId + 1], \n /*lowerOpen=*/ false, \n /*upperOpen=*/ true);\n var store = documentTargetStore(txn);\n var result = documentKeySet();\n return store\n .iterate({ range: range, keysOnly: true }, function (key, _, control) {\n var path = decode(key[1]);\n var docKey = new document_key_DocumentKey(path);\n result = result.add(docKey);\n })\n .next(function () { return result; });\n };\n IndexedDbQueryCache.prototype.setGarbageCollector = function (gc) {\n this.garbageCollector = gc;\n };\n IndexedDbQueryCache.prototype.containsKey = function (txn, key) {\n assert(txn !== null, 'Persistence Transaction cannot be null for query cache containsKey');\n var path = encode(key.path);\n var range = IDBKeyRange.bound([path], [immediateSuccessor(path)], \n /*lowerOpen=*/ false, \n /*upperOpen=*/ true);\n var count = 0;\n return documentTargetStore(txn)\n .iterate({\n index: DbTargetDocument.documentTargetsIndex,\n keysOnly: true,\n range: range\n }, function (key, _, control) {\n count++;\n control.done();\n })\n .next(function () { return count > 0; });\n };\n return IndexedDbQueryCache;\n}());\n\n/**\n * Helper to get a typed SimpleDbStore for the queries object store.\n */\nfunction targetsStore(txn) {\n return indexeddb_query_cache_getStore(txn, DbTarget.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the target globals object store.\n */\nfunction globalTargetStore(txn) {\n return indexeddb_query_cache_getStore(txn, DbTargetGlobal.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the document target object store.\n */\nfunction documentTargetStore(txn) {\n return indexeddb_query_cache_getStore(txn, DbTargetDocument.store);\n}\n/**\n * Helper to get a typed SimpleDbStore from a transaction.\n */\nfunction indexeddb_query_cache_getStore(txn, store) {\n if (txn instanceof simple_db_SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}\n\n//# sourceMappingURL=indexeddb_query_cache.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/indexeddb_remote_document_cache.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nvar indexeddb_remote_document_cache_IndexedDbRemoteDocumentCache = /** @class */ (function () {\n function IndexedDbRemoteDocumentCache(serializer) {\n this.serializer = serializer;\n }\n IndexedDbRemoteDocumentCache.prototype.addEntry = function (transaction, maybeDocument) {\n return remoteDocumentsStore(transaction).put(dbKey(maybeDocument.key), this.serializer.toDbRemoteDocument(maybeDocument));\n };\n IndexedDbRemoteDocumentCache.prototype.removeEntry = function (transaction, documentKey) {\n return remoteDocumentsStore(transaction).delete(dbKey(documentKey));\n };\n IndexedDbRemoteDocumentCache.prototype.getEntry = function (transaction, documentKey) {\n var _this = this;\n return remoteDocumentsStore(transaction)\n .get(dbKey(documentKey))\n .next(function (dbRemoteDoc) {\n return dbRemoteDoc\n ? _this.serializer.fromDbRemoteDocument(dbRemoteDoc)\n : null;\n });\n };\n IndexedDbRemoteDocumentCache.prototype.getDocumentsMatchingQuery = function (transaction, query) {\n var _this = this;\n var results = documentMap();\n // Documents are ordered by key, so we can use a prefix scan to narrow down\n // the documents we need to match the query against.\n var startKey = query.path.toArray();\n var range = IDBKeyRange.lowerBound(startKey);\n return remoteDocumentsStore(transaction)\n .iterate({ range: range }, function (key, dbRemoteDoc, control) {\n var maybeDoc = _this.serializer.fromDbRemoteDocument(dbRemoteDoc);\n if (!query.path.isPrefixOf(maybeDoc.key.path)) {\n control.done();\n }\n else if (maybeDoc instanceof document_Document && query.matches(maybeDoc)) {\n results = results.insert(maybeDoc.key, maybeDoc);\n }\n })\n .next(function () { return results; });\n };\n return IndexedDbRemoteDocumentCache;\n}());\n\n/**\n * Helper to get a typed SimpleDbStore for the remoteDocuments object store.\n */\nfunction remoteDocumentsStore(txn) {\n if (txn instanceof simple_db_SimpleDbTransaction) {\n return txn.store(DbRemoteDocument.store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}\nfunction dbKey(docKey) {\n return docKey.path.toArray();\n}\n\n//# sourceMappingURL=indexeddb_remote_document_cache.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/local_serializer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n/** Serializer for values stored in the LocalStore. */\nvar local_serializer_LocalSerializer = /** @class */ (function () {\n function LocalSerializer(remoteSerializer) {\n this.remoteSerializer = remoteSerializer;\n }\n /** Decodes a remote document from storage locally to a Document. */\n LocalSerializer.prototype.fromDbRemoteDocument = function (remoteDoc) {\n if (remoteDoc.document) {\n return this.remoteSerializer.fromDocument(remoteDoc.document);\n }\n else if (remoteDoc.noDocument) {\n var key = document_key_DocumentKey.fromSegments(remoteDoc.noDocument.path);\n var readTime = remoteDoc.noDocument.readTime;\n var timestamp = new timestamp_Timestamp(readTime.seconds, readTime.nanos);\n return new document_NoDocument(key, snapshot_version_SnapshotVersion.fromTimestamp(timestamp));\n }\n else {\n return fail('Unexpected DbRemoteDocument');\n }\n };\n /** Encodes a document for storage locally. */\n LocalSerializer.prototype.toDbRemoteDocument = function (maybeDoc) {\n if (maybeDoc instanceof document_Document) {\n var doc = this.remoteSerializer.toDocument(maybeDoc);\n return new DbRemoteDocument(null, doc);\n }\n else {\n var path = maybeDoc.key.path.toArray();\n var timestamp = maybeDoc.version.toTimestamp();\n var readTime = new DbTimestamp(timestamp.seconds, timestamp.nanos);\n return new DbRemoteDocument(new DbNoDocument(path, readTime), null);\n }\n };\n /** Encodes a batch of mutations into a DbMutationBatch for local storage. */\n LocalSerializer.prototype.toDbMutationBatch = function (userId, batch) {\n var _this = this;\n var serializedMutations = batch.mutations.map(function (m) {\n return _this.remoteSerializer.toMutation(m);\n });\n return new DbMutationBatch(userId, batch.batchId, batch.localWriteTime.toEpochMilliseconds(), serializedMutations);\n };\n /** Decodes a DbMutationBatch into a MutationBatch */\n LocalSerializer.prototype.fromDbMutationBatch = function (dbBatch) {\n var _this = this;\n var mutations = dbBatch.mutations.map(function (m) {\n return _this.remoteSerializer.fromMutation(m);\n });\n var timestamp = timestamp_Timestamp.fromEpochMilliseconds(dbBatch.localWriteTimeMs);\n return new mutation_batch_MutationBatch(dbBatch.batchId, timestamp, mutations);\n };\n /** Decodes a DbTarget into QueryData */\n LocalSerializer.prototype.fromDbTarget = function (dbTarget) {\n var readTime = new timestamp_Timestamp(dbTarget.readTime.seconds, dbTarget.readTime.nanos);\n var version = snapshot_version_SnapshotVersion.fromTimestamp(readTime);\n var query;\n if (isDocumentQuery(dbTarget.query)) {\n query = this.remoteSerializer.fromDocumentsTarget(dbTarget.query);\n }\n else {\n query = this.remoteSerializer.fromQueryTarget(dbTarget.query);\n }\n return new query_data_QueryData(query, dbTarget.targetId, QueryPurpose.Listen, version, dbTarget.resumeToken);\n };\n /** Encodes QueryData into a DbTarget for storage locally. */\n LocalSerializer.prototype.toDbTarget = function (queryData) {\n assert(QueryPurpose.Listen === queryData.purpose, 'Only queries with purpose ' +\n QueryPurpose.Listen +\n ' may be stored, got ' +\n queryData.purpose);\n var timestamp = queryData.snapshotVersion.toTimestamp();\n var dbTimestamp = new DbTimestamp(timestamp.seconds, timestamp.nanos);\n var queryProto;\n if (queryData.query.isDocumentQuery()) {\n queryProto = this.remoteSerializer.toDocumentsTarget(queryData.query);\n }\n else {\n queryProto = this.remoteSerializer.toQueryTarget(queryData.query);\n }\n assert(typeof queryData.resumeToken === 'string', 'Persisting non-string resume token not supported.');\n var resumeToken = queryData.resumeToken;\n // lastListenSequenceNumber is always 0 until we do real GC.\n return new DbTarget(queryData.targetId, queryData.query.canonicalId(), dbTimestamp, resumeToken, 0, queryProto);\n };\n return LocalSerializer;\n}());\n\n/**\n * A helper function for figuring out what kind of query has been stored.\n */\nfunction isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}\n\n//# sourceMappingURL=local_serializer.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/indexeddb_persistence.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\nvar indexeddb_persistence_LOG_TAG = 'IndexedDbPersistence';\n/** If the owner lease is older than 5 seconds, try to take ownership. */\nvar OWNER_LEASE_MAX_AGE_MS = 5000;\n/** Refresh the owner lease every 4 seconds while owner. */\nvar OWNER_LEASE_REFRESH_INTERVAL_MS = 4000;\n/** LocalStorage location to indicate a zombied ownerId (see class comment). */\nvar ZOMBIE_OWNER_LOCALSTORAGE_SUFFIX = 'zombiedOwnerId';\n/** Error when the owner lease cannot be acquired or is lost. */\nvar EXISTING_OWNER_ERROR_MSG = 'There is another tab open with offline' +\n ' persistence enabled. Only one such tab is allowed at a time. The' +\n ' other tab must be closed or persistence must be disabled.';\nvar UNSUPPORTED_PLATFORM_ERROR_MSG = 'This platform is either missing' +\n ' IndexedDB or is known to have an incomplete implementation. Offline' +\n ' persistence has been disabled.';\n/**\n * An IndexedDB-backed instance of Persistence. Data is stored persistently\n * across sessions.\n *\n * Currently the Firestore SDK only supports a single consumer of the database,\n * but browsers obviously support multiple tabs. IndexedDbPersistence ensures a\n * single consumer of the database via an \"owner lease\" stored in the database.\n *\n * On startup, IndexedDbPersistence assigns itself a random \"ownerId\" and writes\n * it to a special \"owner\" object in the database (if no entry exists already or\n * the current entry is expired). This owner lease is then verified inside every\n * transaction to ensure the lease has not been lost.\n *\n * If a tab opts not to acquire the owner lease (because there's an existing\n * non-expired owner) or loses the owner lease, IndexedDbPersistence enters a\n * failed state and all subsequent operations will automatically fail.\n *\n * The current owner regularly refreshes the owner lease with new timestamps to\n * prevent newly-opened tabs from taking over ownership.\n *\n * Additionally there is an optimization so that when a tab is closed, the owner\n * lease is released immediately (this is especially important to make sure that\n * a refreshed tab is able to immediately re-acquire the owner lease).\n * Unfortunately, IndexedDB cannot be reliably used in window.unload since it is\n * an asynchronous API. So in addition to attempting to give up the lease,\n * the owner writes its ownerId to a \"zombiedOwnerId\" entry in LocalStorage\n * which acts as an indicator that another tab should go ahead and take the\n * owner lease immediately regardless of the current lease timestamp.\n */\nvar indexeddb_persistence_IndexedDbPersistence = /** @class */ (function () {\n function IndexedDbPersistence(prefix, serializer) {\n this.ownerId = this.generateOwnerId();\n this.dbName = prefix + IndexedDbPersistence.MAIN_DATABASE;\n this.serializer = new local_serializer_LocalSerializer(serializer);\n this.localStoragePrefix = prefix;\n }\n IndexedDbPersistence.prototype.start = function () {\n var _this = this;\n if (!IndexedDbPersistence.isAvailable()) {\n this.persistenceError = new FirestoreError(Code.UNIMPLEMENTED, UNSUPPORTED_PLATFORM_ERROR_MSG);\n return Promise.reject(this.persistenceError);\n }\n assert(!this.started, 'IndexedDbPersistence double-started!');\n this.started = true;\n return simple_db_SimpleDb.openOrCreate(this.dbName, SCHEMA_VERSION, createOrUpgradeDb)\n .then(function (db) {\n _this.simpleDb = db;\n })\n .then(function () { return _this.tryAcquireOwnerLease(); })\n .then(function () {\n _this.scheduleOwnerLeaseRefreshes();\n _this.attachWindowUnloadHook();\n });\n };\n IndexedDbPersistence.prototype.shutdown = function () {\n var _this = this;\n assert(this.started, 'IndexedDbPersistence shutdown without start!');\n this.started = false;\n this.detachWindowUnloadHook();\n this.stopOwnerLeaseRefreshes();\n return this.releaseOwnerLease().then(function () {\n _this.simpleDb.close();\n });\n };\n IndexedDbPersistence.prototype.getMutationQueue = function (user) {\n return indexeddb_mutation_queue_IndexedDbMutationQueue.forUser(user, this.serializer);\n };\n IndexedDbPersistence.prototype.getQueryCache = function () {\n return new indexeddb_query_cache_IndexedDbQueryCache(this.serializer);\n };\n IndexedDbPersistence.prototype.getRemoteDocumentCache = function () {\n return new indexeddb_remote_document_cache_IndexedDbRemoteDocumentCache(this.serializer);\n };\n IndexedDbPersistence.prototype.runTransaction = function (action, operation) {\n var _this = this;\n if (this.persistenceError) {\n return Promise.reject(this.persistenceError);\n }\n debug(indexeddb_persistence_LOG_TAG, 'Starting transaction:', action);\n // Do all transactions as readwrite against all object stores, since we\n // are the only reader/writer.\n return this.simpleDb.runTransaction('readwrite', ALL_STORES, function (txn) {\n // Verify that we still have the owner lease as part of every transaction.\n return _this.ensureOwnerLease(txn).next(function () { return operation(txn); });\n });\n };\n IndexedDbPersistence.isAvailable = function () {\n return simple_db_SimpleDb.isAvailable();\n };\n /**\n * Generates a string used as a prefix when storing data in IndexedDB and\n * LocalStorage.\n */\n IndexedDbPersistence.buildStoragePrefix = function (databaseInfo) {\n // Use two different prefix formats:\n //\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n //\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var database = databaseInfo.databaseId.projectId;\n if (!databaseInfo.databaseId.isDefaultDatabase) {\n database += '.' + databaseInfo.databaseId.database;\n }\n return 'firestore/' + databaseInfo.persistenceKey + '/' + database + '/';\n };\n /**\n * Acquires the owner lease if there's no valid owner. Else returns a rejected\n * promise.\n */\n IndexedDbPersistence.prototype.tryAcquireOwnerLease = function () {\n var _this = this;\n // NOTE: Don't use this.runTransaction, since it requires us to already\n // have the lease.\n return this.simpleDb.runTransaction('readwrite', [DbOwner.store], function (txn) {\n var store = txn.store(DbOwner.store);\n return store.get('owner').next(function (dbOwner) {\n if (!_this.validOwner(dbOwner)) {\n var newDbOwner = new DbOwner(_this.ownerId, Date.now());\n debug(indexeddb_persistence_LOG_TAG, 'No valid owner. Acquiring owner lease. Current owner:', dbOwner, 'New owner:', newDbOwner);\n return store.put('owner', newDbOwner);\n }\n else {\n debug(indexeddb_persistence_LOG_TAG, 'Valid owner already. Failing. Current owner:', dbOwner);\n _this.persistenceError = new FirestoreError(Code.FAILED_PRECONDITION, EXISTING_OWNER_ERROR_MSG);\n return persistence_promise_PersistencePromise.reject(_this.persistenceError);\n }\n });\n });\n };\n /** Checks the owner lease and deletes it if we are the current owner. */\n IndexedDbPersistence.prototype.releaseOwnerLease = function () {\n var _this = this;\n // NOTE: Don't use this.runTransaction, since it requires us to already\n // have the lease.\n return this.simpleDb.runTransaction('readwrite', [DbOwner.store], function (txn) {\n var store = txn.store(DbOwner.store);\n return store.get('owner').next(function (dbOwner) {\n if (dbOwner !== null && dbOwner.ownerId === _this.ownerId) {\n debug(indexeddb_persistence_LOG_TAG, 'Releasing owner lease.');\n return store.delete('owner');\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n });\n });\n };\n /**\n * Checks the owner lease and returns a rejected promise if we are not the\n * current owner. This should be included in every transaction to guard\n * against losing the owner lease.\n */\n IndexedDbPersistence.prototype.ensureOwnerLease = function (txn) {\n var _this = this;\n var store = txn.store(DbOwner.store);\n return store.get('owner').next(function (dbOwner) {\n if (dbOwner === null || dbOwner.ownerId !== _this.ownerId) {\n _this.persistenceError = new FirestoreError(Code.FAILED_PRECONDITION, EXISTING_OWNER_ERROR_MSG);\n return persistence_promise_PersistencePromise.reject(_this.persistenceError);\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n });\n };\n /**\n * Returns true if the provided owner exists, has a recent timestamp, and\n * isn't zombied.\n *\n * NOTE: To determine if the owner is zombied, this method reads from\n * LocalStorage which could be mildly expensive.\n */\n IndexedDbPersistence.prototype.validOwner = function (dbOwner) {\n var now = Date.now();\n var minAcceptable = now - OWNER_LEASE_MAX_AGE_MS;\n var maxAcceptable = now;\n if (dbOwner === null) {\n return false; // no owner.\n }\n else if (dbOwner.leaseTimestampMs < minAcceptable) {\n return false; // owner lease has expired.\n }\n else if (dbOwner.leaseTimestampMs > maxAcceptable) {\n log_error('Persistence owner-lease is in the future. Discarding.', dbOwner);\n return false;\n }\n else if (dbOwner.ownerId === this.getZombiedOwnerId()) {\n return false; // owner's tab closed.\n }\n else {\n return true;\n }\n };\n /**\n * Schedules a recurring timer to update the owner lease timestamp to prevent\n * other tabs from taking the lease.\n */\n IndexedDbPersistence.prototype.scheduleOwnerLeaseRefreshes = function () {\n var _this = this;\n // NOTE: This doesn't need to be scheduled on the async queue and doing so\n // would increase the chances of us not refreshing on time if the queue is\n // backed up for some reason.\n this.ownerLeaseRefreshHandle = setInterval(function () {\n var txResult = _this.runTransaction('Refresh owner timestamp', function (txn) {\n // NOTE: We don't need to validate the current owner contents, since\n // runTransaction does that automatically.\n var store = txn.store(DbOwner.store);\n return store.put('owner', new DbOwner(_this.ownerId, Date.now()));\n });\n txResult.catch(function (reason) {\n // Probably means we lost the lease. Report the error and stop trying to\n // refresh the lease.\n log_error(reason);\n _this.stopOwnerLeaseRefreshes();\n });\n }, OWNER_LEASE_REFRESH_INTERVAL_MS);\n };\n IndexedDbPersistence.prototype.stopOwnerLeaseRefreshes = function () {\n if (this.ownerLeaseRefreshHandle) {\n clearInterval(this.ownerLeaseRefreshHandle);\n this.ownerLeaseRefreshHandle = null;\n }\n };\n /**\n * Attaches a window.unload handler that will synchronously write our\n * ownerId to a \"zombie owner id\" location in localstorage. This can be used\n * by tabs trying to acquire the lease to determine that the lease should be\n * acquired immediately even if the timestamp is recent. This is particularly\n * important for the refresh case (so the tab correctly re-acquires the owner\n * lease). LocalStorage is used for this rather than IndexedDb because it is\n * a synchronous API and so can be used reliably from an unload handler.\n */\n IndexedDbPersistence.prototype.attachWindowUnloadHook = function () {\n var _this = this;\n this.windowUnloadHandler = function () {\n // Record that we're zombied.\n _this.setZombiedOwnerId(_this.ownerId);\n // Attempt graceful shutdown (including releasing our owner lease), but\n // there's no guarantee it will complete.\n _this.shutdown();\n };\n window.addEventListener('unload', this.windowUnloadHandler);\n };\n IndexedDbPersistence.prototype.detachWindowUnloadHook = function () {\n if (this.windowUnloadHandler) {\n window.removeEventListener('unload', this.windowUnloadHandler);\n this.windowUnloadHandler = null;\n }\n };\n /**\n * Returns any recorded \"zombied owner\" (i.e. a previous owner that became\n * zombied due to their tab closing) from LocalStorage, or null if no such\n * record exists.\n */\n IndexedDbPersistence.prototype.getZombiedOwnerId = function () {\n try {\n var zombiedOwnerId = window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());\n debug(indexeddb_persistence_LOG_TAG, 'Zombied ownerID from LocalStorage:', zombiedOwnerId);\n return zombiedOwnerId;\n }\n catch (e) {\n // Gracefully handle if LocalStorage isn't available / working.\n log_error(indexeddb_persistence_LOG_TAG, 'Failed to get zombie owner id.', e);\n return null;\n }\n };\n /**\n * Records a zombied owner (an owner that had its tab closed) in LocalStorage\n * or, if passed null, deletes any recorded zombied owner.\n */\n IndexedDbPersistence.prototype.setZombiedOwnerId = function (zombieOwnerId) {\n try {\n if (zombieOwnerId === null) {\n window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey());\n }\n else {\n window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(), zombieOwnerId);\n }\n }\n catch (e) {\n // Gracefully handle if LocalStorage isn't available / working.\n log_error(indexeddb_persistence_LOG_TAG, 'Failed to set zombie owner id.', e);\n }\n };\n IndexedDbPersistence.prototype.zombiedOwnerLocalStorageKey = function () {\n return this.localStoragePrefix + ZOMBIE_OWNER_LOCALSTORAGE_SUFFIX;\n };\n IndexedDbPersistence.prototype.generateOwnerId = function () {\n // For convenience, just use an AutoId.\n return misc_AutoId.newId();\n };\n /**\n * The name of the main (and currently only) IndexedDB database. this name is\n * appended to the prefix provided to the IndexedDbPersistence constructor.\n */\n IndexedDbPersistence.MAIN_DATABASE = 'main';\n return IndexedDbPersistence;\n}());\n\n\n//# sourceMappingURL=indexeddb_persistence.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/local_documents_view.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n/**\n * A readonly view of the local state of all documents we're tracking (i.e. we\n * have a cached version in remoteDocumentCache or local mutations for the\n * document). The view is computed by applying the mutations in the\n * MutationQueue to the RemoteDocumentCache.\n */\nvar local_documents_view_LocalDocumentsView = /** @class */ (function () {\n function LocalDocumentsView(remoteDocumentCache, mutationQueue) {\n this.remoteDocumentCache = remoteDocumentCache;\n this.mutationQueue = mutationQueue;\n }\n /**\n * Get the local view of the document identified by `key`.\n *\n * @return Local view of the document or null if we don't have any cached\n * state for it.\n */\n LocalDocumentsView.prototype.getDocument = function (transaction, key) {\n var _this = this;\n return this.remoteDocumentCache\n .getEntry(transaction, key)\n .next(function (remoteDoc) {\n return _this.computeLocalDocument(transaction, key, remoteDoc);\n });\n };\n /**\n * Gets the local view of the documents identified by `keys`.\n *\n * If we don't have cached state for a document in `keys`, a NoDocument will\n * be stored for that key in the resulting set.\n */\n LocalDocumentsView.prototype.getDocuments = function (transaction, keys) {\n var _this = this;\n var promises = [];\n var results = maybeDocumentMap();\n keys.forEach(function (key) {\n promises.push(_this.getDocument(transaction, key).next(function (maybeDoc) {\n // TODO(http://b/32275378): Don't conflate missing / deleted.\n if (!maybeDoc) {\n maybeDoc = new document_NoDocument(key, snapshot_version_SnapshotVersion.forDeletedDoc());\n }\n results = results.insert(key, maybeDoc);\n }));\n });\n return persistence_promise_PersistencePromise.waitFor(promises).next(function () { return results; });\n };\n /** Performs a query against the local view of all documents. */\n LocalDocumentsView.prototype.getDocumentsMatchingQuery = function (transaction, query) {\n if (document_key_DocumentKey.isDocumentKey(query.path)) {\n return this.getDocumentsMatchingDocumentQuery(transaction, query.path);\n }\n else {\n return this.getDocumentsMatchingCollectionQuery(transaction, query);\n }\n };\n LocalDocumentsView.prototype.getDocumentsMatchingDocumentQuery = function (transaction, docPath) {\n // Just do a simple document lookup.\n return this.getDocument(transaction, new document_key_DocumentKey(docPath)).next(function (maybeDoc) {\n var result = documentMap();\n if (maybeDoc instanceof document_Document) {\n result = result.insert(maybeDoc.key, maybeDoc);\n }\n return result;\n });\n };\n LocalDocumentsView.prototype.getDocumentsMatchingCollectionQuery = function (transaction, query) {\n var _this = this;\n // Query the remote documents and overlay mutations.\n // TODO(mikelehen): There may be significant overlap between the mutations\n // affecting these remote documents and the\n // getAllMutationBatchesAffectingQuery() mutations. Consider optimizing.\n var results;\n return this.remoteDocumentCache\n .getDocumentsMatchingQuery(transaction, query)\n .next(function (queryResults) {\n return _this.computeLocalDocuments(transaction, queryResults);\n })\n .next(function (promisedResults) {\n results = promisedResults;\n // Now use the mutation queue to discover any other documents that may\n // match the query after applying mutations.\n return _this.mutationQueue.getAllMutationBatchesAffectingQuery(transaction, query);\n })\n .next(function (matchingMutationBatches) {\n var matchingKeys = documentKeySet();\n for (var _i = 0, matchingMutationBatches_1 = matchingMutationBatches; _i < matchingMutationBatches_1.length; _i++) {\n var batch = matchingMutationBatches_1[_i];\n for (var _a = 0, _b = batch.mutations; _a < _b.length; _a++) {\n var mutation = _b[_a];\n // TODO(mikelehen): PERF: Check if this mutation actually\n // affects the query to reduce work.\n if (!results.get(mutation.key)) {\n matchingKeys = matchingKeys.add(mutation.key);\n }\n }\n }\n // Now add in the results for the matchingKeys.\n var promises = [];\n matchingKeys.forEach(function (key) {\n promises.push(_this.getDocument(transaction, key).next(function (doc) {\n if (doc instanceof document_Document) {\n results = results.insert(doc.key, doc);\n }\n }));\n });\n return persistence_promise_PersistencePromise.waitFor(promises);\n })\n .next(function () {\n // Finally, filter out any documents that don't actually match\n // the query.\n results.forEach(function (key, doc) {\n if (!query.matches(doc)) {\n results = results.remove(key);\n }\n });\n return results;\n });\n };\n /**\n * Takes a remote document and applies local mutations to generate the local\n * view of the document.\n * @param transaction The transaction in which to perform any persistence\n * operations.\n * @param documentKey The key of the document (necessary when remoteDocument\n * is null).\n * @param document The base remote document to apply mutations to or null.\n */\n LocalDocumentsView.prototype.computeLocalDocument = function (transaction, documentKey, document) {\n return this.mutationQueue\n .getAllMutationBatchesAffectingDocumentKey(transaction, documentKey)\n .next(function (batches) {\n for (var _i = 0, batches_1 = batches; _i < batches_1.length; _i++) {\n var batch = batches_1[_i];\n document = batch.applyToLocalView(documentKey, document);\n }\n return document;\n });\n };\n /**\n * Takes a set of remote documents and applies local mutations to generate the\n * local view of the documents.\n * @param transaction The transaction in which to perform any persistence\n * operations.\n * @param documents The base remote documents to apply mutations to.\n * @return The local view of the documents.\n */\n LocalDocumentsView.prototype.computeLocalDocuments = function (transaction, documents) {\n var _this = this;\n var promises = [];\n documents.forEach(function (key, doc) {\n promises.push(_this.computeLocalDocument(transaction, key, doc).next(function (mutatedDoc) {\n if (mutatedDoc instanceof document_Document) {\n documents = documents.insert(mutatedDoc.key, mutatedDoc);\n }\n else if (mutatedDoc instanceof document_NoDocument) {\n documents = documents.remove(mutatedDoc.key);\n }\n else {\n fail('Unknown MaybeDocument: ' + mutatedDoc);\n }\n }));\n });\n return persistence_promise_PersistencePromise.waitFor(promises).next(function () { return documents; });\n };\n return LocalDocumentsView;\n}());\n\n\n//# sourceMappingURL=local_documents_view.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/remote_document_change_buffer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * An in-memory buffer of entries to be written to a RemoteDocumentCache.\n * It can be used to batch up a set of changes to be written to the cache, but\n * additionally supports reading entries back with the `getEntry()` method,\n * falling back to the underlying RemoteDocumentCache if no entry is\n * buffered.\n *\n * NOTE: This class was introduced in iOS to work around a limitation in\n * LevelDB. Given IndexedDb has full transaction support with\n * read-your-own-writes capability, this class is not technically needed, but\n * has been preserved as a convenience and to aid portability.\n */\nvar remote_document_change_buffer_RemoteDocumentChangeBuffer = /** @class */ (function () {\n function RemoteDocumentChangeBuffer(remoteDocumentCache) {\n this.remoteDocumentCache = remoteDocumentCache;\n this.changes = maybeDocumentMap();\n }\n /** Buffers a `RemoteDocumentCache.addEntry()` call. */\n RemoteDocumentChangeBuffer.prototype.addEntry = function (maybeDocument) {\n var changes = this.assertChanges();\n this.changes = changes.insert(maybeDocument.key, maybeDocument);\n };\n // NOTE: removeEntry() is not presently necessary and so is omitted.\n /**\n * Looks up an entry in the cache. The buffered changes will first be checked,\n * and if no buffered change applies, this will forward to\n * `RemoteDocumentCache.getEntry()`.\n *\n * @param transaction The transaction in which to perform any persistence\n * operations.\n * @param documentKey The key of the entry to look up.\n * @return The cached Document or NoDocument entry, or null if we have nothing\n * cached.\n */\n RemoteDocumentChangeBuffer.prototype.getEntry = function (transaction, documentKey) {\n var changes = this.assertChanges();\n var bufferedEntry = changes.get(documentKey);\n if (bufferedEntry) {\n return persistence_promise_PersistencePromise.resolve(bufferedEntry);\n }\n else {\n return this.remoteDocumentCache.getEntry(transaction, documentKey);\n }\n };\n /**\n * Applies buffered changes to the underlying RemoteDocumentCache, using\n * the provided transaction.\n */\n RemoteDocumentChangeBuffer.prototype.apply = function (transaction) {\n var _this = this;\n var changes = this.assertChanges();\n var promises = [];\n changes.forEach(function (key, maybeDoc) {\n promises.push(_this.remoteDocumentCache.addEntry(transaction, maybeDoc));\n });\n // We should not be used to buffer any more changes.\n this.changes = null;\n return persistence_promise_PersistencePromise.waitFor(promises);\n };\n /** Helper to assert this.changes is not null and return it. */\n RemoteDocumentChangeBuffer.prototype.assertChanges = function () {\n assert(this.changes !== null, 'Changes have already been applied.');\n return this.changes;\n };\n return RemoteDocumentChangeBuffer;\n}());\n\n\n//# sourceMappingURL=remote_document_change_buffer.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/local_store.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar local_store_LOG_TAG = 'LocalStore';\n/**\n * Local storage in the Firestore client. Coordinates persistence components\n * like the mutation queue and remote document cache to present a\n * latency-compensated view of stored data.\n *\n * The LocalStore is responsible for accepting mutations from the Sync Engine.\n * Writes from the client are put into a queue as provisional Mutations until\n * they are processed by the RemoteStore and confirmed as having been written\n * to the server.\n *\n * The local store provides the local version of documents that have been\n * modified locally. It maintains the constraint:\n *\n * LocalDocument = RemoteDocument + Active(LocalMutations)\n *\n * (Active mutations are those that are enqueued and have not been previously\n * acknowledged or rejected).\n *\n * The RemoteDocument (\"ground truth\") state is provided via the\n * applyChangeBatch method. It will be some version of a server-provided\n * document OR will be a server-provided document PLUS acknowledged mutations:\n *\n * RemoteDocument' = RemoteDocument + Acknowledged(LocalMutations)\n *\n * Note that this \"dirty\" version of a RemoteDocument will not be identical to a\n * server base version, since it has LocalMutations added to it pending getting\n * an authoritative copy from the server.\n *\n * Since LocalMutations can be rejected by the server, we have to be able to\n * revert a LocalMutation that has already been applied to the LocalDocument\n * (typically done by replaying all remaining LocalMutations to the\n * RemoteDocument to re-apply).\n *\n * The LocalStore is responsible for the garbage collection of the documents it\n * contains. For now, it every doc referenced by a view, the mutation queue, or\n * the RemoteStore.\n *\n * It also maintains the persistence of mapping queries to resume tokens and\n * target ids. It needs to know this data about queries to properly know what\n * docs it would be allowed to garbage collect.\n *\n * The LocalStore must be able to efficiently execute queries against its local\n * cache of the documents, to provide the initial set of results before any\n * remote changes have been received.\n *\n * Note: In TypeScript, most methods return Promises since the implementation\n * may rely on fetching data from IndexedDB which is async.\n * These Promises will only be rejected on an I/O error or other internal\n * (unexpected) failure (e.g. failed assert) and always represent an\n * unrecoverable error (should be caught / reported by the async_queue).\n */\nvar local_store_LocalStore = /** @class */ (function () {\n function LocalStore(\n /** Manages our in-memory or durable persistence. */\n persistence, initialUser, \n /**\n * The garbage collector collects documents that should no longer be\n * cached (e.g. if they are no longer retained by the above reference sets\n * and the garbage collector is performing eager collection).\n */\n garbageCollector) {\n this.persistence = persistence;\n this.garbageCollector = garbageCollector;\n /**\n * The set of document references maintained by any local views.\n */\n this.localViewReferences = new reference_set_ReferenceSet();\n /** Maps a targetID to data about its query. */\n this.targetIds = {};\n /** Used to generate targetIDs for queries tracked locally. */\n this.targetIdGenerator = TargetIdGenerator.forLocalStore();\n /**\n * A heldBatchResult is a mutation batch result (from a write acknowledgement)\n * that arrived before the watch stream got notified of a snapshot that\n * includes the write. So we \"hold\" it until the watch stream catches up. It\n * ensures that the local write remains visible (latency compensation) and\n * doesn't temporarily appear reverted because the watch stream is slower than\n * the write stream and so wasn't reflecting it.\n *\n * NOTE: Eventually we want to move this functionality into the remote store.\n */\n this.heldBatchResults = [];\n this.mutationQueue = persistence.getMutationQueue(initialUser);\n this.remoteDocuments = persistence.getRemoteDocumentCache();\n this.queryCache = persistence.getQueryCache();\n this.localDocuments = new local_documents_view_LocalDocumentsView(this.remoteDocuments, this.mutationQueue);\n this.garbageCollector.addGarbageSource(this.localViewReferences);\n this.garbageCollector.addGarbageSource(this.queryCache);\n this.garbageCollector.addGarbageSource(this.mutationQueue);\n }\n /** Performs any initial startup actions required by the local store. */\n LocalStore.prototype.start = function () {\n var _this = this;\n return this.persistence.runTransaction('Start LocalStore', function (txn) {\n return _this.startMutationQueue(txn).next(function () { return _this.startQueryCache(txn); });\n });\n };\n /**\n * Tells the LocalStore that the currently authenticated user has changed.\n *\n * In response the local store switches the mutation queue to the new user and\n * returns any resulting document changes.\n */\n LocalStore.prototype.handleUserChange = function (user) {\n var _this = this;\n return this.persistence.runTransaction('Handle user change', function (txn) {\n // Swap out the mutation queue, grabbing the pending mutation batches\n // before and after.\n var oldBatches;\n return _this.mutationQueue\n .getAllMutationBatches(txn)\n .next(function (promisedOldBatches) {\n oldBatches = promisedOldBatches;\n _this.garbageCollector.removeGarbageSource(_this.mutationQueue);\n _this.mutationQueue = _this.persistence.getMutationQueue(user);\n _this.garbageCollector.addGarbageSource(_this.mutationQueue);\n return _this.startMutationQueue(txn);\n })\n .next(function () {\n // Recreate our LocalDocumentsView using the new\n // MutationQueue.\n _this.localDocuments = new local_documents_view_LocalDocumentsView(_this.remoteDocuments, _this.mutationQueue);\n return _this.mutationQueue.getAllMutationBatches(txn);\n })\n .next(function (newBatches) {\n // Union the old/new changed keys.\n var changedKeys = documentKeySet();\n for (var _i = 0, _a = [oldBatches, newBatches]; _i < _a.length; _i++) {\n var batches = _a[_i];\n for (var _b = 0, batches_1 = batches; _b < batches_1.length; _b++) {\n var batch = batches_1[_b];\n for (var _c = 0, _d = batch.mutations; _c < _d.length; _c++) {\n var mutation = _d[_c];\n changedKeys = changedKeys.add(mutation.key);\n }\n }\n }\n // Return the set of all (potentially) changed documents as the\n // result of the user change.\n return _this.localDocuments.getDocuments(txn, changedKeys);\n });\n });\n };\n LocalStore.prototype.startQueryCache = function (txn) {\n var _this = this;\n return this.queryCache.start(txn).next(function () {\n var targetId = _this.queryCache.getHighestTargetId();\n _this.targetIdGenerator = TargetIdGenerator.forLocalStore(targetId);\n });\n };\n LocalStore.prototype.startMutationQueue = function (txn) {\n var _this = this;\n return this.mutationQueue\n .start(txn)\n .next(function () {\n // If we have any leftover mutation batch results from a prior run,\n // just drop them.\n // TODO(http://b/33446471): We probably need to repopulate\n // heldBatchResults or similar instead, but that is not\n // straightforward since we're not persisting the write ack versions.\n _this.heldBatchResults = [];\n return _this.mutationQueue.getHighestAcknowledgedBatchId(txn);\n })\n .next(function (highestAck) {\n // TODO(mikelehen): This is the only usage of\n // getAllMutationBatchesThroughBatchId(). Consider removing it in\n // favor of a getAcknowledgedBatches() method.\n if (highestAck !== BATCHID_UNKNOWN) {\n return _this.mutationQueue.getAllMutationBatchesThroughBatchId(txn, highestAck);\n }\n else {\n return persistence_promise_PersistencePromise.resolve([]);\n }\n })\n .next(function (ackedBatches) {\n if (ackedBatches.length > 0) {\n return _this.mutationQueue.removeMutationBatches(txn, ackedBatches);\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n });\n };\n /* Accept locally generated Mutations and commit them to storage. */\n LocalStore.prototype.localWrite = function (mutations) {\n var _this = this;\n return this.persistence.runTransaction('Locally write mutations', function (txn) {\n var batch;\n var localWriteTime = timestamp_Timestamp.now();\n return _this.mutationQueue\n .addMutationBatch(txn, localWriteTime, mutations)\n .next(function (promisedBatch) {\n batch = promisedBatch;\n // TODO(koss): This is doing an N^2 update by replaying ALL the\n // mutations on each document (instead of just the ones added) in\n // this batch.\n var keys = batch.keys();\n return _this.localDocuments.getDocuments(txn, keys);\n })\n .next(function (changedDocuments) {\n return { batchId: batch.batchId, changes: changedDocuments };\n });\n });\n };\n /**\n * Acknowledge the given batch.\n *\n * On the happy path when a batch is acknowledged, the local store will\n *\n * + remove the batch from the mutation queue;\n * + apply the changes to the remote document cache;\n * + recalculate the latency compensated view implied by those changes (there\n * may be mutations in the queue that affect the documents but haven't been\n * acknowledged yet); and\n * + give the changed documents back the sync engine\n *\n * @returns The resulting (modified) documents.\n */\n LocalStore.prototype.acknowledgeBatch = function (batchResult) {\n var _this = this;\n return this.persistence.runTransaction('Acknowledge batch', function (txn) {\n var affected;\n return _this.mutationQueue\n .acknowledgeBatch(txn, batchResult.batch, batchResult.streamToken)\n .next(function () {\n if (_this.shouldHoldBatchResult(batchResult.commitVersion)) {\n _this.heldBatchResults.push(batchResult);\n affected = documentKeySet();\n return persistence_promise_PersistencePromise.resolve();\n }\n else {\n var documentBuffer_1 = new remote_document_change_buffer_RemoteDocumentChangeBuffer(_this.remoteDocuments);\n return _this.releaseBatchResults(txn, [batchResult], documentBuffer_1).next(function (promisedAffectedKeys) {\n affected = promisedAffectedKeys;\n return documentBuffer_1.apply(txn);\n });\n }\n })\n .next(function () {\n return _this.mutationQueue.performConsistencyCheck(txn);\n })\n .next(function () {\n return _this.localDocuments.getDocuments(txn, affected);\n });\n });\n };\n /**\n * Remove mutations from the MutationQueue for the specified batch;\n * LocalDocuments will be recalculated.\n *\n * @returns The resulting modified documents.\n */\n LocalStore.prototype.rejectBatch = function (batchId) {\n var _this = this;\n return this.persistence.runTransaction('Reject batch', function (txn) {\n var toReject;\n var affectedKeys;\n return _this.mutationQueue\n .lookupMutationBatch(txn, batchId)\n .next(function (promisedToReject) {\n assert(promisedToReject != null, 'Attempt to reject nonexistent batch!');\n toReject = promisedToReject;\n return _this.mutationQueue\n .getHighestAcknowledgedBatchId(txn)\n .next(function (lastAcked) {\n assert(batchId > lastAcked, \"Acknowledged batches can't be rejected.\");\n return toReject;\n });\n })\n .next(function () {\n return _this.removeMutationBatch(txn, toReject);\n })\n .next(function (promisedAffectedKeys) {\n affectedKeys = promisedAffectedKeys;\n return _this.mutationQueue.performConsistencyCheck(txn);\n })\n .next(function () {\n return _this.localDocuments.getDocuments(txn, affectedKeys);\n });\n });\n };\n /** Returns the last recorded stream token for the current user. */\n LocalStore.prototype.getLastStreamToken = function () {\n var _this = this;\n return this.persistence.runTransaction('Get last stream token', function (txn) {\n return _this.mutationQueue.getLastStreamToken(txn);\n });\n };\n /**\n * Sets the stream token for the current user without acknowledging any\n * mutation batch. This is usually only useful after a stream handshake or in\n * response to an error that requires clearing the stream token.\n */\n LocalStore.prototype.setLastStreamToken = function (streamToken) {\n var _this = this;\n return this.persistence.runTransaction('Set last stream token', function (txn) {\n return _this.mutationQueue.setLastStreamToken(txn, streamToken);\n });\n };\n /**\n * Returns the last consistent snapshot processed (used by the RemoteStore to\n * determine whether to buffer incoming snapshots from the backend).\n */\n LocalStore.prototype.getLastRemoteSnapshotVersion = function () {\n return this.queryCache.getLastRemoteSnapshotVersion();\n };\n /**\n * Update the \"ground-state\" (remote) documents. We assume that the remote\n * event reflects any write batches that have been acknowledged or rejected\n * (i.e. we do not re-apply local mutations to updates from this event).\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\n LocalStore.prototype.applyRemoteEvent = function (remoteEvent) {\n var _this = this;\n var documentBuffer = new remote_document_change_buffer_RemoteDocumentChangeBuffer(this.remoteDocuments);\n return this.persistence.runTransaction('Apply remote event', function (txn) {\n var promises = [];\n forEachNumber(remoteEvent.targetChanges, function (targetId, change) {\n // Do not ref/unref unassigned targetIds - it may lead to leaks.\n var queryData = _this.targetIds[targetId];\n if (!queryData)\n return;\n var mapping = change.mapping;\n if (mapping) {\n // First make sure that all references are deleted\n if (mapping instanceof ResetMapping) {\n promises.push(_this.queryCache\n .removeMatchingKeysForTargetId(txn, targetId)\n .next(function () {\n return _this.queryCache.addMatchingKeys(txn, mapping.documents, targetId);\n }));\n }\n else if (mapping instanceof UpdateMapping) {\n promises.push(_this.queryCache\n .removeMatchingKeys(txn, mapping.removedDocuments, targetId)\n .next(function () {\n return _this.queryCache.addMatchingKeys(txn, mapping.addedDocuments, targetId);\n }));\n }\n else {\n return fail('Unknown mapping type: ' + JSON.stringify(mapping));\n }\n }\n // Update the resume token if the change includes one. Don't clear\n // any preexisting value.\n var resumeToken = change.resumeToken;\n if (resumeToken.length > 0) {\n queryData = queryData.update({\n resumeToken: resumeToken,\n snapshotVersion: change.snapshotVersion\n });\n _this.targetIds[targetId] = queryData;\n promises.push(_this.queryCache.addQueryData(txn, queryData));\n }\n });\n var changedDocKeys = documentKeySet();\n remoteEvent.documentUpdates.forEach(function (key, doc) {\n changedDocKeys = changedDocKeys.add(key);\n promises.push(documentBuffer.getEntry(txn, key).next(function (existingDoc) {\n // Make sure we don't apply an old document version to the remote\n // cache, though we make an exception for SnapshotVersion.MIN which\n // can happen for manufactured events (e.g. in the case of a limbo\n // document resolution failing).\n if (existingDoc == null ||\n doc.version.equals(snapshot_version_SnapshotVersion.MIN) ||\n doc.version.compareTo(existingDoc.version) >= 0) {\n documentBuffer.addEntry(doc);\n }\n else {\n debug(local_store_LOG_TAG, 'Ignoring outdated watch update for ', key, '. Current version:', existingDoc.version, ' Watch version:', doc.version);\n }\n // The document might be garbage because it was unreferenced by\n // everything. Make sure to mark it as garbage if it is...\n _this.garbageCollector.addPotentialGarbageKey(key);\n }));\n });\n // HACK: The only reason we allow a null snapshot version is so that we\n // can synthesize remote events when we get permission denied errors while\n // trying to resolve the state of a locally cached document that is in\n // limbo.\n var lastRemoteVersion = _this.queryCache.getLastRemoteSnapshotVersion();\n var remoteVersion = remoteEvent.snapshotVersion;\n if (!remoteVersion.equals(snapshot_version_SnapshotVersion.MIN)) {\n assert(remoteVersion.compareTo(lastRemoteVersion) >= 0, 'Watch stream reverted to previous snapshot?? ' +\n remoteVersion +\n ' < ' +\n lastRemoteVersion);\n promises.push(_this.queryCache.setLastRemoteSnapshotVersion(txn, remoteVersion));\n }\n var releasedWriteKeys;\n return persistence_promise_PersistencePromise.waitFor(promises)\n .next(function () { return _this.releaseHeldBatchResults(txn, documentBuffer); })\n .next(function (promisedReleasedWriteKeys) {\n releasedWriteKeys = promisedReleasedWriteKeys;\n return documentBuffer.apply(txn);\n })\n .next(function () {\n return _this.localDocuments.getDocuments(txn, changedDocKeys.unionWith(releasedWriteKeys));\n });\n });\n };\n /**\n * Notify local store of the changed views to locally pin documents.\n */\n LocalStore.prototype.notifyLocalViewChanges = function (viewChanges) {\n var _this = this;\n return this.persistence.runTransaction('Notify local view changes', function (txn) {\n var promises = [];\n var _loop_1 = function (view) {\n promises.push(_this.queryCache\n .getQueryData(txn, view.query)\n .next(function (queryData) {\n assert(queryData !== null, 'Local view changes contain unallocated query.');\n var targetId = queryData.targetId;\n _this.localViewReferences.addReferences(view.addedKeys, targetId);\n _this.localViewReferences.removeReferences(view.removedKeys, targetId);\n }));\n };\n for (var _i = 0, viewChanges_1 = viewChanges; _i < viewChanges_1.length; _i++) {\n var view = viewChanges_1[_i];\n _loop_1(view);\n }\n return persistence_promise_PersistencePromise.waitFor(promises);\n });\n };\n /**\n * Gets the mutation batch after the passed in batchId in the mutation queue\n * or null if empty.\n * @param afterBatchId If provided, the batch to search after.\n * @returns The next mutation or null if there wasn't one.\n */\n LocalStore.prototype.nextMutationBatch = function (afterBatchId) {\n var _this = this;\n return this.persistence.runTransaction('Get next mutation batch', function (txn) {\n if (afterBatchId === undefined) {\n afterBatchId = BATCHID_UNKNOWN;\n }\n return _this.mutationQueue.getNextMutationBatchAfterBatchId(txn, afterBatchId);\n });\n };\n /**\n * Read the current value of a Document with a given key or null if not\n * found - used for testing.\n */\n LocalStore.prototype.readDocument = function (key) {\n var _this = this;\n return this.persistence.runTransaction('read document', function (txn) {\n return _this.localDocuments.getDocument(txn, key);\n });\n };\n /**\n * Assigns the given query an internal ID so that its results can be pinned so\n * they don't get GC'd. A query must be allocated in the local store before\n * the store can be used to manage its view.\n */\n LocalStore.prototype.allocateQuery = function (query) {\n var _this = this;\n return this.persistence.runTransaction('Allocate query', function (txn) {\n var queryData;\n return _this.queryCache\n .getQueryData(txn, query)\n .next(function (cached) {\n if (cached) {\n // This query has been listened to previously, so reuse the\n // previous targetID.\n // TODO(mcg): freshen last accessed date?\n queryData = cached;\n return persistence_promise_PersistencePromise.resolve();\n }\n else {\n var targetId = _this.targetIdGenerator.next();\n queryData = new query_data_QueryData(query, targetId, QueryPurpose.Listen);\n return _this.queryCache.addQueryData(txn, queryData);\n }\n })\n .next(function () {\n assert(!_this.targetIds[queryData.targetId], 'Tried to allocate an already allocated query: ' + query);\n _this.targetIds[queryData.targetId] = queryData;\n return queryData;\n });\n });\n };\n /** Unpin all the documents associated with the given query. */\n LocalStore.prototype.releaseQuery = function (query) {\n var _this = this;\n return this.persistence.runTransaction('Release query', function (txn) {\n return _this.queryCache\n .getQueryData(txn, query)\n .next(function (queryData) {\n assert(queryData != null, 'Tried to release nonexistent query: ' + query);\n _this.localViewReferences.removeReferencesForId(queryData.targetId);\n delete _this.targetIds[queryData.targetId];\n if (_this.garbageCollector.isEager) {\n return _this.queryCache.removeQueryData(txn, queryData);\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n })\n .next(function () {\n // If this was the last watch target, then we won't get any more\n // watch snapshots, so we should release any held batch results.\n if (isEmpty(_this.targetIds)) {\n var documentBuffer_2 = new remote_document_change_buffer_RemoteDocumentChangeBuffer(_this.remoteDocuments);\n return _this.releaseHeldBatchResults(txn, documentBuffer_2).next(function () {\n documentBuffer_2.apply(txn);\n });\n }\n else {\n return persistence_promise_PersistencePromise.resolve();\n }\n });\n });\n };\n /**\n * Runs the specified query against all the documents in the local store and\n * returns the results.\n */\n LocalStore.prototype.executeQuery = function (query) {\n var _this = this;\n return this.persistence.runTransaction('Execute query', function (txn) {\n return _this.localDocuments.getDocumentsMatchingQuery(txn, query);\n });\n };\n /**\n * Returns the keys of the documents that are associated with the given\n * target id in the remote table.\n */\n LocalStore.prototype.remoteDocumentKeys = function (targetId) {\n var _this = this;\n return this.persistence.runTransaction('Remote document keys', function (txn) {\n return _this.queryCache.getMatchingKeysForTargetId(txn, targetId);\n });\n };\n /**\n * Collect garbage if necessary.\n * Should be called periodically by Sync Engine to recover resources. The\n * implementation must guarantee that GC won't happen in other places than\n * this method call.\n */\n LocalStore.prototype.collectGarbage = function () {\n var _this = this;\n // Call collectGarbage regardless of whether isGCEnabled so the referenceSet\n // doesn't continue to accumulate the garbage keys.\n return this.persistence.runTransaction('Garbage collection', function (txn) {\n return _this.garbageCollector.collectGarbage(txn).next(function (garbage) {\n var promises = [];\n garbage.forEach(function (key) {\n promises.push(_this.remoteDocuments.removeEntry(txn, key));\n });\n return persistence_promise_PersistencePromise.waitFor(promises);\n });\n });\n };\n LocalStore.prototype.releaseHeldBatchResults = function (txn, documentBuffer) {\n var toRelease = [];\n for (var _i = 0, _a = this.heldBatchResults; _i < _a.length; _i++) {\n var batchResult = _a[_i];\n if (!this.isRemoteUpToVersion(batchResult.commitVersion)) {\n break;\n }\n toRelease.push(batchResult);\n }\n if (toRelease.length === 0) {\n return persistence_promise_PersistencePromise.resolve(documentKeySet());\n }\n else {\n this.heldBatchResults.splice(0, toRelease.length);\n return this.releaseBatchResults(txn, toRelease, documentBuffer);\n }\n };\n LocalStore.prototype.isRemoteUpToVersion = function (version) {\n // If there are no watch targets, then we won't get remote snapshots, and\n // we are always \"up-to-date.\"\n var lastRemoteVersion = this.queryCache.getLastRemoteSnapshotVersion();\n return (version.compareTo(lastRemoteVersion) <= 0 ||\n isEmpty(this.targetIds));\n };\n LocalStore.prototype.shouldHoldBatchResult = function (version) {\n // Check if watcher isn't up to date or prior results are already held.\n return (!this.isRemoteUpToVersion(version) || this.heldBatchResults.length > 0);\n };\n LocalStore.prototype.releaseBatchResults = function (txn, batchResults, documentBuffer) {\n var _this = this;\n var promiseChain = persistence_promise_PersistencePromise.resolve();\n var _loop_2 = function (batchResult) {\n promiseChain = promiseChain.next(function () {\n return _this.applyWriteToRemoteDocuments(txn, batchResult, documentBuffer);\n });\n };\n for (var _i = 0, batchResults_1 = batchResults; _i < batchResults_1.length; _i++) {\n var batchResult = batchResults_1[_i];\n _loop_2(batchResult);\n }\n return promiseChain.next(function () {\n return _this.removeMutationBatches(txn, batchResults.map(function (result) { return result.batch; }));\n });\n };\n LocalStore.prototype.removeMutationBatch = function (txn, batch) {\n return this.removeMutationBatches(txn, [batch]);\n };\n /** Removes all the mutation batches named in the given array. */\n LocalStore.prototype.removeMutationBatches = function (txn, batches) {\n var affectedDocs = documentKeySet();\n for (var _i = 0, batches_2 = batches; _i < batches_2.length; _i++) {\n var batch = batches_2[_i];\n for (var _a = 0, _b = batch.mutations; _a < _b.length; _a++) {\n var mutation = _b[_a];\n var key = mutation.key;\n affectedDocs = affectedDocs.add(key);\n }\n }\n return this.mutationQueue\n .removeMutationBatches(txn, batches)\n .next(function () { return affectedDocs; });\n };\n LocalStore.prototype.applyWriteToRemoteDocuments = function (txn, batchResult, documentBuffer) {\n var batch = batchResult.batch;\n var docKeys = batch.keys();\n var promiseChain = persistence_promise_PersistencePromise.resolve();\n docKeys.forEach(function (docKey) {\n promiseChain = promiseChain\n .next(function () {\n return documentBuffer.getEntry(txn, docKey);\n })\n .next(function (remoteDoc) {\n var doc = remoteDoc;\n var ackVersion = batchResult.docVersions.get(docKey);\n assert(ackVersion !== null, 'ackVersions should contain every doc in the write.');\n if (!doc || doc.version.compareTo(ackVersion) < 0) {\n doc = batch.applyToRemoteDocument(docKey, doc, batchResult);\n if (!doc) {\n assert(!remoteDoc, 'Mutation batch ' +\n batch +\n ' applied to document ' +\n remoteDoc +\n ' resulted in null');\n }\n else {\n documentBuffer.addEntry(doc);\n }\n }\n });\n });\n return promiseChain;\n };\n return LocalStore;\n}());\n\n\n//# sourceMappingURL=local_store.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/memory_mutation_queue.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\nvar memory_mutation_queue_MemoryMutationQueue = /** @class */ (function () {\n function MemoryMutationQueue() {\n /**\n * The set of all mutations that have been sent but not yet been applied to\n * the backend.\n */\n this.mutationQueue = [];\n /** Next value to use when assigning sequential IDs to each mutation batch. */\n this.nextBatchId = 1;\n /** The highest acknowledged mutation in the queue. */\n this.highestAcknowledgedBatchId = BATCHID_UNKNOWN;\n /** The last received stream token from the server, used to acknowledge which\n * responses the client has processed. Stream tokens are opaque checkpoint\n * markers whose only real value is their inclusion in the next request.\n */\n this.lastStreamToken = emptyByteString();\n /** The garbage collector to notify about potential garbage keys. */\n this.garbageCollector = null;\n /** An ordered mapping between documents and the mutations batch IDs. */\n this.batchesByDocumentKey = new sorted_set_SortedSet(reference_set_DocReference.compareByKey);\n }\n MemoryMutationQueue.prototype.start = function (transaction) {\n // NOTE: The queue may be shutdown / started multiple times, since we\n // maintain the queue for the duration of the app session in case a user\n // logs out / back in. To behave like the LevelDB-backed MutationQueue (and\n // accommodate tests that expect as much), we reset nextBatchId and\n // highestAcknowledgedBatchId if the queue is empty.\n if (this.mutationQueue.length === 0) {\n this.nextBatchId = 1;\n this.highestAcknowledgedBatchId = BATCHID_UNKNOWN;\n }\n assert(this.highestAcknowledgedBatchId < this.nextBatchId, 'highestAcknowledgedBatchId must be less than the nextBatchId');\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.checkEmpty = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.mutationQueue.length === 0);\n };\n MemoryMutationQueue.prototype.getNextBatchId = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.nextBatchId);\n };\n MemoryMutationQueue.prototype.getHighestAcknowledgedBatchId = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.highestAcknowledgedBatchId);\n };\n MemoryMutationQueue.prototype.acknowledgeBatch = function (transaction, batch, streamToken) {\n var batchId = batch.batchId;\n assert(batchId > this.highestAcknowledgedBatchId, 'Mutation batchIDs must be acknowledged in order');\n var batchIndex = this.indexOfExistingBatchId(batchId, 'acknowledged');\n // Verify that the batch in the queue is the one to be acknowledged.\n var check = this.mutationQueue[batchIndex];\n assert(batchId === check.batchId, 'Queue ordering failure: expected batch ' +\n batchId +\n ', got batch ' +\n check.batchId);\n assert(!check.isTombstone(), \"Can't acknowledge a previously removed batch\");\n this.highestAcknowledgedBatchId = batchId;\n this.lastStreamToken = streamToken;\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.getLastStreamToken = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.lastStreamToken);\n };\n MemoryMutationQueue.prototype.setLastStreamToken = function (transaction, streamToken) {\n this.lastStreamToken = streamToken;\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.addMutationBatch = function (transaction, localWriteTime, mutations) {\n assert(mutations.length !== 0, 'Mutation batches should not be empty');\n var batchId = this.nextBatchId;\n this.nextBatchId++;\n if (this.mutationQueue.length > 0) {\n var prior = this.mutationQueue[this.mutationQueue.length - 1];\n assert(prior.batchId < batchId, 'Mutation batchIDs must be monotonically increasing order');\n }\n var batch = new mutation_batch_MutationBatch(batchId, localWriteTime, mutations);\n this.mutationQueue.push(batch);\n // Track references by document key.\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.batchesByDocumentKey = this.batchesByDocumentKey.add(new reference_set_DocReference(mutation.key, batchId));\n }\n return persistence_promise_PersistencePromise.resolve(batch);\n };\n MemoryMutationQueue.prototype.lookupMutationBatch = function (transaction, batchId) {\n return persistence_promise_PersistencePromise.resolve(this.findMutationBatch(batchId));\n };\n MemoryMutationQueue.prototype.getNextMutationBatchAfterBatchId = function (transaction, batchId) {\n var size = this.mutationQueue.length;\n // All batches with batchId <= this.highestAcknowledgedBatchId have been\n // acknowledged so the first unacknowledged batch after batchID will have a\n // batchID larger than both of these values.\n batchId = Math.max(batchId + 1, this.highestAcknowledgedBatchId);\n // The requested batchId may still be out of range so normalize it to the\n // start of the queue.\n var rawIndex = this.indexOfBatchId(batchId);\n var index = rawIndex < 0 ? 0 : rawIndex;\n // Finally return the first non-tombstone batch.\n for (; index < size; index++) {\n var batch = this.mutationQueue[index];\n if (!batch.isTombstone()) {\n return persistence_promise_PersistencePromise.resolve(batch);\n }\n }\n return persistence_promise_PersistencePromise.resolve(null);\n };\n MemoryMutationQueue.prototype.getAllMutationBatches = function (transaction) {\n return persistence_promise_PersistencePromise.resolve(this.getAllLiveMutationBatchesBeforeIndex(this.mutationQueue.length));\n };\n MemoryMutationQueue.prototype.getAllMutationBatchesThroughBatchId = function (transaction, batchId) {\n var count = this.mutationQueue.length;\n var endIndex = this.indexOfBatchId(batchId);\n if (endIndex < 0) {\n endIndex = 0;\n }\n else if (endIndex >= count) {\n endIndex = count;\n }\n else {\n // The endIndex is in the queue so increment to pull everything in the\n // queue including it.\n endIndex++;\n }\n return persistence_promise_PersistencePromise.resolve(this.getAllLiveMutationBatchesBeforeIndex(endIndex));\n };\n MemoryMutationQueue.prototype.getAllMutationBatchesAffectingDocumentKey = function (transaction, documentKey) {\n var _this = this;\n var start = new reference_set_DocReference(documentKey, 0);\n var end = new reference_set_DocReference(documentKey, Number.POSITIVE_INFINITY);\n var result = [];\n this.batchesByDocumentKey.forEachInRange([start, end], function (ref) {\n assert(documentKey.equals(ref.key), \"Should only iterate over a single key's batches\");\n var batch = _this.findMutationBatch(ref.targetOrBatchId);\n assert(batch !== null, 'Batches in the index must exist in the main table');\n result.push(batch);\n });\n return persistence_promise_PersistencePromise.resolve(result);\n };\n MemoryMutationQueue.prototype.getAllMutationBatchesAffectingQuery = function (transaction, query) {\n var _this = this;\n // Use the query path as a prefix for testing if a document matches the\n // query.\n var prefix = query.path;\n var immediateChildrenPathLength = prefix.length + 1;\n // Construct a document reference for actually scanning the index. Unlike\n // the prefix the document key in this reference must have an even number of\n // segments. The empty segment can be used a suffix of the query path\n // because it precedes all other segments in an ordered traversal.\n var startPath = prefix;\n if (!document_key_DocumentKey.isDocumentKey(startPath)) {\n startPath = startPath.child('');\n }\n var start = new reference_set_DocReference(new document_key_DocumentKey(startPath), 0);\n // Find unique batchIDs referenced by all documents potentially matching the\n // query.\n var uniqueBatchIDs = new sorted_set_SortedSet(primitiveComparator);\n this.batchesByDocumentKey.forEachWhile(function (ref) {\n var rowKeyPath = ref.key.path;\n if (!prefix.isPrefixOf(rowKeyPath)) {\n return false;\n }\n else {\n // Rows with document keys more than one segment longer than the query\n // path can't be matches. For example, a query on 'rooms' can't match\n // the document /rooms/abc/messages/xyx.\n // TODO(mcg): we'll need a different scanner when we implement\n // ancestor queries.\n if (rowKeyPath.length === immediateChildrenPathLength) {\n uniqueBatchIDs = uniqueBatchIDs.add(ref.targetOrBatchId);\n }\n return true;\n }\n }, start);\n // Construct an array of matching batches, sorted by batchID to ensure that\n // multiple mutations affecting the same document key are applied in order.\n var result = [];\n uniqueBatchIDs.forEach(function (batchId) {\n var batch = _this.findMutationBatch(batchId);\n if (batch !== null) {\n result.push(batch);\n }\n });\n return persistence_promise_PersistencePromise.resolve(result);\n };\n MemoryMutationQueue.prototype.removeMutationBatches = function (transaction, batches) {\n var batchCount = batches.length;\n assert(batchCount > 0, 'Should not remove mutations when none exist.');\n var firstBatchId = batches[0].batchId;\n var queueCount = this.mutationQueue.length;\n // Find the position of the first batch for removal. This need not be the\n // first entry in the queue.\n var startIndex = this.indexOfExistingBatchId(firstBatchId, 'removed');\n assert(this.mutationQueue[startIndex].batchId === firstBatchId, 'Removed batches must exist in the queue');\n // Check that removed batches are contiguous (while excluding tombstones).\n var batchIndex = 1;\n var queueIndex = startIndex + 1;\n while (batchIndex < batchCount && queueIndex < queueCount) {\n var batch = this.mutationQueue[queueIndex];\n if (batch.isTombstone()) {\n queueIndex++;\n continue;\n }\n assert(batch.batchId === batches[batchIndex].batchId, 'Removed batches must be contiguous in the queue');\n batchIndex++;\n queueIndex++;\n }\n // Only actually remove batches if removing at the front of the queue.\n // Previously rejected batches may have left tombstones in the queue, so\n // expand the removal range to include any tombstones.\n if (startIndex === 0) {\n for (; queueIndex < queueCount; queueIndex++) {\n var batch = this.mutationQueue[queueIndex];\n if (!batch.isTombstone()) {\n break;\n }\n }\n var length_1 = queueIndex - startIndex;\n this.mutationQueue.splice(startIndex, length_1);\n }\n else {\n // Mark the tombstones\n for (var i = startIndex; i < queueIndex; i++) {\n this.mutationQueue[i] = this.mutationQueue[i].toTombstone();\n }\n }\n var references = this.batchesByDocumentKey;\n for (var _i = 0, batches_1 = batches; _i < batches_1.length; _i++) {\n var batch = batches_1[_i];\n var batchId = batch.batchId;\n for (var _a = 0, _b = batch.mutations; _a < _b.length; _a++) {\n var mutation = _b[_a];\n var key = mutation.key;\n if (this.garbageCollector !== null) {\n this.garbageCollector.addPotentialGarbageKey(key);\n }\n var ref = new reference_set_DocReference(key, batchId);\n references = references.delete(ref);\n }\n }\n this.batchesByDocumentKey = references;\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.setGarbageCollector = function (garbageCollector) {\n this.garbageCollector = garbageCollector;\n };\n MemoryMutationQueue.prototype.containsKey = function (txn, key) {\n var ref = new reference_set_DocReference(key, 0);\n var firstRef = this.batchesByDocumentKey.firstAfterOrEqual(ref);\n return persistence_promise_PersistencePromise.resolve(key.equals(firstRef && firstRef.key));\n };\n MemoryMutationQueue.prototype.performConsistencyCheck = function (txn) {\n if (this.mutationQueue.length === 0) {\n assert(this.batchesByDocumentKey.isEmpty(), 'Document leak -- detected dangling mutation references when queue is empty.');\n }\n return persistence_promise_PersistencePromise.resolve();\n };\n /**\n * A private helper that collects all the mutations batches in the queue up to\n * but not including the given endIndex. All tombstones in the queue are\n * excluded.\n */\n MemoryMutationQueue.prototype.getAllLiveMutationBatchesBeforeIndex = function (endIndex) {\n var result = [];\n for (var i = 0; i < endIndex; i++) {\n var batch = this.mutationQueue[i];\n if (!batch.isTombstone()) {\n result.push(batch);\n }\n }\n return result;\n };\n /**\n * Finds the index of the given batchId in the mutation queue and asserts that\n * the resulting index is within the bounds of the queue.\n *\n * @param batchId The batchId to search for\n * @param action A description of what the caller is doing, phrased in passive\n * form (e.g. \"acknowledged\" in a routine that acknowledges batches).\n */\n MemoryMutationQueue.prototype.indexOfExistingBatchId = function (batchId, action) {\n var index = this.indexOfBatchId(batchId);\n assert(index >= 0 && index < this.mutationQueue.length, 'Batches must exist to be ' + action);\n return index;\n };\n /**\n * Finds the index of the given batchId in the mutation queue. This operation\n * is O(1).\n *\n * @return The computed index of the batch with the given batchId, based on\n * the state of the queue. Note this index can be negative if the requested\n * batchId has already been remvoed from the queue or past the end of the\n * queue if the batchId is larger than the last added batch.\n */\n MemoryMutationQueue.prototype.indexOfBatchId = function (batchId) {\n if (this.mutationQueue.length === 0) {\n // As an index this is past the end of the queue\n return 0;\n }\n // Examine the front of the queue to figure out the difference between the\n // batchId and indexes in the array. Note that since the queue is ordered\n // by batchId, if the first batch has a larger batchId then the requested\n // batchId doesn't exist in the queue.\n var firstBatchId = this.mutationQueue[0].batchId;\n return batchId - firstBatchId;\n };\n /**\n * A version of lookupMutationBatch that doesn't return a promise, this makes\n * other functions that uses this code easier to read and more efficent.\n */\n MemoryMutationQueue.prototype.findMutationBatch = function (batchId) {\n var index = this.indexOfBatchId(batchId);\n if (index < 0 || index >= this.mutationQueue.length) {\n return null;\n }\n var batch = this.mutationQueue[index];\n assert(batch.batchId === batchId, 'If found batch must match');\n return batch.isTombstone() ? null : batch;\n };\n return MemoryMutationQueue;\n}());\n\n\n//# sourceMappingURL=memory_mutation_queue.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/memory_query_cache.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\nvar memory_query_cache_MemoryQueryCache = /** @class */ (function () {\n function MemoryQueryCache() {\n /**\n * Maps a query to the data about that query\n */\n this.queries = new obj_map_ObjectMap(function (q) { return q.canonicalId(); });\n /** The last received snapshot version. */\n this.lastRemoteSnapshotVersion = snapshot_version_SnapshotVersion.MIN;\n /** The highest numbered target ID encountered. */\n this.highestTargetId = 0;\n /**\n * A ordered bidirectional mapping between documents and the remote target\n * IDs.\n */\n this.references = new reference_set_ReferenceSet();\n }\n MemoryQueryCache.prototype.start = function (transaction) {\n // Nothing to do.\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.getLastRemoteSnapshotVersion = function () {\n return this.lastRemoteSnapshotVersion;\n };\n MemoryQueryCache.prototype.getHighestTargetId = function () {\n return this.highestTargetId;\n };\n MemoryQueryCache.prototype.setLastRemoteSnapshotVersion = function (transaction, snapshotVersion) {\n this.lastRemoteSnapshotVersion = snapshotVersion;\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.addQueryData = function (transaction, queryData) {\n this.queries.set(queryData.query, queryData);\n var targetId = queryData.targetId;\n if (targetId > this.highestTargetId) {\n this.highestTargetId = targetId;\n }\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.removeQueryData = function (transaction, queryData) {\n this.queries.delete(queryData.query);\n this.references.removeReferencesForId(queryData.targetId);\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.getQueryData = function (transaction, query) {\n var queryData = this.queries.get(query) || null;\n return persistence_promise_PersistencePromise.resolve(queryData);\n };\n MemoryQueryCache.prototype.addMatchingKeys = function (txn, keys, targetId) {\n this.references.addReferences(keys, targetId);\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.removeMatchingKeys = function (txn, keys, targetId) {\n this.references.removeReferences(keys, targetId);\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.removeMatchingKeysForTargetId = function (txn, targetId) {\n this.references.removeReferencesForId(targetId);\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.getMatchingKeysForTargetId = function (txn, targetId) {\n var matchingKeys = this.references.referencesForId(targetId);\n return persistence_promise_PersistencePromise.resolve(matchingKeys);\n };\n MemoryQueryCache.prototype.setGarbageCollector = function (gc) {\n this.references.setGarbageCollector(gc);\n };\n MemoryQueryCache.prototype.containsKey = function (txn, key) {\n return this.references.containsKey(txn, key);\n };\n return MemoryQueryCache;\n}());\n\n\n//# sourceMappingURL=memory_query_cache.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/memory_remote_document_cache.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\nvar memory_remote_document_cache_MemoryRemoteDocumentCache = /** @class */ (function () {\n function MemoryRemoteDocumentCache() {\n this.docs = maybeDocumentMap();\n }\n MemoryRemoteDocumentCache.prototype.addEntry = function (transaction, maybeDocument) {\n this.docs = this.docs.insert(maybeDocument.key, maybeDocument);\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryRemoteDocumentCache.prototype.removeEntry = function (transaction, documentKey) {\n this.docs = this.docs.remove(documentKey);\n return persistence_promise_PersistencePromise.resolve();\n };\n MemoryRemoteDocumentCache.prototype.getEntry = function (transaction, documentKey) {\n return persistence_promise_PersistencePromise.resolve(this.docs.get(documentKey));\n };\n MemoryRemoteDocumentCache.prototype.getDocumentsMatchingQuery = function (transaction, query) {\n var results = documentMap();\n // Documents are ordered by key, so we can use a prefix scan to narrow down\n // the documents we need to match the query against.\n var prefix = new document_key_DocumentKey(query.path.child(''));\n var iterator = this.docs.getIteratorFrom(prefix);\n while (iterator.hasNext()) {\n var _a = iterator.getNext(), key = _a.key, maybeDoc = _a.value;\n if (!query.path.isPrefixOf(key.path)) {\n break;\n }\n if (maybeDoc instanceof document_Document && query.matches(maybeDoc)) {\n results = results.insert(maybeDoc.key, maybeDoc);\n }\n }\n return persistence_promise_PersistencePromise.resolve(results);\n };\n return MemoryRemoteDocumentCache;\n}());\n\n\n//# sourceMappingURL=memory_remote_document_cache.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/memory_persistence.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nvar memory_persistence_LOG_TAG = 'MemoryPersistence';\n/**\n * A memory-backed instance of Persistence. Data is stored only in RAM and\n * not persisted across sessions.\n */\nvar memory_persistence_MemoryPersistence = /** @class */ (function () {\n function MemoryPersistence() {\n /**\n * Note that these are retained here to make it easier to write tests\n * affecting both the in-memory and IndexedDB-backed persistence layers. Tests\n * can create a new LocalStore wrapping this Persistence instance and this\n * will make the in-memory persistence layer behave as if it were actually\n * persisting values.\n */\n this.mutationQueues = {};\n this.remoteDocumentCache = new memory_remote_document_cache_MemoryRemoteDocumentCache();\n this.queryCache = new memory_query_cache_MemoryQueryCache();\n this.started = false;\n }\n MemoryPersistence.prototype.start = function () {\n assert(!this.started, 'MemoryPersistence double-started!');\n this.started = true;\n // No durable state to read on startup.\n return Promise.resolve();\n };\n MemoryPersistence.prototype.shutdown = function () {\n // No durable state to ensure is closed on shutdown.\n assert(this.started, 'MemoryPersistence shutdown without start!');\n this.started = false;\n return Promise.resolve();\n };\n MemoryPersistence.prototype.getMutationQueue = function (user) {\n var queue = this.mutationQueues[user.toKey()];\n if (!queue) {\n queue = new memory_mutation_queue_MemoryMutationQueue();\n this.mutationQueues[user.toKey()] = queue;\n }\n return queue;\n };\n MemoryPersistence.prototype.getQueryCache = function () {\n return this.queryCache;\n };\n MemoryPersistence.prototype.getRemoteDocumentCache = function () {\n return this.remoteDocumentCache;\n };\n MemoryPersistence.prototype.runTransaction = function (action, operation) {\n debug(memory_persistence_LOG_TAG, 'Starting transaction:', action);\n return operation(new MemoryPersistenceTransaction()).toPromise();\n };\n return MemoryPersistence;\n}());\n\n/** Dummy class since memory persistence doesn't actually use transactions. */\nvar MemoryPersistenceTransaction = /** @class */ (function () {\n function MemoryPersistenceTransaction() {\n }\n return MemoryPersistenceTransaction;\n}());\n\n//# sourceMappingURL=memory_persistence.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/local/no_op_garbage_collector.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * A garbage collector implementation that does absolutely nothing. It ignores\n * all addGarbageSource and addPotentialGarbageKey messages and and never\n * produces any garbage.\n */\nvar no_op_garbage_collector_NoOpGarbageCollector = /** @class */ (function () {\n function NoOpGarbageCollector() {\n this.isEager = false;\n }\n NoOpGarbageCollector.prototype.addGarbageSource = function (garbageSource) {\n // Not tracking garbage so don't track sources.\n };\n NoOpGarbageCollector.prototype.removeGarbageSource = function (garbageSource) {\n // Not tracking garbage so don't track sources.\n };\n NoOpGarbageCollector.prototype.addPotentialGarbageKey = function (key) {\n // Not tracking garbage so ignore.\n };\n NoOpGarbageCollector.prototype.collectGarbage = function (txn) {\n return persistence_promise_PersistencePromise.resolve(documentKeySet());\n };\n return NoOpGarbageCollector;\n}());\n\n\n//# sourceMappingURL=no_op_garbage_collector.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/promise.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar Deferred = /** @class */ (function () {\n function Deferred() {\n var _this = this;\n this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n }\n return Deferred;\n}());\n\n/**\n * Takes an array of values and sequences them using the promise (or value)\n * returned by the supplied callback. The callback for each item is called\n * after the promise is resolved for the previous item.\n * The function returns a promise which is resolved after the promise for\n * the last item is resolved.\n */\nfunction sequence(values, fn, initialValue) {\n var result = Promise.resolve(initialValue);\n values.forEach(function (value) {\n result = result.then(function (lastResult) { return fn(value, lastResult); });\n });\n return result;\n}\n\n//# sourceMappingURL=promise.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/backoff.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar backoff_LOG_TAG = 'ExponentialBackoff';\n/**\n * A helper for running delayed tasks following an exponential backoff curve\n * between attempts.\n *\n * Each delay is made up of a \"base\" delay which follows the exponential\n * backoff curve, and a +/- 50% \"jitter\" that is calculated and added to the\n * base delay. This prevents clients from accidentally synchronizing their\n * delays causing spikes of load to the backend.\n */\nvar backoff_ExponentialBackoff = /** @class */ (function () {\n function ExponentialBackoff(\n /**\n * The initial delay (used as the base delay on the first retry attempt).\n * Note that jitter will still be applied, so the actual delay could be as\n * little as 0.5*initialDelayMs.\n */\n initialDelayMs, \n /**\n * The multiplier to use to determine the extended base delay after each\n * attempt.\n */\n backoffFactor, \n /**\n * The maximum base delay after which no further backoff is performed.\n * Note that jitter will still be applied, so the actual delay could be as\n * much as 1.5*maxDelayMs.\n */\n maxDelayMs) {\n this.initialDelayMs = initialDelayMs;\n this.backoffFactor = backoffFactor;\n this.maxDelayMs = maxDelayMs;\n this.reset();\n }\n /**\n * Resets the backoff delay.\n *\n * The very next backoffAndWait() will have no delay. If it is called again\n * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and\n * subsequent ones will increase according to the backoffFactor.\n */\n ExponentialBackoff.prototype.reset = function () {\n this.currentBaseMs = 0;\n };\n /**\n * Resets the backoff delay to the maximum delay (e.g. for use after a\n * RESOURCE_EXHAUSTED error).\n */\n ExponentialBackoff.prototype.resetToMax = function () {\n this.currentBaseMs = this.maxDelayMs;\n };\n /**\n * Returns a promise that resolves after currentDelayMs, and increases the\n * delay for any subsequent attempts.\n */\n ExponentialBackoff.prototype.backoffAndWait = function () {\n var def = new Deferred();\n // First schedule using the current base (which may be 0 and should be\n // honored as such).\n var delayWithJitterMs = this.currentBaseMs + this.jitterDelayMs();\n if (this.currentBaseMs > 0) {\n debug(backoff_LOG_TAG, \"Backing off for \" + delayWithJitterMs + \" ms \" +\n (\"(base delay: \" + this.currentBaseMs + \" ms)\"));\n }\n setTimeout(function () {\n def.resolve();\n }, delayWithJitterMs);\n // Apply backoff factor to determine next delay and ensure it is within\n // bounds.\n this.currentBaseMs *= this.backoffFactor;\n if (this.currentBaseMs < this.initialDelayMs) {\n this.currentBaseMs = this.initialDelayMs;\n }\n if (this.currentBaseMs > this.maxDelayMs) {\n this.currentBaseMs = this.maxDelayMs;\n }\n return def.promise;\n };\n /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */\n ExponentialBackoff.prototype.jitterDelayMs = function () {\n return (Math.random() - 0.5) * this.currentBaseMs;\n };\n return ExponentialBackoff;\n}());\n\n\n//# sourceMappingURL=backoff.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/persistent_stream.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar persistent_stream___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar persistent_stream_LOG_TAG = 'PersistentStream';\nvar PersistentStreamState;\n(function (PersistentStreamState) {\n /**\n * The streaming RPC is not running and there's no error condition.\n * Calling `start` will start the stream immediately without backoff.\n * While in this state isStarted will return false.\n */\n PersistentStreamState[PersistentStreamState[\"Initial\"] = 0] = \"Initial\";\n /**\n * The stream is starting, and is waiting for an auth token to attach to\n * the initial request. While in this state, isStarted will return\n * true but isOpen will return false.\n */\n PersistentStreamState[PersistentStreamState[\"Auth\"] = 1] = \"Auth\";\n /**\n * The streaming RPC is up and running. Requests and responses can flow\n * freely. Both isStarted and isOpen will return true.\n */\n PersistentStreamState[PersistentStreamState[\"Open\"] = 2] = \"Open\";\n /**\n * The stream encountered an error. The next start attempt will back off.\n * While in this state isStarted() will return false.\n *\n */\n PersistentStreamState[PersistentStreamState[\"Error\"] = 3] = \"Error\";\n /**\n * An in-between state after an error where the stream is waiting before\n * re-starting. After\n * waiting is complete, the stream will try to open. While in this\n * state isStarted() will return YES but isOpen will return false.\n */\n PersistentStreamState[PersistentStreamState[\"Backoff\"] = 4] = \"Backoff\";\n /**\n * The stream has been explicitly stopped; no further events will be emitted.\n */\n PersistentStreamState[PersistentStreamState[\"Stopped\"] = 5] = \"Stopped\";\n})(PersistentStreamState || (PersistentStreamState = {}));\n/**\n * Initial backoff time in milliseconds after an error.\n * Set to 1s according to https://cloud.google.com/apis/design/errors.\n */\nvar BACKOFF_INITIAL_DELAY_MS = 1000;\n/** Maximum backoff time in milliseconds */\nvar BACKOFF_MAX_DELAY_MS = 60 * 1000;\nvar BACKOFF_FACTOR = 1.5;\n/**\n * A PersistentStream is an abstract base class that represents a streaming RPC\n * to the Firestore backend. It's built on top of the connections own support\n * for streaming RPCs, and adds several critical features for our clients:\n *\n * - Exponential backoff on failure\n * - Authentication via CredentialsProvider\n * - Dispatching all callbacks into the shared worker queue\n *\n * Subclasses of PersistentStream implement serialization of models to and\n * from the JSON representation of the protocol buffers for a specific\n * streaming RPC.\n *\n * ## Starting and Stopping\n *\n * Streaming RPCs are stateful and need to be `start`ed before messages can\n * be sent and received. The PersistentStream will call the onOpen function\n * of the listener once the stream is ready to accept requests.\n *\n * Should a `start` fail, PersistentStream will call the registered\n * onClose with a FirestoreError indicating what went wrong.\n *\n * A PersistentStream can be started and stopped repeatedly.\n *\n * Generic types:\n * SendType: The type of the outgoing message of the underlying\n * connection stream\n * ReceiveType: The type of the incoming message of the underlying\n * connection stream\n * ListenerType: The type of the listener that will be used for callbacks\n */\nvar persistent_stream_PersistentStream = /** @class */ (function () {\n function PersistentStream(queue, connection, credentialsProvider, listener, \n // Used for faster retries in testing\n initialBackoffDelay) {\n this.queue = queue;\n this.connection = connection;\n this.credentialsProvider = credentialsProvider;\n this.stream = null;\n this.listener = null;\n this.backoff = new backoff_ExponentialBackoff(initialBackoffDelay ? initialBackoffDelay : BACKOFF_INITIAL_DELAY_MS, BACKOFF_FACTOR, BACKOFF_MAX_DELAY_MS);\n this.state = PersistentStreamState.Initial;\n this.listener = listener;\n }\n /**\n * Returns true if `start` has been called and no error has occurred. True\n * indicates the stream is open or in the process of opening (which\n * encompasses respecting backoff, getting auth tokens, and starting the\n * actual RPC). Use `isOpen` to determine if the stream is open and ready for\n * outbound requests.\n */\n PersistentStream.prototype.isStarted = function () {\n return (this.state === PersistentStreamState.Backoff ||\n this.state === PersistentStreamState.Auth ||\n this.state === PersistentStreamState.Open);\n };\n /**\n * Returns true if the underlying RPC is open (the openHandler has been\n * called) and the stream is ready for outbound requests.\n */\n PersistentStream.prototype.isOpen = function () {\n return this.state === PersistentStreamState.Open;\n };\n /**\n * Starts the RPC. Only allowed if isStarted returns false. The stream is\n * not immediately ready for use: onOpen will be invoked when the RPC is ready\n * for outbound requests, at which point isOpen will return true.\n *\n * When start returns, isStarted will return true.\n */\n PersistentStream.prototype.start = function () {\n if (this.state === PersistentStreamState.Error) {\n this.performBackoff();\n return;\n }\n assert(this.state === PersistentStreamState.Initial, 'Already started');\n this.auth();\n };\n /**\n * Stops the RPC. This call is idempotent and allowed regardless of the\n * current isStarted state.\n *\n * When stop returns, isStarted and isOpen will both return false.\n */\n PersistentStream.prototype.stop = function () {\n // Prevent any possible future restart of this stream\n this.state = PersistentStreamState.Stopped;\n // Clear the listener to avoid bleeding of events from the underlying\n // streams\n this.listener = null;\n // Clean up the underlying stream because we are no longer interested in\n // events\n if (this.stream !== null) {\n this.stream.close();\n this.stream = null;\n }\n };\n /**\n * After an error the stream will usually back off on the next attempt to\n * start it. If the error warrants an immediate restart of the stream, the\n * sender can use this to indicate that the receiver should not back off.\n *\n * Each error will call the onClose function. That function can decide to\n * inhibit backoff if required.\n */\n PersistentStream.prototype.inhibitBackoff = function () {\n assert(!this.isStarted(), 'Can only inhibit backoff in a stopped state');\n this.state = PersistentStreamState.Initial;\n this.backoff.reset();\n };\n PersistentStream.prototype.auth = function () {\n var _this = this;\n assert(this.state === PersistentStreamState.Initial, 'Must be in initial state to auth');\n this.state = PersistentStreamState.Auth;\n this.credentialsProvider.getToken(/*forceRefresh=*/ false).then(function (token) {\n // Normally we'd have to schedule the callback on the AsyncQueue.\n // However, the following calls are safe to be called outside the\n // AsyncQueue since they don't chain asynchronous calls\n _this.startStream(token);\n }, function (error) {\n _this.queue.schedule(function () {\n if (_this.state !== PersistentStreamState.Stopped) {\n // Stream can be stopped while waiting for authorization.\n var rpcError = new FirestoreError(Code.UNKNOWN, 'Fetching auth token failed: ' + error.message);\n return _this.handleStreamClose(rpcError);\n }\n else {\n return Promise.resolve();\n }\n });\n });\n };\n PersistentStream.prototype.startStream = function (token) {\n var _this = this;\n if (this.state === PersistentStreamState.Stopped) {\n // Stream can be stopped while waiting for authorization.\n return;\n }\n assert(this.state === PersistentStreamState.Auth, 'Trying to start stream in a non-auth state');\n // Helper function to dispatch to AsyncQueue and make sure that any\n // close will seem instantaneous and events are prevented from being\n // raised after the close call\n var dispatchIfNotStopped = function (fn) {\n _this.queue.schedule(function () {\n // Only raise events if the listener has not changed\n if (_this.state !== PersistentStreamState.Stopped) {\n return fn();\n }\n else {\n return Promise.resolve();\n }\n });\n };\n // Only start stream if listener has not changed\n if (this.listener !== null) {\n this.stream = this.startRpc(token);\n this.stream.onOpen(function () {\n dispatchIfNotStopped(function () {\n assert(_this.state === PersistentStreamState.Auth, 'Expected stream to be in state auth, but was ' + _this.state);\n _this.state = PersistentStreamState.Open;\n return _this.listener.onOpen();\n });\n });\n this.stream.onClose(function (error) {\n dispatchIfNotStopped(function () {\n return _this.handleStreamClose(error);\n });\n });\n this.stream.onMessage(function (msg) {\n dispatchIfNotStopped(function () {\n return _this.onMessage(msg);\n });\n });\n }\n };\n PersistentStream.prototype.performBackoff = function () {\n var _this = this;\n assert(this.state === PersistentStreamState.Error, 'Should only perform backoff in an error case');\n this.state = PersistentStreamState.Backoff;\n this.backoff.backoffAndWait().then(function () {\n // Backoff does not run on the AsyncQueue, so we need to reschedule to\n // make sure the queue blocks\n _this.queue.schedule(function () {\n if (_this.state === PersistentStreamState.Stopped) {\n // Stream can be stopped while waiting for backoff to complete.\n return Promise.resolve();\n }\n _this.state = PersistentStreamState.Initial;\n _this.start();\n assert(_this.isStarted(), 'PersistentStream should have started');\n return Promise.resolve();\n });\n });\n };\n PersistentStream.prototype.handleStreamClose = function (error) {\n assert(this.isStarted(), \"Can't handle server close on non-started stream\");\n debug(persistent_stream_LOG_TAG, \"close with error: \" + error);\n this.stream = null;\n // In theory the stream could close cleanly, however, in our current model\n // we never expect this to happen because if we stop a stream ourselves,\n // this callback will never be called. To prevent cases where we retry\n // without a backoff accidentally, we set the stream to error in all cases.\n this.state = PersistentStreamState.Error;\n if (error && error.code === Code.RESOURCE_EXHAUSTED) {\n debug(persistent_stream_LOG_TAG, 'Using maximum backoff delay to prevent overloading the backend.');\n this.backoff.resetToMax();\n }\n return this.listener.onClose(error);\n };\n return PersistentStream;\n}());\n\n/**\n * A PersistentStream that implements the Listen RPC.\n *\n * Once the Listen stream has called the openHandler, any number of listen and\n * unlisten calls calls can be sent to control what changes will be sent from\n * the server for ListenResponses.\n */\nvar PersistentListenStream = /** @class */ (function (_super) {\n persistent_stream___extends(PersistentListenStream, _super);\n function PersistentListenStream(databaseInfo, queue, connection, credentials, serializer, listener, initialBackoffDelay) {\n var _this = _super.call(this, queue, connection, credentials, listener, initialBackoffDelay) || this;\n _this.databaseInfo = databaseInfo;\n _this.serializer = serializer;\n return _this;\n }\n PersistentListenStream.prototype.startRpc = function (token) {\n return this.connection.openStream('Listen', token);\n };\n PersistentListenStream.prototype.onMessage = function (watchChangeProto) {\n // A successful response means the stream is healthy\n this.backoff.reset();\n var watchChange = this.serializer.fromWatchChange(watchChangeProto);\n var snapshot = this.serializer.versionFromListenResponse(watchChangeProto);\n return this.listener.onWatchChange(watchChange, snapshot);\n };\n /**\n * Registers interest in the results of the given query. If the query\n * includes a resumeToken it will be included in the request. Results that\n * affect the query will be streamed back as WatchChange messages that\n * reference the targetId.\n */\n PersistentListenStream.prototype.watch = function (queryData) {\n var request = {};\n request.database = this.serializer.encodedDatabaseId;\n request.addTarget = this.serializer.toTarget(queryData);\n var labels = this.serializer.toListenRequestLabels(queryData);\n if (labels) {\n request.labels = labels;\n }\n this.stream.send(request);\n };\n /**\n * Unregisters interest in the results of the query associated with the\n * given targetId.\n */\n PersistentListenStream.prototype.unwatch = function (targetId) {\n var request = {};\n request.database = this.serializer.encodedDatabaseId;\n request.removeTarget = targetId;\n this.stream.send(request);\n };\n return PersistentListenStream;\n}(persistent_stream_PersistentStream));\n\n/**\n * A Stream that implements the Write RPC.\n *\n * The Write RPC requires the caller to maintain special streamToken\n * state in between calls, to help the server understand which responses the\n * client has processed by the time the next request is made. Every response\n * will contain a streamToken; this value must be passed to the next\n * request.\n *\n * After calling start() on this stream, the next request must be a handshake,\n * containing whatever streamToken is on hand. Once a response to this\n * request is received, all pending mutations may be submitted. When\n * submitting multiple batches of mutations at the same time, it's\n * okay to use the same streamToken for the calls to writeMutations.\n *\n * TODO(b/33271235): Use proto types\n */\nvar persistent_stream_PersistentWriteStream = /** @class */ (function (_super) {\n persistent_stream___extends(PersistentWriteStream, _super);\n function PersistentWriteStream(databaseInfo, queue, connection, credentials, serializer, listener, initialBackoffDelay) {\n var _this = _super.call(this, queue, connection, credentials, listener, initialBackoffDelay) || this;\n _this.databaseInfo = databaseInfo;\n _this.serializer = serializer;\n _this.handshakeComplete_ = false;\n return _this;\n }\n Object.defineProperty(PersistentWriteStream.prototype, \"handshakeComplete\", {\n /**\n * Tracks whether or not a handshake has been successfully exchanged and\n * the stream is ready to accept mutations.\n */\n get: function () {\n return this.handshakeComplete_;\n },\n enumerable: true,\n configurable: true\n });\n // Override of PersistentStream.start\n PersistentWriteStream.prototype.start = function () {\n this.handshakeComplete_ = false;\n _super.prototype.start.call(this);\n };\n PersistentWriteStream.prototype.startRpc = function (token) {\n return this.connection.openStream('Write', token);\n };\n PersistentWriteStream.prototype.onMessage = function (responseProto) {\n // Always capture the last stream token.\n assert(!!responseProto.streamToken, 'Got a write response without a stream token');\n this.lastStreamToken = responseProto.streamToken;\n if (!this.handshakeComplete_) {\n // The first response is always the handshake response\n assert(!responseProto.writeResults || responseProto.writeResults.length === 0, 'Got mutation results for handshake');\n this.handshakeComplete_ = true;\n return this.listener.onHandshakeComplete();\n }\n else {\n // A successful first write response means the stream is healthy,\n // Note, that we could consider a successful handshake healthy, however,\n // the write itself might be causing an error we want to back off from.\n this.backoff.reset();\n var results = this.serializer.fromWriteResults(responseProto.writeResults);\n var commitVersion = this.serializer.fromVersion(responseProto.commitTime);\n return this.listener.onMutationResult(commitVersion, results);\n }\n };\n /**\n * Sends an initial streamToken to the server, performing the handshake\n * required to make the StreamingWrite RPC work. Subsequent\n * calls should wait until onHandshakeComplete was called.\n */\n PersistentWriteStream.prototype.writeHandshake = function () {\n assert(this.isOpen(), 'Writing handshake requires an opened stream');\n assert(!this.handshakeComplete_, 'Handshake already completed');\n // TODO(dimond): Support stream resumption. We intentionally do not set the\n // stream token on the handshake, ignoring any stream token we might have.\n var request = {};\n request.database = this.serializer.encodedDatabaseId;\n this.stream.send(request);\n };\n /** Sends a group of mutations to the Firestore backend to apply. */\n PersistentWriteStream.prototype.writeMutations = function (mutations) {\n var _this = this;\n assert(this.isOpen(), 'Writing mutations requires an opened stream');\n assert(this.handshakeComplete_, 'Handshake must be complete before writing mutations');\n assert(this.lastStreamToken.length > 0, 'Trying to write mutation without a token');\n var request = {\n // Protos are typed with string, but we support UInt8Array on Node\n // tslint:disable-next-line:no-any\n streamToken: this.lastStreamToken,\n writes: mutations.map(function (mutation) { return _this.serializer.toMutation(mutation); })\n };\n this.stream.send(request);\n };\n return PersistentWriteStream;\n}(persistent_stream_PersistentStream));\n\n\n//# sourceMappingURL=persistent_stream.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/datastore.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * Datastore is a wrapper around the external Google Cloud Datastore grpc API,\n * which provides an interface that is more convenient for the rest of the\n * client SDK architecture to consume.\n */\nvar datastore_Datastore = /** @class */ (function () {\n function Datastore(databaseInfo, queue, connection, credentials, serializer, initialBackoffDelay) {\n this.databaseInfo = databaseInfo;\n this.queue = queue;\n this.connection = connection;\n this.credentials = credentials;\n this.serializer = serializer;\n this.initialBackoffDelay = initialBackoffDelay;\n }\n Datastore.prototype.newPersistentWriteStream = function (listener) {\n return new persistent_stream_PersistentWriteStream(this.databaseInfo, this.queue, this.connection, this.credentials, this.serializer, listener, this.initialBackoffDelay);\n };\n Datastore.prototype.newPersistentWatchStream = function (listener) {\n return new PersistentListenStream(this.databaseInfo, this.queue, this.connection, this.credentials, this.serializer, listener, this.initialBackoffDelay);\n };\n Datastore.prototype.commit = function (mutations) {\n var _this = this;\n var params = {\n writes: mutations.map(function (m) { return _this.serializer.toMutation(m); })\n };\n return this.invokeRPC('commit', params).then(function (response) {\n return _this.serializer.fromWriteResults(response.writeResults);\n });\n };\n Datastore.prototype.lookup = function (keys) {\n var _this = this;\n var params = {\n documents: keys.map(function (k) { return _this.serializer.toName(k); })\n };\n return this.invokeRPC('batchGet', params).then(function (response) {\n var docs = maybeDocumentMap();\n response.forEach(function (proto) {\n var doc = _this.serializer.fromMaybeDocument(proto);\n docs = docs.insert(doc.key, doc);\n });\n var result = [];\n keys.forEach(function (key) {\n var doc = docs.get(key);\n assert(!!doc, 'Missing entity in write response for ' + key);\n result.push(doc);\n });\n return result;\n });\n };\n /** Gets an auth token and invokes the provided RPC. */\n Datastore.prototype.invokeRPC = function (rpcName, request) {\n var _this = this;\n // TODO(mikelehen): Retry (with backoff) on token failures?\n return this.credentials.getToken(/*forceRefresh=*/ false).then(function (token) {\n return _this.connection.invoke(rpcName, request, token);\n });\n };\n return Datastore;\n}());\n\n\n//# sourceMappingURL=datastore.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/transaction.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/**\n * Internal transaction object responsible for accumulating the mutations to\n * perform and the base versions for any documents read.\n */\nvar transaction_Transaction = /** @class */ (function () {\n function Transaction(datastore) {\n this.datastore = datastore;\n // The version of each document that was read during this transaction.\n this.readVersions = documentVersionMap();\n this.mutations = [];\n this.committed = false;\n }\n Transaction.prototype.recordVersion = function (doc) {\n var docVersion = doc.version;\n if (doc instanceof document_NoDocument) {\n // For deleted docs, we must use baseVersion 0 when we overwrite them.\n docVersion = snapshot_version_SnapshotVersion.forDeletedDoc();\n }\n var existingVersion = this.readVersions.get(doc.key);\n if (existingVersion !== null) {\n if (!docVersion.equals(existingVersion)) {\n // This transaction will fail no matter what.\n throw new FirestoreError(Code.ABORTED, 'Document version changed between two reads.');\n }\n }\n else {\n this.readVersions = this.readVersions.insert(doc.key, docVersion);\n }\n };\n Transaction.prototype.lookup = function (keys) {\n var _this = this;\n if (this.committed) {\n return Promise.reject('Transaction has already completed.');\n }\n if (this.mutations.length > 0) {\n return Promise.reject('Transactions lookups are invalid after writes.');\n }\n return this.datastore.lookup(keys).then(function (docs) {\n docs.forEach(function (doc) { return _this.recordVersion(doc); });\n return docs;\n });\n };\n Transaction.prototype.write = function (mutations) {\n if (this.committed) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'Transaction has already completed.');\n }\n this.mutations = this.mutations.concat(mutations);\n };\n /**\n * Returns the version of this document when it was read in this transaction,\n * as a precondition, or no precondition if it was not read.\n */\n Transaction.prototype.precondition = function (key) {\n var version = this.readVersions.get(key);\n if (version) {\n return mutation_Precondition.updateTime(version);\n }\n else {\n return mutation_Precondition.NONE;\n }\n };\n /**\n * Returns the precondition for a document if the operation is an update.\n */\n Transaction.prototype.preconditionForUpdate = function (key) {\n var version = this.readVersions.get(key);\n if (version && version.equals(snapshot_version_SnapshotVersion.forDeletedDoc())) {\n // The document doesn't exist, so fail the transaction.\n throw new FirestoreError(Code.FAILED_PRECONDITION, \"Can't update a document that doesn't exist.\");\n }\n else if (version) {\n // Document exists, base precondition on document update time.\n return mutation_Precondition.updateTime(version);\n }\n else {\n // Document was not read, so we just use the preconditions for a blind\n // update.\n return mutation_Precondition.exists(true);\n }\n };\n Transaction.prototype.set = function (key, data) {\n this.write(data.toMutations(key, this.precondition(key)));\n };\n Transaction.prototype.update = function (key, data) {\n this.write(data.toMutations(key, this.preconditionForUpdate(key)));\n };\n Transaction.prototype.delete = function (key) {\n this.write([new mutation_DeleteMutation(key, this.precondition(key))]);\n // Since the delete will be applied before all following writes, we need to\n // ensure that the precondition for the next write will be exists: false.\n this.readVersions = this.readVersions.insert(key, snapshot_version_SnapshotVersion.forDeletedDoc());\n };\n Transaction.prototype.commit = function () {\n var _this = this;\n var unwritten = this.readVersions;\n // For each mutation, note that the doc was written.\n this.mutations.forEach(function (mutation) {\n unwritten = unwritten.remove(mutation.key);\n });\n if (!unwritten.isEmpty()) {\n return Promise.reject(Error('Every document read in a transaction must also be written.'));\n }\n return this.datastore.commit(this.mutations).then(function () {\n _this.committed = true;\n });\n };\n return Transaction;\n}());\n\n\n//# sourceMappingURL=transaction.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/remote/remote_store.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar remote_store_LOG_TAG = 'RemoteStore';\n// TODO(b/35853402): Negotiate this with the stream.\nvar MAX_PENDING_WRITES = 10;\n// The RemoteStore notifies an onlineStateHandler with OnlineState.Failed if we\n// fail to connect to the backend. This subsequently triggers get() requests to\n// fail or use cached data, etc. Unfortunately, our connections have\n// historically been subject to various transient failures. So we wait for\n// multiple failures before notifying the onlineStateHandler.\nvar ONLINE_ATTEMPTS_BEFORE_FAILURE = 2;\n/**\n * RemoteStore - An interface to remotely stored data, basically providing a\n * wrapper around the Datastore that is more reliable for the rest of the\n * system.\n *\n * RemoteStore is responsible for maintaining the connection to the server.\n * - maintaining a list of active listens.\n * - reconnecting when the connection is dropped.\n * - resuming all the active listens on reconnect.\n *\n * RemoteStore handles all incoming events from the Datastore.\n * - listening to the watch stream and repackaging the events as RemoteEvents\n * - notifying SyncEngine of any changes to the active listens.\n *\n * RemoteStore takes writes from other components and handles them reliably.\n * - pulling pending mutations from LocalStore and sending them to Datastore.\n * - retrying mutations that failed because of network problems.\n * - acking mutations to the SyncEngine once they are accepted or rejected.\n */\nvar remote_store_RemoteStore = /** @class */ (function () {\n function RemoteStore(databaseInfo, asyncQueue, \n /**\n * The local store, used to fill the write pipeline with outbound\n * mutations and resolve existence filter mismatches.\n */\n localStore, \n /** The client-side proxy for interacting with the backend. */\n datastore, onlineStateHandler) {\n this.databaseInfo = databaseInfo;\n this.asyncQueue = asyncQueue;\n this.localStore = localStore;\n this.datastore = datastore;\n this.onlineStateHandler = onlineStateHandler;\n this.pendingWrites = [];\n this.lastBatchSeen = BATCHID_UNKNOWN;\n /**\n * A mapping of watched targets that the client cares about tracking and the\n * user has explicitly called a 'listen' for this target.\n *\n * These targets may or may not have been sent to or acknowledged by the\n * server. On re-establishing the listen stream, these targets should be sent\n * to the server. The targets removed with unlistens are removed eagerly\n * without waiting for confirmation from the listen stream.\n */\n this.listenTargets = {};\n /**\n * A mapping of targetId to pending acks needed.\n *\n * If a targetId is present in this map, then we're waiting for watch to\n * acknowledge a removal or addition of the target. If a target is not in this\n * mapping, and it's in the listenTargets map, then we consider the target to\n * be active.\n *\n * We increment the count here every time we issue a request over the stream\n * to watch or unwatch. We then decrement the count every time we get a target\n * added or target removed message from the server. Once the count is equal to\n * 0 we know that the client and server are in the same state (once this state\n * is reached the targetId is removed from the map to free the memory).\n */\n this.pendingTargetResponses = {};\n this.accumulatedWatchChanges = [];\n this.watchStream = null;\n this.writeStream = null;\n /**\n * The online state of the watch stream. The state is set to healthy if and\n * only if there are messages received by the backend.\n */\n this.watchStreamOnlineState = OnlineState.Unknown;\n /** A count of consecutive failures to open the stream. */\n this.watchStreamFailures = 0;\n }\n /**\n * Starts up the remote store, creating streams, restoring state from\n * LocalStore, etc.\n */\n RemoteStore.prototype.start = function () {\n return this.enableNetwork();\n };\n RemoteStore.prototype.setOnlineStateToHealthy = function () {\n this.updateAndBroadcastOnlineState(OnlineState.Healthy);\n };\n RemoteStore.prototype.setOnlineStateToUnknown = function () {\n // The state is set to unknown when a healthy stream is closed (e.g. due to\n // a token timeout) or when we have no active listens and therefore there's\n // no need to start the stream. Assuming there is (possibly in the future)\n // an active listen, then we will eventually move to state Online or Failed,\n // but we always want to make at least ONLINE_ATTEMPTS_BEFORE_FAILURE\n // attempts before failing, so we reset the count here.\n this.watchStreamFailures = 0;\n this.updateAndBroadcastOnlineState(OnlineState.Unknown);\n };\n RemoteStore.prototype.updateOnlineStateAfterFailure = function () {\n // The first failure after we are successfully connected moves us to the\n // 'Unknown' state. We then may make multiple attempts (based on\n // ONLINE_ATTEMPTS_BEFORE_FAILURE) before we actually report failure.\n if (this.watchStreamOnlineState === OnlineState.Healthy) {\n this.setOnlineStateToUnknown();\n }\n else {\n this.watchStreamFailures++;\n if (this.watchStreamFailures >= ONLINE_ATTEMPTS_BEFORE_FAILURE) {\n this.updateAndBroadcastOnlineState(OnlineState.Failed);\n }\n }\n };\n RemoteStore.prototype.updateAndBroadcastOnlineState = function (onlineState) {\n var didChange = this.watchStreamOnlineState !== onlineState;\n this.watchStreamOnlineState = onlineState;\n if (didChange) {\n this.onlineStateHandler(onlineState);\n }\n };\n RemoteStore.prototype.isNetworkEnabled = function () {\n assert((this.watchStream == null) == (this.writeStream == null), 'WatchStream and WriteStream should both be null or non-null');\n return this.watchStream != null;\n };\n /** Re-enables the network. Only to be called as the counterpart to disableNetwork(). */\n RemoteStore.prototype.enableNetwork = function () {\n var _this = this;\n assert(this.watchStream == null, 'enableNetwork() called with non-null watchStream.');\n assert(this.writeStream == null, 'enableNetwork() called with non-null writeStream.');\n // Create new streams (but note they're not started yet).\n this.watchStream = this.datastore.newPersistentWatchStream({\n onOpen: this.onWatchStreamOpen.bind(this),\n onClose: this.onWatchStreamClose.bind(this),\n onWatchChange: this.onWatchStreamChange.bind(this)\n });\n this.writeStream = this.datastore.newPersistentWriteStream({\n onOpen: this.onWriteStreamOpen.bind(this),\n onClose: this.onWriteStreamClose.bind(this),\n onHandshakeComplete: this.onWriteHandshakeComplete.bind(this),\n onMutationResult: this.onMutationResult.bind(this)\n });\n // Load any saved stream token from persistent storage\n return this.localStore.getLastStreamToken().then(function (token) {\n _this.writeStream.lastStreamToken = token;\n if (_this.shouldStartWatchStream()) {\n _this.startWatchStream();\n }\n _this.updateAndBroadcastOnlineState(OnlineState.Unknown);\n return _this.fillWritePipeline(); // This may start the writeStream.\n });\n };\n /** Temporarily disables the network. The network can be re-enabled using enableNetwork(). */\n RemoteStore.prototype.disableNetwork = function () {\n this.updateAndBroadcastOnlineState(OnlineState.Failed);\n // NOTE: We're guaranteed not to get any further events from these streams (not even a close\n // event).\n this.watchStream.stop();\n this.writeStream.stop();\n this.cleanUpWatchStreamState();\n this.cleanUpWriteStreamState();\n this.writeStream = null;\n this.watchStream = null;\n return Promise.resolve();\n };\n RemoteStore.prototype.shutdown = function () {\n debug(remote_store_LOG_TAG, 'RemoteStore shutting down.');\n this.disableNetwork();\n return Promise.resolve(undefined);\n };\n /** Starts new listen for the given query. Uses resume token if provided */\n RemoteStore.prototype.listen = function (queryData) {\n assert(!contains(this.listenTargets, queryData.targetId), 'listen called with duplicate targetId!');\n // Mark this as something the client is currently listening for.\n this.listenTargets[queryData.targetId] = queryData;\n if (this.shouldStartWatchStream()) {\n // The listen will be sent in onWatchStreamOpen\n this.startWatchStream();\n }\n else if (this.isNetworkEnabled() && this.watchStream.isOpen()) {\n this.sendWatchRequest(queryData);\n }\n };\n /** Removes the listen from server */\n RemoteStore.prototype.unlisten = function (targetId) {\n assert(contains(this.listenTargets, targetId), 'unlisten called without assigned target ID!');\n var queryData = this.listenTargets[targetId];\n delete this.listenTargets[targetId];\n if (this.isNetworkEnabled() && this.watchStream.isOpen()) {\n this.sendUnwatchRequest(targetId);\n }\n };\n /**\n * We need to increment the the expected number of pending responses we're due\n * from watch so we wait for the ack to process any messages from this target.\n */\n RemoteStore.prototype.sendWatchRequest = function (queryData) {\n this.recordPendingTargetRequest(queryData.targetId);\n this.watchStream.watch(queryData);\n };\n /**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */\n RemoteStore.prototype.sendUnwatchRequest = function (targetId) {\n this.recordPendingTargetRequest(targetId);\n this.watchStream.unwatch(targetId);\n };\n /**\n * Increment the mapping of how many acks are needed from watch before we can\n * consider the server to be 'in-sync' with the client's active targets.\n */\n RemoteStore.prototype.recordPendingTargetRequest = function (targetId) {\n // For each request we get we need to record we need a response for it.\n this.pendingTargetResponses[targetId] =\n (this.pendingTargetResponses[targetId] || 0) + 1;\n };\n RemoteStore.prototype.startWatchStream = function () {\n assert(this.shouldStartWatchStream(), 'startWriteStream() called when shouldStartWatchStream() is false.');\n this.watchStream.start();\n };\n /**\n * Returns whether the watch stream should be started because there are\n * active targets trying to be listened too\n */\n RemoteStore.prototype.shouldStartWatchStream = function () {\n return (this.isNetworkEnabled() &&\n !this.watchStream.isStarted() &&\n !isEmpty(this.listenTargets));\n };\n RemoteStore.prototype.cleanUpWatchStreamState = function () {\n // If the connection is closed then we'll never get a snapshot version for\n // the accumulated changes and so we'll never be able to complete the batch.\n // When we start up again the server is going to resend these changes\n // anyway, so just toss the accumulated state.\n this.accumulatedWatchChanges = [];\n this.pendingTargetResponses = {};\n };\n RemoteStore.prototype.onWatchStreamOpen = function () {\n var _this = this;\n // TODO(b/35852690): close the stream again (with some timeout?) if no watch\n // targets are active\n forEachNumber(this.listenTargets, function (targetId, queryData) {\n _this.sendWatchRequest(queryData);\n });\n return Promise.resolve();\n };\n RemoteStore.prototype.onWatchStreamClose = function (error) {\n assert(this.isNetworkEnabled(), 'onWatchStreamClose() should only be called when the network is enabled');\n this.cleanUpWatchStreamState();\n // If there was an error, retry the connection.\n if (this.shouldStartWatchStream()) {\n this.updateOnlineStateAfterFailure();\n this.startWatchStream();\n }\n else {\n // No need to restart watch stream because there are no active targets.\n // The online state is set to unknown because there is no active attempt\n // at establishing a connection\n this.setOnlineStateToUnknown();\n }\n return Promise.resolve();\n };\n RemoteStore.prototype.onWatchStreamChange = function (watchChange, snapshotVersion) {\n // Mark the connection as healthy because we got a message from the server\n this.setOnlineStateToHealthy();\n if (watchChange instanceof watch_change_WatchTargetChange &&\n watchChange.state === WatchTargetChangeState.Removed &&\n watchChange.cause) {\n // There was an error on a target, don't wait for a consistent snapshot\n // to raise events\n return this.handleTargetError(watchChange);\n }\n // Accumulate watch changes but don't process them if there's no\n // snapshotVersion or it's older than a previous snapshot we've processed\n // (can happen after we resume a target using a resume token).\n this.accumulatedWatchChanges.push(watchChange);\n if (!snapshotVersion.equals(snapshot_version_SnapshotVersion.MIN) &&\n snapshotVersion.compareTo(this.localStore.getLastRemoteSnapshotVersion()) >= 0) {\n var changes = this.accumulatedWatchChanges;\n this.accumulatedWatchChanges = [];\n return this.handleWatchChangeBatch(snapshotVersion, changes);\n }\n else {\n return Promise.resolve();\n }\n };\n /**\n * Takes a batch of changes from the Datastore, repackages them as a\n * RemoteEvent, and passes that on to the listener, which is typically the\n * SyncEngine.\n */\n RemoteStore.prototype.handleWatchChangeBatch = function (snapshotVersion, changes) {\n var _this = this;\n var aggregator = new watch_change_WatchChangeAggregator(snapshotVersion, this.listenTargets, this.pendingTargetResponses);\n aggregator.addChanges(changes);\n var remoteEvent = aggregator.createRemoteEvent();\n // Get the new response counts from the aggregator\n this.pendingTargetResponses = aggregator.pendingTargetResponses;\n var promises = [];\n // Handle existence filters and existence filter mismatches.\n forEachNumber(aggregator.existenceFilters, function (targetId, filter) {\n var queryData = _this.listenTargets[targetId];\n if (!queryData) {\n // A watched target might have been removed already.\n return;\n }\n var query = queryData.query;\n if (query.isDocumentQuery()) {\n if (filter.count === 0) {\n // The existence filter told us the document does not exist.\n // We need to deduce that this document does not exist and apply\n // a deleted document to our updates. Without applying a deleted\n // document there might be another query that will raise this\n // document as part of a snapshot until it is resolved,\n // essentially exposing inconsistency between queries.\n var key = new document_key_DocumentKey(query.path);\n var deletedDoc = new document_NoDocument(key, snapshotVersion);\n remoteEvent.addDocumentUpdate(deletedDoc);\n }\n else {\n assert(filter.count === 1, 'Single document existence filter with count: ' + filter.count);\n }\n }\n else {\n // Not a document query.\n var promise = _this.localStore\n .remoteDocumentKeys(targetId)\n .then(function (trackedRemote) {\n if (remoteEvent.targetChanges[targetId]) {\n var mapping = remoteEvent.targetChanges[targetId].mapping;\n if (mapping !== null) {\n if (mapping instanceof UpdateMapping) {\n trackedRemote = mapping.applyToKeySet(trackedRemote);\n }\n else {\n assert(mapping instanceof ResetMapping, 'Expected either reset or update mapping but got something else: ' +\n mapping);\n trackedRemote = mapping.documents;\n }\n }\n }\n if (trackedRemote.size !== filter.count) {\n // Existence filter mismatch, resetting mapping.\n // Make sure the mismatch is exposed in the remote event.\n remoteEvent.handleExistenceFilterMismatch(targetId);\n // Clear the resume token for the query, since we're in a\n // known mismatch state.\n var newQueryData = new query_data_QueryData(query, targetId, queryData.purpose);\n _this.listenTargets[targetId] = newQueryData;\n // Cause a hard reset by unwatching and rewatching\n // immediately, but deliberately don't send a resume token\n // so that we get a full update.\n // Make sure we expect that this acks are going to happen.\n _this.sendUnwatchRequest(targetId);\n // Mark the query we send as being on behalf of an existence\n // filter mismatch, but don't actually retain that in\n // listenTargets. This ensures that we flag the first\n // re-listen this way without impacting future listens of\n // this target (that might happen e.g. on reconnect).\n var requestQueryData = new query_data_QueryData(query, targetId, QueryPurpose.ExistenceFilterMismatch);\n _this.sendWatchRequest(requestQueryData);\n }\n });\n promises.push(promise);\n }\n });\n return Promise.all(promises).then(function () {\n // Update in-memory resume tokens. LocalStore will update the\n // persistent view of these when applying the completed RemoteEvent.\n forEachNumber(remoteEvent.targetChanges, function (targetId, change) {\n if (change.resumeToken.length > 0) {\n var queryData = _this.listenTargets[targetId];\n // A watched target might have been removed already.\n if (queryData) {\n _this.listenTargets[targetId] = queryData.update({\n resumeToken: change.resumeToken,\n snapshotVersion: change.snapshotVersion\n });\n }\n }\n });\n // Finally handle remote event\n return _this.syncEngine.applyRemoteEvent(remoteEvent);\n });\n };\n /** Handles an error on a target */\n RemoteStore.prototype.handleTargetError = function (watchChange) {\n var _this = this;\n assert(!!watchChange.cause, 'Handling target error without a cause');\n var error = watchChange.cause;\n var promiseChain = Promise.resolve();\n watchChange.targetIds.forEach(function (targetId) {\n promiseChain = promiseChain.then(function () {\n if (contains(_this.listenTargets, targetId)) {\n delete _this.listenTargets[targetId];\n return _this.syncEngine.rejectListen(targetId, error);\n }\n else {\n // A watched target might have been removed already.\n return Promise.resolve();\n }\n });\n });\n return promiseChain;\n };\n RemoteStore.prototype.cleanUpWriteStreamState = function () {\n this.lastBatchSeen = BATCHID_UNKNOWN;\n this.pendingWrites = [];\n };\n /**\n * Notifies that there are new mutations to process in the queue. This is\n * typically called by SyncEngine after it has sent mutations to LocalStore.\n *\n */\n RemoteStore.prototype.fillWritePipeline = function () {\n var _this = this;\n if (!this.canWriteMutations()) {\n return Promise.resolve();\n }\n else {\n return this.localStore\n .nextMutationBatch(this.lastBatchSeen)\n .then(function (batch) {\n if (batch === null) {\n return Promise.resolve();\n }\n else {\n _this.commit(batch);\n return _this.fillWritePipeline();\n }\n });\n }\n };\n /**\n * Returns true if the backend can accept additional write requests.\n *\n * When sending mutations to the write stream (e.g. in fillWritePipeline),\n * call this method first to check if more mutations can be sent.\n *\n * Currently the only thing that can prevent the backend from accepting\n * write requests is if there are too many requests already outstanding. As\n * writes complete the backend will be able to accept more.\n */\n RemoteStore.prototype.canWriteMutations = function () {\n return (this.isNetworkEnabled() && this.pendingWrites.length < MAX_PENDING_WRITES);\n };\n // For testing\n RemoteStore.prototype.outstandingWrites = function () {\n return this.pendingWrites.length;\n };\n /**\n * Given mutations to commit, actually commits them to the Datastore. Note\n * that this does *not* return a Promise specifically because the AsyncQueue\n * should not block operations for this.\n */\n RemoteStore.prototype.commit = function (batch) {\n assert(this.canWriteMutations(), \"commit called when batches can't be written\");\n this.lastBatchSeen = batch.batchId;\n this.pendingWrites.push(batch);\n if (this.shouldStartWriteStream()) {\n this.startWriteStream();\n }\n else if (this.isNetworkEnabled() && this.writeStream.handshakeComplete) {\n this.writeStream.writeMutations(batch.mutations);\n }\n };\n RemoteStore.prototype.shouldStartWriteStream = function () {\n return (this.isNetworkEnabled() &&\n !this.writeStream.isStarted() &&\n this.pendingWrites.length > 0);\n };\n RemoteStore.prototype.startWriteStream = function () {\n assert(this.shouldStartWriteStream(), 'startWriteStream() called when shouldStartWriteStream() is false.');\n this.writeStream.start();\n };\n RemoteStore.prototype.onWriteStreamOpen = function () {\n this.writeStream.writeHandshake();\n return Promise.resolve();\n };\n RemoteStore.prototype.onWriteHandshakeComplete = function () {\n var _this = this;\n // Record the stream token.\n return this.localStore\n .setLastStreamToken(this.writeStream.lastStreamToken)\n .then(function () {\n // Drain any pending writes.\n //\n // Note that at this point pendingWrites contains mutations that\n // have already been accepted by fillWritePipeline/commitBatch. If\n // the pipeline is full, canWriteMutations will be false, despite\n // the fact that we actually need to send mutations over.\n //\n // This also means that this method indirectly respects the limits\n // imposed by canWriteMutations since writes can't be added to the\n // pendingWrites array when canWriteMutations is false. If the\n // limits imposed by canWriteMutations actually protect us from\n // DOSing ourselves then those limits won't be exceeded here and\n // we'll continue to make progress.\n for (var _i = 0, _a = _this.pendingWrites; _i < _a.length; _i++) {\n var batch = _a[_i];\n _this.writeStream.writeMutations(batch.mutations);\n }\n });\n };\n RemoteStore.prototype.onMutationResult = function (commitVersion, results) {\n var _this = this;\n // This is a response to a write containing mutations and should be\n // correlated to the first pending write.\n assert(this.pendingWrites.length > 0, 'Got result for empty pending writes');\n var batch = this.pendingWrites.shift();\n var success = mutation_batch_MutationBatchResult.from(batch, commitVersion, results, this.writeStream.lastStreamToken);\n return this.syncEngine.applySuccessfulWrite(success).then(function () {\n // It's possible that with the completion of this mutation another\n // slot has freed up.\n return _this.fillWritePipeline();\n });\n };\n RemoteStore.prototype.onWriteStreamClose = function (error) {\n var _this = this;\n assert(this.isNetworkEnabled(), 'onWriteStreamClose() should only be called when the network is enabled');\n // Ignore close if there are no pending writes.\n if (this.pendingWrites.length > 0) {\n assert(!!error, 'We have pending writes, but the write stream closed without an error');\n // A promise that is resolved after we processed the error\n var errorHandling = void 0;\n if (this.writeStream.handshakeComplete) {\n // This error affects the actual write.\n errorHandling = this.handleWriteError(error);\n }\n else {\n // If there was an error before the handshake has finished, it's\n // possible that the server is unable to process the stream token\n // we're sending. (Perhaps it's too old?)\n errorHandling = this.handleHandshakeError(error);\n }\n return errorHandling.then(function () {\n // The write stream might have been started by refilling the write\n // pipeline for failed writes\n if (_this.shouldStartWriteStream()) {\n _this.startWriteStream();\n }\n });\n }\n else {\n // No pending writes, nothing to do\n return Promise.resolve();\n }\n };\n RemoteStore.prototype.handleHandshakeError = function (error) {\n // Reset the token if it's a permanent error or the error code is\n // ABORTED, signaling the write stream is no longer valid.\n if (isPermanentError(error.code) || error.code === Code.ABORTED) {\n debug(remote_store_LOG_TAG, 'RemoteStore error before completed handshake; resetting stream token: ', this.writeStream.lastStreamToken);\n this.writeStream.lastStreamToken = emptyByteString();\n return this.localStore.setLastStreamToken(emptyByteString());\n }\n else {\n // Some other error, don't reset stream token. Our stream logic will\n // just retry with exponential backoff.\n return Promise.resolve();\n }\n };\n RemoteStore.prototype.handleWriteError = function (error) {\n var _this = this;\n if (isPermanentError(error.code)) {\n // This was a permanent error, the request itself was the problem\n // so it's not going to succeed if we resend it.\n var batch = this.pendingWrites.shift();\n // In this case it's also unlikely that the server itself is melting\n // down -- this was just a bad request so inhibit backoff on the next\n // restart.\n this.writeStream.inhibitBackoff();\n return this.syncEngine\n .rejectFailedWrite(batch.batchId, error)\n .then(function () {\n // It's possible that with the completion of this mutation\n // another slot has freed up.\n return _this.fillWritePipeline();\n });\n }\n else {\n // Transient error, just let the retry logic kick in.\n return Promise.resolve();\n }\n };\n RemoteStore.prototype.createTransaction = function () {\n return new transaction_Transaction(this.datastore);\n };\n RemoteStore.prototype.handleUserChange = function (user) {\n debug(remote_store_LOG_TAG, 'RemoteStore changing users: uid=', user.uid);\n // Tear down and re-create our network streams. This will ensure we get a fresh auth token\n // for the new user and re-fill the write pipeline with new mutations from the LocalStore\n // (since mutations are per-user).\n this.disableNetwork();\n return this.enableNetwork();\n };\n return RemoteStore;\n}());\n\n\n//# sourceMappingURL=remote_store.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/core/firestore_client.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar firestore_client_LOG_TAG = 'FirestoreClient';\n/**\n * FirestoreClient is a top-level class that constructs and owns all of the\n * pieces of the client SDK architecture. It is responsible for creating the\n * async queue that is shared by all of the other components in the system.\n */\nvar firestore_client_FirestoreClient = /** @class */ (function () {\n function FirestoreClient(platform, databaseInfo, credentials, \n /**\n * Asynchronous queue responsible for all of our internal processing. When\n * we get incoming work from the user (via public API) or the network\n * (incoming GRPC messages), we should always schedule onto this queue.\n * This ensures all of our work is properly serialized (e.g. we don't\n * start processing a new operation while the previous one is waiting for\n * an async I/O to complete).\n */\n asyncQueue) {\n this.platform = platform;\n this.databaseInfo = databaseInfo;\n this.credentials = credentials;\n this.asyncQueue = asyncQueue;\n }\n /**\n * Starts up the FirestoreClient, returning only whether or not enabling\n * persistence succeeded.\n *\n * The intent here is to \"do the right thing\" as far as users are concerned.\n * Namely, in cases where offline persistence is requested and possible,\n * enable it, but otherwise fall back to persistence disabled. For the most\n * part we expect this to succeed one way or the other so we don't expect our\n * users to actually wait on the firestore.enablePersistence Promise since\n * they generally won't care.\n *\n * Of course some users actually do care about whether or not persistence\n * was successfully enabled, so the Promise returned from this method\n * indicates this outcome.\n *\n * This presents a problem though: even before enablePersistence resolves or\n * rejects, users may have made calls to e.g. firestore.collection() which\n * means that the FirestoreClient in there will be available and will be\n * enqueuing actions on the async queue.\n *\n * Meanwhile any failure of an operation on the async queue causes it to\n * panic and reject any further work, on the premise that unhandled errors\n * are fatal.\n *\n * Consequently the fallback is handled internally here in start, and if the\n * fallback succeeds we signal success to the async queue even though the\n * start() itself signals failure.\n *\n * @param usePersistence Whether or not to attempt to enable persistence.\n * @returns A deferred result indicating the user-visible result of enabling\n * offline persistence. This method will reject this if IndexedDB fails to\n * start for any reason. If usePersistence is false this is\n * unconditionally resolved.\n */\n FirestoreClient.prototype.start = function (usePersistence) {\n var _this = this;\n // We defer our initialization until we get the current user from\n // setUserChangeListener(). We block the async queue until we got the\n // initial user and the initialization is completed. This will prevent\n // any scheduled work from happening before initialization is completed.\n //\n // If initializationDone resolved then the FirestoreClient is in a usable\n // state.\n var initializationDone = new Deferred();\n // If usePersistence is true, certain classes of errors while starting are\n // recoverable but only by falling back to persistence disabled.\n //\n // If there's an error in the first case but not in recovery we cannot\n // reject the promise blocking the async queue because this will cause the\n // async queue to panic.\n var persistenceResult = new Deferred();\n var initialized = false;\n this.credentials.setUserChangeListener(function (user) {\n if (!initialized) {\n initialized = true;\n _this.initializePersistence(usePersistence, persistenceResult)\n .then(function () { return _this.initializeRest(user); })\n .then(initializationDone.resolve, initializationDone.reject);\n }\n else {\n _this.asyncQueue.schedule(function () {\n return _this.handleUserChange(user);\n });\n }\n });\n // Block the async queue until initialization is done\n this.asyncQueue.schedule(function () {\n return initializationDone.promise;\n });\n // Return only the result of enabling persistence. Note that this does not\n // need to await the completion of initializationDone because the result of\n // this method should not reflect any other kind of failure to start.\n return persistenceResult.promise;\n };\n /** Enables the network connection and requeues all pending operations. */\n FirestoreClient.prototype.enableNetwork = function () {\n var _this = this;\n return this.asyncQueue.schedule(function () {\n return _this.remoteStore.enableNetwork();\n });\n };\n /**\n * Initializes persistent storage, attempting to use IndexedDB if\n * usePersistence is true or memory-only if false.\n *\n * If IndexedDB fails because it's already open in another tab or because the\n * platform can't possibly support our implementation then this method rejects\n * the persistenceResult and falls back on memory-only persistence.\n *\n * @param usePersistence indicates whether or not to use offline persistence\n * @param persistenceResult A deferred result indicating the user-visible\n * result of enabling offline persistence. This method will reject this if\n * IndexedDB fails to start for any reason. If usePersistence is false\n * this is unconditionally resolved.\n * @returns a Promise indicating whether or not initialization should\n * continue, i.e. that one of the persistence implementations actually\n * succeeded.\n */\n FirestoreClient.prototype.initializePersistence = function (usePersistence, persistenceResult) {\n var _this = this;\n if (usePersistence) {\n return this.startIndexedDbPersistence()\n .then(persistenceResult.resolve)\n .catch(function (error) {\n // Regardless of whether or not the retry succeeds, from an user\n // perspective, offline persistence has failed.\n persistenceResult.reject(error);\n // An unknown failure on the first stage shuts everything down.\n if (!_this.canFallback(error)) {\n return Promise.reject(error);\n }\n console.warn('Error enabling offline storage. Falling back to' +\n ' storage disabled: ' +\n error);\n return _this.startMemoryPersistence();\n });\n }\n else {\n // When usePersistence == false, enabling offline persistence is defined\n // to unconditionally succeed. This allows start() to have the same\n // signature for both cases, despite the fact that the returned promise\n // is only used in the enablePersistence call.\n persistenceResult.resolve();\n return this.startMemoryPersistence();\n }\n };\n FirestoreClient.prototype.canFallback = function (error) {\n return (error.code === Code.FAILED_PRECONDITION ||\n error.code === Code.UNIMPLEMENTED);\n };\n /**\n * Starts IndexedDB-based persistence.\n *\n * @returns A promise indicating success or failure.\n */\n FirestoreClient.prototype.startIndexedDbPersistence = function () {\n // TODO(http://b/33384523): For now we just disable garbage collection\n // when persistence is enabled.\n this.garbageCollector = new no_op_garbage_collector_NoOpGarbageCollector();\n var storagePrefix = indexeddb_persistence_IndexedDbPersistence.buildStoragePrefix(this.databaseInfo);\n // Opt to use proto3 JSON in case the platform doesn't support Uint8Array.\n var serializer = new serializer_JsonProtoSerializer(this.databaseInfo.databaseId, {\n useProto3Json: true\n });\n this.persistence = new indexeddb_persistence_IndexedDbPersistence(storagePrefix, serializer);\n return this.persistence.start();\n };\n /**\n * Starts Memory-backed persistence. In practice this cannot fail.\n *\n * @returns A promise that will successfully resolve.\n */\n FirestoreClient.prototype.startMemoryPersistence = function () {\n this.garbageCollector = new eager_garbage_collector_EagerGarbageCollector();\n this.persistence = new memory_persistence_MemoryPersistence();\n return this.persistence.start();\n };\n /**\n * Initializes the rest of the FirestoreClient, assuming the initial user\n * has been obtained from the credential provider and some persistence\n * implementation is available in this.persistence.\n */\n FirestoreClient.prototype.initializeRest = function (user) {\n var _this = this;\n return this.platform\n .loadConnection(this.databaseInfo)\n .then(function (connection) {\n _this.localStore = new local_store_LocalStore(_this.persistence, user, _this.garbageCollector);\n var serializer = _this.platform.newSerializer(_this.databaseInfo.databaseId);\n var datastore = new datastore_Datastore(_this.databaseInfo, _this.asyncQueue, connection, _this.credentials, serializer);\n var onlineStateChangedHandler = function (onlineState) {\n _this.eventMgr.onOnlineStateChanged(onlineState);\n };\n _this.remoteStore = new remote_store_RemoteStore(_this.databaseInfo, _this.asyncQueue, _this.localStore, datastore, onlineStateChangedHandler);\n _this.syncEngine = new sync_engine_SyncEngine(_this.localStore, _this.remoteStore, user);\n // Setup wiring between sync engine and remote store\n _this.remoteStore.syncEngine = _this.syncEngine;\n _this.eventMgr = new event_manager_EventManager(_this.syncEngine);\n // NOTE: RemoteStore depends on LocalStore (for persisting stream\n // tokens, refilling mutation queue, etc.) so must be started after\n // LocalStore.\n return _this.localStore.start();\n })\n .then(function () {\n return _this.remoteStore.start();\n });\n };\n FirestoreClient.prototype.handleUserChange = function (user) {\n this.asyncQueue.verifyOperationInProgress();\n debug(firestore_client_LOG_TAG, 'User Changed: ' + user.uid);\n return this.syncEngine.handleUserChange(user);\n };\n /** Disables the network connection. Pending operations will not complete. */\n FirestoreClient.prototype.disableNetwork = function () {\n var _this = this;\n return this.asyncQueue.schedule(function () {\n return _this.remoteStore.disableNetwork();\n });\n };\n FirestoreClient.prototype.shutdown = function () {\n var _this = this;\n return this.asyncQueue\n .schedule(function () {\n _this.credentials.removeUserChangeListener();\n return _this.remoteStore.shutdown();\n })\n .then(function () {\n // PORTING NOTE: LocalStore does not need an explicit shutdown on web.\n return _this.persistence.shutdown();\n });\n };\n FirestoreClient.prototype.listen = function (query, observer, options) {\n var _this = this;\n var listener = new event_manager_QueryListener(query, observer, options);\n this.asyncQueue.schedule(function () {\n return _this.eventMgr.listen(listener);\n });\n return listener;\n };\n FirestoreClient.prototype.unlisten = function (listener) {\n var _this = this;\n this.asyncQueue.schedule(function () {\n return _this.eventMgr.unlisten(listener);\n });\n };\n FirestoreClient.prototype.write = function (mutations) {\n var _this = this;\n var deferred = new Deferred();\n this.asyncQueue.schedule(function () { return _this.syncEngine.write(mutations, deferred); });\n return deferred.promise;\n };\n FirestoreClient.prototype.databaseId = function () {\n return this.databaseInfo.databaseId;\n };\n FirestoreClient.prototype.transaction = function (updateFunction) {\n var _this = this;\n // We have to wait for the async queue to be sure syncEngine is initialized.\n return this.asyncQueue\n .schedule(function () {\n return Promise.resolve();\n })\n .then(function () {\n return _this.syncEngine.runTransaction(updateFunction);\n });\n };\n return FirestoreClient;\n}());\n\n\n//# sourceMappingURL=firestore_client.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/async_observer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * A wrapper implementation of Observer that will dispatch events\n * asynchronously. To allow immediate silencing, a mute call is added which\n * causes events scheduled to no longer be raised.\n */\nvar AsyncObserver = /** @class */ (function () {\n function AsyncObserver(observer) {\n this.observer = observer;\n /**\n * When set to true, will not raise future events. Necessary to deal with\n * async detachment of listener.\n */\n this.muted = false;\n }\n AsyncObserver.prototype.next = function (value) {\n this.scheduleEvent(this.observer.next, value);\n };\n AsyncObserver.prototype.error = function (error) {\n this.scheduleEvent(this.observer.error, error);\n };\n AsyncObserver.prototype.mute = function () {\n this.muted = true;\n };\n AsyncObserver.prototype.scheduleEvent = function (eventHandler, event) {\n var _this = this;\n if (!this.muted) {\n setTimeout(function () {\n if (!_this.muted) {\n eventHandler(event);\n }\n }, 0);\n }\n };\n return AsyncObserver;\n}());\n\n\n//# sourceMappingURL=async_observer.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/util/async_queue.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar async_queue_AsyncQueue = /** @class */ (function () {\n function AsyncQueue() {\n // The last promise in the queue.\n this.tail = Promise.resolve();\n // The number of ops that are queued to be run in the future (i.e. they had a\n // delay that has not yet elapsed).\n this.delayedOpCount = 0;\n // Flag set while there's an outstanding AsyncQueue operation, used for\n // assertion sanity-checks.\n this.operationInProgress = false;\n }\n /**\n * Adds a new operation to the queue. Returns a promise that will be resolved\n * when the promise returned by the new operation is (with its value).\n *\n * Can optionally specify a delay to wait before queuing the operation.\n */\n AsyncQueue.prototype.schedule = function (op, delay) {\n var _this = this;\n if (this.failure) {\n fail('AsyncQueue is already failed: ' + this.failure.message);\n }\n if ((delay || 0) > 0) {\n this.delayedOpCount++;\n var deferred_1 = new Deferred();\n setTimeout(function () {\n _this.scheduleInternal(function () {\n return op().then(function (result) {\n deferred_1.resolve(result);\n });\n });\n _this.delayedOpCount--; // decrement once it's actually queued.\n }, delay);\n return deferred_1.promise;\n }\n else {\n return this.scheduleInternal(op);\n }\n };\n AsyncQueue.prototype.scheduleInternal = function (op) {\n var _this = this;\n this.tail = this.tail.then(function () {\n _this.operationInProgress = true;\n return op()\n .catch(function (error) {\n _this.failure = error;\n _this.operationInProgress = false;\n log_error('INTERNAL UNHANDLED ERROR: ', error.stack || error.message);\n throw error;\n })\n .then(function () {\n _this.operationInProgress = false;\n });\n });\n return this.tail;\n };\n /**\n * Verifies there's an operation currently in-progress on the AsyncQueue.\n * Unfortunately we can't verify that the running code is in the promise chain\n * of that operation, so this isn't a foolproof check, but it should be enough\n * to catch some bugs.\n */\n AsyncQueue.prototype.verifyOperationInProgress = function () {\n assert(this.operationInProgress, 'verifyOpInProgress() called when no op in progress on this queue.');\n };\n AsyncQueue.prototype.drain = function () {\n // TODO(mikelehen): This should perhaps also drain items that are queued to\n // run in the future (perhaps by artificially running them early), but since\n // no tests need that yet, I didn't bother for now.\n assert(this.delayedOpCount === 0, \"draining doesn't handle delayed ops.\");\n return this.schedule(function () { return Promise.resolve(undefined); });\n };\n return AsyncQueue;\n}());\n\n\n//# sourceMappingURL=async_queue.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/auth/user.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Simple wrapper around a nullable UID. Mostly exists to make code more\n * readable.\n */\nvar User = /** @class */ (function () {\n function User(uid) {\n this.uid = uid;\n }\n User.prototype.isUnauthenticated = function () {\n return this.uid == null;\n };\n /**\n * Returns a key representing this user, suitable for inclusion in a\n * dictionary.\n */\n User.prototype.toKey = function () {\n if (this.isUnauthenticated()) {\n return 'anonymous-user';\n }\n else {\n return 'uid:' + this.uid;\n }\n };\n User.prototype.equals = function (otherUser) {\n return otherUser.uid === this.uid;\n };\n /** A user with a null UID. */\n User.UNAUTHENTICATED = new User(null);\n // TODO(mikelehen): Look into getting a proper uid-equivalent for\n // non-FirebaseAuth providers.\n User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');\n User.FIRST_PARTY = new User('first-party-uid');\n return User;\n}());\n\n\n//# sourceMappingURL=user.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/credentials.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar OAuthToken = /** @class */ (function () {\n function OAuthToken(value, user) {\n this.user = user;\n this.type = 'OAuth';\n this.authHeaders = { Authorization: \"Bearer \" + value };\n }\n return OAuthToken;\n}());\n\n/** A CredentialsProvider that always yields an empty token. */\nvar credentials_EmptyCredentialsProvider = /** @class */ (function () {\n function EmptyCredentialsProvider() {\n /**\n * Stores the User listener registered with setUserChangeListener()\n * This isn't actually necessary since the UID never changes, but we use this\n * to verify the listen contract is adhered to in tests.\n */\n this.userListener = null;\n }\n EmptyCredentialsProvider.prototype.getToken = function (forceRefresh) {\n return Promise.resolve(null);\n };\n EmptyCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n assert(!this.userListener, 'Can only call setUserChangeListener() once.');\n this.userListener = listener;\n // Fire with initial user.\n listener(User.UNAUTHENTICATED);\n };\n EmptyCredentialsProvider.prototype.removeUserChangeListener = function () {\n assert(this.userListener !== null, 'removeUserChangeListener() when no listener registered');\n this.userListener = null;\n };\n return EmptyCredentialsProvider;\n}());\n\nvar credentials_FirebaseCredentialsProvider = /** @class */ (function () {\n function FirebaseCredentialsProvider(app) {\n var _this = this;\n this.app = app;\n /**\n * The auth token listener registered with FirebaseApp, retained here so we\n * can unregister it.\n */\n this.tokenListener = null;\n /**\n * Counter used to detect if the user changed while a getToken request was\n * outstanding.\n */\n this.userCounter = 0;\n /** The User listener registered with setUserChangeListener(). */\n this.userListener = null;\n // We listen for token changes but all we really care about is knowing when\n // the uid may have changed.\n this.tokenListener = function () {\n var newUser = _this.getUser();\n if (!_this.currentUser || !newUser.equals(_this.currentUser)) {\n _this.currentUser = newUser;\n _this.userCounter++;\n if (_this.userListener) {\n _this.userListener(_this.currentUser);\n }\n }\n };\n this.userCounter = 0;\n // Will fire at least once where we set this.currentUser\n this.app.INTERNAL.addAuthTokenListener(this.tokenListener);\n }\n FirebaseCredentialsProvider.prototype.getToken = function (forceRefresh) {\n var _this = this;\n assert(this.tokenListener != null, 'getToken cannot be called after listener removed.');\n // Take note of the current value of the userCounter so that this method can\n // fail (with an ABORTED error) if there is a user change while the request\n // is outstanding.\n var initialUserCounter = this.userCounter;\n return this.app.INTERNAL.getToken(forceRefresh).then(function (tokenData) {\n // Cancel the request since the user changed while the request was\n // outstanding so the response is likely for a previous user (which\n // user, we can't be sure).\n if (_this.userCounter !== initialUserCounter) {\n throw new FirestoreError(Code.ABORTED, 'getToken aborted due to uid change.');\n }\n else {\n if (tokenData) {\n assert(typeof tokenData.accessToken === 'string', 'Invalid tokenData returned from getToken():' + tokenData);\n return new OAuthToken(tokenData.accessToken, _this.currentUser);\n }\n else {\n return null;\n }\n }\n });\n };\n FirebaseCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n assert(!this.userListener, 'Can only call setUserChangeListener() once.');\n this.userListener = listener;\n // Fire the initial event, but only if we received the initial user\n if (this.currentUser) {\n listener(this.currentUser);\n }\n };\n FirebaseCredentialsProvider.prototype.removeUserChangeListener = function () {\n assert(this.tokenListener != null, 'removeUserChangeListener() called twice');\n assert(this.userListener !== null, 'removeUserChangeListener() called when no listener registered');\n this.app.INTERNAL.removeAuthTokenListener(this.tokenListener);\n this.tokenListener = null;\n this.userListener = null;\n };\n FirebaseCredentialsProvider.prototype.getUser = function () {\n // TODO(mikelehen): Remove this check once we're shipping with firebase.js.\n if (typeof this.app.INTERNAL.getUid !== 'function') {\n fail('This version of the Firestore SDK requires at least version' +\n ' 3.7.0 of firebase.js.');\n }\n var currentUid = this.app.INTERNAL.getUid();\n assert(currentUid === null || typeof currentUid === 'string', 'Received invalid UID: ' + currentUid);\n return new User(currentUid);\n };\n return FirebaseCredentialsProvider;\n}());\n\n// Wrap a google-auth-library client as a CredentialsProvider.\n// NOTE: grpc-connection can natively accept a google-auth-library\n// client via createFromGoogleCredential(), but we opt to plumb the tokens\n// through our CredentialsProvider interface, at least for now.\nvar credentials_GoogleCredentialsProvider = /** @class */ (function () {\n function GoogleCredentialsProvider(authClient) {\n this.authClient = authClient;\n }\n GoogleCredentialsProvider.prototype.getToken = function (forceRefresh) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // TODO(b/32935141): ideally this would be declared as an extern\n _this.authClient['getAccessToken'](function (error, tokenLiteral) {\n if (error) {\n reject(error);\n }\n else {\n resolve(new OAuthToken(tokenLiteral, User.GOOGLE_CREDENTIALS));\n }\n });\n });\n };\n // NOTE: A google-auth-library client represents an immutable \"user\", so\n // once we fire the initial event, it'll never change.\n GoogleCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n // Fire with initial uid.\n listener(User.GOOGLE_CREDENTIALS);\n };\n GoogleCredentialsProvider.prototype.removeUserChangeListener = function () { };\n return GoogleCredentialsProvider;\n}());\n\n/*\n * FirstPartyToken provides a fresh token each time its value\n * is requested, because if the token is too old, requests will be rejected.\n * TODO(b/33147818) this implementation violates the current assumption that\n * tokens are immutable. We need to either revisit this assumption or come\n * up with some way for FPA to use the listen/unlisten interface.\n */\nvar credentials_FirstPartyToken = /** @class */ (function () {\n function FirstPartyToken(gapi, sessionIndex) {\n this.gapi = gapi;\n this.sessionIndex = sessionIndex;\n this.type = 'FirstParty';\n this.user = User.FIRST_PARTY;\n assert(this.gapi &&\n this.gapi['auth'] &&\n this.gapi['auth']['getAuthHeaderValueForFirstParty'], 'unexpected gapi interface');\n }\n Object.defineProperty(FirstPartyToken.prototype, \"authHeaders\", {\n get: function () {\n return {\n Authorization: this.gapi['auth']['getAuthHeaderValueForFirstParty']([]),\n 'X-Goog-AuthUser': this.sessionIndex\n };\n },\n enumerable: true,\n configurable: true\n });\n return FirstPartyToken;\n}());\n\n/*\n * Provides user credentials required for the Firestore JavaScript SDK\n * to authenticate the user, using technique that is only available\n * to applications hosted by Google.\n */\nvar credentials_FirstPartyCredentialsProvider = /** @class */ (function () {\n function FirstPartyCredentialsProvider(gapi, sessionIndex) {\n this.gapi = gapi;\n this.sessionIndex = sessionIndex;\n assert(this.gapi &&\n this.gapi['auth'] &&\n this.gapi['auth']['getAuthHeaderValueForFirstParty'], 'unexpected gapi interface');\n }\n FirstPartyCredentialsProvider.prototype.getToken = function (forceRefresh) {\n return Promise.resolve(new credentials_FirstPartyToken(this.gapi, this.sessionIndex));\n };\n // TODO(33108925): can someone switch users w/o a page refresh?\n // TODO(33110621): need to understand token/session lifecycle\n FirstPartyCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n // Fire with initial uid.\n listener(User.FIRST_PARTY);\n };\n FirstPartyCredentialsProvider.prototype.removeUserChangeListener = function () { };\n return FirstPartyCredentialsProvider;\n}());\n\n/**\n * Builds a CredentialsProvider depending on the type of\n * the credentials passed in.\n */\nfunction makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new credentials_EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'google-auth':\n return new credentials_GoogleCredentialsProvider(credentials.client);\n case 'gapi':\n return new credentials_FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}\n\n//# sourceMappingURL=credentials.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/observer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n\n//# sourceMappingURL=observer.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/field_value.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar api_field_value___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n/**\n * An opaque base class for FieldValue sentinel objects in our public API,\n * with public static methods for creating said sentinel objects.\n */\n// tslint:disable-next-line:class-as-namespace We use this as a base class.\nvar FieldValueImpl = /** @class */ (function () {\n function FieldValueImpl() {\n }\n FieldValueImpl.delete = function () {\n return DeleteFieldValueImpl.instance;\n };\n FieldValueImpl.serverTimestamp = function () {\n return ServerTimestampFieldValueImpl.instance;\n };\n return FieldValueImpl;\n}());\n\nvar DeleteFieldValueImpl = /** @class */ (function (_super) {\n api_field_value___extends(DeleteFieldValueImpl, _super);\n function DeleteFieldValueImpl() {\n return _super.call(this) || this;\n }\n /** Singleton instance. */\n DeleteFieldValueImpl.instance = new DeleteFieldValueImpl();\n return DeleteFieldValueImpl;\n}(FieldValueImpl));\n\nvar ServerTimestampFieldValueImpl = /** @class */ (function (_super) {\n api_field_value___extends(ServerTimestampFieldValueImpl, _super);\n function ServerTimestampFieldValueImpl() {\n return _super.call(this) || this;\n }\n /** Singleton instance. */\n ServerTimestampFieldValueImpl.instance = new ServerTimestampFieldValueImpl();\n return ServerTimestampFieldValueImpl;\n}(FieldValueImpl));\n\n// Public instance that disallows construction at runtime. This constructor is\n// used when exporting FieldValueImpl on firebase.firestore.FieldValue and will\n// be called FieldValue publicly. Internally we still use FieldValueImpl which\n// has a type-checked private constructor. Note that FieldValueImpl and\n// PublicFieldValue can be used interchangeably in instanceof checks.\n// For our internal TypeScript code PublicFieldValue doesn't exist as a type,\n// and so we need to use FieldValueImpl as type and export it too.\n// tslint:disable-next-line:variable-name We treat this as a class name.\nvar PublicFieldValue = makeConstructorPrivate(FieldValueImpl, 'Use FieldValue.() instead.');\n\n//# sourceMappingURL=field_value.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/user_data_converter.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar RESERVED_FIELD_REGEX = /^__.*__$/;\n/** The result of parsing document data (e.g. for a setData call). */\nvar user_data_converter_ParsedSetData = /** @class */ (function () {\n function ParsedSetData(data, fieldMask, fieldTransforms) {\n this.data = data;\n this.fieldMask = fieldMask;\n this.fieldTransforms = fieldTransforms;\n }\n ParsedSetData.prototype.toMutations = function (key, precondition) {\n var mutations = [];\n if (this.fieldMask !== null) {\n mutations.push(new mutation_PatchMutation(key, this.data, this.fieldMask, precondition));\n }\n else {\n mutations.push(new mutation_SetMutation(key, this.data, precondition));\n }\n if (this.fieldTransforms.length > 0) {\n mutations.push(new mutation_TransformMutation(key, this.fieldTransforms));\n }\n return mutations;\n };\n return ParsedSetData;\n}());\n\n/** The result of parsing \"update\" data (i.e. for an updateData call). */\nvar user_data_converter_ParsedUpdateData = /** @class */ (function () {\n function ParsedUpdateData(data, fieldMask, fieldTransforms) {\n this.data = data;\n this.fieldMask = fieldMask;\n this.fieldTransforms = fieldTransforms;\n }\n ParsedUpdateData.prototype.toMutations = function (key, precondition) {\n var mutations = [\n new mutation_PatchMutation(key, this.data, this.fieldMask, precondition)\n ];\n if (this.fieldTransforms.length > 0) {\n mutations.push(new mutation_TransformMutation(key, this.fieldTransforms));\n }\n return mutations;\n };\n return ParsedUpdateData;\n}());\n\n/*\n * Represents what type of API method provided the data being parsed; useful\n * for determining which error conditions apply during parsing and providing\n * better error messages.\n */\nvar UserDataSource;\n(function (UserDataSource) {\n UserDataSource[UserDataSource[\"Set\"] = 0] = \"Set\";\n UserDataSource[UserDataSource[\"Update\"] = 1] = \"Update\";\n UserDataSource[UserDataSource[\"MergeSet\"] = 2] = \"MergeSet\";\n UserDataSource[UserDataSource[\"QueryValue\"] = 3] = \"QueryValue\"; // from a where clause or cursor bound\n})(UserDataSource || (UserDataSource = {}));\nfunction isWrite(dataSource) {\n switch (dataSource) {\n case UserDataSource.Set: // fall through\n case UserDataSource.MergeSet: // fall through\n case UserDataSource.Update:\n return true;\n case UserDataSource.QueryValue:\n return false;\n default:\n throw fail(\"Unexpected case for UserDataSource: \" + dataSource);\n }\n}\n/** A \"context\" object passed around while parsing user data. */\nvar user_data_converter_ParseContext = /** @class */ (function () {\n /**\n * Initializes a ParseContext with the given source and path.\n *\n * @param dataSource Indicates what kind of API method this data came from.\n * @param methodName The name of the method the user called to create this\n * ParseContext.\n * @param path A path within the object being parsed. This could be an empty\n * path (in which case the context represents the root of the data being\n * parsed), or a nonempty path (indicating the context represents a nested\n * location within the data).\n * @param arrayElement Whether or not this context corresponds to an element\n * of an array.\n * @param fieldTransforms A mutable list of field transforms encountered while\n * parsing the data.\n * @param fieldMask A mutable list of field paths encountered while parsing\n * the data.\n *\n * TODO(b/34871131): We don't support array paths right now, so path can be\n * null to indicate the context represents any location within an array (in\n * which case certain features will not work and errors will be somewhat\n * compromised).\n */\n function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }\n ParseContext.prototype.childContextForField = function (field) {\n var childPath = this.path == null ? null : this.path.child(field);\n var context = new ParseContext(this.dataSource, this.methodName, childPath, \n /*arrayElement=*/ false, this.fieldTransforms, this.fieldMask);\n context.validatePathSegment(field);\n return context;\n };\n ParseContext.prototype.childContextForFieldPath = function (field) {\n var childPath = this.path == null ? null : this.path.child(field);\n var context = new ParseContext(this.dataSource, this.methodName, childPath, \n /*arrayElement=*/ false, this.fieldTransforms, this.fieldMask);\n context.validatePath();\n return context;\n };\n ParseContext.prototype.childContextForArray = function (index) {\n // TODO(b/34871131): We don't support array paths right now; so make path\n // null.\n return new ParseContext(this.dataSource, this.methodName, \n /*path=*/ null, \n /*arrayElement=*/ true, this.fieldTransforms, this.fieldMask);\n };\n ParseContext.prototype.createError = function (reason) {\n var fieldDescription = this.path === null || this.path.isEmpty()\n ? ''\n : \" (found in field \" + this.path.toString() + \")\";\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + this.methodName + \"() called with invalid data. \" +\n reason +\n fieldDescription);\n };\n ParseContext.prototype.validatePath = function () {\n // TODO(b/34871131): Remove null check once we have proper paths for fields\n // within arrays.\n if (this.path === null) {\n return;\n }\n for (var i = 0; i < this.path.length; i++) {\n this.validatePathSegment(this.path.get(i));\n }\n };\n ParseContext.prototype.validatePathSegment = function (segment) {\n if (isWrite(this.dataSource) && RESERVED_FIELD_REGEX.test(segment)) {\n throw this.createError('Document fields cannot begin and end with __');\n }\n };\n ParseContext.prototype.isWrite = function () {\n return (this.dataSource === UserDataSource.Set ||\n this.dataSource === UserDataSource.Update);\n };\n return ParseContext;\n}());\n/**\n * A placeholder object for DocumentReferences in this file, in order to\n * avoid a circular dependency. See the comments for `DataPreConverter` for\n * the full context.\n */\nvar DocumentKeyReference = /** @class */ (function () {\n function DocumentKeyReference(databaseId, key) {\n this.databaseId = databaseId;\n this.key = key;\n }\n return DocumentKeyReference;\n}());\n\n/**\n * Helper for parsing raw user input (provided via the API) into internal model\n * classes.\n */\nvar user_data_converter_UserDataConverter = /** @class */ (function () {\n function UserDataConverter(preConverter) {\n this.preConverter = preConverter;\n }\n /** Parse document data from a non-merge set() call.*/\n UserDataConverter.prototype.parseSetData = function (methodName, input) {\n var context = new user_data_converter_ParseContext(UserDataSource.Set, methodName, path_FieldPath.EMPTY_PATH);\n validatePlainObject('Data must be an object, but it was:', context, input);\n var updateData = this.parseData(input, context);\n return new user_data_converter_ParsedSetData(updateData, \n /* fieldMask= */ null, context.fieldTransforms);\n };\n /** Parse document data from a set() call with '{merge:true}'. */\n UserDataConverter.prototype.parseMergeData = function (methodName, input) {\n var context = new user_data_converter_ParseContext(UserDataSource.MergeSet, methodName, path_FieldPath.EMPTY_PATH);\n validatePlainObject('Data must be an object, but it was:', context, input);\n var updateData = this.parseData(input, context);\n var fieldMask = new mutation_FieldMask(context.fieldMask);\n return new user_data_converter_ParsedSetData(updateData, fieldMask, context.fieldTransforms);\n };\n /** Parse update data from an update() call. */\n UserDataConverter.prototype.parseUpdateData = function (methodName, input) {\n var _this = this;\n var context = new user_data_converter_ParseContext(UserDataSource.Update, methodName, path_FieldPath.EMPTY_PATH);\n validatePlainObject('Data must be an object, but it was:', context, input);\n var fieldMaskPaths = [];\n var updateData = field_value_ObjectValue.EMPTY;\n forEach(input, function (key, value) {\n var path = fieldPathFromDotSeparatedString(methodName, key);\n var childContext = context.childContextForFieldPath(path);\n value = _this.runPreConverter(value, childContext);\n if (value instanceof DeleteFieldValueImpl) {\n // Add it to the field mask, but don't add anything to updateData.\n fieldMaskPaths.push(path);\n }\n else {\n var parsedValue = _this.parseData(value, childContext);\n if (parsedValue != null) {\n fieldMaskPaths.push(path);\n updateData = updateData.set(path, parsedValue);\n }\n }\n });\n var mask = new mutation_FieldMask(fieldMaskPaths);\n return new user_data_converter_ParsedUpdateData(updateData, mask, context.fieldTransforms);\n };\n /** Parse update data from a list of field/value arguments. */\n UserDataConverter.prototype.parseUpdateVarargs = function (methodName, field, value, moreFieldsAndValues) {\n var context = new user_data_converter_ParseContext(UserDataSource.Update, methodName, path_FieldPath.EMPTY_PATH);\n var keys = [fieldPathFromArgument(methodName, field)];\n var values = [value];\n if (moreFieldsAndValues.length % 2 !== 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() needs to be called with an even number \" +\n 'of arguments that alternate between field names and values.');\n }\n for (var i = 0; i < moreFieldsAndValues.length; i += 2) {\n keys.push(fieldPathFromArgument(methodName, moreFieldsAndValues[i]));\n values.push(moreFieldsAndValues[i + 1]);\n }\n var fieldMaskPaths = [];\n var updateData = field_value_ObjectValue.EMPTY;\n for (var i = 0; i < keys.length; ++i) {\n var path = keys[i];\n var childContext = context.childContextForFieldPath(path);\n var value_1 = this.runPreConverter(values[i], childContext);\n if (value_1 instanceof DeleteFieldValueImpl) {\n // Add it to the field mask, but don't add anything to updateData.\n fieldMaskPaths.push(path);\n }\n else {\n var parsedValue = this.parseData(value_1, childContext);\n if (parsedValue != null) {\n fieldMaskPaths.push(path);\n updateData = updateData.set(path, parsedValue);\n }\n }\n }\n var mask = new mutation_FieldMask(fieldMaskPaths);\n return new user_data_converter_ParsedUpdateData(updateData, mask, context.fieldTransforms);\n };\n /**\n * Parse a \"query value\" (e.g. value in a where filter or a value in a cursor\n * bound).\n */\n UserDataConverter.prototype.parseQueryValue = function (methodName, input) {\n var context = new user_data_converter_ParseContext(UserDataSource.QueryValue, methodName, path_FieldPath.EMPTY_PATH);\n var parsed = this.parseData(input, context);\n assert(parsed != null, 'Parsed data should not be null.');\n assert(context.fieldTransforms.length === 0, 'Field transforms should have been disallowed.');\n return parsed;\n };\n /** Sends data through this.preConverter, handling any thrown errors. */\n UserDataConverter.prototype.runPreConverter = function (input, context) {\n try {\n return this.preConverter(input);\n }\n catch (e) {\n var message = errorMessage(e);\n throw context.createError(message);\n }\n };\n /**\n * Internal helper for parsing user data.\n *\n * @param input Data to be parsed.\n * @param context A context object representing the current path being parsed,\n * the source of the data being parsed, etc.\n * @return The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */\n UserDataConverter.prototype.parseData = function (input, context) {\n input = this.runPreConverter(input, context);\n if (input instanceof Array) {\n // TODO(b/34871131): Include the path containing the array in the error\n // message.\n if (context.arrayElement) {\n throw context.createError('Nested arrays are not supported');\n }\n // If context.path is null we are already inside an array and we don't\n // support field mask paths more granular than the top-level array.\n if (context.path) {\n context.fieldMask.push(context.path);\n }\n return this.parseArray(input, context);\n }\n else if (looksLikeJsonObject(input)) {\n validatePlainObject('Unsupported field value:', context, input);\n return this.parseObject(input, context);\n }\n else {\n // If context.path is null, we are inside an array and we should have\n // already added the root of the array to the field mask.\n if (context.path) {\n context.fieldMask.push(context.path);\n }\n return this.parseScalarValue(input, context);\n }\n };\n UserDataConverter.prototype.parseArray = function (array, context) {\n var result = [];\n var entryIndex = 0;\n for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {\n var entry = array_1[_i];\n var parsedEntry = this.parseData(entry, context.childContextForArray(entryIndex));\n if (parsedEntry == null) {\n // Just include nulls in the array for fields being replaced with a\n // sentinel.\n parsedEntry = NullValue.INSTANCE;\n }\n result.push(parsedEntry);\n entryIndex++;\n }\n return new field_value_ArrayValue(result);\n };\n UserDataConverter.prototype.parseObject = function (obj, context) {\n var _this = this;\n var result = new sorted_map_SortedMap(primitiveComparator);\n forEach(obj, function (key, val) {\n var parsedValue = _this.parseData(val, context.childContextForField(key));\n if (parsedValue != null) {\n result = result.insert(key, parsedValue);\n }\n });\n return new field_value_ObjectValue(result);\n };\n /**\n * Helper to parse a scalar value (i.e. not an Object or Array)\n *\n * @return The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */\n UserDataConverter.prototype.parseScalarValue = function (value, context) {\n if (value === null) {\n return NullValue.INSTANCE;\n }\n else if (typeof value === 'number') {\n if (isSafeInteger(value)) {\n return new IntegerValue(value);\n }\n else {\n return new DoubleValue(value);\n }\n }\n else if (typeof value === 'boolean') {\n return field_value_BooleanValue.of(value);\n }\n else if (typeof value === 'string') {\n return new field_value_StringValue(value);\n }\n else if (value instanceof Date) {\n return new TimestampValue(timestamp_Timestamp.fromDate(value));\n }\n else if (value instanceof geo_point_GeoPoint) {\n return new GeoPointValue(value);\n }\n else if (value instanceof blob_Blob) {\n return new BlobValue(value);\n }\n else if (value instanceof DocumentKeyReference) {\n return new field_value_RefValue(value.databaseId, value.key);\n }\n else if (value instanceof FieldValueImpl) {\n if (value instanceof DeleteFieldValueImpl) {\n if (context.dataSource == UserDataSource.MergeSet) {\n return null;\n }\n else if (context.dataSource === UserDataSource.Update) {\n assert(context.path == null || context.path.length > 0, 'FieldValue.delete() at the top level should have already' +\n ' been handled.');\n throw context.createError('FieldValue.delete() can only appear at the top level ' +\n 'of your update data');\n }\n else {\n // We shouldn't encounter delete sentinels for queries or non-merge set() calls.\n throw context.createError('FieldValue.delete() can only be used with update() and set() with {merge:true}');\n }\n }\n else if (value instanceof ServerTimestampFieldValueImpl) {\n if (!isWrite(context.dataSource)) {\n throw context.createError('FieldValue.serverTimestamp() can only be used with set()' +\n ' and update()');\n }\n if (context.path === null) {\n throw context.createError('FieldValue.serverTimestamp() is not currently' +\n ' supported inside arrays');\n }\n context.fieldTransforms.push(new FieldTransform(context.path, ServerTimestampTransform.instance));\n // Return null so this value is omitted from the parsed result.\n return null;\n }\n else {\n return fail('Unknown FieldValue type: ' + value);\n }\n }\n else {\n throw context.createError(\"Unsupported field value: \" + valueDescription(value));\n }\n };\n return UserDataConverter;\n}());\n\n/**\n * Checks whether an object looks like a JSON object that should be converted\n * into a struct. Normal class/prototype instances are considered to look like\n * JSON objects since they should be converted to a struct value. Arrays, Dates,\n * GeoPoints, etc. are not considered to look like JSON objects since they map\n * to specific FieldValue types other than ObjectValue.\n */\nfunction looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof geo_point_GeoPoint) &&\n !(input instanceof blob_Blob) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof FieldValueImpl));\n}\nfunction validatePlainObject(message, context, input) {\n if (!looksLikeJsonObject(input) || !isPlainObject(input)) {\n var description = valueDescription(input);\n if (description === 'an object') {\n // Massage the error if it was an object.\n throw context.createError(message + ' a custom object');\n }\n else {\n throw context.createError(message + ' ' + description);\n }\n }\n}\n/**\n * Helper that calls fromDotSeparatedString() but wraps any error thrown.\n */\nfunction fieldPathFromArgument(methodName, path) {\n if (path instanceof field_path_FieldPath) {\n return path._internalPath;\n }\n else if (typeof path === 'string') {\n return fieldPathFromDotSeparatedString(methodName, path);\n }\n else {\n var message = 'Field path arguments must be of type string or FieldPath.';\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}\n/**\n * Wraps fromDotSeparatedString with an error message about the method that\n * was thrown.\n * @param methodName The publicly visible method name\n * @param path The dot-separated string form of a field path which will be split\n * on dots.\n */\nfunction fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}\n/**\n * Extracts the message from a caught exception, which should be an Error object\n * though JS doesn't guarantee that.\n */\nfunction errorMessage(error) {\n return error instanceof Error ? error.message : error.toString();\n}\n\n//# sourceMappingURL=user_data_converter.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/api/database.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar database___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n// tslint:disable:strip-private-property-underscore\nvar DEFAULT_HOST = 'firestore.googleapis.com';\nvar DEFAULT_SSL = true;\n/**\n * A concrete type describing all the values that can be applied via a\n * user-supplied firestore.Settings object. This is a separate type so that\n * defaults can be supplied and the value can be checked for equality.\n */\nvar database_FirestoreSettings = /** @class */ (function () {\n function FirestoreSettings(settings) {\n if (settings.host === undefined) {\n if (settings.ssl !== undefined) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Can't provide ssl option if host option is not set\");\n }\n this.host = DEFAULT_HOST;\n this.ssl = DEFAULT_SSL;\n }\n else {\n validateNamedType('settings', 'string', 'host', settings.host);\n this.host = settings.host;\n validateNamedOptionalType('settings', 'boolean', 'ssl', settings.ssl);\n this.ssl = defaulted(settings.ssl, DEFAULT_SSL);\n }\n validateOptionNames('settings', settings, ['host', 'ssl', 'credentials']);\n validateNamedOptionalType('settings', 'object', 'credentials', settings.credentials);\n this.credentials = settings.credentials;\n }\n FirestoreSettings.prototype.equals = function (other) {\n return (this.host === other.host &&\n this.ssl === other.ssl &&\n this.credentials === other.credentials);\n };\n return FirestoreSettings;\n}());\nvar FirestoreConfig = /** @class */ (function () {\n function FirestoreConfig() {\n }\n return FirestoreConfig;\n}());\n/**\n * The root reference to the database.\n */\nvar database_Firestore = /** @class */ (function () {\n function Firestore(databaseIdOrApp) {\n var _this = this;\n this.INTERNAL = {\n delete: function () {\n if (_this._firestoreClient) {\n return _this._firestoreClient.shutdown();\n }\n else {\n return Promise.resolve();\n }\n },\n // Exposed via INTERNAL for use in tests.\n disableNetwork: function () { return _this._firestoreClient.disableNetwork(); },\n enableNetwork: function () { return _this._firestoreClient.enableNetwork(); }\n };\n var config = new FirestoreConfig();\n if (typeof databaseIdOrApp.options === 'object') {\n // This is very likely a Firebase app object\n // TODO(b/34177605): Can we somehow use instanceof?\n var app = databaseIdOrApp;\n config.firebaseApp = app;\n config.databaseId = Firestore.databaseIdFromApp(app);\n config.persistenceKey = config.firebaseApp.name;\n config.credentials = new credentials_FirebaseCredentialsProvider(app);\n }\n else {\n var external_1 = databaseIdOrApp;\n if (!external_1.projectId) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide projectId');\n }\n config.databaseId = new database_info_DatabaseId(external_1.projectId, external_1.database);\n // Use a default persistenceKey that lines up with FirebaseApp.\n config.persistenceKey = '[DEFAULT]';\n config.credentials = new credentials_EmptyCredentialsProvider();\n }\n config.settings = new database_FirestoreSettings({});\n this._config = config;\n this._databaseId = config.databaseId;\n }\n Firestore.prototype.settings = function (settingsLiteral) {\n validateExactNumberOfArgs('Firestore.settings', arguments, 1);\n validateArgType('Firestore.settings', 'object', 1, settingsLiteral);\n if (contains(settingsLiteral, 'persistence')) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"persistence\" is now specified with a separate call to ' +\n 'firestore.enablePersistence().');\n }\n var newSettings = new database_FirestoreSettings(settingsLiteral);\n if (this._firestoreClient && !this._config.settings.equals(newSettings)) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'Firestore has already been started and its settings can no longer ' +\n 'be changed. You can only call settings() before calling any other ' +\n 'methods on a Firestore object.');\n }\n this._config.settings = newSettings;\n if (newSettings.credentials !== undefined) {\n this._config.credentials = makeCredentialsProvider(newSettings.credentials);\n }\n };\n Firestore.prototype.enablePersistence = function () {\n if (this._firestoreClient) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'Firestore has already been started and persistence can no longer ' +\n 'be enabled. You can only call enablePersistence() before calling ' +\n 'any other methods on a Firestore object.');\n }\n return this.configureClient(/* persistence= */ true);\n };\n Firestore.prototype.ensureClientConfigured = function () {\n if (!this._firestoreClient) {\n this.configureClient(/* persistence= */ false);\n }\n return this._firestoreClient;\n };\n Firestore.prototype.configureClient = function (persistence) {\n var _this = this;\n assert(!!this._config.settings.host, 'FirestoreSettings.host cannot be falsey');\n assert(!this._firestoreClient, 'configureClient() called multiple times');\n var databaseInfo = new DatabaseInfo(this._config.databaseId, this._config.persistenceKey, this._config.settings.host, this._config.settings.ssl);\n var preConverter = function (value) {\n if (value instanceof database_DocumentReference) {\n var thisDb = _this._config.databaseId;\n var otherDb = value.firestore._config.databaseId;\n if (!otherDb.equals(thisDb)) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Document reference is for database ' +\n (otherDb.projectId + \"/\" + otherDb.database + \" but should be \") +\n (\"for database \" + thisDb.projectId + \"/\" + thisDb.database));\n }\n return new DocumentKeyReference(_this._config.databaseId, value._key);\n }\n else {\n return value;\n }\n };\n this._dataConverter = new user_data_converter_UserDataConverter(preConverter);\n this._firestoreClient = new firestore_client_FirestoreClient(platform_PlatformSupport.getPlatform(), databaseInfo, this._config.credentials, new async_queue_AsyncQueue());\n return this._firestoreClient.start(persistence);\n };\n Firestore.databaseIdFromApp = function (app) {\n var options = app.options;\n if (!contains(options, 'projectId')) {\n // TODO(b/62673263): We can safely remove the special handling of\n // 'firestoreId' once alpha testers have upgraded.\n if (contains(options, 'firestoreId')) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"firestoreId\" is now specified as \"projectId\" in ' +\n 'firebase.initializeApp.');\n }\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"projectId\" not provided in firebase.initializeApp.');\n }\n if (contains(options, 'firestoreOptions')) {\n // TODO(b/62673263): We can safely remove the special handling of\n // 'firestoreOptions' once alpha testers have upgraded.\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"firestoreOptions\" values are now specified with ' +\n 'Firestore.settings()');\n }\n var projectId = options['projectId'];\n if (!projectId || typeof projectId !== 'string') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'projectId must be a string in FirebaseApp.options');\n }\n return new database_info_DatabaseId(projectId);\n };\n Object.defineProperty(Firestore.prototype, \"app\", {\n get: function () {\n if (!this._config.firebaseApp) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available');\n }\n return this._config.firebaseApp;\n },\n enumerable: true,\n configurable: true\n });\n Firestore.prototype.collection = function (pathString) {\n validateExactNumberOfArgs('Firestore.collection', arguments, 1);\n validateArgType('Firestore.collection', 'string', 1, pathString);\n if (!pathString) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide a non-empty collection path to collection()');\n }\n this.ensureClientConfigured();\n return new database_CollectionReference(path_ResourcePath.fromString(pathString), this);\n };\n Firestore.prototype.doc = function (pathString) {\n validateExactNumberOfArgs('Firestore.doc', arguments, 1);\n validateArgType('Firestore.doc', 'string', 1, pathString);\n if (!pathString) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide a non-empty document path to doc()');\n }\n this.ensureClientConfigured();\n return database_DocumentReference.forPath(path_ResourcePath.fromString(pathString), this);\n };\n Firestore.prototype.runTransaction = function (updateFunction) {\n var _this = this;\n validateExactNumberOfArgs('Firestore.runTransaction', arguments, 1);\n validateArgType('Firestore.runTransaction', 'function', 1, updateFunction);\n return this.ensureClientConfigured().transaction(function (transaction) {\n return updateFunction(new database_Transaction(_this, transaction));\n });\n };\n Firestore.prototype.batch = function () {\n this.ensureClientConfigured();\n return new database_WriteBatch(this);\n };\n Object.defineProperty(Firestore, \"logLevel\", {\n get: function () {\n switch (getLogLevel()) {\n case LogLevel.DEBUG:\n return 'debug';\n case LogLevel.ERROR:\n return 'error';\n case LogLevel.SILENT:\n return 'silent';\n default:\n return fail('Unknown log level: ' + getLogLevel());\n }\n },\n enumerable: true,\n configurable: true\n });\n Firestore.setLogLevel = function (level) {\n validateExactNumberOfArgs('Firestore.setLogLevel', arguments, 1);\n validateArgType('Firestore.setLogLevel', 'string', 1, level);\n switch (level) {\n case 'debug':\n setLogLevel(LogLevel.DEBUG);\n break;\n case 'error':\n setLogLevel(LogLevel.ERROR);\n break;\n case 'silent':\n setLogLevel(LogLevel.SILENT);\n break;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid log level: ' + level);\n }\n };\n return Firestore;\n}());\n\n/**\n * A reference to a transaction.\n */\nvar database_Transaction = /** @class */ (function () {\n function Transaction(_firestore, _transaction) {\n this._firestore = _firestore;\n this._transaction = _transaction;\n }\n Transaction.prototype.get = function (documentRef) {\n var _this = this;\n validateExactNumberOfArgs('Transaction.get', arguments, 1);\n var ref = validateReference('Transaction.get', documentRef, this._firestore);\n return this._transaction\n .lookup([ref._key])\n .then(function (docs) {\n if (!docs || docs.length !== 1) {\n return fail('Mismatch in docs returned from document lookup.');\n }\n var doc = docs[0];\n if (doc instanceof document_NoDocument) {\n return new database_DocumentSnapshot(_this._firestore, ref._key, null, false);\n }\n return new database_DocumentSnapshot(_this._firestore, ref._key, doc, false);\n });\n };\n Transaction.prototype.set = function (documentRef, value, options) {\n validateBetweenNumberOfArgs('Transaction.set', arguments, 2, 3);\n var ref = validateReference('Transaction.set', documentRef, this._firestore);\n options = validateSetOptions('Transaction.set', options);\n var parsed = options.merge\n ? this._firestore._dataConverter.parseMergeData('Transaction.set', value)\n : this._firestore._dataConverter.parseSetData('Transaction.set', value);\n this._transaction.set(ref._key, parsed);\n return this;\n };\n Transaction.prototype.update = function (documentRef, fieldOrUpdateData, value) {\n var moreFieldsAndValues = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n moreFieldsAndValues[_i - 3] = arguments[_i];\n }\n var ref;\n var parsed;\n if (typeof fieldOrUpdateData === 'string' ||\n fieldOrUpdateData instanceof field_path_FieldPath) {\n validateAtLeastNumberOfArgs('Transaction.update', arguments, 3);\n ref = validateReference('Transaction.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateVarargs('Transaction.update', fieldOrUpdateData, value, moreFieldsAndValues);\n }\n else {\n validateExactNumberOfArgs('Transaction.update', arguments, 2);\n ref = validateReference('Transaction.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateData('Transaction.update', fieldOrUpdateData);\n }\n this._transaction.update(ref._key, parsed);\n return this;\n };\n Transaction.prototype.delete = function (documentRef) {\n validateExactNumberOfArgs('Transaction.delete', arguments, 1);\n var ref = validateReference('Transaction.delete', documentRef, this._firestore);\n this._transaction.delete(ref._key);\n return this;\n };\n return Transaction;\n}());\n\nvar database_WriteBatch = /** @class */ (function () {\n function WriteBatch(_firestore) {\n this._firestore = _firestore;\n this._mutations = [];\n this._committed = false;\n }\n WriteBatch.prototype.set = function (documentRef, value, options) {\n validateBetweenNumberOfArgs('WriteBatch.set', arguments, 2, 3);\n this.verifyNotCommitted();\n var ref = validateReference('WriteBatch.set', documentRef, this._firestore);\n options = validateSetOptions('WriteBatch.set', options);\n var parsed = options.merge\n ? this._firestore._dataConverter.parseMergeData('WriteBatch.set', value)\n : this._firestore._dataConverter.parseSetData('WriteBatch.set', value);\n this._mutations = this._mutations.concat(parsed.toMutations(ref._key, mutation_Precondition.NONE));\n return this;\n };\n WriteBatch.prototype.update = function (documentRef, fieldOrUpdateData, value) {\n var moreFieldsAndValues = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n moreFieldsAndValues[_i - 3] = arguments[_i];\n }\n this.verifyNotCommitted();\n var ref;\n var parsed;\n if (typeof fieldOrUpdateData === 'string' ||\n fieldOrUpdateData instanceof field_path_FieldPath) {\n validateAtLeastNumberOfArgs('WriteBatch.update', arguments, 3);\n ref = validateReference('WriteBatch.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateVarargs('WriteBatch.update', fieldOrUpdateData, value, moreFieldsAndValues);\n }\n else {\n validateExactNumberOfArgs('WriteBatch.update', arguments, 2);\n ref = validateReference('WriteBatch.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateData('WriteBatch.update', fieldOrUpdateData);\n }\n this._mutations = this._mutations.concat(parsed.toMutations(ref._key, mutation_Precondition.exists(true)));\n return this;\n };\n WriteBatch.prototype.delete = function (documentRef) {\n validateExactNumberOfArgs('WriteBatch.delete', arguments, 1);\n this.verifyNotCommitted();\n var ref = validateReference('WriteBatch.delete', documentRef, this._firestore);\n this._mutations = this._mutations.concat(new mutation_DeleteMutation(ref._key, mutation_Precondition.NONE));\n return this;\n };\n WriteBatch.prototype.commit = function () {\n this.verifyNotCommitted();\n this._committed = true;\n if (this._mutations.length > 0) {\n return this._firestore.ensureClientConfigured().write(this._mutations);\n }\n else {\n return Promise.resolve();\n }\n };\n WriteBatch.prototype.verifyNotCommitted = function () {\n if (this._committed) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'A write batch can no longer be used after commit() ' +\n 'has been called.');\n }\n };\n return WriteBatch;\n}());\n\n/**\n * A reference to a particular document in a collection in the database.\n */\nvar database_DocumentReference = /** @class */ (function () {\n function DocumentReference(_key, firestore) {\n this._key = _key;\n this.firestore = firestore;\n this._firestoreClient = this.firestore.ensureClientConfigured();\n }\n DocumentReference.forPath = function (path, firestore) {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n (path.canonicalString() + \" has \" + path.length));\n }\n return new DocumentReference(new document_key_DocumentKey(path), firestore);\n };\n Object.defineProperty(DocumentReference.prototype, \"id\", {\n get: function () {\n return this._key.path.lastSegment();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentReference.prototype, \"parent\", {\n get: function () {\n return new database_CollectionReference(this._key.path.popLast(), this.firestore);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentReference.prototype, \"path\", {\n get: function () {\n return this._key.path.canonicalString();\n },\n enumerable: true,\n configurable: true\n });\n DocumentReference.prototype.collection = function (pathString) {\n validateExactNumberOfArgs('DocumentReference.collection', arguments, 1);\n validateArgType('DocumentReference.collection', 'string', 1, pathString);\n if (!pathString) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide a non-empty collection name to collection()');\n }\n var path = path_ResourcePath.fromString(pathString);\n return new database_CollectionReference(this._key.path.child(path), this.firestore);\n };\n DocumentReference.prototype.isEqual = function (other) {\n if (!(other instanceof DocumentReference)) {\n throw invalidClassError('isEqual', 'DocumentReference', 1, other);\n }\n return this.firestore === other.firestore && this._key.equals(other._key);\n };\n DocumentReference.prototype.set = function (value, options) {\n validateBetweenNumberOfArgs('DocumentReference.set', arguments, 1, 2);\n options = validateSetOptions('DocumentReference.set', options);\n var parsed = options.merge\n ? this.firestore._dataConverter.parseMergeData('DocumentReference.set', value)\n : this.firestore._dataConverter.parseSetData('DocumentReference.set', value);\n return this._firestoreClient.write(parsed.toMutations(this._key, mutation_Precondition.NONE));\n };\n DocumentReference.prototype.update = function (fieldOrUpdateData, value) {\n var moreFieldsAndValues = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n moreFieldsAndValues[_i - 2] = arguments[_i];\n }\n var parsed;\n if (typeof fieldOrUpdateData === 'string' ||\n fieldOrUpdateData instanceof field_path_FieldPath) {\n validateAtLeastNumberOfArgs('DocumentReference.update', arguments, 2);\n parsed = this.firestore._dataConverter.parseUpdateVarargs('DocumentReference.update', fieldOrUpdateData, value, moreFieldsAndValues);\n }\n else {\n validateExactNumberOfArgs('DocumentReference.update', arguments, 1);\n parsed = this.firestore._dataConverter.parseUpdateData('DocumentReference.update', fieldOrUpdateData);\n }\n return this._firestoreClient.write(parsed.toMutations(this._key, mutation_Precondition.exists(true)));\n };\n DocumentReference.prototype.delete = function () {\n validateExactNumberOfArgs('DocumentReference.delete', arguments, 0);\n return this._firestoreClient.write([\n new mutation_DeleteMutation(this._key, mutation_Precondition.NONE)\n ]);\n };\n DocumentReference.prototype.onSnapshot = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n validateBetweenNumberOfArgs('DocumentReference.onSnapshot', arguments, 1, 4);\n var options = {\n includeMetadataChanges: false\n };\n var observer;\n var currArg = 0;\n if (typeof args[currArg] === 'object' &&\n !isPartialObserver(args[currArg])) {\n options = args[currArg];\n validateOptionNames('DocumentReference.onSnapshot', options, [\n 'includeMetadataChanges'\n ]);\n validateNamedOptionalType('DocumentReference.onSnapshot', 'boolean', 'includeMetadataChanges', options.includeMetadataChanges);\n currArg++;\n }\n var internalOptions = {\n includeDocumentMetadataChanges: options.includeMetadataChanges,\n includeQueryMetadataChanges: options.includeMetadataChanges\n };\n if (isPartialObserver(args[currArg])) {\n observer = args[currArg];\n }\n else {\n validateArgType('DocumentReference.onSnapshot', 'function', currArg, args[currArg]);\n validateOptionalArgType('DocumentReference.onSnapshot', 'function', currArg + 1, args[currArg + 1]);\n validateOptionalArgType('DocumentReference.onSnapshot', 'function', currArg + 2, args[currArg + 2]);\n observer = {\n next: args[currArg],\n error: args[currArg + 1],\n complete: args[currArg + 2]\n };\n }\n return this.onSnapshotInternal(internalOptions, observer);\n };\n DocumentReference.prototype.onSnapshotInternal = function (options, observer) {\n var _this = this;\n var errHandler = function (err) {\n console.error('Uncaught Error in onSnapshot:', err);\n };\n if (observer.error) {\n errHandler = observer.error.bind(observer);\n }\n var asyncObserver = new AsyncObserver({\n next: function (snapshot) {\n if (observer.next) {\n assert(snapshot.docs.size <= 1, 'Too many documents returned on a document query');\n var doc = snapshot.docs.get(_this._key);\n observer.next(new database_DocumentSnapshot(_this.firestore, _this._key, doc, snapshot.fromCache));\n }\n },\n error: errHandler\n });\n var internalListener = this._firestoreClient.listen(query_Query.atPath(this._key.path), asyncObserver, options);\n return function () {\n asyncObserver.mute();\n _this._firestoreClient.unlisten(internalListener);\n };\n };\n DocumentReference.prototype.get = function () {\n var _this = this;\n validateExactNumberOfArgs('DocumentReference.get', arguments, 0);\n return new Promise(function (resolve, reject) {\n var unlisten = _this.onSnapshotInternal({\n includeQueryMetadataChanges: true,\n includeDocumentMetadataChanges: true,\n waitForSyncWhenOnline: true\n }, {\n next: function (snap) {\n // Remove query first before passing event to user to avoid\n // user actions affecting the now stale query.\n unlisten();\n if (!snap.exists && snap.metadata.fromCache) {\n // TODO(dimond): If we're online and the document doesn't\n // exist then we resolve with a doc.exists set to false. If\n // we're offline however, we reject the Promise in this\n // case. Two options: 1) Cache the negative response from\n // the server so we can deliver that even when you're\n // offline 2) Actually reject the Promise in the online case\n // if the document doesn't exist.\n reject(new FirestoreError(Code.ABORTED, 'Failed to get document because the client is ' + 'offline.'));\n }\n else {\n resolve(snap);\n }\n },\n error: reject\n });\n });\n };\n return DocumentReference;\n}());\n\nvar database_DocumentSnapshot = /** @class */ (function () {\n function DocumentSnapshot(_firestore, _key, _document, _fromCache) {\n this._firestore = _firestore;\n this._key = _key;\n this._document = _document;\n this._fromCache = _fromCache;\n }\n DocumentSnapshot.prototype.data = function () {\n validateExactNumberOfArgs('DocumentSnapshot.data', arguments, 0);\n if (!this._document) {\n throw new FirestoreError(Code.NOT_FOUND, \"This document doesn't exist. Check doc.exists to make sure \" +\n 'the document exists before calling doc.data().');\n }\n return this.convertObject(this._document.data);\n };\n DocumentSnapshot.prototype.get = function (fieldPath) {\n validateExactNumberOfArgs('DocumentSnapshot.get', arguments, 1);\n if (!this._document) {\n throw new FirestoreError(Code.NOT_FOUND, \"This document doesn't exist. Check doc.exists to make sure \" +\n 'the document exists before calling doc.get().');\n }\n var value = this._document.data.field(fieldPathFromArgument('DocumentSnapshot.get', fieldPath));\n return value === undefined ? undefined : this.convertValue(value);\n };\n Object.defineProperty(DocumentSnapshot.prototype, \"id\", {\n get: function () {\n return this._key.path.lastSegment();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentSnapshot.prototype, \"ref\", {\n get: function () {\n return new database_DocumentReference(this._key, this._firestore);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentSnapshot.prototype, \"exists\", {\n get: function () {\n return this._document !== null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentSnapshot.prototype, \"metadata\", {\n get: function () {\n return {\n hasPendingWrites: this._document !== null && this._document.hasLocalMutations,\n fromCache: this._fromCache\n };\n },\n enumerable: true,\n configurable: true\n });\n DocumentSnapshot.prototype.convertObject = function (data) {\n var _this = this;\n var result = {};\n data.forEach(function (key, value) {\n result[key] = _this.convertValue(value);\n });\n return result;\n };\n DocumentSnapshot.prototype.convertValue = function (value) {\n if (value instanceof field_value_ObjectValue) {\n return this.convertObject(value);\n }\n else if (value instanceof field_value_ArrayValue) {\n return this.convertArray(value);\n }\n else if (value instanceof field_value_RefValue) {\n var key = value.value();\n var database = this._firestore.ensureClientConfigured().databaseId();\n if (!value.databaseId.equals(database)) {\n // TODO(b/64130202): Somehow support foreign references.\n log_error(\"Document \" + this._key.path + \" contains a document \" +\n \"reference within a different database (\" +\n (value.databaseId.projectId + \"/\" + value.databaseId\n .database + \") which is not \") +\n \"supported. It will be treated as a reference in the current \" +\n (\"database (\" + database.projectId + \"/\" + database.database + \") \") +\n \"instead.\");\n }\n return new database_DocumentReference(key, this._firestore);\n }\n else {\n return value.value();\n }\n };\n DocumentSnapshot.prototype.convertArray = function (data) {\n var _this = this;\n return data.internalValue.map(function (value) {\n return _this.convertValue(value);\n });\n };\n return DocumentSnapshot;\n}());\n\nvar database_Query = /** @class */ (function () {\n function Query(_query, firestore) {\n this._query = _query;\n this.firestore = firestore;\n }\n Query.prototype.where = function (field, opStr, value) {\n validateExactNumberOfArgs('Query.where', arguments, 3);\n validateArgType('Query.where', 'string', 2, opStr);\n validateDefined('Query.where', 3, value);\n var fieldValue;\n var fieldPath = fieldPathFromArgument('Query.where', field);\n if (fieldPath.isKeyField()) {\n if (typeof value === 'string') {\n if (value.indexOf('/') !== -1) {\n // TODO(dimond): Allow slashes once ancestor queries are supported\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Function Query.where() requires its third parameter to be a ' +\n 'valid document ID if the first parameter is ' +\n 'FieldPath.documentId(), but it contains a slash.');\n }\n if (value === '') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Function Query.where() requires its third parameter to be a ' +\n 'valid document ID if the first parameter is ' +\n 'FieldPath.documentId(), but it was an empty string.');\n }\n var path = this._query.path.child(new path_ResourcePath([value]));\n assert(path.length % 2 === 0, 'Path should be a document key');\n fieldValue = new field_value_RefValue(this.firestore._databaseId, new document_key_DocumentKey(path));\n }\n else if (value instanceof database_DocumentReference) {\n var ref = value;\n fieldValue = new field_value_RefValue(this.firestore._databaseId, ref._key);\n }\n else {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function Query.where() requires its third parameter to be a \" +\n \"string or a DocumentReference if the first parameter is \" +\n \"FieldPath.documentId(), but it was: \" +\n (valueDescription(value) + \".\"));\n }\n }\n else {\n fieldValue = this.firestore._dataConverter.parseQueryValue('Query.where', value);\n }\n var filter = fieldFilter(fieldPath, query_RelationOp.fromString(opStr), fieldValue);\n this.validateNewFilter(filter);\n return new Query(this._query.addFilter(filter), this.firestore);\n };\n Query.prototype.orderBy = function (field, directionStr) {\n validateBetweenNumberOfArgs('Query.orderBy', arguments, 1, 2);\n validateOptionalArgType('Query.orderBy', 'string', 2, directionStr);\n var direction;\n if (directionStr === undefined || directionStr === 'asc') {\n direction = Direction.ASCENDING;\n }\n else if (directionStr === 'desc') {\n direction = Direction.DESCENDING;\n }\n else {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function Query.orderBy() has unknown direction '\" + directionStr + \"', \" +\n \"expected 'asc' or 'desc'.\");\n }\n if (this._query.startAt !== null) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You must not call Query.startAt() or ' +\n 'Query.startAfter() before calling Query.orderBy().');\n }\n if (this._query.endAt !== null) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You must not call Query.endAt() or ' +\n 'Query.endBefore() before calling Query.orderBy().');\n }\n var fieldPath = fieldPathFromArgument('Query.orderBy', field);\n var orderBy = new query_OrderBy(fieldPath, direction);\n this.validateNewOrderBy(orderBy);\n return new Query(this._query.addOrderBy(orderBy), this.firestore);\n };\n Query.prototype.limit = function (n) {\n validateExactNumberOfArgs('Query.limit', arguments, 1);\n validateArgType('Query.limit', 'number', 1, n);\n if (n <= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid Query. Query limit (\" + n + \") is invalid. Limit must be \" +\n 'positive.');\n }\n return new Query(this._query.withLimit(n), this.firestore);\n };\n Query.prototype.startAt = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.startAt', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.startAt', docOrField, fields, \n /*before=*/ true);\n return new Query(this._query.withStartAt(bound), this.firestore);\n };\n Query.prototype.startAfter = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.startAfter', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.startAfter', docOrField, fields, \n /*before=*/ false);\n return new Query(this._query.withStartAt(bound), this.firestore);\n };\n Query.prototype.endBefore = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.endBefore', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.endBefore', docOrField, fields, \n /*before=*/ true);\n return new Query(this._query.withEndAt(bound), this.firestore);\n };\n Query.prototype.endAt = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.endAt', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.endAt', docOrField, fields, \n /*before=*/ false);\n return new Query(this._query.withEndAt(bound), this.firestore);\n };\n Query.prototype.isEqual = function (other) {\n if (!(other instanceof Query)) {\n throw invalidClassError('isEqual', 'Query', 1, other);\n }\n return (this.firestore === other.firestore && this._query.equals(other._query));\n };\n /** Helper function to create a bound from a document or fields */\n Query.prototype.boundFromDocOrFields = function (methodName, docOrField, fields, before) {\n validateDefined(methodName, 1, docOrField);\n if (docOrField instanceof database_DocumentSnapshot) {\n if (fields.length > 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Too many arguments provided to \" + methodName + \"().\");\n }\n var snap = docOrField;\n if (!snap.exists) {\n throw new FirestoreError(Code.NOT_FOUND, \"Can't use a DocumentSnapshot that doesn't exist for \" +\n (methodName + \"().\"));\n }\n return this.boundFromDocument(methodName, snap._document, before);\n }\n else {\n var allFields = [docOrField].concat(fields);\n return this.boundFromFields(methodName, allFields, before);\n }\n };\n /**\n * Create a Bound from a query and a document.\n *\n * Note that the Bound will always include the key of the document\n * and so only the provided document will compare equal to the returned\n * position.\n *\n * Will throw if the document does not contain all fields of the order by\n * of the query.\n */\n Query.prototype.boundFromDocument = function (methodName, doc, before) {\n var components = [];\n // Because people expect to continue/end a query at the exact document\n // provided, we need to use the implicit sort order rather than the explicit\n // sort order, because it's guaranteed to contain the document key. That way\n // the position becomes unambiguous and the query continues/ends exactly at\n // the provided document. Without the key (by using the explicit sort\n // orders), multiple documents could match the position, yielding duplicate\n // results.\n for (var _i = 0, _a = this._query.orderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n if (orderBy.field.isKeyField()) {\n components.push(new field_value_RefValue(this.firestore._databaseId, doc.key));\n }\n else {\n var value = doc.field(orderBy.field);\n if (value !== undefined) {\n components.push(value);\n }\n else {\n var field = orderBy.field.canonicalString();\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. You are trying to start or end a query using a \" +\n (\"document for which the field '\" + field + \"' (used as the \") +\n \"orderBy) does not exist.\");\n }\n }\n }\n return new query_Bound(components, before);\n };\n /**\n * Converts a list of field values to a Bound for the given query.\n */\n Query.prototype.boundFromFields = function (methodName, values, before) {\n // Use explicit order by's because it has to match the query the user made\n var orderBy = this._query.explicitOrderBy;\n if (values.length > orderBy.length) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Too many arguments provided to \" + methodName + \"(). \" +\n \"The number of arguments must be less than or equal to the \" +\n \"number of Query.orderBy() clauses\");\n }\n var components = [];\n for (var i = 0; i < values.length; i++) {\n var rawValue = values[i];\n var orderByComponent = orderBy[i];\n if (orderByComponent.field.isKeyField()) {\n if (typeof rawValue !== 'string') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. Expected a string for document ID in \" +\n (methodName + \"(), but got a \" + typeof rawValue));\n }\n if (rawValue.indexOf('/') !== -1) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. Document ID '\" + rawValue + \"' contains a slash in \" +\n (methodName + \"()\"));\n }\n var key = new document_key_DocumentKey(this._query.path.child(rawValue));\n components.push(new field_value_RefValue(this.firestore._databaseId, key));\n }\n else {\n var wrapped = this.firestore._dataConverter.parseQueryValue(methodName, rawValue);\n components.push(wrapped);\n }\n }\n return new query_Bound(components, before);\n };\n Query.prototype.onSnapshot = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n validateBetweenNumberOfArgs('Query.onSnapshot', arguments, 1, 4);\n var options = {};\n var observer;\n var currArg = 0;\n if (typeof args[currArg] === 'object' &&\n !isPartialObserver(args[currArg])) {\n options = args[currArg];\n validateOptionNames('Query.onSnapshot', options, [\n 'includeQueryMetadataChanges',\n 'includeDocumentMetadataChanges'\n ]);\n validateNamedOptionalType('Query.onSnapshot', 'boolean', 'includeDocumentMetadataChanges', options.includeDocumentMetadataChanges);\n validateNamedOptionalType('Query.onSnapshot', 'boolean', 'includeQueryMetadataChanges', options.includeQueryMetadataChanges);\n currArg++;\n }\n if (isPartialObserver(args[currArg])) {\n observer = args[currArg];\n }\n else {\n validateArgType('Query.onSnapshot', 'function', currArg, args[currArg]);\n validateOptionalArgType('Query.onSnapshot', 'function', currArg + 1, args[currArg + 1]);\n validateOptionalArgType('Query.onSnapshot', 'function', currArg + 2, args[currArg + 2]);\n observer = {\n next: args[currArg],\n error: args[currArg + 1],\n complete: args[currArg + 2]\n };\n }\n return this.onSnapshotInternal(options, observer);\n };\n Query.prototype.onSnapshotInternal = function (options, observer) {\n var _this = this;\n var errHandler = function (err) {\n console.error('Uncaught Error in onSnapshot:', err);\n };\n if (observer.error) {\n errHandler = observer.error.bind(observer);\n }\n var asyncObserver = new AsyncObserver({\n next: function (result) {\n if (observer.next) {\n observer.next(new database_QuerySnapshot(_this.firestore, _this._query, result));\n }\n },\n error: errHandler\n });\n var firestoreClient = this.firestore.ensureClientConfigured();\n var internalListener = firestoreClient.listen(this._query, asyncObserver, options);\n return function () {\n asyncObserver.mute();\n firestoreClient.unlisten(internalListener);\n };\n };\n Query.prototype.get = function () {\n var _this = this;\n validateExactNumberOfArgs('Query.get', arguments, 0);\n return new Promise(function (resolve, reject) {\n var unlisten = _this.onSnapshotInternal({\n includeDocumentMetadataChanges: false,\n includeQueryMetadataChanges: true,\n waitForSyncWhenOnline: true\n }, {\n next: function (result) {\n // Remove query first before passing event to user to avoid\n // user actions affecting the now stale query.\n unlisten();\n resolve(result);\n },\n error: reject\n });\n });\n };\n Query.prototype.validateNewFilter = function (filter) {\n if (filter instanceof query_RelationFilter && filter.isInequality()) {\n var existingField = this._query.getInequalityFilterField();\n if (existingField !== null && !existingField.equals(filter.field)) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. All where filters with an inequality' +\n ' (<, <=, >, or >=) must be on the same field. But you have' +\n (\" inequality filters on '\" + existingField.toString() + \"'\") +\n (\" and '\" + filter.field.toString() + \"'\"));\n }\n var firstOrderByField = this._query.getFirstOrderByField();\n if (firstOrderByField !== null) {\n this.validateOrderByAndInequalityMatch(filter.field, firstOrderByField);\n }\n }\n };\n Query.prototype.validateNewOrderBy = function (orderBy) {\n if (this._query.getFirstOrderByField() === null) {\n // This is the first order by. It must match any inequality.\n var inequalityField = this._query.getInequalityFilterField();\n if (inequalityField !== null) {\n this.validateOrderByAndInequalityMatch(inequalityField, orderBy.field);\n }\n }\n };\n Query.prototype.validateOrderByAndInequalityMatch = function (inequality, orderBy) {\n if (!orderBy.equals(inequality)) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. You have a where filter with an inequality \" +\n (\"(<, <=, >, or >=) on field '\" + inequality.toString() + \"' \") +\n (\"and so you must also use '\" + inequality.toString() + \"' \") +\n \"as your first Query.orderBy(), but your first Query.orderBy() \" +\n (\"is on field '\" + orderBy.toString() + \"' instead.\"));\n }\n };\n return Query;\n}());\n\nvar database_QuerySnapshot = /** @class */ (function () {\n function QuerySnapshot(_firestore, _originalQuery, _snapshot) {\n this._firestore = _firestore;\n this._originalQuery = _originalQuery;\n this._snapshot = _snapshot;\n this._cachedChanges = null;\n this.metadata = {\n fromCache: _snapshot.fromCache,\n hasPendingWrites: _snapshot.hasPendingWrites\n };\n }\n Object.defineProperty(QuerySnapshot.prototype, \"docs\", {\n get: function () {\n var result = [];\n this.forEach(function (doc) { return result.push(doc); });\n return result;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuerySnapshot.prototype, \"empty\", {\n get: function () {\n return this._snapshot.docs.isEmpty();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuerySnapshot.prototype, \"size\", {\n get: function () {\n return this._snapshot.docs.size;\n },\n enumerable: true,\n configurable: true\n });\n QuerySnapshot.prototype.forEach = function (callback, thisArg) {\n var _this = this;\n validateBetweenNumberOfArgs('QuerySnapshot.forEach', arguments, 1, 2);\n validateArgType('QuerySnapshot.forEach', 'function', 1, callback);\n this._snapshot.docs.forEach(function (doc) {\n callback.call(thisArg, _this.convertToDocumentImpl(doc));\n });\n };\n Object.defineProperty(QuerySnapshot.prototype, \"query\", {\n get: function () {\n return new database_Query(this._originalQuery, this._firestore);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuerySnapshot.prototype, \"docChanges\", {\n get: function () {\n if (!this._cachedChanges) {\n this._cachedChanges = changesFromSnapshot(this._firestore, this._snapshot);\n }\n return this._cachedChanges;\n },\n enumerable: true,\n configurable: true\n });\n QuerySnapshot.prototype.convertToDocumentImpl = function (doc) {\n return new database_DocumentSnapshot(this._firestore, doc.key, doc, this.metadata.fromCache);\n };\n return QuerySnapshot;\n}());\n\nvar database_CollectionReference = /** @class */ (function (_super) {\n database___extends(CollectionReference, _super);\n function CollectionReference(path, firestore) {\n var _this = _super.call(this, query_Query.atPath(path), firestore) || this;\n if (path.length % 2 !== 1) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid collection reference. Collection ' +\n 'references must have an odd number of segments, but ' +\n (path.canonicalString() + \" has \" + path.length));\n }\n return _this;\n }\n Object.defineProperty(CollectionReference.prototype, \"id\", {\n get: function () {\n return this._query.path.lastSegment();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CollectionReference.prototype, \"parent\", {\n get: function () {\n var parentPath = this._query.path.popLast();\n if (parentPath.isEmpty()) {\n return null;\n }\n else {\n return new database_DocumentReference(new document_key_DocumentKey(parentPath), this.firestore);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CollectionReference.prototype, \"path\", {\n get: function () {\n return this._query.path.canonicalString();\n },\n enumerable: true,\n configurable: true\n });\n CollectionReference.prototype.doc = function (pathString) {\n validateBetweenNumberOfArgs('CollectionReference.doc', arguments, 0, 1);\n // We allow omission of 'pathString' but explicitly prohibit passing in both\n // 'undefined' and 'null'.\n if (arguments.length === 0) {\n pathString = misc_AutoId.newId();\n }\n validateArgType('CollectionReference.doc', 'string', 1, pathString);\n if (pathString === '') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Document path must be a non-empty string');\n }\n var path = path_ResourcePath.fromString(pathString);\n return database_DocumentReference.forPath(this._query.path.child(path), this.firestore);\n };\n CollectionReference.prototype.add = function (value) {\n validateExactNumberOfArgs('CollectionReference.add', arguments, 1);\n validateArgType('CollectionReference.add', 'object', 1, value);\n var docRef = this.doc();\n return docRef.set(value).then(function () { return docRef; });\n };\n return CollectionReference;\n}(database_Query));\n\nfunction validateSetOptions(methodName, options) {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n validateOptionNames(methodName, options, ['merge']);\n validateNamedOptionalType(methodName, 'boolean', 'merge', options.merge);\n return options;\n}\nfunction validateReference(methodName, documentRef, firestore) {\n if (!(documentRef instanceof database_DocumentReference)) {\n throw invalidClassError(methodName, 'DocumentReference', 1, documentRef);\n }\n else if (documentRef.firestore !== firestore) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Provided document reference is from a different Firestore instance.');\n }\n else {\n return documentRef;\n }\n}\n/**\n * Calculates the array of firestore.DocumentChange's for a given ViewSnapshot.\n *\n * Exported for testing.\n */\nfunction changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new database_DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.map(function (change) {\n var doc = new database_DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}\nfunction resultChangeType(type) {\n switch (type) {\n case ChangeType.Added:\n return 'added';\n case ChangeType.Modified:\n case ChangeType.Metadata:\n return 'modified';\n case ChangeType.Removed:\n return 'removed';\n default:\n return fail('Unknown change type: ' + type);\n }\n}\n// Export the classes with a private constructor (it will fail if invoked\n// at runtime). Note that this still allows instanceof checks.\n// We're treating the variables as class names, so disable checking for lower\n// case variable names.\n// tslint:disable:variable-name\nvar PublicFirestore = makeConstructorPrivate(database_Firestore, 'Use firebase.firestore() instead.');\nvar PublicTransaction = makeConstructorPrivate(database_Transaction, 'Use firebase.firestore().runTransaction() instead.');\nvar PublicWriteBatch = makeConstructorPrivate(database_WriteBatch, 'Use firebase.firestore().batch() instead.');\nvar PublicDocumentReference = makeConstructorPrivate(database_DocumentReference, 'Use firebase.firestore().doc() instead.');\nvar PublicDocumentSnapshot = makeConstructorPrivate(database_DocumentSnapshot);\nvar PublicQuery = makeConstructorPrivate(database_Query);\nvar PublicQuerySnapshot = makeConstructorPrivate(database_QuerySnapshot);\nvar PublicCollectionReference = makeConstructorPrivate(database_CollectionReference, 'Use firebase.firestore().collection() instead.');\n// tslint:enable:variable-name\n\n//# sourceMappingURL=database.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/src/platform/config.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\nvar firestoreNamespace = {\n Firestore: PublicFirestore,\n GeoPoint: geo_point_GeoPoint,\n Blob: PublicBlob,\n Transaction: PublicTransaction,\n WriteBatch: PublicWriteBatch,\n DocumentReference: PublicDocumentReference,\n DocumentSnapshot: PublicDocumentSnapshot,\n Query: PublicQuery,\n QuerySnapshot: PublicQuerySnapshot,\n CollectionReference: PublicCollectionReference,\n FieldPath: field_path_FieldPath,\n FieldValue: PublicFieldValue,\n setLogLevel: database_Firestore.setLogLevel\n};\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerService.\n */\nfunction configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new database_Firestore(app); }, shallowCopy(firestoreNamespace));\n}\n/**\n * Exports the Firestore namespace into the provided `exportObject` object under\n * the key 'firestore'. This is used for wrapped binary that exposes Firestore\n * as a goog module.\n */\nfunction configureForStandalone(exportObject) {\n var copiedNamespace = shallowCopy(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = database_Firestore;\n exportObject['firestore'] = copiedNamespace;\n}\n\n//# sourceMappingURL=config.js.map\n\n// CONCATENATED MODULE: ../firestore/dist/esm/index.js\n/* harmony export (immutable) */ __webpack_exports__[\"registerFirestore\"] = registerFirestore;\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nfunction registerFirestore(instance) {\n configureForFirebase(instance);\n}\nregisterFirestore(esm[\"default\"]);\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n\n/***/ 115:\n/***/ (function(module, exports, __webpack_require__) {\n\n(function() {var g,goog=goog||{},k=this;function l(a){return\"string\"==typeof a}function aa(){}\nfunction ba(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse if(\"function\"==b&&\"undefined\"==typeof a.call)return\"object\";return b}function n(a){return\"array\"==ba(a)}function ca(a){var b=ba(a);return\"array\"==b||\"object\"==b&&\"number\"==typeof a.length}function da(a){return\"function\"==ba(a)}function p(a){var b=typeof a;return\"object\"==b&&null!=a||\"function\"==b}var q=\"closure_uid_\"+(1E9*Math.random()>>>0),ea=0;function fa(a,b,c){return a.call.apply(a.bind,arguments)}\nfunction ha(a,b,c){if(!a)throw Error();if(2b?1:0};function na(a,b){b.unshift(a);ja.call(this,ka.apply(null,b));b.shift()}u(na,ja);na.prototype.name=\"AssertionError\";function oa(a,b){throw new na(\"Failure\"+(a?\": \"+a:\"\"),Array.prototype.slice.call(arguments,1));};function w(){0!=qa&&(ra[this[q]||(this[q]=++ea)]=this);this.i=this.i;this.v=this.v}var qa=0,ra={};w.prototype.i=!1;w.prototype.Y=function(){if(!this.i&&(this.i=!0,this.w(),0!=qa)){var a=this[q]||(this[q]=++ea);delete ra[a]}};w.prototype.w=function(){if(this.v)for(;this.v.length;)this.v.shift()()};var sa=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:l(a)?a.charAt(b):a[b]}function wa(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function xa(a){return Array.prototype.concat.apply([],arguments)}function ya(a){var b=a.length;if(0parseFloat(Qa)){Pa=String(Ta);break a}}Pa=Qa}var Ja={};\nfunction Ua(a){return Ia(a,function(){for(var b=0,c=la(String(Pa)).split(\".\"),d=la(String(a)).split(\".\"),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var cb=\"closure_listenable_\"+(1E6*Math.random()|0);function db(a){return!(!a||!a[cb])}var eb=0;function fb(a,b,c,d,e){this.listener=a;this.a=null;this.src=b;this.type=c;this.capture=!!d;this.da=e;this.key=++eb;this.X=this.ba=!1}function gb(a){a.X=!0;a.listener=null;a.a=null;a.src=null;a.da=null};function hb(a){this.src=a;this.a={};this.b=0}hb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.a[f];a||(a=this.a[f]=[],this.b++);var h=ib(a,b,d,e);-1d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(h){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.a;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;0<=e;e--){b.a=d[e];var f=yb(d[e],a,!0,b);c=c&&f}for(e=0;e>>0);function qb(a){if(da(a))return a;a[Ab]||(a[Ab]=function(b){return a.handleEvent(b)});return a[Ab]};function B(){w.call(this);this.c=new hb(this);this.P=this;this.J=null}u(B,w);B.prototype[cb]=!0;g=B.prototype;g.addEventListener=function(a,b,c,d){ob(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){wb(this,a,b,c,d)};\ng.dispatchEvent=function(a){var b,c=this.J;if(c)for(b=[];c;c=c.J)b.push(c);c=this.P;var d=a.type||a;if(l(a))a=new A(a,c);else if(a instanceof A)a.target=a.target||c;else{var e=a;a=new A(d,c);Ga(a,e)}e=!0;if(b)for(var f=b.length-1;0<=f;f--){var h=a.a=b[f];e=Bb(h,d,!0,a)&&e}h=a.a=c;e=Bb(h,d,!0,a)&&e;e=Bb(h,d,!1,a)&&e;if(b)for(f=0;f=lc(this).value)for(da(b)&&(b=b()),a=new dc(a,String(b),this.f),c&&(a.a=c),c=\"log:\"+a.b,(a=k.console)&&a.timeStamp&&a.timeStamp(c),(a=k.msWriteProfilerMark)&&a(c),c=this;c;)c=c.a};function F(a,b){a.log(gc,b,void 0)}function G(a,b){a.log(hc,b,void 0)}var mc={},nc=null;\nfunction oc(a){nc||(nc=new fc(\"\"),mc[\"\"]=nc,nc.c=jc);var b;if(!(b=mc[a])){b=new fc(a);var c=a.lastIndexOf(\".\"),d=a.substr(c+1);c=oc(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;mc[a]=b}return b};function pc(a,b){a&&a.log(ic,b,void 0)}function H(a,b){a&&a.log(kc,b,void 0)};function qc(){this.a=oc(\"goog.labs.net.webChannel.WebChannelDebug\")}function rc(a,b,c,d){if(c)try{var e=JSON.parse(c);if(e)for(var f=0;fh.length)){var m=h[1];if(n(m)&&!(1>m.length)){var v=m[0];if(\"noop\"!=v&&\"stop\"!=v&&\"close\"!=v)for(var Sa=1;Sab||3==b&&!Ka&&!this.a.U())){this.s||4!=b||7==c||uc();Rc(this);var d=this.a.V();this.v=d;var e=this.a.U();e||I(this.b,\"No response text for uri \"+this.g+\" status \"+d);this.c=200==d;I(this.b,\"XMLHTTP RESP (\"+this.f+\") [ attempt \"+this.S+\"]: \"+this.j+\"\\n\"+this.g+\"\\n\"+b+\" \"+d);if(this.c)this.J?(Sc(this,b,e),Ka&&this.c&&3==b&&(this.M.$(this.F,\"tick\",this.fb),this.F.start())):(rc(this.b,this.f,e,null),Tc(this,e)),4==b&&Uc(this),this.c&&\n!this.s&&(4==b?this.m.wa(this):(this.c=!1,Pc(this)));else{if(400==d&&0b.length)return Kc;b=b.substr(d,c);a.C=d+c;return b}g.cancel=function(){this.s=!0;Uc(this)};function Pc(a){a.T=t()+a.P;Xc(a,a.P)}function Xc(a,b){if(null!=a.o)throw Error(\"WatchDog timer not null\");a.o=xc(r(a.eb,a),b)}function Rc(a){a.o&&(k.clearTimeout(a.o),a.o=null)}\ng.eb=function(){this.o=null;var a=t();if(0<=a-this.T)this.c&&(a=this.b.a)&&F(a,\"Received watchdog timeout even though request loaded successfully\"),I(this.b,\"TIMEOUT: \"+this.g),2!=this.I&&(uc(),K()),Uc(this),this.i=2,Vc(this);else{var b=this.b.a;b&&G(b,\"WatchDog timer called too early\");Xc(this,this.T-a)}};function Vc(a){a.m.Ka()||a.s||a.m.wa(a)}function Uc(a){Rc(a);var b=a.G;b&&\"function\"==typeof b.Y&&b.Y();a.G=null;Yb(a.F);cc(a.M);a.a&&(b=a.a,a.a=null,b.abort(),b.Y())}\nfunction Tc(a,b){try{a.m.Na(a,b),uc()}catch(c){sc(a.b,c,\"Error in httprequest callback\")}};function Yc(a){if(a.A&&\"function\"==typeof a.A)return a.A();if(l(a))return a.split(\"\");if(ca(a)){for(var b=[],c=a.length,d=0;d2*a.c&&$c(a),!0):!1}function $c(a){if(a.c!=a.a.length){for(var b=0,c=0;bb)throw Error(\"Bad port number \"+b);a.i=b}else a.i=null}function hd(a,b,c){b instanceof kd?(a.c=b,qd(a.c,a.h)):(c||(b=ld(b,rd)),a.c=new kd(b,0,a.h))}\nfunction R(a,b,c){a.c.set(b,c)}function Qc(a,b,c){n(c)||(c=[String(c)]);sd(a.c,b,c)}function Mc(a){R(a,\"zx\",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^t()).toString(36));return a}function td(a){return a instanceof Q?M(a):new Q(a,void 0)}function ud(a,b,c,d){var e=new Q(null,void 0);a&&ed(e,a);b&&fd(e,b);c&&gd(e,c);d&&(e.a=d);return e}function jd(a,b){return a?b?decodeURI(a.replace(/%25/g,\"%2525\")):decodeURIComponent(a):\"\"}\nfunction ld(a,b,c){return l(a)?(a=encodeURI(a).replace(b,vd),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),a):null}function vd(a){a=a.charCodeAt(0);return\"%\"+(a>>4&15).toString(16)+(a&15).toString(16)}var md=/[#\\/\\?@]/g,od=/[#\\?:]/g,nd=/[#\\?]/g,rd=/[#\\?@]/g,pd=/#/g;function kd(a,b,c){this.b=this.a=null;this.c=a||null;this.f=!!c}function S(a){a.a||(a.a=new O,a.b=0,a.c&&dd(a.c,function(b,c){a.add(decodeURIComponent(b.replace(/\\+/g,\" \")),c)}))}g=kd.prototype;g.u=function(){S(this);return this.b};\ng.add=function(a,b){S(this);this.c=null;a=wd(this,a);var c=this.a.get(a);c||this.a.set(a,c=[]);c.push(b);this.b+=1;return this};function xd(a,b){S(a);b=wd(a,b);P(a.a.b,b)&&(a.c=null,a.b-=a.a.get(b).length,bd(a.a,b))}function yd(a,b){S(a);b=wd(a,b);return P(a.a.b,b)}g.forEach=function(a,b){S(this);this.a.forEach(function(c,d){ta(c,function(c){a.call(b,c,d,this)},this)},this)};\ng.O=function(){S(this);for(var a=this.a.A(),b=this.a.O(),c=[],d=0;d=a.c:!1}function Td(a,b){return a.b?a.b==b:a.a?a.a.contains(b):!1}function Rd(a,b){a.a?a.a.add(b):a.b=b}\nOd.prototype.cancel=function(){this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(ta(this.a.A(),function(a){a.cancel()}),ad(this.a.a))};function Ud(a,b){this.a=a;this.b=b};function Vd(a,b){this.a=a;this.b=b}Vd.prototype.stringify=function(a){return k.JSON.stringify(a,this.a)};Vd.prototype.parse=function(a){return k.JSON.parse(a,this.b)};function Wd(){this.a=new Vd}function Xd(a,b,c){var d=c||\"\";try{Zc(a,function(a,c){var e=a;p(a)&&(e=Eb(a));b.push(d+c+\"=\"+encodeURIComponent(e))})}catch(e){throw b.push(d+\"type=\"+encodeURIComponent(\"_badmap\")),e;}};function Yd(a,b){var c=new qc;I(c,\"TestLoadImage: loading \"+a);var d=new Image;d.onload=ia(Zd,c,d,\"TestLoadImage: loaded\",!0,b);d.onerror=ia(Zd,c,d,\"TestLoadImage: error\",!1,b);d.onabort=ia(Zd,c,d,\"TestLoadImage: abort\",!1,b);d.ontimeout=ia(Zd,c,d,\"TestLoadImage: timeout\",!1,b);k.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4);d.src=a}function Zd(a,b,c,d,e){try{I(a,c),b.onload=null,b.onerror=null,b.onabort=null,b.ontimeout=null,e(d)}catch(f){sc(a,f)}};function U(a){B.call(this);this.headers=new O;this.G=a||null;this.f=!1;this.F=this.a=null;this.M=this.s=\"\";this.j=0;this.g=\"\";this.h=this.I=this.o=this.H=!1;this.l=0;this.B=null;this.N=$d;this.C=this.m=!1}u(U,B);var $d=\"\";U.prototype.b=oc(\"goog.net.XhrIo\");var ae=/^https?$/i,be=[\"POST\",\"PUT\"];g=U.prototype;\ng.ta=function(a,b,c,d){if(this.a)throw Error(\"[goog.net.XhrIo] Object is active with another request=\"+this.s+\"; newUri=\"+a);b=b?b.toUpperCase():\"GET\";this.s=a;this.g=\"\";this.j=0;this.M=b;this.H=!1;this.f=!0;this.a=this.G?Fc(this.G):Fc(Dc);this.F=this.G?Bc(this.G):Bc(Dc);this.a.onreadystatechange=r(this.Ma,this);try{H(this.b,V(this,\"Opening Xhr\")),this.I=!0,this.a.open(b,String(a),!0),this.I=!1}catch(f){H(this.b,V(this,\"Error opening Xhr: \"+f.message));ce(this,f);return}a=c||\"\";var e=new O(this.headers);\nd&&Zc(d,function(a,b){e.set(b,a)});d=ua(e.O());c=k.FormData&&a instanceof k.FormData;!(0<=sa(be,b))||d||c||e.set(\"Content-Type\",\"application/x-www-form-urlencoded;charset=utf-8\");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.N&&(this.a.responseType=this.N);\"withCredentials\"in this.a&&this.a.withCredentials!==this.m&&(this.a.withCredentials=this.m);try{de(this),0c&&(c=a.length);d=a.indexOf(\"?\");if(0>d||d>c){d=c;var e=\"\"}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+\"&\"+b:b:c;a=a[0]+(a[1]?\"?\"+a[1]:\"\")+a[2]}return a}R(a,b,c);return a};function ke(a,b,c){this.za=b||0;this.Ba=0;this.h=[];this.l=[];this.a=new qc;this.J=c||new Md;this.ia=this.ya=this.H=this.ja=this.b=this.N=this.j=this.ha=this.f=this.P=this.i=null;this.Va=this.I=0;this.ka=this.C=this.s=this.m=this.o=this.c=null;this.v=this.Aa=this.S=-1;this.ga=this.B=this.G=0;this.T=a&&a.supportsCrossDomainXhr||!1;this.M=\"\";this.g=new Od(a&&a.concurrentRequestLimit);this.la=new Wd;this.F=a&&void 0!==a.backgroundChannelTest?a.backgroundChannelTest:!0;this.Ua=a&&a.fastHandshake||!1}\ng=ke.prototype;g.oa=8;g.D=1;function le(a){I(a.a,\"disconnect()\");me(a);if(3==a.D){var b=a.I++,c=M(a.H);R(c,\"SID\",a.M);R(c,\"RID\",b);R(c,\"TYPE\",\"terminate\");ne(a,c);b=new L(a,a.a,0,b,void 0);b.I=2;b.l=Mc(M(c));c=!1;k.navigator&&k.navigator.sendBeacon&&(c=k.navigator.sendBeacon(b.l.toString(),\"\"));c||((new Image).src=b.l);b.H=t();Pc(b)}oe(a)}\nfunction me(a){a.C&&(a.C.abort(),a.C=null);a.b&&(a.b.cancel(),a.b=null);a.m&&(k.clearTimeout(a.m),a.m=null);pe(a);a.g.cancel();a.o&&(k.clearTimeout(a.o),a.o=null)}function qe(a,b){if(1E3==a.h.length){var c=\"Already have 1000 queued maps upon queueing \"+Eb(b),d=a.a.a;d&&F(d,c)}a.h.push(new Ud(a.Va++,b));3==a.D&&re(a)}g.Ka=function(){return 0==this.D};function re(a){Sd(a.g)||a.o||(a.o=xc(r(a.Pa,a),0),a.G=0)}\ng.Pa=function(a){this.o=null;I(this.a,\"startForwardChannel_\");if(1==this.D)if(a)(a=this.a.a)&&F(a,\"Not supposed to retry the open\");else{I(this.a,\"open_()\");this.I=Math.floor(1E5*Math.random());a=this.I++;var b=new L(this,this.a,0,a,void 0),c=this.i;this.P&&(c?(c=Ea(c),Ga(c,this.P)):c=this.P);null===this.f&&(b.h=c);var d=se(this),e=M(this.H);R(e,\"RID\",a);0b&&this.ka&&0==this.B&&!this.s&&(this.s=xc(r(this.ab,this),6E3)));else I(this.a,\"Bad POST response data returned\"),W(this,11)}else if(this.b==a&&pe(this),!/^[\\s\\xa0]*$/.test(b))for(b=c=this.la.a.parse(b),c=0;cthis.c)throw Error(Je);this.a=new Ge;this.b=new T;this.g=null;this.aa()}u(Ie,w);var Je=\"[goog.structs.Pool] Min can not be greater than max\";g=Ie.prototype;g.ca=function(){var a=t();if(!(null!=this.g&&0>a-this.g)){for(var b;0this.c&&0=this.u()){for(var c=this.a,d=0;d>1,a[d].a>c.a)a[b]=a[d],b=d;else break;a[b]=c}Me.prototype.A=function(){for(var a=this.a,b=[],c=a.length,d=0;d=e)f=void 0;else{if(1==e)wa(d);else{d[0]=d.pop();d=0;c=c.a;e=c.length;for(var h=c[d];d>1;){var m=2*d+1,v=2*d+2;m=vh.a)break;c[d]=c[m];d=m}c[d]=h}f=f.b}f.apply(this,[b])}else break}};\ng.ma=function(a){Y.L.ma.call(this,a);this.ua()};g.aa=function(){Y.L.aa.call(this);this.ua()};g.w=function(){Y.L.w.call(this);k.clearTimeout(void 0);wa(this.f.a);this.f=null};function Z(a,b,c,d){this.l=a;this.j=!!d;Y.call(this,b,c)}u(Z,Y);Z.prototype.qa=function(){var a=new U,b=this.l;b&&b.forEach(function(b,d){a.headers.set(d,b)});this.j&&(a.m=!0);return a};Z.prototype.va=function(a){return!a.i&&!a.a};Be.prototype.createWebChannel=Be.prototype.a;X.prototype.send=X.prototype.l;X.prototype.open=X.prototype.j;X.prototype.close=X.prototype.close;yc.NO_ERROR=0;yc.TIMEOUT=8;yc.HTTP_ERROR=6;zc.COMPLETE=\"complete\";Dd.EventType=Ed;Ed.OPEN=\"a\";Ed.CLOSE=\"b\";Ed.ERROR=\"c\";Ed.MESSAGE=\"d\";B.prototype.listen=B.prototype.$;Z.prototype.getObject=Z.prototype.ca;Z.prototype.releaseObject=Z.prototype.hb;U.prototype.listenOnce=U.prototype.Ia;U.prototype.getLastError=U.prototype.$a;U.prototype.getLastErrorCode=U.prototype.Ga;\nU.prototype.getStatus=U.prototype.V;U.prototype.getStatusText=U.prototype.Ha;U.prototype.getResponseJson=U.prototype.Za;U.prototype.getResponseText=U.prototype.U;U.prototype.getResponseText=U.prototype.U;U.prototype.send=U.prototype.ta;module.exports={createWebChannelTransport:Fe,ErrorCode:yc,EventType:zc,WebChannel:Dd,XhrIoPool:Z};}).call(typeof window !== 'undefined' ? window : this)\n\n\n/***/ })\n\n},[113]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-firestore.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-firestore.js","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nrequire('@firebase/firestore');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./firestore/index.js\n// module id = 113\n// module chunks = 1","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* tslint:disable:no-console */\nimport { SDK_VERSION } from '../core/version';\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel[LogLevel[\"SILENT\"] = 2] = \"SILENT\";\n})(LogLevel = LogLevel || (LogLevel = {}));\nvar logLevel = LogLevel.ERROR;\n// Helper methods are needed because variables can't be exported as read/write\nexport function getLogLevel() {\n return logLevel;\n}\nexport function setLogLevel(newLevel) {\n logLevel = newLevel;\n}\nexport function debug(tag, msg) {\n var obj = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n obj[_i - 2] = arguments[_i];\n }\n if (logLevel <= LogLevel.DEBUG) {\n var time = new Date().toISOString();\n var args = obj.map(argToString);\n console.log.apply(console, [\"Firestore (\" + SDK_VERSION + \") \" + time + \" [\" + tag + \"]: \" + msg].concat(args));\n }\n}\nexport function error(msg) {\n var obj = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n obj[_i - 1] = arguments[_i];\n }\n if (logLevel <= LogLevel.ERROR) {\n var time = new Date().toISOString();\n var args = obj.map(argToString);\n console.error.apply(console, [\"Firestore (\" + SDK_VERSION + \") \" + time + \": \" + msg].concat(args));\n }\n}\n/**\n * Converts an additional log parameter to a string representation.\n */\nfunction argToString(obj) {\n if (typeof obj === 'string') {\n return obj;\n }\n else {\n try {\n return JSON.stringify(obj);\n }\n catch (e) {\n // Converting to JSON failed, just log the object directly\n return obj;\n }\n }\n}\n\n//# sourceMappingURL=log.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/log.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SDK_VERSION } from '../core/version';\nimport { error } from './log';\n/**\n * Unconditionally fails, throwing an Error with the given message.\n *\n * Returns any so it can be used in expressions:\n * @example\n * let futureVar = fail('not implemented yet');\n */\nexport function fail(failure) {\n // Log the failure in addition to throw an exception, just in case the\n // exception is swallowed.\n var message = \"FIRESTORE (\" + SDK_VERSION + \") INTERNAL ASSERTION FAILED: \" + failure;\n error(message);\n // NOTE: We don't use FirestoreError here because these are internal failures\n // that cannot be handled by the user. (Also it would create a circular\n // dependency between the error and assert modules which doesn't work.)\n throw new Error(message);\n}\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n */\nexport function assert(assertion, message) {\n if (!assertion) {\n fail(message);\n }\n}\n\n//# sourceMappingURL=assert.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/assert.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { fail } from '../util/assert';\n/**\n * Provides singleton helpers where setup code can inject a platform at runtime.\n * setPlatform needs to be set before Firestore is used and must be set exactly\n * once.\n */\nvar PlatformSupport = /** @class */ (function () {\n function PlatformSupport() {\n }\n PlatformSupport.setPlatform = function (platform) {\n if (PlatformSupport.platform) {\n fail('Platform already defined');\n }\n PlatformSupport.platform = platform;\n };\n PlatformSupport.getPlatform = function () {\n if (!PlatformSupport.platform) {\n fail('Platform not set');\n }\n return PlatformSupport.platform;\n };\n return PlatformSupport;\n}());\nexport { PlatformSupport };\n/**\n * Returns the representation of an empty \"proto\" byte string for the\n * platform.\n */\nexport function emptyByteString() {\n return PlatformSupport.getPlatform().emptyByteString;\n}\n\n//# sourceMappingURL=platform.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/platform/platform.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// We are doing some heavy reflective stuff, lots of any casting necessary\n/* tslint:disable:no-any */\nimport { Code, FirestoreError } from './error';\n/**\n * Helper function to prevent instantiation through the constructor.\n *\n * This method creates a new constructor that throws when it's invoked.\n * The prototype of that constructor is then set to the prototype of the hidden\n * \"class\" to expose all the prototype methods and allow for instanceof\n * checks.\n *\n * To also make all the static methods available, all properties of the\n * original constructor are copied to the new constructor.\n */\nexport function makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\n }\n // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n PublicConstructor.prototype = cls.prototype;\n // Copy any static methods/members\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n return PublicConstructor;\n}\n\n//# sourceMappingURL=api.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/api.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from './assert';\nexport function contains(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\nexport function get(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key) ? obj[key] : null;\n}\nexport function size(obj) {\n var count = 0;\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n count++;\n }\n }\n return count;\n}\n/** Returns the given value if it's defined or the defaultValue otherwise. */\nexport function defaulted(value, defaultValue) {\n return value !== undefined ? value : defaultValue;\n}\nexport function forEachNumber(obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var num = parseInt(key, 10);\n if (!isNaN(num)) {\n fn(num, obj[key]);\n }\n }\n }\n}\nexport function forEach(obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn(key, obj[key]);\n }\n }\n}\nexport function lookupOrInsert(obj, key, valFn) {\n if (!contains(obj, key)) {\n obj[key] = valFn();\n }\n return obj[key];\n}\nexport function isEmpty(obj) {\n assert(obj != null && typeof obj === 'object', 'isEmpty() expects object parameter.');\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n}\nexport function shallowCopy(obj) {\n assert(obj && typeof obj === 'object', 'shallowCopy() expects object parameter.');\n var result = {};\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n return result;\n}\n\n//# sourceMappingURL=obj.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/obj.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { fail } from './assert';\nimport { Code, FirestoreError } from './error';\nimport * as obj from './obj';\n/**\n * Validates the invocation of functionName has the exact number of arguments.\n *\n * Forward the magic \"arguments\" variable as second parameter on which the\n * parameter validation is performed:\n * validateExactNumberOfArgs('myFunction', arguments, 2);\n */\nexport function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}\n/**\n * Validates the invocation of functionName has at least the provided number of\n * arguments (but can have many more).\n *\n * Forward the magic \"arguments\" variable as second parameter on which the\n * parameter validation is performed:\n * validateAtLeastNumberOfArgs('myFunction', arguments, 2);\n */\nexport function validateAtLeastNumberOfArgs(functionName, args, minNumberOfArgs) {\n if (args.length < minNumberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires at least \" +\n formatPlural(minNumberOfArgs, 'argument') +\n ', but was called with ' +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}\n/**\n * Validates the invocation of functionName has number of arguments between\n * the values provided.\n *\n * Forward the magic \"arguments\" variable as second parameter on which the\n * parameter validation is performed:\n * validateBetweenNumberOfArgs('myFunction', arguments, 2, 3);\n */\nexport function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs + \" and \" +\n (maxNumberOfArgs + \" arguments, but was called with \") +\n formatPlural(args.length, 'argument') +\n '.');\n }\n}\n/**\n * Validates the provided argument is an array and has as least the expected\n * number of elements.\n */\nexport function validateNamedArrayAtLeastNumberOfElements(functionName, value, name, minNumberOfElements) {\n if (!(value instanceof Array) || value.length < minNumberOfElements) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + name + \" argument to be an \" +\n 'array with at least ' +\n (formatPlural(minNumberOfElements, 'element') + \".\"));\n }\n}\n/**\n * Validates the provided positional argument has the native JavaScript type\n * using typeof checks.\n */\nexport function validateArgType(functionName, type, position, argument) {\n validateType(functionName, type, ordinal(position) + \" argument\", argument);\n}\n/**\n * Validates the provided argument has the native JavaScript type using\n * typeof checks or is undefined.\n */\nexport function validateOptionalArgType(functionName, type, position, argument) {\n if (argument !== undefined) {\n validateArgType(functionName, type, position, argument);\n }\n}\n/**\n * Validates the provided named option has the native JavaScript type using\n * typeof checks.\n */\nexport function validateNamedType(functionName, type, optionName, argument) {\n validateType(functionName, type, optionName + \" option\", argument);\n}\n/**\n * Validates the provided named option has the native JavaScript type using\n * typeof checks or is undefined.\n */\nexport function validateNamedOptionalType(functionName, type, optionName, argument) {\n if (argument !== undefined) {\n validateNamedType(functionName, type, optionName, argument);\n }\n}\n/** Helper to validate the type of a provided input. */\nfunction validateType(functionName, type, inputName, input) {\n if (typeof input !== type || (type === 'object' && !isPlainObject(input))) {\n var description = valueDescription(input);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + inputName + \" \" +\n (\"to be of type \" + type + \", but it was: \" + description));\n }\n}\n/**\n * Returns true iff it's a non-null object without a custom prototype\n * (i.e. excludes Array, Date, etc.).\n */\nexport function isPlainObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n Object.getPrototypeOf(input) === Object.prototype);\n}\n/** Returns a string describing the type / value of the provided input. */\nexport function valueDescription(input) {\n if (input === undefined) {\n return 'undefined';\n }\n else if (input === null) {\n return 'null';\n }\n else if (typeof input === 'string') {\n if (input.length > 20) {\n input = input.substring(0, 20) + \"...\";\n }\n return JSON.stringify(input);\n }\n else if (typeof input === 'number' || typeof input === 'boolean') {\n return '' + input;\n }\n else if (typeof input === 'object') {\n if (input instanceof Array) {\n return 'an array';\n }\n else {\n var customObjectName = tryGetCustomObjectType(input);\n if (customObjectName) {\n return \"a custom \" + customObjectName + \" object\";\n }\n else {\n return 'an object';\n }\n }\n }\n else if (typeof input === 'function') {\n return 'a function';\n }\n else {\n return fail('Unknown wrong type: ' + typeof input);\n }\n}\n/** Hacky method to try to get the constructor name for an object. */\nexport function tryGetCustomObjectType(input) {\n if (input.constructor) {\n var funcNameRegex = /function\\s+([^\\s(]+)\\s*\\(/;\n var results = funcNameRegex.exec(input.constructor.toString());\n if (results && results.length > 1) {\n return results[1];\n }\n }\n return null;\n}\n/** Validates the provided argument is defined. */\nexport function validateDefined(functionName, position, argument) {\n if (argument === undefined) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires a valid \" + ordinal(position) + \" \" +\n \"argument, but it was undefined.\");\n }\n}\n/**\n * Validates the provided positional argument is an object, and its keys and\n * values match the expected keys and types provided in optionTypes.\n */\nexport function validateOptionNames(functionName, options, optionNames) {\n obj.forEach(options, function (key, _) {\n if (optionNames.indexOf(key) < 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Unknown option '\" + key + \"' passed to function \" + functionName + \"(). \" +\n 'Available options: ' +\n optionNames.join(', '));\n }\n });\n}\n/**\n * Helper method to throw an error that the provided argument did not pass\n * an instanceof check.\n */\nexport function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}\n/** Converts a number to its english word representation */\nfunction ordinal(num) {\n switch (num) {\n case 1:\n return 'first';\n case 2:\n return 'second';\n case 3:\n return 'third';\n default:\n return num + 'th';\n }\n}\n/**\n * Formats the given word as plural conditionally given the preceding number.\n */\nfunction formatPlural(num, str) {\n return num + \" \" + str + (num === 1 ? '' : 's');\n}\n\n//# sourceMappingURL=input_validation.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/input_validation.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from './assert';\n// tslint:disable-next-line:class-as-namespace\nvar AutoId = /** @class */ (function () {\n function AutoId() {\n }\n AutoId.newId = function () {\n // Alphanumeric characters\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var autoId = '';\n for (var i = 0; i < 20; i++) {\n autoId += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n assert(autoId.length === 20, 'Invalid auto ID: ' + autoId);\n return autoId;\n };\n return AutoId;\n}());\nexport { AutoId };\nexport function primitiveComparator(left, right) {\n if (left < right)\n return -1;\n if (left > right)\n return 1;\n return 0;\n}\n/** Helper to compare nullable (or undefined-able) objects using equals(). */\nexport function equals(left, right) {\n if (left !== null && left !== undefined) {\n return !!(right && left.equals(right));\n }\n else {\n // HACK: Explicitly cast since TypeScript's type narrowing apparently isn't\n // smart enough.\n return left === right;\n }\n}\n/** Helper to compare arrays using equals(). */\nexport function arrayEquals(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (!left[i].equals(right[i])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Returns the largest lexicographically smaller string of equal or smaller\n * length. Returns an empty string if there is no such predecessor (if the input\n * is empty).\n *\n * Strings returned from this method can be invalid UTF-16 but this is sufficent\n * in use for indexeddb because that depends on lexicographical ordering but\n * shouldn't be used elsewhere.\n */\nexport function immediatePredecessor(s) {\n // We can decrement the last character in the string and be done\n // unless that character is 0 (0x0000), in which case we have to erase the\n // last character.\n var lastIndex = s.length - 1;\n if (s.length === 0) {\n // Special case the empty string.\n return '';\n }\n else if (s.charAt(lastIndex) === '\\0') {\n return s.substring(0, lastIndex);\n }\n else {\n return (s.substring(0, lastIndex) +\n String.fromCharCode(s.charCodeAt(lastIndex) - 1));\n }\n}\n/**\n * Returns the immediate lexicographically-following string. This is useful to\n * construct an inclusive range for indexeddb iterators.\n */\nexport function immediateSuccessor(s) {\n // Return the input string, with an additional NUL byte appended.\n return s + '\\0';\n}\n\n//# sourceMappingURL=misc.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/misc.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PlatformSupport } from '../platform/platform';\nimport { makeConstructorPrivate } from '../util/api';\nimport { Code, FirestoreError } from '../util/error';\nimport { invalidClassError, validateArgType, validateExactNumberOfArgs } from '../util/input_validation';\nimport { primitiveComparator } from '../util/misc';\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError(Code.UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.');\n }\n}\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available() {\n if (!PlatformSupport.getPlatform().base64Available) {\n throw new FirestoreError(Code.UNIMPLEMENTED, 'Blobs are unavailable in Firestore in this environment.');\n }\n}\n/**\n * Immutable class holding a blob (binary data).\n * This class is directly exposed in the public API.\n *\n * Note that while you can't hide the constructor in JavaScript code, we are\n * using the hack above to make sure no-one outside this module can call it.\n */\nvar Blob = /** @class */ (function () {\n function Blob(binaryString) {\n assertBase64Available();\n this._binaryString = binaryString;\n }\n Blob.fromBase64String = function (base64) {\n validateExactNumberOfArgs('Blob.fromBase64String', arguments, 1);\n validateArgType('Blob.fromBase64String', 'string', 1, base64);\n assertBase64Available();\n try {\n var binaryString = PlatformSupport.getPlatform().atob(base64);\n return new Blob(binaryString);\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Failed to construct Blob from Base64 string: ' + e);\n }\n };\n Blob.fromUint8Array = function (array) {\n validateExactNumberOfArgs('Blob.fromUint8Array', arguments, 1);\n assertUint8ArrayAvailable();\n if (!(array instanceof Uint8Array)) {\n throw invalidClassError('Blob.fromUint8Array', 'Uint8Array', 1, array);\n }\n // We can't call array.map directly because it expects the return type to\n // be a Uint8Array, whereas we can convert it to a regular array by invoking\n // map on the Array prototype.\n var binaryString = Array.prototype.map\n .call(array, function (char) {\n return String.fromCharCode(char);\n })\n .join('');\n return new Blob(binaryString);\n };\n Blob.prototype.toBase64 = function () {\n validateExactNumberOfArgs('Blob.toBase64', arguments, 0);\n assertBase64Available();\n return PlatformSupport.getPlatform().btoa(this._binaryString);\n };\n Blob.prototype.toUint8Array = function () {\n validateExactNumberOfArgs('Blob.toUint8Array', arguments, 0);\n assertUint8ArrayAvailable();\n var buffer = new Uint8Array(this._binaryString.length);\n for (var i = 0; i < this._binaryString.length; i++) {\n buffer[i] = this._binaryString.charCodeAt(i);\n }\n return buffer;\n };\n Blob.prototype.toString = function () {\n return 'Blob(base64: ' + this.toBase64() + ')';\n };\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n Blob.prototype._equals = function (other) {\n return this._binaryString === other._binaryString;\n };\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n Blob.prototype._compareTo = function (other) {\n return primitiveComparator(this._binaryString, other._binaryString);\n };\n return Blob;\n}());\nexport { Blob };\n// Public instance that disallows construction at runtime. This constructor is\n// used when exporting Blob on firebase.firestore.Blob and will be called Blob\n// publicly. Internally we still use Blob which has a type checked private\n// constructor. Note that Blob and PublicBlob can be used interchangeably in\n// instanceof checks.\n// For our internal TypeScript code PublicBlob doesn't exist as a type, and so\n// we need to use Blob as type and export it too.\n// tslint:disable-next-line:variable-name We're treating this as a class name.\nexport var PublicBlob = makeConstructorPrivate(Blob, 'Use Blob.fromUint8Array() or Blob.fromBase64String() instead.');\n\n//# sourceMappingURL=blob.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/blob.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { assert } from '../util/assert';\nimport { primitiveComparator } from '../util/misc';\nimport { SortedMap } from '../util/sorted_map';\nimport { DocumentKey } from './document_key';\nexport var TypeOrder;\n(function (TypeOrder) {\n // This order is defined by the backend.\n TypeOrder[TypeOrder[\"NullValue\"] = 0] = \"NullValue\";\n TypeOrder[TypeOrder[\"BooleanValue\"] = 1] = \"BooleanValue\";\n TypeOrder[TypeOrder[\"NumberValue\"] = 2] = \"NumberValue\";\n TypeOrder[TypeOrder[\"TimestampValue\"] = 3] = \"TimestampValue\";\n TypeOrder[TypeOrder[\"StringValue\"] = 4] = \"StringValue\";\n TypeOrder[TypeOrder[\"BlobValue\"] = 5] = \"BlobValue\";\n TypeOrder[TypeOrder[\"RefValue\"] = 6] = \"RefValue\";\n TypeOrder[TypeOrder[\"GeoPointValue\"] = 7] = \"GeoPointValue\";\n TypeOrder[TypeOrder[\"ArrayValue\"] = 8] = \"ArrayValue\";\n TypeOrder[TypeOrder[\"ObjectValue\"] = 9] = \"ObjectValue\";\n})(TypeOrder = TypeOrder || (TypeOrder = {}));\n/**\n * A field value represents a datatype as stored by Firestore.\n */\nvar FieldValue = /** @class */ (function () {\n function FieldValue() {\n }\n FieldValue.prototype.toString = function () {\n var val = this.value();\n return val === null ? 'null' : val.toString();\n };\n FieldValue.prototype.defaultCompareTo = function (other) {\n assert(this.typeOrder !== other.typeOrder, 'Default compareTo should not be used for values of same type.');\n var cmp = primitiveComparator(this.typeOrder, other.typeOrder);\n return cmp;\n };\n return FieldValue;\n}());\nexport { FieldValue };\nvar NullValue = /** @class */ (function (_super) {\n __extends(NullValue, _super);\n function NullValue() {\n var _this = _super.call(this) || this;\n _this.typeOrder = TypeOrder.NullValue;\n // internalValue is unused but we add it to work around\n // https://github.com/Microsoft/TypeScript/issues/15585\n _this.internalValue = null;\n return _this;\n }\n NullValue.prototype.value = function () {\n return null;\n };\n NullValue.prototype.equals = function (other) {\n return other instanceof NullValue;\n };\n NullValue.prototype.compareTo = function (other) {\n if (other instanceof NullValue) {\n return 0;\n }\n return this.defaultCompareTo(other);\n };\n NullValue.INSTANCE = new NullValue();\n return NullValue;\n}(FieldValue));\nexport { NullValue };\nvar BooleanValue = /** @class */ (function (_super) {\n __extends(BooleanValue, _super);\n function BooleanValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.BooleanValue;\n return _this;\n }\n BooleanValue.prototype.value = function () {\n return this.internalValue;\n };\n BooleanValue.prototype.equals = function (other) {\n return (other instanceof BooleanValue &&\n this.internalValue === other.internalValue);\n };\n BooleanValue.prototype.compareTo = function (other) {\n if (other instanceof BooleanValue) {\n return primitiveComparator(this, other);\n }\n return this.defaultCompareTo(other);\n };\n BooleanValue.of = function (value) {\n return value ? BooleanValue.TRUE : BooleanValue.FALSE;\n };\n BooleanValue.TRUE = new BooleanValue(true);\n BooleanValue.FALSE = new BooleanValue(false);\n return BooleanValue;\n}(FieldValue));\nexport { BooleanValue };\n/** Base class for IntegerValue and DoubleValue. */\nvar NumberValue = /** @class */ (function (_super) {\n __extends(NumberValue, _super);\n function NumberValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.NumberValue;\n return _this;\n }\n NumberValue.prototype.value = function () {\n return this.internalValue;\n };\n NumberValue.prototype.compareTo = function (other) {\n if (other instanceof NumberValue) {\n return numericComparator(this.internalValue, other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return NumberValue;\n}(FieldValue));\nexport { NumberValue };\n/** Utility function to compare doubles (using Firestore semantics for NaN). */\nfunction numericComparator(left, right) {\n if (left < right) {\n return -1;\n }\n else if (left > right) {\n return 1;\n }\n else if (left === right) {\n return 0;\n }\n else {\n // one or both are NaN.\n if (isNaN(left)) {\n return isNaN(right) ? 0 : -1;\n }\n else {\n return 1;\n }\n }\n}\n/**\n * Utility function to check numbers for equality using Firestore semantics\n * (NaN === NaN, -0.0 !== 0.0).\n */\nfunction numericEquals(left, right) {\n // Implemented based on Object.is() polyfill from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n if (left === right) {\n // +0 != -0\n return left !== 0 || 1 / left === 1 / right;\n }\n else {\n // NaN == NaN\n return left !== left && right !== right;\n }\n}\nvar IntegerValue = /** @class */ (function (_super) {\n __extends(IntegerValue, _super);\n function IntegerValue(internalValue) {\n return _super.call(this, internalValue) || this;\n }\n IntegerValue.prototype.equals = function (other) {\n // NOTE: DoubleValue and IntegerValue instances may compareTo() the same,\n // but that doesn't make them equal via equals().\n if (other instanceof IntegerValue) {\n return numericEquals(this.internalValue, other.internalValue);\n }\n else {\n return false;\n }\n };\n return IntegerValue;\n}(NumberValue));\nexport { IntegerValue };\nvar DoubleValue = /** @class */ (function (_super) {\n __extends(DoubleValue, _super);\n function DoubleValue(internalValue) {\n var _this = _super.call(this, internalValue) || this;\n _this.internalValue = internalValue;\n return _this;\n }\n DoubleValue.prototype.equals = function (other) {\n // NOTE: DoubleValue and IntegerValue instances may compareTo() the same,\n // but that doesn't make them equal via equals().\n if (other instanceof DoubleValue) {\n return numericEquals(this.internalValue, other.internalValue);\n }\n else {\n return false;\n }\n };\n DoubleValue.NAN = new DoubleValue(NaN);\n DoubleValue.POSITIVE_INFINITY = new DoubleValue(Infinity);\n DoubleValue.NEGATIVE_INFINITY = new DoubleValue(-Infinity);\n return DoubleValue;\n}(NumberValue));\nexport { DoubleValue };\n// TODO(b/37267885): Add truncation support\nvar StringValue = /** @class */ (function (_super) {\n __extends(StringValue, _super);\n function StringValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.StringValue;\n return _this;\n }\n StringValue.prototype.value = function () {\n return this.internalValue;\n };\n StringValue.prototype.equals = function (other) {\n return (other instanceof StringValue && this.internalValue === other.internalValue);\n };\n StringValue.prototype.compareTo = function (other) {\n if (other instanceof StringValue) {\n return primitiveComparator(this.internalValue, other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return StringValue;\n}(FieldValue));\nexport { StringValue };\nvar TimestampValue = /** @class */ (function (_super) {\n __extends(TimestampValue, _super);\n function TimestampValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.TimestampValue;\n return _this;\n }\n TimestampValue.prototype.value = function () {\n return this.internalValue.toDate();\n };\n TimestampValue.prototype.equals = function (other) {\n return (other instanceof TimestampValue &&\n this.internalValue.equals(other.internalValue));\n };\n TimestampValue.prototype.compareTo = function (other) {\n if (other instanceof TimestampValue) {\n return this.internalValue.compareTo(other.internalValue);\n }\n else if (other instanceof ServerTimestampValue) {\n // Concrete timestamps come before server timestamps.\n return -1;\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n return TimestampValue;\n}(FieldValue));\nexport { TimestampValue };\n/**\n * Represents a locally-applied ServerTimestamp.\n *\n * Notes:\n * - ServerTimestampValue instances are created as the result of applying a\n * TransformMutation (see TransformMutation.applyTo()). They can only exist in\n * the local view of a document. Therefore they do not need to be parsed or\n * serialized.\n * - When evaluated locally (e.g. for snapshot.data()), they evaluate to null.\n * - With respect to other ServerTimestampValues, they sort by their\n * localWriteTime.\n */\nvar ServerTimestampValue = /** @class */ (function (_super) {\n __extends(ServerTimestampValue, _super);\n function ServerTimestampValue(localWriteTime) {\n var _this = _super.call(this) || this;\n _this.localWriteTime = localWriteTime;\n _this.typeOrder = TypeOrder.TimestampValue;\n return _this;\n }\n ServerTimestampValue.prototype.value = function () {\n return null;\n };\n ServerTimestampValue.prototype.equals = function (other) {\n return (other instanceof ServerTimestampValue &&\n this.localWriteTime.equals(other.localWriteTime));\n };\n ServerTimestampValue.prototype.compareTo = function (other) {\n if (other instanceof ServerTimestampValue) {\n return this.localWriteTime.compareTo(other.localWriteTime);\n }\n else if (other instanceof TimestampValue) {\n // Server timestamps come after all concrete timestamps.\n return 1;\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n ServerTimestampValue.prototype.toString = function () {\n return '';\n };\n return ServerTimestampValue;\n}(FieldValue));\nexport { ServerTimestampValue };\nvar BlobValue = /** @class */ (function (_super) {\n __extends(BlobValue, _super);\n function BlobValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.BlobValue;\n return _this;\n }\n BlobValue.prototype.value = function () {\n return this.internalValue;\n };\n BlobValue.prototype.equals = function (other) {\n return (other instanceof BlobValue &&\n this.internalValue._equals(other.internalValue));\n };\n BlobValue.prototype.compareTo = function (other) {\n if (other instanceof BlobValue) {\n return this.internalValue._compareTo(other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return BlobValue;\n}(FieldValue));\nexport { BlobValue };\nvar RefValue = /** @class */ (function (_super) {\n __extends(RefValue, _super);\n function RefValue(databaseId, key) {\n var _this = _super.call(this) || this;\n _this.databaseId = databaseId;\n _this.key = key;\n _this.typeOrder = TypeOrder.RefValue;\n return _this;\n }\n RefValue.prototype.value = function () {\n return this.key;\n };\n RefValue.prototype.equals = function (other) {\n if (other instanceof RefValue) {\n return (this.key.equals(other.key) && this.databaseId.equals(other.databaseId));\n }\n else {\n return false;\n }\n };\n RefValue.prototype.compareTo = function (other) {\n if (other instanceof RefValue) {\n var cmp = this.databaseId.compareTo(other.databaseId);\n return cmp !== 0 ? cmp : DocumentKey.comparator(this.key, other.key);\n }\n return this.defaultCompareTo(other);\n };\n return RefValue;\n}(FieldValue));\nexport { RefValue };\nvar GeoPointValue = /** @class */ (function (_super) {\n __extends(GeoPointValue, _super);\n function GeoPointValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.GeoPointValue;\n return _this;\n }\n GeoPointValue.prototype.value = function () {\n return this.internalValue;\n };\n GeoPointValue.prototype.equals = function (other) {\n return (other instanceof GeoPointValue &&\n this.internalValue._equals(other.internalValue));\n };\n GeoPointValue.prototype.compareTo = function (other) {\n if (other instanceof GeoPointValue) {\n return this.internalValue._compareTo(other.internalValue);\n }\n return this.defaultCompareTo(other);\n };\n return GeoPointValue;\n}(FieldValue));\nexport { GeoPointValue };\nvar ObjectValue = /** @class */ (function (_super) {\n __extends(ObjectValue, _super);\n function ObjectValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.ObjectValue;\n return _this;\n }\n ObjectValue.prototype.value = function () {\n var result = {};\n this.internalValue.inorderTraversal(function (key, val) {\n result[key] = val.value();\n });\n return result;\n };\n ObjectValue.prototype.forEach = function (action) {\n this.internalValue.inorderTraversal(action);\n };\n ObjectValue.prototype.equals = function (other) {\n if (other instanceof ObjectValue) {\n var it1 = this.internalValue.getIterator();\n var it2 = other.internalValue.getIterator();\n while (it1.hasNext() && it2.hasNext()) {\n var next1 = it1.getNext();\n var next2 = it2.getNext();\n if (next1.key !== next2.key || !next1.value.equals(next2.value)) {\n return false;\n }\n }\n return !it1.hasNext() && !it2.hasNext();\n }\n return false;\n };\n ObjectValue.prototype.compareTo = function (other) {\n if (other instanceof ObjectValue) {\n var it1 = this.internalValue.getIterator();\n var it2 = other.internalValue.getIterator();\n while (it1.hasNext() && it2.hasNext()) {\n var next1 = it1.getNext();\n var next2 = it2.getNext();\n var cmp = primitiveComparator(next1.key, next2.key) ||\n next1.value.compareTo(next2.value);\n if (cmp) {\n return cmp;\n }\n }\n // Only equal if both iterators are exhausted\n return primitiveComparator(it1.hasNext(), it2.hasNext());\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n ObjectValue.prototype.set = function (path, to) {\n assert(!path.isEmpty(), 'Cannot set field for empty path on ObjectValue');\n if (path.length === 1) {\n return this.setChild(path.firstSegment(), to);\n }\n else {\n var child = this.child(path.firstSegment());\n if (!(child instanceof ObjectValue)) {\n child = ObjectValue.EMPTY;\n }\n var newChild = child.set(path.popFirst(), to);\n return this.setChild(path.firstSegment(), newChild);\n }\n };\n ObjectValue.prototype.delete = function (path) {\n assert(!path.isEmpty(), 'Cannot delete field for empty path on ObjectValue');\n if (path.length === 1) {\n return new ObjectValue(this.internalValue.remove(path.firstSegment()));\n }\n else {\n // nested field\n var child = this.child(path.firstSegment());\n if (child instanceof ObjectValue) {\n var newChild = child.delete(path.popFirst());\n return new ObjectValue(this.internalValue.insert(path.firstSegment(), newChild));\n }\n else {\n // Don't actually change a primitive value to an object for a delete\n return this;\n }\n }\n };\n ObjectValue.prototype.contains = function (path) {\n return this.field(path) !== undefined;\n };\n ObjectValue.prototype.field = function (path) {\n assert(!path.isEmpty(), \"Can't get field of empty path\");\n var field = this;\n path.forEach(function (pathSegment) {\n if (field instanceof ObjectValue) {\n field = field.internalValue.get(pathSegment) || undefined;\n }\n else {\n field = undefined;\n }\n });\n return field;\n };\n ObjectValue.prototype.toString = function () {\n return JSON.stringify(this.value());\n };\n ObjectValue.prototype.child = function (childName) {\n return this.internalValue.get(childName) || undefined;\n };\n ObjectValue.prototype.setChild = function (childName, value) {\n return new ObjectValue(this.internalValue.insert(childName, value));\n };\n ObjectValue.EMPTY = new ObjectValue(new SortedMap(primitiveComparator));\n return ObjectValue;\n}(FieldValue));\nexport { ObjectValue };\nvar ArrayValue = /** @class */ (function (_super) {\n __extends(ArrayValue, _super);\n function ArrayValue(internalValue) {\n var _this = _super.call(this) || this;\n _this.internalValue = internalValue;\n _this.typeOrder = TypeOrder.ArrayValue;\n return _this;\n }\n ArrayValue.prototype.value = function () {\n return this.internalValue.map(function (v) { return v.value(); });\n };\n ArrayValue.prototype.forEach = function (action) {\n this.internalValue.forEach(action);\n };\n ArrayValue.prototype.equals = function (other) {\n if (other instanceof ArrayValue) {\n if (this.internalValue.length !== other.internalValue.length) {\n return false;\n }\n for (var i = 0; i < this.internalValue.length; i++) {\n if (!this.internalValue[i].equals(other.internalValue[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n };\n ArrayValue.prototype.compareTo = function (other) {\n if (other instanceof ArrayValue) {\n var minLength = Math.min(this.internalValue.length, other.internalValue.length);\n for (var i = 0; i < minLength; i++) {\n var cmp = this.internalValue[i].compareTo(other.internalValue[i]);\n if (cmp) {\n return cmp;\n }\n }\n return primitiveComparator(this.internalValue.length, other.internalValue.length);\n }\n else {\n return this.defaultCompareTo(other);\n }\n };\n ArrayValue.prototype.toString = function () {\n return JSON.stringify(this.value());\n };\n return ArrayValue;\n}(FieldValue));\nexport { ArrayValue };\n\n//# sourceMappingURL=field_value.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/field_value.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Untyped Number alias we can use to check for ES6 methods / properties.\n// tslint:disable-next-line:no-any variable-name\nvar NumberAsAny = Number;\n/**\n * Minimum safe integer in Javascript because of floating point precision.\n * Added to not rely on ES6 features.\n */\nexport var MIN_SAFE_INTEGER = NumberAsAny.MIN_SAFE_INTEGER || -(Math.pow(2, 53) - 1);\n/**\n * Maximum safe integer in Javascript because of floating point precision.\n * Added to not rely on ES6 features.\n */\nexport var MAX_SAFE_INTEGER = NumberAsAny.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;\n/**\n * Returns whether an number is an integer, uses native implementation if\n * available.\n * Added to not rely on ES6 features.\n * @param value The value to test for being an integer\n */\nexport var isInteger = NumberAsAny.isInteger ||\n (function (value) {\n return typeof value === 'number' &&\n isFinite(value) &&\n Math.floor(value) === value;\n });\n/**\n * Returns whether a variable is either undefined or null.\n */\nexport function isNullOrUndefined(value) {\n return value === null || value === undefined;\n}\n/**\n * Returns whether a value is an integer and in the safe integer range\n * @param value The value to test for being an integer and in the safe range\n */\nexport function isSafeInteger(value) {\n return (isInteger(value) &&\n value <= MAX_SAFE_INTEGER &&\n value >= MIN_SAFE_INTEGER);\n}\n/**\n * Safely checks if the number is NaN.\n */\nexport function safeIsNaN(value) {\n if (NumberAsAny.IsNaN) {\n return NumberAsAny.IsNaN(value);\n }\n else {\n return typeof value === 'number' && isNaN(value);\n }\n}\n\n//# sourceMappingURL=types.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/types.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Document } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { DoubleValue, NullValue, RefValue } from '../model/field_value';\nimport { FieldPath } from '../model/path';\nimport { assert, fail } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nimport { isNullOrUndefined } from '../util/types';\nvar Query = /** @class */ (function () {\n function Query(path, explicitOrderBy, filters, limit, startAt, endAt) {\n if (explicitOrderBy === void 0) { explicitOrderBy = []; }\n if (filters === void 0) { filters = []; }\n if (limit === void 0) { limit = null; }\n if (startAt === void 0) { startAt = null; }\n if (endAt === void 0) { endAt = null; }\n this.path = path;\n this.explicitOrderBy = explicitOrderBy;\n this.filters = filters;\n this.limit = limit;\n this.startAt = startAt;\n this.endAt = endAt;\n this.memoizedCanonicalId = null;\n this.memoizedOrderBy = null;\n if (this.startAt) {\n this.assertValidBound(this.startAt);\n }\n if (this.endAt) {\n this.assertValidBound(this.endAt);\n }\n }\n Query.atPath = function (path) {\n return new Query(path);\n };\n Object.defineProperty(Query.prototype, \"orderBy\", {\n get: function () {\n if (this.memoizedOrderBy === null) {\n var inequalityField = this.getInequalityFilterField();\n var firstOrderByField = this.getFirstOrderByField();\n if (inequalityField !== null && firstOrderByField === null) {\n // In order to implicitly add key ordering, we must also add the\n // inequality filter field for it to be a valid query.\n // Note that the default inequality field and key ordering is ascending.\n if (inequalityField.isKeyField()) {\n this.memoizedOrderBy = [KEY_ORDERING_ASC];\n }\n else {\n this.memoizedOrderBy = [\n new OrderBy(inequalityField),\n KEY_ORDERING_ASC\n ];\n }\n }\n else {\n assert(inequalityField === null ||\n (firstOrderByField !== null &&\n inequalityField.equals(firstOrderByField)), 'First orderBy should match inequality field.');\n this.memoizedOrderBy = [];\n var foundKeyOrdering = false;\n for (var _i = 0, _a = this.explicitOrderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n this.memoizedOrderBy.push(orderBy);\n if (orderBy.field.isKeyField()) {\n foundKeyOrdering = true;\n }\n }\n if (!foundKeyOrdering) {\n // The order of the implicit key ordering always matches the last\n // explicit order by\n var lastDirection = this.explicitOrderBy.length > 0\n ? this.explicitOrderBy[this.explicitOrderBy.length - 1].dir\n : Direction.ASCENDING;\n this.memoizedOrderBy.push(lastDirection === Direction.ASCENDING\n ? KEY_ORDERING_ASC\n : KEY_ORDERING_DESC);\n }\n }\n }\n return this.memoizedOrderBy;\n },\n enumerable: true,\n configurable: true\n });\n Query.prototype.addFilter = function (filter) {\n assert(this.getInequalityFilterField() == null ||\n !(filter instanceof RelationFilter) ||\n !filter.isInequality() ||\n filter.field.equals(this.getInequalityFilterField()), 'Query must only have one inequality field.');\n assert(!DocumentKey.isDocumentKey(this.path), 'No filtering allowed for document query');\n var newFilters = this.filters.concat([filter]);\n return new Query(this.path, this.explicitOrderBy.slice(), newFilters, this.limit, this.startAt, this.endAt);\n };\n Query.prototype.addOrderBy = function (orderBy) {\n assert(!DocumentKey.isDocumentKey(this.path), 'No ordering allowed for document query');\n assert(!this.startAt && !this.endAt, 'Bounds must be set after orderBy');\n // TODO(dimond): validate that orderBy does not list the same key twice.\n var newOrderBy = this.explicitOrderBy.concat([orderBy]);\n return new Query(this.path, newOrderBy, this.filters.slice(), this.limit, this.startAt, this.endAt);\n };\n Query.prototype.withLimit = function (limit) {\n return new Query(this.path, this.explicitOrderBy.slice(), this.filters.slice(), limit, this.startAt, this.endAt);\n };\n Query.prototype.withStartAt = function (bound) {\n return new Query(this.path, this.explicitOrderBy.slice(), this.filters.slice(), this.limit, bound, this.endAt);\n };\n Query.prototype.withEndAt = function (bound) {\n return new Query(this.path, this.explicitOrderBy.slice(), this.filters.slice(), this.limit, this.startAt, bound);\n };\n // TODO(b/29183165): This is used to get a unique string from a query to, for\n // example, use as a dictionary key, but the implementation is subject to\n // collisions. Make it collision-free.\n Query.prototype.canonicalId = function () {\n if (this.memoizedCanonicalId === null) {\n var canonicalId = this.path.canonicalString();\n canonicalId += '|f:';\n for (var _i = 0, _a = this.filters; _i < _a.length; _i++) {\n var filter = _a[_i];\n canonicalId += filter.canonicalId();\n canonicalId += ',';\n }\n canonicalId += '|ob:';\n // TODO(dimond): make this collision resistant\n for (var _b = 0, _c = this.orderBy; _b < _c.length; _b++) {\n var orderBy = _c[_b];\n canonicalId += orderBy.canonicalId();\n canonicalId += ',';\n }\n if (!isNullOrUndefined(this.limit)) {\n canonicalId += '|l:';\n canonicalId += this.limit;\n }\n if (this.startAt) {\n canonicalId += '|lb:';\n canonicalId += this.startAt.canonicalId();\n }\n if (this.endAt) {\n canonicalId += '|ub:';\n canonicalId += this.endAt.canonicalId();\n }\n this.memoizedCanonicalId = canonicalId;\n }\n return this.memoizedCanonicalId;\n };\n Query.prototype.toString = function () {\n var str = 'Query(' + this.path.canonicalString();\n if (this.filters.length > 0) {\n str += \", filters: [\" + this.filters.join(', ') + \"]\";\n }\n if (!isNullOrUndefined(this.limit)) {\n str += ', limit: ' + this.limit;\n }\n if (this.explicitOrderBy.length > 0) {\n str += \", orderBy: [\" + this.explicitOrderBy.join(', ') + \"]\";\n }\n if (this.startAt) {\n str += ', startAt: ' + this.startAt.canonicalId();\n }\n if (this.endAt) {\n str += ', endAt: ' + this.endAt.canonicalId();\n }\n return str + ')';\n };\n Query.prototype.equals = function (other) {\n if (this.limit !== other.limit) {\n return false;\n }\n if (this.orderBy.length !== other.orderBy.length) {\n return false;\n }\n for (var i = 0; i < this.orderBy.length; i++) {\n if (!this.orderBy[i].equals(other.orderBy[i])) {\n return false;\n }\n }\n if (this.filters.length !== other.filters.length) {\n return false;\n }\n for (var i = 0; i < this.filters.length; i++) {\n if (!this.filters[i].equals(other.filters[i])) {\n return false;\n }\n }\n if (!this.path.equals(other.path)) {\n return false;\n }\n if (this.startAt !== null\n ? !this.startAt.equals(other.startAt)\n : other.startAt !== null) {\n return false;\n }\n return this.endAt !== null\n ? this.endAt.equals(other.endAt)\n : other.endAt === null;\n };\n Query.prototype.docComparator = function (d1, d2) {\n var comparedOnKeyField = false;\n for (var _i = 0, _a = this.orderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n var comp = orderBy.compare(d1, d2);\n if (comp !== 0)\n return comp;\n comparedOnKeyField = comparedOnKeyField || orderBy.field.isKeyField();\n }\n // Assert that we actually compared by key\n assert(comparedOnKeyField, \"orderBy used that doesn't compare on key field\");\n return 0;\n };\n Query.prototype.matches = function (doc) {\n return (this.matchesAncestor(doc) &&\n this.matchesOrderBy(doc) &&\n this.matchesFilters(doc) &&\n this.matchesBounds(doc));\n };\n Query.prototype.hasLimit = function () {\n return !isNullOrUndefined(this.limit);\n };\n Query.prototype.getFirstOrderByField = function () {\n return this.explicitOrderBy.length > 0\n ? this.explicitOrderBy[0].field\n : null;\n };\n Query.prototype.getInequalityFilterField = function () {\n for (var _i = 0, _a = this.filters; _i < _a.length; _i++) {\n var filter = _a[_i];\n if (filter instanceof RelationFilter && filter.isInequality()) {\n return filter.field;\n }\n }\n return null;\n };\n Query.prototype.isDocumentQuery = function () {\n return DocumentKey.isDocumentKey(this.path) && this.filters.length === 0;\n };\n Query.prototype.matchesAncestor = function (doc) {\n var docPath = doc.key.path;\n if (DocumentKey.isDocumentKey(this.path)) {\n // exact match for document queries\n return this.path.equals(docPath);\n }\n else {\n // shallow ancestor queries by default\n return (this.path.isPrefixOf(docPath) && this.path.length === docPath.length - 1);\n }\n };\n /**\n * A document must have a value for every ordering clause in order to show up\n * in the results.\n */\n Query.prototype.matchesOrderBy = function (doc) {\n for (var _i = 0, _a = this.explicitOrderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n // order by key always matches\n if (!orderBy.field.isKeyField() &&\n doc.field(orderBy.field) === undefined) {\n return false;\n }\n }\n return true;\n };\n Query.prototype.matchesFilters = function (doc) {\n for (var _i = 0, _a = this.filters; _i < _a.length; _i++) {\n var filter = _a[_i];\n if (!filter.matches(doc)) {\n return false;\n }\n }\n return true;\n };\n /**\n * Makes sure a document is within the bounds, if provided.\n */\n Query.prototype.matchesBounds = function (doc) {\n if (this.startAt && !this.startAt.sortsBeforeDocument(this.orderBy, doc)) {\n return false;\n }\n if (this.endAt && this.endAt.sortsBeforeDocument(this.orderBy, doc)) {\n return false;\n }\n return true;\n };\n Query.prototype.assertValidBound = function (bound) {\n assert(bound.position.length <= this.orderBy.length, 'Bound is longer than orderBy');\n };\n return Query;\n}());\nexport { Query };\nvar RelationOp = /** @class */ (function () {\n function RelationOp(name) {\n this.name = name;\n }\n RelationOp.fromString = function (op) {\n switch (op) {\n case '<':\n return RelationOp.LESS_THAN;\n case '<=':\n return RelationOp.LESS_THAN_OR_EQUAL;\n case '==':\n return RelationOp.EQUAL;\n case '>=':\n return RelationOp.GREATER_THAN_OR_EQUAL;\n case '>':\n return RelationOp.GREATER_THAN;\n default:\n return fail('Unknown relation: ' + op);\n }\n };\n RelationOp.prototype.toString = function () {\n return this.name;\n };\n RelationOp.prototype.equals = function (other) {\n return this.name === other.name;\n };\n RelationOp.LESS_THAN = new RelationOp('<');\n RelationOp.LESS_THAN_OR_EQUAL = new RelationOp('<=');\n RelationOp.EQUAL = new RelationOp('==');\n RelationOp.GREATER_THAN = new RelationOp('>');\n RelationOp.GREATER_THAN_OR_EQUAL = new RelationOp('>=');\n return RelationOp;\n}());\nexport { RelationOp };\nvar RelationFilter = /** @class */ (function () {\n function RelationFilter(field, op, value) {\n this.field = field;\n this.op = op;\n this.value = value;\n }\n RelationFilter.prototype.matches = function (doc) {\n if (this.field.isKeyField()) {\n assert(this.value instanceof RefValue, 'Comparing on key, but filter value not a RefValue');\n var refValue = this.value;\n var comparison = DocumentKey.comparator(doc.key, refValue.key);\n return this.matchesComparison(comparison);\n }\n else {\n var val = doc.field(this.field);\n return val !== undefined && this.matchesValue(val);\n }\n };\n RelationFilter.prototype.matchesValue = function (value) {\n // Only compare types with matching backend order (such as double and int).\n if (this.value.typeOrder !== value.typeOrder) {\n return false;\n }\n return this.matchesComparison(value.compareTo(this.value));\n };\n RelationFilter.prototype.matchesComparison = function (comparison) {\n switch (this.op) {\n case RelationOp.LESS_THAN:\n return comparison < 0;\n case RelationOp.LESS_THAN_OR_EQUAL:\n return comparison <= 0;\n case RelationOp.EQUAL:\n return comparison === 0;\n case RelationOp.GREATER_THAN:\n return comparison > 0;\n case RelationOp.GREATER_THAN_OR_EQUAL:\n return comparison >= 0;\n default:\n return fail('Unknown relation op' + this.op);\n }\n };\n RelationFilter.prototype.isInequality = function () {\n return this.op !== RelationOp.EQUAL;\n };\n RelationFilter.prototype.canonicalId = function () {\n // TODO(b/29183165): Technically, this won't be unique if two values have\n // the same description, such as the int 3 and the string \"3\". So we should\n // add the types in here somehow, too.\n return (this.field.canonicalString() + this.op.toString() + this.value.toString());\n };\n RelationFilter.prototype.equals = function (other) {\n if (other instanceof RelationFilter) {\n return (this.op.equals(other.op) &&\n this.field.equals(other.field) &&\n this.value.equals(other.value));\n }\n else {\n return false;\n }\n };\n RelationFilter.prototype.toString = function () {\n return this.field.canonicalString() + \" \" + this.op + \" \" + this.value.value();\n };\n return RelationFilter;\n}());\nexport { RelationFilter };\n/**\n * Filter that matches 'null' values.\n */\nvar NullFilter = /** @class */ (function () {\n function NullFilter(field) {\n this.field = field;\n }\n NullFilter.prototype.matches = function (doc) {\n var val = doc.field(this.field);\n return val !== undefined && val.value() === null;\n };\n NullFilter.prototype.canonicalId = function () {\n return this.field.canonicalString() + ' IS null';\n };\n NullFilter.prototype.toString = function () {\n return this.field.canonicalString() + \" IS null\";\n };\n NullFilter.prototype.equals = function (other) {\n if (other instanceof NullFilter) {\n return this.field.equals(other.field);\n }\n else {\n return false;\n }\n };\n return NullFilter;\n}());\nexport { NullFilter };\n/**\n * Filter that matches 'NaN' values.\n */\nvar NanFilter = /** @class */ (function () {\n function NanFilter(field) {\n this.field = field;\n }\n NanFilter.prototype.matches = function (doc) {\n var val = doc.field(this.field).value();\n return typeof val === 'number' && isNaN(val);\n };\n NanFilter.prototype.canonicalId = function () {\n return this.field.canonicalString() + ' IS NaN';\n };\n NanFilter.prototype.toString = function () {\n return this.field.canonicalString() + \" IS NaN\";\n };\n NanFilter.prototype.equals = function (other) {\n if (other instanceof NanFilter) {\n return this.field.equals(other.field);\n }\n else {\n return false;\n }\n };\n return NanFilter;\n}());\nexport { NanFilter };\n/**\n * Creates a filter based on the provided arguments.\n */\nexport function fieldFilter(field, op, value) {\n if (value.equals(NullValue.INSTANCE)) {\n if (op !== RelationOp.EQUAL) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You can only perform equals ' + 'comparisons on null.');\n }\n return new NullFilter(field);\n }\n else if (value.equals(DoubleValue.NAN)) {\n if (op !== RelationOp.EQUAL) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You can only perform equals ' + 'comparisons on NaN.');\n }\n return new NanFilter(field);\n }\n else {\n return new RelationFilter(field, op, value);\n }\n}\n/**\n * The direction of sorting in an order by.\n */\nvar Direction = /** @class */ (function () {\n function Direction(name) {\n this.name = name;\n }\n Direction.prototype.toString = function () {\n return this.name;\n };\n Direction.ASCENDING = new Direction('asc');\n Direction.DESCENDING = new Direction('desc');\n return Direction;\n}());\nexport { Direction };\n/**\n * Represents a bound of a query.\n *\n * The bound is specified with the given components representing a position and\n * whether it's just before or just after the position (relative to whatever the\n * query order is).\n *\n * The position represents a logical index position for a query. It's a prefix\n * of values for the (potentially implicit) order by clauses of a query.\n *\n * Bound provides a function to determine whether a document comes before or\n * after a bound. This is influenced by whether the position is just before or\n * just after the provided values.\n */\nvar Bound = /** @class */ (function () {\n function Bound(position, before) {\n this.position = position;\n this.before = before;\n }\n Bound.prototype.canonicalId = function () {\n // TODO(b/29183165): Make this collision robust.\n var canonicalId = this.before ? 'b:' : 'a:';\n for (var _i = 0, _a = this.position; _i < _a.length; _i++) {\n var component = _a[_i];\n canonicalId += component.toString();\n }\n return canonicalId;\n };\n /**\n * Returns true if a document sorts before a bound using the provided sort\n * order.\n */\n Bound.prototype.sortsBeforeDocument = function (orderBy, doc) {\n assert(this.position.length <= orderBy.length, \"Bound has more components than query's orderBy\");\n var comparison = 0;\n for (var i = 0; i < this.position.length; i++) {\n var orderByComponent = orderBy[i];\n var component = this.position[i];\n if (orderByComponent.field.isKeyField()) {\n assert(component instanceof RefValue, 'Bound has a non-key value where the key path is being used.');\n comparison = DocumentKey.comparator(component.key, doc.key);\n }\n else {\n var docValue = doc.field(orderByComponent.field);\n assert(docValue !== undefined, 'Field should exist since document matched the orderBy already.');\n comparison = component.compareTo(docValue);\n }\n if (orderByComponent.dir === Direction.DESCENDING) {\n comparison = comparison * -1;\n }\n if (comparison !== 0) {\n break;\n }\n }\n return this.before ? comparison <= 0 : comparison < 0;\n };\n Bound.prototype.equals = function (other) {\n if (other === null) {\n return false;\n }\n if (this.before !== other.before ||\n this.position.length !== other.position.length) {\n return false;\n }\n for (var i = 0; i < this.position.length; i++) {\n var thisPosition = this.position[i];\n var otherPosition = other.position[i];\n return thisPosition.equals(otherPosition);\n }\n return true;\n };\n return Bound;\n}());\nexport { Bound };\n/**\n * An ordering on a field, in some Direction. Direction defaults to ASCENDING.\n */\nvar OrderBy = /** @class */ (function () {\n function OrderBy(field, dir) {\n this.field = field;\n if (dir === undefined) {\n dir = Direction.ASCENDING;\n }\n this.dir = dir;\n this.isKeyOrderBy = field.isKeyField();\n }\n OrderBy.prototype.compare = function (d1, d2) {\n var comparison = this.isKeyOrderBy\n ? Document.compareByKey(d1, d2)\n : Document.compareByField(this.field, d1, d2);\n switch (this.dir) {\n case Direction.ASCENDING:\n return comparison;\n case Direction.DESCENDING:\n return -1 * comparison;\n default:\n return fail('Unknown direction: ' + this.dir);\n }\n };\n OrderBy.prototype.canonicalId = function () {\n // TODO(b/29183165): Make this collision robust.\n return this.field.canonicalString() + this.dir.toString();\n };\n OrderBy.prototype.toString = function () {\n return this.field.canonicalString() + \" (\" + this.dir + \")\";\n };\n OrderBy.prototype.equals = function (other) {\n return this.dir === other.dir && this.field.equals(other.field);\n };\n return OrderBy;\n}());\nexport { OrderBy };\nvar KEY_ORDERING_ASC = new OrderBy(FieldPath.keyField(), Direction.ASCENDING);\nvar KEY_ORDERING_DESC = new OrderBy(FieldPath.keyField(), Direction.DESCENDING);\n\n//# sourceMappingURL=query.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/query.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { fail } from '../util/assert';\nimport { Code } from '../util/error';\n/**\n * Error Codes describing the different ways GRPC can fail. These are copied\n * directly from GRPC's sources here:\n *\n * https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n *\n * Important! The names of these identifiers matter because the string forms\n * are used for reverse lookups from the webchannel stream. Do NOT change the\n * names of these identifiers.\n */\nvar RpcCode;\n(function (RpcCode) {\n RpcCode[RpcCode[\"OK\"] = 0] = \"OK\";\n RpcCode[RpcCode[\"CANCELLED\"] = 1] = \"CANCELLED\";\n RpcCode[RpcCode[\"UNKNOWN\"] = 2] = \"UNKNOWN\";\n RpcCode[RpcCode[\"INVALID_ARGUMENT\"] = 3] = \"INVALID_ARGUMENT\";\n RpcCode[RpcCode[\"DEADLINE_EXCEEDED\"] = 4] = \"DEADLINE_EXCEEDED\";\n RpcCode[RpcCode[\"NOT_FOUND\"] = 5] = \"NOT_FOUND\";\n RpcCode[RpcCode[\"ALREADY_EXISTS\"] = 6] = \"ALREADY_EXISTS\";\n RpcCode[RpcCode[\"PERMISSION_DENIED\"] = 7] = \"PERMISSION_DENIED\";\n RpcCode[RpcCode[\"UNAUTHENTICATED\"] = 16] = \"UNAUTHENTICATED\";\n RpcCode[RpcCode[\"RESOURCE_EXHAUSTED\"] = 8] = \"RESOURCE_EXHAUSTED\";\n RpcCode[RpcCode[\"FAILED_PRECONDITION\"] = 9] = \"FAILED_PRECONDITION\";\n RpcCode[RpcCode[\"ABORTED\"] = 10] = \"ABORTED\";\n RpcCode[RpcCode[\"OUT_OF_RANGE\"] = 11] = \"OUT_OF_RANGE\";\n RpcCode[RpcCode[\"UNIMPLEMENTED\"] = 12] = \"UNIMPLEMENTED\";\n RpcCode[RpcCode[\"INTERNAL\"] = 13] = \"INTERNAL\";\n RpcCode[RpcCode[\"UNAVAILABLE\"] = 14] = \"UNAVAILABLE\";\n RpcCode[RpcCode[\"DATA_LOSS\"] = 15] = \"DATA_LOSS\";\n})(RpcCode || (RpcCode = {}));\nexport function isPermanentError(code) {\n switch (code) {\n case Code.OK:\n return fail('Treated status OK as error');\n case Code.CANCELLED:\n case Code.UNKNOWN:\n case Code.DEADLINE_EXCEEDED:\n case Code.RESOURCE_EXHAUSTED:\n case Code.INTERNAL:\n case Code.UNAVAILABLE:\n // Unauthenticated means something went wrong with our token and we need\n // to retry with new credentials which will happen automatically.\n // TODO(b/37325376): Give up after second unauthenticated error.\n case Code.UNAUTHENTICATED:\n return false;\n case Code.INVALID_ARGUMENT:\n case Code.NOT_FOUND:\n case Code.ALREADY_EXISTS:\n case Code.PERMISSION_DENIED:\n case Code.FAILED_PRECONDITION:\n // Aborted might be retried in some scenarios, but that is dependant on\n // the context and should handled individually by the calling code.\n // See https://cloud.google.com/apis/design/errors.\n case Code.ABORTED:\n case Code.OUT_OF_RANGE:\n case Code.UNIMPLEMENTED:\n case Code.DATA_LOSS:\n return true;\n default:\n return fail('Unknown status code: ' + code);\n }\n}\n/**\n * Maps an error Code from a GRPC status identifier like 'NOT_FOUND'.\n *\n * @returns The Code equivalent to the given status string or undefined if\n * there is no match.\n */\nexport function mapCodeFromRpcStatus(status) {\n // tslint:disable-next-line:no-any lookup by string\n var code = RpcCode[status];\n if (code === undefined) {\n return undefined;\n }\n return mapCodeFromRpcCode(code);\n}\n/**\n * Maps an error Code from GRPC status code number, like 0, 1, or 14. These\n * are not the same as HTTP status codes.\n *\n * @returns The Code equivalent to the given GRPC status code. Fails if there\n * is no match.\n */\nexport function mapCodeFromRpcCode(code) {\n switch (code) {\n case RpcCode.OK:\n return Code.OK;\n case RpcCode.CANCELLED:\n return Code.CANCELLED;\n case RpcCode.UNKNOWN:\n return Code.UNKNOWN;\n case RpcCode.DEADLINE_EXCEEDED:\n return Code.DEADLINE_EXCEEDED;\n case RpcCode.RESOURCE_EXHAUSTED:\n return Code.RESOURCE_EXHAUSTED;\n case RpcCode.INTERNAL:\n return Code.INTERNAL;\n case RpcCode.UNAVAILABLE:\n return Code.UNAVAILABLE;\n case RpcCode.UNAUTHENTICATED:\n return Code.UNAUTHENTICATED;\n case RpcCode.INVALID_ARGUMENT:\n return Code.INVALID_ARGUMENT;\n case RpcCode.NOT_FOUND:\n return Code.NOT_FOUND;\n case RpcCode.ALREADY_EXISTS:\n return Code.ALREADY_EXISTS;\n case RpcCode.PERMISSION_DENIED:\n return Code.PERMISSION_DENIED;\n case RpcCode.FAILED_PRECONDITION:\n return Code.FAILED_PRECONDITION;\n case RpcCode.ABORTED:\n return Code.ABORTED;\n case RpcCode.OUT_OF_RANGE:\n return Code.OUT_OF_RANGE;\n case RpcCode.UNIMPLEMENTED:\n return Code.UNIMPLEMENTED;\n case RpcCode.DATA_LOSS:\n return Code.DATA_LOSS;\n default:\n return fail('Unknown status code: ' + code);\n }\n}\n/**\n * Maps an RPC code from a Code. This is the reverse operation from\n * mapCodeFromRpcCode and should really only be used in tests.\n */\nexport function mapRpcCodeFromCode(code) {\n if (code === undefined) {\n return RpcCode.OK;\n }\n switch (code) {\n case Code.OK:\n return RpcCode.OK;\n case Code.CANCELLED:\n return RpcCode.CANCELLED;\n case Code.UNKNOWN:\n return RpcCode.UNKNOWN;\n case Code.DEADLINE_EXCEEDED:\n return RpcCode.DEADLINE_EXCEEDED;\n case Code.RESOURCE_EXHAUSTED:\n return RpcCode.RESOURCE_EXHAUSTED;\n case Code.INTERNAL:\n return RpcCode.INTERNAL;\n case Code.UNAVAILABLE:\n return RpcCode.UNAVAILABLE;\n case Code.UNAUTHENTICATED:\n return RpcCode.UNAUTHENTICATED;\n case Code.INVALID_ARGUMENT:\n return RpcCode.INVALID_ARGUMENT;\n case Code.NOT_FOUND:\n return RpcCode.NOT_FOUND;\n case Code.ALREADY_EXISTS:\n return RpcCode.ALREADY_EXISTS;\n case Code.PERMISSION_DENIED:\n return RpcCode.PERMISSION_DENIED;\n case Code.FAILED_PRECONDITION:\n return RpcCode.FAILED_PRECONDITION;\n case Code.ABORTED:\n return RpcCode.ABORTED;\n case Code.OUT_OF_RANGE:\n return RpcCode.OUT_OF_RANGE;\n case Code.UNIMPLEMENTED:\n return RpcCode.UNIMPLEMENTED;\n case Code.DATA_LOSS:\n return RpcCode.DATA_LOSS;\n default:\n return fail('Unknown status code: ' + code);\n }\n}\n/**\n * Converts an HTTP Status Code to the equivalent error code.\n *\n * @param status An HTTP Status Code, like 200, 404, 503, etc.\n * @returns The equivalent Code. Unknown status codes are mapped to\n * Code.UNKNOWN.\n */\nexport function mapCodeFromHttpStatus(status) {\n // The canonical error codes for Google APIs [1] specify mapping onto HTTP\n // status codes but the mapping is not bijective. In each case of ambiguity\n // this function chooses a primary error.\n //\n // [1]\n // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto\n switch (status) {\n case 200:// OK\n return Code.OK;\n case 400:// Bad Request\n return Code.INVALID_ARGUMENT;\n // Other possibilities based on the forward mapping\n // return Code.FAILED_PRECONDITION;\n // return Code.OUT_OF_RANGE;\n case 401:// Unauthorized\n return Code.UNAUTHENTICATED;\n case 403:// Forbidden\n return Code.PERMISSION_DENIED;\n case 404:// Not Found\n return Code.NOT_FOUND;\n case 409:// Conflict\n return Code.ABORTED;\n // Other possibilities:\n // return Code.ALREADY_EXISTS;\n case 416:// Range Not Satisfiable\n return Code.OUT_OF_RANGE;\n case 429:// Too Many Requests\n return Code.RESOURCE_EXHAUSTED;\n case 499:// Client Closed Request\n return Code.CANCELLED;\n case 500:// Internal Server Error\n return Code.UNKNOWN;\n // Other possibilities:\n // return Code.INTERNAL;\n // return Code.DATA_LOSS;\n case 501:// Unimplemented\n return Code.UNIMPLEMENTED;\n case 503:// Service Unavailable\n return Code.UNAVAILABLE;\n case 504:// Gateway Timeout\n return Code.DEADLINE_EXCEEDED;\n default:\n if (status >= 200 && status < 300)\n return Code.OK;\n if (status >= 400 && status < 500)\n return Code.FAILED_PRECONDITION;\n if (status >= 500 && status < 600)\n return Code.INTERNAL;\n return Code.UNKNOWN;\n }\n}\n\n//# sourceMappingURL=rpc_error.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/rpc_error.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SortedMap } from '../util/sorted_map';\nimport { SortedSet } from '../util/sorted_set';\nimport { DocumentKey } from './document_key';\nvar EMPTY_MAYBE_DOCUMENT_MAP = new SortedMap(DocumentKey.comparator);\nexport function maybeDocumentMap() {\n return EMPTY_MAYBE_DOCUMENT_MAP;\n}\nvar EMPTY_DOCUMENT_MAP = new SortedMap(DocumentKey.comparator);\nexport function documentMap() {\n return EMPTY_DOCUMENT_MAP;\n}\nvar EMPTY_DOCUMENT_VERSION_MAP = new SortedMap(DocumentKey.comparator);\nexport function documentVersionMap() {\n return EMPTY_DOCUMENT_VERSION_MAP;\n}\nvar EMPTY_DOCUMENT_KEY_SET = new SortedSet(DocumentKey.comparator);\nexport function documentKeySet() {\n return EMPTY_DOCUMENT_KEY_SET;\n}\n\n//# sourceMappingURL=collections.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/collections.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { maybeDocumentMap } from '../model/collections';\nimport { emptyByteString } from '../platform/platform';\nimport { assert, fail } from '../util/assert';\nimport * as objUtils from '../util/obj';\nimport { CurrentStatusUpdate, RemoteEvent, ResetMapping, UpdateMapping } from './remote_event';\n/**\n * Represents a changed document and a list of target ids to which this change\n * applies.\n *\n * If document has been deleted NoDocument will be provided.\n */\nvar DocumentWatchChange = /** @class */ (function () {\n function DocumentWatchChange(\n /** The new document applies to all of these targets. */\n updatedTargetIds, \n /** The new document is removed from all of these targets. */\n removedTargetIds, \n /** The key of the document for this change. */\n key, \n /**\n * The new document or NoDocument if it was deleted. Is null if the\n * document went out of view without the server sending a new document.\n */\n newDoc) {\n this.updatedTargetIds = updatedTargetIds;\n this.removedTargetIds = removedTargetIds;\n this.key = key;\n this.newDoc = newDoc;\n }\n return DocumentWatchChange;\n}());\nexport { DocumentWatchChange };\nvar ExistenceFilterChange = /** @class */ (function () {\n function ExistenceFilterChange(targetId, existenceFilter) {\n this.targetId = targetId;\n this.existenceFilter = existenceFilter;\n }\n return ExistenceFilterChange;\n}());\nexport { ExistenceFilterChange };\nexport var WatchTargetChangeState;\n(function (WatchTargetChangeState) {\n WatchTargetChangeState[WatchTargetChangeState[\"NoChange\"] = 0] = \"NoChange\";\n WatchTargetChangeState[WatchTargetChangeState[\"Added\"] = 1] = \"Added\";\n WatchTargetChangeState[WatchTargetChangeState[\"Removed\"] = 2] = \"Removed\";\n WatchTargetChangeState[WatchTargetChangeState[\"Current\"] = 3] = \"Current\";\n WatchTargetChangeState[WatchTargetChangeState[\"Reset\"] = 4] = \"Reset\";\n})(WatchTargetChangeState = WatchTargetChangeState || (WatchTargetChangeState = {}));\nvar WatchTargetChange = /** @class */ (function () {\n function WatchTargetChange(\n /** What kind of change occurred to the watch target. */\n state, \n /** The target IDs that were added/removed/set. */\n targetIds, \n /**\n * An opaque, server-assigned token that allows watching a query to be\n * resumed after disconnecting without retransmitting all the data that\n * matches the query. The resume token essentially identifies a point in\n * time from which the server should resume sending results.\n */\n resumeToken, \n /** An RPC error indicating why the watch failed. */\n cause) {\n if (resumeToken === void 0) { resumeToken = emptyByteString(); }\n if (cause === void 0) { cause = null; }\n this.state = state;\n this.targetIds = targetIds;\n this.resumeToken = resumeToken;\n this.cause = cause;\n }\n return WatchTargetChange;\n}());\nexport { WatchTargetChange };\n/**\n * A helper class to accumulate watch changes into a RemoteEvent and other\n * target information.\n */\nvar WatchChangeAggregator = /** @class */ (function () {\n function WatchChangeAggregator(snapshotVersion, listenTargets, pendingTargetResponses) {\n this.snapshotVersion = snapshotVersion;\n this.listenTargets = listenTargets;\n /** The existence filter - if any - for the given target IDs. */\n this.existenceFilters = {};\n /** Keeps track of the current target mappings */\n this.targetChanges = {};\n /** Keeps track of document to update */\n this.documentUpdates = maybeDocumentMap();\n /** Whether this aggregator was frozen and can no longer be modified */\n this.frozen = false;\n this.pendingTargetResponses = objUtils.shallowCopy(pendingTargetResponses);\n }\n /** Aggregates a watch change into the current state */\n WatchChangeAggregator.prototype.add = function (watchChange) {\n assert(!this.frozen, 'Trying to modify frozen WatchChangeAggregator.');\n if (watchChange instanceof DocumentWatchChange) {\n this.addDocumentChange(watchChange);\n }\n else if (watchChange instanceof WatchTargetChange) {\n this.addTargetChange(watchChange);\n }\n else if (watchChange instanceof ExistenceFilterChange) {\n this.addExistenceFilterChange(watchChange);\n }\n else {\n fail('Unknown watch change: ' + watchChange);\n }\n };\n /** Aggregates all provided watch changes to the current state in order */\n WatchChangeAggregator.prototype.addChanges = function (watchChanges) {\n var _this = this;\n assert(!this.frozen, 'Trying to modify frozen WatchChangeAggregator.');\n watchChanges.forEach(function (change) { return _this.add(change); });\n };\n /**\n * Converts the current state into a remote event with the snapshot version\n * provided via the constructor.\n */\n WatchChangeAggregator.prototype.createRemoteEvent = function () {\n var _this = this;\n var targetChanges = this.targetChanges;\n // Remove all the non-active targets from the remote event.\n objUtils.forEachNumber(this.targetChanges, function (targetId) {\n if (!_this.isActiveTarget(targetId)) {\n delete targetChanges[targetId];\n }\n });\n // Mark this aggregator as frozen so no further modifications are made\n this.frozen = true;\n return new RemoteEvent(this.snapshotVersion, targetChanges, this.documentUpdates);\n };\n WatchChangeAggregator.prototype.ensureTargetChange = function (targetId) {\n var change = this.targetChanges[targetId];\n if (!change) {\n // Create an UpdateMapping by default, since resets are always explicit.\n change = {\n currentStatusUpdate: CurrentStatusUpdate.None,\n snapshotVersion: this.snapshotVersion,\n mapping: new UpdateMapping(),\n resumeToken: emptyByteString()\n };\n this.targetChanges[targetId] = change;\n }\n return change;\n };\n /**\n * We need to wait for watch to ack targets before we process those events,\n * so to know if a target is active, there must be no pending acks we're\n * waiting for and it must be in the current list of targets that the client\n * cares about.\n *\n * This method is visible for testing.\n */\n WatchChangeAggregator.prototype.isActiveTarget = function (targetId) {\n return (!objUtils.contains(this.pendingTargetResponses, targetId) &&\n objUtils.contains(this.listenTargets, targetId));\n };\n WatchChangeAggregator.prototype.addDocumentChange = function (docChange) {\n var relevant = false;\n for (var _i = 0, _a = docChange.updatedTargetIds; _i < _a.length; _i++) {\n var targetId = _a[_i];\n if (this.isActiveTarget(targetId)) {\n var change = this.ensureTargetChange(targetId);\n change.mapping.add(docChange.key);\n relevant = true;\n }\n }\n for (var _b = 0, _c = docChange.removedTargetIds; _b < _c.length; _b++) {\n var targetId = _c[_b];\n if (this.isActiveTarget(targetId)) {\n var change = this.ensureTargetChange(targetId);\n change.mapping.delete(docChange.key);\n relevant = true;\n }\n }\n // Only update the document if there is a new document to replace to an\n // active target that is being listened to, this might be just a target\n // update instead.\n if (docChange.newDoc && relevant) {\n this.documentUpdates = this.documentUpdates.insert(docChange.key, docChange.newDoc);\n }\n };\n WatchChangeAggregator.prototype.addTargetChange = function (targetChange) {\n var _this = this;\n targetChange.targetIds.forEach(function (targetId) {\n var change = _this.ensureTargetChange(targetId);\n switch (targetChange.state) {\n case WatchTargetChangeState.NoChange:\n if (_this.isActiveTarget(targetId)) {\n // Creating the change above satisfies the semantics of no-change.\n applyResumeToken(change, targetChange.resumeToken);\n }\n break;\n case WatchTargetChangeState.Added:\n // We need to decrement the number of pending acks needed from watch\n // for this targetId.\n _this.recordTargetResponse(targetId);\n if (!objUtils.contains(_this.pendingTargetResponses, targetId)) {\n // We have a freshly added target, so we need to reset any state\n // that we had previously This can happen e.g. when remove and add\n // back a target for existence filter mismatches.\n change.mapping = new UpdateMapping();\n change.currentStatusUpdate = CurrentStatusUpdate.None;\n delete _this.existenceFilters[targetId];\n }\n applyResumeToken(change, targetChange.resumeToken);\n break;\n case WatchTargetChangeState.Removed:\n // We need to keep track of removed targets to we can\n // post-filter and remove any target changes.\n // We need to decrement the number of pending acks needed from watch\n // for this targetId.\n _this.recordTargetResponse(targetId);\n assert(!targetChange.cause, 'WatchChangeAggregator does not handle errored targets');\n break;\n case WatchTargetChangeState.Current:\n if (_this.isActiveTarget(targetId)) {\n change.currentStatusUpdate = CurrentStatusUpdate.MarkCurrent;\n applyResumeToken(change, targetChange.resumeToken);\n }\n break;\n case WatchTargetChangeState.Reset:\n if (_this.isActiveTarget(targetId)) {\n // Overwrite any existing target mapping with a reset\n // mapping. Every subsequent update will modify the reset\n // mapping, not an update mapping.\n change.mapping = new ResetMapping();\n applyResumeToken(change, targetChange.resumeToken);\n }\n break;\n default:\n fail('Unknown target watch change state: ' + targetChange.state);\n }\n });\n };\n /**\n * Record that we get a watch target add/remove by decrementing the number of\n * pending target responses that we have.\n */\n WatchChangeAggregator.prototype.recordTargetResponse = function (targetId) {\n var newCount = (this.pendingTargetResponses[targetId] || 0) - 1;\n if (newCount === 0) {\n delete this.pendingTargetResponses[targetId];\n }\n else {\n this.pendingTargetResponses[targetId] = newCount;\n }\n };\n WatchChangeAggregator.prototype.addExistenceFilterChange = function (change) {\n if (this.isActiveTarget(change.targetId)) {\n this.existenceFilters[change.targetId] = change.existenceFilter;\n }\n };\n return WatchChangeAggregator;\n}());\nexport { WatchChangeAggregator };\n/**\n * Applies the resume token to the TargetChange, but only when it has a new\n * value. null and empty resumeTokens are discarded.\n */\nfunction applyResumeToken(change, resumeToken) {\n if (resumeToken.length > 0) {\n change.resumeToken = resumeToken;\n }\n}\n\n//# sourceMappingURL=watch_change.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/watch_change.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Blob } from '../api/blob';\nimport { GeoPoint } from '../api/geo_point';\nimport { DatabaseId } from '../core/database_info';\nimport { Bound, Direction, NanFilter, NullFilter, OrderBy, Query, RelationFilter, RelationOp } from '../core/query';\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { Timestamp } from '../core/timestamp';\nimport { QueryPurpose } from '../local/query_data';\nimport { Document, NoDocument } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport * as fieldValue from '../model/field_value';\nimport { DeleteMutation, FieldMask, FieldTransform, MutationResult, PatchMutation, Precondition, ServerTimestampTransform, SetMutation, TransformMutation } from '../model/mutation';\nimport { FieldPath, ResourcePath } from '../model/path';\nimport { assert, fail } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nimport * as obj from '../util/obj';\nimport * as typeUtils from '../util/types';\nimport { ExistenceFilter } from './existence_filter';\nimport { mapCodeFromRpcCode, mapRpcCodeFromCode } from './rpc_error';\nimport { DocumentWatchChange, ExistenceFilterChange, WatchTargetChange, WatchTargetChangeState } from './watch_change';\nvar DIRECTIONS = (function () {\n var dirs = {};\n dirs[Direction.ASCENDING.name] = 'ASCENDING';\n dirs[Direction.DESCENDING.name] = 'DESCENDING';\n return dirs;\n})();\nvar OPERATORS = (function () {\n var ops = {};\n ops[RelationOp.LESS_THAN.name] = 'LESS_THAN';\n ops[RelationOp.LESS_THAN_OR_EQUAL.name] = 'LESS_THAN_OR_EQUAL';\n ops[RelationOp.GREATER_THAN.name] = 'GREATER_THAN';\n ops[RelationOp.GREATER_THAN_OR_EQUAL.name] = 'GREATER_THAN_OR_EQUAL';\n ops[RelationOp.EQUAL.name] = 'EQUAL';\n return ops;\n})();\nfunction assertPresent(value, description) {\n assert(!typeUtils.isNullOrUndefined(value), description + ' is missing');\n}\nfunction parseInt64(value) {\n // TODO(bjornick): Handle int64 greater than 53 bits.\n if (typeof value === 'number') {\n return value;\n }\n else if (typeof value === 'string') {\n return parseInt(value, 10);\n }\n else {\n return fail(\"can't parse \" + value);\n }\n}\n/**\n * Generates JsonObject values for the Datastore API suitable for sending to\n * either GRPC stub methods or via the JSON/HTTP REST API.\n * TODO(klimt): We can remove the databaseId argument if we keep the full\n * resource name in documents.\n */\nvar JsonProtoSerializer = /** @class */ (function () {\n function JsonProtoSerializer(databaseId, options) {\n this.databaseId = databaseId;\n this.options = options;\n }\n JsonProtoSerializer.prototype.emptyByteString = function () {\n if (this.options.useProto3Json) {\n return '';\n }\n else {\n return new Uint8Array(0);\n }\n };\n JsonProtoSerializer.prototype.unsafeCastProtoByteString = function (byteString) {\n // byteStrings can be either string or UInt8Array, but the typings say\n // it's always a string. Cast as string to avoid type check failing\n return byteString;\n };\n JsonProtoSerializer.prototype.fromRpcStatus = function (status) {\n var code = status.code === undefined\n ? Code.UNKNOWN\n : mapCodeFromRpcCode(status.code);\n return new FirestoreError(code, status.message || '');\n };\n /**\n * Returns a value for a Date that's appropriate to put into a proto.\n * DO NOT USE THIS FOR ANYTHING ELSE.\n * This method cheats. It's typed as returning \"string\" because that's what\n * our generated proto interfaces say dates must be. But it's easier and safer\n * to actually return a Timestamp proto.\n */\n JsonProtoSerializer.prototype.toTimestamp = function (timestamp) {\n return {\n seconds: timestamp.seconds,\n nanos: timestamp.nanos\n // tslint:disable-next-line:no-any\n };\n };\n JsonProtoSerializer.prototype.fromTimestamp = function (date) {\n // The json interface (for the browser) will return an iso timestamp string,\n // while the proto js library (for node) will return a\n // google.protobuf.Timestamp instance.\n if (typeof date === 'string') {\n // TODO(b/37282237): Use strings for Proto3 timestamps\n // assert(this.options.useProto3Json,\n // 'The timestamp string format requires Proto3.');\n return Timestamp.fromISOString(date);\n }\n else {\n assert(!!date, 'Cannot deserialize null or undefined timestamp.');\n // TODO(b/37282237): Use strings for Proto3 timestamps\n // assert(!this.options.useProto3Json,\n // 'The timestamp instance format requires Proto JS.');\n var seconds = parseInt64(date.seconds || '0');\n var nanos = date.nanos || 0;\n return new Timestamp(seconds, nanos);\n }\n };\n /**\n * Returns a value for bytes that's appropriate to put in a proto.\n * DO NOT USE THIS FOR ANYTHING ELSE.\n * This method cheats. It's typed as returning \"string\" because that's what\n * our generated proto interfaces say bytes must be. But it should return\n * an Uint8Array in Node.\n */\n JsonProtoSerializer.prototype.toBytes = function (bytes) {\n if (this.options.useProto3Json) {\n return bytes.toBase64();\n }\n else {\n // The typings say it's a string, but it needs to be a Uint8Array in Node.\n return this.unsafeCastProtoByteString(bytes.toUint8Array());\n }\n };\n /**\n * Parse the blob from the protos into the internal Blob class. Note that the\n * typings assume all blobs are strings, but they are actually Uint8Arrays\n * on Node.\n */\n JsonProtoSerializer.prototype.fromBlob = function (blob) {\n if (typeof blob === 'string') {\n assert(this.options.useProto3Json, 'Expected bytes to be passed in as Uint8Array, but got a string instead.');\n return Blob.fromBase64String(blob);\n }\n else {\n assert(!this.options.useProto3Json, 'Expected bytes to be passed in as string, but got something else instead.');\n return Blob.fromUint8Array(blob);\n }\n };\n JsonProtoSerializer.prototype.toVersion = function (version) {\n return this.toTimestamp(version.toTimestamp());\n };\n JsonProtoSerializer.prototype.fromVersion = function (version) {\n assert(!!version, \"Trying to deserialize version that isn't set\");\n return SnapshotVersion.fromTimestamp(this.fromTimestamp(version));\n };\n JsonProtoSerializer.prototype.toResourceName = function (databaseId, path) {\n return this.fullyQualifiedPrefixPath(databaseId)\n .child('documents')\n .child(path)\n .canonicalString();\n };\n JsonProtoSerializer.prototype.fromResourceName = function (name) {\n var resource = ResourcePath.fromString(name);\n assert(this.isValidResourceName(resource), 'Tried to deserialize invalid key ' + resource.toString());\n return resource;\n };\n JsonProtoSerializer.prototype.toName = function (key) {\n return this.toResourceName(this.databaseId, key.path);\n };\n JsonProtoSerializer.prototype.fromName = function (name) {\n var resource = this.fromResourceName(name);\n assert(resource.get(1) === this.databaseId.projectId, 'Tried to deserialize key from different project: ' +\n resource.get(1) +\n ' vs ' +\n this.databaseId.projectId);\n assert((!resource.get(3) && !this.databaseId.database) ||\n resource.get(3) === this.databaseId.database, 'Tried to deserialize key from different database: ' +\n resource.get(3) +\n ' vs ' +\n this.databaseId.database);\n return new DocumentKey(this.extractLocalPathFromResourceName(resource));\n };\n JsonProtoSerializer.prototype.toQueryPath = function (path) {\n if (path.length === 0) {\n // If the path is empty, the backend requires we leave off the /documents\n // at the end.\n return this.encodedDatabaseId;\n }\n return this.toResourceName(this.databaseId, path);\n };\n JsonProtoSerializer.prototype.fromQueryPath = function (name) {\n var resourceName = this.fromResourceName(name);\n if (resourceName.length === 4) {\n return ResourcePath.EMPTY_PATH;\n }\n return this.extractLocalPathFromResourceName(resourceName);\n };\n Object.defineProperty(JsonProtoSerializer.prototype, \"encodedDatabaseId\", {\n get: function () {\n var path = new ResourcePath([\n 'projects',\n this.databaseId.projectId,\n 'databases',\n this.databaseId.database\n ]);\n return path.canonicalString();\n },\n enumerable: true,\n configurable: true\n });\n JsonProtoSerializer.prototype.fullyQualifiedPrefixPath = function (databaseId) {\n return new ResourcePath([\n 'projects',\n databaseId.projectId,\n 'databases',\n databaseId.database\n ]);\n };\n JsonProtoSerializer.prototype.extractLocalPathFromResourceName = function (resourceName) {\n assert(resourceName.length > 4 && resourceName.get(4) === 'documents', 'tried to deserialize invalid key ' + resourceName.toString());\n return resourceName.popFirst(5);\n };\n JsonProtoSerializer.prototype.isValidResourceName = function (path) {\n // Resource names have at least 4 components (project ID, database ID)\n return (path.length >= 4 &&\n path.get(0) === 'projects' &&\n path.get(2) === 'databases');\n };\n JsonProtoSerializer.prototype.toValue = function (val) {\n if (val instanceof fieldValue.NullValue) {\n return { nullValue: 'NULL_VALUE' };\n }\n else if (val instanceof fieldValue.BooleanValue) {\n return { booleanValue: val.value() };\n }\n else if (val instanceof fieldValue.IntegerValue) {\n return { integerValue: '' + val.value() };\n }\n else if (val instanceof fieldValue.DoubleValue) {\n var doubleValue = val.value();\n if (this.options.useProto3Json) {\n // Proto 3 let's us encode NaN and Infinity as string values as\n // expected by the backend. This is currently not checked by our unit\n // tests because they rely on protobuf.js.\n if (isNaN(doubleValue)) {\n return { doubleValue: 'NaN' };\n }\n else if (doubleValue === Infinity) {\n return { doubleValue: 'Infinity' };\n }\n else if (doubleValue === -Infinity) {\n return { doubleValue: '-Infinity' };\n }\n }\n return { doubleValue: val.value() };\n }\n else if (val instanceof fieldValue.StringValue) {\n return { stringValue: val.value() };\n }\n else if (val instanceof fieldValue.ObjectValue) {\n return { mapValue: this.toMapValue(val) };\n }\n else if (val instanceof fieldValue.ArrayValue) {\n return { arrayValue: this.toArrayValue(val) };\n }\n else if (val instanceof fieldValue.TimestampValue) {\n return {\n timestampValue: this.toTimestamp(val.internalValue)\n };\n }\n else if (val instanceof fieldValue.GeoPointValue) {\n return {\n geoPointValue: {\n latitude: val.value().latitude,\n longitude: val.value().longitude\n }\n };\n }\n else if (val instanceof fieldValue.BlobValue) {\n return {\n bytesValue: this.toBytes(val.value())\n };\n }\n else if (val instanceof fieldValue.RefValue) {\n return {\n referenceValue: this.toResourceName(val.databaseId, val.key.path)\n };\n }\n else {\n return fail('Unknown FieldValue ' + JSON.stringify(val));\n }\n };\n JsonProtoSerializer.prototype.fromValue = function (obj) {\n var _this = this;\n // tslint:disable-next-line:no-any\n var type = obj['value_type'];\n if (hasTag(obj, type, 'nullValue')) {\n return fieldValue.NullValue.INSTANCE;\n }\n else if (hasTag(obj, type, 'booleanValue')) {\n return fieldValue.BooleanValue.of(obj.booleanValue);\n }\n else if (hasTag(obj, type, 'integerValue')) {\n return new fieldValue.IntegerValue(parseInt64(obj.integerValue));\n }\n else if (hasTag(obj, type, 'doubleValue')) {\n if (this.options.useProto3Json) {\n // Proto 3 uses the string values 'NaN' and 'Infinity'.\n if (obj.doubleValue === 'NaN') {\n return fieldValue.DoubleValue.NAN;\n }\n else if (obj.doubleValue === 'Infinity') {\n return fieldValue.DoubleValue.POSITIVE_INFINITY;\n }\n else if (obj.doubleValue === '-Infinity') {\n return fieldValue.DoubleValue.NEGATIVE_INFINITY;\n }\n }\n return new fieldValue.DoubleValue(obj.doubleValue);\n }\n else if (hasTag(obj, type, 'stringValue')) {\n return new fieldValue.StringValue(obj.stringValue);\n }\n else if (hasTag(obj, type, 'mapValue')) {\n return this.fromFields(obj.mapValue.fields || {});\n }\n else if (hasTag(obj, type, 'arrayValue')) {\n // \"values\" is not present if the array is empty\n assertPresent(obj.arrayValue, 'arrayValue');\n var values = obj.arrayValue.values || [];\n return new fieldValue.ArrayValue(values.map(function (v) { return _this.fromValue(v); }));\n }\n else if (hasTag(obj, type, 'timestampValue')) {\n assertPresent(obj.timestampValue, 'timestampValue');\n return new fieldValue.TimestampValue(this.fromTimestamp(obj.timestampValue));\n }\n else if (hasTag(obj, type, 'geoPointValue')) {\n assertPresent(obj.geoPointValue, 'geoPointValue');\n var latitude = obj.geoPointValue.latitude || 0;\n var longitude = obj.geoPointValue.longitude || 0;\n return new fieldValue.GeoPointValue(new GeoPoint(latitude, longitude));\n }\n else if (hasTag(obj, type, 'bytesValue')) {\n assertPresent(obj.bytesValue, 'bytesValue');\n var blob = this.fromBlob(obj.bytesValue);\n return new fieldValue.BlobValue(blob);\n }\n else if (hasTag(obj, type, 'referenceValue')) {\n assertPresent(obj.referenceValue, 'referenceValue');\n var resourceName = this.fromResourceName(obj.referenceValue);\n var dbId = new DatabaseId(resourceName.get(1), resourceName.get(3));\n var key = new DocumentKey(this.extractLocalPathFromResourceName(resourceName));\n return new fieldValue.RefValue(dbId, key);\n }\n else {\n return fail('Unknown Value proto ' + JSON.stringify(obj));\n }\n };\n /** Creates an api.Document from key and fields (but no create/update time) */\n JsonProtoSerializer.prototype.toMutationDocument = function (key, fields) {\n return {\n name: this.toName(key),\n fields: this.toFields(fields)\n };\n };\n JsonProtoSerializer.prototype.toDocument = function (document) {\n assert(!document.hasLocalMutations, \"Can't serialize documents with mutations.\");\n return {\n name: this.toName(document.key),\n fields: this.toFields(document.data),\n updateTime: this.toTimestamp(document.version.toTimestamp())\n };\n };\n JsonProtoSerializer.prototype.fromDocument = function (document) {\n return new Document(this.fromName(document.name), this.fromVersion(document.updateTime), this.fromFields(document.fields || {}), { hasLocalMutations: false });\n };\n JsonProtoSerializer.prototype.toFields = function (fields) {\n var _this = this;\n var result = {};\n fields.forEach(function (key, value) {\n result[key] = _this.toValue(value);\n });\n return result;\n };\n JsonProtoSerializer.prototype.fromFields = function (object) {\n var _this = this;\n // Proto map gets mapped to Object, so cast it.\n var map = object;\n var result = fieldValue.ObjectValue.EMPTY;\n obj.forEach(map, function (key, value) {\n result = result.set(new FieldPath([key]), _this.fromValue(value));\n });\n return result;\n };\n JsonProtoSerializer.prototype.toMapValue = function (map) {\n return {\n fields: this.toFields(map)\n };\n };\n JsonProtoSerializer.prototype.toArrayValue = function (array) {\n var _this = this;\n var result = [];\n array.forEach(function (value) {\n result.push(_this.toValue(value));\n });\n return { values: result };\n };\n JsonProtoSerializer.prototype.fromFound = function (doc) {\n assert(!!doc.found, 'Tried to deserialize a found document from a missing document.');\n assertPresent(doc.found.name, 'doc.found.name');\n assertPresent(doc.found.updateTime, 'doc.found.updateTime');\n var key = this.fromName(doc.found.name);\n var version = this.fromVersion(doc.found.updateTime);\n var fields = this.fromFields(doc.found.fields || {});\n return new Document(key, version, fields, { hasLocalMutations: false });\n };\n JsonProtoSerializer.prototype.fromMissing = function (result) {\n assert(!!result.missing, 'Tried to deserialize a missing document from a found document.');\n assert(!!result.readTime, 'Tried to deserialize a missing document without a read time.');\n var key = this.fromName(result.missing);\n var version = this.fromVersion(result.readTime);\n return new NoDocument(key, version);\n };\n JsonProtoSerializer.prototype.fromMaybeDocument = function (result) {\n // tslint:disable-next-line:no-any\n var type = result['result_type'];\n if (hasTag(result, type, 'found')) {\n return this.fromFound(result);\n }\n else if (hasTag(result, type, 'missing')) {\n return this.fromMissing(result);\n }\n return fail('invalid batch get response: ' + JSON.stringify(result));\n };\n JsonProtoSerializer.prototype.toWatchTargetChangeState = function (state) {\n switch (state) {\n case WatchTargetChangeState.Added:\n return 'ADD';\n case WatchTargetChangeState.Current:\n return 'CURRENT';\n case WatchTargetChangeState.NoChange:\n return 'NO_CHANGE';\n case WatchTargetChangeState.Removed:\n return 'REMOVE';\n case WatchTargetChangeState.Reset:\n return 'RESET';\n default:\n return fail('Unknown WatchTargetChangeState: ' + state);\n }\n };\n JsonProtoSerializer.prototype.toTestWatchChange = function (watchChange) {\n if (watchChange instanceof ExistenceFilterChange) {\n return {\n filter: {\n count: watchChange.existenceFilter.count,\n targetId: watchChange.targetId\n }\n };\n }\n if (watchChange instanceof DocumentWatchChange) {\n if (watchChange.newDoc instanceof Document) {\n var doc = watchChange.newDoc;\n return {\n documentChange: {\n document: {\n name: this.toName(doc.key),\n fields: this.toFields(doc.data),\n updateTime: this.toVersion(doc.version)\n },\n targetIds: watchChange.updatedTargetIds,\n removedTargetIds: watchChange.removedTargetIds\n }\n };\n }\n else if (watchChange.newDoc instanceof NoDocument) {\n var doc = watchChange.newDoc;\n return {\n documentDelete: {\n document: this.toName(doc.key),\n readTime: this.toVersion(doc.version),\n removedTargetIds: watchChange.removedTargetIds\n }\n };\n }\n else if (watchChange.newDoc === null) {\n return {\n documentRemove: {\n document: this.toName(watchChange.key),\n removedTargetIds: watchChange.removedTargetIds\n }\n };\n }\n }\n if (watchChange instanceof WatchTargetChange) {\n var cause = undefined;\n if (watchChange.cause) {\n cause = {\n code: mapRpcCodeFromCode(watchChange.cause.code),\n message: watchChange.cause.message\n };\n }\n return {\n targetChange: {\n targetChangeType: this.toWatchTargetChangeState(watchChange.state),\n targetIds: watchChange.targetIds,\n resumeToken: this.unsafeCastProtoByteString(watchChange.resumeToken),\n cause: cause\n }\n };\n }\n return fail('Unrecognized watch change: ' + JSON.stringify(watchChange));\n };\n JsonProtoSerializer.prototype.fromWatchChange = function (change) {\n // tslint:disable-next-line:no-any\n var type = change['change_type'];\n var watchChange;\n if (hasTag(change, type, 'targetChange')) {\n assertPresent(change.targetChange, 'targetChange');\n // proto3 default value is unset in JSON (undefined), so use 'NO_CHANGE'\n // if unset\n var state = this.fromWatchTargetChangeState(change.targetChange.targetChangeType || 'NO_CHANGE');\n var targetIds = change.targetChange.targetIds || [];\n var resumeToken = change.targetChange.resumeToken || this.emptyByteString();\n var causeProto = change.targetChange.cause;\n var cause = causeProto && this.fromRpcStatus(causeProto);\n watchChange = new WatchTargetChange(state, targetIds, resumeToken, cause || null);\n }\n else if (hasTag(change, type, 'documentChange')) {\n assertPresent(change.documentChange, 'documentChange');\n assertPresent(change.documentChange.document, 'documentChange.name');\n assertPresent(change.documentChange.document.name, 'documentChange.document.name');\n assertPresent(change.documentChange.document.updateTime, 'documentChange.document.updateTime');\n var entityChange = change.documentChange;\n var key = this.fromName(entityChange.document.name);\n var version = this.fromVersion(entityChange.document.updateTime);\n var fields = this.fromFields(entityChange.document.fields || {});\n var doc = new Document(key, version, fields, {\n hasLocalMutations: false\n });\n var updatedTargetIds = entityChange.targetIds || [];\n var removedTargetIds = entityChange.removedTargetIds || [];\n watchChange = new DocumentWatchChange(updatedTargetIds, removedTargetIds, doc.key, doc);\n }\n else if (hasTag(change, type, 'documentDelete')) {\n assertPresent(change.documentDelete, 'documentDelete');\n assertPresent(change.documentDelete.document, 'documentDelete.document');\n var docDelete = change.documentDelete;\n var key = this.fromName(docDelete.document);\n var version = docDelete.readTime\n ? this.fromVersion(docDelete.readTime)\n : SnapshotVersion.forDeletedDoc();\n var doc = new NoDocument(key, version);\n var removedTargetIds = docDelete.removedTargetIds || [];\n watchChange = new DocumentWatchChange([], removedTargetIds, doc.key, doc);\n }\n else if (hasTag(change, type, 'documentRemove')) {\n assertPresent(change.documentRemove, 'documentRemove');\n assertPresent(change.documentRemove.document, 'documentRemove');\n var docRemove = change.documentRemove;\n var key = this.fromName(docRemove.document);\n var removedTargetIds = docRemove.removedTargetIds || [];\n watchChange = new DocumentWatchChange([], removedTargetIds, key, null);\n }\n else if (hasTag(change, type, 'filter')) {\n // TODO(dimond): implement existence filter parsing with strategy.\n assertPresent(change.filter, 'filter');\n assertPresent(change.filter.targetId, 'filter.targetId');\n var filter = change.filter;\n var count = filter.count || 0;\n var existenceFilter = new ExistenceFilter(count);\n var targetId = filter.targetId;\n watchChange = new ExistenceFilterChange(targetId, existenceFilter);\n }\n else {\n return fail('Unknown change type ' + JSON.stringify(change));\n }\n return watchChange;\n };\n JsonProtoSerializer.prototype.fromWatchTargetChangeState = function (state) {\n if (state === 'NO_CHANGE') {\n return WatchTargetChangeState.NoChange;\n }\n else if (state === 'ADD') {\n return WatchTargetChangeState.Added;\n }\n else if (state === 'REMOVE') {\n return WatchTargetChangeState.Removed;\n }\n else if (state === 'CURRENT') {\n return WatchTargetChangeState.Current;\n }\n else if (state === 'RESET') {\n return WatchTargetChangeState.Reset;\n }\n else {\n return fail('Got unexpected TargetChange.state: ' + state);\n }\n };\n JsonProtoSerializer.prototype.versionFromListenResponse = function (change) {\n // We have only reached a consistent snapshot for the entire stream if there\n // is a read_time set and it applies to all targets (i.e. the list of\n // targets is empty). The backend is guaranteed to send such responses.\n // tslint:disable-next-line:no-any\n var type = change['response_type'];\n if (!hasTag(change, type, 'targetChange')) {\n return SnapshotVersion.MIN;\n }\n var targetChange = change.targetChange;\n if (targetChange.targetIds && targetChange.targetIds.length) {\n return SnapshotVersion.MIN;\n }\n if (!targetChange.readTime) {\n return SnapshotVersion.MIN;\n }\n return this.fromVersion(targetChange.readTime);\n };\n JsonProtoSerializer.prototype.toMutation = function (mutation) {\n var _this = this;\n var result;\n if (mutation instanceof SetMutation) {\n result = {\n update: this.toMutationDocument(mutation.key, mutation.value)\n };\n }\n else if (mutation instanceof DeleteMutation) {\n result = { delete: this.toName(mutation.key) };\n }\n else if (mutation instanceof PatchMutation) {\n result = {\n update: this.toMutationDocument(mutation.key, mutation.data),\n updateMask: this.toDocumentMask(mutation.fieldMask)\n };\n }\n else if (mutation instanceof TransformMutation) {\n result = {\n transform: {\n document: this.toName(mutation.key),\n fieldTransforms: mutation.fieldTransforms.map(function (transform) {\n return _this.toFieldTransform(transform);\n })\n }\n };\n }\n else {\n return fail('Unknown mutation type ' + mutation.type);\n }\n if (!mutation.precondition.isNone) {\n result.currentDocument = this.toPrecondition(mutation.precondition);\n }\n return result;\n };\n JsonProtoSerializer.prototype.fromMutation = function (proto) {\n var _this = this;\n var precondition = proto.currentDocument\n ? this.fromPrecondition(proto.currentDocument)\n : Precondition.NONE;\n if (proto.update) {\n assertPresent(proto.update.name, 'name');\n var key = this.fromName(proto.update.name);\n var value = this.fromFields(proto.update.fields || {});\n if (proto.updateMask) {\n var fieldMask = this.fromDocumentMask(proto.updateMask);\n return new PatchMutation(key, value, fieldMask, precondition);\n }\n else {\n return new SetMutation(key, value, precondition);\n }\n }\n else if (proto.delete) {\n var key = this.fromName(proto.delete);\n return new DeleteMutation(key, precondition);\n }\n else if (proto.transform) {\n var key = this.fromName(proto.transform.document);\n var fieldTransforms = proto.transform.fieldTransforms.map(function (transform) {\n return _this.fromFieldTransform(transform);\n });\n assert(precondition.exists === true, 'Transforms only support precondition \"exists == true\"');\n return new TransformMutation(key, fieldTransforms);\n }\n else {\n return fail('unknown mutation proto: ' + JSON.stringify(proto));\n }\n };\n JsonProtoSerializer.prototype.toPrecondition = function (precondition) {\n assert(!precondition.isNone, \"Can't serialize an empty precondition\");\n if (precondition.updateTime !== undefined) {\n return {\n updateTime: this.toVersion(precondition.updateTime)\n };\n }\n else if (precondition.exists !== undefined) {\n return { exists: precondition.exists };\n }\n else {\n return fail('Unknown precondition');\n }\n };\n JsonProtoSerializer.prototype.fromPrecondition = function (precondition) {\n if (precondition.updateTime !== undefined) {\n return Precondition.updateTime(this.fromVersion(precondition.updateTime));\n }\n else if (precondition.exists !== undefined) {\n return Precondition.exists(precondition.exists);\n }\n else {\n return Precondition.NONE;\n }\n };\n JsonProtoSerializer.prototype.fromWriteResult = function (proto) {\n var _this = this;\n // NOTE: Deletes don't have an updateTime.\n var version = proto.updateTime\n ? this.fromVersion(proto.updateTime)\n : null;\n var transformResults = null;\n if (proto.transformResults) {\n transformResults = proto.transformResults.map(function (result) {\n return _this.fromValue(result);\n });\n }\n return new MutationResult(version, transformResults);\n };\n JsonProtoSerializer.prototype.fromWriteResults = function (protos) {\n var _this = this;\n return (protos || []).map(function (proto) { return _this.fromWriteResult(proto); });\n };\n JsonProtoSerializer.prototype.toFieldTransform = function (fieldTransform) {\n assert(fieldTransform.transform instanceof ServerTimestampTransform, 'Unknown transform: ' + fieldTransform.transform);\n return {\n fieldPath: fieldTransform.field.canonicalString(),\n setToServerValue: 'REQUEST_TIME'\n };\n };\n JsonProtoSerializer.prototype.fromFieldTransform = function (proto) {\n assert(proto.setToServerValue === 'REQUEST_TIME', 'Unknown transform proto: ' + JSON.stringify(proto));\n var fieldPath = FieldPath.fromServerFormat(proto.fieldPath);\n return new FieldTransform(fieldPath, ServerTimestampTransform.instance);\n };\n JsonProtoSerializer.prototype.toDocumentsTarget = function (query) {\n return { documents: [this.toQueryPath(query.path)] };\n };\n JsonProtoSerializer.prototype.fromDocumentsTarget = function (documentsTarget) {\n var count = documentsTarget.documents.length;\n assert(count === 1, 'DocumentsTarget contained other than 1 document: ' + count);\n var name = documentsTarget.documents[0];\n return Query.atPath(this.fromQueryPath(name));\n };\n JsonProtoSerializer.prototype.toQueryTarget = function (query) {\n // Dissect the path into parent, collectionId, and optional key filter.\n var result = { structuredQuery: {} };\n if (query.path.isEmpty()) {\n result.parent = this.toQueryPath(ResourcePath.EMPTY_PATH);\n }\n else {\n var path = query.path;\n assert(path.length % 2 !== 0, 'Document queries with filters are not supported.');\n result.parent = this.toQueryPath(path.popLast());\n result.structuredQuery.from = [{ collectionId: path.lastSegment() }];\n }\n var where = this.toFilter(query.filters);\n if (where) {\n result.structuredQuery.where = where;\n }\n var orderBy = this.toOrder(query.orderBy);\n if (orderBy) {\n result.structuredQuery.orderBy = orderBy;\n }\n var limit = this.toLimit(query.limit);\n if (limit !== undefined) {\n result.structuredQuery.limit = limit;\n }\n if (query.startAt) {\n result.structuredQuery.startAt = this.toCursor(query.startAt);\n }\n if (query.endAt) {\n result.structuredQuery.endAt = this.toCursor(query.endAt);\n }\n return result;\n };\n JsonProtoSerializer.prototype.fromQueryTarget = function (target) {\n var path = this.fromQueryPath(target.parent);\n var query = target.structuredQuery;\n var fromCount = query.from ? query.from.length : 0;\n if (fromCount > 0) {\n assert(fromCount === 1, 'StructuredQuery.from with more than one collection is not supported.');\n var from = query.from[0];\n path = path.child(from.collectionId);\n }\n var filterBy = [];\n if (query.where) {\n filterBy = this.fromFilter(query.where);\n }\n var orderBy = [];\n if (query.orderBy) {\n orderBy = this.fromOrder(query.orderBy);\n }\n var limit = null;\n if (query.limit) {\n limit = query.limit;\n }\n var startAt = null;\n if (query.startAt) {\n startAt = this.fromCursor(query.startAt);\n }\n var endAt = null;\n if (query.endAt) {\n endAt = this.fromCursor(query.endAt);\n }\n return new Query(path, orderBy, filterBy, limit, startAt, endAt);\n };\n JsonProtoSerializer.prototype.toListenRequestLabels = function (queryData) {\n var value = this.toLabel(queryData.purpose);\n if (value == null) {\n return null;\n }\n else {\n return {\n 'goog-listen-tags': value\n };\n }\n };\n JsonProtoSerializer.prototype.toLabel = function (purpose) {\n switch (purpose) {\n case QueryPurpose.Listen:\n return null;\n case QueryPurpose.ExistenceFilterMismatch:\n return 'existence-filter-mismatch';\n case QueryPurpose.LimboResolution:\n return 'limbo-document';\n default:\n return fail('Unrecognized query purpose: ' + purpose);\n }\n };\n JsonProtoSerializer.prototype.toTarget = function (queryData) {\n var result;\n var query = queryData.query;\n if (query.isDocumentQuery()) {\n result = { documents: this.toDocumentsTarget(query) };\n }\n else {\n result = { query: this.toQueryTarget(query) };\n }\n result.targetId = queryData.targetId;\n if (queryData.resumeToken.length > 0) {\n result.resumeToken = this.unsafeCastProtoByteString(queryData.resumeToken);\n }\n return result;\n };\n JsonProtoSerializer.prototype.toFilter = function (filters) {\n var _this = this;\n if (filters.length === 0)\n return;\n var protos = filters.map(function (filter) {\n return filter instanceof RelationFilter\n ? _this.toRelationFilter(filter)\n : _this.toUnaryFilter(filter);\n });\n if (protos.length === 1) {\n return protos[0];\n }\n return { compositeFilter: { op: 'AND', filters: protos } };\n };\n JsonProtoSerializer.prototype.fromFilter = function (filter) {\n var _this = this;\n if (!filter) {\n return [];\n }\n else if (filter.unaryFilter !== undefined) {\n return [this.fromUnaryFilter(filter)];\n }\n else if (filter.fieldFilter !== undefined) {\n return [this.fromRelationFilter(filter)];\n }\n else if (filter.compositeFilter !== undefined) {\n return filter.compositeFilter.filters\n .map(function (f) { return _this.fromFilter(f); })\n .reduce(function (accum, current) { return accum.concat(current); });\n }\n else {\n return fail('Unknown filter: ' + JSON.stringify(filter));\n }\n };\n JsonProtoSerializer.prototype.toOrder = function (orderBys) {\n var _this = this;\n if (orderBys.length === 0)\n return;\n return orderBys.map(function (order) { return _this.toPropertyOrder(order); });\n };\n JsonProtoSerializer.prototype.fromOrder = function (orderBys) {\n var _this = this;\n return orderBys.map(function (order) { return _this.fromPropertyOrder(order); });\n };\n JsonProtoSerializer.prototype.toLimit = function (limit) {\n if (!typeUtils.isNullOrUndefined(limit)) {\n return limit;\n }\n return;\n };\n JsonProtoSerializer.prototype.toCursor = function (cursor) {\n var _this = this;\n return {\n before: cursor.before,\n values: cursor.position.map(function (component) { return _this.toValue(component); })\n };\n };\n JsonProtoSerializer.prototype.fromCursor = function (cursor) {\n var _this = this;\n var before = !!cursor.before;\n var position = cursor.values.map(function (component) { return _this.fromValue(component); });\n return new Bound(position, before);\n };\n // visible for testing\n JsonProtoSerializer.prototype.toDirection = function (dir) {\n return DIRECTIONS[dir.name];\n };\n // visible for testing\n JsonProtoSerializer.prototype.fromDirection = function (dir) {\n switch (dir) {\n case 'ASCENDING':\n return Direction.ASCENDING;\n case 'DESCENDING':\n return Direction.DESCENDING;\n default:\n return undefined;\n }\n };\n // visible for testing\n JsonProtoSerializer.prototype.toOperatorName = function (op) {\n return OPERATORS[op.name];\n };\n JsonProtoSerializer.prototype.fromOperatorName = function (op) {\n switch (op) {\n case 'EQUAL':\n return RelationOp.EQUAL;\n case 'GREATER_THAN':\n return RelationOp.GREATER_THAN;\n case 'GREATER_THAN_OR_EQUAL':\n return RelationOp.GREATER_THAN_OR_EQUAL;\n case 'LESS_THAN':\n return RelationOp.LESS_THAN;\n case 'LESS_THAN_OR_EQUAL':\n return RelationOp.LESS_THAN_OR_EQUAL;\n case 'OPERATOR_UNSPECIFIED':\n return fail('Unspecified relation');\n default:\n return fail('Unknown relation');\n }\n };\n JsonProtoSerializer.prototype.toFieldPathReference = function (path) {\n return { fieldPath: path.canonicalString() };\n };\n JsonProtoSerializer.prototype.fromFieldPathReference = function (fieldReference) {\n return FieldPath.fromServerFormat(fieldReference.fieldPath);\n };\n // visible for testing\n JsonProtoSerializer.prototype.toPropertyOrder = function (orderBy) {\n return {\n field: this.toFieldPathReference(orderBy.field),\n direction: this.toDirection(orderBy.dir)\n };\n };\n JsonProtoSerializer.prototype.fromPropertyOrder = function (orderBy) {\n return new OrderBy(this.fromFieldPathReference(orderBy.field), this.fromDirection(orderBy.direction));\n };\n // visible for testing\n JsonProtoSerializer.prototype.toRelationFilter = function (filter) {\n if (filter instanceof RelationFilter) {\n return {\n fieldFilter: {\n field: this.toFieldPathReference(filter.field),\n op: this.toOperatorName(filter.op),\n value: this.toValue(filter.value)\n }\n };\n }\n else {\n return fail('Unrecognized filter: ' + JSON.stringify(filter));\n }\n };\n JsonProtoSerializer.prototype.fromRelationFilter = function (filter) {\n return new RelationFilter(this.fromFieldPathReference(filter.fieldFilter.field), this.fromOperatorName(filter.fieldFilter.op), this.fromValue(filter.fieldFilter.value));\n };\n // visible for testing\n JsonProtoSerializer.prototype.toUnaryFilter = function (filter) {\n if (filter instanceof NanFilter) {\n return {\n unaryFilter: {\n field: this.toFieldPathReference(filter.field),\n op: 'IS_NAN'\n }\n };\n }\n else if (filter instanceof NullFilter) {\n return {\n unaryFilter: {\n field: this.toFieldPathReference(filter.field),\n op: 'IS_NULL'\n }\n };\n }\n else {\n return fail('Unrecognized filter: ' + JSON.stringify(filter));\n }\n };\n JsonProtoSerializer.prototype.fromUnaryFilter = function (filter) {\n switch (filter.unaryFilter.op) {\n case 'IS_NAN':\n var nanField = this.fromFieldPathReference(filter.unaryFilter.field);\n return new NanFilter(nanField);\n case 'IS_NULL':\n var nullField = this.fromFieldPathReference(filter.unaryFilter.field);\n return new NullFilter(nullField);\n case 'OPERATOR_UNSPECIFIED':\n return fail('Unspecified filter');\n default:\n return fail('Unknown filter');\n }\n };\n JsonProtoSerializer.prototype.toDocumentMask = function (fieldMask) {\n return {\n fieldPaths: fieldMask.fields.map(function (field) { return field.canonicalString(); })\n };\n };\n JsonProtoSerializer.prototype.fromDocumentMask = function (proto) {\n var paths = proto.fieldPaths || [];\n var fields = paths.map(function (path) { return FieldPath.fromServerFormat(path); });\n return new FieldMask(fields);\n };\n return JsonProtoSerializer;\n}());\nexport { JsonProtoSerializer };\n/**\n * Checks for a specific oneof tag in a protocol buffer message.\n *\n * This intentionally accommodates two distinct cases:\n *\n * 1) Messages containing a type tag: these are the format produced by GRPC in\n * return values. These may contain default-value mappings for all tags in the\n * oneof but the type tag specifies which one was actually set.\n *\n * 2) Messages that don't contain a type tag: these are the format required by\n * GRPC as inputs. If we emitted objects with type tags, ProtoBuf.js would\n * choke claiming that the tags aren't fields in the Message.\n *\n * Allowing both formats here makes the serializer able to consume the outputs\n * it produces: for all messages it supports, fromX(toX(value)) == value.\n *\n * Note that case 2 suffers from ambiguity: if multiple tags are present\n * without a type tag then the callers are structured in such a way that the\n * first invocation will win. Since we only parse in this mode when parsing\n * the output of a serialize method this works, but it's not a general\n * solution.\n *\n * Unfortunately there is no general solution here because proto3 makes it\n * impossible to distinguish unset from explicitly set fields: both have the\n * default value for the type. Without the type tag but multiple value tags\n * it's possible to have default values for each tag in the oneof and not be\n * able to know which was actually in effect.\n */\nfunction hasTag(obj, type, tag) {\n return type === tag || (!type && tag in obj);\n}\n\n//# sourceMappingURL=serializer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/serializer.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { FieldPath as InternalFieldPath } from '../model/path';\nimport { Code, FirestoreError } from '../util/error';\nimport { validateArgType, validateNamedArrayAtLeastNumberOfElements } from '../util/input_validation';\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n// tslint:disable:strip-private-property-underscore\n/**\n * A FieldPath refers to a field in a document. The path may consist of a single\n * field name (referring to a top-level field in the document), or a list of\n * field names (referring to a nested field in the document).\n */\nvar FieldPath = /** @class */ (function () {\n /**\n * Creates a FieldPath from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames A list of field names.\n */\n function FieldPath() {\n var fieldNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fieldNames[_i] = arguments[_i];\n }\n validateNamedArrayAtLeastNumberOfElements('FieldPath', fieldNames, 'fieldNames', 1);\n for (var i = 0; i < fieldNames.length; ++i) {\n validateArgType('FieldPath', 'string', i, fieldNames[i]);\n if (fieldNames[i].length === 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). \" +\n 'Field names must not be empty.');\n }\n }\n this._internalPath = new InternalFieldPath(fieldNames);\n }\n FieldPath.documentId = function () {\n return FieldPath._DOCUMENT_ID;\n };\n /**\n * Internal Note: The backend doesn't technically support querying by\n * document ID. Instead it queries by the entire document name (full path\n * included), but in the cases we currently support documentId(), the net\n * effect is the same.\n */\n FieldPath._DOCUMENT_ID = new FieldPath(InternalFieldPath.keyField().canonicalString());\n return FieldPath;\n}());\nexport { FieldPath };\n/**\n * Matches any characters in a field path string that are reserved.\n */\nvar RESERVED = new RegExp('[~\\\\*/\\\\[\\\\]]');\n/**\n * Parses a field path string into a FieldPath, treating dots as separators.\n */\nexport function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}\n\n//# sourceMappingURL=field_path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/field_path.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentKeySet } from '../model/collections';\nimport { Document } from '../model/document';\nimport { DocumentSet } from '../model/document_set';\nimport { CurrentStatusUpdate, ResetMapping, UpdateMapping } from '../remote/remote_event';\nimport { assert, fail } from '../util/assert';\nimport { ChangeType, DocumentChangeSet, SyncState } from './view_snapshot';\nvar AddedLimboDocument = /** @class */ (function () {\n function AddedLimboDocument(key) {\n this.key = key;\n }\n return AddedLimboDocument;\n}());\nexport { AddedLimboDocument };\nvar RemovedLimboDocument = /** @class */ (function () {\n function RemovedLimboDocument(key) {\n this.key = key;\n }\n return RemovedLimboDocument;\n}());\nexport { RemovedLimboDocument };\n/**\n * View is responsible for computing the final merged truth of what docs are in\n * a query. It gets notified of local and remote changes to docs, and applies\n * the query filters and limits to determine the most correct possible results.\n */\nvar View = /** @class */ (function () {\n function View(query, \n /** Documents included in the remote target */\n syncedDocuments) {\n this.query = query;\n this.syncedDocuments = syncedDocuments;\n this.syncState = null;\n /**\n * A flag whether the view is current with the backend. A view is considered\n * current after it has seen the current flag from the backend and did not\n * lose consistency within the watch stream (e.g. because of an existence\n * filter mismatch).\n */\n this.current = false;\n /** Documents in the view but not in the remote target */\n this.limboDocuments = documentKeySet();\n /** Document Keys that have local changes */\n this.mutatedKeys = documentKeySet();\n this.documentSet = new DocumentSet(query.docComparator.bind(query));\n }\n /**\n * Iterates over a set of doc changes, applies the query limit, and computes\n * what the new results should be, what the changes were, and whether we may\n * need to go back to the local cache for more results. Does not make any\n * changes to the view.\n * @param docChanges The doc changes to apply to this view.\n * @param previousChanges If this is being called with a refill, then start\n * with this set of docs and changes instead of the current view.\n * @return a new set of docs, changes, and refill flag.\n */\n View.prototype.computeDocChanges = function (docChanges, previousChanges) {\n var _this = this;\n var changeSet = previousChanges\n ? previousChanges.changeSet\n : new DocumentChangeSet();\n var oldDocumentSet = previousChanges\n ? previousChanges.documentSet\n : this.documentSet;\n var newMutatedKeys = previousChanges\n ? previousChanges.mutatedKeys\n : this.mutatedKeys;\n var newDocumentSet = oldDocumentSet;\n var needsRefill = false;\n // Track the last doc in a (full) limit. This is necessary, because some\n // update (a delete, or an update moving a doc past the old limit) might\n // mean there is some other document in the local cache that either should\n // come (1) between the old last limit doc and the new last document, in the\n // case of updates, or (2) after the new last document, in the case of\n // deletes. So we keep this doc at the old limit to compare the updates to.\n //\n // Note that this should never get used in a refill (when previousChanges is\n // set), because there will only be adds -- no deletes or updates.\n var lastDocInLimit = this.query.hasLimit() && oldDocumentSet.size === this.query.limit\n ? oldDocumentSet.last()\n : null;\n docChanges.inorderTraversal(function (key, newMaybeDoc) {\n var oldDoc = oldDocumentSet.get(key);\n var newDoc = newMaybeDoc instanceof Document ? newMaybeDoc : null;\n if (newDoc) {\n assert(key.equals(newDoc.key), 'Mismatching keys found in document changes: ' +\n key +\n ' != ' +\n newDoc.key);\n newDoc = _this.query.matches(newDoc) ? newDoc : null;\n }\n if (newDoc) {\n newDocumentSet = newDocumentSet.add(newDoc);\n if (newDoc.hasLocalMutations) {\n newMutatedKeys = newMutatedKeys.add(key);\n }\n else {\n newMutatedKeys = newMutatedKeys.delete(key);\n }\n }\n else {\n newDocumentSet = newDocumentSet.delete(key);\n newMutatedKeys = newMutatedKeys.delete(key);\n }\n // Calculate change\n if (oldDoc && newDoc) {\n var docsEqual = oldDoc.data.equals(newDoc.data);\n if (!docsEqual ||\n oldDoc.hasLocalMutations !== newDoc.hasLocalMutations) {\n // only report a change if document actually changed\n if (docsEqual) {\n changeSet.track({ type: ChangeType.Metadata, doc: newDoc });\n }\n else {\n changeSet.track({ type: ChangeType.Modified, doc: newDoc });\n }\n if (lastDocInLimit &&\n _this.query.docComparator(newDoc, lastDocInLimit) > 0) {\n // This doc moved from inside the limit to after the limit.\n // That means there may be some doc in the local cache that's\n // actually less than this one.\n needsRefill = true;\n }\n }\n }\n else if (!oldDoc && newDoc) {\n changeSet.track({ type: ChangeType.Added, doc: newDoc });\n }\n else if (oldDoc && !newDoc) {\n changeSet.track({ type: ChangeType.Removed, doc: oldDoc });\n if (lastDocInLimit) {\n // A doc was removed from a full limit query. We'll need to\n // requery from the local cache to see if we know about some other\n // doc that should be in the results.\n needsRefill = true;\n }\n }\n });\n if (this.query.hasLimit()) {\n // TODO(klimt): Make DocumentSet size be constant time.\n while (newDocumentSet.size > this.query.limit) {\n var oldDoc = newDocumentSet.last();\n newDocumentSet = newDocumentSet.delete(oldDoc.key);\n changeSet.track({ type: ChangeType.Removed, doc: oldDoc });\n }\n }\n assert(!needsRefill || !previousChanges, 'View was refilled using docs that themselves needed refilling.');\n return {\n documentSet: newDocumentSet,\n changeSet: changeSet,\n needsRefill: needsRefill,\n mutatedKeys: newMutatedKeys\n };\n };\n /**\n * Updates the view with the given ViewDocumentChanges and updates limbo docs\n * and sync state from the given (optional) target change.\n * @param docChanges The set of changes to make to the view's docs.\n * @param targetChange A target change to apply for computing limbo docs and\n * sync state.\n * @return A new ViewChange with the given docs, changes, and sync state.\n */\n View.prototype.applyChanges = function (docChanges, targetChange) {\n var _this = this;\n assert(!docChanges.needsRefill, 'Cannot apply changes that need a refill');\n var oldDocs = this.documentSet;\n this.documentSet = docChanges.documentSet;\n this.mutatedKeys = docChanges.mutatedKeys;\n // Sort changes based on type and query comparator\n var changes = docChanges.changeSet.getChanges();\n changes.sort(function (c1, c2) {\n return (compareChangeType(c1.type, c2.type) ||\n _this.query.docComparator(c1.doc, c2.doc));\n });\n var limboChanges = this.applyTargetChange(targetChange);\n var synced = this.limboDocuments.size === 0 && this.current;\n var newSyncState = synced ? SyncState.Synced : SyncState.Local;\n var syncStateChanged = newSyncState !== this.syncState;\n this.syncState = newSyncState;\n if (changes.length === 0 && !syncStateChanged) {\n // no changes\n return { limboChanges: limboChanges };\n }\n else {\n return {\n snapshot: {\n query: this.query,\n docs: docChanges.documentSet,\n oldDocs: oldDocs,\n docChanges: changes,\n fromCache: newSyncState === SyncState.Local,\n syncStateChanged: syncStateChanged,\n hasPendingWrites: !docChanges.mutatedKeys.isEmpty()\n },\n limboChanges: limboChanges\n };\n }\n };\n /**\n * Returns whether the doc for the given key should be in limbo.\n */\n View.prototype.shouldBeInLimbo = function (key) {\n // If the remote end says it's part of this query, it's not in limbo.\n if (this.syncedDocuments.has(key)) {\n return false;\n }\n // The local store doesn't think it's a result, so it shouldn't be in limbo.\n if (!this.documentSet.has(key)) {\n return false;\n }\n // If there are local changes to the doc, they might explain why the server\n // doesn't know that it's part of the query. So don't put it in limbo.\n // TODO(klimt): Ideally, we would only consider changes that might actually\n // affect this specific query.\n if (this.documentSet.get(key).hasLocalMutations) {\n return false;\n }\n // Everything else is in limbo.\n return true;\n };\n /**\n * Updates syncedDocuments, current, and limbo docs based on the given change.\n * Returns the list of changes to which docs are in limbo.\n */\n View.prototype.applyTargetChange = function (targetChange) {\n var _this = this;\n if (targetChange) {\n var targetMapping = targetChange.mapping;\n if (targetMapping instanceof ResetMapping) {\n this.syncedDocuments = targetMapping.documents;\n }\n else if (targetMapping instanceof UpdateMapping) {\n this.syncedDocuments = targetMapping.applyToKeySet(this.syncedDocuments);\n }\n switch (targetChange.currentStatusUpdate) {\n case CurrentStatusUpdate.MarkCurrent:\n this.current = true;\n break;\n case CurrentStatusUpdate.MarkNotCurrent:\n this.current = false;\n break;\n case CurrentStatusUpdate.None:\n break;\n default:\n fail('Unknown current status update: ' + targetChange.currentStatusUpdate);\n }\n }\n // Recompute the set of limbo docs.\n // TODO(klimt): Do this incrementally so that it's not quadratic when\n // updating many documents.\n var oldLimboDocuments = this.limboDocuments;\n this.limboDocuments = documentKeySet();\n if (this.current) {\n this.documentSet.forEach(function (doc) {\n if (_this.shouldBeInLimbo(doc.key)) {\n _this.limboDocuments = _this.limboDocuments.add(doc.key);\n }\n });\n }\n // Diff the new limbo docs with the old limbo docs.\n var changes = [];\n oldLimboDocuments.forEach(function (key) {\n if (!_this.limboDocuments.has(key)) {\n changes.push(new RemovedLimboDocument(key));\n }\n });\n this.limboDocuments.forEach(function (key) {\n if (!oldLimboDocuments.has(key)) {\n changes.push(new AddedLimboDocument(key));\n }\n });\n return changes;\n };\n return View;\n}());\nexport { View };\nfunction compareChangeType(c1, c2) {\n var order = function (change) {\n switch (change) {\n case ChangeType.Added:\n return 1;\n case ChangeType.Modified:\n return 2;\n case ChangeType.Metadata:\n // A metadata change is converted to a modified change at the public\n // api layer. Since we sort by document key and then change type,\n // metadata and modified changes must be sorted equivalently.\n return 2;\n case ChangeType.Removed:\n return 0;\n default:\n return fail('Unknown ChangeType: ' + change);\n }\n };\n return order(c1) - order(c2);\n}\n\n//# sourceMappingURL=view.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/view.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ResourcePath } from '../model/path';\nimport { assert, fail } from '../util/assert';\nvar escapeChar = '\\u0001';\nvar encodedSeparatorChar = '\\u0001';\nvar encodedNul = '\\u0010';\nvar encodedEscape = '\\u0011';\n/**\n * Encodes a resource path into a IndexedDb-compatible string form.\n */\nexport function encode(path) {\n var result = '';\n for (var i = 0; i < path.length; i++) {\n if (result.length > 0) {\n result = encodeSeparator(result);\n }\n result = encodeSegment(path.get(i), result);\n }\n return encodeSeparator(result);\n}\n/** Encodes a single segment of a resource path into the given result */\nfunction encodeSegment(segment, resultBuf) {\n var result = resultBuf;\n var length = segment.length;\n for (var i = 0; i < length; i++) {\n var c = segment.charAt(i);\n switch (c) {\n case '\\0':\n result += escapeChar + encodedNul;\n break;\n case escapeChar:\n result += escapeChar + encodedEscape;\n break;\n default:\n result += c;\n }\n }\n return result;\n}\n/** Encodes a path separator into the given result */\nfunction encodeSeparator(result) {\n return result + escapeChar + encodedSeparatorChar;\n}\n/**\n * Decodes the given IndexedDb-compatible string form of a resource path into\n * a ResourcePath instance. Note that this method is not suitable for use with\n * decoding resource names from the server; those are One Platform format\n * strings.\n */\nexport function decode(path) {\n // Event the empty path must encode as a path of at least length 2. A path\n // with exactly 2 must be the empty path.\n var length = path.length;\n assert(length >= 2, 'Invalid path ' + path);\n if (length === 2) {\n assert(path.charAt(0) === escapeChar && path.charAt(1) === encodedSeparatorChar, 'Non-empty path ' + path + ' had length 2');\n return ResourcePath.EMPTY_PATH;\n }\n // Escape characters cannot exist past the second-to-last position in the\n // source value.\n var lastReasonableEscapeIndex = length - 2;\n var segments = [];\n var segmentBuilder = '';\n for (var start = 0; start < length;) {\n // The last two characters of a valid encoded path must be a separator, so\n // there must be an end to this segment.\n var end = path.indexOf(escapeChar, start);\n if (end < 0 || end > lastReasonableEscapeIndex) {\n fail('Invalid encoded resource path: \"' + path + '\"');\n }\n var next = path.charAt(end + 1);\n switch (next) {\n case encodedSeparatorChar:\n var currentPiece = path.substring(start, end);\n var segment = void 0;\n if (segmentBuilder.length === 0) {\n // Avoid copying for the common case of a segment that excludes \\0\n // and \\001\n segment = currentPiece;\n }\n else {\n segmentBuilder += currentPiece;\n segment = segmentBuilder;\n segmentBuilder = '';\n }\n segments.push(segment);\n break;\n case encodedNul:\n segmentBuilder += path.substring(start, end);\n segmentBuilder += '\\0';\n break;\n case encodedEscape:\n // The escape character can be used in the output to encode itself.\n segmentBuilder += path.substring(start, end + 1);\n break;\n default:\n fail('Invalid encoded resource path: \"' + path + '\"');\n }\n start = end + 2;\n }\n return new ResourcePath(segments);\n}\n/**\n * Computes the prefix successor of the given path, computed by encode above.\n * A prefix successor is the first key that cannot be prefixed by the given\n * path. It's useful for defining the end of a prefix scan such that all keys\n * in the scan have the same prefix.\n *\n * Note that this is not a general prefix successor implementation, which is\n * tricky to get right with Strings, given that they encode down to UTF-8.\n * Instead this relies on the fact that all paths encoded by this class are\n * always terminated with a separator, and so a successor can always be\n * cheaply computed by incrementing the last character of the path.\n */\nexport function prefixSuccessor(path) {\n var c = path.charCodeAt(path.length - 1);\n // TODO(mcg): this really should be a general thing, but not worth it right\n // now\n assert(c === 1, 'successor may only operate on paths generated by encode');\n return path.substring(0, path.length - 1) + String.fromCharCode(c + 1);\n}\n\n//# sourceMappingURL=encoded_resource_path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/encoded_resource_path.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { encode } from './encoded_resource_path';\nexport var SCHEMA_VERSION = 1;\n/** Performs database creation and (in the future) upgrades between versions. */\nexport function createOrUpgradeDb(db, oldVersion) {\n assert(oldVersion === 0, 'Unexpected upgrade from version ' + oldVersion);\n db.createObjectStore(DbMutationQueue.store, {\n keyPath: DbMutationQueue.keyPath\n });\n // TODO(mikelehen): Get rid of \"as any\" if/when TypeScript fixes their\n // types. https://github.com/Microsoft/TypeScript/issues/14322\n db.createObjectStore(\n // tslint:disable-next-line:no-any\n DbMutationBatch.store, { keyPath: DbMutationBatch.keyPath });\n var targetDocumentsStore = db.createObjectStore(\n // tslint:disable-next-line:no-any\n DbTargetDocument.store, { keyPath: DbTargetDocument.keyPath });\n targetDocumentsStore.createIndex(DbTargetDocument.documentTargetsIndex, DbTargetDocument.documentTargetsKeyPath, { unique: true });\n var targetStore = db.createObjectStore(DbTarget.store, {\n keyPath: DbTarget.keyPath\n });\n // NOTE: This is unique only because the TargetId is the suffix.\n targetStore.createIndex(DbTarget.queryTargetsIndexName, DbTarget.queryTargetsKeyPath, { unique: true });\n // NOTE: keys for these stores are specified explicitly rather than using a\n // keyPath.\n db.createObjectStore(DbDocumentMutation.store);\n db.createObjectStore(DbRemoteDocument.store);\n db.createObjectStore(DbOwner.store);\n db.createObjectStore(DbTargetGlobal.store);\n}\n/**\n * Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.\n */\nvar DbTimestamp = /** @class */ (function () {\n function DbTimestamp(seconds, nanos) {\n this.seconds = seconds;\n this.nanos = nanos;\n }\n return DbTimestamp;\n}());\nexport { DbTimestamp };\n/**\n * A singleton object to be stored in the 'owner' store in IndexedDb.\n *\n * A given database can be owned by a single tab at a given time. That tab\n * must validate that it is still the owner before every write operation and\n * should regularly write an updated timestamp to prevent other tabs from\n * \"stealing\" ownership of the db.\n */\nvar DbOwner = /** @class */ (function () {\n function DbOwner(ownerId, leaseTimestampMs) {\n this.ownerId = ownerId;\n this.leaseTimestampMs = leaseTimestampMs;\n }\n /** Name of the IndexedDb object store. */\n DbOwner.store = 'owner';\n return DbOwner;\n}());\nexport { DbOwner };\n/**\n * An object to be stored in the 'mutationQueues' store in IndexedDb.\n *\n * Each user gets a single queue of MutationBatches to apply to the server.\n * DbMutationQueue tracks the metadata about the queue.\n */\nvar DbMutationQueue = /** @class */ (function () {\n function DbMutationQueue(\n /**\n * The normalized user ID to which this queue belongs.\n */\n userId, \n /**\n * An identifier for the highest numbered batch that has been acknowledged\n * by the server. All MutationBatches in this queue with batchIds less\n * than or equal to this value are considered to have been acknowledged by\n * the server.\n */\n lastAcknowledgedBatchId, \n /**\n * A stream token that was previously sent by the server.\n *\n * See StreamingWriteRequest in datastore.proto for more details about\n * usage.\n *\n * After sending this token, earlier tokens may not be used anymore so\n * only a single stream token is retained.\n */\n lastStreamToken) {\n this.userId = userId;\n this.lastAcknowledgedBatchId = lastAcknowledgedBatchId;\n this.lastStreamToken = lastStreamToken;\n }\n /** Name of the IndexedDb object store. */\n DbMutationQueue.store = 'mutationQueues';\n /** Keys are automatically assigned via the userId property. */\n DbMutationQueue.keyPath = 'userId';\n return DbMutationQueue;\n}());\nexport { DbMutationQueue };\n/**\n * An object to be stored in the 'mutations' store in IndexedDb.\n *\n * Represents a batch of user-level mutations intended to be sent to the server\n * in a single write. Each user-level batch gets a separate DbMutationBatch\n * with a new batchId.\n */\nvar DbMutationBatch = /** @class */ (function () {\n function DbMutationBatch(\n /**\n * The normalized user ID to which this batch belongs.\n */\n userId, \n /**\n * An identifier for this batch, allocated by the mutation queue in a\n * monotonically increasing manner.\n */\n batchId, \n /**\n * The local write time of the batch, stored as milliseconds since the\n * epoch.\n */\n localWriteTimeMs, \n /**\n * A list of mutations to apply. All mutations will be applied atomically.\n *\n * Mutations are serialized via JsonProtoSerializer.toMutation().\n */\n mutations) {\n this.userId = userId;\n this.batchId = batchId;\n this.localWriteTimeMs = localWriteTimeMs;\n this.mutations = mutations;\n }\n /** Name of the IndexedDb object store. */\n DbMutationBatch.store = 'mutations';\n /** Keys are automatically assigned via the userId, batchId properties. */\n DbMutationBatch.keyPath = ['userId', 'batchId'];\n return DbMutationBatch;\n}());\nexport { DbMutationBatch };\n/**\n * An object to be stored in the 'documentMutations' store in IndexedDb.\n *\n * A manually maintained index of all the mutation batches that affect a given\n * document key. The rows in this table are references based on the contents of\n * DbMutationBatch.mutations.\n */\nvar DbDocumentMutation = /** @class */ (function () {\n function DbDocumentMutation() {\n }\n /**\n * Creates a [userId] key for use in the DbDocumentMutations index to iterate\n * over all of a user's document mutations.\n */\n DbDocumentMutation.prefixForUser = function (userId) {\n return [userId];\n };\n /**\n * Creates a [userId, encodedPath] key for use in the DbDocumentMutations\n * index to iterate over all at document mutations for a given path or lower.\n */\n DbDocumentMutation.prefixForPath = function (userId, path) {\n return [userId, encode(path)];\n };\n /**\n * Creates a full index key of [userId, encodedPath, batchId] for inserting\n * and deleting into the DbDocumentMutations index.\n */\n DbDocumentMutation.key = function (userId, path, batchId) {\n return [userId, encode(path), batchId];\n };\n DbDocumentMutation.store = 'documentMutations';\n /**\n * Because we store all the useful information for this store in the key,\n * there is no useful information to store as the value. The raw (unencoded)\n * path cannot be stored because IndexedDb doesn't store prototype\n * information.\n */\n DbDocumentMutation.PLACEHOLDER = new DbDocumentMutation();\n return DbDocumentMutation;\n}());\nexport { DbDocumentMutation };\n/**\n * Represents the known absence of a document at a particular version.\n * Stored in IndexedDb as part of a DbRemoteDocument object.\n */\nvar DbNoDocument = /** @class */ (function () {\n function DbNoDocument(path, readTime) {\n this.path = path;\n this.readTime = readTime;\n }\n return DbNoDocument;\n}());\nexport { DbNoDocument };\n/**\n * An object to be stored in the 'remoteDocuments' store in IndexedDb. It\n * represents either a cached document (if it exists) or a cached \"no-document\"\n * (if it is known to not exist).\n *\n * Note: This is the persisted equivalent of a MaybeDocument and could perhaps\n * be made more general if necessary.\n */\nvar DbRemoteDocument = /** @class */ (function () {\n function DbRemoteDocument(\n /**\n * Set to an instance of a DbNoDocument if it is known that no document\n * exists.\n */\n noDocument, \n /**\n * Set to an instance of a Document if there's a cached version of the\n * document.\n */\n document) {\n this.noDocument = noDocument;\n this.document = document;\n }\n DbRemoteDocument.store = 'remoteDocuments';\n return DbRemoteDocument;\n}());\nexport { DbRemoteDocument };\n/**\n * An object to be stored in the 'targets' store in IndexedDb.\n *\n * This is based on and should be kept in sync with the proto used in the iOS\n * client.\n *\n * Each query the client listens to against the server is tracked on disk so\n * that the query can be efficiently resumed on restart.\n */\nvar DbTarget = /** @class */ (function () {\n function DbTarget(\n /**\n * An auto-generated sequential numeric identifier for the query.\n *\n * Queries are stored using their canonicalId as the key, but these\n * canonicalIds can be quite long so we additionally assign a unique\n * queryId which can be used by referenced data structures (e.g.\n * indexes) to minimize the on-disk cost.\n */\n targetId, \n /**\n * The canonical string representing this query. This is not unique.\n */\n canonicalId, \n /**\n * The last readTime received from the Watch Service for this query.\n *\n * This is the same value as TargetChange.read_time in the protos.\n */\n readTime, \n /**\n * An opaque, server-assigned token that allows watching a query to be\n * resumed after disconnecting without retransmitting all the data\n * that matches the query. The resume token essentially identifies a\n * point in time from which the server should resume sending results.\n *\n * This is related to the snapshotVersion in that the resumeToken\n * effectively also encodes that value, but the resumeToken is opaque\n * and sometimes encodes additional information.\n *\n * A consequence of this is that the resumeToken should be used when\n * asking the server to reason about where this client is in the watch\n * stream, but the client should use the snapshotVersion for its own\n * purposes.\n *\n * This is the same value as TargetChange.resume_token in the protos.\n */\n resumeToken, \n /**\n * A sequence number representing the last time this query was\n * listened to, used for garbage collection purposes.\n *\n * Conventionally this would be a timestamp value, but device-local\n * clocks are unreliable and they must be able to create new listens\n * even while disconnected. Instead this should be a monotonically\n * increasing number that's incremented on each listen call.\n *\n * This is different from the queryId since the queryId is an\n * immutable identifier assigned to the Query on first use while\n * lastListenSequenceNumber is updated every time the query is\n * listened to.\n */\n lastListenSequenceNumber, \n /**\n * The query for this target.\n *\n * Because canonical ids are not unique we must store the actual query. We\n * use the proto to have an object we can persist without having to\n * duplicate translation logic to and from a `Query` object.\n */\n query) {\n this.targetId = targetId;\n this.canonicalId = canonicalId;\n this.readTime = readTime;\n this.resumeToken = resumeToken;\n this.lastListenSequenceNumber = lastListenSequenceNumber;\n this.query = query;\n }\n DbTarget.store = 'targets';\n /** Keys are automatically assigned via the targetId property. */\n DbTarget.keyPath = 'targetId';\n /** The name of the queryTargets index. */\n DbTarget.queryTargetsIndexName = 'queryTargetsIndex';\n /**\n * The index of all canonicalIds to the targets that they match. This is not\n * a unique mapping because canonicalId does not promise a unique name for all\n * possible queries, so we append the targetId to make the mapping unique.\n */\n DbTarget.queryTargetsKeyPath = ['canonicalId', 'targetId'];\n return DbTarget;\n}());\nexport { DbTarget };\n/**\n * An object representing an association between a target and a document.\n * Stored in the targetDocument object store to store the documents tracked by a\n * particular target.\n */\nvar DbTargetDocument = /** @class */ (function () {\n function DbTargetDocument(\n /**\n * The targetId identifying a target.\n */\n targetId, \n /**\n * The path to the document, as encoded in the key.\n */\n path) {\n this.targetId = targetId;\n this.path = path;\n }\n /** Name of the IndexedDb object store. */\n DbTargetDocument.store = 'targetDocuments';\n /** Keys are automatically assigned via the targetId, path properties. */\n DbTargetDocument.keyPath = ['targetId', 'path'];\n /** The index name for the reverse index. */\n DbTargetDocument.documentTargetsIndex = 'documentTargetsIndex';\n /** We also need to create the reverse index for these properties. */\n DbTargetDocument.documentTargetsKeyPath = ['path', 'targetId'];\n return DbTargetDocument;\n}());\nexport { DbTargetDocument };\n/**\n * A record of global state tracked across all Targets, tracked separately\n * to avoid the need for extra indexes.\n *\n * This should be kept in-sync with the proto used in the iOS client.\n */\nvar DbTargetGlobal = /** @class */ (function () {\n function DbTargetGlobal(\n /**\n * The highest numbered target id across all targets.\n *\n * See DbTarget.targetId.\n */\n highestTargetId, \n /**\n * The highest numbered lastListenSequenceNumber across all targets.\n *\n * See DbTarget.lastListenSequenceNumber.\n */\n highestListenSequenceNumber, \n /**\n * A global snapshot version representing the last consistent snapshot we\n * received from the backend. This is monotonically increasing and any\n * snapshots received from the backend prior to this version (e.g. for\n * targets resumed with a resumeToken) should be suppressed (buffered)\n * until the backend has caught up to this snapshot version again. This\n * prevents our cache from ever going backwards in time.\n */\n lastRemoteSnapshotVersion) {\n this.highestTargetId = highestTargetId;\n this.highestListenSequenceNumber = highestListenSequenceNumber;\n this.lastRemoteSnapshotVersion = lastRemoteSnapshotVersion;\n }\n /**\n * The key string used for the single object that exists in the\n * DbTargetGlobal store.\n */\n DbTargetGlobal.key = 'targetGlobalKey';\n DbTargetGlobal.store = 'targetGlobal';\n return DbTargetGlobal;\n}());\nexport { DbTargetGlobal };\n/**\n * The list of all IndexedDB stored used by the SDK. This is used when creating\n * transactions so that access across all stores is done atomically.\n */\nexport var ALL_STORES = [\n DbMutationQueue.store,\n DbMutationBatch.store,\n DbDocumentMutation.store,\n DbRemoteDocument.store,\n DbTarget.store,\n DbOwner.store,\n DbTargetGlobal.store,\n DbTargetDocument.store\n];\n\n//# sourceMappingURL=indexeddb_schema.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/indexeddb_schema.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { debug } from '../util/log';\nimport { PersistencePromise } from './persistence_promise';\nvar LOG_TAG = 'SimpleDb';\n/**\n * Provides a wrapper around IndexedDb with a simplified interface that uses\n * Promise-like return values to chain operations. Real promises cannot be used\n * since .then() continuations are executed asynchronously (e.g. via\n * .setImmediate), which would cause IndexedDB to end the transaction.\n * See PersistencePromise for more details.\n */\nvar SimpleDb = /** @class */ (function () {\n function SimpleDb(db) {\n this.db = db;\n }\n /** Opens the specified database, creating or upgrading it if necessary. */\n SimpleDb.openOrCreate = function (name, version, runUpgrade) {\n assert(SimpleDb.isAvailable(), 'IndexedDB not supported in current environment.');\n debug(LOG_TAG, 'Opening database:', name);\n return new PersistencePromise(function (resolve, reject) {\n // TODO(mikelehen): Investigate browser compatibility.\n // https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB\n // suggests IE9 and older WebKit browsers handle upgrade\n // differently.\n var request = window.indexedDB.open(name, version);\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(new SimpleDb(db));\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onupgradeneeded = function (event) {\n debug(LOG_TAG, 'Database \"' + name + '\" requires upgrade from version:', event.oldVersion);\n // TODO(mikelehen): If/when we need to do an actual data\n // migration, we'll want to wrap db in a SimpleDb and have the\n // runUpgrade function return a PersistencePromise, since we'll\n // likely need to do async reads and writes. For now we're\n // cheating and just passing the raw IndexedDB in, since\n // createObjectStore(), etc. are synchronous.\n var db = event.target.result;\n runUpgrade(db, event.oldVersion);\n };\n }).toPromise();\n };\n /** Deletes the specified database. */\n SimpleDb.delete = function (name) {\n debug(LOG_TAG, 'Removing database:', name);\n return wrapRequest(window.indexedDB.deleteDatabase(name)).toPromise();\n };\n /** Returns true if IndexedDB is available in the current environment. */\n SimpleDb.isAvailable = function () {\n if (typeof window === 'undefined' || window.indexedDB == null) {\n return false;\n }\n // We extensively use indexed array values and compound keys,\n // which IE and Edge do not support. However, they still have indexedDB\n // defined on the window, so we need to check for them here and make sure\n // to return that persistence is not enabled for those browsers.\n // For tracking support of this feature, see here:\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/\n // Check the UA string to find out the browser.\n var ua = window.navigator.userAgent;\n // IE 10\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n // IE 11\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n // Edge\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,\n // like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n if (ua.indexOf('MSIE ') > 0 ||\n ua.indexOf('Trident/') > 0 ||\n ua.indexOf('Edge/') > 0) {\n return false;\n }\n else {\n return true;\n }\n };\n SimpleDb.prototype.runTransaction = function (mode, objectStores, transactionFn) {\n var transaction = new SimpleDbTransaction(this.db, mode, objectStores);\n var transactionFnResult = transactionFn(transaction)\n .catch(function (error) {\n // Abort the transaction if there was an\n // error.\n transaction.abort();\n return PersistencePromise.reject(error);\n })\n .toPromise();\n // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to\n // fire), but still return the original transactionFnResult back to the\n // caller.\n return transaction.completionPromise.then(function () { return transactionFnResult; });\n };\n SimpleDb.prototype.close = function () {\n this.db.close();\n };\n return SimpleDb;\n}());\nexport { SimpleDb };\n/**\n * A controller for iterating over a key range or index. It allows an iterate\n * callback to delete the currently-referenced object, or jump to a new key\n * within the key range or index.\n */\nvar IterationController = /** @class */ (function () {\n function IterationController(dbCursor) {\n this.dbCursor = dbCursor;\n this.shouldStop = false;\n this.nextKey = null;\n }\n Object.defineProperty(IterationController.prototype, \"isDone\", {\n get: function () {\n return this.shouldStop;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(IterationController.prototype, \"skipToKey\", {\n get: function () {\n return this.nextKey;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(IterationController.prototype, \"cursor\", {\n set: function (value) {\n this.dbCursor = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * This function can be called to stop iteration at any point.\n */\n IterationController.prototype.done = function () {\n this.shouldStop = true;\n };\n /**\n * This function can be called to skip to that next key, which could be\n * an index or a primary key.\n */\n IterationController.prototype.skip = function (key) {\n this.nextKey = key;\n };\n /**\n * Delete the current cursor value from the object store.\n *\n * NOTE: You CANNOT do this with a keysOnly query.\n */\n IterationController.prototype.delete = function () {\n return wrapRequest(this.dbCursor.delete());\n };\n return IterationController;\n}());\nexport { IterationController };\n/**\n * Wraps an IDBTransaction and exposes a store() method to get a handle to a\n * specific object store.\n */\nvar SimpleDbTransaction = /** @class */ (function () {\n function SimpleDbTransaction(db, mode, objectStoresNames) {\n var _this = this;\n this.aborted = false;\n this.transaction = db.transaction(objectStoresNames, mode);\n this.completionPromise = new Promise(function (resolve, reject) {\n // We consider aborting to be \"normal\" and just resolve the promise.\n // May need to revisit if/when we actually need to abort transactions.\n _this.transaction.onabort = _this.transaction.oncomplete = function (event) {\n resolve();\n };\n _this.transaction.onerror = function (event) {\n reject(event.target.error);\n };\n });\n }\n SimpleDbTransaction.prototype.abort = function () {\n if (!this.aborted) {\n debug(LOG_TAG, 'Aborting transaction.');\n this.aborted = true;\n this.transaction.abort();\n }\n };\n /**\n * Returns a SimpleDbStore for the specified store. All\n * operations performed on the SimpleDbStore happen within the context of this\n * transaction and it cannot be used anymore once the transaction is\n * completed.\n *\n * Note that we can't actually enforce that the KeyType and ValueType are\n * correct, but they allow type safety through the rest of the consuming code.\n */\n SimpleDbTransaction.prototype.store = function (storeName) {\n var store = this.transaction.objectStore(storeName);\n assert(!!store, 'Object store not part of transaction: ' + storeName);\n return new SimpleDbStore(store);\n };\n return SimpleDbTransaction;\n}());\nexport { SimpleDbTransaction };\n/**\n * A wrapper around an IDBObjectStore providing an API that:\n *\n * 1) Has generic KeyType / ValueType parameters to provide strongly-typed\n * methods for acting against the object store.\n * 2) Deals with IndexedDB's onsuccess / onerror event callbacks, making every\n * method return a PersistencePromise instead.\n * 3) Provides a higher-level API to avoid needing to do excessive wrapping of\n * intermediate IndexedDB types (IDBCursorWithValue, etc.)\n */\nvar SimpleDbStore = /** @class */ (function () {\n function SimpleDbStore(store) {\n this.store = store;\n }\n SimpleDbStore.prototype.put = function (keyOrValue, value) {\n var request;\n if (value !== undefined) {\n debug(LOG_TAG, 'PUT', this.store.name, keyOrValue, value);\n request = this.store.put(value, keyOrValue);\n }\n else {\n debug(LOG_TAG, 'PUT', this.store.name, '', keyOrValue);\n request = this.store.put(keyOrValue);\n }\n return wrapRequest(request);\n };\n /**\n * Gets the object with the specified key from the specified store, or null\n * if no object exists with the specified key.\n *\n * @key The key of the object to get.\n * @return The object with the specified key or null if no object exists.\n */\n SimpleDbStore.prototype.get = function (key) {\n var _this = this;\n var request = this.store.get(key);\n // tslint:disable-next-line:no-any We're doing an unsafe cast to ValueType.\n return wrapRequest(request).next(function (result) {\n // Normalize nonexistence to null.\n if (result === undefined) {\n result = null;\n }\n debug(LOG_TAG, 'GET', _this.store.name, key, result);\n return result;\n });\n };\n SimpleDbStore.prototype.delete = function (key) {\n debug(LOG_TAG, 'DELETE', this.store.name, key);\n var request = this.store.delete(key);\n return wrapRequest(request);\n };\n SimpleDbStore.prototype.loadAll = function (indexOrRange, range) {\n var cursor = this.cursor(this.options(indexOrRange, range));\n var results = [];\n return this.iterateCursor(cursor, function (key, value) {\n results.push(value);\n }).next(function () {\n return results;\n });\n };\n SimpleDbStore.prototype.deleteAll = function (indexOrRange, range) {\n debug(LOG_TAG, 'DELETE ALL', this.store.name);\n var options = this.options(indexOrRange, range);\n options.keysOnly = false;\n var cursor = this.cursor(options);\n return this.iterateCursor(cursor, function (key, value, control) {\n // NOTE: Calling delete() on a cursor is documented as more efficient than\n // calling delete() on an object store with a single key\n // (https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete),\n // however, this requires us *not* to use a keysOnly cursor\n // (https://developer.mozilla.org/en-US/docs/Web/API/IDBCursor/delete). We\n // may want to compare the performance of each method.\n return control.delete();\n });\n };\n SimpleDbStore.prototype.iterate = function (optionsOrCallback, callback) {\n var options;\n if (!callback) {\n options = {};\n callback = optionsOrCallback;\n }\n else {\n options = optionsOrCallback;\n }\n var cursor = this.cursor(options);\n return this.iterateCursor(cursor, callback);\n };\n SimpleDbStore.prototype.iterateCursor = function (cursorRequest, fn) {\n var results = [];\n return new PersistencePromise(function (resolve, reject) {\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (!cursor) {\n resolve();\n return;\n }\n var controller = new IterationController(cursor);\n var userResult = fn(cursor.primaryKey, cursor.value, controller);\n if (userResult instanceof PersistencePromise) {\n results.push(userResult);\n }\n if (controller.isDone) {\n resolve();\n }\n else if (controller.skipToKey === null) {\n cursor.continue();\n }\n else {\n cursor.continue(controller.skipToKey);\n }\n };\n }).next(function () {\n return PersistencePromise.waitFor(results);\n });\n };\n SimpleDbStore.prototype.options = function (indexOrRange, range) {\n var indexName = undefined;\n if (indexOrRange !== undefined) {\n if (typeof indexOrRange === 'string') {\n indexName = indexOrRange;\n }\n else {\n assert(range === undefined, '3rd argument must not be defined if 2nd is a range.');\n range = indexOrRange;\n }\n }\n return { index: indexName, range: range };\n };\n SimpleDbStore.prototype.cursor = function (options) {\n var direction = 'next';\n if (options.reverse) {\n direction = 'prev';\n }\n if (options.index) {\n var index = this.store.index(options.index);\n if (options.keysOnly) {\n return index.openKeyCursor(options.range, direction);\n }\n else {\n return index.openCursor(options.range, direction);\n }\n }\n else {\n return this.store.openCursor(options.range, direction);\n }\n };\n return SimpleDbStore;\n}());\nexport { SimpleDbStore };\n/**\n * Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror\n * handlers to resolve / reject the PersistencePromise as appropriate.\n */\nfunction wrapRequest(request) {\n return new PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}\n\n//# sourceMappingURL=simple_db.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/simple_db.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BATCHID_UNKNOWN, MutationBatch } from '../model/mutation_batch';\nimport { assert, fail } from '../util/assert';\nimport { immediatePredecessor, primitiveComparator } from '../util/misc';\nimport { SortedSet } from '../util/sorted_set';\nimport * as EncodedResourcePath from './encoded_resource_path';\nimport { DbDocumentMutation, DbMutationBatch, DbMutationQueue } from './indexeddb_schema';\nimport { PersistencePromise } from './persistence_promise';\nimport { SimpleDbTransaction } from './simple_db';\n/** A mutation queue for a specific user, backed by IndexedDB. */\nvar IndexedDbMutationQueue = /** @class */ (function () {\n function IndexedDbMutationQueue(\n /**\n * The normalized userId (e.g. null UID => \"\" userId) used to store /\n * retrieve mutations.\n */\n userId, serializer) {\n this.userId = userId;\n this.serializer = serializer;\n this.garbageCollector = null;\n }\n /**\n * Creates a new mutation queue for the given user.\n * @param user The user for which to create a mutation queue.\n * @param serializer The serializer to use when persisting to IndexedDb.\n */\n IndexedDbMutationQueue.forUser = function (user, serializer) {\n // TODO(mcg): Figure out what constraints there are on userIDs\n // In particular, are there any reserved characters? are empty ids allowed?\n // For the moment store these together in the same mutations table assuming\n // that empty userIDs aren't allowed.\n assert(user.uid !== '', 'UserID must not be an empty string.');\n var userId = user.isUnauthenticated() ? '' : user.uid;\n return new IndexedDbMutationQueue(userId, serializer);\n };\n IndexedDbMutationQueue.prototype.start = function (transaction) {\n var _this = this;\n return IndexedDbMutationQueue.loadNextBatchIdFromDb(transaction)\n .next(function (nextBatchId) {\n _this.nextBatchId = nextBatchId;\n return mutationQueuesStore(transaction).get(_this.userId);\n })\n .next(function (metadata) {\n if (!metadata) {\n metadata = new DbMutationQueue(_this.userId, BATCHID_UNKNOWN, \n /*lastStreamToken=*/ '');\n }\n _this.metadata = metadata;\n // On restart, nextBatchId may end up lower than\n // lastAcknowledgedBatchId since it's computed from the queue\n // contents, and there may be no mutations in the queue. In this\n // case, we need to reset lastAcknowledgedBatchId (which is safe\n // since the queue must be empty).\n if (_this.metadata.lastAcknowledgedBatchId >= _this.nextBatchId) {\n return _this.checkEmpty(transaction).next(function (empty) {\n assert(empty, 'Reset nextBatchID is only possible when the queue is empty');\n _this.metadata.lastAcknowledgedBatchId = BATCHID_UNKNOWN;\n return mutationQueuesStore(transaction).put(_this.metadata);\n });\n }\n else {\n return PersistencePromise.resolve();\n }\n });\n };\n /**\n * Returns one larger than the largest batch ID that has been stored. If there\n * are no mutations returns 0. Note that batch IDs are global.\n */\n IndexedDbMutationQueue.loadNextBatchIdFromDb = function (txn) {\n var maxBatchId = BATCHID_UNKNOWN;\n return mutationsStore(txn)\n .iterate({ reverse: true }, function (key, batch, control) {\n var userId = key[0], batchId = key[1];\n if (batchId > maxBatchId) {\n maxBatchId = batch.batchId;\n }\n if (userId === '') {\n // We can't compute a predecessor for the empty string, since it\n // is lexographically first. That also means that no other\n // userIds can come before this one, so we can just exit early.\n control.done();\n }\n else {\n var nextUser = immediatePredecessor(userId);\n control.skip([nextUser]);\n }\n })\n .next(function () { return maxBatchId + 1; });\n };\n IndexedDbMutationQueue.prototype.checkEmpty = function (transaction) {\n var empty = true;\n var range = IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY), this.keyForBatchId(Number.POSITIVE_INFINITY));\n return mutationsStore(transaction)\n .iterate({ range: range }, function (key, value, control) {\n empty = false;\n control.done();\n })\n .next(function () { return empty; });\n };\n IndexedDbMutationQueue.prototype.getNextBatchId = function (transaction) {\n return PersistencePromise.resolve(this.nextBatchId);\n };\n IndexedDbMutationQueue.prototype.getHighestAcknowledgedBatchId = function (transaction) {\n return PersistencePromise.resolve(this.metadata.lastAcknowledgedBatchId);\n };\n IndexedDbMutationQueue.prototype.acknowledgeBatch = function (transaction, batch, streamToken) {\n var batchId = batch.batchId;\n assert(batchId > this.metadata.lastAcknowledgedBatchId, 'Mutation batchIDs must be acknowledged in order');\n this.metadata.lastAcknowledgedBatchId = batchId;\n this.metadata.lastStreamToken = validateStreamToken(streamToken);\n return mutationQueuesStore(transaction).put(this.metadata);\n };\n IndexedDbMutationQueue.prototype.getLastStreamToken = function (transaction) {\n return PersistencePromise.resolve(this.metadata.lastStreamToken);\n };\n IndexedDbMutationQueue.prototype.setLastStreamToken = function (transaction, streamToken) {\n this.metadata.lastStreamToken = validateStreamToken(streamToken);\n return mutationQueuesStore(transaction).put(this.metadata);\n };\n IndexedDbMutationQueue.prototype.addMutationBatch = function (transaction, localWriteTime, mutations) {\n var _this = this;\n var batchId = this.nextBatchId;\n this.nextBatchId++;\n var batch = new MutationBatch(batchId, localWriteTime, mutations);\n var dbBatch = this.serializer.toDbMutationBatch(this.userId, batch);\n return mutationsStore(transaction)\n .put(dbBatch)\n .next(function () {\n var promises = [];\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n var encodedPath = EncodedResourcePath.encode(mutation.key.path);\n var indexKey = DbDocumentMutation.key(_this.userId, mutation.key.path, batchId);\n documentMutationsStore(transaction).put(indexKey, DbDocumentMutation.PLACEHOLDER);\n }\n return PersistencePromise.waitFor(promises);\n })\n .next(function () {\n return batch;\n });\n };\n IndexedDbMutationQueue.prototype.lookupMutationBatch = function (transaction, batchId) {\n var _this = this;\n return mutationsStore(transaction)\n .get(this.keyForBatchId(batchId))\n .next(function (dbBatch) {\n return dbBatch ? _this.serializer.fromDbMutationBatch(dbBatch) : null;\n });\n };\n IndexedDbMutationQueue.prototype.getNextMutationBatchAfterBatchId = function (transaction, batchId) {\n var _this = this;\n var range = IDBKeyRange.lowerBound(this.keyForBatchId(batchId + 1));\n var foundBatch = null;\n return mutationsStore(transaction)\n .iterate({ range: range }, function (key, dbBatch, control) {\n if (dbBatch.userId === _this.userId) {\n assert(dbBatch.batchId > batchId, 'Should have found mutation after ' + batchId);\n foundBatch = _this.serializer.fromDbMutationBatch(dbBatch);\n }\n control.done();\n })\n .next(function () { return foundBatch; });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatches = function (transaction) {\n var _this = this;\n var range = IDBKeyRange.bound(this.keyForBatchId(BATCHID_UNKNOWN), this.keyForBatchId(Number.POSITIVE_INFINITY));\n return mutationsStore(transaction)\n .loadAll(range)\n .next(function (dbBatches) {\n return dbBatches.map(function (dbBatch) { return _this.serializer.fromDbMutationBatch(dbBatch); });\n });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatchesThroughBatchId = function (transaction, batchId) {\n var _this = this;\n var range = IDBKeyRange.bound(this.keyForBatchId(BATCHID_UNKNOWN), this.keyForBatchId(batchId));\n return mutationsStore(transaction)\n .loadAll(range)\n .next(function (dbBatches) {\n return dbBatches.map(function (dbBatch) { return _this.serializer.fromDbMutationBatch(dbBatch); });\n });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatchesAffectingDocumentKey = function (transaction, documentKey) {\n var _this = this;\n // Scan the document-mutation index starting with a prefix starting with\n // the given documentKey.\n var indexPrefix = DbDocumentMutation.prefixForPath(this.userId, documentKey.path);\n var indexStart = IDBKeyRange.lowerBound(indexPrefix);\n var results = [];\n return documentMutationsStore(transaction)\n .iterate({ range: indexStart }, function (indexKey, _, control) {\n var userID = indexKey[0], encodedPath = indexKey[1], batchID = indexKey[2];\n // Only consider rows matching exactly the specific key of\n // interest. Note that because we order by path first, and we\n // order terminators before path separators, we'll encounter all\n // the index rows for documentKey contiguously. In particular, all\n // the rows for documentKey will occur before any rows for\n // documents nested in a subcollection beneath documentKey so we\n // can stop as soon as we hit any such row.\n var path = EncodedResourcePath.decode(encodedPath);\n if (userID !== _this.userId || !documentKey.path.equals(path)) {\n control.done();\n return;\n }\n var mutationKey = _this.keyForBatchId(batchID);\n // Look up the mutation batch in the store.\n // PORTING NOTE: because iteration is callback driven in the web,\n // we just look up the key instead of keeping an open iterator\n // like iOS.\n return mutationsStore(transaction)\n .get(mutationKey)\n .next(function (dbBatch) {\n if (dbBatch === null) {\n fail('Dangling document-mutation reference found: ' +\n indexKey +\n ' which points to ' +\n mutationKey);\n }\n results.push(_this.serializer.fromDbMutationBatch(dbBatch));\n });\n })\n .next(function () { return results; });\n };\n IndexedDbMutationQueue.prototype.getAllMutationBatchesAffectingQuery = function (transaction, query) {\n var _this = this;\n assert(!query.isDocumentQuery(), \"Document queries shouldn't go down this path\");\n var queryPath = query.path;\n var immediateChildrenLength = queryPath.length + 1;\n // TODO(mcg): Actually implement a single-collection query\n //\n // This is actually executing an ancestor query, traversing the whole\n // subtree below the collection which can be horrifically inefficient for\n // some structures. The right way to solve this is to implement the full\n // value index, but that's not in the cards in the near future so this is\n // the best we can do for the moment.\n //\n // Since we don't yet index the actual properties in the mutations, our\n // current approach is to just return all mutation batches that affect\n // documents in the collection being queried.\n var indexPrefix = DbDocumentMutation.prefixForPath(this.userId, queryPath);\n var encodedQueryPath = indexPrefix[1];\n var indexStart = IDBKeyRange.lowerBound(indexPrefix);\n // Collect up unique batchIDs encountered during a scan of the index. Use a\n // SortedSet to accumulate batch IDs so they can be traversed in order in a\n // scan of the main table.\n var uniqueBatchIDs = new SortedSet(primitiveComparator);\n return documentMutationsStore(transaction)\n .iterate({ range: indexStart }, function (indexKey, _, control) {\n var userID = indexKey[0], encodedPath = indexKey[1], batchID = indexKey[2];\n var path = EncodedResourcePath.decode(encodedPath);\n if (userID !== _this.userId || !queryPath.isPrefixOf(path)) {\n control.done();\n return;\n }\n // Rows with document keys more than one segment longer than the\n // query path can't be matches. For example, a query on 'rooms'\n // can't match the document /rooms/abc/messages/xyx.\n // TODO(mcg): we'll need a different scanner when we implement\n // ancestor queries.\n if (path.length !== immediateChildrenLength) {\n return;\n }\n uniqueBatchIDs = uniqueBatchIDs.add(batchID);\n })\n .next(function () {\n var results = [];\n var promises = [];\n // TODO(rockwood): Implement this using iterate.\n uniqueBatchIDs.forEach(function (batchID) {\n var mutationKey = _this.keyForBatchId(batchID);\n promises.push(mutationsStore(transaction)\n .get(mutationKey)\n .next(function (mutation) {\n if (mutation === null) {\n fail('Dangling document-mutation reference found, ' +\n 'which points to ' +\n mutationKey);\n }\n results.push(_this.serializer.fromDbMutationBatch(mutation));\n }));\n });\n return PersistencePromise.waitFor(promises).next(function () { return results; });\n });\n };\n IndexedDbMutationQueue.prototype.removeMutationBatches = function (transaction, batches) {\n var txn = mutationsStore(transaction);\n var indexTxn = documentMutationsStore(transaction);\n var promises = [];\n var _loop_1 = function (batch) {\n var range = IDBKeyRange.only(this_1.keyForBatchId(batch.batchId));\n var numDeleted = 0;\n var removePromise = txn.iterate({ range: range }, function (key, value, control) {\n numDeleted++;\n return control.delete();\n });\n promises.push(removePromise.next(function () {\n assert(numDeleted === 1, 'Dangling document-mutation reference found: Missing batch ' +\n batch.batchId);\n }));\n for (var _i = 0, _a = batch.mutations; _i < _a.length; _i++) {\n var mutation = _a[_i];\n var indexKey = DbDocumentMutation.key(this_1.userId, mutation.key.path, batch.batchId);\n promises.push(indexTxn.delete(indexKey));\n if (this_1.garbageCollector !== null) {\n this_1.garbageCollector.addPotentialGarbageKey(mutation.key);\n }\n }\n };\n var this_1 = this;\n for (var _i = 0, batches_1 = batches; _i < batches_1.length; _i++) {\n var batch = batches_1[_i];\n _loop_1(batch);\n }\n return PersistencePromise.waitFor(promises);\n };\n IndexedDbMutationQueue.prototype.performConsistencyCheck = function (txn) {\n var _this = this;\n return this.checkEmpty(txn).next(function (empty) {\n if (!empty) {\n return PersistencePromise.resolve();\n }\n // Verify that there are no entries in the documentMutations index if\n // the queue is empty.\n var startRange = IDBKeyRange.lowerBound(DbDocumentMutation.prefixForUser(_this.userId));\n var danglingMutationReferences = [];\n return documentMutationsStore(txn)\n .iterate({ range: startRange }, function (key, _, control) {\n var userID = key[0];\n if (userID !== _this.userId) {\n control.done();\n return;\n }\n else {\n var path = EncodedResourcePath.decode(key[1]);\n danglingMutationReferences.push(path);\n }\n })\n .next(function () {\n assert(danglingMutationReferences.length === 0, 'Document leak -- detected dangling mutation references when queue is empty. Dangling keys: ' +\n danglingMutationReferences.map(function (p) { return p.canonicalString(); }));\n });\n });\n };\n IndexedDbMutationQueue.prototype.setGarbageCollector = function (gc) {\n this.garbageCollector = gc;\n };\n IndexedDbMutationQueue.prototype.containsKey = function (txn, key) {\n var _this = this;\n var indexKey = DbDocumentMutation.prefixForPath(this.userId, key.path);\n var encodedPath = indexKey[1];\n var startRange = IDBKeyRange.lowerBound(indexKey);\n var containsKey = false;\n return documentMutationsStore(txn)\n .iterate({ range: startRange, keysOnly: true }, function (key, _, control) {\n var userID = key[0], keyPath = key[1], batchID = key[2];\n if (userID === _this.userId && keyPath === encodedPath) {\n containsKey = true;\n }\n control.done();\n })\n .next(function () { return containsKey; });\n };\n /**\n * Creates a [userId, batchId] key for use with the DbMutationQueue object\n * store.\n */\n IndexedDbMutationQueue.prototype.keyForBatchId = function (batchId) {\n return [this.userId, batchId];\n };\n return IndexedDbMutationQueue;\n}());\nexport { IndexedDbMutationQueue };\nfunction validateStreamToken(token) {\n assert(typeof token === 'string', 'Persisting non-string stream token not supported.');\n return token;\n}\n/**\n * Helper to get a typed SimpleDbStore for the mutations object store.\n */\nfunction mutationsStore(txn) {\n return getStore(txn, DbMutationBatch.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction documentMutationsStore(txn) {\n return getStore(txn, DbDocumentMutation.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}\n/**\n * Helper to get a typed SimpleDbStore from a transaction.\n */\nfunction getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}\n\n//# sourceMappingURL=indexeddb_mutation_queue.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/indexeddb_mutation_queue.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { Timestamp } from '../core/timestamp';\nimport { documentKeySet } from '../model/collections';\nimport { DocumentKey } from '../model/document_key';\nimport { assert, fail } from '../util/assert';\nimport { immediateSuccessor } from '../util/misc';\nimport * as EncodedResourcePath from './encoded_resource_path';\nimport { DbTarget, DbTargetDocument, DbTargetGlobal } from './indexeddb_schema';\nimport { PersistencePromise } from './persistence_promise';\nimport { SimpleDbTransaction } from './simple_db';\nvar IndexedDbQueryCache = /** @class */ (function () {\n function IndexedDbQueryCache(serializer) {\n this.serializer = serializer;\n /**\n * The last received snapshot version. We store this seperately from the\n * metadata to avoid the extra conversion to/from DbTimestamp.\n */\n this.lastRemoteSnapshotVersion = SnapshotVersion.MIN;\n /**\n * A cached copy of the metadata for the query cache.\n */\n this.metadata = new DbTargetGlobal(\n /*highestTargetId=*/ 0, \n /*lastListenSequenceNumber=*/ 0, SnapshotVersion.MIN.toTimestamp());\n /** The garbage collector to notify about potential garbage keys. */\n this.garbageCollector = null;\n }\n IndexedDbQueryCache.prototype.start = function (transaction) {\n var _this = this;\n return globalTargetStore(transaction)\n .get(DbTargetGlobal.key)\n .next(function (metadata) {\n if (metadata !== null) {\n _this.metadata = metadata;\n var lastSavedVersion = metadata.lastRemoteSnapshotVersion;\n _this.lastRemoteSnapshotVersion = SnapshotVersion.fromTimestamp(new Timestamp(lastSavedVersion.seconds, lastSavedVersion.nanos));\n }\n return PersistencePromise.resolve();\n });\n };\n IndexedDbQueryCache.prototype.getHighestTargetId = function () {\n return this.metadata.highestTargetId;\n };\n IndexedDbQueryCache.prototype.getLastRemoteSnapshotVersion = function () {\n return this.lastRemoteSnapshotVersion;\n };\n IndexedDbQueryCache.prototype.setLastRemoteSnapshotVersion = function (transaction, snapshotVersion) {\n this.lastRemoteSnapshotVersion = snapshotVersion;\n this.metadata.lastRemoteSnapshotVersion = snapshotVersion.toTimestamp();\n return globalTargetStore(transaction).put(DbTargetGlobal.key, this.metadata);\n };\n IndexedDbQueryCache.prototype.addQueryData = function (transaction, queryData) {\n var _this = this;\n var targetId = queryData.targetId;\n var addedQueryPromise = targetsStore(transaction).put(this.serializer.toDbTarget(queryData));\n if (targetId > this.metadata.highestTargetId) {\n this.metadata.highestTargetId = targetId;\n return addedQueryPromise.next(function () {\n return globalTargetStore(transaction).put(DbTargetGlobal.key, _this.metadata);\n });\n }\n else {\n return addedQueryPromise;\n }\n };\n IndexedDbQueryCache.prototype.removeQueryData = function (transaction, queryData) {\n return this.removeMatchingKeysForTargetId(transaction, queryData.targetId).next(function () {\n targetsStore(transaction).delete(queryData.targetId);\n });\n };\n IndexedDbQueryCache.prototype.getQueryData = function (transaction, query) {\n var _this = this;\n // Iterating by the canonicalId may yield more than one result because\n // canonicalId values are not required to be unique per target. This query\n // depends on the queryTargets index to be efficent.\n var canonicalId = query.canonicalId();\n var range = IDBKeyRange.bound([canonicalId, Number.NEGATIVE_INFINITY], [canonicalId, Number.POSITIVE_INFINITY]);\n var result = null;\n return targetsStore(transaction)\n .iterate({ range: range, index: DbTarget.queryTargetsIndexName }, function (key, value, control) {\n var found = _this.serializer.fromDbTarget(value);\n // After finding a potential match, check that the query is\n // actually equal to the requested query.\n if (query.equals(found.query)) {\n result = found;\n control.done();\n }\n })\n .next(function () { return result; });\n };\n IndexedDbQueryCache.prototype.addMatchingKeys = function (txn, keys, targetId) {\n // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n // Indexeddb.\n var promises = [];\n var store = documentTargetStore(txn);\n keys.forEach(function (key) {\n var path = EncodedResourcePath.encode(key.path);\n promises.push(store.put(new DbTargetDocument(targetId, path)));\n });\n return PersistencePromise.waitFor(promises);\n };\n IndexedDbQueryCache.prototype.removeMatchingKeys = function (txn, keys, targetId) {\n var _this = this;\n // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n // IndexedDb.\n var promises = [];\n var store = documentTargetStore(txn);\n keys.forEach(function (key) {\n var path = EncodedResourcePath.encode(key.path);\n promises.push(store.delete([targetId, path]));\n if (_this.garbageCollector !== null) {\n _this.garbageCollector.addPotentialGarbageKey(key);\n }\n });\n return PersistencePromise.waitFor(promises);\n };\n IndexedDbQueryCache.prototype.removeMatchingKeysForTargetId = function (txn, targetId) {\n var store = documentTargetStore(txn);\n var range = IDBKeyRange.bound([targetId], [targetId + 1], \n /*lowerOpen=*/ false, \n /*upperOpen=*/ true);\n return this.notifyGCForRemovedKeys(txn, range).next(function () {\n return store.delete(range);\n });\n };\n IndexedDbQueryCache.prototype.notifyGCForRemovedKeys = function (txn, range) {\n var _this = this;\n var store = documentTargetStore(txn);\n if (this.garbageCollector !== null && this.garbageCollector.isEager) {\n // In order to generate garbage events properly, we need to read these\n // keys before deleting.\n return store.iterate({ range: range, keysOnly: true }, function (key, _, control) {\n var path = EncodedResourcePath.decode(key[1]);\n var docKey = new DocumentKey(path);\n // Paranoid assertion in case the the collector is set to null\n // during the iteration.\n assert(_this.garbageCollector !== null, 'GarbageCollector for query cache set to null during key removal.');\n _this.garbageCollector.addPotentialGarbageKey(docKey);\n });\n }\n else {\n return PersistencePromise.resolve();\n }\n };\n IndexedDbQueryCache.prototype.getMatchingKeysForTargetId = function (txn, targetId) {\n var promises = [];\n var range = IDBKeyRange.bound([targetId], [targetId + 1], \n /*lowerOpen=*/ false, \n /*upperOpen=*/ true);\n var store = documentTargetStore(txn);\n var result = documentKeySet();\n return store\n .iterate({ range: range, keysOnly: true }, function (key, _, control) {\n var path = EncodedResourcePath.decode(key[1]);\n var docKey = new DocumentKey(path);\n result = result.add(docKey);\n })\n .next(function () { return result; });\n };\n IndexedDbQueryCache.prototype.setGarbageCollector = function (gc) {\n this.garbageCollector = gc;\n };\n IndexedDbQueryCache.prototype.containsKey = function (txn, key) {\n assert(txn !== null, 'Persistence Transaction cannot be null for query cache containsKey');\n var path = EncodedResourcePath.encode(key.path);\n var range = IDBKeyRange.bound([path], [immediateSuccessor(path)], \n /*lowerOpen=*/ false, \n /*upperOpen=*/ true);\n var count = 0;\n return documentTargetStore(txn)\n .iterate({\n index: DbTargetDocument.documentTargetsIndex,\n keysOnly: true,\n range: range\n }, function (key, _, control) {\n count++;\n control.done();\n })\n .next(function () { return count > 0; });\n };\n return IndexedDbQueryCache;\n}());\nexport { IndexedDbQueryCache };\n/**\n * Helper to get a typed SimpleDbStore for the queries object store.\n */\nfunction targetsStore(txn) {\n return getStore(txn, DbTarget.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the target globals object store.\n */\nfunction globalTargetStore(txn) {\n return getStore(txn, DbTargetGlobal.store);\n}\n/**\n * Helper to get a typed SimpleDbStore for the document target object store.\n */\nfunction documentTargetStore(txn) {\n return getStore(txn, DbTargetDocument.store);\n}\n/**\n * Helper to get a typed SimpleDbStore from a transaction.\n */\nfunction getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}\n\n//# sourceMappingURL=indexeddb_query_cache.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/indexeddb_query_cache.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentMap } from '../model/collections';\nimport { Document } from '../model/document';\nimport { fail } from '../util/assert';\nimport { DbRemoteDocument } from './indexeddb_schema';\nimport { SimpleDbTransaction } from './simple_db';\nvar IndexedDbRemoteDocumentCache = /** @class */ (function () {\n function IndexedDbRemoteDocumentCache(serializer) {\n this.serializer = serializer;\n }\n IndexedDbRemoteDocumentCache.prototype.addEntry = function (transaction, maybeDocument) {\n return remoteDocumentsStore(transaction).put(dbKey(maybeDocument.key), this.serializer.toDbRemoteDocument(maybeDocument));\n };\n IndexedDbRemoteDocumentCache.prototype.removeEntry = function (transaction, documentKey) {\n return remoteDocumentsStore(transaction).delete(dbKey(documentKey));\n };\n IndexedDbRemoteDocumentCache.prototype.getEntry = function (transaction, documentKey) {\n var _this = this;\n return remoteDocumentsStore(transaction)\n .get(dbKey(documentKey))\n .next(function (dbRemoteDoc) {\n return dbRemoteDoc\n ? _this.serializer.fromDbRemoteDocument(dbRemoteDoc)\n : null;\n });\n };\n IndexedDbRemoteDocumentCache.prototype.getDocumentsMatchingQuery = function (transaction, query) {\n var _this = this;\n var results = documentMap();\n // Documents are ordered by key, so we can use a prefix scan to narrow down\n // the documents we need to match the query against.\n var startKey = query.path.toArray();\n var range = IDBKeyRange.lowerBound(startKey);\n return remoteDocumentsStore(transaction)\n .iterate({ range: range }, function (key, dbRemoteDoc, control) {\n var maybeDoc = _this.serializer.fromDbRemoteDocument(dbRemoteDoc);\n if (!query.path.isPrefixOf(maybeDoc.key.path)) {\n control.done();\n }\n else if (maybeDoc instanceof Document && query.matches(maybeDoc)) {\n results = results.insert(maybeDoc.key, maybeDoc);\n }\n })\n .next(function () { return results; });\n };\n return IndexedDbRemoteDocumentCache;\n}());\nexport { IndexedDbRemoteDocumentCache };\n/**\n * Helper to get a typed SimpleDbStore for the remoteDocuments object store.\n */\nfunction remoteDocumentsStore(txn) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(DbRemoteDocument.store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}\nfunction dbKey(docKey) {\n return docKey.path.toArray();\n}\n\n//# sourceMappingURL=indexeddb_remote_document_cache.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/indexeddb_remote_document_cache.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { Timestamp } from '../core/timestamp';\nimport { Document, NoDocument } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { MutationBatch } from '../model/mutation_batch';\nimport { assert, fail } from '../util/assert';\nimport { DbMutationBatch, DbNoDocument, DbRemoteDocument, DbTarget, DbTimestamp } from './indexeddb_schema';\nimport { QueryData, QueryPurpose } from './query_data';\n/** Serializer for values stored in the LocalStore. */\nvar LocalSerializer = /** @class */ (function () {\n function LocalSerializer(remoteSerializer) {\n this.remoteSerializer = remoteSerializer;\n }\n /** Decodes a remote document from storage locally to a Document. */\n LocalSerializer.prototype.fromDbRemoteDocument = function (remoteDoc) {\n if (remoteDoc.document) {\n return this.remoteSerializer.fromDocument(remoteDoc.document);\n }\n else if (remoteDoc.noDocument) {\n var key = DocumentKey.fromSegments(remoteDoc.noDocument.path);\n var readTime = remoteDoc.noDocument.readTime;\n var timestamp = new Timestamp(readTime.seconds, readTime.nanos);\n return new NoDocument(key, SnapshotVersion.fromTimestamp(timestamp));\n }\n else {\n return fail('Unexpected DbRemoteDocument');\n }\n };\n /** Encodes a document for storage locally. */\n LocalSerializer.prototype.toDbRemoteDocument = function (maybeDoc) {\n if (maybeDoc instanceof Document) {\n var doc = this.remoteSerializer.toDocument(maybeDoc);\n return new DbRemoteDocument(null, doc);\n }\n else {\n var path = maybeDoc.key.path.toArray();\n var timestamp = maybeDoc.version.toTimestamp();\n var readTime = new DbTimestamp(timestamp.seconds, timestamp.nanos);\n return new DbRemoteDocument(new DbNoDocument(path, readTime), null);\n }\n };\n /** Encodes a batch of mutations into a DbMutationBatch for local storage. */\n LocalSerializer.prototype.toDbMutationBatch = function (userId, batch) {\n var _this = this;\n var serializedMutations = batch.mutations.map(function (m) {\n return _this.remoteSerializer.toMutation(m);\n });\n return new DbMutationBatch(userId, batch.batchId, batch.localWriteTime.toEpochMilliseconds(), serializedMutations);\n };\n /** Decodes a DbMutationBatch into a MutationBatch */\n LocalSerializer.prototype.fromDbMutationBatch = function (dbBatch) {\n var _this = this;\n var mutations = dbBatch.mutations.map(function (m) {\n return _this.remoteSerializer.fromMutation(m);\n });\n var timestamp = Timestamp.fromEpochMilliseconds(dbBatch.localWriteTimeMs);\n return new MutationBatch(dbBatch.batchId, timestamp, mutations);\n };\n /** Decodes a DbTarget into QueryData */\n LocalSerializer.prototype.fromDbTarget = function (dbTarget) {\n var readTime = new Timestamp(dbTarget.readTime.seconds, dbTarget.readTime.nanos);\n var version = SnapshotVersion.fromTimestamp(readTime);\n var query;\n if (isDocumentQuery(dbTarget.query)) {\n query = this.remoteSerializer.fromDocumentsTarget(dbTarget.query);\n }\n else {\n query = this.remoteSerializer.fromQueryTarget(dbTarget.query);\n }\n return new QueryData(query, dbTarget.targetId, QueryPurpose.Listen, version, dbTarget.resumeToken);\n };\n /** Encodes QueryData into a DbTarget for storage locally. */\n LocalSerializer.prototype.toDbTarget = function (queryData) {\n assert(QueryPurpose.Listen === queryData.purpose, 'Only queries with purpose ' +\n QueryPurpose.Listen +\n ' may be stored, got ' +\n queryData.purpose);\n var timestamp = queryData.snapshotVersion.toTimestamp();\n var dbTimestamp = new DbTimestamp(timestamp.seconds, timestamp.nanos);\n var queryProto;\n if (queryData.query.isDocumentQuery()) {\n queryProto = this.remoteSerializer.toDocumentsTarget(queryData.query);\n }\n else {\n queryProto = this.remoteSerializer.toQueryTarget(queryData.query);\n }\n assert(typeof queryData.resumeToken === 'string', 'Persisting non-string resume token not supported.');\n var resumeToken = queryData.resumeToken;\n // lastListenSequenceNumber is always 0 until we do real GC.\n return new DbTarget(queryData.targetId, queryData.query.canonicalId(), dbTimestamp, resumeToken, 0, queryProto);\n };\n return LocalSerializer;\n}());\nexport { LocalSerializer };\n/**\n * A helper function for figuring out what kind of query has been stored.\n */\nfunction isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}\n\n//# sourceMappingURL=local_serializer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/local_serializer.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { User } from '../auth/user';\nimport { assert, fail } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nvar OAuthToken = /** @class */ (function () {\n function OAuthToken(value, user) {\n this.user = user;\n this.type = 'OAuth';\n this.authHeaders = { Authorization: \"Bearer \" + value };\n }\n return OAuthToken;\n}());\nexport { OAuthToken };\n/** A CredentialsProvider that always yields an empty token. */\nvar EmptyCredentialsProvider = /** @class */ (function () {\n function EmptyCredentialsProvider() {\n /**\n * Stores the User listener registered with setUserChangeListener()\n * This isn't actually necessary since the UID never changes, but we use this\n * to verify the listen contract is adhered to in tests.\n */\n this.userListener = null;\n }\n EmptyCredentialsProvider.prototype.getToken = function (forceRefresh) {\n return Promise.resolve(null);\n };\n EmptyCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n assert(!this.userListener, 'Can only call setUserChangeListener() once.');\n this.userListener = listener;\n // Fire with initial user.\n listener(User.UNAUTHENTICATED);\n };\n EmptyCredentialsProvider.prototype.removeUserChangeListener = function () {\n assert(this.userListener !== null, 'removeUserChangeListener() when no listener registered');\n this.userListener = null;\n };\n return EmptyCredentialsProvider;\n}());\nexport { EmptyCredentialsProvider };\nvar FirebaseCredentialsProvider = /** @class */ (function () {\n function FirebaseCredentialsProvider(app) {\n var _this = this;\n this.app = app;\n /**\n * The auth token listener registered with FirebaseApp, retained here so we\n * can unregister it.\n */\n this.tokenListener = null;\n /**\n * Counter used to detect if the user changed while a getToken request was\n * outstanding.\n */\n this.userCounter = 0;\n /** The User listener registered with setUserChangeListener(). */\n this.userListener = null;\n // We listen for token changes but all we really care about is knowing when\n // the uid may have changed.\n this.tokenListener = function () {\n var newUser = _this.getUser();\n if (!_this.currentUser || !newUser.equals(_this.currentUser)) {\n _this.currentUser = newUser;\n _this.userCounter++;\n if (_this.userListener) {\n _this.userListener(_this.currentUser);\n }\n }\n };\n this.userCounter = 0;\n // Will fire at least once where we set this.currentUser\n this.app.INTERNAL.addAuthTokenListener(this.tokenListener);\n }\n FirebaseCredentialsProvider.prototype.getToken = function (forceRefresh) {\n var _this = this;\n assert(this.tokenListener != null, 'getToken cannot be called after listener removed.');\n // Take note of the current value of the userCounter so that this method can\n // fail (with an ABORTED error) if there is a user change while the request\n // is outstanding.\n var initialUserCounter = this.userCounter;\n return this.app.INTERNAL.getToken(forceRefresh).then(function (tokenData) {\n // Cancel the request since the user changed while the request was\n // outstanding so the response is likely for a previous user (which\n // user, we can't be sure).\n if (_this.userCounter !== initialUserCounter) {\n throw new FirestoreError(Code.ABORTED, 'getToken aborted due to uid change.');\n }\n else {\n if (tokenData) {\n assert(typeof tokenData.accessToken === 'string', 'Invalid tokenData returned from getToken():' + tokenData);\n return new OAuthToken(tokenData.accessToken, _this.currentUser);\n }\n else {\n return null;\n }\n }\n });\n };\n FirebaseCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n assert(!this.userListener, 'Can only call setUserChangeListener() once.');\n this.userListener = listener;\n // Fire the initial event, but only if we received the initial user\n if (this.currentUser) {\n listener(this.currentUser);\n }\n };\n FirebaseCredentialsProvider.prototype.removeUserChangeListener = function () {\n assert(this.tokenListener != null, 'removeUserChangeListener() called twice');\n assert(this.userListener !== null, 'removeUserChangeListener() called when no listener registered');\n this.app.INTERNAL.removeAuthTokenListener(this.tokenListener);\n this.tokenListener = null;\n this.userListener = null;\n };\n FirebaseCredentialsProvider.prototype.getUser = function () {\n // TODO(mikelehen): Remove this check once we're shipping with firebase.js.\n if (typeof this.app.INTERNAL.getUid !== 'function') {\n fail('This version of the Firestore SDK requires at least version' +\n ' 3.7.0 of firebase.js.');\n }\n var currentUid = this.app.INTERNAL.getUid();\n assert(currentUid === null || typeof currentUid === 'string', 'Received invalid UID: ' + currentUid);\n return new User(currentUid);\n };\n return FirebaseCredentialsProvider;\n}());\nexport { FirebaseCredentialsProvider };\n// Wrap a google-auth-library client as a CredentialsProvider.\n// NOTE: grpc-connection can natively accept a google-auth-library\n// client via createFromGoogleCredential(), but we opt to plumb the tokens\n// through our CredentialsProvider interface, at least for now.\nvar GoogleCredentialsProvider = /** @class */ (function () {\n function GoogleCredentialsProvider(authClient) {\n this.authClient = authClient;\n }\n GoogleCredentialsProvider.prototype.getToken = function (forceRefresh) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n // TODO(b/32935141): ideally this would be declared as an extern\n _this.authClient['getAccessToken'](function (error, tokenLiteral) {\n if (error) {\n reject(error);\n }\n else {\n resolve(new OAuthToken(tokenLiteral, User.GOOGLE_CREDENTIALS));\n }\n });\n });\n };\n // NOTE: A google-auth-library client represents an immutable \"user\", so\n // once we fire the initial event, it'll never change.\n GoogleCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n // Fire with initial uid.\n listener(User.GOOGLE_CREDENTIALS);\n };\n GoogleCredentialsProvider.prototype.removeUserChangeListener = function () { };\n return GoogleCredentialsProvider;\n}());\nexport { GoogleCredentialsProvider };\n/*\n * FirstPartyToken provides a fresh token each time its value\n * is requested, because if the token is too old, requests will be rejected.\n * TODO(b/33147818) this implementation violates the current assumption that\n * tokens are immutable. We need to either revisit this assumption or come\n * up with some way for FPA to use the listen/unlisten interface.\n */\nvar FirstPartyToken = /** @class */ (function () {\n function FirstPartyToken(gapi, sessionIndex) {\n this.gapi = gapi;\n this.sessionIndex = sessionIndex;\n this.type = 'FirstParty';\n this.user = User.FIRST_PARTY;\n assert(this.gapi &&\n this.gapi['auth'] &&\n this.gapi['auth']['getAuthHeaderValueForFirstParty'], 'unexpected gapi interface');\n }\n Object.defineProperty(FirstPartyToken.prototype, \"authHeaders\", {\n get: function () {\n return {\n Authorization: this.gapi['auth']['getAuthHeaderValueForFirstParty']([]),\n 'X-Goog-AuthUser': this.sessionIndex\n };\n },\n enumerable: true,\n configurable: true\n });\n return FirstPartyToken;\n}());\nexport { FirstPartyToken };\n/*\n * Provides user credentials required for the Firestore JavaScript SDK\n * to authenticate the user, using technique that is only available\n * to applications hosted by Google.\n */\nvar FirstPartyCredentialsProvider = /** @class */ (function () {\n function FirstPartyCredentialsProvider(gapi, sessionIndex) {\n this.gapi = gapi;\n this.sessionIndex = sessionIndex;\n assert(this.gapi &&\n this.gapi['auth'] &&\n this.gapi['auth']['getAuthHeaderValueForFirstParty'], 'unexpected gapi interface');\n }\n FirstPartyCredentialsProvider.prototype.getToken = function (forceRefresh) {\n return Promise.resolve(new FirstPartyToken(this.gapi, this.sessionIndex));\n };\n // TODO(33108925): can someone switch users w/o a page refresh?\n // TODO(33110621): need to understand token/session lifecycle\n FirstPartyCredentialsProvider.prototype.setUserChangeListener = function (listener) {\n // Fire with initial uid.\n listener(User.FIRST_PARTY);\n };\n FirstPartyCredentialsProvider.prototype.removeUserChangeListener = function () { };\n return FirstPartyCredentialsProvider;\n}());\nexport { FirstPartyCredentialsProvider };\n/**\n * Builds a CredentialsProvider depending on the type of\n * the credentials passed in.\n */\nexport function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'google-auth':\n return new GoogleCredentialsProvider(credentials.client);\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}\n\n//# sourceMappingURL=credentials.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/credentials.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n/**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\nfunction implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n\n//# sourceMappingURL=observer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/observer.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Timestamp } from '../core/timestamp';\nimport { ObjectValue } from '../model/field_value';\nimport { ArrayValue, BlobValue, BooleanValue, DoubleValue, GeoPointValue, IntegerValue, NullValue, RefValue, StringValue, TimestampValue } from '../model/field_value';\nimport { FieldMask, FieldTransform, PatchMutation, ServerTimestampTransform, SetMutation, TransformMutation } from '../model/mutation';\nimport { FieldPath } from '../model/path';\nimport { assert, fail } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nimport { isPlainObject, valueDescription } from '../util/input_validation';\nimport { primitiveComparator } from '../util/misc';\nimport * as objUtils from '../util/obj';\nimport { SortedMap } from '../util/sorted_map';\nimport * as typeUtils from '../util/types';\nimport { Blob } from './blob';\nimport { FieldPath as ExternalFieldPath, fromDotSeparatedString } from './field_path';\nimport { DeleteFieldValueImpl, FieldValueImpl, ServerTimestampFieldValueImpl } from './field_value';\nimport { GeoPoint } from './geo_point';\nvar RESERVED_FIELD_REGEX = /^__.*__$/;\n/** The result of parsing document data (e.g. for a setData call). */\nvar ParsedSetData = /** @class */ (function () {\n function ParsedSetData(data, fieldMask, fieldTransforms) {\n this.data = data;\n this.fieldMask = fieldMask;\n this.fieldTransforms = fieldTransforms;\n }\n ParsedSetData.prototype.toMutations = function (key, precondition) {\n var mutations = [];\n if (this.fieldMask !== null) {\n mutations.push(new PatchMutation(key, this.data, this.fieldMask, precondition));\n }\n else {\n mutations.push(new SetMutation(key, this.data, precondition));\n }\n if (this.fieldTransforms.length > 0) {\n mutations.push(new TransformMutation(key, this.fieldTransforms));\n }\n return mutations;\n };\n return ParsedSetData;\n}());\nexport { ParsedSetData };\n/** The result of parsing \"update\" data (i.e. for an updateData call). */\nvar ParsedUpdateData = /** @class */ (function () {\n function ParsedUpdateData(data, fieldMask, fieldTransforms) {\n this.data = data;\n this.fieldMask = fieldMask;\n this.fieldTransforms = fieldTransforms;\n }\n ParsedUpdateData.prototype.toMutations = function (key, precondition) {\n var mutations = [\n new PatchMutation(key, this.data, this.fieldMask, precondition)\n ];\n if (this.fieldTransforms.length > 0) {\n mutations.push(new TransformMutation(key, this.fieldTransforms));\n }\n return mutations;\n };\n return ParsedUpdateData;\n}());\nexport { ParsedUpdateData };\n/*\n * Represents what type of API method provided the data being parsed; useful\n * for determining which error conditions apply during parsing and providing\n * better error messages.\n */\nvar UserDataSource;\n(function (UserDataSource) {\n UserDataSource[UserDataSource[\"Set\"] = 0] = \"Set\";\n UserDataSource[UserDataSource[\"Update\"] = 1] = \"Update\";\n UserDataSource[UserDataSource[\"MergeSet\"] = 2] = \"MergeSet\";\n UserDataSource[UserDataSource[\"QueryValue\"] = 3] = \"QueryValue\"; // from a where clause or cursor bound\n})(UserDataSource || (UserDataSource = {}));\nfunction isWrite(dataSource) {\n switch (dataSource) {\n case UserDataSource.Set: // fall through\n case UserDataSource.MergeSet: // fall through\n case UserDataSource.Update:\n return true;\n case UserDataSource.QueryValue:\n return false;\n default:\n throw fail(\"Unexpected case for UserDataSource: \" + dataSource);\n }\n}\n/** A \"context\" object passed around while parsing user data. */\nvar ParseContext = /** @class */ (function () {\n /**\n * Initializes a ParseContext with the given source and path.\n *\n * @param dataSource Indicates what kind of API method this data came from.\n * @param methodName The name of the method the user called to create this\n * ParseContext.\n * @param path A path within the object being parsed. This could be an empty\n * path (in which case the context represents the root of the data being\n * parsed), or a nonempty path (indicating the context represents a nested\n * location within the data).\n * @param arrayElement Whether or not this context corresponds to an element\n * of an array.\n * @param fieldTransforms A mutable list of field transforms encountered while\n * parsing the data.\n * @param fieldMask A mutable list of field paths encountered while parsing\n * the data.\n *\n * TODO(b/34871131): We don't support array paths right now, so path can be\n * null to indicate the context represents any location within an array (in\n * which case certain features will not work and errors will be somewhat\n * compromised).\n */\n function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }\n ParseContext.prototype.childContextForField = function (field) {\n var childPath = this.path == null ? null : this.path.child(field);\n var context = new ParseContext(this.dataSource, this.methodName, childPath, \n /*arrayElement=*/ false, this.fieldTransforms, this.fieldMask);\n context.validatePathSegment(field);\n return context;\n };\n ParseContext.prototype.childContextForFieldPath = function (field) {\n var childPath = this.path == null ? null : this.path.child(field);\n var context = new ParseContext(this.dataSource, this.methodName, childPath, \n /*arrayElement=*/ false, this.fieldTransforms, this.fieldMask);\n context.validatePath();\n return context;\n };\n ParseContext.prototype.childContextForArray = function (index) {\n // TODO(b/34871131): We don't support array paths right now; so make path\n // null.\n return new ParseContext(this.dataSource, this.methodName, \n /*path=*/ null, \n /*arrayElement=*/ true, this.fieldTransforms, this.fieldMask);\n };\n ParseContext.prototype.createError = function (reason) {\n var fieldDescription = this.path === null || this.path.isEmpty()\n ? ''\n : \" (found in field \" + this.path.toString() + \")\";\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + this.methodName + \"() called with invalid data. \" +\n reason +\n fieldDescription);\n };\n ParseContext.prototype.validatePath = function () {\n // TODO(b/34871131): Remove null check once we have proper paths for fields\n // within arrays.\n if (this.path === null) {\n return;\n }\n for (var i = 0; i < this.path.length; i++) {\n this.validatePathSegment(this.path.get(i));\n }\n };\n ParseContext.prototype.validatePathSegment = function (segment) {\n if (isWrite(this.dataSource) && RESERVED_FIELD_REGEX.test(segment)) {\n throw this.createError('Document fields cannot begin and end with __');\n }\n };\n ParseContext.prototype.isWrite = function () {\n return (this.dataSource === UserDataSource.Set ||\n this.dataSource === UserDataSource.Update);\n };\n return ParseContext;\n}());\n/**\n * A placeholder object for DocumentReferences in this file, in order to\n * avoid a circular dependency. See the comments for `DataPreConverter` for\n * the full context.\n */\nvar DocumentKeyReference = /** @class */ (function () {\n function DocumentKeyReference(databaseId, key) {\n this.databaseId = databaseId;\n this.key = key;\n }\n return DocumentKeyReference;\n}());\nexport { DocumentKeyReference };\n/**\n * Helper for parsing raw user input (provided via the API) into internal model\n * classes.\n */\nvar UserDataConverter = /** @class */ (function () {\n function UserDataConverter(preConverter) {\n this.preConverter = preConverter;\n }\n /** Parse document data from a non-merge set() call.*/\n UserDataConverter.prototype.parseSetData = function (methodName, input) {\n var context = new ParseContext(UserDataSource.Set, methodName, FieldPath.EMPTY_PATH);\n validatePlainObject('Data must be an object, but it was:', context, input);\n var updateData = this.parseData(input, context);\n return new ParsedSetData(updateData, \n /* fieldMask= */ null, context.fieldTransforms);\n };\n /** Parse document data from a set() call with '{merge:true}'. */\n UserDataConverter.prototype.parseMergeData = function (methodName, input) {\n var context = new ParseContext(UserDataSource.MergeSet, methodName, FieldPath.EMPTY_PATH);\n validatePlainObject('Data must be an object, but it was:', context, input);\n var updateData = this.parseData(input, context);\n var fieldMask = new FieldMask(context.fieldMask);\n return new ParsedSetData(updateData, fieldMask, context.fieldTransforms);\n };\n /** Parse update data from an update() call. */\n UserDataConverter.prototype.parseUpdateData = function (methodName, input) {\n var _this = this;\n var context = new ParseContext(UserDataSource.Update, methodName, FieldPath.EMPTY_PATH);\n validatePlainObject('Data must be an object, but it was:', context, input);\n var fieldMaskPaths = [];\n var updateData = ObjectValue.EMPTY;\n objUtils.forEach(input, function (key, value) {\n var path = fieldPathFromDotSeparatedString(methodName, key);\n var childContext = context.childContextForFieldPath(path);\n value = _this.runPreConverter(value, childContext);\n if (value instanceof DeleteFieldValueImpl) {\n // Add it to the field mask, but don't add anything to updateData.\n fieldMaskPaths.push(path);\n }\n else {\n var parsedValue = _this.parseData(value, childContext);\n if (parsedValue != null) {\n fieldMaskPaths.push(path);\n updateData = updateData.set(path, parsedValue);\n }\n }\n });\n var mask = new FieldMask(fieldMaskPaths);\n return new ParsedUpdateData(updateData, mask, context.fieldTransforms);\n };\n /** Parse update data from a list of field/value arguments. */\n UserDataConverter.prototype.parseUpdateVarargs = function (methodName, field, value, moreFieldsAndValues) {\n var context = new ParseContext(UserDataSource.Update, methodName, FieldPath.EMPTY_PATH);\n var keys = [fieldPathFromArgument(methodName, field)];\n var values = [value];\n if (moreFieldsAndValues.length % 2 !== 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() needs to be called with an even number \" +\n 'of arguments that alternate between field names and values.');\n }\n for (var i = 0; i < moreFieldsAndValues.length; i += 2) {\n keys.push(fieldPathFromArgument(methodName, moreFieldsAndValues[i]));\n values.push(moreFieldsAndValues[i + 1]);\n }\n var fieldMaskPaths = [];\n var updateData = ObjectValue.EMPTY;\n for (var i = 0; i < keys.length; ++i) {\n var path = keys[i];\n var childContext = context.childContextForFieldPath(path);\n var value_1 = this.runPreConverter(values[i], childContext);\n if (value_1 instanceof DeleteFieldValueImpl) {\n // Add it to the field mask, but don't add anything to updateData.\n fieldMaskPaths.push(path);\n }\n else {\n var parsedValue = this.parseData(value_1, childContext);\n if (parsedValue != null) {\n fieldMaskPaths.push(path);\n updateData = updateData.set(path, parsedValue);\n }\n }\n }\n var mask = new FieldMask(fieldMaskPaths);\n return new ParsedUpdateData(updateData, mask, context.fieldTransforms);\n };\n /**\n * Parse a \"query value\" (e.g. value in a where filter or a value in a cursor\n * bound).\n */\n UserDataConverter.prototype.parseQueryValue = function (methodName, input) {\n var context = new ParseContext(UserDataSource.QueryValue, methodName, FieldPath.EMPTY_PATH);\n var parsed = this.parseData(input, context);\n assert(parsed != null, 'Parsed data should not be null.');\n assert(context.fieldTransforms.length === 0, 'Field transforms should have been disallowed.');\n return parsed;\n };\n /** Sends data through this.preConverter, handling any thrown errors. */\n UserDataConverter.prototype.runPreConverter = function (input, context) {\n try {\n return this.preConverter(input);\n }\n catch (e) {\n var message = errorMessage(e);\n throw context.createError(message);\n }\n };\n /**\n * Internal helper for parsing user data.\n *\n * @param input Data to be parsed.\n * @param context A context object representing the current path being parsed,\n * the source of the data being parsed, etc.\n * @return The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */\n UserDataConverter.prototype.parseData = function (input, context) {\n input = this.runPreConverter(input, context);\n if (input instanceof Array) {\n // TODO(b/34871131): Include the path containing the array in the error\n // message.\n if (context.arrayElement) {\n throw context.createError('Nested arrays are not supported');\n }\n // If context.path is null we are already inside an array and we don't\n // support field mask paths more granular than the top-level array.\n if (context.path) {\n context.fieldMask.push(context.path);\n }\n return this.parseArray(input, context);\n }\n else if (looksLikeJsonObject(input)) {\n validatePlainObject('Unsupported field value:', context, input);\n return this.parseObject(input, context);\n }\n else {\n // If context.path is null, we are inside an array and we should have\n // already added the root of the array to the field mask.\n if (context.path) {\n context.fieldMask.push(context.path);\n }\n return this.parseScalarValue(input, context);\n }\n };\n UserDataConverter.prototype.parseArray = function (array, context) {\n var result = [];\n var entryIndex = 0;\n for (var _i = 0, array_1 = array; _i < array_1.length; _i++) {\n var entry = array_1[_i];\n var parsedEntry = this.parseData(entry, context.childContextForArray(entryIndex));\n if (parsedEntry == null) {\n // Just include nulls in the array for fields being replaced with a\n // sentinel.\n parsedEntry = NullValue.INSTANCE;\n }\n result.push(parsedEntry);\n entryIndex++;\n }\n return new ArrayValue(result);\n };\n UserDataConverter.prototype.parseObject = function (obj, context) {\n var _this = this;\n var result = new SortedMap(primitiveComparator);\n objUtils.forEach(obj, function (key, val) {\n var parsedValue = _this.parseData(val, context.childContextForField(key));\n if (parsedValue != null) {\n result = result.insert(key, parsedValue);\n }\n });\n return new ObjectValue(result);\n };\n /**\n * Helper to parse a scalar value (i.e. not an Object or Array)\n *\n * @return The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */\n UserDataConverter.prototype.parseScalarValue = function (value, context) {\n if (value === null) {\n return NullValue.INSTANCE;\n }\n else if (typeof value === 'number') {\n if (typeUtils.isSafeInteger(value)) {\n return new IntegerValue(value);\n }\n else {\n return new DoubleValue(value);\n }\n }\n else if (typeof value === 'boolean') {\n return BooleanValue.of(value);\n }\n else if (typeof value === 'string') {\n return new StringValue(value);\n }\n else if (value instanceof Date) {\n return new TimestampValue(Timestamp.fromDate(value));\n }\n else if (value instanceof GeoPoint) {\n return new GeoPointValue(value);\n }\n else if (value instanceof Blob) {\n return new BlobValue(value);\n }\n else if (value instanceof DocumentKeyReference) {\n return new RefValue(value.databaseId, value.key);\n }\n else if (value instanceof FieldValueImpl) {\n if (value instanceof DeleteFieldValueImpl) {\n if (context.dataSource == UserDataSource.MergeSet) {\n return null;\n }\n else if (context.dataSource === UserDataSource.Update) {\n assert(context.path == null || context.path.length > 0, 'FieldValue.delete() at the top level should have already' +\n ' been handled.');\n throw context.createError('FieldValue.delete() can only appear at the top level ' +\n 'of your update data');\n }\n else {\n // We shouldn't encounter delete sentinels for queries or non-merge set() calls.\n throw context.createError('FieldValue.delete() can only be used with update() and set() with {merge:true}');\n }\n }\n else if (value instanceof ServerTimestampFieldValueImpl) {\n if (!isWrite(context.dataSource)) {\n throw context.createError('FieldValue.serverTimestamp() can only be used with set()' +\n ' and update()');\n }\n if (context.path === null) {\n throw context.createError('FieldValue.serverTimestamp() is not currently' +\n ' supported inside arrays');\n }\n context.fieldTransforms.push(new FieldTransform(context.path, ServerTimestampTransform.instance));\n // Return null so this value is omitted from the parsed result.\n return null;\n }\n else {\n return fail('Unknown FieldValue type: ' + value);\n }\n }\n else {\n throw context.createError(\"Unsupported field value: \" + valueDescription(value));\n }\n };\n return UserDataConverter;\n}());\nexport { UserDataConverter };\n/**\n * Checks whether an object looks like a JSON object that should be converted\n * into a struct. Normal class/prototype instances are considered to look like\n * JSON objects since they should be converted to a struct value. Arrays, Dates,\n * GeoPoints, etc. are not considered to look like JSON objects since they map\n * to specific FieldValue types other than ObjectValue.\n */\nfunction looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof GeoPoint) &&\n !(input instanceof Blob) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof FieldValueImpl));\n}\nfunction validatePlainObject(message, context, input) {\n if (!looksLikeJsonObject(input) || !isPlainObject(input)) {\n var description = valueDescription(input);\n if (description === 'an object') {\n // Massage the error if it was an object.\n throw context.createError(message + ' a custom object');\n }\n else {\n throw context.createError(message + ' ' + description);\n }\n }\n}\n/**\n * Helper that calls fromDotSeparatedString() but wraps any error thrown.\n */\nexport function fieldPathFromArgument(methodName, path) {\n if (path instanceof ExternalFieldPath) {\n return path._internalPath;\n }\n else if (typeof path === 'string') {\n return fieldPathFromDotSeparatedString(methodName, path);\n }\n else {\n var message = 'Field path arguments must be of type string or FieldPath.';\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}\n/**\n * Wraps fromDotSeparatedString with an error message about the method that\n * was thrown.\n * @param methodName The publicly visible method name\n * @param path The dot-separated string form of a field path which will be split\n * on dots.\n */\nfunction fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}\n/**\n * Extracts the message from a caught exception, which should be an Error object\n * though JS doesn't guarantee that.\n */\nfunction errorMessage(error) {\n return error instanceof Error ? error.message : error.toString();\n}\n\n//# sourceMappingURL=user_data_converter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/user_data_converter.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { FieldPath as ExternalFieldPath } from './field_path';\nimport { DatabaseId, DatabaseInfo } from '../core/database_info';\nimport { FirestoreClient } from '../core/firestore_client';\nimport { Bound, Direction, fieldFilter, OrderBy, Query as InternalQuery, RelationFilter, RelationOp } from '../core/query';\nimport { ChangeType } from '../core/view_snapshot';\nimport { NoDocument } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { ArrayValue, ObjectValue, RefValue } from '../model/field_value';\nimport { DeleteMutation, Precondition } from '../model/mutation';\nimport { ResourcePath } from '../model/path';\nimport { PlatformSupport } from '../platform/platform';\nimport { makeConstructorPrivate } from '../util/api';\nimport { assert, fail } from '../util/assert';\nimport { AsyncObserver } from '../util/async_observer';\nimport { AsyncQueue } from '../util/async_queue';\nimport { Code, FirestoreError } from '../util/error';\nimport { invalidClassError, validateArgType, validateAtLeastNumberOfArgs, validateBetweenNumberOfArgs, validateDefined, validateExactNumberOfArgs, validateNamedOptionalType, validateNamedType, validateOptionalArgType, validateOptionNames, valueDescription } from '../util/input_validation';\nimport * as log from '../util/log';\nimport { LogLevel } from '../util/log';\nimport { AutoId } from '../util/misc';\nimport * as objUtils from '../util/obj';\nimport { EmptyCredentialsProvider, FirebaseCredentialsProvider, makeCredentialsProvider } from './credentials';\nimport { isPartialObserver } from './observer';\nimport { DocumentKeyReference, fieldPathFromArgument, UserDataConverter } from './user_data_converter';\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n// tslint:disable:strip-private-property-underscore\nvar DEFAULT_HOST = 'firestore.googleapis.com';\nvar DEFAULT_SSL = true;\n/**\n * A concrete type describing all the values that can be applied via a\n * user-supplied firestore.Settings object. This is a separate type so that\n * defaults can be supplied and the value can be checked for equality.\n */\nvar FirestoreSettings = /** @class */ (function () {\n function FirestoreSettings(settings) {\n if (settings.host === undefined) {\n if (settings.ssl !== undefined) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Can't provide ssl option if host option is not set\");\n }\n this.host = DEFAULT_HOST;\n this.ssl = DEFAULT_SSL;\n }\n else {\n validateNamedType('settings', 'string', 'host', settings.host);\n this.host = settings.host;\n validateNamedOptionalType('settings', 'boolean', 'ssl', settings.ssl);\n this.ssl = objUtils.defaulted(settings.ssl, DEFAULT_SSL);\n }\n validateOptionNames('settings', settings, ['host', 'ssl', 'credentials']);\n validateNamedOptionalType('settings', 'object', 'credentials', settings.credentials);\n this.credentials = settings.credentials;\n }\n FirestoreSettings.prototype.equals = function (other) {\n return (this.host === other.host &&\n this.ssl === other.ssl &&\n this.credentials === other.credentials);\n };\n return FirestoreSettings;\n}());\nvar FirestoreConfig = /** @class */ (function () {\n function FirestoreConfig() {\n }\n return FirestoreConfig;\n}());\n/**\n * The root reference to the database.\n */\nvar Firestore = /** @class */ (function () {\n function Firestore(databaseIdOrApp) {\n var _this = this;\n this.INTERNAL = {\n delete: function () {\n if (_this._firestoreClient) {\n return _this._firestoreClient.shutdown();\n }\n else {\n return Promise.resolve();\n }\n },\n // Exposed via INTERNAL for use in tests.\n disableNetwork: function () { return _this._firestoreClient.disableNetwork(); },\n enableNetwork: function () { return _this._firestoreClient.enableNetwork(); }\n };\n var config = new FirestoreConfig();\n if (typeof databaseIdOrApp.options === 'object') {\n // This is very likely a Firebase app object\n // TODO(b/34177605): Can we somehow use instanceof?\n var app = databaseIdOrApp;\n config.firebaseApp = app;\n config.databaseId = Firestore.databaseIdFromApp(app);\n config.persistenceKey = config.firebaseApp.name;\n config.credentials = new FirebaseCredentialsProvider(app);\n }\n else {\n var external_1 = databaseIdOrApp;\n if (!external_1.projectId) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide projectId');\n }\n config.databaseId = new DatabaseId(external_1.projectId, external_1.database);\n // Use a default persistenceKey that lines up with FirebaseApp.\n config.persistenceKey = '[DEFAULT]';\n config.credentials = new EmptyCredentialsProvider();\n }\n config.settings = new FirestoreSettings({});\n this._config = config;\n this._databaseId = config.databaseId;\n }\n Firestore.prototype.settings = function (settingsLiteral) {\n validateExactNumberOfArgs('Firestore.settings', arguments, 1);\n validateArgType('Firestore.settings', 'object', 1, settingsLiteral);\n if (objUtils.contains(settingsLiteral, 'persistence')) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"persistence\" is now specified with a separate call to ' +\n 'firestore.enablePersistence().');\n }\n var newSettings = new FirestoreSettings(settingsLiteral);\n if (this._firestoreClient && !this._config.settings.equals(newSettings)) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'Firestore has already been started and its settings can no longer ' +\n 'be changed. You can only call settings() before calling any other ' +\n 'methods on a Firestore object.');\n }\n this._config.settings = newSettings;\n if (newSettings.credentials !== undefined) {\n this._config.credentials = makeCredentialsProvider(newSettings.credentials);\n }\n };\n Firestore.prototype.enablePersistence = function () {\n if (this._firestoreClient) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'Firestore has already been started and persistence can no longer ' +\n 'be enabled. You can only call enablePersistence() before calling ' +\n 'any other methods on a Firestore object.');\n }\n return this.configureClient(/* persistence= */ true);\n };\n Firestore.prototype.ensureClientConfigured = function () {\n if (!this._firestoreClient) {\n this.configureClient(/* persistence= */ false);\n }\n return this._firestoreClient;\n };\n Firestore.prototype.configureClient = function (persistence) {\n var _this = this;\n assert(!!this._config.settings.host, 'FirestoreSettings.host cannot be falsey');\n assert(!this._firestoreClient, 'configureClient() called multiple times');\n var databaseInfo = new DatabaseInfo(this._config.databaseId, this._config.persistenceKey, this._config.settings.host, this._config.settings.ssl);\n var preConverter = function (value) {\n if (value instanceof DocumentReference) {\n var thisDb = _this._config.databaseId;\n var otherDb = value.firestore._config.databaseId;\n if (!otherDb.equals(thisDb)) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Document reference is for database ' +\n (otherDb.projectId + \"/\" + otherDb.database + \" but should be \") +\n (\"for database \" + thisDb.projectId + \"/\" + thisDb.database));\n }\n return new DocumentKeyReference(_this._config.databaseId, value._key);\n }\n else {\n return value;\n }\n };\n this._dataConverter = new UserDataConverter(preConverter);\n this._firestoreClient = new FirestoreClient(PlatformSupport.getPlatform(), databaseInfo, this._config.credentials, new AsyncQueue());\n return this._firestoreClient.start(persistence);\n };\n Firestore.databaseIdFromApp = function (app) {\n var options = app.options;\n if (!objUtils.contains(options, 'projectId')) {\n // TODO(b/62673263): We can safely remove the special handling of\n // 'firestoreId' once alpha testers have upgraded.\n if (objUtils.contains(options, 'firestoreId')) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"firestoreId\" is now specified as \"projectId\" in ' +\n 'firebase.initializeApp.');\n }\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"projectId\" not provided in firebase.initializeApp.');\n }\n if (objUtils.contains(options, 'firestoreOptions')) {\n // TODO(b/62673263): We can safely remove the special handling of\n // 'firestoreOptions' once alpha testers have upgraded.\n throw new FirestoreError(Code.INVALID_ARGUMENT, '\"firestoreOptions\" values are now specified with ' +\n 'Firestore.settings()');\n }\n var projectId = options['projectId'];\n if (!projectId || typeof projectId !== 'string') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'projectId must be a string in FirebaseApp.options');\n }\n return new DatabaseId(projectId);\n };\n Object.defineProperty(Firestore.prototype, \"app\", {\n get: function () {\n if (!this._config.firebaseApp) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, \"Firestore was not initialized using the Firebase SDK. 'app' is \" +\n 'not available');\n }\n return this._config.firebaseApp;\n },\n enumerable: true,\n configurable: true\n });\n Firestore.prototype.collection = function (pathString) {\n validateExactNumberOfArgs('Firestore.collection', arguments, 1);\n validateArgType('Firestore.collection', 'string', 1, pathString);\n if (!pathString) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide a non-empty collection path to collection()');\n }\n this.ensureClientConfigured();\n return new CollectionReference(ResourcePath.fromString(pathString), this);\n };\n Firestore.prototype.doc = function (pathString) {\n validateExactNumberOfArgs('Firestore.doc', arguments, 1);\n validateArgType('Firestore.doc', 'string', 1, pathString);\n if (!pathString) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide a non-empty document path to doc()');\n }\n this.ensureClientConfigured();\n return DocumentReference.forPath(ResourcePath.fromString(pathString), this);\n };\n Firestore.prototype.runTransaction = function (updateFunction) {\n var _this = this;\n validateExactNumberOfArgs('Firestore.runTransaction', arguments, 1);\n validateArgType('Firestore.runTransaction', 'function', 1, updateFunction);\n return this.ensureClientConfigured().transaction(function (transaction) {\n return updateFunction(new Transaction(_this, transaction));\n });\n };\n Firestore.prototype.batch = function () {\n this.ensureClientConfigured();\n return new WriteBatch(this);\n };\n Object.defineProperty(Firestore, \"logLevel\", {\n get: function () {\n switch (log.getLogLevel()) {\n case LogLevel.DEBUG:\n return 'debug';\n case LogLevel.ERROR:\n return 'error';\n case LogLevel.SILENT:\n return 'silent';\n default:\n return fail('Unknown log level: ' + log.getLogLevel());\n }\n },\n enumerable: true,\n configurable: true\n });\n Firestore.setLogLevel = function (level) {\n validateExactNumberOfArgs('Firestore.setLogLevel', arguments, 1);\n validateArgType('Firestore.setLogLevel', 'string', 1, level);\n switch (level) {\n case 'debug':\n log.setLogLevel(log.LogLevel.DEBUG);\n break;\n case 'error':\n log.setLogLevel(log.LogLevel.ERROR);\n break;\n case 'silent':\n log.setLogLevel(log.LogLevel.SILENT);\n break;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid log level: ' + level);\n }\n };\n return Firestore;\n}());\nexport { Firestore };\n/**\n * A reference to a transaction.\n */\nvar Transaction = /** @class */ (function () {\n function Transaction(_firestore, _transaction) {\n this._firestore = _firestore;\n this._transaction = _transaction;\n }\n Transaction.prototype.get = function (documentRef) {\n var _this = this;\n validateExactNumberOfArgs('Transaction.get', arguments, 1);\n var ref = validateReference('Transaction.get', documentRef, this._firestore);\n return this._transaction\n .lookup([ref._key])\n .then(function (docs) {\n if (!docs || docs.length !== 1) {\n return fail('Mismatch in docs returned from document lookup.');\n }\n var doc = docs[0];\n if (doc instanceof NoDocument) {\n return new DocumentSnapshot(_this._firestore, ref._key, null, false);\n }\n return new DocumentSnapshot(_this._firestore, ref._key, doc, false);\n });\n };\n Transaction.prototype.set = function (documentRef, value, options) {\n validateBetweenNumberOfArgs('Transaction.set', arguments, 2, 3);\n var ref = validateReference('Transaction.set', documentRef, this._firestore);\n options = validateSetOptions('Transaction.set', options);\n var parsed = options.merge\n ? this._firestore._dataConverter.parseMergeData('Transaction.set', value)\n : this._firestore._dataConverter.parseSetData('Transaction.set', value);\n this._transaction.set(ref._key, parsed);\n return this;\n };\n Transaction.prototype.update = function (documentRef, fieldOrUpdateData, value) {\n var moreFieldsAndValues = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n moreFieldsAndValues[_i - 3] = arguments[_i];\n }\n var ref;\n var parsed;\n if (typeof fieldOrUpdateData === 'string' ||\n fieldOrUpdateData instanceof ExternalFieldPath) {\n validateAtLeastNumberOfArgs('Transaction.update', arguments, 3);\n ref = validateReference('Transaction.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateVarargs('Transaction.update', fieldOrUpdateData, value, moreFieldsAndValues);\n }\n else {\n validateExactNumberOfArgs('Transaction.update', arguments, 2);\n ref = validateReference('Transaction.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateData('Transaction.update', fieldOrUpdateData);\n }\n this._transaction.update(ref._key, parsed);\n return this;\n };\n Transaction.prototype.delete = function (documentRef) {\n validateExactNumberOfArgs('Transaction.delete', arguments, 1);\n var ref = validateReference('Transaction.delete', documentRef, this._firestore);\n this._transaction.delete(ref._key);\n return this;\n };\n return Transaction;\n}());\nexport { Transaction };\nvar WriteBatch = /** @class */ (function () {\n function WriteBatch(_firestore) {\n this._firestore = _firestore;\n this._mutations = [];\n this._committed = false;\n }\n WriteBatch.prototype.set = function (documentRef, value, options) {\n validateBetweenNumberOfArgs('WriteBatch.set', arguments, 2, 3);\n this.verifyNotCommitted();\n var ref = validateReference('WriteBatch.set', documentRef, this._firestore);\n options = validateSetOptions('WriteBatch.set', options);\n var parsed = options.merge\n ? this._firestore._dataConverter.parseMergeData('WriteBatch.set', value)\n : this._firestore._dataConverter.parseSetData('WriteBatch.set', value);\n this._mutations = this._mutations.concat(parsed.toMutations(ref._key, Precondition.NONE));\n return this;\n };\n WriteBatch.prototype.update = function (documentRef, fieldOrUpdateData, value) {\n var moreFieldsAndValues = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n moreFieldsAndValues[_i - 3] = arguments[_i];\n }\n this.verifyNotCommitted();\n var ref;\n var parsed;\n if (typeof fieldOrUpdateData === 'string' ||\n fieldOrUpdateData instanceof ExternalFieldPath) {\n validateAtLeastNumberOfArgs('WriteBatch.update', arguments, 3);\n ref = validateReference('WriteBatch.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateVarargs('WriteBatch.update', fieldOrUpdateData, value, moreFieldsAndValues);\n }\n else {\n validateExactNumberOfArgs('WriteBatch.update', arguments, 2);\n ref = validateReference('WriteBatch.update', documentRef, this._firestore);\n parsed = this._firestore._dataConverter.parseUpdateData('WriteBatch.update', fieldOrUpdateData);\n }\n this._mutations = this._mutations.concat(parsed.toMutations(ref._key, Precondition.exists(true)));\n return this;\n };\n WriteBatch.prototype.delete = function (documentRef) {\n validateExactNumberOfArgs('WriteBatch.delete', arguments, 1);\n this.verifyNotCommitted();\n var ref = validateReference('WriteBatch.delete', documentRef, this._firestore);\n this._mutations = this._mutations.concat(new DeleteMutation(ref._key, Precondition.NONE));\n return this;\n };\n WriteBatch.prototype.commit = function () {\n this.verifyNotCommitted();\n this._committed = true;\n if (this._mutations.length > 0) {\n return this._firestore.ensureClientConfigured().write(this._mutations);\n }\n else {\n return Promise.resolve();\n }\n };\n WriteBatch.prototype.verifyNotCommitted = function () {\n if (this._committed) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'A write batch can no longer be used after commit() ' +\n 'has been called.');\n }\n };\n return WriteBatch;\n}());\nexport { WriteBatch };\n/**\n * A reference to a particular document in a collection in the database.\n */\nvar DocumentReference = /** @class */ (function () {\n function DocumentReference(_key, firestore) {\n this._key = _key;\n this.firestore = firestore;\n this._firestoreClient = this.firestore.ensureClientConfigured();\n }\n DocumentReference.forPath = function (path, firestore) {\n if (path.length % 2 !== 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid document reference. Document ' +\n 'references must have an even number of segments, but ' +\n (path.canonicalString() + \" has \" + path.length));\n }\n return new DocumentReference(new DocumentKey(path), firestore);\n };\n Object.defineProperty(DocumentReference.prototype, \"id\", {\n get: function () {\n return this._key.path.lastSegment();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentReference.prototype, \"parent\", {\n get: function () {\n return new CollectionReference(this._key.path.popLast(), this.firestore);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentReference.prototype, \"path\", {\n get: function () {\n return this._key.path.canonicalString();\n },\n enumerable: true,\n configurable: true\n });\n DocumentReference.prototype.collection = function (pathString) {\n validateExactNumberOfArgs('DocumentReference.collection', arguments, 1);\n validateArgType('DocumentReference.collection', 'string', 1, pathString);\n if (!pathString) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Must provide a non-empty collection name to collection()');\n }\n var path = ResourcePath.fromString(pathString);\n return new CollectionReference(this._key.path.child(path), this.firestore);\n };\n DocumentReference.prototype.isEqual = function (other) {\n if (!(other instanceof DocumentReference)) {\n throw invalidClassError('isEqual', 'DocumentReference', 1, other);\n }\n return this.firestore === other.firestore && this._key.equals(other._key);\n };\n DocumentReference.prototype.set = function (value, options) {\n validateBetweenNumberOfArgs('DocumentReference.set', arguments, 1, 2);\n options = validateSetOptions('DocumentReference.set', options);\n var parsed = options.merge\n ? this.firestore._dataConverter.parseMergeData('DocumentReference.set', value)\n : this.firestore._dataConverter.parseSetData('DocumentReference.set', value);\n return this._firestoreClient.write(parsed.toMutations(this._key, Precondition.NONE));\n };\n DocumentReference.prototype.update = function (fieldOrUpdateData, value) {\n var moreFieldsAndValues = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n moreFieldsAndValues[_i - 2] = arguments[_i];\n }\n var parsed;\n if (typeof fieldOrUpdateData === 'string' ||\n fieldOrUpdateData instanceof ExternalFieldPath) {\n validateAtLeastNumberOfArgs('DocumentReference.update', arguments, 2);\n parsed = this.firestore._dataConverter.parseUpdateVarargs('DocumentReference.update', fieldOrUpdateData, value, moreFieldsAndValues);\n }\n else {\n validateExactNumberOfArgs('DocumentReference.update', arguments, 1);\n parsed = this.firestore._dataConverter.parseUpdateData('DocumentReference.update', fieldOrUpdateData);\n }\n return this._firestoreClient.write(parsed.toMutations(this._key, Precondition.exists(true)));\n };\n DocumentReference.prototype.delete = function () {\n validateExactNumberOfArgs('DocumentReference.delete', arguments, 0);\n return this._firestoreClient.write([\n new DeleteMutation(this._key, Precondition.NONE)\n ]);\n };\n DocumentReference.prototype.onSnapshot = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n validateBetweenNumberOfArgs('DocumentReference.onSnapshot', arguments, 1, 4);\n var options = {\n includeMetadataChanges: false\n };\n var observer;\n var currArg = 0;\n if (typeof args[currArg] === 'object' &&\n !isPartialObserver(args[currArg])) {\n options = args[currArg];\n validateOptionNames('DocumentReference.onSnapshot', options, [\n 'includeMetadataChanges'\n ]);\n validateNamedOptionalType('DocumentReference.onSnapshot', 'boolean', 'includeMetadataChanges', options.includeMetadataChanges);\n currArg++;\n }\n var internalOptions = {\n includeDocumentMetadataChanges: options.includeMetadataChanges,\n includeQueryMetadataChanges: options.includeMetadataChanges\n };\n if (isPartialObserver(args[currArg])) {\n observer = args[currArg];\n }\n else {\n validateArgType('DocumentReference.onSnapshot', 'function', currArg, args[currArg]);\n validateOptionalArgType('DocumentReference.onSnapshot', 'function', currArg + 1, args[currArg + 1]);\n validateOptionalArgType('DocumentReference.onSnapshot', 'function', currArg + 2, args[currArg + 2]);\n observer = {\n next: args[currArg],\n error: args[currArg + 1],\n complete: args[currArg + 2]\n };\n }\n return this.onSnapshotInternal(internalOptions, observer);\n };\n DocumentReference.prototype.onSnapshotInternal = function (options, observer) {\n var _this = this;\n var errHandler = function (err) {\n console.error('Uncaught Error in onSnapshot:', err);\n };\n if (observer.error) {\n errHandler = observer.error.bind(observer);\n }\n var asyncObserver = new AsyncObserver({\n next: function (snapshot) {\n if (observer.next) {\n assert(snapshot.docs.size <= 1, 'Too many documents returned on a document query');\n var doc = snapshot.docs.get(_this._key);\n observer.next(new DocumentSnapshot(_this.firestore, _this._key, doc, snapshot.fromCache));\n }\n },\n error: errHandler\n });\n var internalListener = this._firestoreClient.listen(InternalQuery.atPath(this._key.path), asyncObserver, options);\n return function () {\n asyncObserver.mute();\n _this._firestoreClient.unlisten(internalListener);\n };\n };\n DocumentReference.prototype.get = function () {\n var _this = this;\n validateExactNumberOfArgs('DocumentReference.get', arguments, 0);\n return new Promise(function (resolve, reject) {\n var unlisten = _this.onSnapshotInternal({\n includeQueryMetadataChanges: true,\n includeDocumentMetadataChanges: true,\n waitForSyncWhenOnline: true\n }, {\n next: function (snap) {\n // Remove query first before passing event to user to avoid\n // user actions affecting the now stale query.\n unlisten();\n if (!snap.exists && snap.metadata.fromCache) {\n // TODO(dimond): If we're online and the document doesn't\n // exist then we resolve with a doc.exists set to false. If\n // we're offline however, we reject the Promise in this\n // case. Two options: 1) Cache the negative response from\n // the server so we can deliver that even when you're\n // offline 2) Actually reject the Promise in the online case\n // if the document doesn't exist.\n reject(new FirestoreError(Code.ABORTED, 'Failed to get document because the client is ' + 'offline.'));\n }\n else {\n resolve(snap);\n }\n },\n error: reject\n });\n });\n };\n return DocumentReference;\n}());\nexport { DocumentReference };\nvar DocumentSnapshot = /** @class */ (function () {\n function DocumentSnapshot(_firestore, _key, _document, _fromCache) {\n this._firestore = _firestore;\n this._key = _key;\n this._document = _document;\n this._fromCache = _fromCache;\n }\n DocumentSnapshot.prototype.data = function () {\n validateExactNumberOfArgs('DocumentSnapshot.data', arguments, 0);\n if (!this._document) {\n throw new FirestoreError(Code.NOT_FOUND, \"This document doesn't exist. Check doc.exists to make sure \" +\n 'the document exists before calling doc.data().');\n }\n return this.convertObject(this._document.data);\n };\n DocumentSnapshot.prototype.get = function (fieldPath) {\n validateExactNumberOfArgs('DocumentSnapshot.get', arguments, 1);\n if (!this._document) {\n throw new FirestoreError(Code.NOT_FOUND, \"This document doesn't exist. Check doc.exists to make sure \" +\n 'the document exists before calling doc.get().');\n }\n var value = this._document.data.field(fieldPathFromArgument('DocumentSnapshot.get', fieldPath));\n return value === undefined ? undefined : this.convertValue(value);\n };\n Object.defineProperty(DocumentSnapshot.prototype, \"id\", {\n get: function () {\n return this._key.path.lastSegment();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentSnapshot.prototype, \"ref\", {\n get: function () {\n return new DocumentReference(this._key, this._firestore);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentSnapshot.prototype, \"exists\", {\n get: function () {\n return this._document !== null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DocumentSnapshot.prototype, \"metadata\", {\n get: function () {\n return {\n hasPendingWrites: this._document !== null && this._document.hasLocalMutations,\n fromCache: this._fromCache\n };\n },\n enumerable: true,\n configurable: true\n });\n DocumentSnapshot.prototype.convertObject = function (data) {\n var _this = this;\n var result = {};\n data.forEach(function (key, value) {\n result[key] = _this.convertValue(value);\n });\n return result;\n };\n DocumentSnapshot.prototype.convertValue = function (value) {\n if (value instanceof ObjectValue) {\n return this.convertObject(value);\n }\n else if (value instanceof ArrayValue) {\n return this.convertArray(value);\n }\n else if (value instanceof RefValue) {\n var key = value.value();\n var database = this._firestore.ensureClientConfigured().databaseId();\n if (!value.databaseId.equals(database)) {\n // TODO(b/64130202): Somehow support foreign references.\n log.error(\"Document \" + this._key.path + \" contains a document \" +\n \"reference within a different database (\" +\n (value.databaseId.projectId + \"/\" + value.databaseId\n .database + \") which is not \") +\n \"supported. It will be treated as a reference in the current \" +\n (\"database (\" + database.projectId + \"/\" + database.database + \") \") +\n \"instead.\");\n }\n return new DocumentReference(key, this._firestore);\n }\n else {\n return value.value();\n }\n };\n DocumentSnapshot.prototype.convertArray = function (data) {\n var _this = this;\n return data.internalValue.map(function (value) {\n return _this.convertValue(value);\n });\n };\n return DocumentSnapshot;\n}());\nexport { DocumentSnapshot };\nvar Query = /** @class */ (function () {\n function Query(_query, firestore) {\n this._query = _query;\n this.firestore = firestore;\n }\n Query.prototype.where = function (field, opStr, value) {\n validateExactNumberOfArgs('Query.where', arguments, 3);\n validateArgType('Query.where', 'string', 2, opStr);\n validateDefined('Query.where', 3, value);\n var fieldValue;\n var fieldPath = fieldPathFromArgument('Query.where', field);\n if (fieldPath.isKeyField()) {\n if (typeof value === 'string') {\n if (value.indexOf('/') !== -1) {\n // TODO(dimond): Allow slashes once ancestor queries are supported\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Function Query.where() requires its third parameter to be a ' +\n 'valid document ID if the first parameter is ' +\n 'FieldPath.documentId(), but it contains a slash.');\n }\n if (value === '') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Function Query.where() requires its third parameter to be a ' +\n 'valid document ID if the first parameter is ' +\n 'FieldPath.documentId(), but it was an empty string.');\n }\n var path = this._query.path.child(new ResourcePath([value]));\n assert(path.length % 2 === 0, 'Path should be a document key');\n fieldValue = new RefValue(this.firestore._databaseId, new DocumentKey(path));\n }\n else if (value instanceof DocumentReference) {\n var ref = value;\n fieldValue = new RefValue(this.firestore._databaseId, ref._key);\n }\n else {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function Query.where() requires its third parameter to be a \" +\n \"string or a DocumentReference if the first parameter is \" +\n \"FieldPath.documentId(), but it was: \" +\n (valueDescription(value) + \".\"));\n }\n }\n else {\n fieldValue = this.firestore._dataConverter.parseQueryValue('Query.where', value);\n }\n var filter = fieldFilter(fieldPath, RelationOp.fromString(opStr), fieldValue);\n this.validateNewFilter(filter);\n return new Query(this._query.addFilter(filter), this.firestore);\n };\n Query.prototype.orderBy = function (field, directionStr) {\n validateBetweenNumberOfArgs('Query.orderBy', arguments, 1, 2);\n validateOptionalArgType('Query.orderBy', 'string', 2, directionStr);\n var direction;\n if (directionStr === undefined || directionStr === 'asc') {\n direction = Direction.ASCENDING;\n }\n else if (directionStr === 'desc') {\n direction = Direction.DESCENDING;\n }\n else {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function Query.orderBy() has unknown direction '\" + directionStr + \"', \" +\n \"expected 'asc' or 'desc'.\");\n }\n if (this._query.startAt !== null) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You must not call Query.startAt() or ' +\n 'Query.startAfter() before calling Query.orderBy().');\n }\n if (this._query.endAt !== null) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. You must not call Query.endAt() or ' +\n 'Query.endBefore() before calling Query.orderBy().');\n }\n var fieldPath = fieldPathFromArgument('Query.orderBy', field);\n var orderBy = new OrderBy(fieldPath, direction);\n this.validateNewOrderBy(orderBy);\n return new Query(this._query.addOrderBy(orderBy), this.firestore);\n };\n Query.prototype.limit = function (n) {\n validateExactNumberOfArgs('Query.limit', arguments, 1);\n validateArgType('Query.limit', 'number', 1, n);\n if (n <= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid Query. Query limit (\" + n + \") is invalid. Limit must be \" +\n 'positive.');\n }\n return new Query(this._query.withLimit(n), this.firestore);\n };\n Query.prototype.startAt = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.startAt', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.startAt', docOrField, fields, \n /*before=*/ true);\n return new Query(this._query.withStartAt(bound), this.firestore);\n };\n Query.prototype.startAfter = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.startAfter', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.startAfter', docOrField, fields, \n /*before=*/ false);\n return new Query(this._query.withStartAt(bound), this.firestore);\n };\n Query.prototype.endBefore = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.endBefore', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.endBefore', docOrField, fields, \n /*before=*/ true);\n return new Query(this._query.withEndAt(bound), this.firestore);\n };\n Query.prototype.endAt = function (docOrField) {\n var fields = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n fields[_i - 1] = arguments[_i];\n }\n validateAtLeastNumberOfArgs('Query.endAt', arguments, 1);\n var bound = this.boundFromDocOrFields('Query.endAt', docOrField, fields, \n /*before=*/ false);\n return new Query(this._query.withEndAt(bound), this.firestore);\n };\n Query.prototype.isEqual = function (other) {\n if (!(other instanceof Query)) {\n throw invalidClassError('isEqual', 'Query', 1, other);\n }\n return (this.firestore === other.firestore && this._query.equals(other._query));\n };\n /** Helper function to create a bound from a document or fields */\n Query.prototype.boundFromDocOrFields = function (methodName, docOrField, fields, before) {\n validateDefined(methodName, 1, docOrField);\n if (docOrField instanceof DocumentSnapshot) {\n if (fields.length > 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Too many arguments provided to \" + methodName + \"().\");\n }\n var snap = docOrField;\n if (!snap.exists) {\n throw new FirestoreError(Code.NOT_FOUND, \"Can't use a DocumentSnapshot that doesn't exist for \" +\n (methodName + \"().\"));\n }\n return this.boundFromDocument(methodName, snap._document, before);\n }\n else {\n var allFields = [docOrField].concat(fields);\n return this.boundFromFields(methodName, allFields, before);\n }\n };\n /**\n * Create a Bound from a query and a document.\n *\n * Note that the Bound will always include the key of the document\n * and so only the provided document will compare equal to the returned\n * position.\n *\n * Will throw if the document does not contain all fields of the order by\n * of the query.\n */\n Query.prototype.boundFromDocument = function (methodName, doc, before) {\n var components = [];\n // Because people expect to continue/end a query at the exact document\n // provided, we need to use the implicit sort order rather than the explicit\n // sort order, because it's guaranteed to contain the document key. That way\n // the position becomes unambiguous and the query continues/ends exactly at\n // the provided document. Without the key (by using the explicit sort\n // orders), multiple documents could match the position, yielding duplicate\n // results.\n for (var _i = 0, _a = this._query.orderBy; _i < _a.length; _i++) {\n var orderBy = _a[_i];\n if (orderBy.field.isKeyField()) {\n components.push(new RefValue(this.firestore._databaseId, doc.key));\n }\n else {\n var value = doc.field(orderBy.field);\n if (value !== undefined) {\n components.push(value);\n }\n else {\n var field = orderBy.field.canonicalString();\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. You are trying to start or end a query using a \" +\n (\"document for which the field '\" + field + \"' (used as the \") +\n \"orderBy) does not exist.\");\n }\n }\n }\n return new Bound(components, before);\n };\n /**\n * Converts a list of field values to a Bound for the given query.\n */\n Query.prototype.boundFromFields = function (methodName, values, before) {\n // Use explicit order by's because it has to match the query the user made\n var orderBy = this._query.explicitOrderBy;\n if (values.length > orderBy.length) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Too many arguments provided to \" + methodName + \"(). \" +\n \"The number of arguments must be less than or equal to the \" +\n \"number of Query.orderBy() clauses\");\n }\n var components = [];\n for (var i = 0; i < values.length; i++) {\n var rawValue = values[i];\n var orderByComponent = orderBy[i];\n if (orderByComponent.field.isKeyField()) {\n if (typeof rawValue !== 'string') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. Expected a string for document ID in \" +\n (methodName + \"(), but got a \" + typeof rawValue));\n }\n if (rawValue.indexOf('/') !== -1) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. Document ID '\" + rawValue + \"' contains a slash in \" +\n (methodName + \"()\"));\n }\n var key = new DocumentKey(this._query.path.child(rawValue));\n components.push(new RefValue(this.firestore._databaseId, key));\n }\n else {\n var wrapped = this.firestore._dataConverter.parseQueryValue(methodName, rawValue);\n components.push(wrapped);\n }\n }\n return new Bound(components, before);\n };\n Query.prototype.onSnapshot = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n validateBetweenNumberOfArgs('Query.onSnapshot', arguments, 1, 4);\n var options = {};\n var observer;\n var currArg = 0;\n if (typeof args[currArg] === 'object' &&\n !isPartialObserver(args[currArg])) {\n options = args[currArg];\n validateOptionNames('Query.onSnapshot', options, [\n 'includeQueryMetadataChanges',\n 'includeDocumentMetadataChanges'\n ]);\n validateNamedOptionalType('Query.onSnapshot', 'boolean', 'includeDocumentMetadataChanges', options.includeDocumentMetadataChanges);\n validateNamedOptionalType('Query.onSnapshot', 'boolean', 'includeQueryMetadataChanges', options.includeQueryMetadataChanges);\n currArg++;\n }\n if (isPartialObserver(args[currArg])) {\n observer = args[currArg];\n }\n else {\n validateArgType('Query.onSnapshot', 'function', currArg, args[currArg]);\n validateOptionalArgType('Query.onSnapshot', 'function', currArg + 1, args[currArg + 1]);\n validateOptionalArgType('Query.onSnapshot', 'function', currArg + 2, args[currArg + 2]);\n observer = {\n next: args[currArg],\n error: args[currArg + 1],\n complete: args[currArg + 2]\n };\n }\n return this.onSnapshotInternal(options, observer);\n };\n Query.prototype.onSnapshotInternal = function (options, observer) {\n var _this = this;\n var errHandler = function (err) {\n console.error('Uncaught Error in onSnapshot:', err);\n };\n if (observer.error) {\n errHandler = observer.error.bind(observer);\n }\n var asyncObserver = new AsyncObserver({\n next: function (result) {\n if (observer.next) {\n observer.next(new QuerySnapshot(_this.firestore, _this._query, result));\n }\n },\n error: errHandler\n });\n var firestoreClient = this.firestore.ensureClientConfigured();\n var internalListener = firestoreClient.listen(this._query, asyncObserver, options);\n return function () {\n asyncObserver.mute();\n firestoreClient.unlisten(internalListener);\n };\n };\n Query.prototype.get = function () {\n var _this = this;\n validateExactNumberOfArgs('Query.get', arguments, 0);\n return new Promise(function (resolve, reject) {\n var unlisten = _this.onSnapshotInternal({\n includeDocumentMetadataChanges: false,\n includeQueryMetadataChanges: true,\n waitForSyncWhenOnline: true\n }, {\n next: function (result) {\n // Remove query first before passing event to user to avoid\n // user actions affecting the now stale query.\n unlisten();\n resolve(result);\n },\n error: reject\n });\n });\n };\n Query.prototype.validateNewFilter = function (filter) {\n if (filter instanceof RelationFilter && filter.isInequality()) {\n var existingField = this._query.getInequalityFilterField();\n if (existingField !== null && !existingField.equals(filter.field)) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. All where filters with an inequality' +\n ' (<, <=, >, or >=) must be on the same field. But you have' +\n (\" inequality filters on '\" + existingField.toString() + \"'\") +\n (\" and '\" + filter.field.toString() + \"'\"));\n }\n var firstOrderByField = this._query.getFirstOrderByField();\n if (firstOrderByField !== null) {\n this.validateOrderByAndInequalityMatch(filter.field, firstOrderByField);\n }\n }\n };\n Query.prototype.validateNewOrderBy = function (orderBy) {\n if (this._query.getFirstOrderByField() === null) {\n // This is the first order by. It must match any inequality.\n var inequalityField = this._query.getInequalityFilterField();\n if (inequalityField !== null) {\n this.validateOrderByAndInequalityMatch(inequalityField, orderBy.field);\n }\n }\n };\n Query.prototype.validateOrderByAndInequalityMatch = function (inequality, orderBy) {\n if (!orderBy.equals(inequality)) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid query. You have a where filter with an inequality \" +\n (\"(<, <=, >, or >=) on field '\" + inequality.toString() + \"' \") +\n (\"and so you must also use '\" + inequality.toString() + \"' \") +\n \"as your first Query.orderBy(), but your first Query.orderBy() \" +\n (\"is on field '\" + orderBy.toString() + \"' instead.\"));\n }\n };\n return Query;\n}());\nexport { Query };\nvar QuerySnapshot = /** @class */ (function () {\n function QuerySnapshot(_firestore, _originalQuery, _snapshot) {\n this._firestore = _firestore;\n this._originalQuery = _originalQuery;\n this._snapshot = _snapshot;\n this._cachedChanges = null;\n this.metadata = {\n fromCache: _snapshot.fromCache,\n hasPendingWrites: _snapshot.hasPendingWrites\n };\n }\n Object.defineProperty(QuerySnapshot.prototype, \"docs\", {\n get: function () {\n var result = [];\n this.forEach(function (doc) { return result.push(doc); });\n return result;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuerySnapshot.prototype, \"empty\", {\n get: function () {\n return this._snapshot.docs.isEmpty();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuerySnapshot.prototype, \"size\", {\n get: function () {\n return this._snapshot.docs.size;\n },\n enumerable: true,\n configurable: true\n });\n QuerySnapshot.prototype.forEach = function (callback, thisArg) {\n var _this = this;\n validateBetweenNumberOfArgs('QuerySnapshot.forEach', arguments, 1, 2);\n validateArgType('QuerySnapshot.forEach', 'function', 1, callback);\n this._snapshot.docs.forEach(function (doc) {\n callback.call(thisArg, _this.convertToDocumentImpl(doc));\n });\n };\n Object.defineProperty(QuerySnapshot.prototype, \"query\", {\n get: function () {\n return new Query(this._originalQuery, this._firestore);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QuerySnapshot.prototype, \"docChanges\", {\n get: function () {\n if (!this._cachedChanges) {\n this._cachedChanges = changesFromSnapshot(this._firestore, this._snapshot);\n }\n return this._cachedChanges;\n },\n enumerable: true,\n configurable: true\n });\n QuerySnapshot.prototype.convertToDocumentImpl = function (doc) {\n return new DocumentSnapshot(this._firestore, doc.key, doc, this.metadata.fromCache);\n };\n return QuerySnapshot;\n}());\nexport { QuerySnapshot };\nvar CollectionReference = /** @class */ (function (_super) {\n __extends(CollectionReference, _super);\n function CollectionReference(path, firestore) {\n var _this = _super.call(this, InternalQuery.atPath(path), firestore) || this;\n if (path.length % 2 !== 1) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid collection reference. Collection ' +\n 'references must have an odd number of segments, but ' +\n (path.canonicalString() + \" has \" + path.length));\n }\n return _this;\n }\n Object.defineProperty(CollectionReference.prototype, \"id\", {\n get: function () {\n return this._query.path.lastSegment();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CollectionReference.prototype, \"parent\", {\n get: function () {\n var parentPath = this._query.path.popLast();\n if (parentPath.isEmpty()) {\n return null;\n }\n else {\n return new DocumentReference(new DocumentKey(parentPath), this.firestore);\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CollectionReference.prototype, \"path\", {\n get: function () {\n return this._query.path.canonicalString();\n },\n enumerable: true,\n configurable: true\n });\n CollectionReference.prototype.doc = function (pathString) {\n validateBetweenNumberOfArgs('CollectionReference.doc', arguments, 0, 1);\n // We allow omission of 'pathString' but explicitly prohibit passing in both\n // 'undefined' and 'null'.\n if (arguments.length === 0) {\n pathString = AutoId.newId();\n }\n validateArgType('CollectionReference.doc', 'string', 1, pathString);\n if (pathString === '') {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Document path must be a non-empty string');\n }\n var path = ResourcePath.fromString(pathString);\n return DocumentReference.forPath(this._query.path.child(path), this.firestore);\n };\n CollectionReference.prototype.add = function (value) {\n validateExactNumberOfArgs('CollectionReference.add', arguments, 1);\n validateArgType('CollectionReference.add', 'object', 1, value);\n var docRef = this.doc();\n return docRef.set(value).then(function () { return docRef; });\n };\n return CollectionReference;\n}(Query));\nexport { CollectionReference };\nfunction validateSetOptions(methodName, options) {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n validateOptionNames(methodName, options, ['merge']);\n validateNamedOptionalType(methodName, 'boolean', 'merge', options.merge);\n return options;\n}\nfunction validateReference(methodName, documentRef, firestore) {\n if (!(documentRef instanceof DocumentReference)) {\n throw invalidClassError(methodName, 'DocumentReference', 1, documentRef);\n }\n else if (documentRef.firestore !== firestore) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Provided document reference is from a different Firestore instance.');\n }\n else {\n return documentRef;\n }\n}\n/**\n * Calculates the array of firestore.DocumentChange's for a given ViewSnapshot.\n *\n * Exported for testing.\n */\nexport function changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}\nfunction resultChangeType(type) {\n switch (type) {\n case ChangeType.Added:\n return 'added';\n case ChangeType.Modified:\n case ChangeType.Metadata:\n return 'modified';\n case ChangeType.Removed:\n return 'removed';\n default:\n return fail('Unknown change type: ' + type);\n }\n}\n// Export the classes with a private constructor (it will fail if invoked\n// at runtime). Note that this still allows instanceof checks.\n// We're treating the variables as class names, so disable checking for lower\n// case variable names.\n// tslint:disable:variable-name\nexport var PublicFirestore = makeConstructorPrivate(Firestore, 'Use firebase.firestore() instead.');\nexport var PublicTransaction = makeConstructorPrivate(Transaction, 'Use firebase.firestore().runTransaction() instead.');\nexport var PublicWriteBatch = makeConstructorPrivate(WriteBatch, 'Use firebase.firestore().batch() instead.');\nexport var PublicDocumentReference = makeConstructorPrivate(DocumentReference, 'Use firebase.firestore().doc() instead.');\nexport var PublicDocumentSnapshot = makeConstructorPrivate(DocumentSnapshot);\nexport var PublicQuery = makeConstructorPrivate(Query);\nexport var PublicQuerySnapshot = makeConstructorPrivate(QuerySnapshot);\nexport var PublicCollectionReference = makeConstructorPrivate(CollectionReference, 'Use firebase.firestore().collection() instead.');\n// tslint:enable:variable-name\n\n//# sourceMappingURL=database.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/database.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PublicBlob } from '../api/blob';\nimport { Firestore, PublicCollectionReference, PublicDocumentReference, PublicDocumentSnapshot, PublicFirestore, PublicQuery, PublicQuerySnapshot, PublicTransaction, PublicWriteBatch } from '../api/database';\nimport { FieldPath } from '../api/field_path';\nimport { PublicFieldValue } from '../api/field_value';\nimport { GeoPoint } from '../api/geo_point';\nimport { shallowCopy } from '../util/obj';\nvar firestoreNamespace = {\n Firestore: PublicFirestore,\n GeoPoint: GeoPoint,\n Blob: PublicBlob,\n Transaction: PublicTransaction,\n WriteBatch: PublicWriteBatch,\n DocumentReference: PublicDocumentReference,\n DocumentSnapshot: PublicDocumentSnapshot,\n Query: PublicQuery,\n QuerySnapshot: PublicQuerySnapshot,\n CollectionReference: PublicCollectionReference,\n FieldPath: FieldPath,\n FieldValue: PublicFieldValue,\n setLogLevel: Firestore.setLogLevel\n};\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerService.\n */\nexport function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}\n/**\n * Exports the Firestore namespace into the provided `exportObject` object under\n * the key 'firestore'. This is used for wrapped binary that exposes Firestore\n * as a goog module.\n */\nexport function configureForStandalone(exportObject) {\n var copiedNamespace = shallowCopy(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = Firestore;\n exportObject['firestore'] = copiedNamespace;\n}\n\n//# sourceMappingURL=config.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/platform/config.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport firebase from '@firebase/app';\nimport './src/platform_browser/browser_init';\nimport { configureForFirebase } from './src/platform/config';\nexport function registerFirestore(instance) {\n configureForFirebase(instance);\n}\nregisterFirestore(firebase);\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/index.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport firebase from '@firebase/app';\n/** The semver (www.semver.org) version of the SDK. */\nexport var SDK_VERSION = firebase.SDK_VERSION;\n\n//# sourceMappingURL=version.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/version.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n// TODO(mcg): Change to a string enum once we've upgraded to typescript 2.4.\n// tslint:disable-next-line:variable-name Intended to look like a TS 2.4 enum\nexport var Code = {\n // Causes are copied from:\n // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n /** Not an error; returned on success. */\n OK: 'ok',\n /** The operation was cancelled (typically by the caller). */\n CANCELLED: 'cancelled',\n /** Unknown error or an error from a different error domain. */\n UNKNOWN: 'unknown',\n /**\n * Client specified an invalid argument. Note that this differs from\n * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are\n * problematic regardless of the state of the system (e.g., a malformed file\n * name).\n */\n INVALID_ARGUMENT: 'invalid-argument',\n /**\n * Deadline expired before operation could complete. For operations that\n * change the state of the system, this error may be returned even if the\n * operation has completed successfully. For example, a successful response\n * from a server could have been delayed long enough for the deadline to\n * expire.\n */\n DEADLINE_EXCEEDED: 'deadline-exceeded',\n /** Some requested entity (e.g., file or directory) was not found. */\n NOT_FOUND: 'not-found',\n /**\n * Some entity that we attempted to create (e.g., file or directory) already\n * exists.\n */\n ALREADY_EXISTS: 'already-exists',\n /**\n * The caller does not have permission to execute the specified operation.\n * PERMISSION_DENIED must not be used for rejections caused by exhausting\n * some resource (use RESOURCE_EXHAUSTED instead for those errors).\n * PERMISSION_DENIED must not be used if the caller can not be identified\n * (use UNAUTHENTICATED instead for those errors).\n */\n PERMISSION_DENIED: 'permission-denied',\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n */\n UNAUTHENTICATED: 'unauthenticated',\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or perhaps the\n * entire file system is out of space.\n */\n RESOURCE_EXHAUSTED: 'resource-exhausted',\n /**\n * Operation was rejected because the system is not in a state required for\n * the operation's execution. For example, directory to be deleted may be\n * non-empty, an rmdir operation is applied to a non-directory, etc.\n *\n * A litmus test that may help a service implementor in deciding\n * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:\n * (a) Use UNAVAILABLE if the client can retry just the failing call.\n * (b) Use ABORTED if the client should retry at a higher-level\n * (e.g., restarting a read-modify-write sequence).\n * (c) Use FAILED_PRECONDITION if the client should not retry until\n * the system state has been explicitly fixed. E.g., if an \"rmdir\"\n * fails because the directory is non-empty, FAILED_PRECONDITION\n * should be returned since the client should not retry unless\n * they have first fixed up the directory by deleting files from it.\n * (d) Use FAILED_PRECONDITION if the client performs conditional\n * REST Get/Update/Delete on a resource and the resource on the\n * server does not match the condition. E.g., conflicting\n * read-modify-write on the same resource.\n */\n FAILED_PRECONDITION: 'failed-precondition',\n /**\n * The operation was aborted, typically due to a concurrency issue like\n * sequencer check failures, transaction aborts, etc.\n *\n * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n * and UNAVAILABLE.\n */\n ABORTED: 'aborted',\n /**\n * Operation was attempted past the valid range. E.g., seeking or reading\n * past end of file.\n *\n * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed\n * if the system state changes. For example, a 32-bit file system will\n * generate INVALID_ARGUMENT if asked to read at an offset that is not in the\n * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from\n * an offset past the current file size.\n *\n * There is a fair bit of overlap between FAILED_PRECONDITION and\n * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)\n * when it applies so that callers who are iterating through a space can\n * easily look for an OUT_OF_RANGE error to detect when they are done.\n */\n OUT_OF_RANGE: 'out-of-range',\n /** Operation is not implemented or not supported/enabled in this service. */\n UNIMPLEMENTED: 'unimplemented',\n /**\n * Internal errors. Means some invariants expected by underlying System has\n * been broken. If you see one of these errors, Something is very broken.\n */\n INTERNAL: 'internal',\n /**\n * The service is currently unavailable. This is a most likely a transient\n * condition and may be corrected by retrying with a backoff.\n *\n * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n * and UNAVAILABLE.\n */\n UNAVAILABLE: 'unavailable',\n /** Unrecoverable data loss or corruption. */\n DATA_LOSS: 'data-loss'\n};\n/**\n * An error class used for Firestore-generated errors. Ideally we should be\n * using FirebaseError, but integrating with it is overly arduous at the moment,\n * so we define our own compatible error class (with a `name` of 'FirebaseError'\n * and compatible `code` and `message` fields.)\n */\nvar FirestoreError = /** @class */ (function (_super) {\n __extends(FirestoreError, _super);\n function FirestoreError(code, message) {\n var _this = _super.call(this, message) || this;\n _this.code = code;\n _this.message = message;\n _this.name = 'FirebaseError';\n // HACK: We write a toString property directly because Error is not a real\n // class and so inheritance does not work correctly. We could alternatively\n // do the same \"back-door inheritance\" trick that FirebaseError does.\n _this.toString = function () { return _this.name + \": [code=\" + _this.code + \"]: \" + _this.message; };\n return _this;\n }\n return FirestoreError;\n}(Error));\nexport { FirestoreError };\n\n//# sourceMappingURL=error.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/error.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Code, FirestoreError } from '../util/error';\nimport { validateArgType, validateExactNumberOfArgs } from '../util/input_validation';\nimport { primitiveComparator } from '../util/misc';\n/**\n * Immutable class representing a geo point as latitude-longitude pair.\n * This class is directly exposed in the public API, including its constructor.\n */\nvar GeoPoint = /** @class */ (function () {\n function GeoPoint(latitude, longitude) {\n validateExactNumberOfArgs('GeoPoint', arguments, 2);\n validateArgType('GeoPoint', 'number', 1, latitude);\n validateArgType('GeoPoint', 'number', 2, longitude);\n if (!isFinite(latitude) || latitude < -90 || latitude > 90) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Latitude must be a number between -90 and 90, but was: ' + latitude);\n }\n if (!isFinite(longitude) || longitude < -180 || longitude > 180) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Longitude must be a number between -180 and 180, but was: ' + longitude);\n }\n this._lat = latitude;\n this._long = longitude;\n }\n Object.defineProperty(GeoPoint.prototype, \"latitude\", {\n /**\n * Returns the latitude of this geo point, a number between -90 and 90.\n */\n get: function () {\n return this._lat;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GeoPoint.prototype, \"longitude\", {\n /**\n * Returns the longitude of this geo point, a number between -180 and 180.\n */\n get: function () {\n return this._long;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n GeoPoint.prototype._equals = function (other) {\n return this._lat === other._lat && this._long === other._long;\n };\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n GeoPoint.prototype._compareTo = function (other) {\n return (primitiveComparator(this._lat, other._lat) ||\n primitiveComparator(this._long, other._long));\n };\n return GeoPoint;\n}());\nexport { GeoPoint };\n\n//# sourceMappingURL=geo_point.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/geo_point.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { primitiveComparator } from '../util/misc';\nvar DatabaseInfo = /** @class */ (function () {\n /**\n * Constructs a DatabaseInfo using the provided host, databaseId and\n * persistenceKey.\n *\n * @param databaseId The database to use.\n * @param persistenceKey A unique identifier for this Firestore's local\n * storage (used in conjunction with the databaseId).\n * @param host The Firestore backend host to connect to.\n * @param ssl Whether to use SSL when connecting.\n */\n function DatabaseInfo(databaseId, persistenceKey, host, ssl) {\n this.databaseId = databaseId;\n this.persistenceKey = persistenceKey;\n this.host = host;\n this.ssl = ssl;\n }\n return DatabaseInfo;\n}());\nexport { DatabaseInfo };\n/** The default database name for a project. */\nvar DEFAULT_DATABASE_NAME = '(default)';\n/** Represents the database ID a Firestore client is associated with. */\nvar DatabaseId = /** @class */ (function () {\n function DatabaseId(projectId, database) {\n this.projectId = projectId;\n this.database = database ? database : DEFAULT_DATABASE_NAME;\n }\n Object.defineProperty(DatabaseId.prototype, \"isDefaultDatabase\", {\n get: function () {\n return this.database === DEFAULT_DATABASE_NAME;\n },\n enumerable: true,\n configurable: true\n });\n DatabaseId.prototype.equals = function (other) {\n return (other instanceof DatabaseId &&\n other.projectId === this.projectId &&\n other.database === this.database);\n };\n DatabaseId.prototype.compareTo = function (other) {\n return (primitiveComparator(this.projectId, other.projectId) ||\n primitiveComparator(this.database, other.database));\n };\n return DatabaseId;\n}());\nexport { DatabaseId };\n\n//# sourceMappingURL=database_info.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/database_info.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { assert, fail } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nexport var DOCUMENT_KEY_NAME = '__name__';\n/**\n * Path represents an ordered sequence of string segments.\n */\nvar Path = /** @class */ (function () {\n function Path(segments, offset, length) {\n this.init(segments, offset, length);\n }\n /**\n * An initialization method that can be called from outside the constructor.\n * We need this so that we can have a non-static construct method that returns\n * the polymorphic `this` type.\n */\n Path.prototype.init = function (segments, offset, length) {\n if (offset === undefined) {\n offset = 0;\n }\n else if (offset > segments.length) {\n fail('offset ' + offset + ' out of range ' + segments.length);\n }\n if (length === undefined) {\n length = segments.length - offset;\n }\n else if (length > segments.length - offset) {\n fail('length ' + length + ' out of range ' + (segments.length - offset));\n }\n this.segments = segments;\n this.offset = offset;\n this.len = length;\n };\n /**\n * Constructs a new instance of Path using the same concrete type as `this`.\n * We need this instead of using the normal constructor, because polymorphic\n * `this` doesn't work on static methods.\n */\n Path.prototype.construct = function (segments, offset, length) {\n var path = Object.create(Object.getPrototypeOf(this));\n path.init(segments, offset, length);\n return path;\n };\n Object.defineProperty(Path.prototype, \"length\", {\n get: function () {\n return this.len;\n },\n enumerable: true,\n configurable: true\n });\n Path.prototype.equals = function (other) {\n return Path.comparator(this, other) === 0;\n };\n Path.prototype.child = function (nameOrPath) {\n var segments = this.segments.slice(this.offset, this.limit());\n if (nameOrPath instanceof Path) {\n nameOrPath.forEach(function (segment) {\n segments.push(segment);\n });\n }\n else if (typeof nameOrPath === 'string') {\n segments.push(nameOrPath);\n }\n else {\n fail('Unknown parameter type for Path.child(): ' + nameOrPath);\n }\n return this.construct(segments);\n };\n /** The index of one past the last segment of the path. */\n Path.prototype.limit = function () {\n return this.offset + this.length;\n };\n Path.prototype.popFirst = function (size) {\n size = size === undefined ? 1 : size;\n assert(this.length >= size, \"Can't call popFirst() with less segments\");\n return this.construct(this.segments, this.offset + size, this.length - size);\n };\n Path.prototype.popLast = function () {\n assert(!this.isEmpty(), \"Can't call popLast() on empty path\");\n return this.construct(this.segments, this.offset, this.length - 1);\n };\n Path.prototype.firstSegment = function () {\n assert(!this.isEmpty(), \"Can't call firstSegment() on empty path\");\n return this.segments[this.offset];\n };\n Path.prototype.lastSegment = function () {\n assert(!this.isEmpty(), \"Can't call lastSegment() on empty path\");\n return this.segments[this.limit() - 1];\n };\n Path.prototype.get = function (index) {\n assert(index < this.length, 'Index out of range');\n return this.segments[this.offset + index];\n };\n Path.prototype.isEmpty = function () {\n return this.length === 0;\n };\n Path.prototype.isPrefixOf = function (other) {\n if (other.length < this.length) {\n return false;\n }\n for (var i = 0; i < this.length; i++) {\n if (this.get(i) !== other.get(i)) {\n return false;\n }\n }\n return true;\n };\n Path.prototype.forEach = function (fn) {\n for (var i = this.offset, end = this.limit(); i < end; i++) {\n fn(this.segments[i]);\n }\n };\n Path.prototype.toArray = function () {\n return this.segments.slice(this.offset, this.limit());\n };\n Path.comparator = function (p1, p2) {\n var len = Math.min(p1.length, p2.length);\n for (var i = 0; i < len; i++) {\n var left = p1.get(i);\n var right = p2.get(i);\n if (left < right)\n return -1;\n if (left > right)\n return 1;\n }\n if (p1.length < p2.length)\n return -1;\n if (p1.length > p2.length)\n return 1;\n return 0;\n };\n return Path;\n}());\nexport { Path };\n/**\n * A slash-separated path for navigating resources (documents and collections)\n * within Firestore.\n */\nvar ResourcePath = /** @class */ (function (_super) {\n __extends(ResourcePath, _super);\n function ResourcePath() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ResourcePath.prototype.canonicalString = function () {\n // NOTE: The client is ignorant of any path segments containing escape\n // sequences (e.g. __id123__) and just passes them through raw (they exist\n // for legacy reasons and should not be used frequently).\n return this.toArray().join('/');\n };\n ResourcePath.prototype.toString = function () {\n return this.canonicalString();\n };\n /**\n * Creates a resource path from the given slash-delimited string.\n */\n ResourcePath.fromString = function (path) {\n // NOTE: The client is ignorant of any path segments containing escape\n // sequences (e.g. __id123__) and just passes them through raw (they exist\n // for legacy reasons and should not be used frequently).\n if (path.indexOf('//') >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid path (\" + path + \"). Paths must not contain // in them.\");\n }\n // We may still have an empty segment at the beginning or end if they had a\n // leading or trailing slash (which we allow).\n var segments = path.split('/').filter(function (segment) { return segment.length > 0; });\n return new ResourcePath(segments);\n };\n ResourcePath.EMPTY_PATH = new ResourcePath([]);\n return ResourcePath;\n}(Path));\nexport { ResourcePath };\nvar identifierRegExp = /^[_a-zA-Z][_a-zA-Z0-9]*$/;\n/** A dot-separated path for navigating sub-objects within a document. */\nvar FieldPath = /** @class */ (function (_super) {\n __extends(FieldPath, _super);\n function FieldPath() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Returns true if the string could be used as a segment in a field path\n * without escaping.\n */\n FieldPath.isValidIdentifier = function (segment) {\n return identifierRegExp.test(segment);\n };\n FieldPath.prototype.canonicalString = function () {\n return this.toArray()\n .map(function (str) {\n str = str.replace('\\\\', '\\\\\\\\').replace('`', '\\\\`');\n if (!FieldPath.isValidIdentifier(str)) {\n str = '`' + str + '`';\n }\n return str;\n })\n .join('.');\n };\n FieldPath.prototype.toString = function () {\n return this.canonicalString();\n };\n /**\n * Returns true if this field references the key of a document.\n */\n FieldPath.prototype.isKeyField = function () {\n return this.length === 1 && this.get(0) === DOCUMENT_KEY_NAME;\n };\n /**\n * The field designating the key of a document.\n */\n FieldPath.keyField = function () {\n return new FieldPath([DOCUMENT_KEY_NAME]);\n };\n /**\n * Parses a field string from the given server-formatted string.\n *\n * - Splitting the empty string is not allowed (for now at least).\n * - Empty segments within the string (e.g. if there are two consecutive\n * separators) are not allowed.\n *\n * TODO(b/37244157): we should make this more strict. Right now, it allows\n * non-identifier path components, even if they aren't escaped.\n */\n FieldPath.fromServerFormat = function (path) {\n var segments = [];\n var current = '';\n var i = 0;\n var addCurrentSegment = function () {\n if (current.length === 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, begin \" +\n \"with '.', end with '.', or contain '..'\");\n }\n segments.push(current);\n current = '';\n };\n var inBackticks = false;\n while (i < path.length) {\n var c = path[i];\n if (c === '\\\\') {\n if (i + 1 === path.length) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Path has trailing escape character: ' + path);\n }\n var next = path[i + 1];\n if (!(next === '\\\\' || next === '.' || next === '`')) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Path has invalid escape sequence: ' + path);\n }\n current += next;\n i += 2;\n }\n else if (c === '`') {\n inBackticks = !inBackticks;\n i++;\n }\n else if (c === '.' && !inBackticks) {\n addCurrentSegment();\n i++;\n }\n else {\n current += c;\n i++;\n }\n }\n addCurrentSegment();\n if (inBackticks) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'Unterminated ` in path: ' + path);\n }\n return new FieldPath(segments);\n };\n FieldPath.EMPTY_PATH = new FieldPath([]);\n return FieldPath;\n}(Path));\nexport { FieldPath };\n\n//# sourceMappingURL=path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/path.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { ResourcePath } from './path';\nvar DocumentKey = /** @class */ (function () {\n function DocumentKey(path) {\n this.path = path;\n assert(DocumentKey.isDocumentKey(path), 'Invalid DocumentKey with an odd number of segments: ' +\n path.toArray().join('/'));\n }\n DocumentKey.prototype.equals = function (other) {\n return (other !== null && ResourcePath.comparator(this.path, other.path) === 0);\n };\n DocumentKey.prototype.toString = function () {\n return this.path.toString();\n };\n DocumentKey.comparator = function (k1, k2) {\n return ResourcePath.comparator(k1.path, k2.path);\n };\n DocumentKey.isDocumentKey = function (path) {\n return path.length % 2 === 0;\n };\n /**\n * Creates and returns a new document key with the given segments.\n *\n * @param path The segments of the path to the document\n * @return A new instance of DocumentKey\n */\n DocumentKey.fromSegments = function (segments) {\n return new DocumentKey(new ResourcePath(segments.slice()));\n };\n /**\n * Creates and returns a new document key using '/' to split the string into\n * segments.\n *\n * @param path The slash-separated path string to the document\n * @return A new instance of DocumentKey\n */\n DocumentKey.fromPathString = function (path) {\n return new DocumentKey(ResourcePath.fromString(path));\n };\n DocumentKey.EMPTY = new DocumentKey(new ResourcePath([]));\n return DocumentKey;\n}());\nexport { DocumentKey };\n\n//# sourceMappingURL=document_key.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/document_key.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { fail } from '../util/assert';\nimport { DocumentKey } from './document_key';\nvar Document = /** @class */ (function () {\n function Document(key, version, data, options) {\n this.key = key;\n this.version = version;\n this.data = data;\n this.hasLocalMutations = options.hasLocalMutations;\n }\n Document.prototype.field = function (path) {\n return this.data.field(path);\n };\n Document.prototype.fieldValue = function (path) {\n var field = this.field(path);\n return field ? field.value() : undefined;\n };\n Document.prototype.value = function () {\n return this.data.value();\n };\n Document.prototype.equals = function (other) {\n return (other instanceof Document &&\n this.key.equals(other.key) &&\n this.version.equals(other.version) &&\n this.data.equals(other.data) &&\n this.hasLocalMutations === other.hasLocalMutations);\n };\n Document.prototype.toString = function () {\n return (\"Document(\" + this.key + \", \" + this.version + \", \" + this.data.toString() + \", \" +\n (\"{hasLocalMutations: \" + this.hasLocalMutations + \"})\"));\n };\n Document.compareByKey = function (d1, d2) {\n return DocumentKey.comparator(d1.key, d2.key);\n };\n Document.compareByField = function (field, d1, d2) {\n var v1 = d1.field(field);\n var v2 = d2.field(field);\n if (v1 !== undefined && v2 !== undefined) {\n return v1.compareTo(v2);\n }\n else {\n return fail(\"Trying to compare documents on fields that don't exist\");\n }\n };\n return Document;\n}());\nexport { Document };\n/**\n * A class representing a deleted document.\n * Version is set to 0 if we don't point to any specific time, otherwise it\n * denotes time we know it didn't exist at.\n */\nvar NoDocument = /** @class */ (function () {\n function NoDocument(key, version) {\n this.key = key;\n this.version = version;\n }\n NoDocument.prototype.toString = function () {\n return \"NoDocument(\" + this.key + \", \" + this.version + \")\";\n };\n NoDocument.prototype.equals = function (other) {\n return (other && other.version.equals(this.version) && other.key.equals(this.key));\n };\n NoDocument.compareByKey = function (d1, d2) {\n return DocumentKey.comparator(d1.key, d2.key);\n };\n return NoDocument;\n}());\nexport { NoDocument };\n\n//# sourceMappingURL=document.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/document.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert, fail } from './assert';\n// An immutable sorted map implementation, based on a Left-leaning Red-Black\n// tree.\nvar SortedMap = /** @class */ (function () {\n function SortedMap(comparator, root) {\n this.comparator = comparator;\n this.root = root ? root : LLRBNode.EMPTY;\n }\n // Returns a copy of the map, with the specified key/value added or replaced.\n SortedMap.prototype.insert = function (key, value) {\n return new SortedMap(this.comparator, this.root\n .insert(key, value, this.comparator)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n // Returns a copy of the map, with the specified key removed.\n SortedMap.prototype.remove = function (key) {\n return new SortedMap(this.comparator, this.root\n .remove(key, this.comparator)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n // Returns the value of the node with the given key, or null.\n SortedMap.prototype.get = function (key) {\n var node = this.root;\n while (!node.isEmpty()) {\n var cmp = this.comparator(key, node.key);\n if (cmp === 0) {\n return node.value;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n };\n // Returns the key of the item *before* the specified key, or null if key is\n // the first item.\n SortedMap.prototype.getPredecessorKey = function (key) {\n var node = this.root;\n var rightParent = null;\n while (!node.isEmpty()) {\n var cmp = this.comparator(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty())\n node = node.right;\n return node.key;\n }\n else if (rightParent) {\n return rightParent.key;\n }\n else {\n return null; // first item.\n }\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n throw fail('Attempted to find predecessor key for a nonexistent key.' +\n ' What gives?');\n };\n // Returns the index of the element in this sorted map, or -1 if it doesn't\n // exist.\n SortedMap.prototype.indexOf = function (key) {\n // Number of nodes that were pruned when descending right\n var prunedNodes = 0;\n var node = this.root;\n while (!node.isEmpty()) {\n var cmp = this.comparator(key, node.key);\n if (cmp === 0) {\n return prunedNodes + node.left.size;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else {\n // Count all nodes left of the node plus the node itself\n prunedNodes += node.left.size + 1;\n node = node.right;\n }\n }\n // Node not found\n return -1;\n };\n SortedMap.prototype.isEmpty = function () {\n return this.root.isEmpty();\n };\n Object.defineProperty(SortedMap.prototype, \"size\", {\n // Returns the total number of nodes in the map.\n get: function () {\n return this.root.size;\n },\n enumerable: true,\n configurable: true\n });\n // Returns the minimum key in the map.\n SortedMap.prototype.minKey = function () {\n return this.root.minKey();\n };\n // Returns the maximum key in the map.\n SortedMap.prototype.maxKey = function () {\n return this.root.maxKey();\n };\n // Traverses the map in key order and calls the specified action function\n // for each key/value pair. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n SortedMap.prototype.inorderTraversal = function (action) {\n return this.root.inorderTraversal(action);\n };\n SortedMap.prototype.forEach = function (fn) {\n this.inorderTraversal(function (k, v) {\n fn(k, v);\n return false;\n });\n };\n // Traverses the map in reverse key order and calls the specified action\n // function for each key/value pair. If action returns true, traversal is\n // aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n SortedMap.prototype.reverseTraversal = function (action) {\n return this.root.reverseTraversal(action);\n };\n SortedMap.prototype.getIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root, null, this.comparator, false, resultGenerator);\n };\n SortedMap.prototype.getIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root, key, this.comparator, false, resultGenerator);\n };\n SortedMap.prototype.getReverseIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root, null, this.comparator, true, resultGenerator);\n };\n SortedMap.prototype.getReverseIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root, key, this.comparator, true, resultGenerator);\n };\n return SortedMap;\n}()); // end SortedMap\nexport { SortedMap };\n// An iterator over an LLRBNode.\nvar SortedMapIterator = /** @class */ (function () {\n function SortedMapIterator(node, startKey, comparator, isReverse, resultGenerator) {\n this.resultGenerator = resultGenerator || null;\n this.isReverse = isReverse;\n this.nodeStack = [];\n var cmp = 1;\n while (!node.isEmpty()) {\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse)\n cmp *= -1;\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse) {\n node = node.left;\n }\n else {\n node = node.right;\n }\n }\n else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack,\n // but stop iterating;\n this.nodeStack.push(node);\n break;\n }\n else {\n // This node is greater than our start key, add it to the stack and move\n // to the next one\n this.nodeStack.push(node);\n if (this.isReverse) {\n node = node.right;\n }\n else {\n node = node.left;\n }\n }\n }\n }\n SortedMapIterator.prototype.getNext = function () {\n assert(this.nodeStack.length > 0, 'getNext() called on iterator when hasNext() is false.');\n var node = this.nodeStack.pop();\n var result;\n if (this.resultGenerator)\n result = this.resultGenerator(node.key, node.value);\n else\n result = { key: node.key, value: node.value };\n if (this.isReverse) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack.push(node);\n node = node.right;\n }\n }\n else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack.push(node);\n node = node.left;\n }\n }\n return result;\n };\n SortedMapIterator.prototype.hasNext = function () {\n return this.nodeStack.length > 0;\n };\n SortedMapIterator.prototype.peek = function () {\n if (this.nodeStack.length === 0)\n return null;\n var node = this.nodeStack[this.nodeStack.length - 1];\n if (this.resultGenerator) {\n return this.resultGenerator(node.key, node.value);\n }\n else {\n return { key: node.key, value: node.value };\n }\n };\n return SortedMapIterator;\n}()); // end SortedMapIterator\nexport { SortedMapIterator };\n// Represents a node in a Left-leaning Red-Black tree.\nvar LLRBNode = /** @class */ (function () {\n function LLRBNode(key, value, color, left, right) {\n this.key = key;\n this.value = value;\n this.color = color != null ? color : LLRBNode.RED;\n this.left = left != null ? left : LLRBNode.EMPTY;\n this.right = right != null ? right : LLRBNode.EMPTY;\n this.size = this.left.size + 1 + this.right.size;\n }\n // Returns a copy of the current node, optionally replacing pieces of it.\n LLRBNode.prototype.copy = function (key, value, color, left, right) {\n return new LLRBNode(key != null ? key : this.key, value != null ? value : this.value, color != null ? color : this.color, left != null ? left : this.left, right != null ? right : this.right);\n };\n LLRBNode.prototype.isEmpty = function () {\n return false;\n };\n // Traverses the tree in key order and calls the specified action function\n // for each node. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n LLRBNode.prototype.inorderTraversal = function (action) {\n return (this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action));\n };\n // Traverses the tree in reverse key order and calls the specified action\n // function for each node. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n LLRBNode.prototype.reverseTraversal = function (action) {\n return (this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action));\n };\n // Returns the minimum node in the tree.\n LLRBNode.prototype.min = function () {\n if (this.left.isEmpty()) {\n return this;\n }\n else {\n return this.left.min();\n }\n };\n // Returns the maximum key in the tree.\n LLRBNode.prototype.minKey = function () {\n return this.min().key;\n };\n // Returns the maximum key in the tree.\n LLRBNode.prototype.maxKey = function () {\n if (this.right.isEmpty()) {\n return this.key;\n }\n else {\n return this.right.maxKey();\n }\n };\n // Returns new tree, with the key/value added.\n LLRBNode.prototype.insert = function (key, value, comparator) {\n var n = this;\n var cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n }\n else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n }\n else {\n n = n.copy(null, null, null, null, n.right.insert(key, value, comparator));\n }\n return n.fixUp();\n };\n LLRBNode.prototype.removeMin = function () {\n if (this.left.isEmpty()) {\n return LLRBNode.EMPTY;\n }\n var n = this;\n if (!n.left.isRed() && !n.left.left.isRed())\n n = n.moveRedLeft();\n n = n.copy(null, null, null, n.left.removeMin(), null);\n return n.fixUp();\n };\n // Returns new tree, with the specified item removed.\n LLRBNode.prototype.remove = function (key, comparator) {\n var smallest;\n var n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed() && !n.left.left.isRed()) {\n n = n.moveRedLeft();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n }\n else {\n if (n.left.isRed())\n n = n.rotateRight();\n if (!n.right.isEmpty() && !n.right.isRed() && !n.right.left.isRed()) {\n n = n.moveRedRight();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return LLRBNode.EMPTY;\n }\n else {\n smallest = n.right.min();\n n = n.copy(smallest.key, smallest.value, null, null, n.right.removeMin());\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp();\n };\n LLRBNode.prototype.isRed = function () {\n return this.color;\n };\n // Returns new tree after performing any needed rotations.\n LLRBNode.prototype.fixUp = function () {\n var n = this;\n if (n.right.isRed() && !n.left.isRed())\n n = n.rotateLeft();\n if (n.left.isRed() && n.left.left.isRed())\n n = n.rotateRight();\n if (n.left.isRed() && n.right.isRed())\n n = n.colorFlip();\n return n;\n };\n LLRBNode.prototype.moveRedLeft = function () {\n var n = this.colorFlip();\n if (n.right.left.isRed()) {\n n = n.copy(null, null, null, null, n.right.rotateRight());\n n = n.rotateLeft();\n n = n.colorFlip();\n }\n return n;\n };\n LLRBNode.prototype.moveRedRight = function () {\n var n = this.colorFlip();\n if (n.left.left.isRed()) {\n n = n.rotateRight();\n n = n.colorFlip();\n }\n return n;\n };\n LLRBNode.prototype.rotateLeft = function () {\n var nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null);\n };\n LLRBNode.prototype.rotateRight = function () {\n var nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr);\n };\n LLRBNode.prototype.colorFlip = function () {\n var left = this.left.copy(null, null, !this.left.color, null, null);\n var right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n };\n // For testing.\n LLRBNode.prototype.checkMaxDepth = function () {\n var blackDepth = this.check();\n if (Math.pow(2.0, blackDepth) <= this.size + 1) {\n return true;\n }\n else {\n return false;\n }\n };\n // In a balanced RB tree, the black-depth (number of black nodes) from root to\n // leaves is equal on both sides. This function verifies that or asserts.\n LLRBNode.prototype.check = function () {\n if (this.isRed() && this.left.isRed()) {\n throw fail('Red node has red child(' + this.key + ',' + this.value + ')');\n }\n if (this.right.isRed()) {\n throw fail('Right child of (' + this.key + ',' + this.value + ') is red');\n }\n var blackDepth = this.left.check();\n if (blackDepth !== this.right.check()) {\n throw fail('Black depths differ');\n }\n else {\n return blackDepth + (this.isRed() ? 0 : 1);\n }\n };\n LLRBNode.EMPTY = null;\n LLRBNode.RED = true;\n LLRBNode.BLACK = false;\n return LLRBNode;\n}()); // end LLRBNode\nexport { LLRBNode };\n// Represents an empty node (a leaf node in the Red-Black Tree).\nvar LLRBEmptyNode = /** @class */ (function () {\n function LLRBEmptyNode() {\n this.size = 0;\n }\n // Returns a copy of the current node.\n LLRBEmptyNode.prototype.copy = function (key, value, color, left, right) {\n return this;\n };\n // Returns a copy of the tree, with the specified key/value added.\n LLRBEmptyNode.prototype.insert = function (key, value, comparator) {\n return new LLRBNode(key, value);\n };\n // Returns a copy of the tree, with the specified key removed.\n LLRBEmptyNode.prototype.remove = function (key, comparator) {\n return this;\n };\n LLRBEmptyNode.prototype.isEmpty = function () {\n return true;\n };\n LLRBEmptyNode.prototype.inorderTraversal = function (action) {\n return false;\n };\n LLRBEmptyNode.prototype.reverseTraversal = function (action) {\n return false;\n };\n LLRBEmptyNode.prototype.minKey = function () {\n return null;\n };\n LLRBEmptyNode.prototype.maxKey = function () {\n return null;\n };\n LLRBEmptyNode.prototype.isRed = function () {\n return false;\n };\n // For testing.\n LLRBEmptyNode.prototype.checkMaxDepth = function () {\n return true;\n };\n LLRBEmptyNode.prototype.check = function () {\n return 0;\n };\n return LLRBEmptyNode;\n}()); // end LLRBEmptyNode\nexport { LLRBEmptyNode };\nLLRBNode.EMPTY = new LLRBEmptyNode();\n\n//# sourceMappingURL=sorted_map.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/sorted_map.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { emptyByteString } from '../platform/platform';\n/** An enumeration of the different purposes we have for queries. */\nexport var QueryPurpose;\n(function (QueryPurpose) {\n /** A regular, normal query. */\n QueryPurpose[QueryPurpose[\"Listen\"] = 0] = \"Listen\";\n /**\n * The query was used to refill a query after an existence filter mismatch.\n */\n QueryPurpose[QueryPurpose[\"ExistenceFilterMismatch\"] = 1] = \"ExistenceFilterMismatch\";\n /** The query was used to resolve a limbo document. */\n QueryPurpose[QueryPurpose[\"LimboResolution\"] = 2] = \"LimboResolution\";\n})(QueryPurpose = QueryPurpose || (QueryPurpose = {}));\n/**\n * An immutable set of metadata that the local store tracks for each query.\n */\nvar QueryData = /** @class */ (function () {\n function QueryData(\n /** The query being listened to. */\n query, \n /**\n * The target ID to which the query corresponds; Assigned by the\n * LocalStore for user listens and by the SyncEngine for limbo watches.\n */\n targetId, \n /** The purpose of the query. */\n purpose, \n /** The latest snapshot version seen for this target. */\n snapshotVersion, \n /**\n * An opaque, server-assigned token that allows watching a query to be\n * resumed after disconnecting without retransmitting all the data that\n * matches the query. The resume token essentially identifies a point in\n * time from which the server should resume sending results.\n */\n resumeToken) {\n if (snapshotVersion === void 0) { snapshotVersion = SnapshotVersion.MIN; }\n if (resumeToken === void 0) { resumeToken = emptyByteString(); }\n this.query = query;\n this.targetId = targetId;\n this.purpose = purpose;\n this.snapshotVersion = snapshotVersion;\n this.resumeToken = resumeToken;\n }\n /**\n * Creates a new query data instance with an updated snapshot version and\n * resume token.\n */\n QueryData.prototype.update = function (updated) {\n return new QueryData(this.query, this.targetId, this.purpose, updated.snapshotVersion, updated.resumeToken);\n };\n QueryData.prototype.equals = function (other) {\n return (this.targetId === other.targetId &&\n this.purpose === other.purpose &&\n this.snapshotVersion.equals(other.snapshotVersion) &&\n this.resumeToken === other.resumeToken &&\n this.query.equals(other.query));\n };\n return QueryData;\n}());\nexport { QueryData };\n\n//# sourceMappingURL=query_data.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/query_data.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { primitiveComparator } from '../util/misc';\n// A RegExp matching ISO 8601 UTC timestamps with optional fraction.\nvar isoRegExp = new RegExp(/^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.(\\d+))?Z$/);\nvar Timestamp = /** @class */ (function () {\n function Timestamp(seconds, nanos) {\n this.seconds = seconds;\n this.nanos = nanos;\n assert(nanos >= 0, 'timestamp nanoseconds out of range: ' + nanos);\n assert(nanos < 1e9, 'timestamp nanoseconds out of range' + nanos);\n // Midnight at the beginning of 1/1/1 is the earliest Firestore supports.\n assert(seconds >= -62135596800, 'timestamp seconds out of range: ' + seconds);\n // This will break in the year 10,000.\n assert(seconds < 253402300800, 'timestamp seconds out of range' + seconds);\n }\n Timestamp.now = function () {\n return Timestamp.fromEpochMilliseconds(Date.now());\n };\n Timestamp.fromDate = function (date) {\n return Timestamp.fromEpochMilliseconds(date.getTime());\n };\n Timestamp.fromEpochMilliseconds = function (milliseconds) {\n var seconds = Math.floor(milliseconds / 1000);\n var nanos = (milliseconds - seconds * 1000) * 1e6;\n return new Timestamp(seconds, nanos);\n };\n Timestamp.fromISOString = function (utc) {\n // The date string can have higher precision (nanos) than the Date class\n // (millis), so we do some custom parsing here.\n // Parse the nanos right out of the string.\n var nanos = 0;\n var fraction = isoRegExp.exec(utc);\n assert(!!fraction, 'invalid timestamp: ' + utc);\n if (fraction[1]) {\n // Pad the fraction out to 9 digits (nanos).\n var nanoStr = fraction[1];\n nanoStr = (nanoStr + '000000000').substr(0, 9);\n nanos = parseInt(nanoStr, 10);\n }\n // Parse the date to get the seconds.\n var date = new Date(utc);\n var seconds = Math.floor(date.getTime() / 1000);\n return new Timestamp(seconds, nanos);\n };\n Timestamp.prototype.toDate = function () {\n return new Date(this.toEpochMilliseconds());\n };\n Timestamp.prototype.toEpochMilliseconds = function () {\n return this.seconds * 1000 + this.nanos / 1e6;\n };\n Timestamp.prototype.compareTo = function (other) {\n if (this.seconds === other.seconds) {\n return primitiveComparator(this.nanos, other.nanos);\n }\n return primitiveComparator(this.seconds, other.seconds);\n };\n Timestamp.prototype.equals = function (other) {\n return other.seconds === this.seconds && other.nanos === this.nanos;\n };\n Timestamp.prototype.toString = function () {\n return 'Timestamp(seconds=' + this.seconds + ', nanos=' + this.nanos + ')';\n };\n return Timestamp;\n}());\nexport { Timestamp };\n\n//# sourceMappingURL=timestamp.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/timestamp.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Timestamp } from './timestamp';\n/**\n * A version of a document in Firestore. This corresponds to the version\n * timestamp, such as update_time or read_time.\n */\nvar SnapshotVersion = /** @class */ (function () {\n function SnapshotVersion(timestamp) {\n this.timestamp = timestamp;\n }\n // TODO(b/34176344): Once we no longer need to use the old alpha protos,\n // delete this constructor and use a timestamp-backed version everywhere.\n SnapshotVersion.fromMicroseconds = function (value) {\n var seconds = Math.floor(value / 1e6);\n var nanos = (value % 1e6) * 1e3;\n return new SnapshotVersion(new Timestamp(seconds, nanos));\n };\n SnapshotVersion.fromTimestamp = function (value) {\n return new SnapshotVersion(value);\n };\n SnapshotVersion.forDeletedDoc = function () {\n return SnapshotVersion.MIN;\n };\n SnapshotVersion.prototype.compareTo = function (other) {\n return this.timestamp.compareTo(other.timestamp);\n };\n SnapshotVersion.prototype.equals = function (other) {\n return this.timestamp.equals(other.timestamp);\n };\n /** Returns a number representation of the version for use in spec tests. */\n SnapshotVersion.prototype.toMicroseconds = function () {\n // Convert to microseconds.\n return this.timestamp.seconds * 1e6 + this.timestamp.nanos / 1000;\n };\n SnapshotVersion.prototype.toString = function () {\n return 'SnapshotVersion(' + this.timestamp.toString() + ')';\n };\n SnapshotVersion.prototype.toTimestamp = function () {\n return this.timestamp;\n };\n SnapshotVersion.MIN = new SnapshotVersion(new Timestamp(0, 0));\n return SnapshotVersion;\n}());\nexport { SnapshotVersion };\n\n//# sourceMappingURL=snapshot_version.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/snapshot_version.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { assert, fail } from '../util/assert';\nimport * as misc from '../util/misc';\nimport { Document, NoDocument } from './document';\nimport { ObjectValue, ServerTimestampValue } from './field_value';\n/**\n * Provides a set of fields that can be used to partially patch a document.\n * FieldMask is used in conjunction with ObjectValue.\n * Examples:\n * foo - Overwrites foo entirely with the provided value. If foo is not\n * present in the companion ObjectValue, the field is deleted.\n * foo.bar - Overwrites only the field bar of the object foo.\n * If foo is not an object, foo is replaced with an object\n * containing foo\n */\nvar FieldMask = /** @class */ (function () {\n function FieldMask(fields) {\n this.fields = fields;\n // TODO(dimond): validation of FieldMask\n }\n FieldMask.prototype.equals = function (other) {\n return misc.arrayEquals(this.fields, other.fields);\n };\n return FieldMask;\n}());\nexport { FieldMask };\n/** Transforms a value into a server-generated timestamp. */\nvar ServerTimestampTransform = /** @class */ (function () {\n function ServerTimestampTransform() {\n }\n ServerTimestampTransform.prototype.equals = function (other) {\n return other instanceof ServerTimestampTransform;\n };\n ServerTimestampTransform.instance = new ServerTimestampTransform();\n return ServerTimestampTransform;\n}());\nexport { ServerTimestampTransform };\n/** A field path and the TransformOperation to perform upon it. */\nvar FieldTransform = /** @class */ (function () {\n function FieldTransform(field, transform) {\n this.field = field;\n this.transform = transform;\n }\n FieldTransform.prototype.equals = function (other) {\n return (this.field.equals(other.field) && this.transform.equals(other.transform));\n };\n return FieldTransform;\n}());\nexport { FieldTransform };\n/** The result of successfully applying a mutation to the backend. */\nvar MutationResult = /** @class */ (function () {\n function MutationResult(\n /**\n * The version at which the mutation was committed or null for a delete.\n */\n version, \n /**\n * The resulting fields returned from the backend after a\n * TransformMutation has been committed. Contains one FieldValue for each\n * FieldTransform that was in the mutation.\n *\n * Will be null if the mutation was not a TransformMutation.\n */\n transformResults) {\n this.version = version;\n this.transformResults = transformResults;\n }\n return MutationResult;\n}());\nexport { MutationResult };\nexport var MutationType;\n(function (MutationType) {\n MutationType[MutationType[\"Set\"] = 0] = \"Set\";\n MutationType[MutationType[\"Patch\"] = 1] = \"Patch\";\n MutationType[MutationType[\"Transform\"] = 2] = \"Transform\";\n MutationType[MutationType[\"Delete\"] = 3] = \"Delete\";\n})(MutationType = MutationType || (MutationType = {}));\n/**\n * Encodes a precondition for a mutation. This follows the model that the\n * backend accepts with the special case of an explicit \"empty\" precondition\n * (meaning no precondition).\n */\nvar Precondition = /** @class */ (function () {\n function Precondition(updateTime, exists) {\n this.updateTime = updateTime;\n this.exists = exists;\n assert(updateTime === undefined || exists === undefined, 'Precondition can specify \"exists\" or \"updateTime\" but not both');\n }\n /** Creates a new Precondition with an exists flag. */\n Precondition.exists = function (exists) {\n return new Precondition(undefined, exists);\n };\n /** Creates a new Precondition based on a version a document exists at. */\n Precondition.updateTime = function (version) {\n return new Precondition(version);\n };\n Object.defineProperty(Precondition.prototype, \"isNone\", {\n /** Returns whether this Precondition is empty. */\n get: function () {\n return this.updateTime === undefined && this.exists === undefined;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns true if the preconditions is valid for the given document\n * (or null if no document is available).\n */\n Precondition.prototype.isValidFor = function (maybeDoc) {\n if (this.updateTime !== undefined) {\n return (maybeDoc instanceof Document && maybeDoc.version.equals(this.updateTime));\n }\n else if (this.exists !== undefined) {\n if (this.exists) {\n return maybeDoc instanceof Document;\n }\n else {\n return maybeDoc === null || maybeDoc instanceof NoDocument;\n }\n }\n else {\n assert(this.isNone, 'Precondition should be empty');\n return true;\n }\n };\n Precondition.prototype.equals = function (other) {\n return (misc.equals(this.updateTime, other.updateTime) &&\n this.exists === other.exists);\n };\n Precondition.NONE = new Precondition();\n return Precondition;\n}());\nexport { Precondition };\n/**\n * A mutation describes a self-contained change to a document. Mutations can\n * create, replace, delete, and update subsets of documents.\n *\n * Mutations not only act on the value of the document but also it version.\n * In the case of Set, Patch, and Transform mutations we preserve the existing\n * version. In the case of Delete mutations, we reset the version to 0.\n *\n * Here's the expected transition table.\n *\n * MUTATION APPLIED TO RESULTS IN\n *\n * SetMutation Document(v3) Document(v3)\n * SetMutation NoDocument(v3) Document(v0)\n * SetMutation null Document(v0)\n * PatchMutation Document(v3) Document(v3)\n * PatchMutation NoDocument(v3) NoDocument(v3)\n * PatchMutation null null\n * TransformMutation Document(v3) Document(v3)\n * TransformMutation NoDocument(v3) NoDocument(v3)\n * TransformMutation null null\n * DeleteMutation Document(v3) NoDocument(v0)\n * DeleteMutation NoDocument(v3) NoDocument(v0)\n * DeleteMutation null NoDocument(v0)\n *\n * Note that TransformMutations don't create Documents (in the case of being\n * applied to a NoDocument), even though they would on the backend. This is\n * because the client always combines the TransformMutation with a SetMutation\n * or PatchMutation and we only want to apply the transform if the prior\n * mutation resulted in a Document (always true for a SetMutation, but not\n * necessarily for a PatchMutation).\n *\n * ## Subclassing Notes\n *\n * Subclasses of Mutation need to implement applyToRemoteDocument() and\n * applyToLocalView() to implement the actual behavior of applying the mutation\n * to some source document.\n */\nvar Mutation = /** @class */ (function () {\n function Mutation() {\n }\n Mutation.prototype.verifyKeyMatches = function (maybeDoc) {\n if (maybeDoc != null) {\n assert(maybeDoc.key.equals(this.key), 'Can only apply a mutation to a document with the same key');\n }\n };\n /**\n * Returns the version from the given document for use as the result of a\n * mutation. Mutations are defined to return the version of the base document\n * only if it is an existing document. Deleted and unknown documents have a\n * post-mutation version of SnapshotVersion.MIN.\n */\n Mutation.getPostMutationVersion = function (maybeDoc) {\n if (maybeDoc instanceof Document) {\n return maybeDoc.version;\n }\n else {\n return SnapshotVersion.MIN;\n }\n };\n return Mutation;\n}());\nexport { Mutation };\n/**\n * A mutation that creates or replaces the document at the given key with the\n * object value contents.\n */\nvar SetMutation = /** @class */ (function (_super) {\n __extends(SetMutation, _super);\n function SetMutation(key, value, precondition) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.value = value;\n _this.precondition = precondition;\n _this.type = MutationType.Set;\n return _this;\n }\n SetMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults == null, 'Transform results received by SetMutation.');\n // Unlike applyToLocalView, if we're applying a mutation to a remote\n // document the server has accepted the mutation so the precondition must\n // have held.\n var version = Mutation.getPostMutationVersion(maybeDoc);\n return new Document(this.key, version, this.value, {\n hasLocalMutations: false\n });\n };\n SetMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var version = Mutation.getPostMutationVersion(maybeDoc);\n return new Document(this.key, version, this.value, {\n hasLocalMutations: true\n });\n };\n SetMutation.prototype.equals = function (other) {\n return (other instanceof SetMutation &&\n this.key.equals(other.key) &&\n this.value.equals(other.value) &&\n this.precondition.equals(other.precondition));\n };\n return SetMutation;\n}(Mutation));\nexport { SetMutation };\n/**\n * A mutation that modifies fields of the document at the given key with the\n * given values. The values are applied through a field mask:\n *\n * * When a field is in both the mask and the values, the corresponding field\n * is updated.\n * * When a field is in neither the mask nor the values, the corresponding\n * field is unmodified.\n * * When a field is in the mask but not in the values, the corresponding field\n * is deleted.\n * * When a field is not in the mask but is in the values, the values map is\n * ignored.\n */\nvar PatchMutation = /** @class */ (function (_super) {\n __extends(PatchMutation, _super);\n function PatchMutation(key, data, fieldMask, precondition) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.data = data;\n _this.fieldMask = fieldMask;\n _this.precondition = precondition;\n _this.type = MutationType.Patch;\n return _this;\n }\n PatchMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults == null, 'Transform results received by PatchMutation.');\n // TODO(mcg): Relax enforcement of this precondition\n //\n // We shouldn't actually enforce the precondition since it already passed on\n // the backend, but we may not have a local version of the document to\n // patch, so we use the precondition to prevent incorrectly putting a\n // partial document into our cache.\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var version = Mutation.getPostMutationVersion(maybeDoc);\n var newData = this.patchDocument(maybeDoc);\n return new Document(this.key, version, newData, {\n hasLocalMutations: false\n });\n };\n PatchMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var version = Mutation.getPostMutationVersion(maybeDoc);\n var newData = this.patchDocument(maybeDoc);\n return new Document(this.key, version, newData, {\n hasLocalMutations: true\n });\n };\n PatchMutation.prototype.equals = function (other) {\n return (other instanceof PatchMutation &&\n this.key.equals(other.key) &&\n this.fieldMask.equals(other.fieldMask) &&\n this.precondition.equals(other.precondition));\n };\n /**\n * Patches the data of document if available or creates a new document. Note\n * that this does not check whether or not the precondition of this patch\n * holds.\n */\n PatchMutation.prototype.patchDocument = function (maybeDoc) {\n var data;\n if (maybeDoc instanceof Document) {\n data = maybeDoc.data;\n }\n else {\n data = ObjectValue.EMPTY;\n }\n return this.patchObject(data);\n };\n PatchMutation.prototype.patchObject = function (data) {\n for (var _i = 0, _a = this.fieldMask.fields; _i < _a.length; _i++) {\n var fieldPath = _a[_i];\n var newValue = this.data.field(fieldPath);\n if (newValue !== undefined) {\n data = data.set(fieldPath, newValue);\n }\n else {\n data = data.delete(fieldPath);\n }\n }\n return data;\n };\n return PatchMutation;\n}(Mutation));\nexport { PatchMutation };\n/**\n * A mutation that modifies specific fields of the document with transform\n * operations. Currently the only supported transform is a server timestamp, but\n * IP Address, increment(n), etc. could be supported in the future.\n *\n * It is somewhat similar to a PatchMutation in that it patches specific fields\n * and has no effect when applied to a null or NoDocument (see comment on\n * Mutation for rationale).\n */\nvar TransformMutation = /** @class */ (function (_super) {\n __extends(TransformMutation, _super);\n function TransformMutation(key, fieldTransforms) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.fieldTransforms = fieldTransforms;\n _this.type = MutationType.Transform;\n // NOTE: We set a precondition of exists: true as a safety-check, since we\n // always combine TransformMutations with a SetMutation or PatchMutation which\n // (if successful) should end up with an existing document.\n _this.precondition = Precondition.exists(true);\n return _this;\n }\n TransformMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults != null, 'Transform results missing for TransformMutation.');\n var transformResults = mutationResult.transformResults;\n // TODO(mcg): Relax enforcement of this precondition\n //\n // We shouldn't actually enforce the precondition since it already passed on\n // the backend, but we may not have a local version of the document to\n // patch, so we use the precondition to prevent incorrectly putting a\n // partial document into our cache.\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var doc = this.requireDocument(maybeDoc);\n var newData = this.transformObject(doc.data, transformResults);\n return new Document(this.key, doc.version, newData, {\n hasLocalMutations: false\n });\n };\n TransformMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n var doc = this.requireDocument(maybeDoc);\n var transformResults = this.localTransformResults(localWriteTime);\n var newData = this.transformObject(doc.data, transformResults);\n return new Document(this.key, doc.version, newData, {\n hasLocalMutations: true\n });\n };\n TransformMutation.prototype.equals = function (other) {\n return (other instanceof TransformMutation &&\n this.key.equals(other.key) &&\n misc.arrayEquals(this.fieldTransforms, other.fieldTransforms) &&\n this.precondition.equals(other.precondition));\n };\n /**\n * Asserts that the given MaybeDocument is actually a Document and verifies\n * that it matches the key for this mutation. Since we only support\n * transformations with precondition exists this method is guaranteed to be\n * safe.\n */\n TransformMutation.prototype.requireDocument = function (maybeDoc) {\n assert(maybeDoc instanceof Document, 'Unknown MaybeDocument type ' + maybeDoc);\n var doc = maybeDoc;\n assert(doc.key.equals(this.key), 'Can only transform a document with the same key');\n return doc;\n };\n /**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use when applying a\n * TransformMutation locally.\n *\n * @param localWriteTime The local time of the transform mutation (used to\n * generate ServerTimestampValues).\n * @return The transform results list.\n */\n TransformMutation.prototype.localTransformResults = function (localWriteTime) {\n var transformResults = [];\n for (var _i = 0, _a = this.fieldTransforms; _i < _a.length; _i++) {\n var fieldTransform = _a[_i];\n var transform = fieldTransform.transform;\n if (transform instanceof ServerTimestampTransform) {\n transformResults.push(new ServerTimestampValue(localWriteTime));\n }\n else {\n return fail('Encountered unknown transform: ' + transform);\n }\n }\n return transformResults;\n };\n TransformMutation.prototype.transformObject = function (data, transformResults) {\n assert(transformResults.length === this.fieldTransforms.length, 'TransformResults length mismatch.');\n for (var i = 0; i < this.fieldTransforms.length; i++) {\n var fieldTransform = this.fieldTransforms[i];\n var transform = fieldTransform.transform;\n var fieldPath = fieldTransform.field;\n if (transform instanceof ServerTimestampTransform) {\n data = data.set(fieldPath, transformResults[i]);\n }\n else {\n return fail('Encountered unknown transform: ' + transform);\n }\n }\n return data;\n };\n return TransformMutation;\n}(Mutation));\nexport { TransformMutation };\n/** A mutation that deletes the document at the given key. */\nvar DeleteMutation = /** @class */ (function (_super) {\n __extends(DeleteMutation, _super);\n function DeleteMutation(key, precondition) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.precondition = precondition;\n _this.type = MutationType.Delete;\n return _this;\n }\n DeleteMutation.prototype.applyToRemoteDocument = function (maybeDoc, mutationResult) {\n this.verifyKeyMatches(maybeDoc);\n assert(mutationResult.transformResults == null, 'Transform results received by DeleteMutation.');\n // Unlike applyToLocalView, if we're applying a mutation to a remote\n // document the server has accepted the mutation so the precondition must\n // have held.\n return new NoDocument(this.key, SnapshotVersion.MIN);\n };\n DeleteMutation.prototype.applyToLocalView = function (maybeDoc, localWriteTime) {\n this.verifyKeyMatches(maybeDoc);\n if (!this.precondition.isValidFor(maybeDoc)) {\n return maybeDoc;\n }\n if (maybeDoc) {\n assert(maybeDoc.key.equals(this.key), 'Can only apply mutation to document with same key');\n }\n return new NoDocument(this.key, SnapshotVersion.forDeletedDoc());\n };\n DeleteMutation.prototype.equals = function (other) {\n return (other instanceof DeleteMutation &&\n this.key.equals(other.key) &&\n this.precondition.equals(other.precondition));\n };\n return DeleteMutation;\n}(Mutation));\nexport { DeleteMutation };\n\n//# sourceMappingURL=mutation.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/mutation.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ExistenceFilter = /** @class */ (function () {\n // TODO(b/33078163): just use simplest form of existence filter for now\n function ExistenceFilter(count) {\n this.count = count;\n }\n ExistenceFilter.prototype.equals = function (other) {\n return other && other.count === this.count;\n };\n return ExistenceFilter;\n}());\nexport { ExistenceFilter };\n\n//# sourceMappingURL=existence_filter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/existence_filter.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SortedMap } from './sorted_map';\n/**\n * SortedSet is an immutable (copy-on-write) collection that holds elements\n * in order specified by the provided comparator.\n *\n * NOTE: if provided comparator returns 0 for two elements, we consider them to\n * be equal!\n */\nvar SortedSet = /** @class */ (function () {\n function SortedSet(comparator) {\n this.comparator = comparator;\n this.data = new SortedMap(this.comparator);\n }\n /**\n * Creates a SortedSet from the keys of the map.\n * This is currently implemented as an O(n) copy.\n */\n SortedSet.fromMapKeys = function (map) {\n var keys = new SortedSet(map.comparator);\n map.forEach(function (key) {\n keys = keys.add(key);\n });\n return keys;\n };\n SortedSet.prototype.has = function (elem) {\n return this.data.get(elem) !== null;\n };\n SortedSet.prototype.first = function () {\n return this.data.minKey();\n };\n SortedSet.prototype.last = function () {\n return this.data.maxKey();\n };\n Object.defineProperty(SortedSet.prototype, \"size\", {\n get: function () {\n return this.data.size;\n },\n enumerable: true,\n configurable: true\n });\n SortedSet.prototype.indexOf = function (elem) {\n return this.data.indexOf(elem);\n };\n /** Iterates elements in order defined by \"comparator\" */\n SortedSet.prototype.forEach = function (cb) {\n this.data.inorderTraversal(function (k, v) {\n cb(k);\n return false;\n });\n };\n /** Iterates over `elem`s such that: range[0] <= elem < range[1]. */\n SortedSet.prototype.forEachInRange = function (range, cb) {\n var iter = this.data.getIteratorFrom(range[0]);\n while (iter.hasNext()) {\n var elem = iter.getNext();\n if (this.comparator(elem.key, range[1]) >= 0)\n return;\n cb(elem.key);\n }\n };\n /**\n * Iterates over `elem`s such that: start <= elem until false is returned.\n */\n SortedSet.prototype.forEachWhile = function (cb, start) {\n var iter;\n if (start !== undefined) {\n iter = this.data.getIteratorFrom(start);\n }\n else {\n iter = this.data.getIterator();\n }\n while (iter.hasNext()) {\n var elem = iter.getNext();\n var result = cb(elem.key);\n if (!result)\n return;\n }\n };\n /** Finds the least element greater than or equal to `elem`. */\n SortedSet.prototype.firstAfterOrEqual = function (elem) {\n var iter = this.data.getIteratorFrom(elem);\n return iter.hasNext() ? iter.getNext().key : null;\n };\n /** Inserts or updates an element */\n SortedSet.prototype.add = function (elem) {\n return this.copy(this.data.remove(elem).insert(elem, true));\n };\n /** Deletes an element */\n SortedSet.prototype.delete = function (elem) {\n if (!this.has(elem))\n return this;\n return this.copy(this.data.remove(elem));\n };\n SortedSet.prototype.isEmpty = function () {\n return this.data.isEmpty();\n };\n SortedSet.prototype.unionWith = function (other) {\n var result = this;\n other.forEach(function (elem) {\n result = result.add(elem);\n });\n return result;\n };\n SortedSet.prototype.equals = function (other) {\n if (!(other instanceof SortedSet))\n return false;\n if (this.size !== other.size)\n return false;\n var thisIt = this.data.getIterator();\n var otherIt = other.data.getIterator();\n while (thisIt.hasNext()) {\n var thisElem = thisIt.getNext().key;\n var otherElem = otherIt.getNext().key;\n if (this.comparator(thisElem, otherElem) !== 0)\n return false;\n }\n return true;\n };\n SortedSet.prototype.toString = function () {\n var result = [];\n this.forEach(function (elem) { return result.push(elem); });\n return 'SortedSet(' + result.toString() + ')';\n };\n SortedSet.prototype.copy = function (data) {\n var result = new SortedSet(this.comparator);\n result.data = data;\n return result;\n };\n return SortedSet;\n}());\nexport { SortedSet };\n\n//# sourceMappingURL=sorted_set.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/sorted_set.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { documentKeySet } from '../model/collections';\nimport { emptyByteString } from '../platform/platform';\n/**\n * An event from the RemoteStore. It is split into targetChanges (changes to the\n * state or the set of documents in our watched targets) and documentUpdates\n * (changes to the actual documents).\n */\nvar RemoteEvent = /** @class */ (function () {\n function RemoteEvent(\n /**\n * The snapshot version this event brings us up to, or MIN if not set.\n */\n snapshotVersion, \n /**\n * A map from target to changes to the target. See TargetChange.\n */\n targetChanges, \n /**\n * A set of which documents have changed or been deleted, along with the\n * doc's new values (if not deleted).\n */\n documentUpdates) {\n this.snapshotVersion = snapshotVersion;\n this.targetChanges = targetChanges;\n this.documentUpdates = documentUpdates;\n }\n RemoteEvent.prototype.addDocumentUpdate = function (doc) {\n this.documentUpdates = this.documentUpdates.insert(doc.key, doc);\n };\n RemoteEvent.prototype.handleExistenceFilterMismatch = function (targetId) {\n /*\n * An existence filter mismatch will reset the query and we need to reset\n * the mapping to contain no documents and an empty resume token.\n *\n * Note:\n * * The reset mapping is empty, specifically forcing the consumer of the\n * change to forget all keys for this targetID;\n * * The resume snapshot for this target must be reset\n * * The target must be unacked because unwatching and rewatching\n * introduces a race for changes.\n */\n this.targetChanges[targetId] = {\n mapping: new ResetMapping(),\n snapshotVersion: SnapshotVersion.MIN,\n currentStatusUpdate: CurrentStatusUpdate.MarkNotCurrent,\n resumeToken: emptyByteString()\n };\n };\n return RemoteEvent;\n}());\nexport { RemoteEvent };\n/**\n * Represents an update to the current status of a target, either explicitly\n * having no new state, or the new value to set. Note \"current\" has special\n * meaning for in the RPC protocol that implies that a target is both up-to-date\n * and consistent with the rest of the watch stream.\n */\nexport var CurrentStatusUpdate;\n(function (CurrentStatusUpdate) {\n /** The current status is not affected and should not be modified. */\n CurrentStatusUpdate[CurrentStatusUpdate[\"None\"] = 0] = \"None\";\n /** The target must be marked as no longer \"current\". */\n CurrentStatusUpdate[CurrentStatusUpdate[\"MarkNotCurrent\"] = 1] = \"MarkNotCurrent\";\n /** The target must be marked as \"current\". */\n CurrentStatusUpdate[CurrentStatusUpdate[\"MarkCurrent\"] = 2] = \"MarkCurrent\";\n})(CurrentStatusUpdate = CurrentStatusUpdate || (CurrentStatusUpdate = {}));\nvar EMPTY_KEY_SET = documentKeySet();\nvar ResetMapping = /** @class */ (function () {\n function ResetMapping() {\n this.docs = EMPTY_KEY_SET;\n }\n Object.defineProperty(ResetMapping.prototype, \"documents\", {\n get: function () {\n return this.docs;\n },\n enumerable: true,\n configurable: true\n });\n ResetMapping.prototype.add = function (key) {\n this.docs = this.docs.add(key);\n };\n ResetMapping.prototype.delete = function (key) {\n this.docs = this.docs.delete(key);\n };\n ResetMapping.prototype.equals = function (other) {\n return other !== null && this.docs.equals(other.docs);\n };\n return ResetMapping;\n}());\nexport { ResetMapping };\nvar UpdateMapping = /** @class */ (function () {\n function UpdateMapping() {\n this.addedDocuments = EMPTY_KEY_SET;\n this.removedDocuments = EMPTY_KEY_SET;\n }\n UpdateMapping.prototype.applyToKeySet = function (keys) {\n var result = keys;\n this.addedDocuments.forEach(function (key) { return (result = result.add(key)); });\n this.removedDocuments.forEach(function (key) { return (result = result.delete(key)); });\n return result;\n };\n UpdateMapping.prototype.add = function (key) {\n this.addedDocuments = this.addedDocuments.add(key);\n this.removedDocuments = this.removedDocuments.delete(key);\n };\n UpdateMapping.prototype.delete = function (key) {\n this.addedDocuments = this.addedDocuments.delete(key);\n this.removedDocuments = this.removedDocuments.add(key);\n };\n UpdateMapping.prototype.equals = function (other) {\n return (other !== null &&\n this.addedDocuments.equals(other.addedDocuments) &&\n this.removedDocuments.equals(other.removedDocuments));\n };\n return UpdateMapping;\n}());\nexport { UpdateMapping };\n\n//# sourceMappingURL=remote_event.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/remote_event.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\n/**\n * Provides a simple helper class that implements the Stream interface to\n * bridge to other implementations that are streams but do not implement the\n * interface. The stream callbacks are invoked with the callOn... methods.\n */\nvar StreamBridge = /** @class */ (function () {\n function StreamBridge(args) {\n this.wrappedOnOpen = null;\n this.wrappedOnClose = null;\n this.wrappedOnMessage = null;\n this.sendFn = args.sendFn;\n this.closeFn = args.closeFn;\n }\n StreamBridge.prototype.onOpen = function (callback) {\n assert(!this.wrappedOnOpen, 'Called onOpen on stream twice!');\n this.wrappedOnOpen = callback;\n };\n StreamBridge.prototype.onClose = function (callback) {\n assert(!this.wrappedOnClose, 'Called onClose on stream twice!');\n this.wrappedOnClose = callback;\n };\n StreamBridge.prototype.onMessage = function (callback) {\n assert(!this.wrappedOnMessage, 'Called onMessage on stream twice!');\n this.wrappedOnMessage = callback;\n };\n StreamBridge.prototype.close = function () {\n this.closeFn();\n };\n StreamBridge.prototype.send = function (msg) {\n this.sendFn(msg);\n };\n StreamBridge.prototype.callOnOpen = function () {\n assert(this.wrappedOnOpen !== null, 'Cannot call onOpen because no callback ' + 'was set');\n this.wrappedOnOpen();\n };\n StreamBridge.prototype.callOnClose = function (err) {\n assert(this.wrappedOnClose !== null, 'Cannot call onClose because no ' + 'callback was set');\n this.wrappedOnClose(err);\n };\n StreamBridge.prototype.callOnMessage = function (msg) {\n assert(this.wrappedOnMessage !== null, 'Cannot call onMessage because no ' + 'callback was set');\n this.wrappedOnMessage(msg);\n };\n return StreamBridge;\n}());\nexport { StreamBridge };\n\n//# sourceMappingURL=stream_bridge.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/stream_bridge.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ErrorCode, EventType, WebChannel, XhrIoPool, createWebChannelTransport } from '@firebase/webchannel-wrapper';\nimport { SDK_VERSION } from '../core/version';\nimport { mapCodeFromHttpStatus, mapCodeFromRpcStatus } from '../remote/rpc_error';\nimport { StreamBridge } from '../remote/stream_bridge';\nimport { assert, fail } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nimport * as log from '../util/log';\nvar LOG_TAG = 'Connection';\nvar RPC_URL_VERSION = 'v1beta1';\n// TODO(b/38203344): The SDK_VERSION is set independently from Firebase because\n// we are doing out-of-band releases. Once we release as part of Firebase, we\n// should use the Firebase version instead.\nvar X_GOOG_API_CLIENT_VALUE = 'gl-js/ fire/' + SDK_VERSION;\nvar XHR_TIMEOUT_SECS = 15;\nvar WebChannelConnection = /** @class */ (function () {\n function WebChannelConnection(info) {\n this.databaseId = info.databaseId;\n this.pool = new XhrIoPool();\n var proto = info.ssl ? 'https' : 'http';\n this.baseUrl = proto + '://' + info.host;\n }\n /**\n * Modifies the headers for a request, adding any authorization token if\n * present and any additional headers for the request.\n */\n WebChannelConnection.prototype.modifyHeadersForRequest = function (headers, token) {\n if (token) {\n for (var header in token.authHeaders) {\n if (token.authHeaders.hasOwnProperty(header)) {\n headers[header] = token.authHeaders[header];\n }\n }\n }\n headers['X-Goog-Api-Client'] = X_GOOG_API_CLIENT_VALUE;\n // This header is used to improve routing and project isolation by the\n // backend.\n headers['google-cloud-resource-prefix'] =\n \"projects/\" + this.databaseId.projectId + \"/\" +\n (\"databases/\" + this.databaseId.database);\n };\n WebChannelConnection.prototype.invoke = function (rpcName, request, token) {\n var _this = this;\n var url = this.makeUrl(rpcName);\n return new Promise(function (resolve, reject) {\n _this.pool.getObject(function (xhr) {\n xhr.listenOnce(EventType.COMPLETE, function () {\n try {\n switch (xhr.getLastErrorCode()) {\n case ErrorCode.NO_ERROR:\n var json = xhr.getResponseJson();\n log.debug(LOG_TAG, 'XHR received:', JSON.stringify(json));\n resolve(json);\n break;\n case ErrorCode.TIMEOUT:\n log.error('RPC \"' + rpcName + '\" timed out, retrying.');\n reject(new FirestoreError(Code.DEADLINE_EXCEEDED, 'Request time out'));\n break;\n case ErrorCode.HTTP_ERROR:\n var status_1 = xhr.getStatus();\n log.error('RPC \"' + rpcName + '\" failed with status:', status_1, 'response text:', xhr.getResponseText());\n if (status_1 > 0) {\n reject(new FirestoreError(mapCodeFromHttpStatus(status_1), 'Server responded with status ' + xhr.getStatusText()));\n }\n else {\n // If we received an HTTP_ERROR but there's no status code,\n // it's most probably a connection issue, let's retry.\n log.error(LOG_TAG, 'RPC \"' + rpcName + '\" failed, retrying.');\n reject(new FirestoreError(Code.UNAVAILABLE, 'Connection failed.'));\n }\n break;\n default:\n fail('RPC \"' +\n rpcName +\n '\" failed with unanticipated ' +\n 'webchannel error ' +\n xhr.getLastErrorCode() +\n ': ' +\n xhr.getLastError() +\n ', giving up.');\n }\n }\n finally {\n log.debug(LOG_TAG, 'RPC \"' + rpcName + '\" completed.');\n _this.pool.releaseObject(xhr);\n }\n });\n var requestString = JSON.stringify(request);\n log.debug(LOG_TAG, 'XHR sending: ', url + ' ' + requestString);\n // Content-Type: text/plain will avoid preflight requests which might\n // mess with CORS and redirects by proxies. If we add custom headers\n // we will need to change this code to potentially use the\n // $httpOverwrite parameter supported by ESF to avoid\n // triggering preflight requests.\n var headers = { 'Content-Type': 'text/plain' };\n _this.modifyHeadersForRequest(headers, token);\n xhr.send(url, 'POST', requestString, headers, XHR_TIMEOUT_SECS);\n });\n });\n };\n WebChannelConnection.prototype.openStream = function (rpcName, token) {\n var rpcService = WebChannelConnection.RPC_STREAM_SERVICE_MAPPING[rpcName];\n var rpcUrlName = WebChannelConnection.RPC_STREAM_NAME_MAPPING[rpcName];\n if (!rpcService || !rpcUrlName) {\n fail('Unknown RPC name: ' + rpcName);\n }\n var urlParts = [\n this.baseUrl,\n '/',\n rpcService,\n '/',\n rpcUrlName,\n '/channel'\n ];\n var webchannelTransport = createWebChannelTransport();\n var request = {\n // Background channel test avoids the initial two test calls and decreases\n // initial cold start time.\n // TODO(dimond): wenboz@ mentioned this might affect use with proxies and\n // we should monitor closely for any reports.\n backgroundChannelTest: true,\n // Required for backend stickiness, routing behavior is based on this\n // parameter.\n httpSessionIdParam: 'gsessionid',\n initMessageHeaders: {},\n sendRawJson: true,\n supportsCrossDomainXhr: true\n };\n this.modifyHeadersForRequest(request.initMessageHeaders, token);\n var url = urlParts.join('');\n log.debug(LOG_TAG, 'Creating WebChannel: ' + url + ' ' + request);\n // tslint:disable-next-line:no-any Because listen isn't defined on it.\n var channel = webchannelTransport.createWebChannel(url, request);\n // WebChannel supports sending the first message with the handshake - saving\n // a network round trip. However, it will have to call send in the same\n // JS event loop as open. In order to enforce this, we delay actually\n // opening the WebChannel until send is called. Whether we have called\n // open is tracked with this variable.\n var opened = false;\n // A flag to determine whether the stream was closed (by us or through an\n // error/close event) to avoid delivering multiple close events or sending\n // on a closed stream\n var closed = false;\n // tslint:disable-next-line:no-any\n var streamBridge = new StreamBridge({\n sendFn: function (msg) {\n if (!closed) {\n if (!opened) {\n log.debug(LOG_TAG, 'Opening WebChannel transport.');\n channel.open();\n opened = true;\n }\n log.debug(LOG_TAG, 'WebChannel sending:', msg);\n channel.send(msg);\n }\n else {\n log.debug(LOG_TAG, 'Not sending because WebChannel is closed:', msg);\n }\n },\n closeFn: function () { return channel.close(); }\n });\n // Closure events are guarded and exceptions are swallowed, so catch any\n // exception and rethrow using a setTimeout so they become visible again.\n // Note that eventually this function could go away if we are confident\n // enough the code is exception free.\n var unguardedEventListen = function (type, fn) {\n // TODO(dimond): closure typing seems broken because WebChannel does\n // not implement goog.events.Listenable\n channel.listen(type, function (param) {\n try {\n fn(param);\n }\n catch (e) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n });\n };\n unguardedEventListen(WebChannel.EventType.OPEN, function () {\n if (!closed) {\n log.debug(LOG_TAG, 'WebChannel transport opened.');\n }\n });\n unguardedEventListen(WebChannel.EventType.CLOSE, function () {\n if (!closed) {\n closed = true;\n log.debug(LOG_TAG, 'WebChannel transport closed');\n streamBridge.callOnClose();\n }\n });\n unguardedEventListen(WebChannel.EventType.ERROR, function (err) {\n if (!closed) {\n closed = true;\n log.debug(LOG_TAG, 'WebChannel transport errored:', err);\n streamBridge.callOnClose(new FirestoreError(Code.UNAVAILABLE, 'The operation could not be completed'));\n }\n });\n unguardedEventListen(WebChannel.EventType.MESSAGE, function (msg) {\n if (!closed) {\n // WebChannel delivers message events as array. If batching\n // is not enabled (it's off by default) each message will be\n // delivered alone, resulting in a single element array.\n var msgData = msg.data[0];\n assert(!!msgData, 'Got a webchannel message without data.');\n // TODO(b/35143891): There is a bug in One Platform that caused errors\n // (and only errors) to be wrapped in an extra array. To be forward\n // compatible with the bug we need to check either condition. The latter\n // can be removed once the fix has been rolled out.\n var error = msgData.error || (msgData[0] && msgData[0].error);\n if (error) {\n log.debug(LOG_TAG, 'WebChannel received error:', error);\n // error.status will be a string like 'OK' or 'NOT_FOUND'.\n var status_2 = error.status;\n var code = mapCodeFromRpcStatus(status_2);\n var message = error.message;\n if (code === undefined) {\n code = Code.INTERNAL;\n message =\n 'Unknown error status: ' +\n status_2 +\n ' with message ' +\n error.message;\n }\n // Mark closed so no further events are propagated\n closed = true;\n streamBridge.callOnClose(new FirestoreError(code, message));\n channel.close();\n }\n else {\n log.debug(LOG_TAG, 'WebChannel received:', msgData);\n streamBridge.callOnMessage(msgData);\n }\n }\n });\n setTimeout(function () {\n // Technically we could/should wait for the WebChannel opened event,\n // but because we want to send the first message with the WebChannel\n // handshake we pretend the channel opened here (asynchronously), and\n // then delay the actual open until the first message is sent.\n streamBridge.callOnOpen();\n }, 0);\n return streamBridge;\n };\n // visible for testing\n WebChannelConnection.prototype.makeUrl = function (rpcName) {\n var url = [this.baseUrl, '/', RPC_URL_VERSION];\n url.push('/projects/');\n url.push(this.databaseId.projectId);\n url.push('/databases/');\n url.push(this.databaseId.database);\n url.push('/documents');\n url.push(':');\n url.push(rpcName);\n return url.join('');\n };\n /**\n * Mapping from RPC name to service providing the RPC.\n * For streaming RPCs only.\n */\n WebChannelConnection.RPC_STREAM_SERVICE_MAPPING = {\n Write: 'google.firestore.v1beta1.Firestore',\n Listen: 'google.firestore.v1beta1.Firestore'\n };\n /**\n * Mapping from RPC name to actual RPC name in URLs.\n * For streaming RPCs only.\n */\n WebChannelConnection.RPC_STREAM_NAME_MAPPING = {\n Write: 'Write',\n Listen: 'Listen'\n };\n return WebChannelConnection;\n}());\nexport { WebChannelConnection };\n\n//# sourceMappingURL=webchannel_connection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/platform_browser/webchannel_connection.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { JsonProtoSerializer } from '../remote/serializer';\nimport { WebChannelConnection } from './webchannel_connection';\nvar BrowserPlatform = /** @class */ (function () {\n function BrowserPlatform() {\n this.emptyByteString = '';\n this.base64Available = typeof atob !== 'undefined';\n }\n BrowserPlatform.prototype.loadConnection = function (databaseInfo) {\n return Promise.resolve(new WebChannelConnection(databaseInfo));\n };\n BrowserPlatform.prototype.newSerializer = function (databaseId) {\n return new JsonProtoSerializer(databaseId, { useProto3Json: true });\n };\n BrowserPlatform.prototype.atob = function (encoded) {\n return atob(encoded);\n };\n BrowserPlatform.prototype.btoa = function (raw) {\n return btoa(raw);\n };\n return BrowserPlatform;\n}());\nexport { BrowserPlatform };\n\n//# sourceMappingURL=browser_platform.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/platform_browser/browser_platform.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PlatformSupport } from '../platform/platform';\nimport { BrowserPlatform } from './browser_platform';\n/**\n * This code needs to run before Firestore is used. This can be achieved in\n * several ways:\n * 1) Through the JSCompiler compiling this code and then (automatically)\n * executing it before exporting the Firestore symbols.\n * 2) Through importing this module first in a Firestore main module\n */\nPlatformSupport.setPlatform(new BrowserPlatform());\n\n//# sourceMappingURL=browser_init.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/platform_browser/browser_init.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Describes the online state of the Firestore client */\nexport var OnlineState;\n(function (OnlineState) {\n /**\n * The Firestore client is in an unknown online state. This means the client\n * is either not actively trying to establish a connection or it was\n * previously in an unknown state and is trying to establish a connection.\n */\n OnlineState[OnlineState[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The client is connected and the connections are healthy. This state is\n * reached after a successful connection and there has been at least one\n * succesful message received from the backends.\n */\n OnlineState[OnlineState[\"Healthy\"] = 1] = \"Healthy\";\n /**\n * The client has tried to establish a connection but has failed.\n * This state is reached after either a connection attempt failed or a\n * healthy stream was closed for unexpected reasons.\n */\n OnlineState[OnlineState[\"Failed\"] = 2] = \"Failed\";\n})(OnlineState = OnlineState || (OnlineState = {}));\n\n//# sourceMappingURL=types.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/types.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DocumentKey } from '../model/document_key';\nimport { fail } from '../util/assert';\nimport { SortedMap } from '../util/sorted_map';\nexport var ChangeType;\n(function (ChangeType) {\n ChangeType[ChangeType[\"Added\"] = 0] = \"Added\";\n ChangeType[ChangeType[\"Removed\"] = 1] = \"Removed\";\n ChangeType[ChangeType[\"Modified\"] = 2] = \"Modified\";\n ChangeType[ChangeType[\"Metadata\"] = 3] = \"Metadata\";\n})(ChangeType = ChangeType || (ChangeType = {}));\nexport var SyncState;\n(function (SyncState) {\n SyncState[SyncState[\"Local\"] = 0] = \"Local\";\n SyncState[SyncState[\"Synced\"] = 1] = \"Synced\";\n})(SyncState = SyncState || (SyncState = {}));\n/**\n * DocumentChangeSet keeps track of a set of changes to docs in a query, merging\n * duplicate events for the same doc.\n */\nvar DocumentChangeSet = /** @class */ (function () {\n function DocumentChangeSet() {\n this.changeMap = new SortedMap(DocumentKey.comparator);\n }\n DocumentChangeSet.prototype.track = function (change) {\n var key = change.doc.key;\n var oldChange = this.changeMap.get(key);\n if (!oldChange) {\n this.changeMap = this.changeMap.insert(key, change);\n return;\n }\n // Merge the new change with the existing change.\n if (change.type !== ChangeType.Added &&\n oldChange.type === ChangeType.Metadata) {\n this.changeMap = this.changeMap.insert(key, change);\n }\n else if (change.type === ChangeType.Metadata &&\n oldChange.type !== ChangeType.Removed) {\n this.changeMap = this.changeMap.insert(key, {\n type: oldChange.type,\n doc: change.doc\n });\n }\n else if (change.type === ChangeType.Modified &&\n oldChange.type === ChangeType.Modified) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Modified,\n doc: change.doc\n });\n }\n else if (change.type === ChangeType.Modified &&\n oldChange.type === ChangeType.Added) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Added,\n doc: change.doc\n });\n }\n else if (change.type === ChangeType.Removed &&\n oldChange.type === ChangeType.Added) {\n this.changeMap = this.changeMap.remove(key);\n }\n else if (change.type === ChangeType.Removed &&\n oldChange.type === ChangeType.Modified) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Removed,\n doc: oldChange.doc\n });\n }\n else if (change.type === ChangeType.Added &&\n oldChange.type === ChangeType.Removed) {\n this.changeMap = this.changeMap.insert(key, {\n type: ChangeType.Modified,\n doc: change.doc\n });\n }\n else {\n // This includes these cases, which don't make sense:\n // Added->Added\n // Removed->Removed\n // Modified->Added\n // Removed->Modified\n // Metadata->Added\n // Removed->Metadata\n fail('unsupported combination of changes: ' +\n JSON.stringify(change) +\n ' after ' +\n JSON.stringify(oldChange));\n }\n };\n DocumentChangeSet.prototype.getChanges = function () {\n var changes = [];\n this.changeMap.inorderTraversal(function (key, change) {\n changes.push(change);\n });\n return changes;\n };\n return DocumentChangeSet;\n}());\nexport { DocumentChangeSet };\n\n//# sourceMappingURL=view_snapshot.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/view_snapshot.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar RESERVED_BITS = 1;\nvar GeneratorIds;\n(function (GeneratorIds) {\n GeneratorIds[GeneratorIds[\"LocalStore\"] = 0] = \"LocalStore\";\n GeneratorIds[GeneratorIds[\"SyncEngine\"] = 1] = \"SyncEngine\";\n})(GeneratorIds || (GeneratorIds = {}));\n/**\n * TargetIdGenerator generates monotonically increasing integer IDs. There are\n * separate generators for different scopes. While these generators will operate\n * independently of each other, they are scoped, such that no two generators\n * will ever produce the same ID. This is useful, because sometimes the backend\n * may group IDs from separate parts of the client into the same ID space.\n */\nvar TargetIdGenerator = /** @class */ (function () {\n function TargetIdGenerator(generatorId, initAfter) {\n if (initAfter === void 0) { initAfter = 0; }\n this.generatorId = generatorId;\n // Replace the generator part of initAfter with this generator's ID.\n var afterWithoutGenerator = (initAfter >> RESERVED_BITS) << RESERVED_BITS;\n var afterGenerator = initAfter - afterWithoutGenerator;\n if (afterGenerator >= generatorId) {\n // For example, if:\n // this.generatorId = 0b0000\n // after = 0b1011\n // afterGenerator = 0b0001\n // Then:\n // previous = 0b1010\n // next = 0b1100\n this.previousId = afterWithoutGenerator | this.generatorId;\n }\n else {\n // For example, if:\n // this.generatorId = 0b0001\n // after = 0b1010\n // afterGenerator = 0b0000\n // Then:\n // previous = 0b1001\n // next = 0b1011\n this.previousId =\n (afterWithoutGenerator | this.generatorId) - (1 << RESERVED_BITS);\n }\n }\n TargetIdGenerator.prototype.next = function () {\n this.previousId += 1 << RESERVED_BITS;\n return this.previousId;\n };\n TargetIdGenerator.forLocalStore = function (initAfter) {\n if (initAfter === void 0) { initAfter = 0; }\n return new TargetIdGenerator(GeneratorIds.LocalStore, initAfter);\n };\n TargetIdGenerator.forSyncEngine = function () {\n return new TargetIdGenerator(GeneratorIds.SyncEngine);\n };\n return TargetIdGenerator;\n}());\nexport { TargetIdGenerator };\n\n//# sourceMappingURL=target_id_generator.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/target_id_generator.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { SortedMap } from '../util/sorted_map';\nimport { documentMap } from './collections';\nimport { DocumentKey } from './document_key';\n/**\n * DocumentSet is an immutable (copy-on-write) collection that holds documents\n * in order specified by the provided comparator. We always add a document key\n * comparator on top of what is provided to guarantee document equality based on\n * the key.\n */\nvar DocumentSet = /** @class */ (function () {\n /** The default ordering is by key if the comparator is omitted */\n function DocumentSet(comp) {\n // We are adding document key comparator to the end as it's the only\n // guaranteed unique property of a document.\n if (comp) {\n this.comparator = function (d1, d2) {\n return comp(d1, d2) || DocumentKey.comparator(d1.key, d2.key);\n };\n }\n else {\n this.comparator = function (d1, d2) {\n return DocumentKey.comparator(d1.key, d2.key);\n };\n }\n this.keyedMap = documentMap();\n this.sortedSet = new SortedMap(this.comparator);\n }\n /**\n * Returns an empty copy of the existing DocumentSet, using the same\n * comparator.\n */\n DocumentSet.emptySet = function (oldSet) {\n return new DocumentSet(oldSet.comparator);\n };\n DocumentSet.prototype.has = function (key) {\n return this.keyedMap.get(key) != null;\n };\n DocumentSet.prototype.get = function (key) {\n return this.keyedMap.get(key);\n };\n DocumentSet.prototype.first = function () {\n return this.sortedSet.minKey();\n };\n DocumentSet.prototype.last = function () {\n return this.sortedSet.maxKey();\n };\n DocumentSet.prototype.isEmpty = function () {\n return this.sortedSet.isEmpty();\n };\n /**\n * Returns previous document or null if it's a first doc.\n *\n * @param key A key that MUST be present in the DocumentSet.\n */\n DocumentSet.prototype.prevDoc = function (key) {\n assert(this.has(key), 'Trying to get a previous document to non-existing key: ' + key);\n var doc = this.keyedMap.get(key);\n return this.sortedSet.getPredecessorKey(doc);\n };\n /**\n * Returns the index of the provided key in the document set, or -1 if the\n * document key is not present in the set;\n */\n DocumentSet.prototype.indexOf = function (key) {\n var doc = this.keyedMap.get(key);\n return doc ? this.sortedSet.indexOf(doc) : -1;\n };\n Object.defineProperty(DocumentSet.prototype, \"size\", {\n get: function () {\n return this.sortedSet.size;\n },\n enumerable: true,\n configurable: true\n });\n /** Iterates documents in order defined by \"comparator\" */\n DocumentSet.prototype.forEach = function (cb) {\n this.sortedSet.inorderTraversal(function (k, v) {\n cb(k);\n return false;\n });\n };\n /** Inserts or updates a document with the same key */\n DocumentSet.prototype.add = function (doc) {\n // First remove the element if we have it.\n var set = this.delete(doc.key);\n return set.copy(set.keyedMap.insert(doc.key, doc), set.sortedSet.insert(doc, null));\n };\n /** Deletes a document with a given key */\n DocumentSet.prototype.delete = function (key) {\n var doc = this.get(key);\n if (!doc) {\n return this;\n }\n return this.copy(this.keyedMap.remove(key), this.sortedSet.remove(doc));\n };\n DocumentSet.prototype.equals = function (other) {\n if (!(other instanceof DocumentSet))\n return false;\n if (this.size !== other.size)\n return false;\n var thisIt = this.sortedSet.getIterator();\n var otherIt = other.sortedSet.getIterator();\n while (thisIt.hasNext()) {\n var thisDoc = thisIt.getNext().key;\n var otherDoc = otherIt.getNext().key;\n if (!thisDoc.equals(otherDoc))\n return false;\n }\n return true;\n };\n DocumentSet.prototype.toString = function () {\n var docStrings = [];\n this.forEach(function (doc) {\n docStrings.push(doc.toString());\n });\n if (docStrings.length === 0) {\n return 'DocumentSet ()';\n }\n else {\n return 'DocumentSet (\\n ' + docStrings.join(' \\n') + '\\n)';\n }\n };\n DocumentSet.prototype.copy = function (keyedMap, sortedSet) {\n var newSet = new DocumentSet();\n newSet.comparator = this.comparator;\n newSet.keyedMap = keyedMap;\n newSet.sortedSet = sortedSet;\n return newSet;\n };\n return DocumentSet;\n}());\nexport { DocumentSet };\n\n//# sourceMappingURL=document_set.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/document_set.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as objUtil from './obj';\n/**\n * A map implementation that uses objects as keys. Objects must implement the\n * Equatable interface and must be immutable. Entries in the map are stored\n * together with the key being produced from the mapKeyFn. This map\n * automatically handles collisions of keys.\n */\nvar ObjectMap = /** @class */ (function () {\n function ObjectMap(mapKeyFn) {\n this.mapKeyFn = mapKeyFn;\n /**\n * The inner map for a key -> value pair. Due to the possibility of\n * collisions we keep a list of entries that we do a linear search through\n * to find an actual match. Note that collisions should be rare, so we still\n * expect near constant time lookups in practice.\n */\n this.inner = {};\n }\n /** Get a value for this key, or undefined if it does not exist. */\n ObjectMap.prototype.get = function (key) {\n var id = this.mapKeyFn(key);\n var matches = this.inner[id];\n if (matches === undefined) {\n return undefined;\n }\n for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {\n var _a = matches_1[_i], otherKey = _a[0], value = _a[1];\n if (otherKey.equals(key)) {\n return value;\n }\n }\n return undefined;\n };\n ObjectMap.prototype.has = function (key) {\n return this.get(key) !== undefined;\n };\n /** Put this key and value in the map. */\n ObjectMap.prototype.set = function (key, value) {\n var id = this.mapKeyFn(key);\n var matches = this.inner[id];\n if (matches === undefined) {\n this.inner[id] = [[key, value]];\n return;\n }\n for (var i = 0; i < matches.length; i++) {\n if (matches[i][0].equals(key)) {\n matches[i] = [key, value];\n return;\n }\n }\n matches.push([key, value]);\n };\n /**\n * Remove this key from the map. Returns a boolean if anything was deleted.\n */\n ObjectMap.prototype.delete = function (key) {\n var id = this.mapKeyFn(key);\n var matches = this.inner[id];\n if (matches === undefined) {\n return false;\n }\n for (var i = 0; i < matches.length; i++) {\n if (matches[i][0].equals(key)) {\n if (matches.length === 1) {\n delete this.inner[id];\n }\n else {\n matches.splice(i, 1);\n }\n return true;\n }\n }\n return false;\n };\n ObjectMap.prototype.forEach = function (fn) {\n objUtil.forEach(this.inner, function (_, entries) {\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n fn(k, v);\n }\n });\n };\n ObjectMap.prototype.isEmpty = function () {\n return objUtil.isEmpty(this.inner);\n };\n return ObjectMap;\n}());\nexport { ObjectMap };\n\n//# sourceMappingURL=obj_map.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/obj_map.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { OnlineState } from './types';\nimport { ChangeType } from './view_snapshot';\nimport { DocumentSet } from '../model/document_set';\nimport { assert } from '../util/assert';\nimport { ObjectMap } from '../util/obj_map';\n/**\n * Holds the listeners and the last received ViewSnapshot for a query being\n * tracked by EventManager.\n */\nvar QueryListenersInfo = /** @class */ (function () {\n function QueryListenersInfo() {\n this.listeners = [];\n }\n return QueryListenersInfo;\n}());\n/**\n * EventManager is responsible for mapping queries to query event emitters.\n * It handles \"fan-out\". -- Identical queries will re-use the same watch on the\n * backend.\n */\nvar EventManager = /** @class */ (function () {\n function EventManager(syncEngine) {\n this.syncEngine = syncEngine;\n this.queries = new ObjectMap(function (q) {\n return q.canonicalId();\n });\n this.onlineState = OnlineState.Unknown;\n this.syncEngine.subscribe(this.onChange.bind(this), this.onError.bind(this));\n }\n EventManager.prototype.listen = function (listener) {\n var query = listener.query;\n var firstListen = false;\n var queryInfo = this.queries.get(query);\n if (!queryInfo) {\n firstListen = true;\n queryInfo = new QueryListenersInfo();\n this.queries.set(query, queryInfo);\n }\n queryInfo.listeners.push(listener);\n listener.onOnlineStateChanged(this.onlineState);\n if (queryInfo.viewSnap)\n listener.onViewSnapshot(queryInfo.viewSnap);\n if (firstListen) {\n return this.syncEngine.listen(query).then(function (targetId) {\n queryInfo.targetId = targetId;\n return targetId;\n });\n }\n else {\n return Promise.resolve(queryInfo.targetId);\n }\n };\n EventManager.prototype.unlisten = function (listener) {\n var query = listener.query;\n var lastListen = false;\n var queryInfo = this.queries.get(query);\n if (queryInfo) {\n var i = queryInfo.listeners.indexOf(listener);\n if (i >= 0) {\n queryInfo.listeners.splice(i, 1);\n lastListen = queryInfo.listeners.length === 0;\n }\n }\n if (lastListen) {\n this.queries.delete(query);\n return this.syncEngine.unlisten(query);\n }\n else {\n return Promise.resolve();\n }\n };\n EventManager.prototype.onChange = function (viewSnaps) {\n for (var _i = 0, viewSnaps_1 = viewSnaps; _i < viewSnaps_1.length; _i++) {\n var viewSnap = viewSnaps_1[_i];\n var query = viewSnap.query;\n var queryInfo = this.queries.get(query);\n if (queryInfo) {\n for (var _a = 0, _b = queryInfo.listeners; _a < _b.length; _a++) {\n var listener = _b[_a];\n listener.onViewSnapshot(viewSnap);\n }\n queryInfo.viewSnap = viewSnap;\n }\n }\n };\n EventManager.prototype.onError = function (query, error) {\n var queryInfo = this.queries.get(query);\n if (queryInfo) {\n for (var _i = 0, _a = queryInfo.listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener.onError(error);\n }\n }\n // Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()\n // after an error.\n this.queries.delete(query);\n };\n EventManager.prototype.onOnlineStateChanged = function (onlineState) {\n this.onlineState = onlineState;\n this.queries.forEach(function (_, queryInfo) {\n for (var _i = 0, _a = queryInfo.listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener.onOnlineStateChanged(onlineState);\n }\n });\n };\n return EventManager;\n}());\nexport { EventManager };\n/**\n * QueryListener takes a series of internal view snapshots and determines\n * when to raise the event.\n *\n * It uses an Observer to dispatch events.\n */\nvar QueryListener = /** @class */ (function () {\n function QueryListener(query, queryObserver, options) {\n this.query = query;\n this.queryObserver = queryObserver;\n /**\n * Initial snapshots (e.g. from cache) may not be propagated to the wrapped\n * observer. This flag is set to true once we've actually raised an event.\n */\n this.raisedInitialEvent = false;\n this.onlineState = OnlineState.Unknown;\n this.options = options || {};\n }\n QueryListener.prototype.onViewSnapshot = function (snap) {\n assert(snap.docChanges.length > 0 || snap.syncStateChanged, 'We got a new snapshot with no changes?');\n if (!this.options.includeDocumentMetadataChanges) {\n // Remove the metadata only changes.\n var docChanges = [];\n for (var _i = 0, _a = snap.docChanges; _i < _a.length; _i++) {\n var docChange = _a[_i];\n if (docChange.type !== ChangeType.Metadata) {\n docChanges.push(docChange);\n }\n }\n snap = {\n query: snap.query,\n docs: snap.docs,\n oldDocs: snap.oldDocs,\n docChanges: docChanges,\n fromCache: snap.fromCache,\n hasPendingWrites: snap.hasPendingWrites,\n syncStateChanged: snap.syncStateChanged\n };\n }\n if (!this.raisedInitialEvent) {\n if (this.shouldRaiseInitialEvent(snap, this.onlineState)) {\n this.raiseInitialEvent(snap);\n }\n }\n else if (this.shouldRaiseEvent(snap)) {\n this.queryObserver.next(snap);\n }\n this.snap = snap;\n };\n QueryListener.prototype.onError = function (error) {\n this.queryObserver.error(error);\n };\n QueryListener.prototype.onOnlineStateChanged = function (onlineState) {\n this.onlineState = onlineState;\n if (this.snap &&\n !this.raisedInitialEvent &&\n this.shouldRaiseInitialEvent(this.snap, onlineState)) {\n this.raiseInitialEvent(this.snap);\n }\n };\n QueryListener.prototype.shouldRaiseInitialEvent = function (snap, onlineState) {\n assert(!this.raisedInitialEvent, 'Determining whether to raise first event but already had first event');\n // Always raise the first event when we're synced\n if (!snap.fromCache) {\n return true;\n }\n // NOTE: We consider OnlineState.Unknown as online (it should become Failed\n // or Online if we wait long enough).\n var maybeOnline = onlineState !== OnlineState.Failed;\n // Don't raise the event if we're online, aren't synced yet (checked\n // above) and are waiting for a sync.\n if (this.options.waitForSyncWhenOnline && maybeOnline) {\n assert(snap.fromCache, 'Waiting for sync, but snapshot is not from cache');\n return false;\n }\n // Raise data from cache if we have any documents or we are offline\n return !snap.docs.isEmpty() || onlineState === OnlineState.Failed;\n };\n QueryListener.prototype.shouldRaiseEvent = function (snap) {\n // We don't need to handle includeDocumentMetadataChanges here because\n // the Metadata only changes have already been stripped out if needed.\n // At this point the only changes we will see are the ones we should\n // propagate.\n if (snap.docChanges.length > 0) {\n return true;\n }\n var hasPendingWritesChanged = this.snap && this.snap.hasPendingWrites !== snap.hasPendingWrites;\n if (snap.syncStateChanged || hasPendingWritesChanged) {\n return this.options.includeQueryMetadataChanges === true;\n }\n // Generally we should have hit one of the cases above, but it's possible\n // to get here if there were only metadata docChanges and they got\n // stripped out.\n return false;\n };\n QueryListener.prototype.raiseInitialEvent = function (snap) {\n assert(!this.raisedInitialEvent, 'Trying to raise initial events for second time');\n snap = {\n query: snap.query,\n docs: snap.docs,\n oldDocs: DocumentSet.emptySet(snap.docs),\n docChanges: QueryListener.getInitialViewChanges(snap),\n fromCache: snap.fromCache,\n hasPendingWrites: snap.hasPendingWrites,\n syncStateChanged: true\n };\n this.raisedInitialEvent = true;\n this.queryObserver.next(snap);\n };\n /** Returns changes as if all documents in the snap were added. */\n QueryListener.getInitialViewChanges = function (snap) {\n var result = [];\n snap.docs.forEach(function (doc) {\n result.push({ type: ChangeType.Added, doc: doc });\n });\n return result;\n };\n return QueryListener;\n}());\nexport { QueryListener };\n\n//# sourceMappingURL=event_manager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/event_manager.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { fail } from '../util/assert';\n/**\n * PersistencePromise<> is essentially a re-implementation of Promise<> except\n * it has a .next() method instead of .then() and .next() and .catch() callbacks\n * are executed synchronously when a PersistencePromise resolves rather than\n * asynchronously (Promise<> implementations use setImmediate() or similar).\n *\n * This is necessary to interoperate with IndexedDB which will automatically\n * commit transactions if control is returned to the event loop without\n * synchronously initiating another operation on the transaction.\n *\n * NOTE: .then() and .catch() only allow a single consumer, unlike normal\n * Promises.\n */\nvar PersistencePromise = /** @class */ (function () {\n function PersistencePromise(callback) {\n var _this = this;\n // NOTE: next/catchCallback will always point to our own wrapper functions,\n // not the user's raw next() or catch() callbacks.\n this.nextCallback = null;\n this.catchCallback = null;\n // When the operation resolves, we'll set result or error and mark isDone.\n this.result = undefined;\n this.error = null;\n this.isDone = false;\n // Set to true when .then() or .catch() are called and prevents additional\n // chaining.\n this.callbackAttached = false;\n callback(function (value) {\n _this.isDone = true;\n _this.result = value;\n if (_this.nextCallback) {\n // value should be defined unless T is Void, but we can't express\n // that in the type system.\n _this.nextCallback(value);\n }\n }, function (error) {\n _this.isDone = true;\n _this.error = error;\n if (_this.catchCallback) {\n _this.catchCallback(error);\n }\n });\n }\n PersistencePromise.prototype.catch = function (fn) {\n return this.next(undefined, fn);\n };\n PersistencePromise.prototype.next = function (nextFn, catchFn) {\n var _this = this;\n if (this.callbackAttached) {\n fail('Called next() or catch() twice for PersistencePromise');\n }\n this.callbackAttached = true;\n if (this.isDone) {\n if (!this.error) {\n return this.wrapSuccess(nextFn, this.result);\n }\n else {\n return this.wrapFailure(catchFn, this.error);\n }\n }\n else {\n return new PersistencePromise(function (resolve, reject) {\n _this.nextCallback = function (value) {\n _this.wrapSuccess(nextFn, value).next(resolve, reject);\n };\n _this.catchCallback = function (error) {\n _this.wrapFailure(catchFn, error).next(resolve, reject);\n };\n });\n }\n };\n PersistencePromise.prototype.toPromise = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n _this.next(resolve, reject);\n });\n };\n PersistencePromise.prototype.wrapUserFunction = function (fn) {\n try {\n var result = fn();\n if (result instanceof PersistencePromise) {\n return result;\n }\n else {\n return PersistencePromise.resolve(result);\n }\n }\n catch (e) {\n return PersistencePromise.reject(e);\n }\n };\n PersistencePromise.prototype.wrapSuccess = function (nextFn, value) {\n if (nextFn) {\n return this.wrapUserFunction(function () { return nextFn(value); });\n }\n else {\n // If there's no nextFn, then R must be the same as T but we\n // can't express that in the type system.\n return PersistencePromise.resolve(value);\n }\n };\n PersistencePromise.prototype.wrapFailure = function (catchFn, error) {\n if (catchFn) {\n return this.wrapUserFunction(function () { return catchFn(error); });\n }\n else {\n return PersistencePromise.reject(error);\n }\n };\n PersistencePromise.resolve = function (result) {\n return new PersistencePromise(function (resolve, reject) {\n resolve(result);\n });\n };\n PersistencePromise.reject = function (error) {\n return new PersistencePromise(function (resolve, reject) {\n reject(error);\n });\n };\n PersistencePromise.waitFor = function (all) {\n return all.reduce(function (promise, nextPromise, idx) {\n return promise.next(function () {\n return nextPromise;\n });\n }, PersistencePromise.resolve());\n };\n PersistencePromise.map = function (all) {\n var results = [];\n var first = true;\n // initial is ignored, so we can cheat on the type.\n var initial = PersistencePromise.resolve(null);\n return all\n .reduce(function (promise, nextPromise) {\n return promise.next(function (result) {\n if (!first) {\n results.push(result);\n }\n first = false;\n return nextPromise;\n });\n }, initial)\n .next(function (result) {\n results.push(result);\n return results;\n });\n };\n return PersistencePromise;\n}());\nexport { PersistencePromise };\n\n//# sourceMappingURL=persistence_promise.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/persistence_promise.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentKeySet } from '../model/collections';\nimport { PersistencePromise } from './persistence_promise';\n/**\n * A garbage collector implementation that eagerly collects documents as soon as\n * they're no longer referenced in any of its registered GarbageSources.\n *\n * This implementation keeps track of a set of keys that are potentially garbage\n * without keeping an exact reference count. During collectGarbage, the\n * collector verifies that all potential garbage keys actually have no\n * references by consulting its list of garbage sources.\n */\nvar EagerGarbageCollector = /** @class */ (function () {\n function EagerGarbageCollector() {\n this.isEager = true;\n /**\n * The garbage collectible sources to double-check during garbage collection.\n */\n this.sources = [];\n /**\n * A set of potentially garbage keys.\n * PORTING NOTE: This would be a mutable set if Javascript had one.\n */\n this.potentialGarbage = documentKeySet();\n }\n EagerGarbageCollector.prototype.addGarbageSource = function (garbageSource) {\n this.sources.push(garbageSource);\n garbageSource.setGarbageCollector(this);\n };\n EagerGarbageCollector.prototype.removeGarbageSource = function (garbageSource) {\n this.sources.splice(this.sources.indexOf(garbageSource), 1);\n garbageSource.setGarbageCollector(null);\n };\n EagerGarbageCollector.prototype.addPotentialGarbageKey = function (key) {\n this.potentialGarbage = this.potentialGarbage.add(key);\n };\n EagerGarbageCollector.prototype.collectGarbage = function (txn) {\n var _this = this;\n var promises = [];\n var garbageKeys = documentKeySet();\n this.potentialGarbage.forEach(function (key) {\n var hasRefsPromise = _this.documentHasAnyReferences(txn, key);\n promises.push(hasRefsPromise.next(function (hasRefs) {\n // If there are no references, get the key.\n if (!hasRefs) {\n garbageKeys = garbageKeys.add(key);\n }\n return PersistencePromise.resolve();\n }));\n });\n // Clear locally retained potential keys and returned confirmed garbage.\n this.potentialGarbage = documentKeySet();\n return PersistencePromise.waitFor(promises).next(function () { return garbageKeys; });\n };\n EagerGarbageCollector.prototype.documentHasAnyReferences = function (txn, key) {\n var initial = PersistencePromise.resolve(false);\n return this.sources\n .map(function (source) { return function () { return source.containsKey(txn, key); }; })\n .reduce(function (promise, nextPromise) {\n return promise.next(function (result) {\n if (result) {\n return PersistencePromise.resolve(true);\n }\n else {\n return nextPromise();\n }\n });\n }, initial);\n };\n return EagerGarbageCollector;\n}());\nexport { EagerGarbageCollector };\n\n//# sourceMappingURL=eager_garbage_collector.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/eager_garbage_collector.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ChangeType } from '../core/view_snapshot';\nimport { documentKeySet } from '../model/collections';\n/**\n * A set of changes to what documents are currently in view and out of view for\n * a given query. These changes are sent to the LocalStore by the View (via\n * the SyncEngine) and are used to pin / unpin documents as appropriate.\n */\nvar LocalViewChanges = /** @class */ (function () {\n function LocalViewChanges(query, addedKeys, removedKeys) {\n this.query = query;\n this.addedKeys = addedKeys;\n this.removedKeys = removedKeys;\n }\n LocalViewChanges.fromSnapshot = function (viewSnapshot) {\n var addedKeys = documentKeySet();\n var removedKeys = documentKeySet();\n for (var _i = 0, _a = viewSnapshot.docChanges; _i < _a.length; _i++) {\n var docChange = _a[_i];\n switch (docChange.type) {\n case ChangeType.Added:\n addedKeys = addedKeys.add(docChange.doc.key);\n break;\n case ChangeType.Removed:\n removedKeys = removedKeys.add(docChange.doc.key);\n break;\n default:\n }\n }\n return new LocalViewChanges(viewSnapshot.query, addedKeys, removedKeys);\n };\n return LocalViewChanges;\n}());\nexport { LocalViewChanges };\n\n//# sourceMappingURL=local_view_changes.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/local_view_changes.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentKeySet } from '../model/collections';\nimport { DocumentKey } from '../model/document_key';\nimport { primitiveComparator } from '../util/misc';\nimport { SortedSet } from '../util/sorted_set';\nimport { PersistencePromise } from './persistence_promise';\n/**\n * A collection of references to a document from some kind of numbered entity\n * (either a target ID or batch ID). As references are added to or removed from\n * the set corresponding events are emitted to a registered garbage collector.\n *\n * Each reference is represented by a DocumentReference object. Each of them\n * contains enough information to uniquely identify the reference. They are all\n * stored primarily in a set sorted by key. A document is considered garbage if\n * there's no references in that set (this can be efficiently checked thanks to\n * sorting by key).\n *\n * ReferenceSet also keeps a secondary set that contains references sorted by\n * IDs. This one is used to efficiently implement removal of all references by\n * some target ID.\n */\nvar ReferenceSet = /** @class */ (function () {\n function ReferenceSet() {\n // A set of outstanding references to a document sorted by key.\n this.refsByKey = new SortedSet(DocReference.compareByKey);\n // A set of outstanding references to a document sorted by target id.\n this.refsByTarget = new SortedSet(DocReference.compareByTargetId);\n /** Keeps track of keys that have references */\n this.garbageCollector = null;\n }\n /** Returns true if the reference set contains no references. */\n ReferenceSet.prototype.isEmpty = function () {\n return this.refsByKey.isEmpty();\n };\n /** Adds a reference to the given document key for the given ID. */\n ReferenceSet.prototype.addReference = function (key, id) {\n var ref = new DocReference(key, id);\n this.refsByKey = this.refsByKey.add(ref);\n this.refsByTarget = this.refsByTarget.add(ref);\n };\n /** Add references to the given document keys for the given ID. */\n ReferenceSet.prototype.addReferences = function (keys, id) {\n var _this = this;\n keys.forEach(function (key) { return _this.addReference(key, id); });\n };\n /**\n * Removes a reference to the given document key for the given\n * ID.\n */\n ReferenceSet.prototype.removeReference = function (key, id) {\n this.removeRef(new DocReference(key, id));\n };\n ReferenceSet.prototype.removeReferences = function (keys, id) {\n var _this = this;\n keys.forEach(function (key) { return _this.removeReference(key, id); });\n };\n /**\n * Clears all references with a given ID. Calls removeRef() for each key\n * removed.\n */\n ReferenceSet.prototype.removeReferencesForId = function (id) {\n var _this = this;\n var emptyKey = DocumentKey.EMPTY;\n var startRef = new DocReference(emptyKey, id);\n var endRef = new DocReference(emptyKey, id + 1);\n this.refsByTarget.forEachInRange([startRef, endRef], function (ref) {\n _this.removeRef(ref);\n });\n };\n ReferenceSet.prototype.removeAllReferences = function () {\n var _this = this;\n this.refsByKey.forEach(function (ref) { return _this.removeRef(ref); });\n };\n ReferenceSet.prototype.removeRef = function (ref) {\n this.refsByKey = this.refsByKey.delete(ref);\n this.refsByTarget = this.refsByTarget.delete(ref);\n if (this.garbageCollector !== null) {\n this.garbageCollector.addPotentialGarbageKey(ref.key);\n }\n };\n ReferenceSet.prototype.referencesForId = function (id) {\n var emptyKey = DocumentKey.EMPTY;\n var startRef = new DocReference(emptyKey, id);\n var endRef = new DocReference(emptyKey, id + 1);\n var keys = documentKeySet();\n this.refsByTarget.forEachInRange([startRef, endRef], function (ref) {\n keys = keys.add(ref.key);\n });\n return keys;\n };\n ReferenceSet.prototype.setGarbageCollector = function (garbageCollector) {\n this.garbageCollector = garbageCollector;\n };\n ReferenceSet.prototype.containsKey = function (txn, key) {\n var ref = new DocReference(key, 0);\n var firstRef = this.refsByKey.firstAfterOrEqual(ref);\n return PersistencePromise.resolve(firstRef !== null && key.equals(firstRef.key));\n };\n return ReferenceSet;\n}());\nexport { ReferenceSet };\nvar DocReference = /** @class */ (function () {\n function DocReference(key, targetOrBatchId) {\n this.key = key;\n this.targetOrBatchId = targetOrBatchId;\n }\n /** Compare by key then by ID */\n DocReference.compareByKey = function (left, right) {\n return (DocumentKey.comparator(left.key, right.key) ||\n primitiveComparator(left.targetOrBatchId, right.targetOrBatchId));\n };\n /** Compare by ID then by key */\n DocReference.compareByTargetId = function (left, right) {\n return (primitiveComparator(left.targetOrBatchId, right.targetOrBatchId) ||\n DocumentKey.comparator(left.key, right.key));\n };\n return DocReference;\n}());\nexport { DocReference };\n\n//# sourceMappingURL=reference_set.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/reference_set.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { assert } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nimport * as log from '../util/log';\nimport { ExponentialBackoff } from './backoff';\nvar LOG_TAG = 'PersistentStream';\nvar PersistentStreamState;\n(function (PersistentStreamState) {\n /**\n * The streaming RPC is not running and there's no error condition.\n * Calling `start` will start the stream immediately without backoff.\n * While in this state isStarted will return false.\n */\n PersistentStreamState[PersistentStreamState[\"Initial\"] = 0] = \"Initial\";\n /**\n * The stream is starting, and is waiting for an auth token to attach to\n * the initial request. While in this state, isStarted will return\n * true but isOpen will return false.\n */\n PersistentStreamState[PersistentStreamState[\"Auth\"] = 1] = \"Auth\";\n /**\n * The streaming RPC is up and running. Requests and responses can flow\n * freely. Both isStarted and isOpen will return true.\n */\n PersistentStreamState[PersistentStreamState[\"Open\"] = 2] = \"Open\";\n /**\n * The stream encountered an error. The next start attempt will back off.\n * While in this state isStarted() will return false.\n *\n */\n PersistentStreamState[PersistentStreamState[\"Error\"] = 3] = \"Error\";\n /**\n * An in-between state after an error where the stream is waiting before\n * re-starting. After\n * waiting is complete, the stream will try to open. While in this\n * state isStarted() will return YES but isOpen will return false.\n */\n PersistentStreamState[PersistentStreamState[\"Backoff\"] = 4] = \"Backoff\";\n /**\n * The stream has been explicitly stopped; no further events will be emitted.\n */\n PersistentStreamState[PersistentStreamState[\"Stopped\"] = 5] = \"Stopped\";\n})(PersistentStreamState || (PersistentStreamState = {}));\n/**\n * Initial backoff time in milliseconds after an error.\n * Set to 1s according to https://cloud.google.com/apis/design/errors.\n */\nvar BACKOFF_INITIAL_DELAY_MS = 1000;\n/** Maximum backoff time in milliseconds */\nvar BACKOFF_MAX_DELAY_MS = 60 * 1000;\nvar BACKOFF_FACTOR = 1.5;\n/**\n * A PersistentStream is an abstract base class that represents a streaming RPC\n * to the Firestore backend. It's built on top of the connections own support\n * for streaming RPCs, and adds several critical features for our clients:\n *\n * - Exponential backoff on failure\n * - Authentication via CredentialsProvider\n * - Dispatching all callbacks into the shared worker queue\n *\n * Subclasses of PersistentStream implement serialization of models to and\n * from the JSON representation of the protocol buffers for a specific\n * streaming RPC.\n *\n * ## Starting and Stopping\n *\n * Streaming RPCs are stateful and need to be `start`ed before messages can\n * be sent and received. The PersistentStream will call the onOpen function\n * of the listener once the stream is ready to accept requests.\n *\n * Should a `start` fail, PersistentStream will call the registered\n * onClose with a FirestoreError indicating what went wrong.\n *\n * A PersistentStream can be started and stopped repeatedly.\n *\n * Generic types:\n * SendType: The type of the outgoing message of the underlying\n * connection stream\n * ReceiveType: The type of the incoming message of the underlying\n * connection stream\n * ListenerType: The type of the listener that will be used for callbacks\n */\nvar PersistentStream = /** @class */ (function () {\n function PersistentStream(queue, connection, credentialsProvider, listener, \n // Used for faster retries in testing\n initialBackoffDelay) {\n this.queue = queue;\n this.connection = connection;\n this.credentialsProvider = credentialsProvider;\n this.stream = null;\n this.listener = null;\n this.backoff = new ExponentialBackoff(initialBackoffDelay ? initialBackoffDelay : BACKOFF_INITIAL_DELAY_MS, BACKOFF_FACTOR, BACKOFF_MAX_DELAY_MS);\n this.state = PersistentStreamState.Initial;\n this.listener = listener;\n }\n /**\n * Returns true if `start` has been called and no error has occurred. True\n * indicates the stream is open or in the process of opening (which\n * encompasses respecting backoff, getting auth tokens, and starting the\n * actual RPC). Use `isOpen` to determine if the stream is open and ready for\n * outbound requests.\n */\n PersistentStream.prototype.isStarted = function () {\n return (this.state === PersistentStreamState.Backoff ||\n this.state === PersistentStreamState.Auth ||\n this.state === PersistentStreamState.Open);\n };\n /**\n * Returns true if the underlying RPC is open (the openHandler has been\n * called) and the stream is ready for outbound requests.\n */\n PersistentStream.prototype.isOpen = function () {\n return this.state === PersistentStreamState.Open;\n };\n /**\n * Starts the RPC. Only allowed if isStarted returns false. The stream is\n * not immediately ready for use: onOpen will be invoked when the RPC is ready\n * for outbound requests, at which point isOpen will return true.\n *\n * When start returns, isStarted will return true.\n */\n PersistentStream.prototype.start = function () {\n if (this.state === PersistentStreamState.Error) {\n this.performBackoff();\n return;\n }\n assert(this.state === PersistentStreamState.Initial, 'Already started');\n this.auth();\n };\n /**\n * Stops the RPC. This call is idempotent and allowed regardless of the\n * current isStarted state.\n *\n * When stop returns, isStarted and isOpen will both return false.\n */\n PersistentStream.prototype.stop = function () {\n // Prevent any possible future restart of this stream\n this.state = PersistentStreamState.Stopped;\n // Clear the listener to avoid bleeding of events from the underlying\n // streams\n this.listener = null;\n // Clean up the underlying stream because we are no longer interested in\n // events\n if (this.stream !== null) {\n this.stream.close();\n this.stream = null;\n }\n };\n /**\n * After an error the stream will usually back off on the next attempt to\n * start it. If the error warrants an immediate restart of the stream, the\n * sender can use this to indicate that the receiver should not back off.\n *\n * Each error will call the onClose function. That function can decide to\n * inhibit backoff if required.\n */\n PersistentStream.prototype.inhibitBackoff = function () {\n assert(!this.isStarted(), 'Can only inhibit backoff in a stopped state');\n this.state = PersistentStreamState.Initial;\n this.backoff.reset();\n };\n PersistentStream.prototype.auth = function () {\n var _this = this;\n assert(this.state === PersistentStreamState.Initial, 'Must be in initial state to auth');\n this.state = PersistentStreamState.Auth;\n this.credentialsProvider.getToken(/*forceRefresh=*/ false).then(function (token) {\n // Normally we'd have to schedule the callback on the AsyncQueue.\n // However, the following calls are safe to be called outside the\n // AsyncQueue since they don't chain asynchronous calls\n _this.startStream(token);\n }, function (error) {\n _this.queue.schedule(function () {\n if (_this.state !== PersistentStreamState.Stopped) {\n // Stream can be stopped while waiting for authorization.\n var rpcError = new FirestoreError(Code.UNKNOWN, 'Fetching auth token failed: ' + error.message);\n return _this.handleStreamClose(rpcError);\n }\n else {\n return Promise.resolve();\n }\n });\n });\n };\n PersistentStream.prototype.startStream = function (token) {\n var _this = this;\n if (this.state === PersistentStreamState.Stopped) {\n // Stream can be stopped while waiting for authorization.\n return;\n }\n assert(this.state === PersistentStreamState.Auth, 'Trying to start stream in a non-auth state');\n // Helper function to dispatch to AsyncQueue and make sure that any\n // close will seem instantaneous and events are prevented from being\n // raised after the close call\n var dispatchIfNotStopped = function (fn) {\n _this.queue.schedule(function () {\n // Only raise events if the listener has not changed\n if (_this.state !== PersistentStreamState.Stopped) {\n return fn();\n }\n else {\n return Promise.resolve();\n }\n });\n };\n // Only start stream if listener has not changed\n if (this.listener !== null) {\n this.stream = this.startRpc(token);\n this.stream.onOpen(function () {\n dispatchIfNotStopped(function () {\n assert(_this.state === PersistentStreamState.Auth, 'Expected stream to be in state auth, but was ' + _this.state);\n _this.state = PersistentStreamState.Open;\n return _this.listener.onOpen();\n });\n });\n this.stream.onClose(function (error) {\n dispatchIfNotStopped(function () {\n return _this.handleStreamClose(error);\n });\n });\n this.stream.onMessage(function (msg) {\n dispatchIfNotStopped(function () {\n return _this.onMessage(msg);\n });\n });\n }\n };\n PersistentStream.prototype.performBackoff = function () {\n var _this = this;\n assert(this.state === PersistentStreamState.Error, 'Should only perform backoff in an error case');\n this.state = PersistentStreamState.Backoff;\n this.backoff.backoffAndWait().then(function () {\n // Backoff does not run on the AsyncQueue, so we need to reschedule to\n // make sure the queue blocks\n _this.queue.schedule(function () {\n if (_this.state === PersistentStreamState.Stopped) {\n // Stream can be stopped while waiting for backoff to complete.\n return Promise.resolve();\n }\n _this.state = PersistentStreamState.Initial;\n _this.start();\n assert(_this.isStarted(), 'PersistentStream should have started');\n return Promise.resolve();\n });\n });\n };\n PersistentStream.prototype.handleStreamClose = function (error) {\n assert(this.isStarted(), \"Can't handle server close on non-started stream\");\n log.debug(LOG_TAG, \"close with error: \" + error);\n this.stream = null;\n // In theory the stream could close cleanly, however, in our current model\n // we never expect this to happen because if we stop a stream ourselves,\n // this callback will never be called. To prevent cases where we retry\n // without a backoff accidentally, we set the stream to error in all cases.\n this.state = PersistentStreamState.Error;\n if (error && error.code === Code.RESOURCE_EXHAUSTED) {\n log.debug(LOG_TAG, 'Using maximum backoff delay to prevent overloading the backend.');\n this.backoff.resetToMax();\n }\n return this.listener.onClose(error);\n };\n return PersistentStream;\n}());\nexport { PersistentStream };\n/**\n * A PersistentStream that implements the Listen RPC.\n *\n * Once the Listen stream has called the openHandler, any number of listen and\n * unlisten calls calls can be sent to control what changes will be sent from\n * the server for ListenResponses.\n */\nvar PersistentListenStream = /** @class */ (function (_super) {\n __extends(PersistentListenStream, _super);\n function PersistentListenStream(databaseInfo, queue, connection, credentials, serializer, listener, initialBackoffDelay) {\n var _this = _super.call(this, queue, connection, credentials, listener, initialBackoffDelay) || this;\n _this.databaseInfo = databaseInfo;\n _this.serializer = serializer;\n return _this;\n }\n PersistentListenStream.prototype.startRpc = function (token) {\n return this.connection.openStream('Listen', token);\n };\n PersistentListenStream.prototype.onMessage = function (watchChangeProto) {\n // A successful response means the stream is healthy\n this.backoff.reset();\n var watchChange = this.serializer.fromWatchChange(watchChangeProto);\n var snapshot = this.serializer.versionFromListenResponse(watchChangeProto);\n return this.listener.onWatchChange(watchChange, snapshot);\n };\n /**\n * Registers interest in the results of the given query. If the query\n * includes a resumeToken it will be included in the request. Results that\n * affect the query will be streamed back as WatchChange messages that\n * reference the targetId.\n */\n PersistentListenStream.prototype.watch = function (queryData) {\n var request = {};\n request.database = this.serializer.encodedDatabaseId;\n request.addTarget = this.serializer.toTarget(queryData);\n var labels = this.serializer.toListenRequestLabels(queryData);\n if (labels) {\n request.labels = labels;\n }\n this.stream.send(request);\n };\n /**\n * Unregisters interest in the results of the query associated with the\n * given targetId.\n */\n PersistentListenStream.prototype.unwatch = function (targetId) {\n var request = {};\n request.database = this.serializer.encodedDatabaseId;\n request.removeTarget = targetId;\n this.stream.send(request);\n };\n return PersistentListenStream;\n}(PersistentStream));\nexport { PersistentListenStream };\n/**\n * A Stream that implements the Write RPC.\n *\n * The Write RPC requires the caller to maintain special streamToken\n * state in between calls, to help the server understand which responses the\n * client has processed by the time the next request is made. Every response\n * will contain a streamToken; this value must be passed to the next\n * request.\n *\n * After calling start() on this stream, the next request must be a handshake,\n * containing whatever streamToken is on hand. Once a response to this\n * request is received, all pending mutations may be submitted. When\n * submitting multiple batches of mutations at the same time, it's\n * okay to use the same streamToken for the calls to writeMutations.\n *\n * TODO(b/33271235): Use proto types\n */\nvar PersistentWriteStream = /** @class */ (function (_super) {\n __extends(PersistentWriteStream, _super);\n function PersistentWriteStream(databaseInfo, queue, connection, credentials, serializer, listener, initialBackoffDelay) {\n var _this = _super.call(this, queue, connection, credentials, listener, initialBackoffDelay) || this;\n _this.databaseInfo = databaseInfo;\n _this.serializer = serializer;\n _this.handshakeComplete_ = false;\n return _this;\n }\n Object.defineProperty(PersistentWriteStream.prototype, \"handshakeComplete\", {\n /**\n * Tracks whether or not a handshake has been successfully exchanged and\n * the stream is ready to accept mutations.\n */\n get: function () {\n return this.handshakeComplete_;\n },\n enumerable: true,\n configurable: true\n });\n // Override of PersistentStream.start\n PersistentWriteStream.prototype.start = function () {\n this.handshakeComplete_ = false;\n _super.prototype.start.call(this);\n };\n PersistentWriteStream.prototype.startRpc = function (token) {\n return this.connection.openStream('Write', token);\n };\n PersistentWriteStream.prototype.onMessage = function (responseProto) {\n // Always capture the last stream token.\n assert(!!responseProto.streamToken, 'Got a write response without a stream token');\n this.lastStreamToken = responseProto.streamToken;\n if (!this.handshakeComplete_) {\n // The first response is always the handshake response\n assert(!responseProto.writeResults || responseProto.writeResults.length === 0, 'Got mutation results for handshake');\n this.handshakeComplete_ = true;\n return this.listener.onHandshakeComplete();\n }\n else {\n // A successful first write response means the stream is healthy,\n // Note, that we could consider a successful handshake healthy, however,\n // the write itself might be causing an error we want to back off from.\n this.backoff.reset();\n var results = this.serializer.fromWriteResults(responseProto.writeResults);\n var commitVersion = this.serializer.fromVersion(responseProto.commitTime);\n return this.listener.onMutationResult(commitVersion, results);\n }\n };\n /**\n * Sends an initial streamToken to the server, performing the handshake\n * required to make the StreamingWrite RPC work. Subsequent\n * calls should wait until onHandshakeComplete was called.\n */\n PersistentWriteStream.prototype.writeHandshake = function () {\n assert(this.isOpen(), 'Writing handshake requires an opened stream');\n assert(!this.handshakeComplete_, 'Handshake already completed');\n // TODO(dimond): Support stream resumption. We intentionally do not set the\n // stream token on the handshake, ignoring any stream token we might have.\n var request = {};\n request.database = this.serializer.encodedDatabaseId;\n this.stream.send(request);\n };\n /** Sends a group of mutations to the Firestore backend to apply. */\n PersistentWriteStream.prototype.writeMutations = function (mutations) {\n var _this = this;\n assert(this.isOpen(), 'Writing mutations requires an opened stream');\n assert(this.handshakeComplete_, 'Handshake must be complete before writing mutations');\n assert(this.lastStreamToken.length > 0, 'Trying to write mutation without a token');\n var request = {\n // Protos are typed with string, but we support UInt8Array on Node\n // tslint:disable-next-line:no-any\n streamToken: this.lastStreamToken,\n writes: mutations.map(function (mutation) { return _this.serializer.toMutation(mutation); })\n };\n this.stream.send(request);\n };\n return PersistentWriteStream;\n}(PersistentStream));\nexport { PersistentWriteStream };\n\n//# sourceMappingURL=persistent_stream.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/persistent_stream.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EagerGarbageCollector } from '../local/eager_garbage_collector';\nimport { LocalViewChanges } from '../local/local_view_changes';\nimport { QueryData, QueryPurpose } from '../local/query_data';\nimport { ReferenceSet } from '../local/reference_set';\nimport { NoDocument } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { CurrentStatusUpdate, RemoteEvent } from '../remote/remote_event';\nimport { assert, fail } from '../util/assert';\nimport * as log from '../util/log';\nimport { primitiveComparator } from '../util/misc';\nimport * as objUtils from '../util/obj';\nimport { ObjectMap } from '../util/obj_map';\nimport { SortedMap } from '../util/sorted_map';\nimport { isNullOrUndefined } from '../util/types';\nimport { Query } from './query';\nimport { SnapshotVersion } from './snapshot_version';\nimport { TargetIdGenerator } from './target_id_generator';\nimport { AddedLimboDocument, RemovedLimboDocument, View } from './view';\nvar LOG_TAG = 'SyncEngine';\n/**\n * QueryView contains all of the data that SyncEngine needs to keep track of for\n * a particular query.\n */\nvar QueryView = /** @class */ (function () {\n function QueryView(\n /**\n * The query itself.\n */\n query, \n /**\n * The target number created by the client that is used in the watch\n * stream to identify this query.\n */\n targetId, \n /**\n * An identifier from the datastore backend that indicates the last state\n * of the results that was received. This can be used to indicate where\n * to continue receiving new doc changes for the query.\n */\n resumeToken, \n /**\n * The view is responsible for computing the final merged truth of what\n * docs are in the query. It gets notified of local and remote changes,\n * and applies the query filters and limits to determine the most correct\n * possible results.\n */\n view) {\n this.query = query;\n this.targetId = targetId;\n this.resumeToken = resumeToken;\n this.view = view;\n }\n return QueryView;\n}());\n/**\n * SyncEngine is the central controller in the client SDK architecture. It is\n * the glue code between the EventManager, LocalStore, and RemoteStore. Some of\n * SyncEngine's responsibilities include:\n * 1. Coordinating client requests and remote events between the EventManager\n * and the local and remote data stores.\n * 2. Managing a View object for each query, providing the unified view between\n * the local and remote data stores.\n * 3. Notifying the RemoteStore when the LocalStore has new mutations in its\n * queue that need sending to the backend.\n *\n * The SyncEngine’s methods should only ever be called by methods running in the\n * global async queue.\n */\nvar SyncEngine = /** @class */ (function () {\n function SyncEngine(localStore, remoteStore, currentUser) {\n this.localStore = localStore;\n this.remoteStore = remoteStore;\n this.currentUser = currentUser;\n this.viewHandler = null;\n this.errorHandler = null;\n this.queryViewsByQuery = new ObjectMap(function (q) {\n return q.canonicalId();\n });\n this.queryViewsByTarget = {};\n this.limboTargetsByKey = new SortedMap(DocumentKey.comparator);\n this.limboKeysByTarget = {};\n this.limboDocumentRefs = new ReferenceSet();\n this.limboCollector = new EagerGarbageCollector();\n /** Stores user completion handlers, indexed by User and BatchId. */\n this.mutationUserCallbacks = {};\n this.targetIdGenerator = TargetIdGenerator.forSyncEngine();\n }\n /** Subscribes view and error handler. Can be called only once. */\n SyncEngine.prototype.subscribe = function (viewHandler, errorHandler) {\n assert(viewHandler !== null && errorHandler !== null, 'View and error handlers cannot be null');\n assert(this.viewHandler === null && this.errorHandler === null, 'SyncEngine already has a subscriber.');\n this.viewHandler = viewHandler;\n this.errorHandler = errorHandler;\n this.limboCollector.addGarbageSource(this.limboDocumentRefs);\n };\n /**\n * Initiates the new listen, resolves promise when listen enqueued to the\n * server. All the subsequent view snapshots or errors are sent to the\n * subscribed handlers. Returns the targetId of the query.\n */\n SyncEngine.prototype.listen = function (query) {\n var _this = this;\n this.assertSubscribed('listen()');\n assert(!this.queryViewsByQuery.has(query), 'We already listen to the query: ' + query);\n return this.localStore.allocateQuery(query).then(function (queryData) {\n return _this.localStore\n .executeQuery(query)\n .then(function (docs) {\n return _this.localStore\n .remoteDocumentKeys(queryData.targetId)\n .then(function (remoteKeys) {\n var view = new View(query, remoteKeys);\n var viewDocChanges = view.computeDocChanges(docs);\n var viewChange = view.applyChanges(viewDocChanges);\n assert(viewChange.limboChanges.length === 0, 'View returned limbo docs before target ack from the server.');\n assert(!!viewChange.snapshot, 'applyChanges for new view should always return a snapshot');\n var data = new QueryView(query, queryData.targetId, queryData.resumeToken, view);\n _this.queryViewsByQuery.set(query, data);\n _this.queryViewsByTarget[queryData.targetId] = data;\n _this.viewHandler([viewChange.snapshot]);\n _this.remoteStore.listen(queryData);\n });\n })\n .then(function () {\n return queryData.targetId;\n });\n });\n };\n /** Stops listening to the query. */\n SyncEngine.prototype.unlisten = function (query) {\n var _this = this;\n this.assertSubscribed('unlisten()');\n var queryView = this.queryViewsByQuery.get(query);\n assert(!!queryView, 'Trying to unlisten on query not found:' + query);\n return this.localStore.releaseQuery(query).then(function () {\n _this.remoteStore.unlisten(queryView.targetId);\n return _this.removeAndCleanupQuery(queryView).then(function () {\n return _this.localStore.collectGarbage();\n });\n });\n };\n /**\n * Initiates the write of local mutation batch which involves adding the\n * writes to the mutation queue, notifying the remote store about new\n * mutations and raising events for any changes this write caused.\n *\n * The promise returned by this call is resolved when the above steps\n * have completed, *not* when the write was acked by the backend. The\n * userCallback is resolved once the write was acked/rejected by the\n * backend (or failed locally for any other reason).\n */\n SyncEngine.prototype.write = function (batch, userCallback) {\n var _this = this;\n this.assertSubscribed('write()');\n return this.localStore\n .localWrite(batch)\n .then(function (result) {\n _this.addMutationCallback(result.batchId, userCallback);\n return _this.emitNewSnapsAndNotifyLocalStore(result.changes);\n })\n .then(function () {\n return _this.remoteStore.fillWritePipeline();\n });\n };\n // TODO(klimt): Wrap the given error in a standard Firestore error object.\n SyncEngine.prototype.wrapUpdateFunctionError = function (error) {\n return error;\n };\n /**\n * Takes an updateFunction in which a set of reads and writes can be performed\n * atomically. In the updateFunction, the client can read and write values\n * using the supplied transaction object. After the updateFunction, all\n * changes will be committed. If some other client has changed any of the data\n * referenced, then the updateFunction will be called again. If the\n * updateFunction still fails after the given number of retries, then the\n * transaction will be rejection.\n *\n * The transaction object passed to the updateFunction contains methods for\n * accessing documents and collections. Unlike other datastore access, data\n * accessed with the transaction will not reflect local changes that have not\n * been committed. For this reason, it is required that all reads are\n * performed before any writes. Transactions must be performed while online.\n *\n * The promise returned is resolved when the transaction is fully committed.\n */\n SyncEngine.prototype.runTransaction = function (updateFunction, retries) {\n var _this = this;\n if (retries === void 0) { retries = 5; }\n assert(retries >= 0, 'Got negative number of retries for transaction.');\n var transaction = this.remoteStore.createTransaction();\n var wrappedUpdateFunction = function () {\n try {\n var userPromise = updateFunction(transaction);\n if (isNullOrUndefined(userPromise) ||\n !userPromise.catch ||\n !userPromise.then) {\n return Promise.reject(Error('Transaction callback must return a Promise'));\n }\n return userPromise.catch(function (e) {\n return Promise.reject(_this.wrapUpdateFunctionError(e));\n });\n }\n catch (e) {\n return Promise.reject(_this.wrapUpdateFunctionError(e));\n }\n };\n return wrappedUpdateFunction().then(function (result) {\n return transaction\n .commit()\n .then(function () {\n return result;\n })\n .catch(function (error) {\n if (retries === 0) {\n return Promise.reject(error);\n }\n // TODO(klimt): Put in a retry delay?\n return _this.runTransaction(updateFunction, retries - 1);\n });\n });\n };\n SyncEngine.prototype.applyRemoteEvent = function (remoteEvent) {\n var _this = this;\n this.assertSubscribed('applyRemoteEvent()');\n // Make sure limbo documents are deleted if there were no results\n objUtils.forEachNumber(remoteEvent.targetChanges, function (targetId, targetChange) {\n var limboKey = _this.limboKeysByTarget[targetId];\n if (limboKey &&\n targetChange.currentStatusUpdate ===\n CurrentStatusUpdate.MarkCurrent &&\n !remoteEvent.documentUpdates.get(limboKey)) {\n // When listening to a query the server responds with a snapshot\n // containing documents matching the query and a current marker\n // telling us we're now in sync. It's possible for these to arrive\n // as separate remote events or as a single remote event.\n // For a document query, there will be no documents sent in the\n // response if the document doesn't exist.\n //\n // If the snapshot arrives separately from the current marker,\n // we handle it normally and updateTrackedLimbos will resolve the\n // limbo status of the document, removing it from limboDocumentRefs.\n // This works because clients only initiate limbo resolution when\n // a target is current and because all current targets are\n // always at a consistent snapshot.\n //\n // However, if the document doesn't exist and the current marker\n // arrives, the document is not present in the snapshot and our\n // normal view handling would consider the document to remain in\n // limbo indefinitely because there are no updates to the document.\n // To avoid this, we specially handle this just this case here:\n // synthesizing a delete.\n //\n // TODO(dimond): Ideally we would have an explicit lookup query\n // instead resulting in an explicit delete message and we could\n // remove this special logic.\n remoteEvent.addDocumentUpdate(new NoDocument(limboKey, remoteEvent.snapshotVersion));\n }\n });\n return this.localStore.applyRemoteEvent(remoteEvent).then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes, remoteEvent);\n });\n };\n SyncEngine.prototype.rejectListen = function (targetId, err) {\n var _this = this;\n this.assertSubscribed('rejectListens()');\n var limboKey = this.limboKeysByTarget[targetId];\n if (limboKey) {\n // Since this query failed, we won't want to manually unlisten to it.\n // So go ahead and remove it from bookkeeping.\n this.limboTargetsByKey = this.limboTargetsByKey.remove(limboKey);\n delete this.limboKeysByTarget[targetId];\n // TODO(klimt): We really only should do the following on permission\n // denied errors, but we don't have the cause code here.\n // It's a limbo doc. Create a synthetic event saying it was deleted.\n // This is kind of a hack. Ideally, we would have a method in the local\n // store to purge a document. However, it would be tricky to keep all of\n // the local store's invariants with another method.\n var docMap = new SortedMap(DocumentKey.comparator);\n docMap = docMap.insert(limboKey, new NoDocument(limboKey, SnapshotVersion.forDeletedDoc()));\n var event_1 = new RemoteEvent(SnapshotVersion.MIN, {}, docMap);\n return this.applyRemoteEvent(event_1);\n }\n else {\n var queryView_1 = this.queryViewsByTarget[targetId];\n assert(!!queryView_1, 'Unknown targetId: ' + targetId);\n return this.localStore.releaseQuery(queryView_1.query).then(function () {\n return _this.removeAndCleanupQuery(queryView_1).then(function () {\n _this.errorHandler(queryView_1.query, err);\n });\n });\n }\n };\n SyncEngine.prototype.applySuccessfulWrite = function (mutationBatchResult) {\n var _this = this;\n this.assertSubscribed('applySuccessfulWrite()');\n // The local store may or may not be able to apply the write result and\n // raise events immediately (depending on whether the watcher is caught\n // up), so we raise user callbacks first so that they consistently happen\n // before listen events.\n this.processUserCallback(mutationBatchResult.batch.batchId, \n /*error=*/ null);\n return this.localStore\n .acknowledgeBatch(mutationBatchResult)\n .then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes);\n });\n };\n SyncEngine.prototype.rejectFailedWrite = function (batchId, error) {\n var _this = this;\n this.assertSubscribed('rejectFailedWrite()');\n // The local store may or may not be able to apply the write result and\n // raise events immediately (depending on whether the watcher is caught up),\n // so we raise user callbacks first so that they consistently happen before\n // listen events.\n this.processUserCallback(batchId, error);\n return this.localStore.rejectBatch(batchId).then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes);\n });\n };\n SyncEngine.prototype.addMutationCallback = function (batchId, callback) {\n var newCallbacks = this.mutationUserCallbacks[this.currentUser.toKey()];\n if (!newCallbacks) {\n newCallbacks = new SortedMap(primitiveComparator);\n }\n newCallbacks = newCallbacks.insert(batchId, callback);\n this.mutationUserCallbacks[this.currentUser.toKey()] = newCallbacks;\n };\n /**\n * Resolves or rejects the user callback for the given batch and then discards\n * it.\n */\n SyncEngine.prototype.processUserCallback = function (batchId, error) {\n var newCallbacks = this.mutationUserCallbacks[this.currentUser.toKey()];\n // NOTE: Mutations restored from persistence won't have callbacks, so it's\n // okay for there to be no callback for this ID.\n if (newCallbacks) {\n var callback = newCallbacks.get(batchId);\n if (callback) {\n assert(batchId === newCallbacks.minKey(), 'Mutation callbacks processed out-of-order?');\n if (error) {\n callback.reject(error);\n }\n else {\n callback.resolve();\n }\n newCallbacks = newCallbacks.remove(batchId);\n }\n this.mutationUserCallbacks[this.currentUser.toKey()] = newCallbacks;\n }\n };\n SyncEngine.prototype.removeAndCleanupQuery = function (queryView) {\n this.queryViewsByQuery.delete(queryView.query);\n delete this.queryViewsByTarget[queryView.targetId];\n this.limboDocumentRefs.removeReferencesForId(queryView.targetId);\n return this.gcLimboDocuments();\n };\n SyncEngine.prototype.updateTrackedLimbos = function (targetId, limboChanges) {\n for (var _i = 0, limboChanges_1 = limboChanges; _i < limboChanges_1.length; _i++) {\n var limboChange = limboChanges_1[_i];\n if (limboChange instanceof AddedLimboDocument) {\n this.limboDocumentRefs.addReference(limboChange.key, targetId);\n this.trackLimboChange(limboChange);\n }\n else if (limboChange instanceof RemovedLimboDocument) {\n log.debug(LOG_TAG, 'Document no longer in limbo: ' + limboChange.key);\n this.limboDocumentRefs.removeReference(limboChange.key, targetId);\n }\n else {\n fail('Unknown limbo change: ' + JSON.stringify(limboChange));\n }\n }\n return this.gcLimboDocuments();\n };\n SyncEngine.prototype.trackLimboChange = function (limboChange) {\n var key = limboChange.key;\n if (!this.limboTargetsByKey.get(key)) {\n log.debug(LOG_TAG, 'New document in limbo: ' + key);\n var limboTargetId = this.targetIdGenerator.next();\n var query = Query.atPath(key.path);\n this.limboKeysByTarget[limboTargetId] = key;\n this.remoteStore.listen(new QueryData(query, limboTargetId, QueryPurpose.Listen));\n this.limboTargetsByKey = this.limboTargetsByKey.insert(key, limboTargetId);\n }\n };\n SyncEngine.prototype.gcLimboDocuments = function () {\n var _this = this;\n // HACK: We can use a null transaction here, because we know that the\n // reference set is entirely within memory and doesn't need a store engine.\n return this.limboCollector\n .collectGarbage(null)\n .next(function (keys) {\n keys.forEach(function (key) {\n var limboTargetId = _this.limboTargetsByKey.get(key);\n if (limboTargetId === null) {\n // This target already got removed, because the query failed.\n return;\n }\n _this.remoteStore.unlisten(limboTargetId);\n _this.limboTargetsByKey = _this.limboTargetsByKey.remove(key);\n delete _this.limboKeysByTarget[limboTargetId];\n });\n })\n .toPromise();\n };\n // Visible for testing\n SyncEngine.prototype.currentLimboDocs = function () {\n return this.limboTargetsByKey;\n };\n SyncEngine.prototype.emitNewSnapsAndNotifyLocalStore = function (changes, remoteEvent) {\n var _this = this;\n var newSnaps = [];\n var docChangesInAllViews = [];\n var queriesProcessed = [];\n this.queryViewsByQuery.forEach(function (_, queryView) {\n queriesProcessed.push(Promise.resolve()\n .then(function () {\n var viewDocChanges = queryView.view.computeDocChanges(changes);\n if (!viewDocChanges.needsRefill) {\n return viewDocChanges;\n }\n // The query has a limit and some docs were removed, so we need\n // to re-run the query against the local store to make sure we\n // didn't lose any good docs that had been past the limit.\n return _this.localStore.executeQuery(queryView.query).then(function (docs) {\n return queryView.view.computeDocChanges(docs, viewDocChanges);\n });\n })\n .then(function (viewDocChanges) {\n var targetChange = remoteEvent && remoteEvent.targetChanges[queryView.targetId];\n var viewChange = queryView.view.applyChanges(viewDocChanges, targetChange);\n return _this.updateTrackedLimbos(queryView.targetId, viewChange.limboChanges).then(function () {\n if (viewChange.snapshot) {\n newSnaps.push(viewChange.snapshot);\n var docChanges = LocalViewChanges.fromSnapshot(viewChange.snapshot);\n docChangesInAllViews.push(docChanges);\n }\n });\n }));\n });\n return Promise.all(queriesProcessed)\n .then(function () {\n _this.viewHandler(newSnaps);\n return _this.localStore.notifyLocalViewChanges(docChangesInAllViews);\n })\n .then(function () {\n return _this.localStore.collectGarbage();\n });\n };\n SyncEngine.prototype.assertSubscribed = function (fnName) {\n assert(this.viewHandler !== null && this.errorHandler !== null, 'Trying to call ' + fnName + ' before calling subscribe().');\n };\n SyncEngine.prototype.handleUserChange = function (user) {\n var _this = this;\n this.currentUser = user;\n return this.localStore\n .handleUserChange(user)\n .then(function (changes) {\n return _this.emitNewSnapsAndNotifyLocalStore(changes);\n })\n .then(function () {\n return _this.remoteStore.handleUserChange(user);\n });\n };\n return SyncEngine;\n}());\nexport { SyncEngine };\n\n//# sourceMappingURL=sync_engine.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/sync_engine.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentKeySet, documentVersionMap } from './collections';\nimport { assert } from '../util/assert';\nimport * as misc from '../util/misc';\nexport var BATCHID_UNKNOWN = -1;\n/**\n * A batch of mutations that will be sent as one unit to the backend.\n */\nvar MutationBatch = /** @class */ (function () {\n function MutationBatch(batchId, localWriteTime, mutations) {\n this.batchId = batchId;\n this.localWriteTime = localWriteTime;\n this.mutations = mutations;\n }\n /**\n * Applies all the mutations in this MutationBatch to the specified document\n * to create a new remote document\n *\n * @param docKey The key of the document to apply mutations to.\n * @param maybeDoc The document to apply mutations to.\n * @param batchResult The result of applying the MutationBatch to the\n * backend.\n */\n MutationBatch.prototype.applyToRemoteDocument = function (docKey, maybeDoc, batchResult) {\n if (maybeDoc) {\n assert(maybeDoc.key.equals(docKey), \"applyToRemoteDocument: key \" + docKey + \" should match maybeDoc key\\n \" + maybeDoc.key);\n }\n var mutationResults = batchResult.mutationResults;\n assert(mutationResults.length === this.mutations.length, \"Mismatch between mutations length\\n (\" + this.mutations.length + \") and mutation results length\\n (\" + mutationResults.length + \").\");\n for (var i = 0; i < this.mutations.length; i++) {\n var mutation = this.mutations[i];\n if (mutation.key.equals(docKey)) {\n var mutationResult = mutationResults[i];\n maybeDoc = mutation.applyToRemoteDocument(maybeDoc, mutationResult);\n }\n }\n return maybeDoc;\n };\n /**\n * Computes the local view of a document given all the mutations in this\n * batch.\n *\n * @param docKey The key of the document to apply mutations to.\n * @param maybeDoc The document to apply mutations to.\n */\n MutationBatch.prototype.applyToLocalView = function (docKey, maybeDoc) {\n if (maybeDoc) {\n assert(maybeDoc.key.equals(docKey), \"applyToLocalDocument: key \" + docKey + \" should match maybeDoc key\\n \" + maybeDoc.key);\n }\n for (var i = 0; i < this.mutations.length; i++) {\n var mutation = this.mutations[i];\n if (mutation.key.equals(docKey)) {\n maybeDoc = mutation.applyToLocalView(maybeDoc, this.localWriteTime);\n }\n }\n return maybeDoc;\n };\n MutationBatch.prototype.keys = function () {\n var keySet = documentKeySet();\n for (var _i = 0, _a = this.mutations; _i < _a.length; _i++) {\n var mutation = _a[_i];\n keySet = keySet.add(mutation.key);\n }\n return keySet;\n };\n MutationBatch.prototype.equals = function (other) {\n return (this.batchId === other.batchId &&\n misc.arrayEquals(this.mutations, other.mutations));\n };\n /**\n * Returns true if this mutation batch has already been removed from the\n * mutation queue.\n *\n * Note that not all implementations of the MutationQueue necessarily use\n * tombstones as part of their implementation and generally speaking no code\n * outside the mutation queues should really care about this.\n */\n MutationBatch.prototype.isTombstone = function () {\n return this.mutations.length === 0;\n };\n /** Converts this batch into a tombstone */\n MutationBatch.prototype.toTombstone = function () {\n return new MutationBatch(this.batchId, this.localWriteTime, []);\n };\n return MutationBatch;\n}());\nexport { MutationBatch };\n/** The result of applying a mutation batch to the backend. */\nvar MutationBatchResult = /** @class */ (function () {\n function MutationBatchResult(batch, commitVersion, mutationResults, streamToken, \n /**\n * A pre-computed mapping from each mutated document to the resulting\n * version.\n */\n docVersions) {\n this.batch = batch;\n this.commitVersion = commitVersion;\n this.mutationResults = mutationResults;\n this.streamToken = streamToken;\n this.docVersions = docVersions;\n }\n /**\n * Creates a new MutationBatchResult for the given batch and results. There\n * must be one result for each mutation in the batch. This static factory\n * caches a document=>version mapping (docVersions).\n */\n MutationBatchResult.from = function (batch, commitVersion, results, streamToken) {\n assert(batch.mutations.length === results.length, 'Mutations sent ' +\n batch.mutations.length +\n ' must equal results received ' +\n results.length);\n var versionMap = documentVersionMap();\n var mutations = batch.mutations;\n for (var i = 0; i < mutations.length; i++) {\n var version = results[i].version;\n if (version === null) {\n // deletes don't have a version, so we substitute the commitVersion\n // of the entire batch.\n version = commitVersion;\n }\n versionMap = versionMap.insert(mutations[i].key, version);\n }\n return new MutationBatchResult(batch, commitVersion, results, streamToken, versionMap);\n };\n return MutationBatchResult;\n}());\nexport { MutationBatchResult };\n\n//# sourceMappingURL=mutation_batch.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/model/mutation_batch.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { Code, FirestoreError } from '../util/error';\nimport * as log from '../util/log';\nimport { AutoId } from '../util/misc';\nimport { IndexedDbMutationQueue } from './indexeddb_mutation_queue';\nimport { IndexedDbQueryCache } from './indexeddb_query_cache';\nimport { IndexedDbRemoteDocumentCache } from './indexeddb_remote_document_cache';\nimport { ALL_STORES, DbOwner } from './indexeddb_schema';\nimport { createOrUpgradeDb, SCHEMA_VERSION } from './indexeddb_schema';\nimport { LocalSerializer } from './local_serializer';\nimport { PersistencePromise } from './persistence_promise';\nimport { SimpleDb } from './simple_db';\nvar LOG_TAG = 'IndexedDbPersistence';\n/** If the owner lease is older than 5 seconds, try to take ownership. */\nvar OWNER_LEASE_MAX_AGE_MS = 5000;\n/** Refresh the owner lease every 4 seconds while owner. */\nvar OWNER_LEASE_REFRESH_INTERVAL_MS = 4000;\n/** LocalStorage location to indicate a zombied ownerId (see class comment). */\nvar ZOMBIE_OWNER_LOCALSTORAGE_SUFFIX = 'zombiedOwnerId';\n/** Error when the owner lease cannot be acquired or is lost. */\nvar EXISTING_OWNER_ERROR_MSG = 'There is another tab open with offline' +\n ' persistence enabled. Only one such tab is allowed at a time. The' +\n ' other tab must be closed or persistence must be disabled.';\nvar UNSUPPORTED_PLATFORM_ERROR_MSG = 'This platform is either missing' +\n ' IndexedDB or is known to have an incomplete implementation. Offline' +\n ' persistence has been disabled.';\n/**\n * An IndexedDB-backed instance of Persistence. Data is stored persistently\n * across sessions.\n *\n * Currently the Firestore SDK only supports a single consumer of the database,\n * but browsers obviously support multiple tabs. IndexedDbPersistence ensures a\n * single consumer of the database via an \"owner lease\" stored in the database.\n *\n * On startup, IndexedDbPersistence assigns itself a random \"ownerId\" and writes\n * it to a special \"owner\" object in the database (if no entry exists already or\n * the current entry is expired). This owner lease is then verified inside every\n * transaction to ensure the lease has not been lost.\n *\n * If a tab opts not to acquire the owner lease (because there's an existing\n * non-expired owner) or loses the owner lease, IndexedDbPersistence enters a\n * failed state and all subsequent operations will automatically fail.\n *\n * The current owner regularly refreshes the owner lease with new timestamps to\n * prevent newly-opened tabs from taking over ownership.\n *\n * Additionally there is an optimization so that when a tab is closed, the owner\n * lease is released immediately (this is especially important to make sure that\n * a refreshed tab is able to immediately re-acquire the owner lease).\n * Unfortunately, IndexedDB cannot be reliably used in window.unload since it is\n * an asynchronous API. So in addition to attempting to give up the lease,\n * the owner writes its ownerId to a \"zombiedOwnerId\" entry in LocalStorage\n * which acts as an indicator that another tab should go ahead and take the\n * owner lease immediately regardless of the current lease timestamp.\n */\nvar IndexedDbPersistence = /** @class */ (function () {\n function IndexedDbPersistence(prefix, serializer) {\n this.ownerId = this.generateOwnerId();\n this.dbName = prefix + IndexedDbPersistence.MAIN_DATABASE;\n this.serializer = new LocalSerializer(serializer);\n this.localStoragePrefix = prefix;\n }\n IndexedDbPersistence.prototype.start = function () {\n var _this = this;\n if (!IndexedDbPersistence.isAvailable()) {\n this.persistenceError = new FirestoreError(Code.UNIMPLEMENTED, UNSUPPORTED_PLATFORM_ERROR_MSG);\n return Promise.reject(this.persistenceError);\n }\n assert(!this.started, 'IndexedDbPersistence double-started!');\n this.started = true;\n return SimpleDb.openOrCreate(this.dbName, SCHEMA_VERSION, createOrUpgradeDb)\n .then(function (db) {\n _this.simpleDb = db;\n })\n .then(function () { return _this.tryAcquireOwnerLease(); })\n .then(function () {\n _this.scheduleOwnerLeaseRefreshes();\n _this.attachWindowUnloadHook();\n });\n };\n IndexedDbPersistence.prototype.shutdown = function () {\n var _this = this;\n assert(this.started, 'IndexedDbPersistence shutdown without start!');\n this.started = false;\n this.detachWindowUnloadHook();\n this.stopOwnerLeaseRefreshes();\n return this.releaseOwnerLease().then(function () {\n _this.simpleDb.close();\n });\n };\n IndexedDbPersistence.prototype.getMutationQueue = function (user) {\n return IndexedDbMutationQueue.forUser(user, this.serializer);\n };\n IndexedDbPersistence.prototype.getQueryCache = function () {\n return new IndexedDbQueryCache(this.serializer);\n };\n IndexedDbPersistence.prototype.getRemoteDocumentCache = function () {\n return new IndexedDbRemoteDocumentCache(this.serializer);\n };\n IndexedDbPersistence.prototype.runTransaction = function (action, operation) {\n var _this = this;\n if (this.persistenceError) {\n return Promise.reject(this.persistenceError);\n }\n log.debug(LOG_TAG, 'Starting transaction:', action);\n // Do all transactions as readwrite against all object stores, since we\n // are the only reader/writer.\n return this.simpleDb.runTransaction('readwrite', ALL_STORES, function (txn) {\n // Verify that we still have the owner lease as part of every transaction.\n return _this.ensureOwnerLease(txn).next(function () { return operation(txn); });\n });\n };\n IndexedDbPersistence.isAvailable = function () {\n return SimpleDb.isAvailable();\n };\n /**\n * Generates a string used as a prefix when storing data in IndexedDB and\n * LocalStorage.\n */\n IndexedDbPersistence.buildStoragePrefix = function (databaseInfo) {\n // Use two different prefix formats:\n //\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n //\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var database = databaseInfo.databaseId.projectId;\n if (!databaseInfo.databaseId.isDefaultDatabase) {\n database += '.' + databaseInfo.databaseId.database;\n }\n return 'firestore/' + databaseInfo.persistenceKey + '/' + database + '/';\n };\n /**\n * Acquires the owner lease if there's no valid owner. Else returns a rejected\n * promise.\n */\n IndexedDbPersistence.prototype.tryAcquireOwnerLease = function () {\n var _this = this;\n // NOTE: Don't use this.runTransaction, since it requires us to already\n // have the lease.\n return this.simpleDb.runTransaction('readwrite', [DbOwner.store], function (txn) {\n var store = txn.store(DbOwner.store);\n return store.get('owner').next(function (dbOwner) {\n if (!_this.validOwner(dbOwner)) {\n var newDbOwner = new DbOwner(_this.ownerId, Date.now());\n log.debug(LOG_TAG, 'No valid owner. Acquiring owner lease. Current owner:', dbOwner, 'New owner:', newDbOwner);\n return store.put('owner', newDbOwner);\n }\n else {\n log.debug(LOG_TAG, 'Valid owner already. Failing. Current owner:', dbOwner);\n _this.persistenceError = new FirestoreError(Code.FAILED_PRECONDITION, EXISTING_OWNER_ERROR_MSG);\n return PersistencePromise.reject(_this.persistenceError);\n }\n });\n });\n };\n /** Checks the owner lease and deletes it if we are the current owner. */\n IndexedDbPersistence.prototype.releaseOwnerLease = function () {\n var _this = this;\n // NOTE: Don't use this.runTransaction, since it requires us to already\n // have the lease.\n return this.simpleDb.runTransaction('readwrite', [DbOwner.store], function (txn) {\n var store = txn.store(DbOwner.store);\n return store.get('owner').next(function (dbOwner) {\n if (dbOwner !== null && dbOwner.ownerId === _this.ownerId) {\n log.debug(LOG_TAG, 'Releasing owner lease.');\n return store.delete('owner');\n }\n else {\n return PersistencePromise.resolve();\n }\n });\n });\n };\n /**\n * Checks the owner lease and returns a rejected promise if we are not the\n * current owner. This should be included in every transaction to guard\n * against losing the owner lease.\n */\n IndexedDbPersistence.prototype.ensureOwnerLease = function (txn) {\n var _this = this;\n var store = txn.store(DbOwner.store);\n return store.get('owner').next(function (dbOwner) {\n if (dbOwner === null || dbOwner.ownerId !== _this.ownerId) {\n _this.persistenceError = new FirestoreError(Code.FAILED_PRECONDITION, EXISTING_OWNER_ERROR_MSG);\n return PersistencePromise.reject(_this.persistenceError);\n }\n else {\n return PersistencePromise.resolve();\n }\n });\n };\n /**\n * Returns true if the provided owner exists, has a recent timestamp, and\n * isn't zombied.\n *\n * NOTE: To determine if the owner is zombied, this method reads from\n * LocalStorage which could be mildly expensive.\n */\n IndexedDbPersistence.prototype.validOwner = function (dbOwner) {\n var now = Date.now();\n var minAcceptable = now - OWNER_LEASE_MAX_AGE_MS;\n var maxAcceptable = now;\n if (dbOwner === null) {\n return false; // no owner.\n }\n else if (dbOwner.leaseTimestampMs < minAcceptable) {\n return false; // owner lease has expired.\n }\n else if (dbOwner.leaseTimestampMs > maxAcceptable) {\n log.error('Persistence owner-lease is in the future. Discarding.', dbOwner);\n return false;\n }\n else if (dbOwner.ownerId === this.getZombiedOwnerId()) {\n return false; // owner's tab closed.\n }\n else {\n return true;\n }\n };\n /**\n * Schedules a recurring timer to update the owner lease timestamp to prevent\n * other tabs from taking the lease.\n */\n IndexedDbPersistence.prototype.scheduleOwnerLeaseRefreshes = function () {\n var _this = this;\n // NOTE: This doesn't need to be scheduled on the async queue and doing so\n // would increase the chances of us not refreshing on time if the queue is\n // backed up for some reason.\n this.ownerLeaseRefreshHandle = setInterval(function () {\n var txResult = _this.runTransaction('Refresh owner timestamp', function (txn) {\n // NOTE: We don't need to validate the current owner contents, since\n // runTransaction does that automatically.\n var store = txn.store(DbOwner.store);\n return store.put('owner', new DbOwner(_this.ownerId, Date.now()));\n });\n txResult.catch(function (reason) {\n // Probably means we lost the lease. Report the error and stop trying to\n // refresh the lease.\n log.error(reason);\n _this.stopOwnerLeaseRefreshes();\n });\n }, OWNER_LEASE_REFRESH_INTERVAL_MS);\n };\n IndexedDbPersistence.prototype.stopOwnerLeaseRefreshes = function () {\n if (this.ownerLeaseRefreshHandle) {\n clearInterval(this.ownerLeaseRefreshHandle);\n this.ownerLeaseRefreshHandle = null;\n }\n };\n /**\n * Attaches a window.unload handler that will synchronously write our\n * ownerId to a \"zombie owner id\" location in localstorage. This can be used\n * by tabs trying to acquire the lease to determine that the lease should be\n * acquired immediately even if the timestamp is recent. This is particularly\n * important for the refresh case (so the tab correctly re-acquires the owner\n * lease). LocalStorage is used for this rather than IndexedDb because it is\n * a synchronous API and so can be used reliably from an unload handler.\n */\n IndexedDbPersistence.prototype.attachWindowUnloadHook = function () {\n var _this = this;\n this.windowUnloadHandler = function () {\n // Record that we're zombied.\n _this.setZombiedOwnerId(_this.ownerId);\n // Attempt graceful shutdown (including releasing our owner lease), but\n // there's no guarantee it will complete.\n _this.shutdown();\n };\n window.addEventListener('unload', this.windowUnloadHandler);\n };\n IndexedDbPersistence.prototype.detachWindowUnloadHook = function () {\n if (this.windowUnloadHandler) {\n window.removeEventListener('unload', this.windowUnloadHandler);\n this.windowUnloadHandler = null;\n }\n };\n /**\n * Returns any recorded \"zombied owner\" (i.e. a previous owner that became\n * zombied due to their tab closing) from LocalStorage, or null if no such\n * record exists.\n */\n IndexedDbPersistence.prototype.getZombiedOwnerId = function () {\n try {\n var zombiedOwnerId = window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());\n log.debug(LOG_TAG, 'Zombied ownerID from LocalStorage:', zombiedOwnerId);\n return zombiedOwnerId;\n }\n catch (e) {\n // Gracefully handle if LocalStorage isn't available / working.\n log.error(LOG_TAG, 'Failed to get zombie owner id.', e);\n return null;\n }\n };\n /**\n * Records a zombied owner (an owner that had its tab closed) in LocalStorage\n * or, if passed null, deletes any recorded zombied owner.\n */\n IndexedDbPersistence.prototype.setZombiedOwnerId = function (zombieOwnerId) {\n try {\n if (zombieOwnerId === null) {\n window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey());\n }\n else {\n window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(), zombieOwnerId);\n }\n }\n catch (e) {\n // Gracefully handle if LocalStorage isn't available / working.\n log.error(LOG_TAG, 'Failed to set zombie owner id.', e);\n }\n };\n IndexedDbPersistence.prototype.zombiedOwnerLocalStorageKey = function () {\n return this.localStoragePrefix + ZOMBIE_OWNER_LOCALSTORAGE_SUFFIX;\n };\n IndexedDbPersistence.prototype.generateOwnerId = function () {\n // For convenience, just use an AutoId.\n return AutoId.newId();\n };\n /**\n * The name of the main (and currently only) IndexedDB database. this name is\n * appended to the prefix provided to the IndexedDbPersistence constructor.\n */\n IndexedDbPersistence.MAIN_DATABASE = 'main';\n return IndexedDbPersistence;\n}());\nexport { IndexedDbPersistence };\n\n//# sourceMappingURL=indexeddb_persistence.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/indexeddb_persistence.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { documentKeySet, documentMap, maybeDocumentMap } from '../model/collections';\nimport { Document, NoDocument } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { fail } from '../util/assert';\nimport { PersistencePromise } from './persistence_promise';\n/**\n * A readonly view of the local state of all documents we're tracking (i.e. we\n * have a cached version in remoteDocumentCache or local mutations for the\n * document). The view is computed by applying the mutations in the\n * MutationQueue to the RemoteDocumentCache.\n */\nvar LocalDocumentsView = /** @class */ (function () {\n function LocalDocumentsView(remoteDocumentCache, mutationQueue) {\n this.remoteDocumentCache = remoteDocumentCache;\n this.mutationQueue = mutationQueue;\n }\n /**\n * Get the local view of the document identified by `key`.\n *\n * @return Local view of the document or null if we don't have any cached\n * state for it.\n */\n LocalDocumentsView.prototype.getDocument = function (transaction, key) {\n var _this = this;\n return this.remoteDocumentCache\n .getEntry(transaction, key)\n .next(function (remoteDoc) {\n return _this.computeLocalDocument(transaction, key, remoteDoc);\n });\n };\n /**\n * Gets the local view of the documents identified by `keys`.\n *\n * If we don't have cached state for a document in `keys`, a NoDocument will\n * be stored for that key in the resulting set.\n */\n LocalDocumentsView.prototype.getDocuments = function (transaction, keys) {\n var _this = this;\n var promises = [];\n var results = maybeDocumentMap();\n keys.forEach(function (key) {\n promises.push(_this.getDocument(transaction, key).next(function (maybeDoc) {\n // TODO(http://b/32275378): Don't conflate missing / deleted.\n if (!maybeDoc) {\n maybeDoc = new NoDocument(key, SnapshotVersion.forDeletedDoc());\n }\n results = results.insert(key, maybeDoc);\n }));\n });\n return PersistencePromise.waitFor(promises).next(function () { return results; });\n };\n /** Performs a query against the local view of all documents. */\n LocalDocumentsView.prototype.getDocumentsMatchingQuery = function (transaction, query) {\n if (DocumentKey.isDocumentKey(query.path)) {\n return this.getDocumentsMatchingDocumentQuery(transaction, query.path);\n }\n else {\n return this.getDocumentsMatchingCollectionQuery(transaction, query);\n }\n };\n LocalDocumentsView.prototype.getDocumentsMatchingDocumentQuery = function (transaction, docPath) {\n // Just do a simple document lookup.\n return this.getDocument(transaction, new DocumentKey(docPath)).next(function (maybeDoc) {\n var result = documentMap();\n if (maybeDoc instanceof Document) {\n result = result.insert(maybeDoc.key, maybeDoc);\n }\n return result;\n });\n };\n LocalDocumentsView.prototype.getDocumentsMatchingCollectionQuery = function (transaction, query) {\n var _this = this;\n // Query the remote documents and overlay mutations.\n // TODO(mikelehen): There may be significant overlap between the mutations\n // affecting these remote documents and the\n // getAllMutationBatchesAffectingQuery() mutations. Consider optimizing.\n var results;\n return this.remoteDocumentCache\n .getDocumentsMatchingQuery(transaction, query)\n .next(function (queryResults) {\n return _this.computeLocalDocuments(transaction, queryResults);\n })\n .next(function (promisedResults) {\n results = promisedResults;\n // Now use the mutation queue to discover any other documents that may\n // match the query after applying mutations.\n return _this.mutationQueue.getAllMutationBatchesAffectingQuery(transaction, query);\n })\n .next(function (matchingMutationBatches) {\n var matchingKeys = documentKeySet();\n for (var _i = 0, matchingMutationBatches_1 = matchingMutationBatches; _i < matchingMutationBatches_1.length; _i++) {\n var batch = matchingMutationBatches_1[_i];\n for (var _a = 0, _b = batch.mutations; _a < _b.length; _a++) {\n var mutation = _b[_a];\n // TODO(mikelehen): PERF: Check if this mutation actually\n // affects the query to reduce work.\n if (!results.get(mutation.key)) {\n matchingKeys = matchingKeys.add(mutation.key);\n }\n }\n }\n // Now add in the results for the matchingKeys.\n var promises = [];\n matchingKeys.forEach(function (key) {\n promises.push(_this.getDocument(transaction, key).next(function (doc) {\n if (doc instanceof Document) {\n results = results.insert(doc.key, doc);\n }\n }));\n });\n return PersistencePromise.waitFor(promises);\n })\n .next(function () {\n // Finally, filter out any documents that don't actually match\n // the query.\n results.forEach(function (key, doc) {\n if (!query.matches(doc)) {\n results = results.remove(key);\n }\n });\n return results;\n });\n };\n /**\n * Takes a remote document and applies local mutations to generate the local\n * view of the document.\n * @param transaction The transaction in which to perform any persistence\n * operations.\n * @param documentKey The key of the document (necessary when remoteDocument\n * is null).\n * @param document The base remote document to apply mutations to or null.\n */\n LocalDocumentsView.prototype.computeLocalDocument = function (transaction, documentKey, document) {\n return this.mutationQueue\n .getAllMutationBatchesAffectingDocumentKey(transaction, documentKey)\n .next(function (batches) {\n for (var _i = 0, batches_1 = batches; _i < batches_1.length; _i++) {\n var batch = batches_1[_i];\n document = batch.applyToLocalView(documentKey, document);\n }\n return document;\n });\n };\n /**\n * Takes a set of remote documents and applies local mutations to generate the\n * local view of the documents.\n * @param transaction The transaction in which to perform any persistence\n * operations.\n * @param documents The base remote documents to apply mutations to.\n * @return The local view of the documents.\n */\n LocalDocumentsView.prototype.computeLocalDocuments = function (transaction, documents) {\n var _this = this;\n var promises = [];\n documents.forEach(function (key, doc) {\n promises.push(_this.computeLocalDocument(transaction, key, doc).next(function (mutatedDoc) {\n if (mutatedDoc instanceof Document) {\n documents = documents.insert(mutatedDoc.key, mutatedDoc);\n }\n else if (mutatedDoc instanceof NoDocument) {\n documents = documents.remove(mutatedDoc.key);\n }\n else {\n fail('Unknown MaybeDocument: ' + mutatedDoc);\n }\n }));\n });\n return PersistencePromise.waitFor(promises).next(function () { return documents; });\n };\n return LocalDocumentsView;\n}());\nexport { LocalDocumentsView };\n\n//# sourceMappingURL=local_documents_view.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/local_documents_view.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { maybeDocumentMap } from '../model/collections';\nimport { assert } from '../util/assert';\nimport { PersistencePromise } from './persistence_promise';\n/**\n * An in-memory buffer of entries to be written to a RemoteDocumentCache.\n * It can be used to batch up a set of changes to be written to the cache, but\n * additionally supports reading entries back with the `getEntry()` method,\n * falling back to the underlying RemoteDocumentCache if no entry is\n * buffered.\n *\n * NOTE: This class was introduced in iOS to work around a limitation in\n * LevelDB. Given IndexedDb has full transaction support with\n * read-your-own-writes capability, this class is not technically needed, but\n * has been preserved as a convenience and to aid portability.\n */\nvar RemoteDocumentChangeBuffer = /** @class */ (function () {\n function RemoteDocumentChangeBuffer(remoteDocumentCache) {\n this.remoteDocumentCache = remoteDocumentCache;\n this.changes = maybeDocumentMap();\n }\n /** Buffers a `RemoteDocumentCache.addEntry()` call. */\n RemoteDocumentChangeBuffer.prototype.addEntry = function (maybeDocument) {\n var changes = this.assertChanges();\n this.changes = changes.insert(maybeDocument.key, maybeDocument);\n };\n // NOTE: removeEntry() is not presently necessary and so is omitted.\n /**\n * Looks up an entry in the cache. The buffered changes will first be checked,\n * and if no buffered change applies, this will forward to\n * `RemoteDocumentCache.getEntry()`.\n *\n * @param transaction The transaction in which to perform any persistence\n * operations.\n * @param documentKey The key of the entry to look up.\n * @return The cached Document or NoDocument entry, or null if we have nothing\n * cached.\n */\n RemoteDocumentChangeBuffer.prototype.getEntry = function (transaction, documentKey) {\n var changes = this.assertChanges();\n var bufferedEntry = changes.get(documentKey);\n if (bufferedEntry) {\n return PersistencePromise.resolve(bufferedEntry);\n }\n else {\n return this.remoteDocumentCache.getEntry(transaction, documentKey);\n }\n };\n /**\n * Applies buffered changes to the underlying RemoteDocumentCache, using\n * the provided transaction.\n */\n RemoteDocumentChangeBuffer.prototype.apply = function (transaction) {\n var _this = this;\n var changes = this.assertChanges();\n var promises = [];\n changes.forEach(function (key, maybeDoc) {\n promises.push(_this.remoteDocumentCache.addEntry(transaction, maybeDoc));\n });\n // We should not be used to buffer any more changes.\n this.changes = null;\n return PersistencePromise.waitFor(promises);\n };\n /** Helper to assert this.changes is not null and return it. */\n RemoteDocumentChangeBuffer.prototype.assertChanges = function () {\n assert(this.changes !== null, 'Changes have already been applied.');\n return this.changes;\n };\n return RemoteDocumentChangeBuffer;\n}());\nexport { RemoteDocumentChangeBuffer };\n\n//# sourceMappingURL=remote_document_change_buffer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/remote_document_change_buffer.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { TargetIdGenerator } from '../core/target_id_generator';\nimport { Timestamp } from '../core/timestamp';\nimport { documentKeySet } from '../model/collections';\nimport { BATCHID_UNKNOWN } from '../model/mutation_batch';\nimport { ResetMapping, UpdateMapping } from '../remote/remote_event';\nimport { assert, fail } from '../util/assert';\nimport * as log from '../util/log';\nimport * as objUtils from '../util/obj';\nimport { LocalDocumentsView } from './local_documents_view';\nimport { PersistencePromise } from './persistence_promise';\nimport { QueryData, QueryPurpose } from './query_data';\nimport { ReferenceSet } from './reference_set';\nimport { RemoteDocumentChangeBuffer } from './remote_document_change_buffer';\nvar LOG_TAG = 'LocalStore';\n/**\n * Local storage in the Firestore client. Coordinates persistence components\n * like the mutation queue and remote document cache to present a\n * latency-compensated view of stored data.\n *\n * The LocalStore is responsible for accepting mutations from the Sync Engine.\n * Writes from the client are put into a queue as provisional Mutations until\n * they are processed by the RemoteStore and confirmed as having been written\n * to the server.\n *\n * The local store provides the local version of documents that have been\n * modified locally. It maintains the constraint:\n *\n * LocalDocument = RemoteDocument + Active(LocalMutations)\n *\n * (Active mutations are those that are enqueued and have not been previously\n * acknowledged or rejected).\n *\n * The RemoteDocument (\"ground truth\") state is provided via the\n * applyChangeBatch method. It will be some version of a server-provided\n * document OR will be a server-provided document PLUS acknowledged mutations:\n *\n * RemoteDocument' = RemoteDocument + Acknowledged(LocalMutations)\n *\n * Note that this \"dirty\" version of a RemoteDocument will not be identical to a\n * server base version, since it has LocalMutations added to it pending getting\n * an authoritative copy from the server.\n *\n * Since LocalMutations can be rejected by the server, we have to be able to\n * revert a LocalMutation that has already been applied to the LocalDocument\n * (typically done by replaying all remaining LocalMutations to the\n * RemoteDocument to re-apply).\n *\n * The LocalStore is responsible for the garbage collection of the documents it\n * contains. For now, it every doc referenced by a view, the mutation queue, or\n * the RemoteStore.\n *\n * It also maintains the persistence of mapping queries to resume tokens and\n * target ids. It needs to know this data about queries to properly know what\n * docs it would be allowed to garbage collect.\n *\n * The LocalStore must be able to efficiently execute queries against its local\n * cache of the documents, to provide the initial set of results before any\n * remote changes have been received.\n *\n * Note: In TypeScript, most methods return Promises since the implementation\n * may rely on fetching data from IndexedDB which is async.\n * These Promises will only be rejected on an I/O error or other internal\n * (unexpected) failure (e.g. failed assert) and always represent an\n * unrecoverable error (should be caught / reported by the async_queue).\n */\nvar LocalStore = /** @class */ (function () {\n function LocalStore(\n /** Manages our in-memory or durable persistence. */\n persistence, initialUser, \n /**\n * The garbage collector collects documents that should no longer be\n * cached (e.g. if they are no longer retained by the above reference sets\n * and the garbage collector is performing eager collection).\n */\n garbageCollector) {\n this.persistence = persistence;\n this.garbageCollector = garbageCollector;\n /**\n * The set of document references maintained by any local views.\n */\n this.localViewReferences = new ReferenceSet();\n /** Maps a targetID to data about its query. */\n this.targetIds = {};\n /** Used to generate targetIDs for queries tracked locally. */\n this.targetIdGenerator = TargetIdGenerator.forLocalStore();\n /**\n * A heldBatchResult is a mutation batch result (from a write acknowledgement)\n * that arrived before the watch stream got notified of a snapshot that\n * includes the write. So we \"hold\" it until the watch stream catches up. It\n * ensures that the local write remains visible (latency compensation) and\n * doesn't temporarily appear reverted because the watch stream is slower than\n * the write stream and so wasn't reflecting it.\n *\n * NOTE: Eventually we want to move this functionality into the remote store.\n */\n this.heldBatchResults = [];\n this.mutationQueue = persistence.getMutationQueue(initialUser);\n this.remoteDocuments = persistence.getRemoteDocumentCache();\n this.queryCache = persistence.getQueryCache();\n this.localDocuments = new LocalDocumentsView(this.remoteDocuments, this.mutationQueue);\n this.garbageCollector.addGarbageSource(this.localViewReferences);\n this.garbageCollector.addGarbageSource(this.queryCache);\n this.garbageCollector.addGarbageSource(this.mutationQueue);\n }\n /** Performs any initial startup actions required by the local store. */\n LocalStore.prototype.start = function () {\n var _this = this;\n return this.persistence.runTransaction('Start LocalStore', function (txn) {\n return _this.startMutationQueue(txn).next(function () { return _this.startQueryCache(txn); });\n });\n };\n /**\n * Tells the LocalStore that the currently authenticated user has changed.\n *\n * In response the local store switches the mutation queue to the new user and\n * returns any resulting document changes.\n */\n LocalStore.prototype.handleUserChange = function (user) {\n var _this = this;\n return this.persistence.runTransaction('Handle user change', function (txn) {\n // Swap out the mutation queue, grabbing the pending mutation batches\n // before and after.\n var oldBatches;\n return _this.mutationQueue\n .getAllMutationBatches(txn)\n .next(function (promisedOldBatches) {\n oldBatches = promisedOldBatches;\n _this.garbageCollector.removeGarbageSource(_this.mutationQueue);\n _this.mutationQueue = _this.persistence.getMutationQueue(user);\n _this.garbageCollector.addGarbageSource(_this.mutationQueue);\n return _this.startMutationQueue(txn);\n })\n .next(function () {\n // Recreate our LocalDocumentsView using the new\n // MutationQueue.\n _this.localDocuments = new LocalDocumentsView(_this.remoteDocuments, _this.mutationQueue);\n return _this.mutationQueue.getAllMutationBatches(txn);\n })\n .next(function (newBatches) {\n // Union the old/new changed keys.\n var changedKeys = documentKeySet();\n for (var _i = 0, _a = [oldBatches, newBatches]; _i < _a.length; _i++) {\n var batches = _a[_i];\n for (var _b = 0, batches_1 = batches; _b < batches_1.length; _b++) {\n var batch = batches_1[_b];\n for (var _c = 0, _d = batch.mutations; _c < _d.length; _c++) {\n var mutation = _d[_c];\n changedKeys = changedKeys.add(mutation.key);\n }\n }\n }\n // Return the set of all (potentially) changed documents as the\n // result of the user change.\n return _this.localDocuments.getDocuments(txn, changedKeys);\n });\n });\n };\n LocalStore.prototype.startQueryCache = function (txn) {\n var _this = this;\n return this.queryCache.start(txn).next(function () {\n var targetId = _this.queryCache.getHighestTargetId();\n _this.targetIdGenerator = TargetIdGenerator.forLocalStore(targetId);\n });\n };\n LocalStore.prototype.startMutationQueue = function (txn) {\n var _this = this;\n return this.mutationQueue\n .start(txn)\n .next(function () {\n // If we have any leftover mutation batch results from a prior run,\n // just drop them.\n // TODO(http://b/33446471): We probably need to repopulate\n // heldBatchResults or similar instead, but that is not\n // straightforward since we're not persisting the write ack versions.\n _this.heldBatchResults = [];\n return _this.mutationQueue.getHighestAcknowledgedBatchId(txn);\n })\n .next(function (highestAck) {\n // TODO(mikelehen): This is the only usage of\n // getAllMutationBatchesThroughBatchId(). Consider removing it in\n // favor of a getAcknowledgedBatches() method.\n if (highestAck !== BATCHID_UNKNOWN) {\n return _this.mutationQueue.getAllMutationBatchesThroughBatchId(txn, highestAck);\n }\n else {\n return PersistencePromise.resolve([]);\n }\n })\n .next(function (ackedBatches) {\n if (ackedBatches.length > 0) {\n return _this.mutationQueue.removeMutationBatches(txn, ackedBatches);\n }\n else {\n return PersistencePromise.resolve();\n }\n });\n };\n /* Accept locally generated Mutations and commit them to storage. */\n LocalStore.prototype.localWrite = function (mutations) {\n var _this = this;\n return this.persistence.runTransaction('Locally write mutations', function (txn) {\n var batch;\n var localWriteTime = Timestamp.now();\n return _this.mutationQueue\n .addMutationBatch(txn, localWriteTime, mutations)\n .next(function (promisedBatch) {\n batch = promisedBatch;\n // TODO(koss): This is doing an N^2 update by replaying ALL the\n // mutations on each document (instead of just the ones added) in\n // this batch.\n var keys = batch.keys();\n return _this.localDocuments.getDocuments(txn, keys);\n })\n .next(function (changedDocuments) {\n return { batchId: batch.batchId, changes: changedDocuments };\n });\n });\n };\n /**\n * Acknowledge the given batch.\n *\n * On the happy path when a batch is acknowledged, the local store will\n *\n * + remove the batch from the mutation queue;\n * + apply the changes to the remote document cache;\n * + recalculate the latency compensated view implied by those changes (there\n * may be mutations in the queue that affect the documents but haven't been\n * acknowledged yet); and\n * + give the changed documents back the sync engine\n *\n * @returns The resulting (modified) documents.\n */\n LocalStore.prototype.acknowledgeBatch = function (batchResult) {\n var _this = this;\n return this.persistence.runTransaction('Acknowledge batch', function (txn) {\n var affected;\n return _this.mutationQueue\n .acknowledgeBatch(txn, batchResult.batch, batchResult.streamToken)\n .next(function () {\n if (_this.shouldHoldBatchResult(batchResult.commitVersion)) {\n _this.heldBatchResults.push(batchResult);\n affected = documentKeySet();\n return PersistencePromise.resolve();\n }\n else {\n var documentBuffer_1 = new RemoteDocumentChangeBuffer(_this.remoteDocuments);\n return _this.releaseBatchResults(txn, [batchResult], documentBuffer_1).next(function (promisedAffectedKeys) {\n affected = promisedAffectedKeys;\n return documentBuffer_1.apply(txn);\n });\n }\n })\n .next(function () {\n return _this.mutationQueue.performConsistencyCheck(txn);\n })\n .next(function () {\n return _this.localDocuments.getDocuments(txn, affected);\n });\n });\n };\n /**\n * Remove mutations from the MutationQueue for the specified batch;\n * LocalDocuments will be recalculated.\n *\n * @returns The resulting modified documents.\n */\n LocalStore.prototype.rejectBatch = function (batchId) {\n var _this = this;\n return this.persistence.runTransaction('Reject batch', function (txn) {\n var toReject;\n var affectedKeys;\n return _this.mutationQueue\n .lookupMutationBatch(txn, batchId)\n .next(function (promisedToReject) {\n assert(promisedToReject != null, 'Attempt to reject nonexistent batch!');\n toReject = promisedToReject;\n return _this.mutationQueue\n .getHighestAcknowledgedBatchId(txn)\n .next(function (lastAcked) {\n assert(batchId > lastAcked, \"Acknowledged batches can't be rejected.\");\n return toReject;\n });\n })\n .next(function () {\n return _this.removeMutationBatch(txn, toReject);\n })\n .next(function (promisedAffectedKeys) {\n affectedKeys = promisedAffectedKeys;\n return _this.mutationQueue.performConsistencyCheck(txn);\n })\n .next(function () {\n return _this.localDocuments.getDocuments(txn, affectedKeys);\n });\n });\n };\n /** Returns the last recorded stream token for the current user. */\n LocalStore.prototype.getLastStreamToken = function () {\n var _this = this;\n return this.persistence.runTransaction('Get last stream token', function (txn) {\n return _this.mutationQueue.getLastStreamToken(txn);\n });\n };\n /**\n * Sets the stream token for the current user without acknowledging any\n * mutation batch. This is usually only useful after a stream handshake or in\n * response to an error that requires clearing the stream token.\n */\n LocalStore.prototype.setLastStreamToken = function (streamToken) {\n var _this = this;\n return this.persistence.runTransaction('Set last stream token', function (txn) {\n return _this.mutationQueue.setLastStreamToken(txn, streamToken);\n });\n };\n /**\n * Returns the last consistent snapshot processed (used by the RemoteStore to\n * determine whether to buffer incoming snapshots from the backend).\n */\n LocalStore.prototype.getLastRemoteSnapshotVersion = function () {\n return this.queryCache.getLastRemoteSnapshotVersion();\n };\n /**\n * Update the \"ground-state\" (remote) documents. We assume that the remote\n * event reflects any write batches that have been acknowledged or rejected\n * (i.e. we do not re-apply local mutations to updates from this event).\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\n LocalStore.prototype.applyRemoteEvent = function (remoteEvent) {\n var _this = this;\n var documentBuffer = new RemoteDocumentChangeBuffer(this.remoteDocuments);\n return this.persistence.runTransaction('Apply remote event', function (txn) {\n var promises = [];\n objUtils.forEachNumber(remoteEvent.targetChanges, function (targetId, change) {\n // Do not ref/unref unassigned targetIds - it may lead to leaks.\n var queryData = _this.targetIds[targetId];\n if (!queryData)\n return;\n var mapping = change.mapping;\n if (mapping) {\n // First make sure that all references are deleted\n if (mapping instanceof ResetMapping) {\n promises.push(_this.queryCache\n .removeMatchingKeysForTargetId(txn, targetId)\n .next(function () {\n return _this.queryCache.addMatchingKeys(txn, mapping.documents, targetId);\n }));\n }\n else if (mapping instanceof UpdateMapping) {\n promises.push(_this.queryCache\n .removeMatchingKeys(txn, mapping.removedDocuments, targetId)\n .next(function () {\n return _this.queryCache.addMatchingKeys(txn, mapping.addedDocuments, targetId);\n }));\n }\n else {\n return fail('Unknown mapping type: ' + JSON.stringify(mapping));\n }\n }\n // Update the resume token if the change includes one. Don't clear\n // any preexisting value.\n var resumeToken = change.resumeToken;\n if (resumeToken.length > 0) {\n queryData = queryData.update({\n resumeToken: resumeToken,\n snapshotVersion: change.snapshotVersion\n });\n _this.targetIds[targetId] = queryData;\n promises.push(_this.queryCache.addQueryData(txn, queryData));\n }\n });\n var changedDocKeys = documentKeySet();\n remoteEvent.documentUpdates.forEach(function (key, doc) {\n changedDocKeys = changedDocKeys.add(key);\n promises.push(documentBuffer.getEntry(txn, key).next(function (existingDoc) {\n // Make sure we don't apply an old document version to the remote\n // cache, though we make an exception for SnapshotVersion.MIN which\n // can happen for manufactured events (e.g. in the case of a limbo\n // document resolution failing).\n if (existingDoc == null ||\n doc.version.equals(SnapshotVersion.MIN) ||\n doc.version.compareTo(existingDoc.version) >= 0) {\n documentBuffer.addEntry(doc);\n }\n else {\n log.debug(LOG_TAG, 'Ignoring outdated watch update for ', key, '. Current version:', existingDoc.version, ' Watch version:', doc.version);\n }\n // The document might be garbage because it was unreferenced by\n // everything. Make sure to mark it as garbage if it is...\n _this.garbageCollector.addPotentialGarbageKey(key);\n }));\n });\n // HACK: The only reason we allow a null snapshot version is so that we\n // can synthesize remote events when we get permission denied errors while\n // trying to resolve the state of a locally cached document that is in\n // limbo.\n var lastRemoteVersion = _this.queryCache.getLastRemoteSnapshotVersion();\n var remoteVersion = remoteEvent.snapshotVersion;\n if (!remoteVersion.equals(SnapshotVersion.MIN)) {\n assert(remoteVersion.compareTo(lastRemoteVersion) >= 0, 'Watch stream reverted to previous snapshot?? ' +\n remoteVersion +\n ' < ' +\n lastRemoteVersion);\n promises.push(_this.queryCache.setLastRemoteSnapshotVersion(txn, remoteVersion));\n }\n var releasedWriteKeys;\n return PersistencePromise.waitFor(promises)\n .next(function () { return _this.releaseHeldBatchResults(txn, documentBuffer); })\n .next(function (promisedReleasedWriteKeys) {\n releasedWriteKeys = promisedReleasedWriteKeys;\n return documentBuffer.apply(txn);\n })\n .next(function () {\n return _this.localDocuments.getDocuments(txn, changedDocKeys.unionWith(releasedWriteKeys));\n });\n });\n };\n /**\n * Notify local store of the changed views to locally pin documents.\n */\n LocalStore.prototype.notifyLocalViewChanges = function (viewChanges) {\n var _this = this;\n return this.persistence.runTransaction('Notify local view changes', function (txn) {\n var promises = [];\n var _loop_1 = function (view) {\n promises.push(_this.queryCache\n .getQueryData(txn, view.query)\n .next(function (queryData) {\n assert(queryData !== null, 'Local view changes contain unallocated query.');\n var targetId = queryData.targetId;\n _this.localViewReferences.addReferences(view.addedKeys, targetId);\n _this.localViewReferences.removeReferences(view.removedKeys, targetId);\n }));\n };\n for (var _i = 0, viewChanges_1 = viewChanges; _i < viewChanges_1.length; _i++) {\n var view = viewChanges_1[_i];\n _loop_1(view);\n }\n return PersistencePromise.waitFor(promises);\n });\n };\n /**\n * Gets the mutation batch after the passed in batchId in the mutation queue\n * or null if empty.\n * @param afterBatchId If provided, the batch to search after.\n * @returns The next mutation or null if there wasn't one.\n */\n LocalStore.prototype.nextMutationBatch = function (afterBatchId) {\n var _this = this;\n return this.persistence.runTransaction('Get next mutation batch', function (txn) {\n if (afterBatchId === undefined) {\n afterBatchId = BATCHID_UNKNOWN;\n }\n return _this.mutationQueue.getNextMutationBatchAfterBatchId(txn, afterBatchId);\n });\n };\n /**\n * Read the current value of a Document with a given key or null if not\n * found - used for testing.\n */\n LocalStore.prototype.readDocument = function (key) {\n var _this = this;\n return this.persistence.runTransaction('read document', function (txn) {\n return _this.localDocuments.getDocument(txn, key);\n });\n };\n /**\n * Assigns the given query an internal ID so that its results can be pinned so\n * they don't get GC'd. A query must be allocated in the local store before\n * the store can be used to manage its view.\n */\n LocalStore.prototype.allocateQuery = function (query) {\n var _this = this;\n return this.persistence.runTransaction('Allocate query', function (txn) {\n var queryData;\n return _this.queryCache\n .getQueryData(txn, query)\n .next(function (cached) {\n if (cached) {\n // This query has been listened to previously, so reuse the\n // previous targetID.\n // TODO(mcg): freshen last accessed date?\n queryData = cached;\n return PersistencePromise.resolve();\n }\n else {\n var targetId = _this.targetIdGenerator.next();\n queryData = new QueryData(query, targetId, QueryPurpose.Listen);\n return _this.queryCache.addQueryData(txn, queryData);\n }\n })\n .next(function () {\n assert(!_this.targetIds[queryData.targetId], 'Tried to allocate an already allocated query: ' + query);\n _this.targetIds[queryData.targetId] = queryData;\n return queryData;\n });\n });\n };\n /** Unpin all the documents associated with the given query. */\n LocalStore.prototype.releaseQuery = function (query) {\n var _this = this;\n return this.persistence.runTransaction('Release query', function (txn) {\n return _this.queryCache\n .getQueryData(txn, query)\n .next(function (queryData) {\n assert(queryData != null, 'Tried to release nonexistent query: ' + query);\n _this.localViewReferences.removeReferencesForId(queryData.targetId);\n delete _this.targetIds[queryData.targetId];\n if (_this.garbageCollector.isEager) {\n return _this.queryCache.removeQueryData(txn, queryData);\n }\n else {\n return PersistencePromise.resolve();\n }\n })\n .next(function () {\n // If this was the last watch target, then we won't get any more\n // watch snapshots, so we should release any held batch results.\n if (objUtils.isEmpty(_this.targetIds)) {\n var documentBuffer_2 = new RemoteDocumentChangeBuffer(_this.remoteDocuments);\n return _this.releaseHeldBatchResults(txn, documentBuffer_2).next(function () {\n documentBuffer_2.apply(txn);\n });\n }\n else {\n return PersistencePromise.resolve();\n }\n });\n });\n };\n /**\n * Runs the specified query against all the documents in the local store and\n * returns the results.\n */\n LocalStore.prototype.executeQuery = function (query) {\n var _this = this;\n return this.persistence.runTransaction('Execute query', function (txn) {\n return _this.localDocuments.getDocumentsMatchingQuery(txn, query);\n });\n };\n /**\n * Returns the keys of the documents that are associated with the given\n * target id in the remote table.\n */\n LocalStore.prototype.remoteDocumentKeys = function (targetId) {\n var _this = this;\n return this.persistence.runTransaction('Remote document keys', function (txn) {\n return _this.queryCache.getMatchingKeysForTargetId(txn, targetId);\n });\n };\n /**\n * Collect garbage if necessary.\n * Should be called periodically by Sync Engine to recover resources. The\n * implementation must guarantee that GC won't happen in other places than\n * this method call.\n */\n LocalStore.prototype.collectGarbage = function () {\n var _this = this;\n // Call collectGarbage regardless of whether isGCEnabled so the referenceSet\n // doesn't continue to accumulate the garbage keys.\n return this.persistence.runTransaction('Garbage collection', function (txn) {\n return _this.garbageCollector.collectGarbage(txn).next(function (garbage) {\n var promises = [];\n garbage.forEach(function (key) {\n promises.push(_this.remoteDocuments.removeEntry(txn, key));\n });\n return PersistencePromise.waitFor(promises);\n });\n });\n };\n LocalStore.prototype.releaseHeldBatchResults = function (txn, documentBuffer) {\n var toRelease = [];\n for (var _i = 0, _a = this.heldBatchResults; _i < _a.length; _i++) {\n var batchResult = _a[_i];\n if (!this.isRemoteUpToVersion(batchResult.commitVersion)) {\n break;\n }\n toRelease.push(batchResult);\n }\n if (toRelease.length === 0) {\n return PersistencePromise.resolve(documentKeySet());\n }\n else {\n this.heldBatchResults.splice(0, toRelease.length);\n return this.releaseBatchResults(txn, toRelease, documentBuffer);\n }\n };\n LocalStore.prototype.isRemoteUpToVersion = function (version) {\n // If there are no watch targets, then we won't get remote snapshots, and\n // we are always \"up-to-date.\"\n var lastRemoteVersion = this.queryCache.getLastRemoteSnapshotVersion();\n return (version.compareTo(lastRemoteVersion) <= 0 ||\n objUtils.isEmpty(this.targetIds));\n };\n LocalStore.prototype.shouldHoldBatchResult = function (version) {\n // Check if watcher isn't up to date or prior results are already held.\n return (!this.isRemoteUpToVersion(version) || this.heldBatchResults.length > 0);\n };\n LocalStore.prototype.releaseBatchResults = function (txn, batchResults, documentBuffer) {\n var _this = this;\n var promiseChain = PersistencePromise.resolve();\n var _loop_2 = function (batchResult) {\n promiseChain = promiseChain.next(function () {\n return _this.applyWriteToRemoteDocuments(txn, batchResult, documentBuffer);\n });\n };\n for (var _i = 0, batchResults_1 = batchResults; _i < batchResults_1.length; _i++) {\n var batchResult = batchResults_1[_i];\n _loop_2(batchResult);\n }\n return promiseChain.next(function () {\n return _this.removeMutationBatches(txn, batchResults.map(function (result) { return result.batch; }));\n });\n };\n LocalStore.prototype.removeMutationBatch = function (txn, batch) {\n return this.removeMutationBatches(txn, [batch]);\n };\n /** Removes all the mutation batches named in the given array. */\n LocalStore.prototype.removeMutationBatches = function (txn, batches) {\n var affectedDocs = documentKeySet();\n for (var _i = 0, batches_2 = batches; _i < batches_2.length; _i++) {\n var batch = batches_2[_i];\n for (var _a = 0, _b = batch.mutations; _a < _b.length; _a++) {\n var mutation = _b[_a];\n var key = mutation.key;\n affectedDocs = affectedDocs.add(key);\n }\n }\n return this.mutationQueue\n .removeMutationBatches(txn, batches)\n .next(function () { return affectedDocs; });\n };\n LocalStore.prototype.applyWriteToRemoteDocuments = function (txn, batchResult, documentBuffer) {\n var batch = batchResult.batch;\n var docKeys = batch.keys();\n var promiseChain = PersistencePromise.resolve();\n docKeys.forEach(function (docKey) {\n promiseChain = promiseChain\n .next(function () {\n return documentBuffer.getEntry(txn, docKey);\n })\n .next(function (remoteDoc) {\n var doc = remoteDoc;\n var ackVersion = batchResult.docVersions.get(docKey);\n assert(ackVersion !== null, 'ackVersions should contain every doc in the write.');\n if (!doc || doc.version.compareTo(ackVersion) < 0) {\n doc = batch.applyToRemoteDocument(docKey, doc, batchResult);\n if (!doc) {\n assert(!remoteDoc, 'Mutation batch ' +\n batch +\n ' applied to document ' +\n remoteDoc +\n ' resulted in null');\n }\n else {\n documentBuffer.addEntry(doc);\n }\n }\n });\n });\n return promiseChain;\n };\n return LocalStore;\n}());\nexport { LocalStore };\n\n//# sourceMappingURL=local_store.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/local_store.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DocumentKey } from '../model/document_key';\nimport { BATCHID_UNKNOWN, MutationBatch } from '../model/mutation_batch';\nimport { emptyByteString } from '../platform/platform';\nimport { assert } from '../util/assert';\nimport { primitiveComparator } from '../util/misc';\nimport { SortedSet } from '../util/sorted_set';\nimport { PersistencePromise } from './persistence_promise';\nimport { DocReference } from './reference_set';\nvar MemoryMutationQueue = /** @class */ (function () {\n function MemoryMutationQueue() {\n /**\n * The set of all mutations that have been sent but not yet been applied to\n * the backend.\n */\n this.mutationQueue = [];\n /** Next value to use when assigning sequential IDs to each mutation batch. */\n this.nextBatchId = 1;\n /** The highest acknowledged mutation in the queue. */\n this.highestAcknowledgedBatchId = BATCHID_UNKNOWN;\n /** The last received stream token from the server, used to acknowledge which\n * responses the client has processed. Stream tokens are opaque checkpoint\n * markers whose only real value is their inclusion in the next request.\n */\n this.lastStreamToken = emptyByteString();\n /** The garbage collector to notify about potential garbage keys. */\n this.garbageCollector = null;\n /** An ordered mapping between documents and the mutations batch IDs. */\n this.batchesByDocumentKey = new SortedSet(DocReference.compareByKey);\n }\n MemoryMutationQueue.prototype.start = function (transaction) {\n // NOTE: The queue may be shutdown / started multiple times, since we\n // maintain the queue for the duration of the app session in case a user\n // logs out / back in. To behave like the LevelDB-backed MutationQueue (and\n // accommodate tests that expect as much), we reset nextBatchId and\n // highestAcknowledgedBatchId if the queue is empty.\n if (this.mutationQueue.length === 0) {\n this.nextBatchId = 1;\n this.highestAcknowledgedBatchId = BATCHID_UNKNOWN;\n }\n assert(this.highestAcknowledgedBatchId < this.nextBatchId, 'highestAcknowledgedBatchId must be less than the nextBatchId');\n return PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.checkEmpty = function (transaction) {\n return PersistencePromise.resolve(this.mutationQueue.length === 0);\n };\n MemoryMutationQueue.prototype.getNextBatchId = function (transaction) {\n return PersistencePromise.resolve(this.nextBatchId);\n };\n MemoryMutationQueue.prototype.getHighestAcknowledgedBatchId = function (transaction) {\n return PersistencePromise.resolve(this.highestAcknowledgedBatchId);\n };\n MemoryMutationQueue.prototype.acknowledgeBatch = function (transaction, batch, streamToken) {\n var batchId = batch.batchId;\n assert(batchId > this.highestAcknowledgedBatchId, 'Mutation batchIDs must be acknowledged in order');\n var batchIndex = this.indexOfExistingBatchId(batchId, 'acknowledged');\n // Verify that the batch in the queue is the one to be acknowledged.\n var check = this.mutationQueue[batchIndex];\n assert(batchId === check.batchId, 'Queue ordering failure: expected batch ' +\n batchId +\n ', got batch ' +\n check.batchId);\n assert(!check.isTombstone(), \"Can't acknowledge a previously removed batch\");\n this.highestAcknowledgedBatchId = batchId;\n this.lastStreamToken = streamToken;\n return PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.getLastStreamToken = function (transaction) {\n return PersistencePromise.resolve(this.lastStreamToken);\n };\n MemoryMutationQueue.prototype.setLastStreamToken = function (transaction, streamToken) {\n this.lastStreamToken = streamToken;\n return PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.addMutationBatch = function (transaction, localWriteTime, mutations) {\n assert(mutations.length !== 0, 'Mutation batches should not be empty');\n var batchId = this.nextBatchId;\n this.nextBatchId++;\n if (this.mutationQueue.length > 0) {\n var prior = this.mutationQueue[this.mutationQueue.length - 1];\n assert(prior.batchId < batchId, 'Mutation batchIDs must be monotonically increasing order');\n }\n var batch = new MutationBatch(batchId, localWriteTime, mutations);\n this.mutationQueue.push(batch);\n // Track references by document key.\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.batchesByDocumentKey = this.batchesByDocumentKey.add(new DocReference(mutation.key, batchId));\n }\n return PersistencePromise.resolve(batch);\n };\n MemoryMutationQueue.prototype.lookupMutationBatch = function (transaction, batchId) {\n return PersistencePromise.resolve(this.findMutationBatch(batchId));\n };\n MemoryMutationQueue.prototype.getNextMutationBatchAfterBatchId = function (transaction, batchId) {\n var size = this.mutationQueue.length;\n // All batches with batchId <= this.highestAcknowledgedBatchId have been\n // acknowledged so the first unacknowledged batch after batchID will have a\n // batchID larger than both of these values.\n batchId = Math.max(batchId + 1, this.highestAcknowledgedBatchId);\n // The requested batchId may still be out of range so normalize it to the\n // start of the queue.\n var rawIndex = this.indexOfBatchId(batchId);\n var index = rawIndex < 0 ? 0 : rawIndex;\n // Finally return the first non-tombstone batch.\n for (; index < size; index++) {\n var batch = this.mutationQueue[index];\n if (!batch.isTombstone()) {\n return PersistencePromise.resolve(batch);\n }\n }\n return PersistencePromise.resolve(null);\n };\n MemoryMutationQueue.prototype.getAllMutationBatches = function (transaction) {\n return PersistencePromise.resolve(this.getAllLiveMutationBatchesBeforeIndex(this.mutationQueue.length));\n };\n MemoryMutationQueue.prototype.getAllMutationBatchesThroughBatchId = function (transaction, batchId) {\n var count = this.mutationQueue.length;\n var endIndex = this.indexOfBatchId(batchId);\n if (endIndex < 0) {\n endIndex = 0;\n }\n else if (endIndex >= count) {\n endIndex = count;\n }\n else {\n // The endIndex is in the queue so increment to pull everything in the\n // queue including it.\n endIndex++;\n }\n return PersistencePromise.resolve(this.getAllLiveMutationBatchesBeforeIndex(endIndex));\n };\n MemoryMutationQueue.prototype.getAllMutationBatchesAffectingDocumentKey = function (transaction, documentKey) {\n var _this = this;\n var start = new DocReference(documentKey, 0);\n var end = new DocReference(documentKey, Number.POSITIVE_INFINITY);\n var result = [];\n this.batchesByDocumentKey.forEachInRange([start, end], function (ref) {\n assert(documentKey.equals(ref.key), \"Should only iterate over a single key's batches\");\n var batch = _this.findMutationBatch(ref.targetOrBatchId);\n assert(batch !== null, 'Batches in the index must exist in the main table');\n result.push(batch);\n });\n return PersistencePromise.resolve(result);\n };\n MemoryMutationQueue.prototype.getAllMutationBatchesAffectingQuery = function (transaction, query) {\n var _this = this;\n // Use the query path as a prefix for testing if a document matches the\n // query.\n var prefix = query.path;\n var immediateChildrenPathLength = prefix.length + 1;\n // Construct a document reference for actually scanning the index. Unlike\n // the prefix the document key in this reference must have an even number of\n // segments. The empty segment can be used a suffix of the query path\n // because it precedes all other segments in an ordered traversal.\n var startPath = prefix;\n if (!DocumentKey.isDocumentKey(startPath)) {\n startPath = startPath.child('');\n }\n var start = new DocReference(new DocumentKey(startPath), 0);\n // Find unique batchIDs referenced by all documents potentially matching the\n // query.\n var uniqueBatchIDs = new SortedSet(primitiveComparator);\n this.batchesByDocumentKey.forEachWhile(function (ref) {\n var rowKeyPath = ref.key.path;\n if (!prefix.isPrefixOf(rowKeyPath)) {\n return false;\n }\n else {\n // Rows with document keys more than one segment longer than the query\n // path can't be matches. For example, a query on 'rooms' can't match\n // the document /rooms/abc/messages/xyx.\n // TODO(mcg): we'll need a different scanner when we implement\n // ancestor queries.\n if (rowKeyPath.length === immediateChildrenPathLength) {\n uniqueBatchIDs = uniqueBatchIDs.add(ref.targetOrBatchId);\n }\n return true;\n }\n }, start);\n // Construct an array of matching batches, sorted by batchID to ensure that\n // multiple mutations affecting the same document key are applied in order.\n var result = [];\n uniqueBatchIDs.forEach(function (batchId) {\n var batch = _this.findMutationBatch(batchId);\n if (batch !== null) {\n result.push(batch);\n }\n });\n return PersistencePromise.resolve(result);\n };\n MemoryMutationQueue.prototype.removeMutationBatches = function (transaction, batches) {\n var batchCount = batches.length;\n assert(batchCount > 0, 'Should not remove mutations when none exist.');\n var firstBatchId = batches[0].batchId;\n var queueCount = this.mutationQueue.length;\n // Find the position of the first batch for removal. This need not be the\n // first entry in the queue.\n var startIndex = this.indexOfExistingBatchId(firstBatchId, 'removed');\n assert(this.mutationQueue[startIndex].batchId === firstBatchId, 'Removed batches must exist in the queue');\n // Check that removed batches are contiguous (while excluding tombstones).\n var batchIndex = 1;\n var queueIndex = startIndex + 1;\n while (batchIndex < batchCount && queueIndex < queueCount) {\n var batch = this.mutationQueue[queueIndex];\n if (batch.isTombstone()) {\n queueIndex++;\n continue;\n }\n assert(batch.batchId === batches[batchIndex].batchId, 'Removed batches must be contiguous in the queue');\n batchIndex++;\n queueIndex++;\n }\n // Only actually remove batches if removing at the front of the queue.\n // Previously rejected batches may have left tombstones in the queue, so\n // expand the removal range to include any tombstones.\n if (startIndex === 0) {\n for (; queueIndex < queueCount; queueIndex++) {\n var batch = this.mutationQueue[queueIndex];\n if (!batch.isTombstone()) {\n break;\n }\n }\n var length_1 = queueIndex - startIndex;\n this.mutationQueue.splice(startIndex, length_1);\n }\n else {\n // Mark the tombstones\n for (var i = startIndex; i < queueIndex; i++) {\n this.mutationQueue[i] = this.mutationQueue[i].toTombstone();\n }\n }\n var references = this.batchesByDocumentKey;\n for (var _i = 0, batches_1 = batches; _i < batches_1.length; _i++) {\n var batch = batches_1[_i];\n var batchId = batch.batchId;\n for (var _a = 0, _b = batch.mutations; _a < _b.length; _a++) {\n var mutation = _b[_a];\n var key = mutation.key;\n if (this.garbageCollector !== null) {\n this.garbageCollector.addPotentialGarbageKey(key);\n }\n var ref = new DocReference(key, batchId);\n references = references.delete(ref);\n }\n }\n this.batchesByDocumentKey = references;\n return PersistencePromise.resolve();\n };\n MemoryMutationQueue.prototype.setGarbageCollector = function (garbageCollector) {\n this.garbageCollector = garbageCollector;\n };\n MemoryMutationQueue.prototype.containsKey = function (txn, key) {\n var ref = new DocReference(key, 0);\n var firstRef = this.batchesByDocumentKey.firstAfterOrEqual(ref);\n return PersistencePromise.resolve(key.equals(firstRef && firstRef.key));\n };\n MemoryMutationQueue.prototype.performConsistencyCheck = function (txn) {\n if (this.mutationQueue.length === 0) {\n assert(this.batchesByDocumentKey.isEmpty(), 'Document leak -- detected dangling mutation references when queue is empty.');\n }\n return PersistencePromise.resolve();\n };\n /**\n * A private helper that collects all the mutations batches in the queue up to\n * but not including the given endIndex. All tombstones in the queue are\n * excluded.\n */\n MemoryMutationQueue.prototype.getAllLiveMutationBatchesBeforeIndex = function (endIndex) {\n var result = [];\n for (var i = 0; i < endIndex; i++) {\n var batch = this.mutationQueue[i];\n if (!batch.isTombstone()) {\n result.push(batch);\n }\n }\n return result;\n };\n /**\n * Finds the index of the given batchId in the mutation queue and asserts that\n * the resulting index is within the bounds of the queue.\n *\n * @param batchId The batchId to search for\n * @param action A description of what the caller is doing, phrased in passive\n * form (e.g. \"acknowledged\" in a routine that acknowledges batches).\n */\n MemoryMutationQueue.prototype.indexOfExistingBatchId = function (batchId, action) {\n var index = this.indexOfBatchId(batchId);\n assert(index >= 0 && index < this.mutationQueue.length, 'Batches must exist to be ' + action);\n return index;\n };\n /**\n * Finds the index of the given batchId in the mutation queue. This operation\n * is O(1).\n *\n * @return The computed index of the batch with the given batchId, based on\n * the state of the queue. Note this index can be negative if the requested\n * batchId has already been remvoed from the queue or past the end of the\n * queue if the batchId is larger than the last added batch.\n */\n MemoryMutationQueue.prototype.indexOfBatchId = function (batchId) {\n if (this.mutationQueue.length === 0) {\n // As an index this is past the end of the queue\n return 0;\n }\n // Examine the front of the queue to figure out the difference between the\n // batchId and indexes in the array. Note that since the queue is ordered\n // by batchId, if the first batch has a larger batchId then the requested\n // batchId doesn't exist in the queue.\n var firstBatchId = this.mutationQueue[0].batchId;\n return batchId - firstBatchId;\n };\n /**\n * A version of lookupMutationBatch that doesn't return a promise, this makes\n * other functions that uses this code easier to read and more efficent.\n */\n MemoryMutationQueue.prototype.findMutationBatch = function (batchId) {\n var index = this.indexOfBatchId(batchId);\n if (index < 0 || index >= this.mutationQueue.length) {\n return null;\n }\n var batch = this.mutationQueue[index];\n assert(batch.batchId === batchId, 'If found batch must match');\n return batch.isTombstone() ? null : batch;\n };\n return MemoryMutationQueue;\n}());\nexport { MemoryMutationQueue };\n\n//# sourceMappingURL=memory_mutation_queue.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/memory_mutation_queue.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { ObjectMap } from '../util/obj_map';\nimport { PersistencePromise } from './persistence_promise';\nimport { ReferenceSet } from './reference_set';\nvar MemoryQueryCache = /** @class */ (function () {\n function MemoryQueryCache() {\n /**\n * Maps a query to the data about that query\n */\n this.queries = new ObjectMap(function (q) { return q.canonicalId(); });\n /** The last received snapshot version. */\n this.lastRemoteSnapshotVersion = SnapshotVersion.MIN;\n /** The highest numbered target ID encountered. */\n this.highestTargetId = 0;\n /**\n * A ordered bidirectional mapping between documents and the remote target\n * IDs.\n */\n this.references = new ReferenceSet();\n }\n MemoryQueryCache.prototype.start = function (transaction) {\n // Nothing to do.\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.getLastRemoteSnapshotVersion = function () {\n return this.lastRemoteSnapshotVersion;\n };\n MemoryQueryCache.prototype.getHighestTargetId = function () {\n return this.highestTargetId;\n };\n MemoryQueryCache.prototype.setLastRemoteSnapshotVersion = function (transaction, snapshotVersion) {\n this.lastRemoteSnapshotVersion = snapshotVersion;\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.addQueryData = function (transaction, queryData) {\n this.queries.set(queryData.query, queryData);\n var targetId = queryData.targetId;\n if (targetId > this.highestTargetId) {\n this.highestTargetId = targetId;\n }\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.removeQueryData = function (transaction, queryData) {\n this.queries.delete(queryData.query);\n this.references.removeReferencesForId(queryData.targetId);\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.getQueryData = function (transaction, query) {\n var queryData = this.queries.get(query) || null;\n return PersistencePromise.resolve(queryData);\n };\n MemoryQueryCache.prototype.addMatchingKeys = function (txn, keys, targetId) {\n this.references.addReferences(keys, targetId);\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.removeMatchingKeys = function (txn, keys, targetId) {\n this.references.removeReferences(keys, targetId);\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.removeMatchingKeysForTargetId = function (txn, targetId) {\n this.references.removeReferencesForId(targetId);\n return PersistencePromise.resolve();\n };\n MemoryQueryCache.prototype.getMatchingKeysForTargetId = function (txn, targetId) {\n var matchingKeys = this.references.referencesForId(targetId);\n return PersistencePromise.resolve(matchingKeys);\n };\n MemoryQueryCache.prototype.setGarbageCollector = function (gc) {\n this.references.setGarbageCollector(gc);\n };\n MemoryQueryCache.prototype.containsKey = function (txn, key) {\n return this.references.containsKey(txn, key);\n };\n return MemoryQueryCache;\n}());\nexport { MemoryQueryCache };\n\n//# sourceMappingURL=memory_query_cache.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/memory_query_cache.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentMap, maybeDocumentMap } from '../model/collections';\nimport { Document } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { PersistencePromise } from './persistence_promise';\nvar MemoryRemoteDocumentCache = /** @class */ (function () {\n function MemoryRemoteDocumentCache() {\n this.docs = maybeDocumentMap();\n }\n MemoryRemoteDocumentCache.prototype.addEntry = function (transaction, maybeDocument) {\n this.docs = this.docs.insert(maybeDocument.key, maybeDocument);\n return PersistencePromise.resolve();\n };\n MemoryRemoteDocumentCache.prototype.removeEntry = function (transaction, documentKey) {\n this.docs = this.docs.remove(documentKey);\n return PersistencePromise.resolve();\n };\n MemoryRemoteDocumentCache.prototype.getEntry = function (transaction, documentKey) {\n return PersistencePromise.resolve(this.docs.get(documentKey));\n };\n MemoryRemoteDocumentCache.prototype.getDocumentsMatchingQuery = function (transaction, query) {\n var results = documentMap();\n // Documents are ordered by key, so we can use a prefix scan to narrow down\n // the documents we need to match the query against.\n var prefix = new DocumentKey(query.path.child(''));\n var iterator = this.docs.getIteratorFrom(prefix);\n while (iterator.hasNext()) {\n var _a = iterator.getNext(), key = _a.key, maybeDoc = _a.value;\n if (!query.path.isPrefixOf(key.path)) {\n break;\n }\n if (maybeDoc instanceof Document && query.matches(maybeDoc)) {\n results = results.insert(maybeDoc.key, maybeDoc);\n }\n }\n return PersistencePromise.resolve(results);\n };\n return MemoryRemoteDocumentCache;\n}());\nexport { MemoryRemoteDocumentCache };\n\n//# sourceMappingURL=memory_remote_document_cache.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/memory_remote_document_cache.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert } from '../util/assert';\nimport { debug } from '../util/log';\nimport { MemoryMutationQueue } from './memory_mutation_queue';\nimport { MemoryQueryCache } from './memory_query_cache';\nimport { MemoryRemoteDocumentCache } from './memory_remote_document_cache';\nvar LOG_TAG = 'MemoryPersistence';\n/**\n * A memory-backed instance of Persistence. Data is stored only in RAM and\n * not persisted across sessions.\n */\nvar MemoryPersistence = /** @class */ (function () {\n function MemoryPersistence() {\n /**\n * Note that these are retained here to make it easier to write tests\n * affecting both the in-memory and IndexedDB-backed persistence layers. Tests\n * can create a new LocalStore wrapping this Persistence instance and this\n * will make the in-memory persistence layer behave as if it were actually\n * persisting values.\n */\n this.mutationQueues = {};\n this.remoteDocumentCache = new MemoryRemoteDocumentCache();\n this.queryCache = new MemoryQueryCache();\n this.started = false;\n }\n MemoryPersistence.prototype.start = function () {\n assert(!this.started, 'MemoryPersistence double-started!');\n this.started = true;\n // No durable state to read on startup.\n return Promise.resolve();\n };\n MemoryPersistence.prototype.shutdown = function () {\n // No durable state to ensure is closed on shutdown.\n assert(this.started, 'MemoryPersistence shutdown without start!');\n this.started = false;\n return Promise.resolve();\n };\n MemoryPersistence.prototype.getMutationQueue = function (user) {\n var queue = this.mutationQueues[user.toKey()];\n if (!queue) {\n queue = new MemoryMutationQueue();\n this.mutationQueues[user.toKey()] = queue;\n }\n return queue;\n };\n MemoryPersistence.prototype.getQueryCache = function () {\n return this.queryCache;\n };\n MemoryPersistence.prototype.getRemoteDocumentCache = function () {\n return this.remoteDocumentCache;\n };\n MemoryPersistence.prototype.runTransaction = function (action, operation) {\n debug(LOG_TAG, 'Starting transaction:', action);\n return operation(new MemoryPersistenceTransaction()).toPromise();\n };\n return MemoryPersistence;\n}());\nexport { MemoryPersistence };\n/** Dummy class since memory persistence doesn't actually use transactions. */\nvar MemoryPersistenceTransaction = /** @class */ (function () {\n function MemoryPersistenceTransaction() {\n }\n return MemoryPersistenceTransaction;\n}());\n\n//# sourceMappingURL=memory_persistence.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/memory_persistence.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { documentKeySet } from '../model/collections';\nimport { PersistencePromise } from './persistence_promise';\n/**\n * A garbage collector implementation that does absolutely nothing. It ignores\n * all addGarbageSource and addPotentialGarbageKey messages and and never\n * produces any garbage.\n */\nvar NoOpGarbageCollector = /** @class */ (function () {\n function NoOpGarbageCollector() {\n this.isEager = false;\n }\n NoOpGarbageCollector.prototype.addGarbageSource = function (garbageSource) {\n // Not tracking garbage so don't track sources.\n };\n NoOpGarbageCollector.prototype.removeGarbageSource = function (garbageSource) {\n // Not tracking garbage so don't track sources.\n };\n NoOpGarbageCollector.prototype.addPotentialGarbageKey = function (key) {\n // Not tracking garbage so ignore.\n };\n NoOpGarbageCollector.prototype.collectGarbage = function (txn) {\n return PersistencePromise.resolve(documentKeySet());\n };\n return NoOpGarbageCollector;\n}());\nexport { NoOpGarbageCollector };\n\n//# sourceMappingURL=no_op_garbage_collector.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/local/no_op_garbage_collector.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar Deferred = /** @class */ (function () {\n function Deferred() {\n var _this = this;\n this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n }\n return Deferred;\n}());\nexport { Deferred };\n/**\n * Takes an array of values and sequences them using the promise (or value)\n * returned by the supplied callback. The callback for each item is called\n * after the promise is resolved for the previous item.\n * The function returns a promise which is resolved after the promise for\n * the last item is resolved.\n */\nexport function sequence(values, fn, initialValue) {\n var result = Promise.resolve(initialValue);\n values.forEach(function (value) {\n result = result.then(function (lastResult) { return fn(value, lastResult); });\n });\n return result;\n}\n\n//# sourceMappingURL=promise.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/promise.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as log from '../util/log';\nimport { Deferred } from '../util/promise';\nvar LOG_TAG = 'ExponentialBackoff';\n/**\n * A helper for running delayed tasks following an exponential backoff curve\n * between attempts.\n *\n * Each delay is made up of a \"base\" delay which follows the exponential\n * backoff curve, and a +/- 50% \"jitter\" that is calculated and added to the\n * base delay. This prevents clients from accidentally synchronizing their\n * delays causing spikes of load to the backend.\n */\nvar ExponentialBackoff = /** @class */ (function () {\n function ExponentialBackoff(\n /**\n * The initial delay (used as the base delay on the first retry attempt).\n * Note that jitter will still be applied, so the actual delay could be as\n * little as 0.5*initialDelayMs.\n */\n initialDelayMs, \n /**\n * The multiplier to use to determine the extended base delay after each\n * attempt.\n */\n backoffFactor, \n /**\n * The maximum base delay after which no further backoff is performed.\n * Note that jitter will still be applied, so the actual delay could be as\n * much as 1.5*maxDelayMs.\n */\n maxDelayMs) {\n this.initialDelayMs = initialDelayMs;\n this.backoffFactor = backoffFactor;\n this.maxDelayMs = maxDelayMs;\n this.reset();\n }\n /**\n * Resets the backoff delay.\n *\n * The very next backoffAndWait() will have no delay. If it is called again\n * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and\n * subsequent ones will increase according to the backoffFactor.\n */\n ExponentialBackoff.prototype.reset = function () {\n this.currentBaseMs = 0;\n };\n /**\n * Resets the backoff delay to the maximum delay (e.g. for use after a\n * RESOURCE_EXHAUSTED error).\n */\n ExponentialBackoff.prototype.resetToMax = function () {\n this.currentBaseMs = this.maxDelayMs;\n };\n /**\n * Returns a promise that resolves after currentDelayMs, and increases the\n * delay for any subsequent attempts.\n */\n ExponentialBackoff.prototype.backoffAndWait = function () {\n var def = new Deferred();\n // First schedule using the current base (which may be 0 and should be\n // honored as such).\n var delayWithJitterMs = this.currentBaseMs + this.jitterDelayMs();\n if (this.currentBaseMs > 0) {\n log.debug(LOG_TAG, \"Backing off for \" + delayWithJitterMs + \" ms \" +\n (\"(base delay: \" + this.currentBaseMs + \" ms)\"));\n }\n setTimeout(function () {\n def.resolve();\n }, delayWithJitterMs);\n // Apply backoff factor to determine next delay and ensure it is within\n // bounds.\n this.currentBaseMs *= this.backoffFactor;\n if (this.currentBaseMs < this.initialDelayMs) {\n this.currentBaseMs = this.initialDelayMs;\n }\n if (this.currentBaseMs > this.maxDelayMs) {\n this.currentBaseMs = this.maxDelayMs;\n }\n return def.promise;\n };\n /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */\n ExponentialBackoff.prototype.jitterDelayMs = function () {\n return (Math.random() - 0.5) * this.currentBaseMs;\n };\n return ExponentialBackoff;\n}());\nexport { ExponentialBackoff };\n\n//# sourceMappingURL=backoff.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/backoff.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { maybeDocumentMap } from '../model/collections';\nimport { assert } from '../util/assert';\nimport { PersistentListenStream, PersistentWriteStream } from './persistent_stream';\n/**\n * Datastore is a wrapper around the external Google Cloud Datastore grpc API,\n * which provides an interface that is more convenient for the rest of the\n * client SDK architecture to consume.\n */\nvar Datastore = /** @class */ (function () {\n function Datastore(databaseInfo, queue, connection, credentials, serializer, initialBackoffDelay) {\n this.databaseInfo = databaseInfo;\n this.queue = queue;\n this.connection = connection;\n this.credentials = credentials;\n this.serializer = serializer;\n this.initialBackoffDelay = initialBackoffDelay;\n }\n Datastore.prototype.newPersistentWriteStream = function (listener) {\n return new PersistentWriteStream(this.databaseInfo, this.queue, this.connection, this.credentials, this.serializer, listener, this.initialBackoffDelay);\n };\n Datastore.prototype.newPersistentWatchStream = function (listener) {\n return new PersistentListenStream(this.databaseInfo, this.queue, this.connection, this.credentials, this.serializer, listener, this.initialBackoffDelay);\n };\n Datastore.prototype.commit = function (mutations) {\n var _this = this;\n var params = {\n writes: mutations.map(function (m) { return _this.serializer.toMutation(m); })\n };\n return this.invokeRPC('commit', params).then(function (response) {\n return _this.serializer.fromWriteResults(response.writeResults);\n });\n };\n Datastore.prototype.lookup = function (keys) {\n var _this = this;\n var params = {\n documents: keys.map(function (k) { return _this.serializer.toName(k); })\n };\n return this.invokeRPC('batchGet', params).then(function (response) {\n var docs = maybeDocumentMap();\n response.forEach(function (proto) {\n var doc = _this.serializer.fromMaybeDocument(proto);\n docs = docs.insert(doc.key, doc);\n });\n var result = [];\n keys.forEach(function (key) {\n var doc = docs.get(key);\n assert(!!doc, 'Missing entity in write response for ' + key);\n result.push(doc);\n });\n return result;\n });\n };\n /** Gets an auth token and invokes the provided RPC. */\n Datastore.prototype.invokeRPC = function (rpcName, request) {\n var _this = this;\n // TODO(mikelehen): Retry (with backoff) on token failures?\n return this.credentials.getToken(/*forceRefresh=*/ false).then(function (token) {\n return _this.connection.invoke(rpcName, request, token);\n });\n };\n return Datastore;\n}());\nexport { Datastore };\n\n//# sourceMappingURL=datastore.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/datastore.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from './snapshot_version';\nimport { documentVersionMap } from '../model/collections';\nimport { NoDocument } from '../model/document';\nimport { DeleteMutation, Precondition } from '../model/mutation';\nimport { Code, FirestoreError } from '../util/error';\n/**\n * Internal transaction object responsible for accumulating the mutations to\n * perform and the base versions for any documents read.\n */\nvar Transaction = /** @class */ (function () {\n function Transaction(datastore) {\n this.datastore = datastore;\n // The version of each document that was read during this transaction.\n this.readVersions = documentVersionMap();\n this.mutations = [];\n this.committed = false;\n }\n Transaction.prototype.recordVersion = function (doc) {\n var docVersion = doc.version;\n if (doc instanceof NoDocument) {\n // For deleted docs, we must use baseVersion 0 when we overwrite them.\n docVersion = SnapshotVersion.forDeletedDoc();\n }\n var existingVersion = this.readVersions.get(doc.key);\n if (existingVersion !== null) {\n if (!docVersion.equals(existingVersion)) {\n // This transaction will fail no matter what.\n throw new FirestoreError(Code.ABORTED, 'Document version changed between two reads.');\n }\n }\n else {\n this.readVersions = this.readVersions.insert(doc.key, docVersion);\n }\n };\n Transaction.prototype.lookup = function (keys) {\n var _this = this;\n if (this.committed) {\n return Promise.reject('Transaction has already completed.');\n }\n if (this.mutations.length > 0) {\n return Promise.reject('Transactions lookups are invalid after writes.');\n }\n return this.datastore.lookup(keys).then(function (docs) {\n docs.forEach(function (doc) { return _this.recordVersion(doc); });\n return docs;\n });\n };\n Transaction.prototype.write = function (mutations) {\n if (this.committed) {\n throw new FirestoreError(Code.FAILED_PRECONDITION, 'Transaction has already completed.');\n }\n this.mutations = this.mutations.concat(mutations);\n };\n /**\n * Returns the version of this document when it was read in this transaction,\n * as a precondition, or no precondition if it was not read.\n */\n Transaction.prototype.precondition = function (key) {\n var version = this.readVersions.get(key);\n if (version) {\n return Precondition.updateTime(version);\n }\n else {\n return Precondition.NONE;\n }\n };\n /**\n * Returns the precondition for a document if the operation is an update.\n */\n Transaction.prototype.preconditionForUpdate = function (key) {\n var version = this.readVersions.get(key);\n if (version && version.equals(SnapshotVersion.forDeletedDoc())) {\n // The document doesn't exist, so fail the transaction.\n throw new FirestoreError(Code.FAILED_PRECONDITION, \"Can't update a document that doesn't exist.\");\n }\n else if (version) {\n // Document exists, base precondition on document update time.\n return Precondition.updateTime(version);\n }\n else {\n // Document was not read, so we just use the preconditions for a blind\n // update.\n return Precondition.exists(true);\n }\n };\n Transaction.prototype.set = function (key, data) {\n this.write(data.toMutations(key, this.precondition(key)));\n };\n Transaction.prototype.update = function (key, data) {\n this.write(data.toMutations(key, this.preconditionForUpdate(key)));\n };\n Transaction.prototype.delete = function (key) {\n this.write([new DeleteMutation(key, this.precondition(key))]);\n // Since the delete will be applied before all following writes, we need to\n // ensure that the precondition for the next write will be exists: false.\n this.readVersions = this.readVersions.insert(key, SnapshotVersion.forDeletedDoc());\n };\n Transaction.prototype.commit = function () {\n var _this = this;\n var unwritten = this.readVersions;\n // For each mutation, note that the doc was written.\n this.mutations.forEach(function (mutation) {\n unwritten = unwritten.remove(mutation.key);\n });\n if (!unwritten.isEmpty()) {\n return Promise.reject(Error('Every document read in a transaction must also be written.'));\n }\n return this.datastore.commit(this.mutations).then(function () {\n _this.committed = true;\n });\n };\n return Transaction;\n}());\nexport { Transaction };\n\n//# sourceMappingURL=transaction.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/transaction.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SnapshotVersion } from '../core/snapshot_version';\nimport { Transaction } from '../core/transaction';\nimport { OnlineState } from '../core/types';\nimport { QueryData, QueryPurpose } from '../local/query_data';\nimport { NoDocument } from '../model/document';\nimport { DocumentKey } from '../model/document_key';\nimport { BATCHID_UNKNOWN, MutationBatchResult } from '../model/mutation_batch';\nimport { emptyByteString } from '../platform/platform';\nimport { assert } from '../util/assert';\nimport { Code } from '../util/error';\nimport * as log from '../util/log';\nimport * as objUtils from '../util/obj';\nimport { ResetMapping, UpdateMapping } from './remote_event';\nimport { isPermanentError } from './rpc_error';\nimport { WatchChangeAggregator, WatchTargetChange, WatchTargetChangeState } from './watch_change';\nvar LOG_TAG = 'RemoteStore';\n// TODO(b/35853402): Negotiate this with the stream.\nvar MAX_PENDING_WRITES = 10;\n// The RemoteStore notifies an onlineStateHandler with OnlineState.Failed if we\n// fail to connect to the backend. This subsequently triggers get() requests to\n// fail or use cached data, etc. Unfortunately, our connections have\n// historically been subject to various transient failures. So we wait for\n// multiple failures before notifying the onlineStateHandler.\nvar ONLINE_ATTEMPTS_BEFORE_FAILURE = 2;\n/**\n * RemoteStore - An interface to remotely stored data, basically providing a\n * wrapper around the Datastore that is more reliable for the rest of the\n * system.\n *\n * RemoteStore is responsible for maintaining the connection to the server.\n * - maintaining a list of active listens.\n * - reconnecting when the connection is dropped.\n * - resuming all the active listens on reconnect.\n *\n * RemoteStore handles all incoming events from the Datastore.\n * - listening to the watch stream and repackaging the events as RemoteEvents\n * - notifying SyncEngine of any changes to the active listens.\n *\n * RemoteStore takes writes from other components and handles them reliably.\n * - pulling pending mutations from LocalStore and sending them to Datastore.\n * - retrying mutations that failed because of network problems.\n * - acking mutations to the SyncEngine once they are accepted or rejected.\n */\nvar RemoteStore = /** @class */ (function () {\n function RemoteStore(databaseInfo, asyncQueue, \n /**\n * The local store, used to fill the write pipeline with outbound\n * mutations and resolve existence filter mismatches.\n */\n localStore, \n /** The client-side proxy for interacting with the backend. */\n datastore, onlineStateHandler) {\n this.databaseInfo = databaseInfo;\n this.asyncQueue = asyncQueue;\n this.localStore = localStore;\n this.datastore = datastore;\n this.onlineStateHandler = onlineStateHandler;\n this.pendingWrites = [];\n this.lastBatchSeen = BATCHID_UNKNOWN;\n /**\n * A mapping of watched targets that the client cares about tracking and the\n * user has explicitly called a 'listen' for this target.\n *\n * These targets may or may not have been sent to or acknowledged by the\n * server. On re-establishing the listen stream, these targets should be sent\n * to the server. The targets removed with unlistens are removed eagerly\n * without waiting for confirmation from the listen stream.\n */\n this.listenTargets = {};\n /**\n * A mapping of targetId to pending acks needed.\n *\n * If a targetId is present in this map, then we're waiting for watch to\n * acknowledge a removal or addition of the target. If a target is not in this\n * mapping, and it's in the listenTargets map, then we consider the target to\n * be active.\n *\n * We increment the count here every time we issue a request over the stream\n * to watch or unwatch. We then decrement the count every time we get a target\n * added or target removed message from the server. Once the count is equal to\n * 0 we know that the client and server are in the same state (once this state\n * is reached the targetId is removed from the map to free the memory).\n */\n this.pendingTargetResponses = {};\n this.accumulatedWatchChanges = [];\n this.watchStream = null;\n this.writeStream = null;\n /**\n * The online state of the watch stream. The state is set to healthy if and\n * only if there are messages received by the backend.\n */\n this.watchStreamOnlineState = OnlineState.Unknown;\n /** A count of consecutive failures to open the stream. */\n this.watchStreamFailures = 0;\n }\n /**\n * Starts up the remote store, creating streams, restoring state from\n * LocalStore, etc.\n */\n RemoteStore.prototype.start = function () {\n return this.enableNetwork();\n };\n RemoteStore.prototype.setOnlineStateToHealthy = function () {\n this.updateAndBroadcastOnlineState(OnlineState.Healthy);\n };\n RemoteStore.prototype.setOnlineStateToUnknown = function () {\n // The state is set to unknown when a healthy stream is closed (e.g. due to\n // a token timeout) or when we have no active listens and therefore there's\n // no need to start the stream. Assuming there is (possibly in the future)\n // an active listen, then we will eventually move to state Online or Failed,\n // but we always want to make at least ONLINE_ATTEMPTS_BEFORE_FAILURE\n // attempts before failing, so we reset the count here.\n this.watchStreamFailures = 0;\n this.updateAndBroadcastOnlineState(OnlineState.Unknown);\n };\n RemoteStore.prototype.updateOnlineStateAfterFailure = function () {\n // The first failure after we are successfully connected moves us to the\n // 'Unknown' state. We then may make multiple attempts (based on\n // ONLINE_ATTEMPTS_BEFORE_FAILURE) before we actually report failure.\n if (this.watchStreamOnlineState === OnlineState.Healthy) {\n this.setOnlineStateToUnknown();\n }\n else {\n this.watchStreamFailures++;\n if (this.watchStreamFailures >= ONLINE_ATTEMPTS_BEFORE_FAILURE) {\n this.updateAndBroadcastOnlineState(OnlineState.Failed);\n }\n }\n };\n RemoteStore.prototype.updateAndBroadcastOnlineState = function (onlineState) {\n var didChange = this.watchStreamOnlineState !== onlineState;\n this.watchStreamOnlineState = onlineState;\n if (didChange) {\n this.onlineStateHandler(onlineState);\n }\n };\n RemoteStore.prototype.isNetworkEnabled = function () {\n assert((this.watchStream == null) == (this.writeStream == null), 'WatchStream and WriteStream should both be null or non-null');\n return this.watchStream != null;\n };\n /** Re-enables the network. Only to be called as the counterpart to disableNetwork(). */\n RemoteStore.prototype.enableNetwork = function () {\n var _this = this;\n assert(this.watchStream == null, 'enableNetwork() called with non-null watchStream.');\n assert(this.writeStream == null, 'enableNetwork() called with non-null writeStream.');\n // Create new streams (but note they're not started yet).\n this.watchStream = this.datastore.newPersistentWatchStream({\n onOpen: this.onWatchStreamOpen.bind(this),\n onClose: this.onWatchStreamClose.bind(this),\n onWatchChange: this.onWatchStreamChange.bind(this)\n });\n this.writeStream = this.datastore.newPersistentWriteStream({\n onOpen: this.onWriteStreamOpen.bind(this),\n onClose: this.onWriteStreamClose.bind(this),\n onHandshakeComplete: this.onWriteHandshakeComplete.bind(this),\n onMutationResult: this.onMutationResult.bind(this)\n });\n // Load any saved stream token from persistent storage\n return this.localStore.getLastStreamToken().then(function (token) {\n _this.writeStream.lastStreamToken = token;\n if (_this.shouldStartWatchStream()) {\n _this.startWatchStream();\n }\n _this.updateAndBroadcastOnlineState(OnlineState.Unknown);\n return _this.fillWritePipeline(); // This may start the writeStream.\n });\n };\n /** Temporarily disables the network. The network can be re-enabled using enableNetwork(). */\n RemoteStore.prototype.disableNetwork = function () {\n this.updateAndBroadcastOnlineState(OnlineState.Failed);\n // NOTE: We're guaranteed not to get any further events from these streams (not even a close\n // event).\n this.watchStream.stop();\n this.writeStream.stop();\n this.cleanUpWatchStreamState();\n this.cleanUpWriteStreamState();\n this.writeStream = null;\n this.watchStream = null;\n return Promise.resolve();\n };\n RemoteStore.prototype.shutdown = function () {\n log.debug(LOG_TAG, 'RemoteStore shutting down.');\n this.disableNetwork();\n return Promise.resolve(undefined);\n };\n /** Starts new listen for the given query. Uses resume token if provided */\n RemoteStore.prototype.listen = function (queryData) {\n assert(!objUtils.contains(this.listenTargets, queryData.targetId), 'listen called with duplicate targetId!');\n // Mark this as something the client is currently listening for.\n this.listenTargets[queryData.targetId] = queryData;\n if (this.shouldStartWatchStream()) {\n // The listen will be sent in onWatchStreamOpen\n this.startWatchStream();\n }\n else if (this.isNetworkEnabled() && this.watchStream.isOpen()) {\n this.sendWatchRequest(queryData);\n }\n };\n /** Removes the listen from server */\n RemoteStore.prototype.unlisten = function (targetId) {\n assert(objUtils.contains(this.listenTargets, targetId), 'unlisten called without assigned target ID!');\n var queryData = this.listenTargets[targetId];\n delete this.listenTargets[targetId];\n if (this.isNetworkEnabled() && this.watchStream.isOpen()) {\n this.sendUnwatchRequest(targetId);\n }\n };\n /**\n * We need to increment the the expected number of pending responses we're due\n * from watch so we wait for the ack to process any messages from this target.\n */\n RemoteStore.prototype.sendWatchRequest = function (queryData) {\n this.recordPendingTargetRequest(queryData.targetId);\n this.watchStream.watch(queryData);\n };\n /**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */\n RemoteStore.prototype.sendUnwatchRequest = function (targetId) {\n this.recordPendingTargetRequest(targetId);\n this.watchStream.unwatch(targetId);\n };\n /**\n * Increment the mapping of how many acks are needed from watch before we can\n * consider the server to be 'in-sync' with the client's active targets.\n */\n RemoteStore.prototype.recordPendingTargetRequest = function (targetId) {\n // For each request we get we need to record we need a response for it.\n this.pendingTargetResponses[targetId] =\n (this.pendingTargetResponses[targetId] || 0) + 1;\n };\n RemoteStore.prototype.startWatchStream = function () {\n assert(this.shouldStartWatchStream(), 'startWriteStream() called when shouldStartWatchStream() is false.');\n this.watchStream.start();\n };\n /**\n * Returns whether the watch stream should be started because there are\n * active targets trying to be listened too\n */\n RemoteStore.prototype.shouldStartWatchStream = function () {\n return (this.isNetworkEnabled() &&\n !this.watchStream.isStarted() &&\n !objUtils.isEmpty(this.listenTargets));\n };\n RemoteStore.prototype.cleanUpWatchStreamState = function () {\n // If the connection is closed then we'll never get a snapshot version for\n // the accumulated changes and so we'll never be able to complete the batch.\n // When we start up again the server is going to resend these changes\n // anyway, so just toss the accumulated state.\n this.accumulatedWatchChanges = [];\n this.pendingTargetResponses = {};\n };\n RemoteStore.prototype.onWatchStreamOpen = function () {\n var _this = this;\n // TODO(b/35852690): close the stream again (with some timeout?) if no watch\n // targets are active\n objUtils.forEachNumber(this.listenTargets, function (targetId, queryData) {\n _this.sendWatchRequest(queryData);\n });\n return Promise.resolve();\n };\n RemoteStore.prototype.onWatchStreamClose = function (error) {\n assert(this.isNetworkEnabled(), 'onWatchStreamClose() should only be called when the network is enabled');\n this.cleanUpWatchStreamState();\n // If there was an error, retry the connection.\n if (this.shouldStartWatchStream()) {\n this.updateOnlineStateAfterFailure();\n this.startWatchStream();\n }\n else {\n // No need to restart watch stream because there are no active targets.\n // The online state is set to unknown because there is no active attempt\n // at establishing a connection\n this.setOnlineStateToUnknown();\n }\n return Promise.resolve();\n };\n RemoteStore.prototype.onWatchStreamChange = function (watchChange, snapshotVersion) {\n // Mark the connection as healthy because we got a message from the server\n this.setOnlineStateToHealthy();\n if (watchChange instanceof WatchTargetChange &&\n watchChange.state === WatchTargetChangeState.Removed &&\n watchChange.cause) {\n // There was an error on a target, don't wait for a consistent snapshot\n // to raise events\n return this.handleTargetError(watchChange);\n }\n // Accumulate watch changes but don't process them if there's no\n // snapshotVersion or it's older than a previous snapshot we've processed\n // (can happen after we resume a target using a resume token).\n this.accumulatedWatchChanges.push(watchChange);\n if (!snapshotVersion.equals(SnapshotVersion.MIN) &&\n snapshotVersion.compareTo(this.localStore.getLastRemoteSnapshotVersion()) >= 0) {\n var changes = this.accumulatedWatchChanges;\n this.accumulatedWatchChanges = [];\n return this.handleWatchChangeBatch(snapshotVersion, changes);\n }\n else {\n return Promise.resolve();\n }\n };\n /**\n * Takes a batch of changes from the Datastore, repackages them as a\n * RemoteEvent, and passes that on to the listener, which is typically the\n * SyncEngine.\n */\n RemoteStore.prototype.handleWatchChangeBatch = function (snapshotVersion, changes) {\n var _this = this;\n var aggregator = new WatchChangeAggregator(snapshotVersion, this.listenTargets, this.pendingTargetResponses);\n aggregator.addChanges(changes);\n var remoteEvent = aggregator.createRemoteEvent();\n // Get the new response counts from the aggregator\n this.pendingTargetResponses = aggregator.pendingTargetResponses;\n var promises = [];\n // Handle existence filters and existence filter mismatches.\n objUtils.forEachNumber(aggregator.existenceFilters, function (targetId, filter) {\n var queryData = _this.listenTargets[targetId];\n if (!queryData) {\n // A watched target might have been removed already.\n return;\n }\n var query = queryData.query;\n if (query.isDocumentQuery()) {\n if (filter.count === 0) {\n // The existence filter told us the document does not exist.\n // We need to deduce that this document does not exist and apply\n // a deleted document to our updates. Without applying a deleted\n // document there might be another query that will raise this\n // document as part of a snapshot until it is resolved,\n // essentially exposing inconsistency between queries.\n var key = new DocumentKey(query.path);\n var deletedDoc = new NoDocument(key, snapshotVersion);\n remoteEvent.addDocumentUpdate(deletedDoc);\n }\n else {\n assert(filter.count === 1, 'Single document existence filter with count: ' + filter.count);\n }\n }\n else {\n // Not a document query.\n var promise = _this.localStore\n .remoteDocumentKeys(targetId)\n .then(function (trackedRemote) {\n if (remoteEvent.targetChanges[targetId]) {\n var mapping = remoteEvent.targetChanges[targetId].mapping;\n if (mapping !== null) {\n if (mapping instanceof UpdateMapping) {\n trackedRemote = mapping.applyToKeySet(trackedRemote);\n }\n else {\n assert(mapping instanceof ResetMapping, 'Expected either reset or update mapping but got something else: ' +\n mapping);\n trackedRemote = mapping.documents;\n }\n }\n }\n if (trackedRemote.size !== filter.count) {\n // Existence filter mismatch, resetting mapping.\n // Make sure the mismatch is exposed in the remote event.\n remoteEvent.handleExistenceFilterMismatch(targetId);\n // Clear the resume token for the query, since we're in a\n // known mismatch state.\n var newQueryData = new QueryData(query, targetId, queryData.purpose);\n _this.listenTargets[targetId] = newQueryData;\n // Cause a hard reset by unwatching and rewatching\n // immediately, but deliberately don't send a resume token\n // so that we get a full update.\n // Make sure we expect that this acks are going to happen.\n _this.sendUnwatchRequest(targetId);\n // Mark the query we send as being on behalf of an existence\n // filter mismatch, but don't actually retain that in\n // listenTargets. This ensures that we flag the first\n // re-listen this way without impacting future listens of\n // this target (that might happen e.g. on reconnect).\n var requestQueryData = new QueryData(query, targetId, QueryPurpose.ExistenceFilterMismatch);\n _this.sendWatchRequest(requestQueryData);\n }\n });\n promises.push(promise);\n }\n });\n return Promise.all(promises).then(function () {\n // Update in-memory resume tokens. LocalStore will update the\n // persistent view of these when applying the completed RemoteEvent.\n objUtils.forEachNumber(remoteEvent.targetChanges, function (targetId, change) {\n if (change.resumeToken.length > 0) {\n var queryData = _this.listenTargets[targetId];\n // A watched target might have been removed already.\n if (queryData) {\n _this.listenTargets[targetId] = queryData.update({\n resumeToken: change.resumeToken,\n snapshotVersion: change.snapshotVersion\n });\n }\n }\n });\n // Finally handle remote event\n return _this.syncEngine.applyRemoteEvent(remoteEvent);\n });\n };\n /** Handles an error on a target */\n RemoteStore.prototype.handleTargetError = function (watchChange) {\n var _this = this;\n assert(!!watchChange.cause, 'Handling target error without a cause');\n var error = watchChange.cause;\n var promiseChain = Promise.resolve();\n watchChange.targetIds.forEach(function (targetId) {\n promiseChain = promiseChain.then(function () {\n if (objUtils.contains(_this.listenTargets, targetId)) {\n delete _this.listenTargets[targetId];\n return _this.syncEngine.rejectListen(targetId, error);\n }\n else {\n // A watched target might have been removed already.\n return Promise.resolve();\n }\n });\n });\n return promiseChain;\n };\n RemoteStore.prototype.cleanUpWriteStreamState = function () {\n this.lastBatchSeen = BATCHID_UNKNOWN;\n this.pendingWrites = [];\n };\n /**\n * Notifies that there are new mutations to process in the queue. This is\n * typically called by SyncEngine after it has sent mutations to LocalStore.\n *\n */\n RemoteStore.prototype.fillWritePipeline = function () {\n var _this = this;\n if (!this.canWriteMutations()) {\n return Promise.resolve();\n }\n else {\n return this.localStore\n .nextMutationBatch(this.lastBatchSeen)\n .then(function (batch) {\n if (batch === null) {\n return Promise.resolve();\n }\n else {\n _this.commit(batch);\n return _this.fillWritePipeline();\n }\n });\n }\n };\n /**\n * Returns true if the backend can accept additional write requests.\n *\n * When sending mutations to the write stream (e.g. in fillWritePipeline),\n * call this method first to check if more mutations can be sent.\n *\n * Currently the only thing that can prevent the backend from accepting\n * write requests is if there are too many requests already outstanding. As\n * writes complete the backend will be able to accept more.\n */\n RemoteStore.prototype.canWriteMutations = function () {\n return (this.isNetworkEnabled() && this.pendingWrites.length < MAX_PENDING_WRITES);\n };\n // For testing\n RemoteStore.prototype.outstandingWrites = function () {\n return this.pendingWrites.length;\n };\n /**\n * Given mutations to commit, actually commits them to the Datastore. Note\n * that this does *not* return a Promise specifically because the AsyncQueue\n * should not block operations for this.\n */\n RemoteStore.prototype.commit = function (batch) {\n assert(this.canWriteMutations(), \"commit called when batches can't be written\");\n this.lastBatchSeen = batch.batchId;\n this.pendingWrites.push(batch);\n if (this.shouldStartWriteStream()) {\n this.startWriteStream();\n }\n else if (this.isNetworkEnabled() && this.writeStream.handshakeComplete) {\n this.writeStream.writeMutations(batch.mutations);\n }\n };\n RemoteStore.prototype.shouldStartWriteStream = function () {\n return (this.isNetworkEnabled() &&\n !this.writeStream.isStarted() &&\n this.pendingWrites.length > 0);\n };\n RemoteStore.prototype.startWriteStream = function () {\n assert(this.shouldStartWriteStream(), 'startWriteStream() called when shouldStartWriteStream() is false.');\n this.writeStream.start();\n };\n RemoteStore.prototype.onWriteStreamOpen = function () {\n this.writeStream.writeHandshake();\n return Promise.resolve();\n };\n RemoteStore.prototype.onWriteHandshakeComplete = function () {\n var _this = this;\n // Record the stream token.\n return this.localStore\n .setLastStreamToken(this.writeStream.lastStreamToken)\n .then(function () {\n // Drain any pending writes.\n //\n // Note that at this point pendingWrites contains mutations that\n // have already been accepted by fillWritePipeline/commitBatch. If\n // the pipeline is full, canWriteMutations will be false, despite\n // the fact that we actually need to send mutations over.\n //\n // This also means that this method indirectly respects the limits\n // imposed by canWriteMutations since writes can't be added to the\n // pendingWrites array when canWriteMutations is false. If the\n // limits imposed by canWriteMutations actually protect us from\n // DOSing ourselves then those limits won't be exceeded here and\n // we'll continue to make progress.\n for (var _i = 0, _a = _this.pendingWrites; _i < _a.length; _i++) {\n var batch = _a[_i];\n _this.writeStream.writeMutations(batch.mutations);\n }\n });\n };\n RemoteStore.prototype.onMutationResult = function (commitVersion, results) {\n var _this = this;\n // This is a response to a write containing mutations and should be\n // correlated to the first pending write.\n assert(this.pendingWrites.length > 0, 'Got result for empty pending writes');\n var batch = this.pendingWrites.shift();\n var success = MutationBatchResult.from(batch, commitVersion, results, this.writeStream.lastStreamToken);\n return this.syncEngine.applySuccessfulWrite(success).then(function () {\n // It's possible that with the completion of this mutation another\n // slot has freed up.\n return _this.fillWritePipeline();\n });\n };\n RemoteStore.prototype.onWriteStreamClose = function (error) {\n var _this = this;\n assert(this.isNetworkEnabled(), 'onWriteStreamClose() should only be called when the network is enabled');\n // Ignore close if there are no pending writes.\n if (this.pendingWrites.length > 0) {\n assert(!!error, 'We have pending writes, but the write stream closed without an error');\n // A promise that is resolved after we processed the error\n var errorHandling = void 0;\n if (this.writeStream.handshakeComplete) {\n // This error affects the actual write.\n errorHandling = this.handleWriteError(error);\n }\n else {\n // If there was an error before the handshake has finished, it's\n // possible that the server is unable to process the stream token\n // we're sending. (Perhaps it's too old?)\n errorHandling = this.handleHandshakeError(error);\n }\n return errorHandling.then(function () {\n // The write stream might have been started by refilling the write\n // pipeline for failed writes\n if (_this.shouldStartWriteStream()) {\n _this.startWriteStream();\n }\n });\n }\n else {\n // No pending writes, nothing to do\n return Promise.resolve();\n }\n };\n RemoteStore.prototype.handleHandshakeError = function (error) {\n // Reset the token if it's a permanent error or the error code is\n // ABORTED, signaling the write stream is no longer valid.\n if (isPermanentError(error.code) || error.code === Code.ABORTED) {\n log.debug(LOG_TAG, 'RemoteStore error before completed handshake; resetting stream token: ', this.writeStream.lastStreamToken);\n this.writeStream.lastStreamToken = emptyByteString();\n return this.localStore.setLastStreamToken(emptyByteString());\n }\n else {\n // Some other error, don't reset stream token. Our stream logic will\n // just retry with exponential backoff.\n return Promise.resolve();\n }\n };\n RemoteStore.prototype.handleWriteError = function (error) {\n var _this = this;\n if (isPermanentError(error.code)) {\n // This was a permanent error, the request itself was the problem\n // so it's not going to succeed if we resend it.\n var batch = this.pendingWrites.shift();\n // In this case it's also unlikely that the server itself is melting\n // down -- this was just a bad request so inhibit backoff on the next\n // restart.\n this.writeStream.inhibitBackoff();\n return this.syncEngine\n .rejectFailedWrite(batch.batchId, error)\n .then(function () {\n // It's possible that with the completion of this mutation\n // another slot has freed up.\n return _this.fillWritePipeline();\n });\n }\n else {\n // Transient error, just let the retry logic kick in.\n return Promise.resolve();\n }\n };\n RemoteStore.prototype.createTransaction = function () {\n return new Transaction(this.datastore);\n };\n RemoteStore.prototype.handleUserChange = function (user) {\n log.debug(LOG_TAG, 'RemoteStore changing users: uid=', user.uid);\n // Tear down and re-create our network streams. This will ensure we get a fresh auth token\n // for the new user and re-fill the write pipeline with new mutations from the LocalStore\n // (since mutations are per-user).\n this.disableNetwork();\n return this.enableNetwork();\n };\n return RemoteStore;\n}());\nexport { RemoteStore };\n\n//# sourceMappingURL=remote_store.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/remote/remote_store.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EventManager, QueryListener } from './event_manager';\nimport { SyncEngine } from './sync_engine';\nimport { EagerGarbageCollector } from '../local/eager_garbage_collector';\nimport { IndexedDbPersistence } from '../local/indexeddb_persistence';\nimport { LocalStore } from '../local/local_store';\nimport { MemoryPersistence } from '../local/memory_persistence';\nimport { NoOpGarbageCollector } from '../local/no_op_garbage_collector';\nimport { Datastore } from '../remote/datastore';\nimport { RemoteStore } from '../remote/remote_store';\nimport { JsonProtoSerializer } from '../remote/serializer';\nimport { Code } from '../util/error';\nimport { debug } from '../util/log';\nimport { Deferred } from '../util/promise';\nvar LOG_TAG = 'FirestoreClient';\n/**\n * FirestoreClient is a top-level class that constructs and owns all of the\n * pieces of the client SDK architecture. It is responsible for creating the\n * async queue that is shared by all of the other components in the system.\n */\nvar FirestoreClient = /** @class */ (function () {\n function FirestoreClient(platform, databaseInfo, credentials, \n /**\n * Asynchronous queue responsible for all of our internal processing. When\n * we get incoming work from the user (via public API) or the network\n * (incoming GRPC messages), we should always schedule onto this queue.\n * This ensures all of our work is properly serialized (e.g. we don't\n * start processing a new operation while the previous one is waiting for\n * an async I/O to complete).\n */\n asyncQueue) {\n this.platform = platform;\n this.databaseInfo = databaseInfo;\n this.credentials = credentials;\n this.asyncQueue = asyncQueue;\n }\n /**\n * Starts up the FirestoreClient, returning only whether or not enabling\n * persistence succeeded.\n *\n * The intent here is to \"do the right thing\" as far as users are concerned.\n * Namely, in cases where offline persistence is requested and possible,\n * enable it, but otherwise fall back to persistence disabled. For the most\n * part we expect this to succeed one way or the other so we don't expect our\n * users to actually wait on the firestore.enablePersistence Promise since\n * they generally won't care.\n *\n * Of course some users actually do care about whether or not persistence\n * was successfully enabled, so the Promise returned from this method\n * indicates this outcome.\n *\n * This presents a problem though: even before enablePersistence resolves or\n * rejects, users may have made calls to e.g. firestore.collection() which\n * means that the FirestoreClient in there will be available and will be\n * enqueuing actions on the async queue.\n *\n * Meanwhile any failure of an operation on the async queue causes it to\n * panic and reject any further work, on the premise that unhandled errors\n * are fatal.\n *\n * Consequently the fallback is handled internally here in start, and if the\n * fallback succeeds we signal success to the async queue even though the\n * start() itself signals failure.\n *\n * @param usePersistence Whether or not to attempt to enable persistence.\n * @returns A deferred result indicating the user-visible result of enabling\n * offline persistence. This method will reject this if IndexedDB fails to\n * start for any reason. If usePersistence is false this is\n * unconditionally resolved.\n */\n FirestoreClient.prototype.start = function (usePersistence) {\n var _this = this;\n // We defer our initialization until we get the current user from\n // setUserChangeListener(). We block the async queue until we got the\n // initial user and the initialization is completed. This will prevent\n // any scheduled work from happening before initialization is completed.\n //\n // If initializationDone resolved then the FirestoreClient is in a usable\n // state.\n var initializationDone = new Deferred();\n // If usePersistence is true, certain classes of errors while starting are\n // recoverable but only by falling back to persistence disabled.\n //\n // If there's an error in the first case but not in recovery we cannot\n // reject the promise blocking the async queue because this will cause the\n // async queue to panic.\n var persistenceResult = new Deferred();\n var initialized = false;\n this.credentials.setUserChangeListener(function (user) {\n if (!initialized) {\n initialized = true;\n _this.initializePersistence(usePersistence, persistenceResult)\n .then(function () { return _this.initializeRest(user); })\n .then(initializationDone.resolve, initializationDone.reject);\n }\n else {\n _this.asyncQueue.schedule(function () {\n return _this.handleUserChange(user);\n });\n }\n });\n // Block the async queue until initialization is done\n this.asyncQueue.schedule(function () {\n return initializationDone.promise;\n });\n // Return only the result of enabling persistence. Note that this does not\n // need to await the completion of initializationDone because the result of\n // this method should not reflect any other kind of failure to start.\n return persistenceResult.promise;\n };\n /** Enables the network connection and requeues all pending operations. */\n FirestoreClient.prototype.enableNetwork = function () {\n var _this = this;\n return this.asyncQueue.schedule(function () {\n return _this.remoteStore.enableNetwork();\n });\n };\n /**\n * Initializes persistent storage, attempting to use IndexedDB if\n * usePersistence is true or memory-only if false.\n *\n * If IndexedDB fails because it's already open in another tab or because the\n * platform can't possibly support our implementation then this method rejects\n * the persistenceResult and falls back on memory-only persistence.\n *\n * @param usePersistence indicates whether or not to use offline persistence\n * @param persistenceResult A deferred result indicating the user-visible\n * result of enabling offline persistence. This method will reject this if\n * IndexedDB fails to start for any reason. If usePersistence is false\n * this is unconditionally resolved.\n * @returns a Promise indicating whether or not initialization should\n * continue, i.e. that one of the persistence implementations actually\n * succeeded.\n */\n FirestoreClient.prototype.initializePersistence = function (usePersistence, persistenceResult) {\n var _this = this;\n if (usePersistence) {\n return this.startIndexedDbPersistence()\n .then(persistenceResult.resolve)\n .catch(function (error) {\n // Regardless of whether or not the retry succeeds, from an user\n // perspective, offline persistence has failed.\n persistenceResult.reject(error);\n // An unknown failure on the first stage shuts everything down.\n if (!_this.canFallback(error)) {\n return Promise.reject(error);\n }\n console.warn('Error enabling offline storage. Falling back to' +\n ' storage disabled: ' +\n error);\n return _this.startMemoryPersistence();\n });\n }\n else {\n // When usePersistence == false, enabling offline persistence is defined\n // to unconditionally succeed. This allows start() to have the same\n // signature for both cases, despite the fact that the returned promise\n // is only used in the enablePersistence call.\n persistenceResult.resolve();\n return this.startMemoryPersistence();\n }\n };\n FirestoreClient.prototype.canFallback = function (error) {\n return (error.code === Code.FAILED_PRECONDITION ||\n error.code === Code.UNIMPLEMENTED);\n };\n /**\n * Starts IndexedDB-based persistence.\n *\n * @returns A promise indicating success or failure.\n */\n FirestoreClient.prototype.startIndexedDbPersistence = function () {\n // TODO(http://b/33384523): For now we just disable garbage collection\n // when persistence is enabled.\n this.garbageCollector = new NoOpGarbageCollector();\n var storagePrefix = IndexedDbPersistence.buildStoragePrefix(this.databaseInfo);\n // Opt to use proto3 JSON in case the platform doesn't support Uint8Array.\n var serializer = new JsonProtoSerializer(this.databaseInfo.databaseId, {\n useProto3Json: true\n });\n this.persistence = new IndexedDbPersistence(storagePrefix, serializer);\n return this.persistence.start();\n };\n /**\n * Starts Memory-backed persistence. In practice this cannot fail.\n *\n * @returns A promise that will successfully resolve.\n */\n FirestoreClient.prototype.startMemoryPersistence = function () {\n this.garbageCollector = new EagerGarbageCollector();\n this.persistence = new MemoryPersistence();\n return this.persistence.start();\n };\n /**\n * Initializes the rest of the FirestoreClient, assuming the initial user\n * has been obtained from the credential provider and some persistence\n * implementation is available in this.persistence.\n */\n FirestoreClient.prototype.initializeRest = function (user) {\n var _this = this;\n return this.platform\n .loadConnection(this.databaseInfo)\n .then(function (connection) {\n _this.localStore = new LocalStore(_this.persistence, user, _this.garbageCollector);\n var serializer = _this.platform.newSerializer(_this.databaseInfo.databaseId);\n var datastore = new Datastore(_this.databaseInfo, _this.asyncQueue, connection, _this.credentials, serializer);\n var onlineStateChangedHandler = function (onlineState) {\n _this.eventMgr.onOnlineStateChanged(onlineState);\n };\n _this.remoteStore = new RemoteStore(_this.databaseInfo, _this.asyncQueue, _this.localStore, datastore, onlineStateChangedHandler);\n _this.syncEngine = new SyncEngine(_this.localStore, _this.remoteStore, user);\n // Setup wiring between sync engine and remote store\n _this.remoteStore.syncEngine = _this.syncEngine;\n _this.eventMgr = new EventManager(_this.syncEngine);\n // NOTE: RemoteStore depends on LocalStore (for persisting stream\n // tokens, refilling mutation queue, etc.) so must be started after\n // LocalStore.\n return _this.localStore.start();\n })\n .then(function () {\n return _this.remoteStore.start();\n });\n };\n FirestoreClient.prototype.handleUserChange = function (user) {\n this.asyncQueue.verifyOperationInProgress();\n debug(LOG_TAG, 'User Changed: ' + user.uid);\n return this.syncEngine.handleUserChange(user);\n };\n /** Disables the network connection. Pending operations will not complete. */\n FirestoreClient.prototype.disableNetwork = function () {\n var _this = this;\n return this.asyncQueue.schedule(function () {\n return _this.remoteStore.disableNetwork();\n });\n };\n FirestoreClient.prototype.shutdown = function () {\n var _this = this;\n return this.asyncQueue\n .schedule(function () {\n _this.credentials.removeUserChangeListener();\n return _this.remoteStore.shutdown();\n })\n .then(function () {\n // PORTING NOTE: LocalStore does not need an explicit shutdown on web.\n return _this.persistence.shutdown();\n });\n };\n FirestoreClient.prototype.listen = function (query, observer, options) {\n var _this = this;\n var listener = new QueryListener(query, observer, options);\n this.asyncQueue.schedule(function () {\n return _this.eventMgr.listen(listener);\n });\n return listener;\n };\n FirestoreClient.prototype.unlisten = function (listener) {\n var _this = this;\n this.asyncQueue.schedule(function () {\n return _this.eventMgr.unlisten(listener);\n });\n };\n FirestoreClient.prototype.write = function (mutations) {\n var _this = this;\n var deferred = new Deferred();\n this.asyncQueue.schedule(function () { return _this.syncEngine.write(mutations, deferred); });\n return deferred.promise;\n };\n FirestoreClient.prototype.databaseId = function () {\n return this.databaseInfo.databaseId;\n };\n FirestoreClient.prototype.transaction = function (updateFunction) {\n var _this = this;\n // We have to wait for the async queue to be sure syncEngine is initialized.\n return this.asyncQueue\n .schedule(function () {\n return Promise.resolve();\n })\n .then(function () {\n return _this.syncEngine.runTransaction(updateFunction);\n });\n };\n return FirestoreClient;\n}());\nexport { FirestoreClient };\n\n//# sourceMappingURL=firestore_client.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/core/firestore_client.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * A wrapper implementation of Observer that will dispatch events\n * asynchronously. To allow immediate silencing, a mute call is added which\n * causes events scheduled to no longer be raised.\n */\nvar AsyncObserver = /** @class */ (function () {\n function AsyncObserver(observer) {\n this.observer = observer;\n /**\n * When set to true, will not raise future events. Necessary to deal with\n * async detachment of listener.\n */\n this.muted = false;\n }\n AsyncObserver.prototype.next = function (value) {\n this.scheduleEvent(this.observer.next, value);\n };\n AsyncObserver.prototype.error = function (error) {\n this.scheduleEvent(this.observer.error, error);\n };\n AsyncObserver.prototype.mute = function () {\n this.muted = true;\n };\n AsyncObserver.prototype.scheduleEvent = function (eventHandler, event) {\n var _this = this;\n if (!this.muted) {\n setTimeout(function () {\n if (!_this.muted) {\n eventHandler(event);\n }\n }, 0);\n }\n };\n return AsyncObserver;\n}());\nexport { AsyncObserver };\n\n//# sourceMappingURL=async_observer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/async_observer.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assert, fail } from './assert';\nimport * as log from './log';\nimport { Deferred } from './promise';\nvar AsyncQueue = /** @class */ (function () {\n function AsyncQueue() {\n // The last promise in the queue.\n this.tail = Promise.resolve();\n // The number of ops that are queued to be run in the future (i.e. they had a\n // delay that has not yet elapsed).\n this.delayedOpCount = 0;\n // Flag set while there's an outstanding AsyncQueue operation, used for\n // assertion sanity-checks.\n this.operationInProgress = false;\n }\n /**\n * Adds a new operation to the queue. Returns a promise that will be resolved\n * when the promise returned by the new operation is (with its value).\n *\n * Can optionally specify a delay to wait before queuing the operation.\n */\n AsyncQueue.prototype.schedule = function (op, delay) {\n var _this = this;\n if (this.failure) {\n fail('AsyncQueue is already failed: ' + this.failure.message);\n }\n if ((delay || 0) > 0) {\n this.delayedOpCount++;\n var deferred_1 = new Deferred();\n setTimeout(function () {\n _this.scheduleInternal(function () {\n return op().then(function (result) {\n deferred_1.resolve(result);\n });\n });\n _this.delayedOpCount--; // decrement once it's actually queued.\n }, delay);\n return deferred_1.promise;\n }\n else {\n return this.scheduleInternal(op);\n }\n };\n AsyncQueue.prototype.scheduleInternal = function (op) {\n var _this = this;\n this.tail = this.tail.then(function () {\n _this.operationInProgress = true;\n return op()\n .catch(function (error) {\n _this.failure = error;\n _this.operationInProgress = false;\n log.error('INTERNAL UNHANDLED ERROR: ', error.stack || error.message);\n throw error;\n })\n .then(function () {\n _this.operationInProgress = false;\n });\n });\n return this.tail;\n };\n /**\n * Verifies there's an operation currently in-progress on the AsyncQueue.\n * Unfortunately we can't verify that the running code is in the promise chain\n * of that operation, so this isn't a foolproof check, but it should be enough\n * to catch some bugs.\n */\n AsyncQueue.prototype.verifyOperationInProgress = function () {\n assert(this.operationInProgress, 'verifyOpInProgress() called when no op in progress on this queue.');\n };\n AsyncQueue.prototype.drain = function () {\n // TODO(mikelehen): This should perhaps also drain items that are queued to\n // run in the future (perhaps by artificially running them early), but since\n // no tests need that yet, I didn't bother for now.\n assert(this.delayedOpCount === 0, \"draining doesn't handle delayed ops.\");\n return this.schedule(function () { return Promise.resolve(undefined); });\n };\n return AsyncQueue;\n}());\nexport { AsyncQueue };\n\n//# sourceMappingURL=async_queue.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/util/async_queue.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Simple wrapper around a nullable UID. Mostly exists to make code more\n * readable.\n */\nvar User = /** @class */ (function () {\n function User(uid) {\n this.uid = uid;\n }\n User.prototype.isUnauthenticated = function () {\n return this.uid == null;\n };\n /**\n * Returns a key representing this user, suitable for inclusion in a\n * dictionary.\n */\n User.prototype.toKey = function () {\n if (this.isUnauthenticated()) {\n return 'anonymous-user';\n }\n else {\n return 'uid:' + this.uid;\n }\n };\n User.prototype.equals = function (otherUser) {\n return otherUser.uid === this.uid;\n };\n /** A user with a null UID. */\n User.UNAUTHENTICATED = new User(null);\n // TODO(mikelehen): Look into getting a proper uid-equivalent for\n // non-FirebaseAuth providers.\n User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');\n User.FIRST_PARTY = new User('first-party-uid');\n return User;\n}());\nexport { User };\n\n//# sourceMappingURL=user.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/auth/user.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { makeConstructorPrivate } from '../util/api';\n/**\n * An opaque base class for FieldValue sentinel objects in our public API,\n * with public static methods for creating said sentinel objects.\n */\n// tslint:disable-next-line:class-as-namespace We use this as a base class.\nvar FieldValueImpl = /** @class */ (function () {\n function FieldValueImpl() {\n }\n FieldValueImpl.delete = function () {\n return DeleteFieldValueImpl.instance;\n };\n FieldValueImpl.serverTimestamp = function () {\n return ServerTimestampFieldValueImpl.instance;\n };\n return FieldValueImpl;\n}());\nexport { FieldValueImpl };\nvar DeleteFieldValueImpl = /** @class */ (function (_super) {\n __extends(DeleteFieldValueImpl, _super);\n function DeleteFieldValueImpl() {\n return _super.call(this) || this;\n }\n /** Singleton instance. */\n DeleteFieldValueImpl.instance = new DeleteFieldValueImpl();\n return DeleteFieldValueImpl;\n}(FieldValueImpl));\nexport { DeleteFieldValueImpl };\nvar ServerTimestampFieldValueImpl = /** @class */ (function (_super) {\n __extends(ServerTimestampFieldValueImpl, _super);\n function ServerTimestampFieldValueImpl() {\n return _super.call(this) || this;\n }\n /** Singleton instance. */\n ServerTimestampFieldValueImpl.instance = new ServerTimestampFieldValueImpl();\n return ServerTimestampFieldValueImpl;\n}(FieldValueImpl));\nexport { ServerTimestampFieldValueImpl };\n// Public instance that disallows construction at runtime. This constructor is\n// used when exporting FieldValueImpl on firebase.firestore.FieldValue and will\n// be called FieldValue publicly. Internally we still use FieldValueImpl which\n// has a type-checked private constructor. Note that FieldValueImpl and\n// PublicFieldValue can be used interchangeably in instanceof checks.\n// For our internal TypeScript code PublicFieldValue doesn't exist as a type,\n// and so we need to use FieldValueImpl as type and export it too.\n// tslint:disable-next-line:variable-name We treat this as a class name.\nexport var PublicFieldValue = makeConstructorPrivate(FieldValueImpl, 'Use FieldValue.() instead.');\n\n//# sourceMappingURL=field_value.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../firestore/dist/esm/src/api/field_value.js\n// module id = null\n// module chunks = ","(function() {var g,goog=goog||{},k=this;function l(a){return\"string\"==typeof a}function aa(){}\nfunction ba(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse if(\"function\"==b&&\"undefined\"==typeof a.call)return\"object\";return b}function n(a){return\"array\"==ba(a)}function ca(a){var b=ba(a);return\"array\"==b||\"object\"==b&&\"number\"==typeof a.length}function da(a){return\"function\"==ba(a)}function p(a){var b=typeof a;return\"object\"==b&&null!=a||\"function\"==b}var q=\"closure_uid_\"+(1E9*Math.random()>>>0),ea=0;function fa(a,b,c){return a.call.apply(a.bind,arguments)}\nfunction ha(a,b,c){if(!a)throw Error();if(2b?1:0};function na(a,b){b.unshift(a);ja.call(this,ka.apply(null,b));b.shift()}u(na,ja);na.prototype.name=\"AssertionError\";function oa(a,b){throw new na(\"Failure\"+(a?\": \"+a:\"\"),Array.prototype.slice.call(arguments,1));};function w(){0!=qa&&(ra[this[q]||(this[q]=++ea)]=this);this.i=this.i;this.v=this.v}var qa=0,ra={};w.prototype.i=!1;w.prototype.Y=function(){if(!this.i&&(this.i=!0,this.w(),0!=qa)){var a=this[q]||(this[q]=++ea);delete ra[a]}};w.prototype.w=function(){if(this.v)for(;this.v.length;)this.v.shift()()};var sa=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:l(a)?a.charAt(b):a[b]}function wa(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function xa(a){return Array.prototype.concat.apply([],arguments)}function ya(a){var b=a.length;if(0parseFloat(Qa)){Pa=String(Ta);break a}}Pa=Qa}var Ja={};\nfunction Ua(a){return Ia(a,function(){for(var b=0,c=la(String(Pa)).split(\".\"),d=la(String(a)).split(\".\"),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var cb=\"closure_listenable_\"+(1E6*Math.random()|0);function db(a){return!(!a||!a[cb])}var eb=0;function fb(a,b,c,d,e){this.listener=a;this.a=null;this.src=b;this.type=c;this.capture=!!d;this.da=e;this.key=++eb;this.X=this.ba=!1}function gb(a){a.X=!0;a.listener=null;a.a=null;a.src=null;a.da=null};function hb(a){this.src=a;this.a={};this.b=0}hb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.a[f];a||(a=this.a[f]=[],this.b++);var h=ib(a,b,d,e);-1d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(h){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.a;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;0<=e;e--){b.a=d[e];var f=yb(d[e],a,!0,b);c=c&&f}for(e=0;e>>0);function qb(a){if(da(a))return a;a[Ab]||(a[Ab]=function(b){return a.handleEvent(b)});return a[Ab]};function B(){w.call(this);this.c=new hb(this);this.P=this;this.J=null}u(B,w);B.prototype[cb]=!0;g=B.prototype;g.addEventListener=function(a,b,c,d){ob(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){wb(this,a,b,c,d)};\ng.dispatchEvent=function(a){var b,c=this.J;if(c)for(b=[];c;c=c.J)b.push(c);c=this.P;var d=a.type||a;if(l(a))a=new A(a,c);else if(a instanceof A)a.target=a.target||c;else{var e=a;a=new A(d,c);Ga(a,e)}e=!0;if(b)for(var f=b.length-1;0<=f;f--){var h=a.a=b[f];e=Bb(h,d,!0,a)&&e}h=a.a=c;e=Bb(h,d,!0,a)&&e;e=Bb(h,d,!1,a)&&e;if(b)for(f=0;f=lc(this).value)for(da(b)&&(b=b()),a=new dc(a,String(b),this.f),c&&(a.a=c),c=\"log:\"+a.b,(a=k.console)&&a.timeStamp&&a.timeStamp(c),(a=k.msWriteProfilerMark)&&a(c),c=this;c;)c=c.a};function F(a,b){a.log(gc,b,void 0)}function G(a,b){a.log(hc,b,void 0)}var mc={},nc=null;\nfunction oc(a){nc||(nc=new fc(\"\"),mc[\"\"]=nc,nc.c=jc);var b;if(!(b=mc[a])){b=new fc(a);var c=a.lastIndexOf(\".\"),d=a.substr(c+1);c=oc(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;mc[a]=b}return b};function pc(a,b){a&&a.log(ic,b,void 0)}function H(a,b){a&&a.log(kc,b,void 0)};function qc(){this.a=oc(\"goog.labs.net.webChannel.WebChannelDebug\")}function rc(a,b,c,d){if(c)try{var e=JSON.parse(c);if(e)for(var f=0;fh.length)){var m=h[1];if(n(m)&&!(1>m.length)){var v=m[0];if(\"noop\"!=v&&\"stop\"!=v&&\"close\"!=v)for(var Sa=1;Sab||3==b&&!Ka&&!this.a.U())){this.s||4!=b||7==c||uc();Rc(this);var d=this.a.V();this.v=d;var e=this.a.U();e||I(this.b,\"No response text for uri \"+this.g+\" status \"+d);this.c=200==d;I(this.b,\"XMLHTTP RESP (\"+this.f+\") [ attempt \"+this.S+\"]: \"+this.j+\"\\n\"+this.g+\"\\n\"+b+\" \"+d);if(this.c)this.J?(Sc(this,b,e),Ka&&this.c&&3==b&&(this.M.$(this.F,\"tick\",this.fb),this.F.start())):(rc(this.b,this.f,e,null),Tc(this,e)),4==b&&Uc(this),this.c&&\n!this.s&&(4==b?this.m.wa(this):(this.c=!1,Pc(this)));else{if(400==d&&0b.length)return Kc;b=b.substr(d,c);a.C=d+c;return b}g.cancel=function(){this.s=!0;Uc(this)};function Pc(a){a.T=t()+a.P;Xc(a,a.P)}function Xc(a,b){if(null!=a.o)throw Error(\"WatchDog timer not null\");a.o=xc(r(a.eb,a),b)}function Rc(a){a.o&&(k.clearTimeout(a.o),a.o=null)}\ng.eb=function(){this.o=null;var a=t();if(0<=a-this.T)this.c&&(a=this.b.a)&&F(a,\"Received watchdog timeout even though request loaded successfully\"),I(this.b,\"TIMEOUT: \"+this.g),2!=this.I&&(uc(),K()),Uc(this),this.i=2,Vc(this);else{var b=this.b.a;b&&G(b,\"WatchDog timer called too early\");Xc(this,this.T-a)}};function Vc(a){a.m.Ka()||a.s||a.m.wa(a)}function Uc(a){Rc(a);var b=a.G;b&&\"function\"==typeof b.Y&&b.Y();a.G=null;Yb(a.F);cc(a.M);a.a&&(b=a.a,a.a=null,b.abort(),b.Y())}\nfunction Tc(a,b){try{a.m.Na(a,b),uc()}catch(c){sc(a.b,c,\"Error in httprequest callback\")}};function Yc(a){if(a.A&&\"function\"==typeof a.A)return a.A();if(l(a))return a.split(\"\");if(ca(a)){for(var b=[],c=a.length,d=0;d2*a.c&&$c(a),!0):!1}function $c(a){if(a.c!=a.a.length){for(var b=0,c=0;bb)throw Error(\"Bad port number \"+b);a.i=b}else a.i=null}function hd(a,b,c){b instanceof kd?(a.c=b,qd(a.c,a.h)):(c||(b=ld(b,rd)),a.c=new kd(b,0,a.h))}\nfunction R(a,b,c){a.c.set(b,c)}function Qc(a,b,c){n(c)||(c=[String(c)]);sd(a.c,b,c)}function Mc(a){R(a,\"zx\",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^t()).toString(36));return a}function td(a){return a instanceof Q?M(a):new Q(a,void 0)}function ud(a,b,c,d){var e=new Q(null,void 0);a&&ed(e,a);b&&fd(e,b);c&&gd(e,c);d&&(e.a=d);return e}function jd(a,b){return a?b?decodeURI(a.replace(/%25/g,\"%2525\")):decodeURIComponent(a):\"\"}\nfunction ld(a,b,c){return l(a)?(a=encodeURI(a).replace(b,vd),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),a):null}function vd(a){a=a.charCodeAt(0);return\"%\"+(a>>4&15).toString(16)+(a&15).toString(16)}var md=/[#\\/\\?@]/g,od=/[#\\?:]/g,nd=/[#\\?]/g,rd=/[#\\?@]/g,pd=/#/g;function kd(a,b,c){this.b=this.a=null;this.c=a||null;this.f=!!c}function S(a){a.a||(a.a=new O,a.b=0,a.c&&dd(a.c,function(b,c){a.add(decodeURIComponent(b.replace(/\\+/g,\" \")),c)}))}g=kd.prototype;g.u=function(){S(this);return this.b};\ng.add=function(a,b){S(this);this.c=null;a=wd(this,a);var c=this.a.get(a);c||this.a.set(a,c=[]);c.push(b);this.b+=1;return this};function xd(a,b){S(a);b=wd(a,b);P(a.a.b,b)&&(a.c=null,a.b-=a.a.get(b).length,bd(a.a,b))}function yd(a,b){S(a);b=wd(a,b);return P(a.a.b,b)}g.forEach=function(a,b){S(this);this.a.forEach(function(c,d){ta(c,function(c){a.call(b,c,d,this)},this)},this)};\ng.O=function(){S(this);for(var a=this.a.A(),b=this.a.O(),c=[],d=0;d=a.c:!1}function Td(a,b){return a.b?a.b==b:a.a?a.a.contains(b):!1}function Rd(a,b){a.a?a.a.add(b):a.b=b}\nOd.prototype.cancel=function(){this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(ta(this.a.A(),function(a){a.cancel()}),ad(this.a.a))};function Ud(a,b){this.a=a;this.b=b};function Vd(a,b){this.a=a;this.b=b}Vd.prototype.stringify=function(a){return k.JSON.stringify(a,this.a)};Vd.prototype.parse=function(a){return k.JSON.parse(a,this.b)};function Wd(){this.a=new Vd}function Xd(a,b,c){var d=c||\"\";try{Zc(a,function(a,c){var e=a;p(a)&&(e=Eb(a));b.push(d+c+\"=\"+encodeURIComponent(e))})}catch(e){throw b.push(d+\"type=\"+encodeURIComponent(\"_badmap\")),e;}};function Yd(a,b){var c=new qc;I(c,\"TestLoadImage: loading \"+a);var d=new Image;d.onload=ia(Zd,c,d,\"TestLoadImage: loaded\",!0,b);d.onerror=ia(Zd,c,d,\"TestLoadImage: error\",!1,b);d.onabort=ia(Zd,c,d,\"TestLoadImage: abort\",!1,b);d.ontimeout=ia(Zd,c,d,\"TestLoadImage: timeout\",!1,b);k.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4);d.src=a}function Zd(a,b,c,d,e){try{I(a,c),b.onload=null,b.onerror=null,b.onabort=null,b.ontimeout=null,e(d)}catch(f){sc(a,f)}};function U(a){B.call(this);this.headers=new O;this.G=a||null;this.f=!1;this.F=this.a=null;this.M=this.s=\"\";this.j=0;this.g=\"\";this.h=this.I=this.o=this.H=!1;this.l=0;this.B=null;this.N=$d;this.C=this.m=!1}u(U,B);var $d=\"\";U.prototype.b=oc(\"goog.net.XhrIo\");var ae=/^https?$/i,be=[\"POST\",\"PUT\"];g=U.prototype;\ng.ta=function(a,b,c,d){if(this.a)throw Error(\"[goog.net.XhrIo] Object is active with another request=\"+this.s+\"; newUri=\"+a);b=b?b.toUpperCase():\"GET\";this.s=a;this.g=\"\";this.j=0;this.M=b;this.H=!1;this.f=!0;this.a=this.G?Fc(this.G):Fc(Dc);this.F=this.G?Bc(this.G):Bc(Dc);this.a.onreadystatechange=r(this.Ma,this);try{H(this.b,V(this,\"Opening Xhr\")),this.I=!0,this.a.open(b,String(a),!0),this.I=!1}catch(f){H(this.b,V(this,\"Error opening Xhr: \"+f.message));ce(this,f);return}a=c||\"\";var e=new O(this.headers);\nd&&Zc(d,function(a,b){e.set(b,a)});d=ua(e.O());c=k.FormData&&a instanceof k.FormData;!(0<=sa(be,b))||d||c||e.set(\"Content-Type\",\"application/x-www-form-urlencoded;charset=utf-8\");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.N&&(this.a.responseType=this.N);\"withCredentials\"in this.a&&this.a.withCredentials!==this.m&&(this.a.withCredentials=this.m);try{de(this),0c&&(c=a.length);d=a.indexOf(\"?\");if(0>d||d>c){d=c;var e=\"\"}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+\"&\"+b:b:c;a=a[0]+(a[1]?\"?\"+a[1]:\"\")+a[2]}return a}R(a,b,c);return a};function ke(a,b,c){this.za=b||0;this.Ba=0;this.h=[];this.l=[];this.a=new qc;this.J=c||new Md;this.ia=this.ya=this.H=this.ja=this.b=this.N=this.j=this.ha=this.f=this.P=this.i=null;this.Va=this.I=0;this.ka=this.C=this.s=this.m=this.o=this.c=null;this.v=this.Aa=this.S=-1;this.ga=this.B=this.G=0;this.T=a&&a.supportsCrossDomainXhr||!1;this.M=\"\";this.g=new Od(a&&a.concurrentRequestLimit);this.la=new Wd;this.F=a&&void 0!==a.backgroundChannelTest?a.backgroundChannelTest:!0;this.Ua=a&&a.fastHandshake||!1}\ng=ke.prototype;g.oa=8;g.D=1;function le(a){I(a.a,\"disconnect()\");me(a);if(3==a.D){var b=a.I++,c=M(a.H);R(c,\"SID\",a.M);R(c,\"RID\",b);R(c,\"TYPE\",\"terminate\");ne(a,c);b=new L(a,a.a,0,b,void 0);b.I=2;b.l=Mc(M(c));c=!1;k.navigator&&k.navigator.sendBeacon&&(c=k.navigator.sendBeacon(b.l.toString(),\"\"));c||((new Image).src=b.l);b.H=t();Pc(b)}oe(a)}\nfunction me(a){a.C&&(a.C.abort(),a.C=null);a.b&&(a.b.cancel(),a.b=null);a.m&&(k.clearTimeout(a.m),a.m=null);pe(a);a.g.cancel();a.o&&(k.clearTimeout(a.o),a.o=null)}function qe(a,b){if(1E3==a.h.length){var c=\"Already have 1000 queued maps upon queueing \"+Eb(b),d=a.a.a;d&&F(d,c)}a.h.push(new Ud(a.Va++,b));3==a.D&&re(a)}g.Ka=function(){return 0==this.D};function re(a){Sd(a.g)||a.o||(a.o=xc(r(a.Pa,a),0),a.G=0)}\ng.Pa=function(a){this.o=null;I(this.a,\"startForwardChannel_\");if(1==this.D)if(a)(a=this.a.a)&&F(a,\"Not supposed to retry the open\");else{I(this.a,\"open_()\");this.I=Math.floor(1E5*Math.random());a=this.I++;var b=new L(this,this.a,0,a,void 0),c=this.i;this.P&&(c?(c=Ea(c),Ga(c,this.P)):c=this.P);null===this.f&&(b.h=c);var d=se(this),e=M(this.H);R(e,\"RID\",a);0b&&this.ka&&0==this.B&&!this.s&&(this.s=xc(r(this.ab,this),6E3)));else I(this.a,\"Bad POST response data returned\"),W(this,11)}else if(this.b==a&&pe(this),!/^[\\s\\xa0]*$/.test(b))for(b=c=this.la.a.parse(b),c=0;cthis.c)throw Error(Je);this.a=new Ge;this.b=new T;this.g=null;this.aa()}u(Ie,w);var Je=\"[goog.structs.Pool] Min can not be greater than max\";g=Ie.prototype;g.ca=function(){var a=t();if(!(null!=this.g&&0>a-this.g)){for(var b;0this.c&&0=this.u()){for(var c=this.a,d=0;d>1,a[d].a>c.a)a[b]=a[d],b=d;else break;a[b]=c}Me.prototype.A=function(){for(var a=this.a,b=[],c=a.length,d=0;d=e)f=void 0;else{if(1==e)wa(d);else{d[0]=d.pop();d=0;c=c.a;e=c.length;for(var h=c[d];d>1;){var m=2*d+1,v=2*d+2;m=vh.a)break;c[d]=c[m];d=m}c[d]=h}f=f.b}f.apply(this,[b])}else break}};\ng.ma=function(a){Y.L.ma.call(this,a);this.ua()};g.aa=function(){Y.L.aa.call(this);this.ua()};g.w=function(){Y.L.w.call(this);k.clearTimeout(void 0);wa(this.f.a);this.f=null};function Z(a,b,c,d){this.l=a;this.j=!!d;Y.call(this,b,c)}u(Z,Y);Z.prototype.qa=function(){var a=new U,b=this.l;b&&b.forEach(function(b,d){a.headers.set(d,b)});this.j&&(a.m=!0);return a};Z.prototype.va=function(a){return!a.i&&!a.a};Be.prototype.createWebChannel=Be.prototype.a;X.prototype.send=X.prototype.l;X.prototype.open=X.prototype.j;X.prototype.close=X.prototype.close;yc.NO_ERROR=0;yc.TIMEOUT=8;yc.HTTP_ERROR=6;zc.COMPLETE=\"complete\";Dd.EventType=Ed;Ed.OPEN=\"a\";Ed.CLOSE=\"b\";Ed.ERROR=\"c\";Ed.MESSAGE=\"d\";B.prototype.listen=B.prototype.$;Z.prototype.getObject=Z.prototype.ca;Z.prototype.releaseObject=Z.prototype.hb;U.prototype.listenOnce=U.prototype.Ia;U.prototype.getLastError=U.prototype.$a;U.prototype.getLastErrorCode=U.prototype.Ga;\nU.prototype.getStatus=U.prototype.V;U.prototype.getStatusText=U.prototype.Ha;U.prototype.getResponseJson=U.prototype.Za;U.prototype.getResponseText=U.prototype.U;U.prototype.getResponseText=U.prototype.U;U.prototype.send=U.prototype.ta;module.exports={createWebChannelTransport:Fe,ErrorCode:yc,EventType:zc,WebChannel:Dd,XhrIoPool:Z};}).call(typeof window !== 'undefined' ? window : this)\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../webchannel-wrapper/dist/index.js\n// module id = 115\n// module chunks = 1"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/firebase/firebase-messaging-externs.js b/lib/firebase/firebase-messaging-externs.js index 46cb0d9d..59f26afd 100644 --- a/lib/firebase/firebase-messaging-externs.js +++ b/lib/firebase/firebase-messaging-externs.js @@ -1,25 +1,21 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ */ - /** -* Copyright 2017 Google Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * @fileoverview Firebase Messaging API. - * Version: 4.2.0 + * Version: ${JSCORE_VERSION} * * Copyright 2017 Google Inc. All Rights Reserved. * @@ -38,7 +34,6 @@ Terms: https://firebase.google.com/terms/ */ * @externs */ - /** * Gets the {@link firebase.messaging.Messaging `Messaging`} service for the * default app or a given app. @@ -129,8 +124,9 @@ firebase.messaging.Messaging.prototype.getToken = function() {}; * @return {firebase.Unsubscribe} To stop listening for token * refresh events execute this returned function. */ -firebase.messaging.Messaging.prototype.onTokenRefresh = - function(nextOrObserver) {}; +firebase.messaging.Messaging.prototype.onTokenRefresh = function( + nextOrObserver +) {}; /** * When a push message is received and the user is currently on a page @@ -146,8 +142,7 @@ firebase.messaging.Messaging.prototype.onTokenRefresh = * @return {firebase.Unsubscribe} To stop listening for messages * execute this returned function. */ -firebase.messaging.Messaging.prototype.onMessage = - function(nextOrObserver) {}; +firebase.messaging.Messaging.prototype.onMessage = function(nextOrObserver) {}; /** * To forceably stop a registration token from being used, delete it @@ -166,8 +161,9 @@ firebase.messaging.Messaging.prototype.deleteToken = function(token) {}; * @param {!ServiceWorkerRegistration} registration The service worker * registration you wish to use for push messaging. */ -firebase.messaging.Messaging.prototype.useServiceWorker = - function(registration) {}; +firebase.messaging.Messaging.prototype.useServiceWorker = function( + registration +) {}; /** * FCM directs push messages to your web page's `onMessage()` callback @@ -179,5 +175,6 @@ firebase.messaging.Messaging.prototype.useServiceWorker = * * @param {!function(!Object)} callback The function to handle the push message. */ -firebase.messaging.Messaging.prototype.setBackgroundMessageHandler = - function(callback) {}; \ No newline at end of file +firebase.messaging.Messaging.prototype.setBackgroundMessageHandler = function( + callback +) {}; diff --git a/lib/firebase/firebase-messaging.js b/lib/firebase/firebase-messaging.js index 98a0e38b..f9f8cc83 100644 --- a/lib/firebase/firebase-messaging.js +++ b/lib/firebase/firebase-messaging.js @@ -1,6 +1,7 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ */ - -try{webpackJsonpFirebase([2],{24:function(e,t,r){"use strict";function n(e){var t=new Uint8Array(e);return window.btoa(String.fromCharCode.apply(null,t))}function o(e){var t=function(e){return self&&"ServiceWorkerGlobalScope"in self?new F(e):new D(e)},r={Messaging:D};e.INTERNAL.registerService("messaging",t,r)}Object.defineProperty(t,"__esModule",{value:!0});var i,s={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key"},a=(i={},i[s.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",i[s.AVAILABLE_IN_SW]="This method is available in a service worker context.",i["should-be-overriden"]="This method should be overriden by extended classes.",i["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i["permission-default"]="The required permissions were not granted and dismissed instead.",i["permission-blocked"]="The required permissions were not granted and blocked instead.",i["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",i["notifications-blocked"]="Notifications have been blocked.",i[s.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",i["sw-registration-expected"]="A service worker registration was the expected input.",i["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",i["invalid-saved-token"]="Unable to access details of the saved token.",i["sw-reg-redundant"]="The service worker being used for push was made redundant.",i["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$message}",i["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",i["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",i["use-sw-before-get-token"]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",i["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",i["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",i["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",i["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",i["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",i["failed-to-delete-token"]="Unable to delete the currently saved token.",i["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i["bad-scope"]="The service worker scope must be a string with at least one character.",i["bad-vapid-key"]="The public VAPID key must be a string with at least one character.",i["bad-subscription"]="The subscription must be a valid PushSubscription.",i["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",i["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",i["failed-delete-vapid-key"]="The VAPID key could not be deleted.",i),c={codes:s,map:a},u=function(e){return n(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},_=[4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110],f={userVisibleOnly:!0,applicationServerKey:new Uint8Array(_)},d={ENDPOINT:"https://fcm.googleapis.com",APPLICATION_SERVER_KEY:_,SUBSCRIPTION_OPTIONS:f},h=r(10),p="fcm_token_object_Store",l=function(){function e(){this.e=new h.a("messaging","Messaging",c.map),this.t=null}return e.prototype.r=function(){return this.t?this.t:(this.t=new Promise(function(e,t){var r=indexedDB.open("fcm_token_details_db",1);r.onerror=function(e){t(e.target.error)},r.onsuccess=function(t){e(t.target.result)},r.onupgradeneeded=function(e){var t=e.target.result,r=t.createObjectStore(p,{keyPath:"swScope"});r.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.t)},e.prototype.closeDatabase=function(){var e=this;return this.t?this.t.then(function(t){t.close(),e.t=null}):Promise.resolve()},e.prototype.getTokenDetailsFromToken=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction([p]),i=o.objectStore(p),s=i.index("fcmToken"),a=s.get(e);a.onerror=function(e){n(e.target.error)},a.onsuccess=function(e){r(e.target.result)}})})},e.prototype.n=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction([p]),i=o.objectStore(p),s=i.get(e);s.onerror=function(e){n(e.target.error)},s.onsuccess=function(e){r(e.target.result)}})})},e.prototype.o=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction([p]),i=o.objectStore(p),s=[],a=i.openCursor();a.onerror=function(e){n(e.target.error)},a.onsuccess=function(t){var n=t.target.result;n?(n.value.fcmSenderId===e&&s.push(n.value),n.continue()):r(s)}})})},e.prototype.subscribeToFCM=function(e,t,r){var n=this,o=u(t.getKey("p256dh")),i=u(t.getKey("auth")),s="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+o+"&encryption_auth="+i;r&&(s+="&pushSet="+r);var a=new Headers;a.append("Content-Type","application/x-www-form-urlencoded");var _={method:"POST",headers:a,body:s};return fetch(d.ENDPOINT+"/fcm/connect/subscribe",_).then(function(e){return e.json()}).then(function(e){var t=e;if(t.error){var r=t.error.message;throw n.e.create(c.codes.TOKEN_SUBSCRIBE_FAILED,{message:r})}if(!t.token)throw n.e.create(c.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw n.e.create(c.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},e.prototype.i=function(e,t){return e.endpoint===t.endpoint&&u(e.getKey("auth"))===t.auth&&u(e.getKey("p256dh"))===t.p256dh},e.prototype.s=function(e,t,r,n,o){var i={swScope:t.scope,endpoint:r.endpoint,auth:u(r.getKey("auth")),p256dh:u(r.getKey("p256dh")),fcmToken:n,fcmPushSet:o,fcmSenderId:e};return this.r().then(function(e){return new Promise(function(t,r){var n=e.transaction([p],"readwrite"),o=n.objectStore(p),s=o.put(i);s.onerror=function(e){r(e.target.error)},s.onsuccess=function(e){t()}})})},e.prototype.getSavedToken=function(e,t){var r=this;return t instanceof ServiceWorkerRegistration?"string"!=typeof e||0===e.length?Promise.reject(this.e.create(c.codes.BAD_SENDER_ID)):this.o(e).then(function(r){if(0!==r.length){var n=r.findIndex(function(r){return t.scope===r.swScope&&e===r.fcmSenderId});if(-1!==n)return r[n]}}).then(function(e){if(e)return t.pushManager.getSubscription().catch(function(e){throw r.e.create(c.codes.GET_SUBSCRIPTION_FAILED)}).then(function(t){if(t&&r.i(t,e))return e.fcmToken})}):Promise.reject(this.e.create(c.codes.SW_REGISTRATION_EXPECTED))},e.prototype.createToken=function(e,t){var r=this;if("string"!=typeof e||0===e.length)return Promise.reject(this.e.create(c.codes.BAD_SENDER_ID));if(!(t instanceof ServiceWorkerRegistration))return Promise.reject(this.e.create(c.codes.SW_REGISTRATION_EXPECTED));var n,o;return t.pushManager.getSubscription().then(function(e){return e||t.pushManager.subscribe(d.SUBSCRIPTION_OPTIONS)}).then(function(t){return n=t,r.subscribeToFCM(e,n)}).then(function(i){return o=i,r.s(e,t,n,o.token,o.pushSet)}).then(function(){return o.token})},e.prototype.deleteToken=function(e){var t=this;return"string"!=typeof e||0===e.length?Promise.reject(this.e.create(c.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(e).then(function(e){if(!e)throw t.e.create(c.codes.DELETE_TOKEN_NOT_FOUND);return t.r().then(function(r){return new Promise(function(n,o){var i=r.transaction([p],"readwrite"),s=i.objectStore(p),a=s.delete(e.swScope);a.onerror=function(e){o(e.target.error)},a.onsuccess=function(r){if(0===r.target.result)return void o(t.e.create(c.codes.FAILED_TO_DELETE_TOKEN));n(e)}})})})},e}(),g=l,E=r(10),S="messagingSenderId",T=function(){function e(e){var t=this;if(this.e=new E.a("messaging","Messaging",c.map),!e.options[S]||"string"!=typeof e.options[S])throw this.e.create(c.codes.BAD_SENDER_ID);this.c=e.options[S],this.u=new g,this.app=e,this.INTERNAL={},this.INTERNAL.delete=function(){return t.delete}}return e.prototype.getToken=function(){var e=this,t=this._();return"granted"!==t?"denied"===t?Promise.reject(this.e.create(c.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null):this.f().then(function(t){return e.u.getSavedToken(e.c,t).then(function(r){return r||e.u.createToken(e.c,t)})})},e.prototype.deleteToken=function(e){var t=this;return this.u.deleteToken(e).then(function(){return t.f().then(function(e){if(e)return e.pushManager.getSubscription()}).then(function(e){if(e)return e.unsubscribe()})})},e.prototype.f=function(){throw this.e.create(c.codes.SHOULD_BE_INHERITED)},e.prototype.requestPermission=function(){throw this.e.create(c.codes.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw this.e.create(c.codes.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,r){throw this.e.create(c.codes.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,r){throw this.e.create(c.codes.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw this.e.create(c.codes.AVAILABLE_IN_SW)},e.prototype.delete=function(){this.u.closeDatabase()},e.prototype._=function(){return Notification.permission},e.prototype.getTokenManager=function(){return this.u},e}(),b=T,m={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},v={PUSH_MSG_RECEIVED:"push-msg-received",NOTIFICATION_CLICKED:"notification-clicked"},I=function(e,t){return r={},r[m.TYPE_OF_MSG]=e,r[m.DATA]=t,r;var r},y={PARAMS:m,TYPES_OF_MSG:v,createNewMsg:I},N={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"},w=r(13),k=this&&this.d||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),O=function(e){function t(t){var r=e.call(this,t)||this;return r.h,r.p,r.l=null,r.g=Object(w.a)(function(e){r.l=e}),r.S=null,r.T=Object(w.a)(function(e){r.S=e}),r.b(),r}return k(t,e),t.prototype.getToken=function(){var t=this;return this.m()?this.v().then(function(){return e.prototype.getToken.call(t)}):Promise.reject(this.e.create(c.codes.UNSUPPORTED_BROWSER))},t.prototype.v=function(){var e=this;if(this.p)return this.p;var t=document.querySelector('link[rel="manifest"]');return this.p=t?fetch(t.href).then(function(e){return e.json()}).catch(function(){return Promise.resolve()}).then(function(t){if(t&&t.gcm_sender_id&&"103953800507"!==t.gcm_sender_id)throw e.e.create(c.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.p},t.prototype.requestPermission=function(){var e=this;return"granted"===Notification.permission?Promise.resolve():new Promise(function(t,r){var n=function(n){return"granted"===n?t():r("denied"===n?e.e.create(c.codes.PERMISSION_BLOCKED):e.e.create(c.codes.PERMISSION_DEFAULT))},o=Notification.requestPermission(function(e){o||n(e)});o&&o.then(n)})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw this.e.create(c.codes.SW_REGISTRATION_EXPECTED);if(void 0!==this.h)throw this.e.create(c.codes.USE_SW_BEFORE_GET_TOKEN);this.h=e},t.prototype.onMessage=function(e,t,r){return this.g(e,t,r)},t.prototype.onTokenRefresh=function(e,t,r){return this.T(e,t,r)},t.prototype.I=function(e){var t=this,r=e.installing||e.waiting||e.active;return new Promise(function(n,o){if(!r)return void o(t.e.create(c.codes.NO_SW_IN_REG));if("activated"===r.state)return void n(e);if("redundant"===r.state)return void o(t.e.create(c.codes.SW_REG_REDUNDANT));var i=function i(){if("activated"===r.state)n(e);else{if("redundant"!==r.state)return;o(t.e.create(c.codes.SW_REG_REDUNDANT))}r.removeEventListener("statechange",i)};r.addEventListener("statechange",i)})},t.prototype.f=function(){var e=this;return this.h?this.I(this.h):(this.h=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:N.scope}).catch(function(t){throw e.e.create(c.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(t){return e.I(t).then(function(){return e.h=t,t.update(),t})}))},t.prototype.b=function(){var e=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[y.PARAMS.TYPE_OF_MSG]){var r=t.data;switch(r[y.PARAMS.TYPE_OF_MSG]){case y.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case y.TYPES_OF_MSG.NOTIFICATION_CLICKED:var n=r[y.PARAMS.DATA];e.l.next(n)}}},!1)},t.prototype.m=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},t}(b),D=O,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P=this&&this.d||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(e){function t(t){var r=e.call(this,t)||this;return self.addEventListener("push",function(e){return r.y(e)},!1),self.addEventListener("pushsubscriptionchange",function(e){return r.N(e)},!1),self.addEventListener("notificationclick",function(e){return r.w(e)},!1),r.k=null,r}return P(t,e),t.prototype.y=function(e){var t,r=this;try{t=e.data.json()}catch(e){return}var n=this.O().then(function(e){if(e){if(t.notification||r.k)return r.D(t)}else{var n=r.A(t);if(n){var o=n.title||"";return self.registration.showNotification(o,n)}if(r.k)return r.k(t)}});e.waitUntil(n)},t.prototype.N=function(e){var t=this,r=this.getToken().then(function(e){if(!e)throw t.e.create(c.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var r=null,n=t.getTokenManager();return n.getTokenDetailsFromToken(e).then(function(e){if(!(r=e))throw t.e.create(c.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(d.SUBSCRIPTION_OPTIONS)}).then(function(e){return n.subscribeToFCM(r.fcmSenderId,e,r.fcmPushSet)}).catch(function(e){return n.deleteToken(r.fcmToken).then(function(){throw t.e.create(c.codes.UNABLE_TO_RESUBSCRIBE,{message:e})})})});e.waitUntil(r)},t.prototype.w=function(e){var t=this;if(e.notification&&e.notification.data&&e.notification.data.FCM_MSG){e.stopImmediatePropagation(),e.notification.close();var r=e.notification.data.FCM_MSG,n=r.notification.click_action;if(n){var o=this.P(n).then(function(e){return e||self.clients.openWindow(n)}).then(function(e){if(e){r.notification,delete r.notification;var n=y.createNewMsg(y.TYPES_OF_MSG.NOTIFICATION_CLICKED,r);return t.R(e,n)}});e.waitUntil(o)}}},t.prototype.A=function(e){if(e&&"object"===A(e.notification)){var t=Object.assign({},e.notification);return t.data=(r={},r.FCM_MSG=e,r),t;var r}},t.prototype.setBackgroundMessageHandler=function(e){if(e&&"function"!=typeof e)throw this.e.create(c.codes.BG_HANDLER_FUNCTION_EXPECTED);this.k=e},t.prototype.P=function(e){var t=new URL(e).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(e){for(var r=null,n=0;n} The IndexedDB database\r\n */\n TokenManager.prototype.openDatabase_ = function () {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n this.openDbPromise_ = new Promise(function (resolve, reject) {\n var request = indexedDB.open(FCM_TOKEN_DETAILS_DB, FCM_TOKEN_DETAILS_DB_VERSION);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n request.onupgradeneeded = function (event) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n return this.openDbPromise_;\n };\n /**\r\n * Close the currently open database.\r\n * @return {Promise} Returns the result of the promise chain.\r\n */\n TokenManager.prototype.closeDatabase = function () {\n var _this = this;\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(function (db) {\n db.close();\n _this.openDbPromise_ = null;\n });\n }\n return Promise.resolve();\n };\n /**\r\n * Given a token, this method will look up the details in indexedDB.\r\n * @public\r\n * @param {string} fcmToken\r\n * @return {Promise} The details associated with that token.\r\n */\n TokenManager.prototype.getTokenDetailsFromToken = function (fcmToken) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var index = objectStore.index('fcmToken');\n var request = index.get(fcmToken);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getTokenDetailsFromSWScope_ = function (swScope) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = function (event) {\n reject(event.target.error);\n };\n scopeRequest.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getAllTokenDetailsForSenderId_ = function (senderId) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var senderIdTokens = [];\n var cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n } else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n };\n /**\r\n * Given a PushSubscription and messagingSenderId, get an FCM token.\r\n * @public\r\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\r\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\r\n * @param {string=} pushSet If defined this will swap the subscription for\r\n * matching FCM token.\r\n * @return {Promise} Returns the FCM token to be used in place\r\n * of the PushSubscription.\r\n */\n TokenManager.prototype.subscribeToFCM = function (senderId, subscription, pushSet) {\n var _this = this;\n var p256dh = array_buffer_to_base64_defaultExport(subscription['getKey']('p256dh'));\n var auth = array_buffer_to_base64_defaultExport(subscription['getKey']('auth'));\n var fcmSubscribeBody = \"authorized_entity=\" + senderId + \"&\" + (\"endpoint=\" + subscription.endpoint + \"&\") + (\"encryption_key=\" + p256dh + \"&\") + (\"encryption_auth=\" + auth);\n if (pushSet) {\n fcmSubscribeBody += \"&pushSet=\" + pushSet;\n }\n var headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n var subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n return fetch(fcm_details_defaultExport.ENDPOINT + '/fcm/connect/subscribe', subscribeOptions).then(function (response) {\n return response.json();\n }).then(function (response) {\n var fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n var message = fcmTokenResponse['error']['message'];\n throw _this.errorFactory_.create(errors_defaultExport.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n if (!fcmTokenResponse['token']) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.TOKEN_SUBSCRIBE_NO_TOKEN);\n }\n if (!fcmTokenResponse['pushSet']) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);\n }\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n };\n /**\r\n * Checks the that fields in the PushSubscription are equivalent to the\r\n * details stores in the masterTokenDetails.\r\n * @private\r\n * @param {PushSubscription} subscription The push subscription we expect\r\n * the master token to match.\r\n * @param {Object} masterTokenDetails The saved details we wish to compare\r\n * with the PushSubscription\r\n * @return {boolean} true if the subscription and token details are\r\n * equivalent.\r\n */\n TokenManager.prototype.isSameSubscription_ = function (subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return subscription.endpoint === masterTokenDetails['endpoint'] && array_buffer_to_base64_defaultExport(subscription['getKey']('auth')) === masterTokenDetails['auth'] && array_buffer_to_base64_defaultExport(subscription['getKey']('p256dh')) === masterTokenDetails['p256dh'];\n };\n /**\r\n * Save the details for the fcm token for re-use at a later date.\r\n * @private\r\n * @param {string} senderId The 'messagingSenderId' used for this project\r\n * @param {ServiceWorkerRegistration} swRegistration The service worker\r\n * used to subscribe the user for web push\r\n * @param {PushSubscription} subscription The push subscription passed to\r\n * FCM for the current token.\r\n * @param {string} fcmToken The FCM token currently used on this\r\n * device.\r\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\r\n * @return {Promise}\r\n */\n TokenManager.prototype.saveTokenDetails_ = function (senderId, swRegistration, subscription, fcmToken, fcmPushSet) {\n var details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: array_buffer_to_base64_defaultExport(subscription['getKey']('auth')),\n p256dh: array_buffer_to_base64_defaultExport(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.put(details);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve();\n };\n });\n });\n };\n /**\r\n * Returns the saved FCM Token if one is available and still valid,\r\n * otherwise `null` is returned.\r\n * @param {string} senderId This should be the sender ID associated with the\r\n * FCM Token being retrieved.\r\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\r\n * to subscribe the user to push.\r\n * @return {Promise | Promise} Returns the saved FCM Token if\r\n * avilable and valid.\r\n * @export\r\n */\n TokenManager.prototype.getSavedToken = function (senderId, swRegistration) {\n var _this = this;\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.SW_REGISTRATION_EXPECTED));\n }\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.BAD_SENDER_ID));\n }\n return this.getAllTokenDetailsForSenderId_(senderId).then(function (allTokenDetails) {\n if (allTokenDetails.length === 0) {\n return;\n }\n var index = allTokenDetails.findIndex(function (tokenDetails) {\n return swRegistration.scope === tokenDetails['swScope'] && senderId === tokenDetails['fcmSenderId'];\n });\n if (index === -1) {\n return;\n }\n return allTokenDetails[index];\n }).then(function (tokenDetails) {\n if (!tokenDetails) {\n return;\n }\n return swRegistration.pushManager.getSubscription().catch(function (err) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.GET_SUBSCRIPTION_FAILED);\n }).then(function (subscription) {\n if (subscription && _this.isSameSubscription_(subscription, tokenDetails)) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n };\n /**\r\n * Creates a new FCM token.\r\n */\n TokenManager.prototype.createToken = function (senderId, swRegistration) {\n var _this = this;\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.BAD_SENDER_ID));\n }\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.SW_REGISTRATION_EXPECTED));\n }\n // Check for existing subscription first\n var subscription;\n var fcmTokenDetails;\n return swRegistration.pushManager.getSubscription().then(function (subscription) {\n if (subscription) {\n return subscription;\n }\n return swRegistration.pushManager.subscribe(fcm_details_defaultExport.SUBSCRIPTION_OPTIONS);\n }).then(function (sub) {\n subscription = sub;\n return _this.subscribeToFCM(senderId, subscription);\n }).then(function (tokenDetails) {\n fcmTokenDetails = tokenDetails;\n return _this.saveTokenDetails_(senderId, swRegistration, subscription, fcmTokenDetails['token'], fcmTokenDetails['pushSet']);\n }).then(function () {\n return fcmTokenDetails['token'];\n });\n };\n /**\r\n * This method deletes details of the current FCM token.\r\n * It's returning a promise in case we need to move to an async\r\n * method for deleting at a later date.\r\n * @param {string} token Token to be deleted\r\n * @return {Promise} Resolves once the FCM token details have been\r\n * deleted and returns the deleted details.\r\n */\n TokenManager.prototype.deleteToken = function (token) {\n var _this = this;\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.INVALID_DELETE_TOKEN));\n }\n return this.getTokenDetailsFromToken(token).then(function (details) {\n if (!details) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.DELETE_TOKEN_NOT_FOUND);\n }\n return _this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.delete(details['swScope']);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n if (event.target.result === 0) {\n reject(_this.errorFactory_.create(errors_defaultExport.codes.FAILED_TO_DELETE_TOKEN));\n return;\n }\n resolve(details);\n };\n });\n });\n });\n };\n return TokenManager;\n}();\n/* harmony default export */ var token_manager_defaultExport = (token_manager_TokenManager);\n// CONCATENATED MODULE: ./src/messaging/models/notification-permission.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/* harmony default export */ var notification_permission_defaultExport = ({\n granted: 'granted',\n default: 'default',\n denied: 'denied'\n});\n// CONCATENATED MODULE: ./src/messaging/controllers/controller-interface.ts\n/* harmony import */ var controller_interface___WEBPACK_IMPORTED_MODULE_0__app_errors__ = __webpack_require__(10);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\nvar SENDER_ID_OPTION_NAME = 'messagingSenderId';\nvar controller_interface_ControllerInterface = function () {\n /**\r\n * An interface of the Messaging Service API\r\n * @param {!firebase.app.App} app\r\n */\n function ControllerInterface(app) {\n var _this = this;\n this.errorFactory_ = new controller_interface___WEBPACK_IMPORTED_MODULE_0__app_errors__[\"a\" /* ErrorFactory */]('messaging', 'Messaging', errors_defaultExport.map);\n if (!app.options[SENDER_ID_OPTION_NAME] || typeof app.options[SENDER_ID_OPTION_NAME] !== 'string') {\n throw this.errorFactory_.create(errors_defaultExport.codes.BAD_SENDER_ID);\n }\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n this.tokenManager_ = new token_manager_defaultExport();\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = function () {\n return _this.delete;\n };\n }\n /**\r\n * @export\r\n * @return {Promise | Promise} Returns a promise that\r\n * resolves to an FCM token.\r\n */\n ControllerInterface.prototype.getToken = function () {\n var _this = this;\n // Check with permissions\n var currentPermission = this.getNotificationPermission_();\n if (currentPermission !== notification_permission_defaultExport.granted) {\n if (currentPermission === notification_permission_defaultExport.denied) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.NOTIFICATIONS_BLOCKED));\n }\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n return this.getSWRegistration_().then(function (registration) {\n return _this.tokenManager_.getSavedToken(_this.messagingSenderId_, registration).then(function (token) {\n if (token) {\n return token;\n }\n return _this.tokenManager_.createToken(_this.messagingSenderId_, registration);\n });\n });\n };\n /**\r\n * This method deletes tokens that the token manager looks after and then\r\n * unregisters the push subscription if it exists.\r\n * @export\r\n * @param {string} token\r\n * @return {Promise}\r\n */\n ControllerInterface.prototype.deleteToken = function (token) {\n var _this = this;\n return this.tokenManager_.deleteToken(token).then(function () {\n return _this.getSWRegistration_().then(function (registration) {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n }).then(function (subscription) {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n };\n ControllerInterface.prototype.getSWRegistration_ = function () {\n throw this.errorFactory_.create(errors_defaultExport.codes.SHOULD_BE_INHERITED);\n };\n //\n // The following methods should only be available in the window.\n //\n ControllerInterface.prototype.requestPermission = function () {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n /**\r\n * @export\r\n * @param {!ServiceWorkerRegistration} registration\r\n */\n ControllerInterface.prototype.useServiceWorker = function (registration) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function(*)} nextOrObserver\r\n * @param {function(!Error)=} optError\r\n * @param {function()=} optCompleted\r\n * @return {!function()}\r\n */\n ControllerInterface.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\r\n * or a function triggered on token refresh.\r\n * @param {function(!Error)=} optError Optional A function\r\n * triggered on token refresh error.\r\n * @param {function()=} optCompleted Optional function triggered when the\r\n * observer is removed.\r\n * @return {!function()} The unsubscribe function for the observer.\r\n */\n ControllerInterface.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n //\n // The following methods are used by the service worker only.\n //\n /**\r\n * @export\r\n * @param {function(Object)} callback\r\n */\n ControllerInterface.prototype.setBackgroundMessageHandler = function (callback) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_SW);\n };\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n /**\r\n * This method is required to adhere to the Firebase interface.\r\n * It closes any currently open indexdb database connections.\r\n */\n ControllerInterface.prototype.delete = function () {\n this.tokenManager_.closeDatabase();\n };\n /**\r\n * Returns the current Notification Permission state.\r\n * @private\r\n * @return {string} The currenct permission state.\r\n */\n ControllerInterface.prototype.getNotificationPermission_ = function () {\n return Notification.permission;\n };\n /**\r\n * @protected\r\n * @returns {TokenManager}\r\n */\n ControllerInterface.prototype.getTokenManager = function () {\n return this.tokenManager_;\n };\n return ControllerInterface;\n}();\n/* harmony default export */ var controller_interface_defaultExport = (controller_interface_ControllerInterface);\n// CONCATENATED MODULE: ./src/messaging/models/worker-page-message.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\n\nvar PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nvar msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\nvar createNewMsg = function createNewMsg(msgType, msgData) {\n var message = (_a = {}, _a[PARAMS.TYPE_OF_MSG] = msgType, _a[PARAMS.DATA] = msgData, _a);\n return message;\n var _a;\n};\n/* harmony default export */ var worker_page_message_defaultExport = ({\n PARAMS: PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg: createNewMsg\n});\n// CONCATENATED MODULE: ./src/messaging/models/default-sw.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/* harmony default export */ var default_sw_defaultExport = ({\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n});\n// CONCATENATED MODULE: ./src/messaging/controllers/window-controller.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_subscribe__ = __webpack_require__(13);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\nvar window_controller_WindowController = function (_super) {\n __extends(WindowController, _super);\n /**\r\n * A service that provides a MessagingService instance.\r\n * @param {!firebase.app.App} app\r\n */\n function WindowController(app) {\n var _this = _super.call(this, app) || this;\n /**\r\n * @private\r\n * @type {ServiceWorkerRegistration}\r\n */\n _this.registrationToUse_;\n /**\r\n * @private\r\n * @type {Promise}\r\n */\n _this.manifestCheckPromise_;\n /**\r\n * @private\r\n * @type {firebase.Observer}\r\n */\n _this.messageObserver_ = null;\n /**\r\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\r\n * observer.\r\n */\n _this.onMessage_ = Object(__WEBPACK_IMPORTED_MODULE_5__app_subscribe__[\"a\" /* createSubscribe */])(function (observer) {\n _this.messageObserver_ = observer;\n });\n /**\r\n * @private\r\n * @type {firebase.Observer}\r\n */\n _this.tokenRefreshObserver_ = null;\n _this.onTokenRefresh_ = Object(__WEBPACK_IMPORTED_MODULE_5__app_subscribe__[\"a\" /* createSubscribe */])(function (observer) {\n _this.tokenRefreshObserver_ = observer;\n });\n _this.setupSWMessageListener_();\n return _this;\n }\n /**\r\n * This method returns an FCM token if it can be generated.\r\n * The return promise will reject if the browser doesn't support\r\n * FCM, if permission is denied for notifications or it's not\r\n * possible to generate a token.\r\n * @export\r\n * @return {Promise | Promise} Returns a promise the\r\n * resolves to an FCM token or null if permission isn't granted.\r\n */\n WindowController.prototype.getToken = function () {\n var _this = this;\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.UNSUPPORTED_BROWSER));\n }\n return this.manifestCheck_().then(function () {\n return _super.prototype.getToken.call(_this);\n });\n };\n /**\r\n * The method checks that a manifest is defined and has the correct GCM\r\n * sender ID.\r\n * @private\r\n * @return {Promise} Returns a promise that resolves if the manifest matches\r\n * our required sender ID\r\n */\n WindowController.prototype.manifestCheck_ = function () {\n var _this = this;\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n var manifestTag = document.querySelector('link[rel=\"manifest\"]');\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n } else {\n this.manifestCheckPromise_ = fetch(manifestTag.href).then(function (response) {\n return response.json();\n }).catch(function () {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n }).then(function (manifestContent) {\n if (!manifestContent) {\n return;\n }\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw _this.errorFactory_.create(errors_defaultExport.codes.INCORRECT_GCM_SENDER_ID);\n }\n });\n }\n return this.manifestCheckPromise_;\n };\n /**\r\n * Request permission if it is not currently granted\r\n * @export\r\n * @returns {Promise} Resolves if the permission was granted, otherwise\r\n * rejects\r\n */\n WindowController.prototype.requestPermission = function () {\n var _this = this;\n if (Notification.permission === notification_permission_defaultExport.granted) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var managePermissionResult = function managePermissionResult(result) {\n if (result === notification_permission_defaultExport.granted) {\n return resolve();\n } else if (result === notification_permission_defaultExport.denied) {\n return reject(_this.errorFactory_.create(errors_defaultExport.codes.PERMISSION_BLOCKED));\n } else {\n return reject(_this.errorFactory_.create(errors_defaultExport.codes.PERMISSION_DEFAULT));\n }\n };\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n var permissionPromise = Notification.requestPermission(function (result) {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n managePermissionResult(result);\n });\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n };\n /**\r\n * This method allows a developer to override the default service worker and\r\n * instead use a custom service worker.\r\n * @export\r\n * @param {!ServiceWorkerRegistration} registration The service worker\r\n * registration that should be used to receive the push messages.\r\n */\n WindowController.prototype.useServiceWorker = function (registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(errors_defaultExport.codes.SW_REGISTRATION_EXPECTED);\n }\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(errors_defaultExport.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n this.registrationToUse_ = registration;\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\r\n * or a function triggered on message.\r\n * @param {function(!Error)=} optError Optional A function triggered on\r\n * message error.\r\n * @param {function()=} optCompleted Optional function triggered when the\r\n * observer is removed.\r\n * @return {!function()} The unsubscribe function for the observer.\r\n */\n WindowController.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\r\n * or a function triggered on token refresh.\r\n * @param {function(!Error)=} optError Optional A function\r\n * triggered on token refresh error.\r\n * @param {function()=} optCompleted Optional function triggered when the\r\n * observer is removed.\r\n * @return {!function()} The unsubscribe function for the observer.\r\n */\n WindowController.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n };\n /**\r\n * Given a registration, wait for the service worker it relates to\r\n * become activer\r\n * @private\r\n * @param {ServiceWorkerRegistration} registration Registration to wait\r\n * for service worker to become active\r\n * @return {Promise} Wait for service worker\r\n * registration to become active\r\n */\n WindowController.prototype.waitForRegistrationToActivate_ = function (registration) {\n var _this = this;\n var serviceWorker = registration.installing || registration.waiting || registration.active;\n return new Promise(function (resolve, reject) {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(_this.errorFactory_.create(errors_defaultExport.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors_defaultExport.codes.SW_REG_REDUNDANT));\n return;\n }\n var stateChangeListener = function stateChangeListener() {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n } else if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors_defaultExport.codes.SW_REG_REDUNDANT));\n } else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n };\n /**\r\n * This will regiater the default service worker and return the registration\r\n * @private\r\n * @return {Promise} The service worker\r\n * registration to be used for the push service.\r\n */\n WindowController.prototype.getSWRegistration_ = function () {\n var _this = this;\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n return navigator.serviceWorker.register(default_sw_defaultExport.path, {\n scope: default_sw_defaultExport.scope\n }).catch(function (err) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.FAILED_DEFAULT_REGISTRATION, {\n browserErrorMessage: err.message\n });\n }).then(function (registration) {\n return _this.waitForRegistrationToActivate_(registration).then(function () {\n _this.registrationToUse_ = registration;\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n return registration;\n });\n });\n };\n /**\r\n * This method will set up a message listener to handle\r\n * events from the service worker that should trigger\r\n * events in the page.\r\n *\r\n * @private\r\n */\n WindowController.prototype.setupSWMessageListener_ = function () {\n var _this = this;\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('message', function (event) {\n if (!event.data || !event.data[worker_page_message_defaultExport.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n var workerPageMessage = event.data;\n switch (workerPageMessage[worker_page_message_defaultExport.PARAMS.TYPE_OF_MSG]) {\n case worker_page_message_defaultExport.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case worker_page_message_defaultExport.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n var pushMessage = workerPageMessage[worker_page_message_defaultExport.PARAMS.DATA];\n _this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n }, false);\n };\n /**\r\n * Checks to see if the required API's are valid or not.\r\n * @private\r\n * @return {boolean} Returns true if the desired APIs are available.\r\n */\n WindowController.prototype.isSupported_ = function () {\n return 'serviceWorker' in navigator && 'PushManager' in window && 'Notification' in window && 'fetch' in window && ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') && PushSubscription.prototype.hasOwnProperty('getKey');\n };\n return WindowController;\n}(controller_interface_defaultExport);\n/* harmony default export */ var window_controller_defaultExport = (window_controller_WindowController);\n// CONCATENATED MODULE: ./src/messaging/controllers/sw-controller.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar sw_controller___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\nvar FCM_MSG = 'FCM_MSG';\nvar sw_controller_SWController = function (_super) {\n sw_controller___extends(SWController, _super);\n function SWController(app) {\n var _this = _super.call(this, app) || this;\n self.addEventListener('push', function (e) {\n return _this.onPush_(e);\n }, false);\n self.addEventListener('pushsubscriptionchange', function (e) {\n return _this.onSubChange_(e);\n }, false);\n self.addEventListener('notificationclick', function (e) {\n return _this.onNotificationClick_(e);\n }, false);\n /**\r\n * @private\r\n * @type {function(Object)|null}\r\n */\n _this.bgMessageHandler_ = null;\n return _this;\n }\n /**\r\n * A handler for push events that shows notifications based on the content of\r\n * the payload.\r\n *\r\n * The payload must be a JSON-encoded Object with a `notification` key. The\r\n * value of the `notification` property will be used as the NotificationOptions\r\n * object passed to showNotification. Additionally, the `title` property of the\r\n * notification object will be used as the title.\r\n *\r\n * If there is no notification data in the payload then no notification will be\r\n * shown.\r\n * @private\r\n */\n SWController.prototype.onPush_ = function (event) {\n var _this = this;\n var msgPayload;\n try {\n msgPayload = event.data.json();\n } catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n var handleMsgPromise = this.hasVisibleClients_().then(function (hasVisibleClients) {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || _this.bgMessageHandler_) {\n // Send to page\n return _this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n var notificationDetails = _this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n var notificationTitle = notificationDetails.title || '';\n return self.registration.showNotification(notificationTitle, notificationDetails);\n } else if (_this.bgMessageHandler_) {\n return _this.bgMessageHandler_(msgPayload);\n }\n });\n event.waitUntil(handleMsgPromise);\n };\n /**\r\n * @private\r\n */\n SWController.prototype.onSubChange_ = function (event) {\n var _this = this;\n var promiseChain = this.getToken().then(function (token) {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw _this.errorFactory_.create(errors_defaultExport.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);\n }\n var tokenDetails = null;\n var tokenManager = _this.getTokenManager();\n return tokenManager.getTokenDetailsFromToken(token).then(function (details) {\n tokenDetails = details;\n if (!tokenDetails) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.INVALID_SAVED_TOKEN);\n }\n // Attempt to get a new subscription\n return self.registration.pushManager.subscribe(fcm_details_defaultExport.SUBSCRIPTION_OPTIONS);\n }).then(function (newSubscription) {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(tokenDetails.fcmSenderId, newSubscription, tokenDetails.fcmPushSet);\n }).catch(function (err) {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(function () {\n throw _this.errorFactory_.create(errors_defaultExport.codes.UNABLE_TO_RESUBSCRIBE, {\n message: err\n });\n });\n });\n });\n event.waitUntil(promiseChain);\n };\n /**\r\n * @private\r\n */\n SWController.prototype.onNotificationClick_ = function (event) {\n var _this = this;\n if (!(event.notification && event.notification.data && event.notification.data[FCM_MSG])) {\n // Not an FCM notification, do nothing.\n return;\n }\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n event.notification.close();\n var msgPayload = event.notification.data[FCM_MSG];\n var clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n var promiseChain = this.getWindowClient_(clickAction).then(function (windowClient) {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return self.clients.openWindow(clickAction);\n }\n return windowClient;\n }).then(function (windowClient) {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n // Delete notification data from payload before sending to the page.\n var notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n var internalMsg = worker_page_message_defaultExport.createNewMsg(worker_page_message_defaultExport.TYPES_OF_MSG.NOTIFICATION_CLICKED, msgPayload);\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return _this.attemptToMessageClient_(windowClient, internalMsg);\n });\n event.waitUntil(promiseChain);\n };\n /**\r\n * @private\r\n * @param {Object} msgPayload\r\n * @return {NotificationOptions|undefined}\r\n */\n SWController.prototype.getNotificationData_ = function (msgPayload) {\n if (!msgPayload) {\n return;\n }\n if (_typeof(msgPayload.notification) !== 'object') {\n return;\n }\n var notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = (_a = {}, _a[FCM_MSG] = msgPayload, _a);\n return notificationInformation;\n var _a;\n };\n /**\r\n * Calling setBackgroundMessageHandler will opt in to some specific\r\n * behaviours.\r\n * 1.) If a notification doesn't need to be shown due to a window already\r\n * being visible, then push messages will be sent to the page.\r\n * 2.) If a notification needs to be shown, and the message contains no\r\n * notification data this method will be called\r\n * and the promise it returns will be passed to event.waitUntil.\r\n * If you do not set this callback then all push messages will let and the\r\n * developer can handle them in a their own 'push' event callback\r\n * @export\r\n * @param {function(Object)} callback The callback to be called when a push\r\n * message is received and a notification must be shown. The callback will\r\n * be given the data from the push message.\r\n */\n SWController.prototype.setBackgroundMessageHandler = function (callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(errors_defaultExport.codes.BG_HANDLER_FUNCTION_EXPECTED);\n }\n this.bgMessageHandler_ = callback;\n };\n /**\r\n * @private\r\n * @param {string} url The URL to look for when focusing a client.\r\n * @return {Object} Returns an existing window client or a newly opened\r\n * WindowClient.\r\n */\n SWController.prototype.getWindowClient_ = function (url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n var parsedURL = new URL(url).href;\n return self.clients.matchAll({\n type: 'window',\n includeUncontrolled: true\n }).then(function (clientList) {\n var suitableClient = null;\n for (var i = 0; i < clientList.length; i++) {\n var parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n };\n /**\r\n * This message will attempt to send the message to a window client.\r\n * @private\r\n * @param {Object} client The WindowClient to send the message to.\r\n * @param {Object} message The message to send to the client.\r\n * @returns {Promise} Returns a promise that resolves after sending the\r\n * message. This does not guarantee that the message was successfully\r\n * received.\r\n */\n SWController.prototype.attemptToMessageClient_ = function (client, message) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!client) {\n return reject(_this.errorFactory_.create(errors_defaultExport.codes.NO_WINDOW_CLIENT_TO_MSG));\n }\n client.postMessage(message);\n resolve();\n });\n };\n /**\r\n * @private\r\n * @returns {Promise} If there is currently a visible WindowClient,\r\n * this method will resolve to true, otherwise false.\r\n */\n SWController.prototype.hasVisibleClients_ = function () {\n return self.clients.matchAll({\n type: 'window',\n includeUncontrolled: true\n }).then(function (clientList) {\n return clientList.some(function (client) {\n return client.visibilityState === 'visible';\n });\n });\n };\n /**\r\n * @private\r\n * @param {Object} msgPayload The data from the push event that should be sent\r\n * to all available pages.\r\n * @returns {Promise} Returns a promise that resolves once the message\r\n * has been sent to all WindowClients.\r\n */\n SWController.prototype.sendMessageToWindowClients_ = function (msgPayload) {\n var _this = this;\n return self.clients.matchAll({\n type: 'window',\n includeUncontrolled: true\n }).then(function (clientList) {\n var internalMsg = worker_page_message_defaultExport.createNewMsg(worker_page_message_defaultExport.TYPES_OF_MSG.PUSH_MSG_RECEIVED, msgPayload);\n return Promise.all(clientList.map(function (client) {\n return _this.attemptToMessageClient_(client, internalMsg);\n }));\n });\n };\n /**\r\n * This will register the default service worker and return the registration.\r\n * @private\r\n * @return {Promise} The service worker\r\n * registration to be used for the push service.\r\n */\n SWController.prototype.getSWRegistration_ = function () {\n return Promise.resolve(self.registration);\n };\n return SWController;\n}(controller_interface_defaultExport);\n/* harmony default export */ var sw_controller_defaultExport = (sw_controller_SWController);\n// CONCATENATED MODULE: ./src/messaging.ts\n/* harmony export (immutable) */ __webpack_exports__[\"registerMessaging\"] = registerMessaging;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app__ = __webpack_require__(5);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\nfunction registerMessaging(instance) {\n var messagingName = 'messaging';\n var factoryMethod = function factoryMethod(app) {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new sw_controller_defaultExport(app);\n }\n // Assume we are in the window context.\n return new window_controller_defaultExport(app);\n };\n var namespaceExports = {\n // no-inline\n Messaging: window_controller_defaultExport\n };\n instance.INTERNAL.registerService(messagingName, factoryMethod, namespaceExports);\n}\nregisterMessaging(__WEBPACK_IMPORTED_MODULE_2__app__[\"default\"]);\n\n/***/ })\n\n},[24]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-messaging.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-messaging.js","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nfunction toBase64(arrayBuffer) {\n const uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\n\nexport default arrayBuffer => {\n const base64String = toBase64(arrayBuffer);\n return base64String.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/helpers/array-buffer-to-base64.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport WindowController from './messaging/controllers/window-controller';\nimport SWController from './messaging/controllers/sw-controller';\nimport firebase from './app';\n\nexport function registerMessaging(instance) {\n const messagingName = 'messaging';\n const factoryMethod = app => {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new SWController(app);\n }\n\n // Assume we are in the window context.\n return new WindowController(app);\n };\n\n const namespaceExports = {\n // no-inline\n Messaging: WindowController\n };\n\n instance.INTERNAL.registerService(\n messagingName,\n factoryMethod,\n namespaceExports\n );\n}\n\nregisterMessaging(firebase);\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nconst CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\n\nconst ERROR_MAP = {\n [CODES.AVAILABLE_IN_WINDOW]: 'This method is available in a Window context.',\n [CODES.AVAILABLE_IN_SW]:\n 'This method is available in a service worker ' + 'context.',\n [CODES.SHOULD_BE_INHERITED]:\n 'This method should be overriden by ' + 'extended classes.',\n [CODES.BAD_SENDER_ID]:\n \"Please ensure that 'messagingSenderId' is set \" +\n 'correctly in the options passed into firebase.initializeApp().',\n [CODES.PERMISSION_DEFAULT]:\n 'The required permissions were not granted and ' + 'dismissed instead.',\n [CODES.PERMISSION_BLOCKED]:\n 'The required permissions were not granted and ' + 'blocked instead.',\n [CODES.UNSUPPORTED_BROWSER]:\n \"This browser doesn't support the API's \" +\n 'required to use the firebase SDK.',\n [CODES.NOTIFICATIONS_BLOCKED]: 'Notifications have been blocked.',\n [CODES.FAILED_DEFAULT_REGISTRATION]:\n 'We are unable to register the ' +\n 'default service worker. {$browserErrorMessage}',\n [CODES.SW_REGISTRATION_EXPECTED]:\n 'A service worker registration was the ' + 'expected input.',\n [CODES.GET_SUBSCRIPTION_FAILED]:\n 'There was an error when trying to get ' +\n 'any existing Push Subscriptions.',\n [CODES.INVALID_SAVED_TOKEN]: 'Unable to access details of the saved token.',\n [CODES.SW_REG_REDUNDANT]:\n 'The service worker being used for push was made ' + 'redundant.',\n [CODES.TOKEN_SUBSCRIBE_FAILED]:\n 'A problem occured while subscribing the ' + 'user to FCM: {$message}',\n [CODES.TOKEN_SUBSCRIBE_NO_TOKEN]:\n 'FCM returned no token when subscribing ' + 'the user to push.',\n [CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET]:\n 'FCM returned an invalid response ' + 'when getting an FCM token.',\n [CODES.USE_SW_BEFORE_GET_TOKEN]:\n 'You must call useServiceWorker() before ' +\n 'calling getToken() to ensure your service worker is used.',\n [CODES.INVALID_DELETE_TOKEN]:\n 'You must pass a valid token into ' +\n 'deleteToken(), i.e. the token from getToken().',\n [CODES.DELETE_TOKEN_NOT_FOUND]:\n 'The deletion attempt for token could not ' +\n 'be performed as the token was not found.',\n [CODES.DELETE_SCOPE_NOT_FOUND]:\n 'The deletion attempt for service worker ' +\n 'scope could not be performed as the scope was not found.',\n [CODES.BG_HANDLER_FUNCTION_EXPECTED]:\n 'The input to ' + 'setBackgroundMessageHandler() must be a function.',\n [CODES.NO_WINDOW_CLIENT_TO_MSG]:\n 'An attempt was made to message a ' + 'non-existant window client.',\n [CODES.UNABLE_TO_RESUBSCRIBE]:\n 'There was an error while re-subscribing ' +\n 'the FCM token for push messaging. Will have to resubscribe the ' +\n 'user on next visit. {$message}',\n [CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE]:\n 'Could not find an FCM token ' +\n 'and as a result, unable to resubscribe. Will have to resubscribe the ' +\n 'user on next visit.',\n [CODES.FAILED_TO_DELETE_TOKEN]: 'Unable to delete the currently saved token.',\n [CODES.NO_SW_IN_REG]:\n 'Even though the service worker registration was ' +\n 'successful, there was a problem accessing the service worker itself.',\n [CODES.INCORRECT_GCM_SENDER_ID]:\n \"Please change your web app manifest's \" +\n \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\",\n [CODES.BAD_SCOPE]:\n 'The service worker scope must be a string with at ' +\n 'least one character.',\n [CODES.BAD_VAPID_KEY]:\n 'The public VAPID key must be a string with at ' + 'least one character.',\n [CODES.BAD_SUBSCRIPTION]:\n 'The subscription must be a valid ' + 'PushSubscription.',\n [CODES.BAD_TOKEN]:\n 'The FCM Token used for storage / lookup was not ' +\n 'a valid token string.',\n [CODES.BAD_PUSH_SET]:\n 'The FCM push set used for storage / lookup was not ' +\n 'not a valid push set string.',\n [CODES.FAILED_DELETE_VAPID_KEY]: 'The VAPID key could not be deleted.'\n};\n\nexport default {\n codes: CODES,\n map: ERROR_MAP\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/errors.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nconst FCM_APPLICATION_SERVER_KEY = [\n 0x04,\n 0x33,\n 0x94,\n 0xf7,\n 0xdf,\n 0xa1,\n 0xeb,\n 0xb1,\n 0xdc,\n 0x03,\n 0xa2,\n 0x5e,\n 0x15,\n 0x71,\n 0xdb,\n 0x48,\n 0xd3,\n 0x2e,\n 0xed,\n 0xed,\n 0xb2,\n 0x34,\n 0xdb,\n 0xb7,\n 0x47,\n 0x3a,\n 0x0c,\n 0x8f,\n 0xc4,\n 0xcc,\n 0xe1,\n 0x6f,\n 0x3c,\n 0x8c,\n 0x84,\n 0xdf,\n 0xab,\n 0xb6,\n 0x66,\n 0x3e,\n 0xf2,\n 0x0c,\n 0xd4,\n 0x8b,\n 0xfe,\n 0xe3,\n 0xf9,\n 0x76,\n 0x2f,\n 0x14,\n 0x1c,\n 0x63,\n 0x08,\n 0x6a,\n 0x6f,\n 0x2d,\n 0xb1,\n 0x1a,\n 0x95,\n 0xb0,\n 0xce,\n 0x37,\n 0xc0,\n 0x9c,\n 0x6e\n];\n\nconst SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\n\nexport default {\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/fcm-details.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport { ErrorFactory } from '../../app/errors';\n\nimport Errors from './errors';\nimport arrayBufferToBase64 from '../helpers/array-buffer-to-base64';\nimport FCMDetails from './fcm-details';\n\nconst FCM_TOKEN_DETAILS_DB = 'fcm_token_details_db';\nconst FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nconst FCM_TOKEN_DETAILS_DB_VERSION = 1;\n\nexport default class TokenManager {\n private errorFactory_: ErrorFactory;\n private openDbPromise_: Promise;\n\n constructor() {\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n this.openDbPromise_ = null;\n }\n\n /**\n * Get the indexedDB as a promsie.\n * @private\n * @return {Promise} The IndexedDB database\n */\n openDatabase_() {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n\n this.openDbPromise_ = new Promise((resolve, reject) => {\n const request = indexedDB.open(\n FCM_TOKEN_DETAILS_DB,\n FCM_TOKEN_DETAILS_DB_VERSION\n );\n request.onerror = event => {\n reject((event.target).error);\n };\n request.onsuccess = event => {\n resolve((event.target).result);\n };\n request.onupgradeneeded = event => {\n var db = (event.target).result;\n\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n\n return this.openDbPromise_;\n }\n\n /**\n * Close the currently open database.\n * @return {Promise} Returns the result of the promise chain.\n */\n closeDatabase() {\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(db => {\n db.close();\n this.openDbPromise_ = null;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Given a token, this method will look up the details in indexedDB.\n * @public\n * @param {string} fcmToken\n * @return {Promise} The details associated with that token.\n */\n getTokenDetailsFromToken(fcmToken) {\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const index = objectStore.index('fcmToken');\n const request = index.get(fcmToken);\n request.onerror = function(event) {\n reject((event.target).error);\n };\n request.onsuccess = function(event) {\n resolve((event.target).result);\n };\n });\n });\n }\n\n getTokenDetailsFromSWScope_(swScope) {\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = event => {\n reject((event.target).error);\n };\n\n scopeRequest.onsuccess = event => {\n resolve((event.target).result);\n };\n });\n });\n }\n\n getAllTokenDetailsForSenderId_(senderId): Promise> {\n return this.openDatabase_().then(db => {\n return new Promise>((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n\n const senderIdTokens = [];\n\n const cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = event => {\n reject((event.target).error);\n };\n\n cursorRequest.onsuccess = event => {\n const cursor = (event.target).result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n } else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n }\n\n /**\n * Given a PushSubscription and messagingSenderId, get an FCM token.\n * @public\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\n * @param {string=} pushSet If defined this will swap the subscription for\n * matching FCM token.\n * @return {Promise} Returns the FCM token to be used in place\n * of the PushSubscription.\n */\n subscribeToFCM(senderId, subscription, pushSet?): Promise {\n const p256dh = arrayBufferToBase64(subscription['getKey']('p256dh'));\n const auth = arrayBufferToBase64(subscription['getKey']('auth'));\n\n let fcmSubscribeBody =\n `authorized_entity=${senderId}&` +\n `endpoint=${subscription.endpoint}&` +\n `encryption_key=${p256dh}&` +\n `encryption_auth=${auth}`;\n\n if (pushSet) {\n fcmSubscribeBody += `&pushSet=${pushSet}`;\n }\n\n const headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n\n const subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n\n return fetch(\n FCMDetails.ENDPOINT + '/fcm/connect/subscribe',\n subscribeOptions\n )\n .then(response => response.json())\n .then(response => {\n const fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n const message = fcmTokenResponse['error']['message'];\n throw this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n\n if (!fcmTokenResponse['token']) {\n throw this.errorFactory_.create(\n Errors.codes.TOKEN_SUBSCRIBE_NO_TOKEN\n );\n }\n\n if (!fcmTokenResponse['pushSet']) {\n throw this.errorFactory_.create(\n Errors.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET\n );\n }\n\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n }\n\n /**\n * Checks the that fields in the PushSubscription are equivalent to the\n * details stores in the masterTokenDetails.\n * @private\n * @param {PushSubscription} subscription The push subscription we expect\n * the master token to match.\n * @param {Object} masterTokenDetails The saved details we wish to compare\n * with the PushSubscription\n * @return {boolean} true if the subscription and token details are\n * equivalent.\n */\n isSameSubscription_(subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return (\n subscription.endpoint === masterTokenDetails['endpoint'] &&\n arrayBufferToBase64(subscription['getKey']('auth')) ===\n masterTokenDetails['auth'] &&\n arrayBufferToBase64(subscription['getKey']('p256dh')) ===\n masterTokenDetails['p256dh']\n );\n }\n\n /**\n * Save the details for the fcm token for re-use at a later date.\n * @private\n * @param {string} senderId The 'messagingSenderId' used for this project\n * @param {ServiceWorkerRegistration} swRegistration The service worker\n * used to subscribe the user for web push\n * @param {PushSubscription} subscription The push subscription passed to\n * FCM for the current token.\n * @param {string} fcmToken The FCM token currently used on this\n * device.\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\n * @return {Promise}\n */\n saveTokenDetails_(\n senderId,\n swRegistration,\n subscription,\n fcmToken,\n fcmPushSet\n ) {\n const details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: arrayBufferToBase64(subscription['getKey']('auth')),\n p256dh: arrayBufferToBase64(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const request = objectStore.put(details);\n request.onerror = event => {\n reject((event.target).error);\n };\n request.onsuccess = event => {\n resolve();\n };\n });\n });\n }\n\n /**\n * Returns the saved FCM Token if one is available and still valid,\n * otherwise `null` is returned.\n * @param {string} senderId This should be the sender ID associated with the\n * FCM Token being retrieved.\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\n * to subscribe the user to push.\n * @return {Promise | Promise} Returns the saved FCM Token if\n * avilable and valid.\n * @export\n */\n getSavedToken(senderId, swRegistration) {\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED)\n );\n }\n\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.BAD_SENDER_ID)\n );\n }\n\n return this.getAllTokenDetailsForSenderId_(senderId)\n .then(allTokenDetails => {\n if (allTokenDetails.length === 0) {\n return;\n }\n\n const index = allTokenDetails.findIndex(tokenDetails => {\n return (\n swRegistration.scope === tokenDetails['swScope'] &&\n senderId === tokenDetails['fcmSenderId']\n );\n });\n\n if (index === -1) {\n return;\n }\n\n return allTokenDetails[index];\n })\n .then(tokenDetails => {\n if (!tokenDetails) {\n return;\n }\n\n return swRegistration.pushManager\n .getSubscription()\n .catch(err => {\n throw this.errorFactory_.create(\n Errors.codes.GET_SUBSCRIPTION_FAILED\n );\n })\n .then(subscription => {\n if (\n subscription &&\n this.isSameSubscription_(subscription, tokenDetails)\n ) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n }\n\n /**\n * Creates a new FCM token.\n */\n createToken(senderId, swRegistration): Promise {\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.BAD_SENDER_ID)\n );\n }\n\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED)\n );\n }\n\n // Check for existing subscription first\n let subscription;\n let fcmTokenDetails;\n return swRegistration.pushManager\n .getSubscription()\n .then(subscription => {\n if (subscription) {\n return subscription;\n }\n\n return swRegistration.pushManager.subscribe(\n FCMDetails.SUBSCRIPTION_OPTIONS\n );\n })\n .then(sub => {\n subscription = sub;\n return this.subscribeToFCM(senderId, subscription);\n })\n .then(tokenDetails => {\n fcmTokenDetails = tokenDetails;\n return this.saveTokenDetails_(\n senderId,\n swRegistration,\n subscription,\n fcmTokenDetails['token'],\n fcmTokenDetails['pushSet']\n );\n })\n .then(() => fcmTokenDetails['token']);\n }\n\n /**\n * This method deletes details of the current FCM token.\n * It's returning a promise in case we need to move to an async\n * method for deleting at a later date.\n * @param {string} token Token to be deleted\n * @return {Promise} Resolves once the FCM token details have been\n * deleted and returns the deleted details.\n */\n deleteToken(token) {\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.INVALID_DELETE_TOKEN)\n );\n }\n\n return this.getTokenDetailsFromToken(token).then(details => {\n if (!details) {\n throw this.errorFactory_.create(Errors.codes.DELETE_TOKEN_NOT_FOUND);\n }\n\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction(\n [FCM_TOKEN_OBJ_STORE],\n 'readwrite'\n );\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const request = objectStore.delete(details['swScope']);\n request.onerror = event => {\n reject((event.target).error);\n };\n request.onsuccess = event => {\n if ((event.target).result === 0) {\n reject(\n this.errorFactory_.create(Errors.codes.FAILED_TO_DELETE_TOKEN)\n );\n return;\n }\n\n resolve(details);\n };\n });\n });\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/token-manager.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport { ErrorFactory } from '../../app/errors';\nimport Errors from '../models/errors';\nimport TokenManager from '../models/token-manager';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\n\nconst SENDER_ID_OPTION_NAME = 'messagingSenderId';\n\nexport default class ControllerInterface {\n public app;\n public INTERNAL;\n protected errorFactory_;\n private messagingSenderId_: string;\n private tokenManager_: TokenManager;\n\n /**\n * An interface of the Messaging Service API\n * @param {!firebase.app.App} app\n */\n constructor(app) {\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n\n if (\n !app.options[SENDER_ID_OPTION_NAME] ||\n typeof app.options[SENDER_ID_OPTION_NAME] !== 'string'\n ) {\n throw this.errorFactory_.create(Errors.codes.BAD_SENDER_ID);\n }\n\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n\n this.tokenManager_ = new TokenManager();\n\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = () => this.delete;\n }\n\n /**\n * @export\n * @return {Promise | Promise} Returns a promise that\n * resolves to an FCM token.\n */\n getToken() {\n // Check with permissions\n const currentPermission = this.getNotificationPermission_();\n if (currentPermission !== NOTIFICATION_PERMISSION.granted) {\n if (currentPermission === NOTIFICATION_PERMISSION.denied) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.NOTIFICATIONS_BLOCKED)\n );\n }\n\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n\n return this.getSWRegistration_().then(registration => {\n return this.tokenManager_\n .getSavedToken(this.messagingSenderId_, registration)\n .then(token => {\n if (token) {\n return token;\n }\n\n return this.tokenManager_.createToken(\n this.messagingSenderId_,\n registration\n );\n });\n });\n }\n\n /**\n * This method deletes tokens that the token manager looks after and then\n * unregisters the push subscription if it exists.\n * @export\n * @param {string} token\n * @return {Promise}\n */\n deleteToken(token) {\n return this.tokenManager_.deleteToken(token).then(() => {\n return this.getSWRegistration_()\n .then(registration => {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n })\n .then(subscription => {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n }\n\n getSWRegistration_(): Promise {\n throw this.errorFactory_.create(Errors.codes.SHOULD_BE_INHERITED);\n }\n\n //\n // The following methods should only be available in the window.\n //\n\n requestPermission() {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n /**\n * @export\n * @param {!ServiceWorkerRegistration} registration\n */\n useServiceWorker(registration) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver\n * @param {function(!Error)=} optError\n * @param {function()=} optCompleted\n * @return {!function()}\n */\n onMessage(nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n onTokenRefresh(nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n //\n // The following methods are used by the service worker only.\n //\n\n /**\n * @export\n * @param {function(Object)} callback\n */\n setBackgroundMessageHandler(callback) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_SW);\n }\n\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n\n /**\n * This method is required to adhere to the Firebase interface.\n * It closes any currently open indexdb database connections.\n */\n delete() {\n this.tokenManager_.closeDatabase();\n }\n\n /**\n * Returns the current Notification Permission state.\n * @private\n * @return {string} The currenct permission state.\n */\n getNotificationPermission_() {\n return (Notification as any).permission;\n }\n\n /**\n * @protected\n * @returns {TokenManager}\n */\n getTokenManager() {\n return this.tokenManager_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/controllers/controller-interface.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\nconst PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nconst msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\n\nconst createNewMsg = (msgType, msgData) => {\n const message = {\n [PARAMS.TYPE_OF_MSG]: msgType,\n [PARAMS.DATA]: msgData\n };\n return message;\n};\n\nexport default {\n PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/worker-page-message.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nexport default {\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/default-sw.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport DefaultSW from '../models/default-sw';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\nimport { createSubscribe } from '../../app/subscribe';\n\ndeclare const firebase: any;\n\nexport default class WindowController extends ControllerInterface {\n private registrationToUse_;\n private manifestCheckPromise_;\n private messageObserver_;\n private onMessage_;\n private tokenRefreshObserver_;\n private onTokenRefresh_;\n\n /**\n * A service that provides a MessagingService instance.\n * @param {!firebase.app.App} app\n */\n constructor(app) {\n super(app);\n\n /**\n * @private\n * @type {ServiceWorkerRegistration}\n */\n this.registrationToUse_;\n\n /**\n * @private\n * @type {Promise}\n */\n this.manifestCheckPromise_;\n\n /**\n * @private\n * @type {firebase.Observer}\n */\n this.messageObserver_ = null;\n /**\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\n * observer.\n */\n this.onMessage_ = createSubscribe(observer => {\n this.messageObserver_ = observer;\n });\n\n /**\n * @private\n * @type {firebase.Observer}\n */\n this.tokenRefreshObserver_ = null;\n this.onTokenRefresh_ = createSubscribe(observer => {\n this.tokenRefreshObserver_ = observer;\n });\n\n this.setupSWMessageListener_();\n }\n\n /**\n * This method returns an FCM token if it can be generated.\n * The return promise will reject if the browser doesn't support\n * FCM, if permission is denied for notifications or it's not\n * possible to generate a token.\n * @export\n * @return {Promise | Promise} Returns a promise the\n * resolves to an FCM token or null if permission isn't granted.\n */\n getToken() {\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.UNSUPPORTED_BROWSER)\n );\n }\n\n return this.manifestCheck_().then(() => {\n return super.getToken();\n });\n }\n\n /**\n * The method checks that a manifest is defined and has the correct GCM\n * sender ID.\n * @private\n * @return {Promise} Returns a promise that resolves if the manifest matches\n * our required sender ID\n */\n manifestCheck_() {\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n\n const manifestTag = document.querySelector(\n 'link[rel=\"manifest\"]'\n );\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n } else {\n this.manifestCheckPromise_ = fetch(manifestTag.href)\n .then(response => {\n return response.json();\n })\n .catch(() => {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n })\n .then(manifestContent => {\n if (!manifestContent) {\n return;\n }\n\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw this.errorFactory_.create(\n Errors.codes.INCORRECT_GCM_SENDER_ID\n );\n }\n });\n }\n\n return this.manifestCheckPromise_;\n }\n\n /**\n * Request permission if it is not currently granted\n * @export\n * @returns {Promise} Resolves if the permission was granted, otherwise\n * rejects\n */\n requestPermission() {\n if ((Notification as any).permission === NOTIFICATION_PERMISSION.granted) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n const managePermissionResult = result => {\n if (result === NOTIFICATION_PERMISSION.granted) {\n return resolve();\n } else if (result === NOTIFICATION_PERMISSION.denied) {\n return reject(\n this.errorFactory_.create(Errors.codes.PERMISSION_BLOCKED)\n );\n } else {\n return reject(\n this.errorFactory_.create(Errors.codes.PERMISSION_DEFAULT)\n );\n }\n };\n\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n const permissionPromise = Notification.requestPermission(result => {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n\n managePermissionResult(result);\n });\n\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n }\n\n /**\n * This method allows a developer to override the default service worker and\n * instead use a custom service worker.\n * @export\n * @param {!ServiceWorkerRegistration} registration The service worker\n * registration that should be used to receive the push messages.\n */\n useServiceWorker(registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED);\n }\n\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(Errors.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n\n this.registrationToUse_ = registration;\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\n * or a function triggered on message.\n * @param {function(!Error)=} optError Optional A function triggered on\n * message error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n onMessage(nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n onTokenRefresh(nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n }\n\n /**\n * Given a registration, wait for the service worker it relates to\n * become activer\n * @private\n * @param {ServiceWorkerRegistration} registration Registration to wait\n * for service worker to become active\n * @return {Promise} Wait for service worker\n * registration to become active\n */\n waitForRegistrationToActivate_(registration) {\n const serviceWorker =\n registration.installing || registration.waiting || registration.active;\n\n return new Promise((resolve, reject) => {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(this.errorFactory_.create(Errors.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n\n if (serviceWorker.state === 'redundant') {\n reject(this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n return;\n }\n\n let stateChangeListener = () => {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n } else if (serviceWorker.state === 'redundant') {\n reject(this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n } else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n }\n\n /**\n * This will regiater the default service worker and return the registration\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n getSWRegistration_() {\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n\n return navigator.serviceWorker\n .register(DefaultSW.path, {\n scope: DefaultSW.scope\n })\n .catch(err => {\n throw this.errorFactory_.create(\n Errors.codes.FAILED_DEFAULT_REGISTRATION,\n {\n browserErrorMessage: err.message\n }\n );\n })\n .then(registration => {\n return this.waitForRegistrationToActivate_(registration).then(() => {\n this.registrationToUse_ = registration;\n\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n\n return registration;\n });\n });\n }\n\n /**\n * This method will set up a message listener to handle\n * events from the service worker that should trigger\n * events in the page.\n *\n * @private\n */\n setupSWMessageListener_() {\n if (!('serviceWorker' in navigator)) {\n return;\n }\n\n navigator.serviceWorker.addEventListener(\n 'message',\n event => {\n if (!event.data || !event.data[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n\n const workerPageMessage = event.data;\n switch (workerPageMessage[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n case WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n const pushMessage =\n workerPageMessage[WorkerPageMessage.PARAMS.DATA];\n this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n },\n false\n );\n }\n\n /**\n * Checks to see if the required API's are valid or not.\n * @private\n * @return {boolean} Returns true if the desired APIs are available.\n */\n isSupported_() {\n return (\n 'serviceWorker' in navigator &&\n 'PushManager' in window &&\n 'Notification' in window &&\n 'fetch' in window &&\n ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') &&\n PushSubscription.prototype.hasOwnProperty('getKey')\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/controllers/window-controller.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport FCMDetails from '../models/fcm-details';\n\nconst FCM_MSG = 'FCM_MSG';\n\nexport default class SWController extends ControllerInterface {\n private bgMessageHandler_: (input: Object) => Promise;\n\n constructor(app) {\n super(app);\n\n self.addEventListener('push', e => this.onPush_(e), false);\n self.addEventListener(\n 'pushsubscriptionchange',\n e => this.onSubChange_(e),\n false\n );\n self.addEventListener(\n 'notificationclick',\n e => this.onNotificationClick_(e),\n false\n );\n\n /**\n * @private\n * @type {function(Object)|null}\n */\n this.bgMessageHandler_ = null;\n }\n\n /**\n * A handler for push events that shows notifications based on the content of\n * the payload.\n *\n * The payload must be a JSON-encoded Object with a `notification` key. The\n * value of the `notification` property will be used as the NotificationOptions\n * object passed to showNotification. Additionally, the `title` property of the\n * notification object will be used as the title.\n *\n * If there is no notification data in the payload then no notification will be\n * shown.\n * @private\n */\n onPush_(event) {\n let msgPayload;\n try {\n msgPayload = event.data.json();\n } catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n\n const handleMsgPromise = this.hasVisibleClients_().then(\n hasVisibleClients => {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || this.bgMessageHandler_) {\n // Send to page\n return this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n\n const notificationDetails = this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n const notificationTitle = notificationDetails.title || '';\n return (self as any).registration.showNotification(\n notificationTitle,\n notificationDetails\n );\n } else if (this.bgMessageHandler_) {\n return this.bgMessageHandler_(msgPayload);\n }\n }\n );\n\n event.waitUntil(handleMsgPromise);\n }\n\n /**\n * @private\n */\n onSubChange_(event) {\n const promiseChain = this.getToken().then(token => {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw this.errorFactory_.create(\n Errors.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE\n );\n }\n\n let tokenDetails = null;\n const tokenManager = this.getTokenManager();\n return tokenManager\n .getTokenDetailsFromToken(token)\n .then(details => {\n tokenDetails = details;\n if (!tokenDetails) {\n throw this.errorFactory_.create(Errors.codes.INVALID_SAVED_TOKEN);\n }\n\n // Attempt to get a new subscription\n return (self as any).registration.pushManager.subscribe(\n FCMDetails.SUBSCRIPTION_OPTIONS\n );\n })\n .then(newSubscription => {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(\n tokenDetails.fcmSenderId,\n newSubscription,\n tokenDetails.fcmPushSet\n );\n })\n .catch(err => {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(() => {\n throw this.errorFactory_.create(\n Errors.codes.UNABLE_TO_RESUBSCRIBE,\n {\n message: err\n }\n );\n });\n });\n });\n\n event.waitUntil(promiseChain);\n }\n\n /**\n * @private\n */\n onNotificationClick_(event) {\n if (\n !(\n event.notification &&\n event.notification.data &&\n event.notification.data[FCM_MSG]\n )\n ) {\n // Not an FCM notification, do nothing.\n return;\n }\n\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n\n event.notification.close();\n\n const msgPayload = event.notification.data[FCM_MSG];\n const clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n\n const promiseChain = this.getWindowClient_(clickAction)\n .then(windowClient => {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return (self as any).clients.openWindow(clickAction);\n }\n return windowClient;\n })\n .then(windowClient => {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n\n // Delete notification data from payload before sending to the page.\n const notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n\n const internalMsg = WorkerPageMessage.createNewMsg(\n WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED,\n msgPayload\n );\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return this.attemptToMessageClient_(windowClient, internalMsg);\n });\n\n event.waitUntil(promiseChain);\n }\n\n /**\n * @private\n * @param {Object} msgPayload\n * @return {NotificationOptions|undefined}\n */\n getNotificationData_(msgPayload) {\n if (!msgPayload) {\n return;\n }\n\n if (typeof msgPayload.notification !== 'object') {\n return;\n }\n\n const notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = {\n [FCM_MSG]: msgPayload\n };\n\n return notificationInformation;\n }\n\n /**\n * Calling setBackgroundMessageHandler will opt in to some specific\n * behaviours.\n * 1.) If a notification doesn't need to be shown due to a window already\n * being visible, then push messages will be sent to the page.\n * 2.) If a notification needs to be shown, and the message contains no\n * notification data this method will be called\n * and the promise it returns will be passed to event.waitUntil.\n * If you do not set this callback then all push messages will let and the\n * developer can handle them in a their own 'push' event callback\n * @export\n * @param {function(Object)} callback The callback to be called when a push\n * message is received and a notification must be shown. The callback will\n * be given the data from the push message.\n */\n setBackgroundMessageHandler(callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(\n Errors.codes.BG_HANDLER_FUNCTION_EXPECTED\n );\n }\n\n this.bgMessageHandler_ = callback;\n }\n\n /**\n * @private\n * @param {string} url The URL to look for when focusing a client.\n * @return {Object} Returns an existing window client or a newly opened\n * WindowClient.\n */\n getWindowClient_(url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n const parsedURL = new URL(url).href;\n\n return (self as any).clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(clientList => {\n let suitableClient = null;\n for (let i = 0; i < clientList.length; i++) {\n const parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n }\n\n /**\n * This message will attempt to send the message to a window client.\n * @private\n * @param {Object} client The WindowClient to send the message to.\n * @param {Object} message The message to send to the client.\n * @returns {Promise} Returns a promise that resolves after sending the\n * message. This does not guarantee that the message was successfully\n * received.\n */\n attemptToMessageClient_(client, message) {\n return new Promise((resolve, reject) => {\n if (!client) {\n return reject(\n this.errorFactory_.create(Errors.codes.NO_WINDOW_CLIENT_TO_MSG)\n );\n }\n\n client.postMessage(message);\n resolve();\n });\n }\n\n /**\n * @private\n * @returns {Promise} If there is currently a visible WindowClient,\n * this method will resolve to true, otherwise false.\n */\n hasVisibleClients_() {\n return (self as any).clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(clientList => {\n return clientList.some(client => client.visibilityState === 'visible');\n });\n }\n\n /**\n * @private\n * @param {Object} msgPayload The data from the push event that should be sent\n * to all available pages.\n * @returns {Promise} Returns a promise that resolves once the message\n * has been sent to all WindowClients.\n */\n sendMessageToWindowClients_(msgPayload) {\n return (self as any).clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(clientList => {\n const internalMsg = WorkerPageMessage.createNewMsg(\n WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED,\n msgPayload\n );\n\n return Promise.all(\n clientList.map(client => {\n return this.attemptToMessageClient_(client, internalMsg);\n })\n );\n });\n }\n\n /**\n * This will register the default service worker and return the registration.\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n getSWRegistration_() {\n return Promise.resolve((self as any).registration);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/controllers/sw-controller.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///firebase-messaging.js","webpack:///./messaging/index.js","webpack:///../messaging/dist/esm/src/helpers/array-buffer-to-base64.js","webpack:///../messaging/dist/esm/index.js","webpack:///../messaging/dist/esm/src/models/errors.js","webpack:///../messaging/dist/esm/src/models/fcm-details.js","webpack:///../messaging/dist/esm/src/models/token-manager.js","webpack:///../messaging/dist/esm/src/controllers/controller-interface.js","webpack:///../messaging/dist/esm/src/models/worker-page-message.js","webpack:///../messaging/dist/esm/src/models/default-sw.js","webpack:///../messaging/dist/esm/src/controllers/window-controller.js","webpack:///../messaging/dist/esm/src/controllers/sw-controller.js"],"names":["webpackJsonpFirebase","116","module","exports","__webpack_require__","117","__webpack_exports__","toBase64","arrayBuffer","uint8Version","Uint8Array","window","btoa","String","fromCharCode","apply","registerMessaging","instance","factoryMethod","app","self","sw_controller","window_controller","namespaceExports","Messaging","INTERNAL","registerService","Object","defineProperty","value","_a","cjs","CODES","AVAILABLE_IN_WINDOW","AVAILABLE_IN_SW","SHOULD_BE_INHERITED","BAD_SENDER_ID","INCORRECT_GCM_SENDER_ID","PERMISSION_DEFAULT","PERMISSION_BLOCKED","UNSUPPORTED_BROWSER","NOTIFICATIONS_BLOCKED","FAILED_DEFAULT_REGISTRATION","SW_REGISTRATION_EXPECTED","GET_SUBSCRIPTION_FAILED","INVALID_SAVED_TOKEN","SW_REG_REDUNDANT","TOKEN_SUBSCRIBE_FAILED","TOKEN_SUBSCRIBE_NO_TOKEN","TOKEN_SUBSCRIBE_NO_PUSH_SET","USE_SW_BEFORE_GET_TOKEN","INVALID_DELETE_TOKEN","DELETE_TOKEN_NOT_FOUND","DELETE_SCOPE_NOT_FOUND","BG_HANDLER_FUNCTION_EXPECTED","NO_WINDOW_CLIENT_TO_MSG","UNABLE_TO_RESUBSCRIBE","NO_FCM_TOKEN_FOR_RESUBSCRIBE","FAILED_TO_DELETE_TOKEN","NO_SW_IN_REG","BAD_SCOPE","BAD_VAPID_KEY","BAD_SUBSCRIPTION","BAD_TOKEN","BAD_PUSH_SET","FAILED_DELETE_VAPID_KEY","ERROR_MAP","errors","codes","map","array_buffer_to_base64","replace","FCM_APPLICATION_SERVER_KEY","SUBSCRIPTION_DETAILS","userVisibleOnly","applicationServerKey","fcm_details","ENDPOINT","APPLICATION_SERVER_KEY","SUBSCRIPTION_OPTIONS","FCM_TOKEN_OBJ_STORE","token_manager_TokenManager","TokenManager","this","errorFactory_","openDbPromise_","prototype","openDatabase_","Promise","resolve","reject","request","indexedDB","open","DB_NAME","onerror","event","target","error","onsuccess","result","onupgradeneeded","db","objectStore","createObjectStore","keyPath","createIndex","unique","closeDatabase","_this","then","close","getTokenDetailsFromToken","fcmToken","transaction","index","get","getTokenDetailsFromSWScope_","swScope","scopeRequest","getAllTokenDetailsForSenderId_","senderId","senderIdTokens","cursorRequest","openCursor","cursor","push","continue","subscribeToFCM","subscription","pushSet","p256dh","auth","fcmSubscribeBody","endpoint","headers","Headers","append","subscribeOptions","method","body","fetch","response","json","fcmTokenResponse","message","create","token","isSameSubscription_","masterTokenDetails","saveTokenDetails_","swRegistration","fcmPushSet","details","scope","fcmSenderId","put","getSavedToken","ServiceWorkerRegistration","length","allTokenDetails","findIndex","tokenDetails","pushManager","getSubscription","catch","err","createToken","fcmTokenDetails","subscribe","sub","deleteToken","delete","token_manager","SENDER_ID_OPTION_NAME","controller_interface_ControllerInterface","ControllerInterface","options","messagingSenderId_","tokenManager_","getToken","currentPermission","getNotificationPermission_","notification_permission","getSWRegistration_","registration","unsubscribe","requestPermission","useServiceWorker","onMessage","nextOrObserver","optError","optCompleted","onTokenRefresh","setBackgroundMessageHandler","callback","Notification","permission","getTokenManager","controller_interface","PARAMS","TYPE_OF_MSG","DATA","msgType","PUSH_MSG_RECEIVED","NOTIFICATION_CLICKED","createNewMsg","msgData","worker_page_message","TYPES_OF_MSG","default_sw","path","__extends","extendStatics","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__","constructor","window_controller_WindowController","_super","WindowController","call","registrationToUse_","manifestCheckPromise_","messageObserver_","onMessage_","observer","tokenRefreshObserver_","onTokenRefresh_","setupSWMessageListener_","isSupported_","manifestCheck_","manifestTag","document","querySelector","href","manifestContent","managePermissionResult","permissionPromise","waitForRegistrationToActivate_","serviceWorker","installing","waiting","active","state","stateChangeListener","removeEventListener","addEventListener","navigator","register","browserErrorMessage","update","data","workerPageMessage","pushMessage","next","PushSubscription","sw_controller___extends","sw_controller_SWController","SWController","e","onPush_","onSubChange_","onNotificationClick_","bgMessageHandler_","msgPayload","handleMsgPromise","hasVisibleClients_","hasVisibleClients","notification","sendMessageToWindowClients_","notificationDetails","getNotificationData_","notificationTitle","title","showNotification","waitUntil","promiseChain","tokenManager","newSubscription","stopImmediatePropagation","clickAction","getWindowClient_","windowClient","clients","openWindow","internalMsg","attemptToMessageClient_","notificationInformation","assign","url","parsedURL","URL","matchAll","type","includeUncontrolled","clientList","suitableClient","i","focus","client","postMessage","some","visibilityState","all","esm","Error"],"mappings":";;;;;AAKA,IACQA,sBAAsB,IAExBC,IACA,SAAUC,EAAQC,EAASC,GCOjCA,EAAA,MDgBMC,IACA,SAAUH,EAAQI,EAAqBF,GAE7C,YEpBA,SAAAG,GAAAC,GACA,GAAAC,GAAA,GAAAC,YAAAF,EACA,OAAAG,QAAAC,KAAAC,OAAAC,aAAAC,MAAA,KAAAN,ICEA,QAAAO,GAAAC,GACA,GACAC,GAAA,SAAAC,GACA,MAAAC,OAAA,4BAAAA,MACA,GAAAC,GAAAF,GAGA,GAAAG,GAAAH,IAEAI,GAEAC,UAAAF,EAEAL,GAAAQ,SAAAC,gBAZA,YAYAR,EAAAK,GHIAI,OAAOC,eAAetB,EAAqB,cAAgBuB,OAAO,GAGlE,IIoEAC,GJpEIC,EAAM3B,EAAoB,GIvB9B4B,GACAC,oBAAA,2BACAC,gBAAA,uBACAC,oBAAA,sBACAC,cAAA,gBACAC,wBAAA,0BACAC,mBAAA,qBACAC,mBAAA,qBACAC,oBAAA,sBACAC,sBAAA,wBACAC,4BAAA,oC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ACA,MAAA5P,MAAA6Q,QACAS,UACAC,KAAA,SACAC,qBAAA,IAEA9L,KAAA,SAAA+L,GACA,MAAAA,GAAAM,KAAA,SAAAF,GAAsD,kBAAAA,EAAAG,qBAUtD5C,EAAAlL,UAAA6L,EAAA,SAAAL,GACA,GAAAjK,GAAA1B,IACA,OAAA/D,MAAA6Q,QACAS,UACAC,KAAA,SACAC,qBAAA,IAEA9L,KAAA,SAAA+L,GACA,GAAAV,GAAAnF,EAAAF,aAAAE,EAAAC,aAAAL,kBAAAkE,EACA,OAAAtL,SAAA6N,IAAAR,EAAAxO,IAAA,SAAA4O,GACA,MAAApM,GAAAuL,EAAAa,EAAAd,SAUA3B,EAAAlL,UAAAkG,EAAA,WACA,MAAAhG,SAAAC,QAAArE,KAAAqK,eAEA+E,GACCjE,GACDlL,EAAA,EX4uCIiS,EAAMlT,EAAoB,EGjiD9BE,GAAA,kBAAAU,EAkCAA,EAAAsS,EAAA,YH4iDG,MACO,MAAMpN,GACN,KAAUqN,OACR","file":"firebase-messaging.js","sourcesContent":["/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\ntry {\n webpackJsonpFirebase([3],{\n\n/***/ 116:\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n__webpack_require__(117);\n\n\n/***/ }),\n\n/***/ 117:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ../util/dist/cjs/index.js\nvar cjs = __webpack_require__(0);\nvar cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/errors.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\nvar ERROR_MAP = (_a = {},\n _a[CODES.AVAILABLE_IN_WINDOW] = 'This method is available in a Window context.',\n _a[CODES.AVAILABLE_IN_SW] = 'This method is available in a service worker ' + 'context.',\n _a[CODES.SHOULD_BE_INHERITED] = 'This method should be overriden by ' + 'extended classes.',\n _a[CODES.BAD_SENDER_ID] = \"Please ensure that 'messagingSenderId' is set \" +\n 'correctly in the options passed into firebase.initializeApp().',\n _a[CODES.PERMISSION_DEFAULT] = 'The required permissions were not granted and ' + 'dismissed instead.',\n _a[CODES.PERMISSION_BLOCKED] = 'The required permissions were not granted and ' + 'blocked instead.',\n _a[CODES.UNSUPPORTED_BROWSER] = \"This browser doesn't support the API's \" +\n 'required to use the firebase SDK.',\n _a[CODES.NOTIFICATIONS_BLOCKED] = 'Notifications have been blocked.',\n _a[CODES.FAILED_DEFAULT_REGISTRATION] = 'We are unable to register the ' +\n 'default service worker. {$browserErrorMessage}',\n _a[CODES.SW_REGISTRATION_EXPECTED] = 'A service worker registration was the ' + 'expected input.',\n _a[CODES.GET_SUBSCRIPTION_FAILED] = 'There was an error when trying to get ' +\n 'any existing Push Subscriptions.',\n _a[CODES.INVALID_SAVED_TOKEN] = 'Unable to access details of the saved token.',\n _a[CODES.SW_REG_REDUNDANT] = 'The service worker being used for push was made ' + 'redundant.',\n _a[CODES.TOKEN_SUBSCRIBE_FAILED] = 'A problem occured while subscribing the ' + 'user to FCM: {$message}',\n _a[CODES.TOKEN_SUBSCRIBE_NO_TOKEN] = 'FCM returned no token when subscribing ' + 'the user to push.',\n _a[CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET] = 'FCM returned an invalid response ' + 'when getting an FCM token.',\n _a[CODES.USE_SW_BEFORE_GET_TOKEN] = 'You must call useServiceWorker() before ' +\n 'calling getToken() to ensure your service worker is used.',\n _a[CODES.INVALID_DELETE_TOKEN] = 'You must pass a valid token into ' +\n 'deleteToken(), i.e. the token from getToken().',\n _a[CODES.DELETE_TOKEN_NOT_FOUND] = 'The deletion attempt for token could not ' +\n 'be performed as the token was not found.',\n _a[CODES.DELETE_SCOPE_NOT_FOUND] = 'The deletion attempt for service worker ' +\n 'scope could not be performed as the scope was not found.',\n _a[CODES.BG_HANDLER_FUNCTION_EXPECTED] = 'The input to ' + 'setBackgroundMessageHandler() must be a function.',\n _a[CODES.NO_WINDOW_CLIENT_TO_MSG] = 'An attempt was made to message a ' + 'non-existant window client.',\n _a[CODES.UNABLE_TO_RESUBSCRIBE] = 'There was an error while re-subscribing ' +\n 'the FCM token for push messaging. Will have to resubscribe the ' +\n 'user on next visit. {$message}',\n _a[CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE] = 'Could not find an FCM token ' +\n 'and as a result, unable to resubscribe. Will have to resubscribe the ' +\n 'user on next visit.',\n _a[CODES.FAILED_TO_DELETE_TOKEN] = 'Unable to delete the currently saved token.',\n _a[CODES.NO_SW_IN_REG] = 'Even though the service worker registration was ' +\n 'successful, there was a problem accessing the service worker itself.',\n _a[CODES.INCORRECT_GCM_SENDER_ID] = \"Please change your web app manifest's \" +\n \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\",\n _a[CODES.BAD_SCOPE] = 'The service worker scope must be a string with at ' +\n 'least one character.',\n _a[CODES.BAD_VAPID_KEY] = 'The public VAPID key must be a string with at ' + 'least one character.',\n _a[CODES.BAD_SUBSCRIPTION] = 'The subscription must be a valid ' + 'PushSubscription.',\n _a[CODES.BAD_TOKEN] = 'The FCM Token used for storage / lookup was not ' +\n 'a valid token string.',\n _a[CODES.BAD_PUSH_SET] = 'The FCM push set used for storage / lookup was not ' +\n 'not a valid push set string.',\n _a[CODES.FAILED_DELETE_VAPID_KEY] = 'The VAPID key could not be deleted.',\n _a);\n/* harmony default export */ var errors = ({\n codes: CODES,\n map: ERROR_MAP\n});\nvar _a;\n\n//# sourceMappingURL=errors.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/helpers/array-buffer-to-base64.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction toBase64(arrayBuffer) {\n var uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\n/* harmony default export */ var array_buffer_to_base64 = (function (arrayBuffer) {\n var base64String = toBase64(arrayBuffer);\n return base64String\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n});;\n\n//# sourceMappingURL=array-buffer-to-base64.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/fcm-details.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar FCM_APPLICATION_SERVER_KEY = [\n 0x04,\n 0x33,\n 0x94,\n 0xf7,\n 0xdf,\n 0xa1,\n 0xeb,\n 0xb1,\n 0xdc,\n 0x03,\n 0xa2,\n 0x5e,\n 0x15,\n 0x71,\n 0xdb,\n 0x48,\n 0xd3,\n 0x2e,\n 0xed,\n 0xed,\n 0xb2,\n 0x34,\n 0xdb,\n 0xb7,\n 0x47,\n 0x3a,\n 0x0c,\n 0x8f,\n 0xc4,\n 0xcc,\n 0xe1,\n 0x6f,\n 0x3c,\n 0x8c,\n 0x84,\n 0xdf,\n 0xab,\n 0xb6,\n 0x66,\n 0x3e,\n 0xf2,\n 0x0c,\n 0xd4,\n 0x8b,\n 0xfe,\n 0xe3,\n 0xf9,\n 0x76,\n 0x2f,\n 0x14,\n 0x1c,\n 0x63,\n 0x08,\n 0x6a,\n 0x6f,\n 0x2d,\n 0xb1,\n 0x1a,\n 0x95,\n 0xb0,\n 0xce,\n 0x37,\n 0xc0,\n 0x9c,\n 0x6e\n];\nvar SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\n/* harmony default export */ var fcm_details = ({\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n});\n\n//# sourceMappingURL=fcm-details.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/token-manager.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nvar FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nvar FCM_TOKEN_DETAILS_DB_VERSION = 1;\nvar token_manager_TokenManager = /** @class */ (function () {\n function TokenManager() {\n this.errorFactory_ = new cjs[\"ErrorFactory\"]('messaging', 'Messaging', errors.map);\n this.openDbPromise_ = null;\n }\n /**\n * Get the indexedDB as a promsie.\n * @private\n * @return {Promise} The IndexedDB database\n */\n TokenManager.prototype.openDatabase_ = function () {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n this.openDbPromise_ = new Promise(function (resolve, reject) {\n var request = indexedDB.open(TokenManager.DB_NAME, FCM_TOKEN_DETAILS_DB_VERSION);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n request.onupgradeneeded = function (event) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n return this.openDbPromise_;\n };\n /**\n * Close the currently open database.\n * @return {Promise} Returns the result of the promise chain.\n */\n TokenManager.prototype.closeDatabase = function () {\n var _this = this;\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(function (db) {\n db.close();\n _this.openDbPromise_ = null;\n });\n }\n return Promise.resolve();\n };\n /**\n * Given a token, this method will look up the details in indexedDB.\n * @public\n * @param {string} fcmToken\n * @return {Promise} The details associated with that token.\n */\n TokenManager.prototype.getTokenDetailsFromToken = function (fcmToken) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var index = objectStore.index('fcmToken');\n var request = index.get(fcmToken);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getTokenDetailsFromSWScope_ = function (swScope) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = function (event) {\n reject(event.target.error);\n };\n scopeRequest.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getAllTokenDetailsForSenderId_ = function (senderId) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var senderIdTokens = [];\n var cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n }\n else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n };\n /**\n * Given a PushSubscription and messagingSenderId, get an FCM token.\n * @public\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\n * @param {string=} pushSet If defined this will swap the subscription for\n * matching FCM token.\n * @return {Promise} Returns the FCM token to be used in place\n * of the PushSubscription.\n */\n TokenManager.prototype.subscribeToFCM = function (senderId, subscription, pushSet) {\n var _this = this;\n var p256dh = array_buffer_to_base64(subscription['getKey']('p256dh'));\n var auth = array_buffer_to_base64(subscription['getKey']('auth'));\n var fcmSubscribeBody = \"authorized_entity=\" + senderId + \"&\" +\n (\"endpoint=\" + subscription.endpoint + \"&\") +\n (\"encryption_key=\" + p256dh + \"&\") +\n (\"encryption_auth=\" + auth);\n if (pushSet) {\n fcmSubscribeBody += \"&pushSet=\" + pushSet;\n }\n var headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n var subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n return fetch(fcm_details.ENDPOINT + '/fcm/connect/subscribe', subscribeOptions)\n .then(function (response) { return response.json(); })\n .then(function (response) {\n var fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n var message = fcmTokenResponse['error']['message'];\n throw _this.errorFactory_.create(errors.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n if (!fcmTokenResponse['token']) {\n throw _this.errorFactory_.create(errors.codes.TOKEN_SUBSCRIBE_NO_TOKEN);\n }\n if (!fcmTokenResponse['pushSet']) {\n throw _this.errorFactory_.create(errors.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);\n }\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n };\n /**\n * Checks the that fields in the PushSubscription are equivalent to the\n * details stores in the masterTokenDetails.\n * @private\n * @param {PushSubscription} subscription The push subscription we expect\n * the master token to match.\n * @param {Object} masterTokenDetails The saved details we wish to compare\n * with the PushSubscription\n * @return {boolean} true if the subscription and token details are\n * equivalent.\n */\n TokenManager.prototype.isSameSubscription_ = function (subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return (subscription.endpoint === masterTokenDetails['endpoint'] &&\n array_buffer_to_base64(subscription['getKey']('auth')) ===\n masterTokenDetails['auth'] &&\n array_buffer_to_base64(subscription['getKey']('p256dh')) ===\n masterTokenDetails['p256dh']);\n };\n /**\n * Save the details for the fcm token for re-use at a later date.\n * @private\n * @param {string} senderId The 'messagingSenderId' used for this project\n * @param {ServiceWorkerRegistration} swRegistration The service worker\n * used to subscribe the user for web push\n * @param {PushSubscription} subscription The push subscription passed to\n * FCM for the current token.\n * @param {string} fcmToken The FCM token currently used on this\n * device.\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\n * @return {Promise}\n */\n TokenManager.prototype.saveTokenDetails_ = function (senderId, swRegistration, subscription, fcmToken, fcmPushSet) {\n var details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: array_buffer_to_base64(subscription['getKey']('auth')),\n p256dh: array_buffer_to_base64(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.put(details);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve();\n };\n });\n });\n };\n /**\n * Returns the saved FCM Token if one is available and still valid,\n * otherwise `null` is returned.\n * @param {string} senderId This should be the sender ID associated with the\n * FCM Token being retrieved.\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\n * to subscribe the user to push.\n * @return {Promise | Promise} Returns the saved FCM Token if\n * avilable and valid.\n * @export\n */\n TokenManager.prototype.getSavedToken = function (senderId, swRegistration) {\n var _this = this;\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors.codes.SW_REGISTRATION_EXPECTED));\n }\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors.codes.BAD_SENDER_ID));\n }\n return this.getAllTokenDetailsForSenderId_(senderId)\n .then(function (allTokenDetails) {\n if (allTokenDetails.length === 0) {\n return;\n }\n var index = allTokenDetails.findIndex(function (tokenDetails) {\n return (swRegistration.scope === tokenDetails['swScope'] &&\n senderId === tokenDetails['fcmSenderId']);\n });\n if (index === -1) {\n return;\n }\n return allTokenDetails[index];\n })\n .then(function (tokenDetails) {\n if (!tokenDetails) {\n return;\n }\n return swRegistration.pushManager\n .getSubscription()\n .catch(function (err) {\n throw _this.errorFactory_.create(errors.codes.GET_SUBSCRIPTION_FAILED);\n })\n .then(function (subscription) {\n if (subscription &&\n _this.isSameSubscription_(subscription, tokenDetails)) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n };\n /**\n * Creates a new FCM token.\n */\n TokenManager.prototype.createToken = function (senderId, swRegistration) {\n var _this = this;\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors.codes.BAD_SENDER_ID));\n }\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors.codes.SW_REGISTRATION_EXPECTED));\n }\n // Check for existing subscription first\n var subscription;\n var fcmTokenDetails;\n return swRegistration.pushManager\n .getSubscription()\n .then(function (subscription) {\n if (subscription) {\n return subscription;\n }\n return swRegistration.pushManager.subscribe(fcm_details.SUBSCRIPTION_OPTIONS);\n })\n .then(function (sub) {\n subscription = sub;\n return _this.subscribeToFCM(senderId, subscription);\n })\n .then(function (tokenDetails) {\n fcmTokenDetails = tokenDetails;\n return _this.saveTokenDetails_(senderId, swRegistration, subscription, fcmTokenDetails['token'], fcmTokenDetails['pushSet']);\n })\n .then(function () { return fcmTokenDetails['token']; });\n };\n /**\n * This method deletes details of the current FCM token.\n * It's returning a promise in case we need to move to an async\n * method for deleting at a later date.\n * @param {string} token Token to be deleted\n * @return {Promise} Resolves once the FCM token details have been\n * deleted and returns the deleted details.\n */\n TokenManager.prototype.deleteToken = function (token) {\n var _this = this;\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors.codes.INVALID_DELETE_TOKEN));\n }\n return this.getTokenDetailsFromToken(token).then(function (details) {\n if (!details) {\n throw _this.errorFactory_.create(errors.codes.DELETE_TOKEN_NOT_FOUND);\n }\n return _this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.delete(details['swScope']);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n if (event.target.result === 0) {\n reject(_this.errorFactory_.create(errors.codes.FAILED_TO_DELETE_TOKEN));\n return;\n }\n resolve(details);\n };\n });\n });\n });\n };\n return TokenManager;\n}());\n/* harmony default export */ var token_manager = (token_manager_TokenManager);\n\n//# sourceMappingURL=token-manager.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/notification-permission.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* harmony default export */ var notification_permission = ({\n granted: 'granted',\n default: 'default',\n denied: 'denied'\n});\n\n//# sourceMappingURL=notification-permission.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/controllers/controller-interface.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nvar SENDER_ID_OPTION_NAME = 'messagingSenderId';\nvar controller_interface_ControllerInterface = /** @class */ (function () {\n /**\n * An interface of the Messaging Service API\n * @param {!firebase.app.App} app\n */\n function ControllerInterface(app) {\n var _this = this;\n this.errorFactory_ = new cjs[\"ErrorFactory\"]('messaging', 'Messaging', errors.map);\n if (!app.options[SENDER_ID_OPTION_NAME] ||\n typeof app.options[SENDER_ID_OPTION_NAME] !== 'string') {\n throw this.errorFactory_.create(errors.codes.BAD_SENDER_ID);\n }\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n this.tokenManager_ = new token_manager();\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = function () { return _this.delete; };\n }\n /**\n * @export\n * @return {Promise | Promise} Returns a promise that\n * resolves to an FCM token.\n */\n ControllerInterface.prototype.getToken = function () {\n var _this = this;\n // Check with permissions\n var currentPermission = this.getNotificationPermission_();\n if (currentPermission !== notification_permission.granted) {\n if (currentPermission === notification_permission.denied) {\n return Promise.reject(this.errorFactory_.create(errors.codes.NOTIFICATIONS_BLOCKED));\n }\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n return this.getSWRegistration_().then(function (registration) {\n return _this.tokenManager_\n .getSavedToken(_this.messagingSenderId_, registration)\n .then(function (token) {\n if (token) {\n return token;\n }\n return _this.tokenManager_.createToken(_this.messagingSenderId_, registration);\n });\n });\n };\n /**\n * This method deletes tokens that the token manager looks after and then\n * unregisters the push subscription if it exists.\n * @export\n * @param {string} token\n * @return {Promise}\n */\n ControllerInterface.prototype.deleteToken = function (token) {\n var _this = this;\n return this.tokenManager_.deleteToken(token).then(function () {\n return _this.getSWRegistration_()\n .then(function (registration) {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n })\n .then(function (subscription) {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n };\n ControllerInterface.prototype.getSWRegistration_ = function () {\n throw this.errorFactory_.create(errors.codes.SHOULD_BE_INHERITED);\n };\n //\n // The following methods should only be available in the window.\n //\n ControllerInterface.prototype.requestPermission = function () {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!ServiceWorkerRegistration} registration\n */\n ControllerInterface.prototype.useServiceWorker = function (registration) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver\n * @param {function(!Error)=} optError\n * @param {function()=} optCompleted\n * @return {!function()}\n */\n ControllerInterface.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n ControllerInterface.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n //\n // The following methods are used by the service worker only.\n //\n /**\n * @export\n * @param {function(Object)} callback\n */\n ControllerInterface.prototype.setBackgroundMessageHandler = function (callback) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_SW);\n };\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n /**\n * This method is required to adhere to the Firebase interface.\n * It closes any currently open indexdb database connections.\n */\n ControllerInterface.prototype.delete = function () {\n return this.tokenManager_.closeDatabase();\n };\n /**\n * Returns the current Notification Permission state.\n * @private\n * @return {string} The currenct permission state.\n */\n ControllerInterface.prototype.getNotificationPermission_ = function () {\n return Notification.permission;\n };\n /**\n * @protected\n * @returns {TokenManager}\n */\n ControllerInterface.prototype.getTokenManager = function () {\n return this.tokenManager_;\n };\n return ControllerInterface;\n}());\n/* harmony default export */ var controller_interface = (controller_interface_ControllerInterface);\n\n//# sourceMappingURL=controller-interface.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/worker-page-message.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\nvar PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nvar msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\nvar createNewMsg = function (msgType, msgData) {\n var message = (_a = {},\n _a[PARAMS.TYPE_OF_MSG] = msgType,\n _a[PARAMS.DATA] = msgData,\n _a);\n return message;\n var _a;\n};\n/* harmony default export */ var worker_page_message = ({\n PARAMS: PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg: createNewMsg\n});\n\n//# sourceMappingURL=worker-page-message.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/default-sw.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* harmony default export */ var default_sw = ({\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n});\n\n//# sourceMappingURL=default-sw.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/controllers/window-controller.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\nvar window_controller_WindowController = /** @class */ (function (_super) {\n __extends(WindowController, _super);\n /**\n * A service that provides a MessagingService instance.\n * @param {!firebase.app.App} app\n */\n function WindowController(app) {\n var _this = _super.call(this, app) || this;\n /**\n * @private\n * @type {ServiceWorkerRegistration}\n */\n _this.registrationToUse_;\n /**\n * @private\n * @type {Promise}\n */\n _this.manifestCheckPromise_;\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.messageObserver_ = null;\n /**\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\n * observer.\n */\n _this.onMessage_ = Object(cjs[\"createSubscribe\"])(function (observer) {\n _this.messageObserver_ = observer;\n });\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.tokenRefreshObserver_ = null;\n _this.onTokenRefresh_ = Object(cjs[\"createSubscribe\"])(function (observer) {\n _this.tokenRefreshObserver_ = observer;\n });\n _this.setupSWMessageListener_();\n return _this;\n }\n /**\n * This method returns an FCM token if it can be generated.\n * The return promise will reject if the browser doesn't support\n * FCM, if permission is denied for notifications or it's not\n * possible to generate a token.\n * @export\n * @return {Promise | Promise} Returns a promise the\n * resolves to an FCM token or null if permission isn't granted.\n */\n WindowController.prototype.getToken = function () {\n var _this = this;\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(this.errorFactory_.create(errors.codes.UNSUPPORTED_BROWSER));\n }\n return this.manifestCheck_().then(function () {\n return _super.prototype.getToken.call(_this);\n });\n };\n /**\n * The method checks that a manifest is defined and has the correct GCM\n * sender ID.\n * @private\n * @return {Promise} Returns a promise that resolves if the manifest matches\n * our required sender ID\n */\n WindowController.prototype.manifestCheck_ = function () {\n var _this = this;\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n var manifestTag = document.querySelector('link[rel=\"manifest\"]');\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n }\n else {\n this.manifestCheckPromise_ = fetch(manifestTag.href)\n .then(function (response) {\n return response.json();\n })\n .catch(function () {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n })\n .then(function (manifestContent) {\n if (!manifestContent) {\n return;\n }\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw _this.errorFactory_.create(errors.codes.INCORRECT_GCM_SENDER_ID);\n }\n });\n }\n return this.manifestCheckPromise_;\n };\n /**\n * Request permission if it is not currently granted\n * @export\n * @returns {Promise} Resolves if the permission was granted, otherwise\n * rejects\n */\n WindowController.prototype.requestPermission = function () {\n var _this = this;\n if (Notification.permission === notification_permission.granted) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var managePermissionResult = function (result) {\n if (result === notification_permission.granted) {\n return resolve();\n }\n else if (result === notification_permission.denied) {\n return reject(_this.errorFactory_.create(errors.codes.PERMISSION_BLOCKED));\n }\n else {\n return reject(_this.errorFactory_.create(errors.codes.PERMISSION_DEFAULT));\n }\n };\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n var permissionPromise = Notification.requestPermission(function (result) {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n managePermissionResult(result);\n });\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n };\n /**\n * This method allows a developer to override the default service worker and\n * instead use a custom service worker.\n * @export\n * @param {!ServiceWorkerRegistration} registration The service worker\n * registration that should be used to receive the push messages.\n */\n WindowController.prototype.useServiceWorker = function (registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(errors.codes.SW_REGISTRATION_EXPECTED);\n }\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(errors.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n this.registrationToUse_ = registration;\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\n * or a function triggered on message.\n * @param {function(!Error)=} optError Optional A function triggered on\n * message error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n };\n /**\n * Given a registration, wait for the service worker it relates to\n * become activer\n * @private\n * @param {ServiceWorkerRegistration} registration Registration to wait\n * for service worker to become active\n * @return {Promise} Wait for service worker\n * registration to become active\n */\n WindowController.prototype.waitForRegistrationToActivate_ = function (registration) {\n var _this = this;\n var serviceWorker = registration.installing || registration.waiting || registration.active;\n return new Promise(function (resolve, reject) {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(_this.errorFactory_.create(errors.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors.codes.SW_REG_REDUNDANT));\n return;\n }\n var stateChangeListener = function () {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n }\n else if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors.codes.SW_REG_REDUNDANT));\n }\n else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n };\n /**\n * This will regiater the default service worker and return the registration\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n WindowController.prototype.getSWRegistration_ = function () {\n var _this = this;\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n return navigator.serviceWorker\n .register(default_sw.path, {\n scope: default_sw.scope\n })\n .catch(function (err) {\n throw _this.errorFactory_.create(errors.codes.FAILED_DEFAULT_REGISTRATION, {\n browserErrorMessage: err.message\n });\n })\n .then(function (registration) {\n return _this.waitForRegistrationToActivate_(registration).then(function () {\n _this.registrationToUse_ = registration;\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n return registration;\n });\n });\n };\n /**\n * This method will set up a message listener to handle\n * events from the service worker that should trigger\n * events in the page.\n *\n * @private\n */\n WindowController.prototype.setupSWMessageListener_ = function () {\n var _this = this;\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('message', function (event) {\n if (!event.data || !event.data[worker_page_message.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n var workerPageMessage = event.data;\n switch (workerPageMessage[worker_page_message.PARAMS.TYPE_OF_MSG]) {\n case worker_page_message.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case worker_page_message.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n var pushMessage = workerPageMessage[worker_page_message.PARAMS.DATA];\n _this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n }, false);\n };\n /**\n * Checks to see if the required API's are valid or not.\n * @private\n * @return {boolean} Returns true if the desired APIs are available.\n */\n WindowController.prototype.isSupported_ = function () {\n return ('serviceWorker' in navigator &&\n 'PushManager' in window &&\n 'Notification' in window &&\n 'fetch' in window &&\n ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') &&\n PushSubscription.prototype.hasOwnProperty('getKey'));\n };\n return WindowController;\n}(controller_interface));\n/* harmony default export */ var window_controller = (window_controller_WindowController);\n\n//# sourceMappingURL=window-controller.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/controllers/sw-controller.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar sw_controller___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar FCM_MSG = 'FCM_MSG';\nvar sw_controller_SWController = /** @class */ (function (_super) {\n sw_controller___extends(SWController, _super);\n function SWController(app) {\n var _this = _super.call(this, app) || this;\n self.addEventListener('push', function (e) { return _this.onPush_(e); }, false);\n self.addEventListener('pushsubscriptionchange', function (e) { return _this.onSubChange_(e); }, false);\n self.addEventListener('notificationclick', function (e) { return _this.onNotificationClick_(e); }, false);\n /**\n * @private\n * @type {function(Object)|null}\n */\n _this.bgMessageHandler_ = null;\n return _this;\n }\n /**\n * A handler for push events that shows notifications based on the content of\n * the payload.\n *\n * The payload must be a JSON-encoded Object with a `notification` key. The\n * value of the `notification` property will be used as the NotificationOptions\n * object passed to showNotification. Additionally, the `title` property of the\n * notification object will be used as the title.\n *\n * If there is no notification data in the payload then no notification will be\n * shown.\n * @private\n */\n SWController.prototype.onPush_ = function (event) {\n var _this = this;\n var msgPayload;\n try {\n msgPayload = event.data.json();\n }\n catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n var handleMsgPromise = this.hasVisibleClients_().then(function (hasVisibleClients) {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || _this.bgMessageHandler_) {\n // Send to page\n return _this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n var notificationDetails = _this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n var notificationTitle = notificationDetails.title || '';\n return self.registration.showNotification(notificationTitle, notificationDetails);\n }\n else if (_this.bgMessageHandler_) {\n return _this.bgMessageHandler_(msgPayload);\n }\n });\n event.waitUntil(handleMsgPromise);\n };\n /**\n * @private\n */\n SWController.prototype.onSubChange_ = function (event) {\n var _this = this;\n var promiseChain = this.getToken().then(function (token) {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw _this.errorFactory_.create(errors.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);\n }\n var tokenDetails = null;\n var tokenManager = _this.getTokenManager();\n return tokenManager\n .getTokenDetailsFromToken(token)\n .then(function (details) {\n tokenDetails = details;\n if (!tokenDetails) {\n throw _this.errorFactory_.create(errors.codes.INVALID_SAVED_TOKEN);\n }\n // Attempt to get a new subscription\n return self.registration.pushManager.subscribe(fcm_details.SUBSCRIPTION_OPTIONS);\n })\n .then(function (newSubscription) {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(tokenDetails.fcmSenderId, newSubscription, tokenDetails.fcmPushSet);\n })\n .catch(function (err) {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(function () {\n throw _this.errorFactory_.create(errors.codes.UNABLE_TO_RESUBSCRIBE, {\n message: err\n });\n });\n });\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n */\n SWController.prototype.onNotificationClick_ = function (event) {\n var _this = this;\n if (!(event.notification &&\n event.notification.data &&\n event.notification.data[FCM_MSG])) {\n // Not an FCM notification, do nothing.\n return;\n }\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n event.notification.close();\n var msgPayload = event.notification.data[FCM_MSG];\n var clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n var promiseChain = this.getWindowClient_(clickAction)\n .then(function (windowClient) {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return self.clients.openWindow(clickAction);\n }\n return windowClient;\n })\n .then(function (windowClient) {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n // Delete notification data from payload before sending to the page.\n var notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n var internalMsg = worker_page_message.createNewMsg(worker_page_message.TYPES_OF_MSG.NOTIFICATION_CLICKED, msgPayload);\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return _this.attemptToMessageClient_(windowClient, internalMsg);\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n * @param {Object} msgPayload\n * @return {NotificationOptions|undefined}\n */\n SWController.prototype.getNotificationData_ = function (msgPayload) {\n if (!msgPayload) {\n return;\n }\n if (typeof msgPayload.notification !== 'object') {\n return;\n }\n var notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = (_a = {},\n _a[FCM_MSG] = msgPayload,\n _a);\n return notificationInformation;\n var _a;\n };\n /**\n * Calling setBackgroundMessageHandler will opt in to some specific\n * behaviours.\n * 1.) If a notification doesn't need to be shown due to a window already\n * being visible, then push messages will be sent to the page.\n * 2.) If a notification needs to be shown, and the message contains no\n * notification data this method will be called\n * and the promise it returns will be passed to event.waitUntil.\n * If you do not set this callback then all push messages will let and the\n * developer can handle them in a their own 'push' event callback\n * @export\n * @param {function(Object)} callback The callback to be called when a push\n * message is received and a notification must be shown. The callback will\n * be given the data from the push message.\n */\n SWController.prototype.setBackgroundMessageHandler = function (callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(errors.codes.BG_HANDLER_FUNCTION_EXPECTED);\n }\n this.bgMessageHandler_ = callback;\n };\n /**\n * @private\n * @param {string} url The URL to look for when focusing a client.\n * @return {Object} Returns an existing window client or a newly opened\n * WindowClient.\n */\n SWController.prototype.getWindowClient_ = function (url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n var parsedURL = new URL(url).href;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var suitableClient = null;\n for (var i = 0; i < clientList.length; i++) {\n var parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n };\n /**\n * This message will attempt to send the message to a window client.\n * @private\n * @param {Object} client The WindowClient to send the message to.\n * @param {Object} message The message to send to the client.\n * @returns {Promise} Returns a promise that resolves after sending the\n * message. This does not guarantee that the message was successfully\n * received.\n */\n SWController.prototype.attemptToMessageClient_ = function (client, message) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!client) {\n return reject(_this.errorFactory_.create(errors.codes.NO_WINDOW_CLIENT_TO_MSG));\n }\n client.postMessage(message);\n resolve();\n });\n };\n /**\n * @private\n * @returns {Promise} If there is currently a visible WindowClient,\n * this method will resolve to true, otherwise false.\n */\n SWController.prototype.hasVisibleClients_ = function () {\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n return clientList.some(function (client) { return client.visibilityState === 'visible'; });\n });\n };\n /**\n * @private\n * @param {Object} msgPayload The data from the push event that should be sent\n * to all available pages.\n * @returns {Promise} Returns a promise that resolves once the message\n * has been sent to all WindowClients.\n */\n SWController.prototype.sendMessageToWindowClients_ = function (msgPayload) {\n var _this = this;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var internalMsg = worker_page_message.createNewMsg(worker_page_message.TYPES_OF_MSG.PUSH_MSG_RECEIVED, msgPayload);\n return Promise.all(clientList.map(function (client) {\n return _this.attemptToMessageClient_(client, internalMsg);\n }));\n });\n };\n /**\n * This will register the default service worker and return the registration.\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n SWController.prototype.getSWRegistration_ = function () {\n return Promise.resolve(self.registration);\n };\n return SWController;\n}(controller_interface));\n/* harmony default export */ var sw_controller = (sw_controller_SWController);\n\n//# sourceMappingURL=sw-controller.js.map\n\n// EXTERNAL MODULE: ../app/dist/esm/index.js + 1 modules\nvar esm = __webpack_require__(6);\n\n// CONCATENATED MODULE: ../messaging/dist/esm/index.js\n/* harmony export (immutable) */ __webpack_exports__[\"registerMessaging\"] = registerMessaging;\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\nfunction registerMessaging(instance) {\n var messagingName = 'messaging';\n var factoryMethod = function (app) {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new sw_controller(app);\n }\n // Assume we are in the window context.\n return new window_controller(app);\n };\n var namespaceExports = {\n // no-inline\n Messaging: window_controller\n };\n instance.INTERNAL.registerService(messagingName, factoryMethod, namespaceExports);\n}\nregisterMessaging(esm[\"default\"]);\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ })\n\n},[116]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-messaging.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-messaging.js","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nrequire('@firebase/messaging');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./messaging/index.js\n// module id = 116\n// module chunks = 3","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction toBase64(arrayBuffer) {\n var uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\nexport default function (arrayBuffer) {\n var base64String = toBase64(arrayBuffer);\n return base64String\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n};\n\n//# sourceMappingURL=array-buffer-to-base64.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/helpers/array-buffer-to-base64.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nimport WindowController from './src/controllers/window-controller';\nimport SWController from './src/controllers/sw-controller';\nimport firebase from '@firebase/app';\nexport function registerMessaging(instance) {\n var messagingName = 'messaging';\n var factoryMethod = function (app) {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new SWController(app);\n }\n // Assume we are in the window context.\n return new WindowController(app);\n };\n var namespaceExports = {\n // no-inline\n Messaging: WindowController\n };\n instance.INTERNAL.registerService(messagingName, factoryMethod, namespaceExports);\n}\nregisterMessaging(firebase);\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/index.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\nvar ERROR_MAP = (_a = {},\n _a[CODES.AVAILABLE_IN_WINDOW] = 'This method is available in a Window context.',\n _a[CODES.AVAILABLE_IN_SW] = 'This method is available in a service worker ' + 'context.',\n _a[CODES.SHOULD_BE_INHERITED] = 'This method should be overriden by ' + 'extended classes.',\n _a[CODES.BAD_SENDER_ID] = \"Please ensure that 'messagingSenderId' is set \" +\n 'correctly in the options passed into firebase.initializeApp().',\n _a[CODES.PERMISSION_DEFAULT] = 'The required permissions were not granted and ' + 'dismissed instead.',\n _a[CODES.PERMISSION_BLOCKED] = 'The required permissions were not granted and ' + 'blocked instead.',\n _a[CODES.UNSUPPORTED_BROWSER] = \"This browser doesn't support the API's \" +\n 'required to use the firebase SDK.',\n _a[CODES.NOTIFICATIONS_BLOCKED] = 'Notifications have been blocked.',\n _a[CODES.FAILED_DEFAULT_REGISTRATION] = 'We are unable to register the ' +\n 'default service worker. {$browserErrorMessage}',\n _a[CODES.SW_REGISTRATION_EXPECTED] = 'A service worker registration was the ' + 'expected input.',\n _a[CODES.GET_SUBSCRIPTION_FAILED] = 'There was an error when trying to get ' +\n 'any existing Push Subscriptions.',\n _a[CODES.INVALID_SAVED_TOKEN] = 'Unable to access details of the saved token.',\n _a[CODES.SW_REG_REDUNDANT] = 'The service worker being used for push was made ' + 'redundant.',\n _a[CODES.TOKEN_SUBSCRIBE_FAILED] = 'A problem occured while subscribing the ' + 'user to FCM: {$message}',\n _a[CODES.TOKEN_SUBSCRIBE_NO_TOKEN] = 'FCM returned no token when subscribing ' + 'the user to push.',\n _a[CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET] = 'FCM returned an invalid response ' + 'when getting an FCM token.',\n _a[CODES.USE_SW_BEFORE_GET_TOKEN] = 'You must call useServiceWorker() before ' +\n 'calling getToken() to ensure your service worker is used.',\n _a[CODES.INVALID_DELETE_TOKEN] = 'You must pass a valid token into ' +\n 'deleteToken(), i.e. the token from getToken().',\n _a[CODES.DELETE_TOKEN_NOT_FOUND] = 'The deletion attempt for token could not ' +\n 'be performed as the token was not found.',\n _a[CODES.DELETE_SCOPE_NOT_FOUND] = 'The deletion attempt for service worker ' +\n 'scope could not be performed as the scope was not found.',\n _a[CODES.BG_HANDLER_FUNCTION_EXPECTED] = 'The input to ' + 'setBackgroundMessageHandler() must be a function.',\n _a[CODES.NO_WINDOW_CLIENT_TO_MSG] = 'An attempt was made to message a ' + 'non-existant window client.',\n _a[CODES.UNABLE_TO_RESUBSCRIBE] = 'There was an error while re-subscribing ' +\n 'the FCM token for push messaging. Will have to resubscribe the ' +\n 'user on next visit. {$message}',\n _a[CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE] = 'Could not find an FCM token ' +\n 'and as a result, unable to resubscribe. Will have to resubscribe the ' +\n 'user on next visit.',\n _a[CODES.FAILED_TO_DELETE_TOKEN] = 'Unable to delete the currently saved token.',\n _a[CODES.NO_SW_IN_REG] = 'Even though the service worker registration was ' +\n 'successful, there was a problem accessing the service worker itself.',\n _a[CODES.INCORRECT_GCM_SENDER_ID] = \"Please change your web app manifest's \" +\n \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\",\n _a[CODES.BAD_SCOPE] = 'The service worker scope must be a string with at ' +\n 'least one character.',\n _a[CODES.BAD_VAPID_KEY] = 'The public VAPID key must be a string with at ' + 'least one character.',\n _a[CODES.BAD_SUBSCRIPTION] = 'The subscription must be a valid ' + 'PushSubscription.',\n _a[CODES.BAD_TOKEN] = 'The FCM Token used for storage / lookup was not ' +\n 'a valid token string.',\n _a[CODES.BAD_PUSH_SET] = 'The FCM push set used for storage / lookup was not ' +\n 'not a valid push set string.',\n _a[CODES.FAILED_DELETE_VAPID_KEY] = 'The VAPID key could not be deleted.',\n _a);\nexport default {\n codes: CODES,\n map: ERROR_MAP\n};\nvar _a;\n\n//# sourceMappingURL=errors.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/errors.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar FCM_APPLICATION_SERVER_KEY = [\n 0x04,\n 0x33,\n 0x94,\n 0xf7,\n 0xdf,\n 0xa1,\n 0xeb,\n 0xb1,\n 0xdc,\n 0x03,\n 0xa2,\n 0x5e,\n 0x15,\n 0x71,\n 0xdb,\n 0x48,\n 0xd3,\n 0x2e,\n 0xed,\n 0xed,\n 0xb2,\n 0x34,\n 0xdb,\n 0xb7,\n 0x47,\n 0x3a,\n 0x0c,\n 0x8f,\n 0xc4,\n 0xcc,\n 0xe1,\n 0x6f,\n 0x3c,\n 0x8c,\n 0x84,\n 0xdf,\n 0xab,\n 0xb6,\n 0x66,\n 0x3e,\n 0xf2,\n 0x0c,\n 0xd4,\n 0x8b,\n 0xfe,\n 0xe3,\n 0xf9,\n 0x76,\n 0x2f,\n 0x14,\n 0x1c,\n 0x63,\n 0x08,\n 0x6a,\n 0x6f,\n 0x2d,\n 0xb1,\n 0x1a,\n 0x95,\n 0xb0,\n 0xce,\n 0x37,\n 0xc0,\n 0x9c,\n 0x6e\n];\nvar SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\nexport default {\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n};\n\n//# sourceMappingURL=fcm-details.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/fcm-details.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nimport { ErrorFactory } from '@firebase/util';\nimport Errors from './errors';\nimport arrayBufferToBase64 from '../helpers/array-buffer-to-base64';\nimport FCMDetails from './fcm-details';\nvar FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nvar FCM_TOKEN_DETAILS_DB_VERSION = 1;\nvar TokenManager = /** @class */ (function () {\n function TokenManager() {\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n this.openDbPromise_ = null;\n }\n /**\n * Get the indexedDB as a promsie.\n * @private\n * @return {Promise} The IndexedDB database\n */\n TokenManager.prototype.openDatabase_ = function () {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n this.openDbPromise_ = new Promise(function (resolve, reject) {\n var request = indexedDB.open(TokenManager.DB_NAME, FCM_TOKEN_DETAILS_DB_VERSION);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n request.onupgradeneeded = function (event) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n return this.openDbPromise_;\n };\n /**\n * Close the currently open database.\n * @return {Promise} Returns the result of the promise chain.\n */\n TokenManager.prototype.closeDatabase = function () {\n var _this = this;\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(function (db) {\n db.close();\n _this.openDbPromise_ = null;\n });\n }\n return Promise.resolve();\n };\n /**\n * Given a token, this method will look up the details in indexedDB.\n * @public\n * @param {string} fcmToken\n * @return {Promise} The details associated with that token.\n */\n TokenManager.prototype.getTokenDetailsFromToken = function (fcmToken) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var index = objectStore.index('fcmToken');\n var request = index.get(fcmToken);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getTokenDetailsFromSWScope_ = function (swScope) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = function (event) {\n reject(event.target.error);\n };\n scopeRequest.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getAllTokenDetailsForSenderId_ = function (senderId) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var senderIdTokens = [];\n var cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n }\n else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n };\n /**\n * Given a PushSubscription and messagingSenderId, get an FCM token.\n * @public\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\n * @param {string=} pushSet If defined this will swap the subscription for\n * matching FCM token.\n * @return {Promise} Returns the FCM token to be used in place\n * of the PushSubscription.\n */\n TokenManager.prototype.subscribeToFCM = function (senderId, subscription, pushSet) {\n var _this = this;\n var p256dh = arrayBufferToBase64(subscription['getKey']('p256dh'));\n var auth = arrayBufferToBase64(subscription['getKey']('auth'));\n var fcmSubscribeBody = \"authorized_entity=\" + senderId + \"&\" +\n (\"endpoint=\" + subscription.endpoint + \"&\") +\n (\"encryption_key=\" + p256dh + \"&\") +\n (\"encryption_auth=\" + auth);\n if (pushSet) {\n fcmSubscribeBody += \"&pushSet=\" + pushSet;\n }\n var headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n var subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n return fetch(FCMDetails.ENDPOINT + '/fcm/connect/subscribe', subscribeOptions)\n .then(function (response) { return response.json(); })\n .then(function (response) {\n var fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n var message = fcmTokenResponse['error']['message'];\n throw _this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n if (!fcmTokenResponse['token']) {\n throw _this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_NO_TOKEN);\n }\n if (!fcmTokenResponse['pushSet']) {\n throw _this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);\n }\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n };\n /**\n * Checks the that fields in the PushSubscription are equivalent to the\n * details stores in the masterTokenDetails.\n * @private\n * @param {PushSubscription} subscription The push subscription we expect\n * the master token to match.\n * @param {Object} masterTokenDetails The saved details we wish to compare\n * with the PushSubscription\n * @return {boolean} true if the subscription and token details are\n * equivalent.\n */\n TokenManager.prototype.isSameSubscription_ = function (subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return (subscription.endpoint === masterTokenDetails['endpoint'] &&\n arrayBufferToBase64(subscription['getKey']('auth')) ===\n masterTokenDetails['auth'] &&\n arrayBufferToBase64(subscription['getKey']('p256dh')) ===\n masterTokenDetails['p256dh']);\n };\n /**\n * Save the details for the fcm token for re-use at a later date.\n * @private\n * @param {string} senderId The 'messagingSenderId' used for this project\n * @param {ServiceWorkerRegistration} swRegistration The service worker\n * used to subscribe the user for web push\n * @param {PushSubscription} subscription The push subscription passed to\n * FCM for the current token.\n * @param {string} fcmToken The FCM token currently used on this\n * device.\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\n * @return {Promise}\n */\n TokenManager.prototype.saveTokenDetails_ = function (senderId, swRegistration, subscription, fcmToken, fcmPushSet) {\n var details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: arrayBufferToBase64(subscription['getKey']('auth')),\n p256dh: arrayBufferToBase64(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.put(details);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve();\n };\n });\n });\n };\n /**\n * Returns the saved FCM Token if one is available and still valid,\n * otherwise `null` is returned.\n * @param {string} senderId This should be the sender ID associated with the\n * FCM Token being retrieved.\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\n * to subscribe the user to push.\n * @return {Promise | Promise} Returns the saved FCM Token if\n * avilable and valid.\n * @export\n */\n TokenManager.prototype.getSavedToken = function (senderId, swRegistration) {\n var _this = this;\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED));\n }\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.BAD_SENDER_ID));\n }\n return this.getAllTokenDetailsForSenderId_(senderId)\n .then(function (allTokenDetails) {\n if (allTokenDetails.length === 0) {\n return;\n }\n var index = allTokenDetails.findIndex(function (tokenDetails) {\n return (swRegistration.scope === tokenDetails['swScope'] &&\n senderId === tokenDetails['fcmSenderId']);\n });\n if (index === -1) {\n return;\n }\n return allTokenDetails[index];\n })\n .then(function (tokenDetails) {\n if (!tokenDetails) {\n return;\n }\n return swRegistration.pushManager\n .getSubscription()\n .catch(function (err) {\n throw _this.errorFactory_.create(Errors.codes.GET_SUBSCRIPTION_FAILED);\n })\n .then(function (subscription) {\n if (subscription &&\n _this.isSameSubscription_(subscription, tokenDetails)) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n };\n /**\n * Creates a new FCM token.\n */\n TokenManager.prototype.createToken = function (senderId, swRegistration) {\n var _this = this;\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.BAD_SENDER_ID));\n }\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED));\n }\n // Check for existing subscription first\n var subscription;\n var fcmTokenDetails;\n return swRegistration.pushManager\n .getSubscription()\n .then(function (subscription) {\n if (subscription) {\n return subscription;\n }\n return swRegistration.pushManager.subscribe(FCMDetails.SUBSCRIPTION_OPTIONS);\n })\n .then(function (sub) {\n subscription = sub;\n return _this.subscribeToFCM(senderId, subscription);\n })\n .then(function (tokenDetails) {\n fcmTokenDetails = tokenDetails;\n return _this.saveTokenDetails_(senderId, swRegistration, subscription, fcmTokenDetails['token'], fcmTokenDetails['pushSet']);\n })\n .then(function () { return fcmTokenDetails['token']; });\n };\n /**\n * This method deletes details of the current FCM token.\n * It's returning a promise in case we need to move to an async\n * method for deleting at a later date.\n * @param {string} token Token to be deleted\n * @return {Promise} Resolves once the FCM token details have been\n * deleted and returns the deleted details.\n */\n TokenManager.prototype.deleteToken = function (token) {\n var _this = this;\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.INVALID_DELETE_TOKEN));\n }\n return this.getTokenDetailsFromToken(token).then(function (details) {\n if (!details) {\n throw _this.errorFactory_.create(Errors.codes.DELETE_TOKEN_NOT_FOUND);\n }\n return _this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.delete(details['swScope']);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n if (event.target.result === 0) {\n reject(_this.errorFactory_.create(Errors.codes.FAILED_TO_DELETE_TOKEN));\n return;\n }\n resolve(details);\n };\n });\n });\n });\n };\n return TokenManager;\n}());\nexport default TokenManager;\n\n//# sourceMappingURL=token-manager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/token-manager.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nimport { ErrorFactory } from '@firebase/util';\nimport Errors from '../models/errors';\nimport TokenManager from '../models/token-manager';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\nvar SENDER_ID_OPTION_NAME = 'messagingSenderId';\nvar ControllerInterface = /** @class */ (function () {\n /**\n * An interface of the Messaging Service API\n * @param {!firebase.app.App} app\n */\n function ControllerInterface(app) {\n var _this = this;\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n if (!app.options[SENDER_ID_OPTION_NAME] ||\n typeof app.options[SENDER_ID_OPTION_NAME] !== 'string') {\n throw this.errorFactory_.create(Errors.codes.BAD_SENDER_ID);\n }\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n this.tokenManager_ = new TokenManager();\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = function () { return _this.delete; };\n }\n /**\n * @export\n * @return {Promise | Promise} Returns a promise that\n * resolves to an FCM token.\n */\n ControllerInterface.prototype.getToken = function () {\n var _this = this;\n // Check with permissions\n var currentPermission = this.getNotificationPermission_();\n if (currentPermission !== NOTIFICATION_PERMISSION.granted) {\n if (currentPermission === NOTIFICATION_PERMISSION.denied) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.NOTIFICATIONS_BLOCKED));\n }\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n return this.getSWRegistration_().then(function (registration) {\n return _this.tokenManager_\n .getSavedToken(_this.messagingSenderId_, registration)\n .then(function (token) {\n if (token) {\n return token;\n }\n return _this.tokenManager_.createToken(_this.messagingSenderId_, registration);\n });\n });\n };\n /**\n * This method deletes tokens that the token manager looks after and then\n * unregisters the push subscription if it exists.\n * @export\n * @param {string} token\n * @return {Promise}\n */\n ControllerInterface.prototype.deleteToken = function (token) {\n var _this = this;\n return this.tokenManager_.deleteToken(token).then(function () {\n return _this.getSWRegistration_()\n .then(function (registration) {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n })\n .then(function (subscription) {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n };\n ControllerInterface.prototype.getSWRegistration_ = function () {\n throw this.errorFactory_.create(Errors.codes.SHOULD_BE_INHERITED);\n };\n //\n // The following methods should only be available in the window.\n //\n ControllerInterface.prototype.requestPermission = function () {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!ServiceWorkerRegistration} registration\n */\n ControllerInterface.prototype.useServiceWorker = function (registration) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver\n * @param {function(!Error)=} optError\n * @param {function()=} optCompleted\n * @return {!function()}\n */\n ControllerInterface.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n ControllerInterface.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n //\n // The following methods are used by the service worker only.\n //\n /**\n * @export\n * @param {function(Object)} callback\n */\n ControllerInterface.prototype.setBackgroundMessageHandler = function (callback) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_SW);\n };\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n /**\n * This method is required to adhere to the Firebase interface.\n * It closes any currently open indexdb database connections.\n */\n ControllerInterface.prototype.delete = function () {\n return this.tokenManager_.closeDatabase();\n };\n /**\n * Returns the current Notification Permission state.\n * @private\n * @return {string} The currenct permission state.\n */\n ControllerInterface.prototype.getNotificationPermission_ = function () {\n return Notification.permission;\n };\n /**\n * @protected\n * @returns {TokenManager}\n */\n ControllerInterface.prototype.getTokenManager = function () {\n return this.tokenManager_;\n };\n return ControllerInterface;\n}());\nexport default ControllerInterface;\n\n//# sourceMappingURL=controller-interface.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/controllers/controller-interface.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\nvar PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nvar msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\nvar createNewMsg = function (msgType, msgData) {\n var message = (_a = {},\n _a[PARAMS.TYPE_OF_MSG] = msgType,\n _a[PARAMS.DATA] = msgData,\n _a);\n return message;\n var _a;\n};\nexport default {\n PARAMS: PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg: createNewMsg\n};\n\n//# sourceMappingURL=worker-page-message.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/worker-page-message.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nexport default {\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n};\n\n//# sourceMappingURL=default-sw.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/default-sw.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport DefaultSW from '../models/default-sw';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\nimport { createSubscribe } from '@firebase/util';\nvar WindowController = /** @class */ (function (_super) {\n __extends(WindowController, _super);\n /**\n * A service that provides a MessagingService instance.\n * @param {!firebase.app.App} app\n */\n function WindowController(app) {\n var _this = _super.call(this, app) || this;\n /**\n * @private\n * @type {ServiceWorkerRegistration}\n */\n _this.registrationToUse_;\n /**\n * @private\n * @type {Promise}\n */\n _this.manifestCheckPromise_;\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.messageObserver_ = null;\n /**\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\n * observer.\n */\n _this.onMessage_ = createSubscribe(function (observer) {\n _this.messageObserver_ = observer;\n });\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.tokenRefreshObserver_ = null;\n _this.onTokenRefresh_ = createSubscribe(function (observer) {\n _this.tokenRefreshObserver_ = observer;\n });\n _this.setupSWMessageListener_();\n return _this;\n }\n /**\n * This method returns an FCM token if it can be generated.\n * The return promise will reject if the browser doesn't support\n * FCM, if permission is denied for notifications or it's not\n * possible to generate a token.\n * @export\n * @return {Promise | Promise} Returns a promise the\n * resolves to an FCM token or null if permission isn't granted.\n */\n WindowController.prototype.getToken = function () {\n var _this = this;\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.UNSUPPORTED_BROWSER));\n }\n return this.manifestCheck_().then(function () {\n return _super.prototype.getToken.call(_this);\n });\n };\n /**\n * The method checks that a manifest is defined and has the correct GCM\n * sender ID.\n * @private\n * @return {Promise} Returns a promise that resolves if the manifest matches\n * our required sender ID\n */\n WindowController.prototype.manifestCheck_ = function () {\n var _this = this;\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n var manifestTag = document.querySelector('link[rel=\"manifest\"]');\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n }\n else {\n this.manifestCheckPromise_ = fetch(manifestTag.href)\n .then(function (response) {\n return response.json();\n })\n .catch(function () {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n })\n .then(function (manifestContent) {\n if (!manifestContent) {\n return;\n }\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw _this.errorFactory_.create(Errors.codes.INCORRECT_GCM_SENDER_ID);\n }\n });\n }\n return this.manifestCheckPromise_;\n };\n /**\n * Request permission if it is not currently granted\n * @export\n * @returns {Promise} Resolves if the permission was granted, otherwise\n * rejects\n */\n WindowController.prototype.requestPermission = function () {\n var _this = this;\n if (Notification.permission === NOTIFICATION_PERMISSION.granted) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var managePermissionResult = function (result) {\n if (result === NOTIFICATION_PERMISSION.granted) {\n return resolve();\n }\n else if (result === NOTIFICATION_PERMISSION.denied) {\n return reject(_this.errorFactory_.create(Errors.codes.PERMISSION_BLOCKED));\n }\n else {\n return reject(_this.errorFactory_.create(Errors.codes.PERMISSION_DEFAULT));\n }\n };\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n var permissionPromise = Notification.requestPermission(function (result) {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n managePermissionResult(result);\n });\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n };\n /**\n * This method allows a developer to override the default service worker and\n * instead use a custom service worker.\n * @export\n * @param {!ServiceWorkerRegistration} registration The service worker\n * registration that should be used to receive the push messages.\n */\n WindowController.prototype.useServiceWorker = function (registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED);\n }\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(Errors.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n this.registrationToUse_ = registration;\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\n * or a function triggered on message.\n * @param {function(!Error)=} optError Optional A function triggered on\n * message error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n };\n /**\n * Given a registration, wait for the service worker it relates to\n * become activer\n * @private\n * @param {ServiceWorkerRegistration} registration Registration to wait\n * for service worker to become active\n * @return {Promise} Wait for service worker\n * registration to become active\n */\n WindowController.prototype.waitForRegistrationToActivate_ = function (registration) {\n var _this = this;\n var serviceWorker = registration.installing || registration.waiting || registration.active;\n return new Promise(function (resolve, reject) {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(_this.errorFactory_.create(Errors.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n return;\n }\n var stateChangeListener = function () {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n }\n else if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n }\n else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n };\n /**\n * This will regiater the default service worker and return the registration\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n WindowController.prototype.getSWRegistration_ = function () {\n var _this = this;\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n return navigator.serviceWorker\n .register(DefaultSW.path, {\n scope: DefaultSW.scope\n })\n .catch(function (err) {\n throw _this.errorFactory_.create(Errors.codes.FAILED_DEFAULT_REGISTRATION, {\n browserErrorMessage: err.message\n });\n })\n .then(function (registration) {\n return _this.waitForRegistrationToActivate_(registration).then(function () {\n _this.registrationToUse_ = registration;\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n return registration;\n });\n });\n };\n /**\n * This method will set up a message listener to handle\n * events from the service worker that should trigger\n * events in the page.\n *\n * @private\n */\n WindowController.prototype.setupSWMessageListener_ = function () {\n var _this = this;\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('message', function (event) {\n if (!event.data || !event.data[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n var workerPageMessage = event.data;\n switch (workerPageMessage[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n case WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n var pushMessage = workerPageMessage[WorkerPageMessage.PARAMS.DATA];\n _this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n }, false);\n };\n /**\n * Checks to see if the required API's are valid or not.\n * @private\n * @return {boolean} Returns true if the desired APIs are available.\n */\n WindowController.prototype.isSupported_ = function () {\n return ('serviceWorker' in navigator &&\n 'PushManager' in window &&\n 'Notification' in window &&\n 'fetch' in window &&\n ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') &&\n PushSubscription.prototype.hasOwnProperty('getKey'));\n };\n return WindowController;\n}(ControllerInterface));\nexport default WindowController;\n\n//# sourceMappingURL=window-controller.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/controllers/window-controller.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport FCMDetails from '../models/fcm-details';\nvar FCM_MSG = 'FCM_MSG';\nvar SWController = /** @class */ (function (_super) {\n __extends(SWController, _super);\n function SWController(app) {\n var _this = _super.call(this, app) || this;\n self.addEventListener('push', function (e) { return _this.onPush_(e); }, false);\n self.addEventListener('pushsubscriptionchange', function (e) { return _this.onSubChange_(e); }, false);\n self.addEventListener('notificationclick', function (e) { return _this.onNotificationClick_(e); }, false);\n /**\n * @private\n * @type {function(Object)|null}\n */\n _this.bgMessageHandler_ = null;\n return _this;\n }\n /**\n * A handler for push events that shows notifications based on the content of\n * the payload.\n *\n * The payload must be a JSON-encoded Object with a `notification` key. The\n * value of the `notification` property will be used as the NotificationOptions\n * object passed to showNotification. Additionally, the `title` property of the\n * notification object will be used as the title.\n *\n * If there is no notification data in the payload then no notification will be\n * shown.\n * @private\n */\n SWController.prototype.onPush_ = function (event) {\n var _this = this;\n var msgPayload;\n try {\n msgPayload = event.data.json();\n }\n catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n var handleMsgPromise = this.hasVisibleClients_().then(function (hasVisibleClients) {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || _this.bgMessageHandler_) {\n // Send to page\n return _this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n var notificationDetails = _this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n var notificationTitle = notificationDetails.title || '';\n return self.registration.showNotification(notificationTitle, notificationDetails);\n }\n else if (_this.bgMessageHandler_) {\n return _this.bgMessageHandler_(msgPayload);\n }\n });\n event.waitUntil(handleMsgPromise);\n };\n /**\n * @private\n */\n SWController.prototype.onSubChange_ = function (event) {\n var _this = this;\n var promiseChain = this.getToken().then(function (token) {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw _this.errorFactory_.create(Errors.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);\n }\n var tokenDetails = null;\n var tokenManager = _this.getTokenManager();\n return tokenManager\n .getTokenDetailsFromToken(token)\n .then(function (details) {\n tokenDetails = details;\n if (!tokenDetails) {\n throw _this.errorFactory_.create(Errors.codes.INVALID_SAVED_TOKEN);\n }\n // Attempt to get a new subscription\n return self.registration.pushManager.subscribe(FCMDetails.SUBSCRIPTION_OPTIONS);\n })\n .then(function (newSubscription) {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(tokenDetails.fcmSenderId, newSubscription, tokenDetails.fcmPushSet);\n })\n .catch(function (err) {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(function () {\n throw _this.errorFactory_.create(Errors.codes.UNABLE_TO_RESUBSCRIBE, {\n message: err\n });\n });\n });\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n */\n SWController.prototype.onNotificationClick_ = function (event) {\n var _this = this;\n if (!(event.notification &&\n event.notification.data &&\n event.notification.data[FCM_MSG])) {\n // Not an FCM notification, do nothing.\n return;\n }\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n event.notification.close();\n var msgPayload = event.notification.data[FCM_MSG];\n var clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n var promiseChain = this.getWindowClient_(clickAction)\n .then(function (windowClient) {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return self.clients.openWindow(clickAction);\n }\n return windowClient;\n })\n .then(function (windowClient) {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n // Delete notification data from payload before sending to the page.\n var notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n var internalMsg = WorkerPageMessage.createNewMsg(WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED, msgPayload);\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return _this.attemptToMessageClient_(windowClient, internalMsg);\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n * @param {Object} msgPayload\n * @return {NotificationOptions|undefined}\n */\n SWController.prototype.getNotificationData_ = function (msgPayload) {\n if (!msgPayload) {\n return;\n }\n if (typeof msgPayload.notification !== 'object') {\n return;\n }\n var notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = (_a = {},\n _a[FCM_MSG] = msgPayload,\n _a);\n return notificationInformation;\n var _a;\n };\n /**\n * Calling setBackgroundMessageHandler will opt in to some specific\n * behaviours.\n * 1.) If a notification doesn't need to be shown due to a window already\n * being visible, then push messages will be sent to the page.\n * 2.) If a notification needs to be shown, and the message contains no\n * notification data this method will be called\n * and the promise it returns will be passed to event.waitUntil.\n * If you do not set this callback then all push messages will let and the\n * developer can handle them in a their own 'push' event callback\n * @export\n * @param {function(Object)} callback The callback to be called when a push\n * message is received and a notification must be shown. The callback will\n * be given the data from the push message.\n */\n SWController.prototype.setBackgroundMessageHandler = function (callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(Errors.codes.BG_HANDLER_FUNCTION_EXPECTED);\n }\n this.bgMessageHandler_ = callback;\n };\n /**\n * @private\n * @param {string} url The URL to look for when focusing a client.\n * @return {Object} Returns an existing window client or a newly opened\n * WindowClient.\n */\n SWController.prototype.getWindowClient_ = function (url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n var parsedURL = new URL(url).href;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var suitableClient = null;\n for (var i = 0; i < clientList.length; i++) {\n var parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n };\n /**\n * This message will attempt to send the message to a window client.\n * @private\n * @param {Object} client The WindowClient to send the message to.\n * @param {Object} message The message to send to the client.\n * @returns {Promise} Returns a promise that resolves after sending the\n * message. This does not guarantee that the message was successfully\n * received.\n */\n SWController.prototype.attemptToMessageClient_ = function (client, message) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!client) {\n return reject(_this.errorFactory_.create(Errors.codes.NO_WINDOW_CLIENT_TO_MSG));\n }\n client.postMessage(message);\n resolve();\n });\n };\n /**\n * @private\n * @returns {Promise} If there is currently a visible WindowClient,\n * this method will resolve to true, otherwise false.\n */\n SWController.prototype.hasVisibleClients_ = function () {\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n return clientList.some(function (client) { return client.visibilityState === 'visible'; });\n });\n };\n /**\n * @private\n * @param {Object} msgPayload The data from the push event that should be sent\n * to all available pages.\n * @returns {Promise} Returns a promise that resolves once the message\n * has been sent to all WindowClients.\n */\n SWController.prototype.sendMessageToWindowClients_ = function (msgPayload) {\n var _this = this;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var internalMsg = WorkerPageMessage.createNewMsg(WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED, msgPayload);\n return Promise.all(clientList.map(function (client) {\n return _this.attemptToMessageClient_(client, internalMsg);\n }));\n });\n };\n /**\n * This will register the default service worker and return the registration.\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n SWController.prototype.getSWRegistration_ = function () {\n return Promise.resolve(self.registration);\n };\n return SWController;\n}(ControllerInterface));\nexport default SWController;\n\n//# sourceMappingURL=sw-controller.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/controllers/sw-controller.js\n// module id = null\n// module chunks = "],"sourceRoot":""} \ No newline at end of file diff --git a/lib/firebase/firebase-storage-externs.js b/lib/firebase/firebase-storage-externs.js index 970e8c1f..fceb0c5c 100644 --- a/lib/firebase/firebase-storage-externs.js +++ b/lib/firebase/firebase-storage-externs.js @@ -1,25 +1,21 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ */ - -/** -* Copyright 2017 Google Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ +/** + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /** * @fileoverview Firebase Storage API. - * Version: 4.2.0 + * Version: ${JSCORE_VERSION} * * Copyright 2017 Google Inc. All Rights Reserved. * @@ -236,8 +232,10 @@ firebase.storage.StringFormat = { * doesn't conform to the specified format. */ firebase.storage.Reference.prototype.putString = function( - data, format, metadata) {}; - + data, + format, + metadata +) {}; /** * Deletes the object at this reference's location. @@ -265,7 +263,6 @@ firebase.storage.Reference.prototype.getMetadata = function() {}; */ firebase.storage.Reference.prototype.updateMetadata = function(metadata) {}; - /** * Fetches a long lived download URL for this object. * @return {!firebase.Promise} A Promise that resolves with the download @@ -274,7 +271,6 @@ firebase.storage.Reference.prototype.updateMetadata = function(metadata) {}; */ firebase.storage.Reference.prototype.getDownloadURL = function() {}; - /** * A reference pointing to the parent location of this reference, or null if * this reference is the root. @@ -282,7 +278,6 @@ firebase.storage.Reference.prototype.getDownloadURL = function() {}; */ firebase.storage.Reference.prototype.parent; - /** * A reference to the root of this reference's bucket. * @type {!firebase.storage.Reference} @@ -314,7 +309,6 @@ firebase.storage.Reference.prototype.name; */ firebase.storage.Reference.prototype.storage; - /** * Object metadata that can be set at any time. * @interface @@ -488,8 +482,10 @@ firebase.storage.UploadTask = function() {}; * @param {(?function(!Error):*)=} onRejected The rejection callback. * @return {!firebase.Promise} */ -firebase.storage.UploadTask.prototype.then = function(onFulfilled, onRejected) { -}; +firebase.storage.UploadTask.prototype.then = function( + onFulfilled, + onRejected +) {}; /** * Equivalent to calling `then(null, onRejected)`. @@ -606,7 +602,11 @@ firebase.storage.UploadTask.prototype.catch = function(onRejected) {}; * callbacks. */ firebase.storage.UploadTask.prototype.on = function( - event, nextOrObserver, error, complete) {}; + event, + nextOrObserver, + error, + complete +) {}; /** * Resumes a paused task. Has no effect on a running or failed task. @@ -680,4 +680,4 @@ firebase.storage.UploadTaskSnapshot.prototype.task; * The reference that spawned this snapshot's upload task. * @type {!firebase.storage.Reference} */ -firebase.storage.UploadTaskSnapshot.prototype.ref; \ No newline at end of file +firebase.storage.UploadTaskSnapshot.prototype.ref; diff --git a/lib/firebase/firebase-storage.js b/lib/firebase/firebase-storage.js index d9afefc7..e30a6153 100644 --- a/lib/firebase/firebase-storage.js +++ b/lib/firebase/firebase-storage.js @@ -1,6 +1,7 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ */ - -try{webpackJsonpFirebase([1],{23:function(t,e,n){"use strict";function r(t){return"storage/"+t}function o(){return new $t(te.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function i(t){return new $t(te.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function a(t){return new $t(te.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function u(){return new $t(te.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}function s(t){return new $t(te.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function c(){return new $t(te.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function l(){return new $t(te.CANCELED,"User canceled the upload/download.")}function p(t){return new $t(te.INVALID_URL,"Invalid URL '"+t+"'.")}function h(t){return new $t(te.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function f(){return new $t(te.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function d(){return new $t(te.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function _(){return new $t(te.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function v(t,e,n){return new $t(te.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function b(t,e,n,r){var o,i;return t===e?(o=t,i=1===t?"argument":"arguments"):(o="between "+t+" and "+e,i="arguments"),new $t(te.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+o+" "+i+", received "+r+".")}function m(){return new $t(te.APP_DELETED,"The Firebase app was deleted.")}function y(t){return new $t(te.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function g(t,e){return new $t(te.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function R(t){throw new $t(te.INTERNAL_ERROR,"Internal error: "+t)}function E(t){switch(t){case ee.RAW:case ee.BASE64:case ee.BASE64URL:case ee.DATA_URL:return;default:throw"Expected one of the event types: ["+ee.RAW+", "+ee.BASE64+", "+ee.BASE64URL+", "+ee.DATA_URL+"]."}}function w(t,e){switch(t){case ee.RAW:return new ne(U(e));case ee.BASE64:case ee.BASE64URL:return new ne(A(t,e));case ee.DATA_URL:return new ne(N(e),O(e))}throw o()}function U(t){for(var e=[],n=0;n>6,128|63&r);else if(55296==(64512&r)){var o=n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189)}else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function T(t){var e;try{e=decodeURIComponent(t)}catch(t){throw g(ee.DATA_URL,"Malformed data URL.")}return U(e)}function A(t,e){switch(t){case ee.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r){var o=n?"-":"_";throw g(t,"Invalid character '"+o+"' found: is it base64url encoded?")}break;case ee.BASE64URL:var i=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(i||a){var o=i?"+":"/";throw g(t,"Invalid character '"+o+"' found: is it base64 encoded?")}e=e.replace(/-/g,"+").replace(/_/g,"/")}var u;try{u=atob(e)}catch(e){throw g(t,"Invalid character found")}for(var s=new Uint8Array(u.length),c=0;c=e.length)&&t.substring(t.length-e.length)===e}function S(t){switch(t){case ie.RUNNING:case ie.PAUSING:case ie.CANCELING:return ae.RUNNING;case ie.PAUSED:return ae.PAUSED;case ie.SUCCESS:return ae.SUCCESS;case ie.CANCELED:return ae.CANCELED;case ie.ERROR:default:return ae.ERROR}}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function I(t,e){for(var n in t)k(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return I(t,function(t,n){e[t]=n}),e}function x(t){return new ue.b(t)}function P(t){return ue.b.resolve(t)}function D(t){return ue.b.reject(t)}function M(t){return null!=t}function W(t){return void 0!==t}function B(t){return"function"==typeof t}function G(t){return"object"===(void 0===t?"undefined":se(t))}function j(t){return G(t)&&null!==t}function q(t){return G(t)&&!Array.isArray(t)}function F(t){return"string"==typeof t||t instanceof String}function H(t){return"number"==typeof t||t instanceof Number}function z(t){return X()&&t instanceof Blob}function X(){return"undefined"!=typeof Blob}function V(t){var e;try{e=JSON.parse(t)}catch(t){return null}return q(e)?e:null}function K(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}function Z(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}function J(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function Q(t){return Xt+Kt+t}function Y(t){return Vt+Kt+t}function $(t){return Xt+Zt+t}function tt(t){var e=encodeURIComponent,n="?";return I(t,function(t,r){var o=e(t)+"="+e(r);n=n+o+"&"}),n=n.slice(0,-1)}function et(t,e){return e}function nt(t){return!F(t)||t.length<2?t:(t=t,J(t))}function rt(){function t(t,e){return nt(e)}function e(t,e){return M(e)?+e:e}function n(t,e){if(!(F(e)&&e.length>0))return[];var n=encodeURIComponent;return e.split(",").map(function(e){var r=t.bucket,o=t.fullPath;return Y("/b/"+n(r)+"/o/"+n(o))+tt({alt:"media",token:e})})}if(fe)return fe;var r=[];r.push(new he("bucket")),r.push(new he("generation")),r.push(new he("metageneration")),r.push(new he("name","fullPath",!0));var o=new he("name");o.xform=t,r.push(o);var i=new he("size");return i.xform=e,r.push(i),r.push(new he("timeCreated")),r.push(new he("updated")),r.push(new he("md5Hash",null,!0)),r.push(new he("cacheControl",null,!0)),r.push(new he("contentDisposition",null,!0)),r.push(new he("contentEncoding",null,!0)),r.push(new he("contentLanguage",null,!0)),r.push(new he("contentType",null,!0)),r.push(new he("metadata","customMetadata",!0)),r.push(new he("downloadTokens","downloadURLs",!1,n)),fe=r}function ot(t,e){function n(){var n=t.bucket,r=t.fullPath,o=new pe(n,r);return e.makeStorageReference(o)}Object.defineProperty(t,"ref",{get:n})}function it(t,e,n){var r={};r.type="file";for(var o=n.length,i=0;i=0))throw"Expected a number 0 or greater."}return new de(t)}function _t(t,e){function n(e){if(!(null===e||M(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)}return new de(n,e)}function vt(t){function e(t){if(null!==t&&!B(t))throw"Expected a Function."}return new de(e,t)}function bt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function mt(){for(var t=[],e=0;e0&&(p=Math.min(p,o));var h=c.current,_=h+p,v=p===l?"upload, finalize":"upload",b={"X-Goog-Upload-Command":v,"X-Goog-Upload-Offset":c.current},m=r.slice(h,_);if(null===m)throw f();var y=e.maxUploadRetryTime(),g=new ve(n,"POST",s,y);return g.headers=b,g.body=m.uploadData(),g.progressCallback=u||null,g.errorHandler=Tt(t),g}function Mt(t){return function(){for(var e=[],n=0;n0&&(t.Authorization="Firebase "+e)}function jt(t){var e="undefined"!=typeof firebase?firebase.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,i=L(t.headers);return Gt(i,e),jt(i),new Te(o,t.method,i,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}function Ft(t,e,n){return new Ne(t,new le,n)}function Ht(t){var e={TaskState:ae,TaskEvent:oe,StringFormat:ee,Storage:Ne,Reference:Re};t.INTERNAL.registerService(Ce,Ft,e,void 0,!0)}Object.defineProperty(e,"__esModule",{value:!0});var zt,Xt="https://firebasestorage.googleapis.com",Vt="https://firebasestorage.googleapis.com",Kt="/v0",Zt="/v0",Jt=12e4,Qt=6e4,Yt=-9007199254740991,$t=function(){function t(t,e){this.t=r(t),this.e="Firebase Storage: "+e,this.n=null,this.r="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return r(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.n},t.prototype.setServerResponseProp=function(t){this.n=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.n},enumerable:!0,configurable:!0}),t}(),te={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},ee={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},ne=function(){function t(t,e){this.data=t,this.contentType=e||null}return t}(),re=function(){function t(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw g(ee.DATA_URL,"Must be formatted 'data:[][;base64],");var n=e[1]||null;null!=n&&(this.base64=C(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=t.substring(t.indexOf(",")+1)}return t}(),oe={STATE_CHANGED:"state_changed"},ie={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},ae={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},ue=n(4),se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(zt||(zt={}));var ce=function(){function t(){var t=this;this.o=!1,this.i=new XMLHttpRequest,this.a=zt.NO_ERROR,this.u=x(function(e,n){t.i.addEventListener("abort",function(n){t.a=zt.ABORT,e(t)}),t.i.addEventListener("error",function(n){t.a=zt.NETWORK_ERROR,e(t)}),t.i.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var o=this;if(this.o)throw R("cannot .send() more than once");return this.o=!0,this.i.open(e,t,!0),M(r)&&I(r,function(t,e){o.i.setRequestHeader(t,""+e)}),M(n)?this.i.send(n):this.i.send(),this.u},t.prototype.getErrorCode=function(){if(!this.o)throw R("cannot .getErrorCode() before sending");return this.a},t.prototype.getStatus=function(){if(!this.o)throw R("cannot .getStatus() before sending");try{return this.i.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.o)throw R("cannot .getResponseText() before sending");return this.i.responseText},t.prototype.abort=function(){this.i.abort()},t.prototype.getResponseHeader=function(t){return this.i.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.removeEventListener("progress",t)},t}(),le=function(){function t(){}return t.prototype.createXhrIo=function(){return new ce},t}(),pe=function(){function t(t,e){this.bucket=t,this.s=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.s},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw h(e)},t.makeFromUrl=function(e){function n(t){"/"===t.path.charAt(t.path.length-1)&&(t.s=t.s.slice(0,-1))}function r(t){t.s=decodeURIComponent(t.path)}for(var o=null,i=RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a={bucket:1,path:3},u=RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),s={bucket:1,path:3},c=[{regex:i,indices:a,postModify:n},{regex:u,indices:s,postModify:r}],l=0;l262144},t.prototype.W=function(){this.I===ie.RUNNING&&null===this.y&&(this.S?null===this.m?this.j():this.f?this.q():this.d?this.F():this.H():this.z())},t.prototype.X=function(t){var e=this;this.T.getAuthToken().then(function(n){switch(e.I){case ie.RUNNING:t(n);break;case ie.CANCELING:e.P(ie.CANCELED);break;case ie.PAUSING:e.P(ie.PAUSED)}})},t.prototype.j=function(){var t=this;this.X(function(e){var n=xt(t.T,t.A,t.C,t.N,t.O),r=t.T.makeRequest(n,e);t.y=r,r.getPromise().then(function(e){t.y=null,t.m=e,t.f=!1,t.x()},t.L)})},t.prototype.q=function(){var t=this,e=this.m;this.X(function(n){var r=Pt(t.T,t.A,e,t.N),o=t.T.makeRequest(r,n);t.y=o,o.getPromise().then(function(e){e=e,t.y=null,t.G(e.current),t.f=!1,e.finalized&&(t.d=!0),t.x()},t.L)})},t.prototype.H=function(){var t=this,e=262144*this.g,n=new be(this.h,this.N.size()),r=this.m;this.X(function(o){var i;try{i=Dt(t.A,t.T,r,t.N,e,t.C,n,t.B())}catch(e){return t.v=e,void t.P(ie.ERROR)}var a=t.T.makeRequest(i,o);t.y=a,a.getPromise().then(function(e){t.V(),t.y=null,t.G(e.current),e.finalized?(t.O=e.metadata,t.P(ie.SUCCESS)):t.x()},t.L)})},t.prototype.V=function(){262144*this.g<33554432&&(this.g*=2)},t.prototype.F=function(){var t=this;this.X(function(e){var n=Nt(t.T,t.A,t.C),r=t.T.makeRequest(n,e);t.y=r,r.getPromise().then(function(e){t.y=null,t.O=e,t.P(ie.SUCCESS)},t.D)})},t.prototype.z=function(){var t=this;this.X(function(e){var n=It(t.T,t.A,t.C,t.N,t.O),r=t.T.makeRequest(n,e);t.y=r,r.getPromise().then(function(e){t.y=null,t.O=e,t.G(t.N.size()),t.P(ie.SUCCESS)},t.L)})},t.prototype.G=function(t){var e=this.h;this.h=t,this.h!==e&&this.K()},t.prototype.P=function(t){if(this.I!==t)switch(t){case ie.CANCELING:case ie.PAUSING:this.I=t,null!==this.y&&this.y.cancel();break;case ie.RUNNING:var e=this.I===ie.PAUSED;this.I=t,e&&(this.K(),this.W());break;case ie.PAUSED:this.I=t,this.K();break;case ie.CANCELED:this.v=l(),this.I=t,this.K();break;case ie.ERROR:case ie.SUCCESS:this.I=t,this.K()}},t.prototype.x=function(){switch(this.I){case ie.PAUSING:this.P(ie.PAUSED);break;case ie.CANCELING:this.P(ie.CANCELED);break;case ie.RUNNING:this.W()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=S(this.I);return new ye(this.h,this.N.size(),t,this.O,this,this.U)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){function o(e){if(t!==oe.STATE_CHANGED)throw"Expected one of the event types: ["+oe.STATE_CHANGED+"]."}function i(t){try{return void c(t)}catch(t){}try{if(l(t),!(W(t.next)||W(t.error)||W(t.complete)))throw"";return}catch(t){throw s}}function a(t){function e(e,n,o){null!==t&&ct("on",t,arguments);var i=new me(e,n,r);return p.Z(i),function(){p.J(i)}}return e}function u(t){if(null===t)throw s;i(t)}void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var s="Expected a function or an Object with one of `next`, `error`, `complete` properties.",c=vt(!0).validator,l=_t(null,!0).validator;ct("on",[pt(o),_t(i,!0),vt(!0),vt(!0)],arguments);var p=this,h=[_t(u),vt(!0),vt(!0)];return W(e)||W(n)||W(r)?a(null)(e,n,r):a(h)},t.prototype.then=function(t,e){return this.M.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.Z=function(t){this._.push(t),this.Q(t)},t.prototype.J=function(t){Et(this._,t)},t.prototype.K=function(){var t=this;this.Y(),Rt(this._).forEach(function(e){t.Q(e)})},t.prototype.Y=function(){if(null!==this.R){var t=!0;switch(S(this.I)){case ae.SUCCESS:Mt(this.R.bind(null,this.snapshot))();break;case ae.CANCELED:case ae.ERROR:Mt(this.w.bind(null,this.v))();break;default:t=!1}t&&(this.R=null,this.w=null)}},t.prototype.Q=function(t){switch(S(this.I)){case ae.RUNNING:case ae.PAUSED:null!==t.next&&Mt(t.next.bind(t,this.snapshot))();break;case ae.SUCCESS:null!==t.complete&&Mt(t.complete.bind(t))();break;case ae.CANCELED:case ae.ERROR:null!==t.error&&Mt(t.error.bind(t,this.v))();break;default:null!==t.error&&Mt(t.error.bind(t,this.v))()}},t.prototype.resume=function(){ct("resume",[],arguments);var t=this.I===ie.PAUSED||this.I===ie.PAUSING;return t&&this.P(ie.RUNNING),t},t.prototype.pause=function(){ct("pause",[],arguments);var t=this.I===ie.RUNNING;return t&&this.P(ie.PAUSING),t},t.prototype.cancel=function(){ct("cancel",[],arguments);var t=this.I===ie.RUNNING||this.I===ie.PAUSING;return t&&this.P(ie.CANCELING),t},t}(),Re=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof pe?e:pe.makeFromUrl(e)}return t.prototype.toString=function(){return ct("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return rt()},t.prototype.child=function(t){ct("child",[pt()],arguments);var e=Z(this.location.path,t),n=new pe(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=K(this.location.path);if(null===t)return null;var e=new pe(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new pe(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),ct("put",[ht(),ft(!0)],arguments),this.$("put"),new ge(this,this.authWrapper,this.location,this.mappings(),new _e(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=ee.RAW),ct("putString",[pt(),pt(E,!0),ft(!0)],arguments),this.$("putString");var r=w(e,t),o=L(n);return!M(o.contentType)&&M(r.contentType)&&(o.contentType=r.contentType),new ge(this,this.authWrapper,this.location,this.mappings(),new _e(r.data,!0),o)},t.prototype.delete=function(){ct("delete",[],arguments),this.$("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Ct(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){ct("getMetadata",[],arguments),this.$("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Nt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){ct("updateMetadata",[ft()],arguments),this.$("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=Ot(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return ct("getDownloadURL",[],arguments),this.$("getDownloadURL"),this.getMetadata().then(function(t){var e=t.downloadURLs[0];if(M(e))return e;throw _()})},t.prototype.$=function(t){if(""===this.location.path)throw y(t)},t}(),Ee=function(){function t(t){this.M=D(t)}return t.prototype.getPromise=function(){return this.M},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),we=function(){function t(){this.tt={},this.et=Yt}return t.prototype.addRequest=function(t){function e(){delete r.tt[n]}var n=this.et;this.et++,this.tt[n]=t;var r=this;t.getPromise().then(e,e)},t.prototype.clear=function(){I(this.tt,function(t,e){e&&e.cancel(!0)}),this.tt={}},t}(),Ue=function(){function t(e,n,r,o,i){if(this.nt=null,this.rt=!1,this.ot=e,null!==this.ot){var a=this.ot.options;M(a)&&(this.nt=t.it(a))}this.ut=n,this.st=r,this.ct=i,this.lt=o,this.pt=Jt,this.ht=Qt,this.ft=new we}return t.it=function(t){var e=t.storageBucket||null;return null==e?null:pe.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.ot&&M(this.ot.INTERNAL)&&M(this.ot.INTERNAL.getToken)?this.ot.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):P(null)},t.prototype.bucket=function(){if(this.rt)throw m();return this.nt},t.prototype.service=function(){return this.lt},t.prototype.makeStorageReference=function(t){return this.ut(this,t)},t.prototype.makeRequest=function(t,e){if(this.rt)return new Ee(m());var n=this.st(t,e,this.ct);return this.ft.addRequest(n),n},t.prototype.deleteApp=function(){this.rt=!0,this.ot=null,this.ft.clear()},t.prototype.maxUploadRetryTime=function(){return this.ht},t.prototype.setMaxUploadRetryTime=function(t){this.ht=t},t.prototype.maxOperationRetryTime=function(){return this.pt},t.prototype.setMaxOperationRetryTime=function(t){this.pt=t},t}(),Te=function(){function t(t,e,n,r,o,i,a,u,s,c,l){this.dt=null,this._t=null,this.R=null,this.w=null,this.vt=!1,this.bt=!1,this.mt=t,this.yt=e,this.gt=n,this.Rt=r,this.Et=o.slice(),this.wt=i.slice(),this.Ut=a,this.Tt=u,this.At=c,this.Nt=s,this.ct=l;var p=this;this.M=x(function(t,e){p.R=t,p.w=e,p.W()})}return t.prototype.W=function(){function t(t,e){function r(t){var e=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.At&&n.At(e,r)}if(e)return void t(!1,new Ae(!1,null,!0));var o=n.ct.createXhrIo();n.dt=o,null!==n.At&&o.addUploadProgressListener(r),o.send(n.mt,n.yt,n.Rt,n.gt).then(function(e){null!==n.At&&e.removeUploadProgressListener(r),n.dt=null,e=e;var o=e.getErrorCode()===zt.NO_ERROR,i=e.getStatus();if(!o||n.Ot(i)){var a=e.getErrorCode()===zt.ABORT;return void t(!1,new Ae(!1,null,a))}var u=gt(n.Et,i);t(!0,new Ae(u,e))})}function e(t,e){var r=n.R,i=n.w,a=e.xhr;if(e.wasSuccessCode)try{var u=n.Ut(a,a.getResponseText());W(u)?r(u):r()}catch(t){i(t)}else if(null!==a){var s=o();s.setServerResponseProp(a.getResponseText()),i(n.Tt?n.Tt(a,s):s)}else if(e.canceled){var s=n.bt?m():l();i(s)}else{var s=c();i(s)}}var n=this;this.vt?e(!1,new Ae(!1,null,!0)):this._t=Wt(t,e,this.Nt)},t.prototype.getPromise=function(){return this.M},t.prototype.cancel=function(t){this.vt=!0,this.bt=t||!1,null!==this._t&&Bt(this._t),null!==this.dt&&this.dt.abort()},t.prototype.Ot=function(t){var e=t>=500&&t<600,n=[408,429],r=gt(n,t),o=gt(this.wt,t);return e||r||o},t}(),Ae=function(){function t(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}return t}(),Ne=function(){function t(t,e,n){function r(t,e){return new Re(t,e)}if(this.nt=null,this.T=new Ue(t,r,qt,this,e),this.ot=t,null!=n)this.nt=pe.makeFromBucketSpec(n);else{var o=this.T.bucket();null!=o&&(this.nt=new pe(o,""))}this.Ct=new Oe(this)}return t.prototype.ref=function(t){function e(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."}if(ct("ref",[pt(e,!0)],arguments),null==this.nt)throw Error("No Storage Bucket defined in Firebase Options.");var n=new Re(this.T,this.nt);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{pe.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}}return ct("refFromURL",[pt(e,!1)],arguments),new Re(this.T,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.T.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){ct("setMaxUploadRetryTime",[dt()],arguments),this.T.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.T.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){ct("setMaxOperationRetryTime",[dt()],arguments),this.T.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.ot},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.Ct},enumerable:!0,configurable:!0}),t}(),Oe=function(){function t(t){this.lt=t}return t.prototype.delete=function(){return this.lt.T.deleteApp(),P(void 0)},t}();e.registerStorage=Ht;var Ce="storage";Ht(n(5).default)}},[23])}catch(t){throw Error("Cannot instantiate firebase-storage.js - be sure to load firebase-app.js first.")} +/*! + * @license Firebase v4.6.1 + * Build: rev-0ea11f2 + * Terms: https://firebase.google.com/terms/ + */ +try{webpackJsonpFirebase([2],{118:function(t,e,n){n(119)},119:function(t,e,n){"use strict";function r(t){return"storage/"+t}function o(){return new te(ee.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function i(t){return new te(ee.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function a(t){return new te(ee.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function s(){return new te(ee.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}function u(t){return new te(ee.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function c(){return new te(ee.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function l(){return new te(ee.CANCELED,"User canceled the upload/download.")}function h(t){return new te(ee.INVALID_URL,"Invalid URL '"+t+"'.")}function p(t){return new te(ee.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function f(){return new te(ee.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function d(){return new te(ee.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function _(){return new te(ee.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function v(t,e,n){return new te(ee.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function b(t,e,n,r){var o,i;return t===e?(o=t,i=1===t?"argument":"arguments"):(o="between "+t+" and "+e,i="arguments"),new te(ee.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+o+" "+i+", received "+r+".")}function m(){return new te(ee.APP_DELETED,"The Firebase app was deleted.")}function g(t){return new te(ee.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function y(t,e){return new te(ee.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function R(t){throw new te(ee.INTERNAL_ERROR,"Internal error: "+t)}function E(t){switch(t){case ne.RAW:case ne.BASE64:case ne.BASE64URL:case ne.DATA_URL:return;default:throw"Expected one of the event types: ["+ne.RAW+", "+ne.BASE64+", "+ne.BASE64URL+", "+ne.DATA_URL+"]."}}function w(t,e){switch(t){case ne.RAW:return new re(U(e));case ne.BASE64:case ne.BASE64URL:return new re(A(t,e));case ne.DATA_URL:return new re(N(e),O(e))}throw o()}function U(t){for(var e=[],n=0;n>6,128|63&r);else if(55296==(64512&r)){var o=n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189)}else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function T(t){var e;try{e=decodeURIComponent(t)}catch(t){throw y(ne.DATA_URL,"Malformed data URL.")}return U(e)}function A(t,e){switch(t){case ne.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r){var o=n?"-":"_";throw y(t,"Invalid character '"+o+"' found: is it base64url encoded?")}break;case ne.BASE64URL:var i=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(i||a){var o=i?"+":"/";throw y(t,"Invalid character '"+o+"' found: is it base64 encoded?")}e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(e){throw y(t,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c=e.length)&&t.substring(t.length-e.length)===e}function S(t){switch(t){case ae.RUNNING:case ae.PAUSING:case ae.CANCELING:return se.RUNNING;case ae.PAUSED:return se.PAUSED;case ae.SUCCESS:return se.SUCCESS;case ae.CANCELED:return se.CANCELED;case ae.ERROR:default:return se.ERROR}}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function I(t,e){for(var n in t)k(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return I(t,function(t,n){e[t]=n}),e}function P(t){return new Promise(t)}function x(t){return Promise.resolve(t)}function D(t){return Promise.reject(t)}function M(t){return null!=t}function W(t){return void 0!==t}function B(t){return"function"==typeof t}function G(t){return"object"==typeof t}function j(t){return G(t)&&null!==t}function q(t){return G(t)&&!Array.isArray(t)}function F(t){return"string"==typeof t||t instanceof String}function H(t){return"number"==typeof t||t instanceof Number}function z(t){return X()&&t instanceof Blob}function X(){return"undefined"!=typeof Blob}function V(t){var e;try{e=JSON.parse(t)}catch(t){return null}return q(e)?e:null}function K(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}function Z(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}function J(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function Q(t){return Vt+Zt+t}function Y(t){return Kt+Zt+t}function $(t){return Vt+Jt+t}function tt(t){var e=encodeURIComponent,n="?";return I(t,function(t,r){var o=e(t)+"="+e(r);n=n+o+"&"}),n=n.slice(0,-1)}function et(t,e){return e}function nt(t){return!F(t)||t.length<2?t:(t=t,J(t))}function rt(){function t(t,e){return nt(e)}function e(t,e){return M(e)?+e:e}function n(t,e){if(!(F(e)&&e.length>0))return[];var n=encodeURIComponent;return e.split(",").map(function(e){var r=t.bucket,o=t.fullPath;return Y("/b/"+n(r)+"/o/"+n(o))+tt({alt:"media",token:e})})}if(pe)return pe;var r=[];r.push(new he("bucket")),r.push(new he("generation")),r.push(new he("metageneration")),r.push(new he("name","fullPath",!0));var o=new he("name");o.xform=t,r.push(o);var i=new he("size");return i.xform=e,r.push(i),r.push(new he("timeCreated")),r.push(new he("updated")),r.push(new he("md5Hash",null,!0)),r.push(new he("cacheControl",null,!0)),r.push(new he("contentDisposition",null,!0)),r.push(new he("contentEncoding",null,!0)),r.push(new he("contentLanguage",null,!0)),r.push(new he("contentType",null,!0)),r.push(new he("metadata","customMetadata",!0)),r.push(new he("downloadTokens","downloadURLs",!1,n)),pe=r}function ot(t,e){function n(){var n=t.bucket,r=t.fullPath,o=new le(n,r);return e.makeStorageReference(o)}Object.defineProperty(t,"ref",{get:n})}function it(t,e,n){var r={};r.type="file";for(var o=n.length,i=0;i=0))throw"Expected a number 0 or greater."}return new fe(t)}function _t(t,e){function n(e){if(!(null===e||M(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)}return new fe(n,e)}function vt(t){function e(t){if(null!==t&&!B(t))throw"Expected a Function."}return new fe(e,t)}function bt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function mt(){for(var t=[],e=0;e0&&(h=Math.min(h,o));var p=c.current,_=p+h,v=h===l?"upload, finalize":"upload",b={"X-Goog-Upload-Command":v,"X-Goog-Upload-Offset":c.current},m=r.slice(p,_);if(null===m)throw f();var g=e.maxUploadRetryTime(),y=new _e(n,"POST",u,g);return y.headers=b,y.body=m.uploadData(),y.progressCallback=s||null,y.errorHandler=Tt(t),y}function Mt(t){return function(){for(var e=[],n=0;n0&&(t.Authorization="Firebase "+e)}function jt(t){var e=void 0!==Xt.default?Xt.default.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,i=L(t.headers);return Gt(i,e),jt(i),new Ue(o,t.method,i,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}function Ft(t,e,n){return new Ae(t,new ce,n)}function Ht(t){var e={TaskState:se,TaskEvent:ie,StringFormat:ne,Storage:Ae,Reference:ye};t.INTERNAL.registerService(Oe,Ft,e,void 0,!0)}Object.defineProperty(e,"__esModule",{value:!0});var zt,Xt=n(6),Vt="https://firebasestorage.googleapis.com",Kt="https://firebasestorage.googleapis.com",Zt="/v0",Jt="/v0",Qt=12e4,Yt=6e4,$t=-9007199254740991,te=function(){function t(t,e){this.t=r(t),this.e="Firebase Storage: "+e,this.n=null,this.r="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return r(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.n},t.prototype.setServerResponseProp=function(t){this.n=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.n},enumerable:!0,configurable:!0}),t}(),ee={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},ne={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},re=function(){function t(t,e){this.data=t,this.contentType=e||null}return t}(),oe=function(){function t(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw y(ne.DATA_URL,"Must be formatted 'data:[][;base64],");var n=e[1]||null;null!=n&&(this.base64=C(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=t.substring(t.indexOf(",")+1)}return t}(),ie={STATE_CHANGED:"state_changed"},ae={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},se={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(zt=zt||(zt={}));var ue=function(){function t(){var t=this;this.o=!1,this.i=new XMLHttpRequest,this.a=zt.NO_ERROR,this.s=P(function(e,n){t.i.addEventListener("abort",function(n){t.a=zt.ABORT,e(t)}),t.i.addEventListener("error",function(n){t.a=zt.NETWORK_ERROR,e(t)}),t.i.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var o=this;if(this.o)throw R("cannot .send() more than once");return this.o=!0,this.i.open(e,t,!0),M(r)&&I(r,function(t,e){o.i.setRequestHeader(t,""+e)}),M(n)?this.i.send(n):this.i.send(),this.s},t.prototype.getErrorCode=function(){if(!this.o)throw R("cannot .getErrorCode() before sending");return this.a},t.prototype.getStatus=function(){if(!this.o)throw R("cannot .getStatus() before sending");try{return this.i.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.o)throw R("cannot .getResponseText() before sending");return this.i.responseText},t.prototype.abort=function(){this.i.abort()},t.prototype.getResponseHeader=function(t){return this.i.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.removeEventListener("progress",t)},t}(),ce=function(){function t(){}return t.prototype.createXhrIo=function(){return new ue},t}(),le=function(){function t(t,e){this.bucket=t,this.u=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.u},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw p(e)},t.makeFromUrl=function(e){function n(t){"/"===t.path.charAt(t.path.length-1)&&(t.u=t.u.slice(0,-1))}function r(t){t.u=decodeURIComponent(t.path)}for(var o=null,i=RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a={bucket:1,path:3},s=RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),u={bucket:1,path:3},c=[{regex:i,indices:a,postModify:n},{regex:s,indices:u,postModify:r}],l=0;l262144},t.prototype.M=function(){this.k===ae.RUNNING&&null===this.m&&(this.C?null===this.b?this.G():this.f?this.j():this.d?this.q():this.F():this.H())},t.prototype.z=function(t){var e=this;this.U.getAuthToken().then(function(n){switch(e.k){case ae.RUNNING:t(n);break;case ae.CANCELING:e.P(ae.CANCELED);break;case ae.PAUSING:e.P(ae.PAUSED)}})},t.prototype.G=function(){var t=this;this.z(function(e){var n=Pt(t.U,t.T,t.O,t.A,t.N),r=t.U.makeRequest(n,e);t.m=r,r.getPromise().then(function(e){t.m=null,t.b=e,t.f=!1,t.L()},t.I)})},t.prototype.j=function(){var t=this,e=this.b;this.z(function(n){var r=xt(t.U,t.T,e,t.A),o=t.U.makeRequest(r,n);t.m=o,o.getPromise().then(function(e){e=e,t.m=null,t.B(e.current),t.f=!1,e.finalized&&(t.d=!0),t.L()},t.I)})},t.prototype.F=function(){var t=this,e=262144*this.g,n=new ve(this.p,this.A.size()),r=this.b;this.z(function(o){var i;try{i=Dt(t.T,t.U,r,t.A,e,t.O,n,t.W())}catch(e){return t.v=e,void t.P(ae.ERROR)}var a=t.U.makeRequest(i,o);t.m=a,a.getPromise().then(function(e){t.X(),t.m=null,t.B(e.current),e.finalized?(t.N=e.metadata,t.P(ae.SUCCESS)):t.L()},t.I)})},t.prototype.X=function(){262144*this.g<33554432&&(this.g*=2)},t.prototype.q=function(){var t=this;this.z(function(e){var n=Nt(t.U,t.T,t.O),r=t.U.makeRequest(n,e);t.m=r,r.getPromise().then(function(e){t.m=null,t.N=e,t.P(ae.SUCCESS)},t.x)})},t.prototype.H=function(){var t=this;this.z(function(e){var n=It(t.U,t.T,t.O,t.A,t.N),r=t.U.makeRequest(n,e);t.m=r,r.getPromise().then(function(e){t.m=null,t.N=e,t.B(t.A.size()),t.P(ae.SUCCESS)},t.I)})},t.prototype.B=function(t){var e=this.p;this.p=t,this.p!==e&&this.V()},t.prototype.P=function(t){if(this.k!==t)switch(t){case ae.CANCELING:case ae.PAUSING:this.k=t,null!==this.m&&this.m.cancel();break;case ae.RUNNING:var e=this.k===ae.PAUSED;this.k=t,e&&(this.V(),this.M());break;case ae.PAUSED:this.k=t,this.V();break;case ae.CANCELED:this.v=l(),this.k=t,this.V();break;case ae.ERROR:case ae.SUCCESS:this.k=t,this.V()}},t.prototype.L=function(){switch(this.k){case ae.PAUSING:this.P(ae.PAUSED);break;case ae.CANCELING:this.P(ae.CANCELED);break;case ae.RUNNING:this.M()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=S(this.k);return new me(this.p,this.A.size(),t,this.N,this,this.w)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){function o(e){if(t!==ie.STATE_CHANGED)throw"Expected one of the event types: ["+ie.STATE_CHANGED+"]."}function i(t){try{return void c(t)}catch(t){}try{if(l(t),!(W(t.next)||W(t.error)||W(t.complete)))throw"";return}catch(t){throw u}}function a(t){function e(e,n,o){null!==t&&ct("on",t,arguments);var i=new be(e,n,r);return h.K(i),function(){h.Z(i)}}return e}function s(t){if(null===t)throw u;i(t)}void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var u="Expected a function or an Object with one of `next`, `error`, `complete` properties.",c=vt(!0).validator,l=_t(null,!0).validator;ct("on",[ht(o),_t(i,!0),vt(!0),vt(!0)],arguments);var h=this,p=[_t(s),vt(!0),vt(!0)];return W(e)||W(n)||W(r)?a(null)(e,n,r):a(p)},t.prototype.then=function(t,e){return this.D.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.K=function(t){this._.push(t),this.J(t)},t.prototype.Z=function(t){Et(this._,t)},t.prototype.V=function(){var t=this;this.Q(),Rt(this._).forEach(function(e){t.J(e)})},t.prototype.Q=function(){if(null!==this.y){var t=!0;switch(S(this.k)){case se.SUCCESS:Mt(this.y.bind(null,this.snapshot))();break;case se.CANCELED:case se.ERROR:Mt(this.R.bind(null,this.v))();break;default:t=!1}t&&(this.y=null,this.R=null)}},t.prototype.J=function(t){switch(S(this.k)){case se.RUNNING:case se.PAUSED:null!==t.next&&Mt(t.next.bind(t,this.snapshot))();break;case se.SUCCESS:null!==t.complete&&Mt(t.complete.bind(t))();break;case se.CANCELED:case se.ERROR:null!==t.error&&Mt(t.error.bind(t,this.v))();break;default:null!==t.error&&Mt(t.error.bind(t,this.v))()}},t.prototype.resume=function(){ct("resume",[],arguments);var t=this.k===ae.PAUSED||this.k===ae.PAUSING;return t&&this.P(ae.RUNNING),t},t.prototype.pause=function(){ct("pause",[],arguments);var t=this.k===ae.RUNNING;return t&&this.P(ae.PAUSING),t},t.prototype.cancel=function(){ct("cancel",[],arguments);var t=this.k===ae.RUNNING||this.k===ae.PAUSING;return t&&this.P(ae.CANCELING),t},t}(),ye=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof le?e:le.makeFromUrl(e)}return t.prototype.toString=function(){return ct("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return rt()},t.prototype.child=function(t){ct("child",[ht()],arguments);var e=Z(this.location.path,t),n=new le(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=K(this.location.path);if(null===t)return null;var e=new le(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new le(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),ct("put",[pt(),ft(!0)],arguments),this.Y("put"),new ge(this,this.authWrapper,this.location,this.mappings(),new de(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=ne.RAW),ct("putString",[ht(),ht(E,!0),ft(!0)],arguments),this.Y("putString");var r=w(e,t),o=L(n);return!M(o.contentType)&&M(r.contentType)&&(o.contentType=r.contentType),new ge(this,this.authWrapper,this.location,this.mappings(),new de(r.data,!0),o)},t.prototype.delete=function(){ct("delete",[],arguments),this.Y("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Ct(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){ct("getMetadata",[],arguments),this.Y("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Nt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){ct("updateMetadata",[ft()],arguments),this.Y("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=Ot(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return ct("getDownloadURL",[],arguments),this.Y("getDownloadURL"),this.getMetadata().then(function(t){var e=t.downloadURLs[0];if(M(e))return e;throw _()})},t.prototype.Y=function(t){if(""===this.location.path)throw g(t)},t}(),Re=function(){function t(t){this.D=D(t)}return t.prototype.getPromise=function(){return this.D},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ee=function(){function t(){this.$={},this.tt=$t}return t.prototype.addRequest=function(t){function e(){delete r.$[n]}var n=this.tt;this.tt++,this.$[n]=t;var r=this;t.getPromise().then(e,e)},t.prototype.clear=function(){I(this.$,function(t,e){e&&e.cancel(!0)}),this.$={}},t}(),we=function(){function t(e,n,r,o,i){if(this.et=null,this.nt=!1,this.rt=e,null!==this.rt){var a=this.rt.options;M(a)&&(this.et=t.ot(a))}this.it=n,this.at=r,this.st=i,this.ut=o,this.ct=Qt,this.lt=Yt,this.ht=new Ee}return t.ot=function(t){var e=t.storageBucket||null;return null==e?null:le.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.rt&&M(this.rt.INTERNAL)&&M(this.rt.INTERNAL.getToken)?this.rt.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):x(null)},t.prototype.bucket=function(){if(this.nt)throw m();return this.et},t.prototype.service=function(){return this.ut},t.prototype.makeStorageReference=function(t){return this.it(this,t)},t.prototype.makeRequest=function(t,e){if(this.nt)return new Re(m());var n=this.at(t,e,this.st);return this.ht.addRequest(n),n},t.prototype.deleteApp=function(){this.nt=!0,this.rt=null,this.ht.clear()},t.prototype.maxUploadRetryTime=function(){return this.lt},t.prototype.setMaxUploadRetryTime=function(t){this.lt=t},t.prototype.maxOperationRetryTime=function(){return this.ct},t.prototype.setMaxOperationRetryTime=function(t){this.ct=t},t}(),Ue=function(){function t(t,e,n,r,o,i,a,s,u,c,l){this.pt=null,this.ft=null,this.y=null,this.R=null,this.dt=!1,this._t=!1,this.vt=t,this.bt=e,this.mt=n,this.gt=r,this.yt=o.slice(),this.Rt=i.slice(),this.Et=a,this.wt=s,this.Ut=c,this.Tt=u,this.st=l;var h=this;this.D=P(function(t,e){h.y=t,h.R=e,h.M()})}return t.prototype.M=function(){function t(t,e){function r(t){var e=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.Ut&&n.Ut(e,r)}if(e)return void t(!1,new Te(!1,null,!0));var o=n.st.createXhrIo();n.pt=o,null!==n.Ut&&o.addUploadProgressListener(r),o.send(n.vt,n.bt,n.gt,n.mt).then(function(e){null!==n.Ut&&e.removeUploadProgressListener(r),n.pt=null,e=e;var o=e.getErrorCode()===zt.NO_ERROR,i=e.getStatus();if(!o||n.At(i)){var a=e.getErrorCode()===zt.ABORT;return void t(!1,new Te(!1,null,a))}var s=yt(n.yt,i);t(!0,new Te(s,e))})}function e(t,e){var r=n.y,i=n.R,a=e.xhr;if(e.wasSuccessCode)try{var s=n.Et(a,a.getResponseText());W(s)?r(s):r()}catch(t){i(t)}else if(null!==a){var u=o();u.setServerResponseProp(a.getResponseText()),i(n.wt?n.wt(a,u):u)}else if(e.canceled){var u=n._t?m():l();i(u)}else{var u=c();i(u)}}var n=this;this.dt?e(!1,new Te(!1,null,!0)):this.ft=Wt(t,e,this.Tt)},t.prototype.getPromise=function(){return this.D},t.prototype.cancel=function(t){this.dt=!0,this._t=t||!1,null!==this.ft&&Bt(this.ft),null!==this.pt&&this.pt.abort()},t.prototype.At=function(t){var e=t>=500&&t<600,n=[408,429],r=yt(n,t),o=yt(this.Rt,t);return e||r||o},t}(),Te=function(){function t(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}return t}(),Ae=function(){function t(t,e,n){function r(t,e){return new ye(t,e)}if(this.et=null,this.U=new we(t,r,qt,this,e),this.rt=t,null!=n)this.et=le.makeFromBucketSpec(n);else{var o=this.U.bucket();null!=o&&(this.et=new le(o,""))}this.Nt=new Ne(this)}return t.prototype.ref=function(t){function e(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."}if(ct("ref",[ht(e,!0)],arguments),null==this.et)throw Error("No Storage Bucket defined in Firebase Options.");var n=new ye(this.U,this.et);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{le.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}}return ct("refFromURL",[ht(e,!1)],arguments),new ye(this.U,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.U.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){ct("setMaxUploadRetryTime",[dt()],arguments),this.U.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.U.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){ct("setMaxOperationRetryTime",[dt()],arguments),this.U.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.rt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.Nt},enumerable:!0,configurable:!0}),t}(),Ne=function(){function t(t){this.ut=t}return t.prototype.delete=function(){return this.ut.U.deleteApp(),x(void 0)},t}();e.registerStorage=Ht;var Oe="storage";Ht(Xt.default)}},[118])}catch(t){throw Error("Cannot instantiate firebase-storage.js - be sure to load firebase-app.js first.")} //# sourceMappingURL=firebase-storage.js.map \ No newline at end of file diff --git a/lib/firebase/firebase-storage.js.map b/lib/firebase/firebase-storage.js.map index bc25d913..56dd6285 100644 --- a/lib/firebase/firebase-storage.js.map +++ b/lib/firebase/firebase-storage.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///firebase-storage.js","webpack:///./src/storage/implementation/error.ts","webpack:///./src/storage/implementation/string.ts","webpack:///./src/storage/implementation/taskenums.ts","webpack:///./src/storage/implementation/object.ts","webpack:///./src/storage/implementation/promise_external.ts","webpack:///./src/storage/implementation/type.ts","webpack:///./src/storage/implementation/json.ts","webpack:///./src/storage/implementation/path.ts","webpack:///./src/storage/implementation/url.ts","webpack:///./src/storage/implementation/metadata.ts","webpack:///./src/storage/implementation/args.ts","webpack:///./src/storage/implementation/fs.ts","webpack:///./src/storage/implementation/array.ts","webpack:///./src/storage/implementation/requests.ts","webpack:///./src/storage/implementation/async.ts","webpack:///./src/storage/implementation/backoff.ts","webpack:///./src/storage/implementation/request.ts","webpack:///./src/storage.ts","webpack:///./src/storage/implementation/constants.ts","webpack:///./src/storage/implementation/xhrio.ts","webpack:///./src/storage/implementation/xhrio_network.ts","webpack:///./src/storage/implementation/xhriopool.ts","webpack:///./src/storage/implementation/location.ts","webpack:///./src/storage/implementation/blob.ts","webpack:///./src/storage/implementation/requestinfo.ts","webpack:///./src/storage/implementation/observer.ts","webpack:///./src/storage/tasksnapshot.ts","webpack:///./src/storage/task.ts","webpack:///./src/storage/reference.ts","webpack:///./src/storage/implementation/failrequest.ts","webpack:///./src/storage/implementation/requestmap.ts","webpack:///./src/storage/implementation/authwrapper.ts","webpack:///./src/storage/service.ts"],"names":["webpackJsonpFirebase","23","module","__webpack_exports__","__webpack_require__","prependCode","code","unknown","FirebaseStorageError","Code","UNKNOWN","objectNotFound","path","OBJECT_NOT_FOUND","quotaExceeded","bucket","QUOTA_EXCEEDED","unauthenticated","UNAUTHENTICATED","unauthorized","UNAUTHORIZED","retryLimitExceeded","RETRY_LIMIT_EXCEEDED","error_canceled","CANCELED","invalidUrl","url","INVALID_URL","invalidDefaultBucket","INVALID_DEFAULT_BUCKET","cannotSliceBlob","CANNOT_SLICE_BLOB","serverFileWrongSize","SERVER_FILE_WRONG_SIZE","noDownloadURL","NO_DOWNLOAD_URL","invalidArgument","index","fnName","message","INVALID_ARGUMENT","invalidArgumentCount","argMin","argMax","real","countPart","plural","INVALID_ARGUMENT_COUNT","appDeleted","APP_DELETED","invalidRootOperation","name","INVALID_ROOT_OPERATION","invalidFormat","format","INVALID_FORMAT","internalError","INTERNAL_ERROR","formatValidator","stringFormat","StringFormat","RAW","BASE64","BASE64URL","DATA_URL","dataFromString","string","StringData","utf8Bytes_","base64Bytes_","dataURLBytes_","dataURLContentType_","b","i","length","c","charCodeAt","push","valid","hi","lo","Uint8Array","percentEncodedBytes_","decoded","decodeURIComponent","e","hasMinus","indexOf","hasUnder","invalidChar","hasPlus","hasSlash","replace","bytes","atob","array","parts","string_DataURLParts","base64","rest","contentType","endsWith","s","end","substring","taskStateFromInternalTaskState","state","InternalTaskState","RUNNING","PAUSING","CANCELING","TaskState","PAUSED","SUCCESS","ERROR","contains","obj","prop","Object","prototype","hasOwnProperty","call","forEach","f","key","clone","val","make","resolver","__WEBPACK_IMPORTED_MODULE_0__utils_promise__","promise_external_resolve","value","resolve","promise_external_reject","error","reject","isDef","p","isJustDef","isFunction","isObject","_typeof","isNonNullObject","isNonArrayObject","Array","isArray","isString","String","isNumber","Number","isNativeBlob","isNativeBlobDefined","Blob","jsonObjectOrNull","JSON","parse","parent","lastIndexOf","slice","child","childPath","canonicalChildPath","split","filter","component","join","lastComponent","makeNormalUrl","urlPart","domainBase","apiBaseUrl","makeDownloadUrl","downloadBase","makeUploadUrl","apiUploadBaseUrl","makeQueryString","params","encode","encodeURIComponent","queryPart","nextPart","noXform_","metadata","xformPath","fullPath","getMappings","mappingsXformPath","xformSize","size","xformTokens","tokens","map","token","alt","mappings_","mappings","Mapping","nameMapping","xform","sizeMapping","addRef","authWrapper","generateRef","loc","location_Location","makeStorageReference","defineProperty","get","fromResource","resource","len","mapping","local","server","fromResourceString","resourceString","toResourceString","writable","stringify","metadataValidator","validate","specs","passed","minArgs","maxArgs","optional","validator","Error","and_","v1","v2","stringSpec","opt_validator","opt_optional","stringValidator","args_ArgSpec","uploadDataSpec","ArrayBuffer","metadataSpec","nonNegativeNumberSpec","looseObjectSpec","undefined","nullFunctionSpec","getBlobBuilder","BlobBuilder","WebKitBlobBuilder","getBlob","var_args","_i","arguments","bb","append","sliceBlob","blob","start","webkitSlice","mozSlice","array_contains","elem","array_clone","arraylike","remove","splice","handlerCheck","cndn","metadataHandler","handler","xhr","text","sharedErrorHandler","location","errorHandler","err","newErr","getStatus","setServerResponseProp","serverResponseProp","objectErrorHandler","shared","getMetadata","fullServerUrl","timeout","maxOperationRetryTime","requestInfo","RequestInfo","updateMetadata","body","headers","Content-Type","deleteObject","successCodes","determineContentType_","type","metadataForUpload_","opt_metadata","multipartUpload","bucketOnlyServerUrl","X-Goog-Upload-Protocol","boundary","str","Math","random","metadataString","preBlobPart","postBlobPart","blob_FbsBlob","urlParams","maxUploadRetryTime","uploadData","checkResumeHeader_","opt_allowed","status","getResponseHeader","createResumableUpload","X-Goog-Upload-Command","X-Goog-Upload-Header-Content-Length","X-Goog-Upload-Header-Content-Type","getResumableUploadStatus","sizeString","parseInt","isNaN","ResumableUploadStatus","continueResumableUpload","chunkSize","opt_status","opt_progressCallback","uploadStatus","newCurrent","current","bytesToUpload","total","bytesLeft","min","startByte","endByte","uploadCommand","X-Goog-Upload-Offset","progressCallback","async","argsToForward","then","apply","callback","canceled","cancelState","triggerCallback","triggeredCallback","callWithDelay","millis","timeoutId","setTimeout","success","hitTimeout","waitSeconds","waitMillis","stop","wasTimeout","stopped","clearTimeout","id","addAuthHeader_","authToken","addVersionHeader_","number","firebase","SDK_VERSION","makeRequest","pool","request_NetworkRequest","method","additionalRetryCodes","factory","app","unused","opt_url","service_Service","xhriopool_XhrIoPool","registerStorage","instance","namespaceExports","TaskEvent","Storage","Reference","reference_Reference","INTERNAL","registerService","STORAGE_TYPE","ErrorCode","defaultMaxOperationRetryTime","defaultMaxUploadRetryTime","minSafeInteger","this","code_","message_","serverResponse_","name_","codeProp","codeEquals","serverResponse","enumerable","configurable","BUCKET_NOT_FOUND","PROJECT_NOT_FOUND","INVALID_CHECKSUM","INVALID_EVENT_NAME","NO_DEFAULT_BUCKET","data","opt_contentType","DataURLParts","dataURL","matches","match","middle","STATE_CHANGED","Symbol","iterator","constructor","xhrio_network_NetworkXhrIo","NetworkXhrIo","_this","sent_","xhr_","XMLHttpRequest","errorCode_","NO_ERROR","sendPromise_","addEventListener","event","ABORT","NETWORK_ERROR","send","opt_body","opt_headers","open","setRequestHeader","getErrorCode","getResponseText","responseText","abort","header","addUploadProgressListener","listener","upload","removeUploadProgressListener","removeEventListener","XhrIoPool","createXhrIo","Location","path_","makeFromBucketSpec","bucketString","bucketLocation","makeFromUrl","gsModify","charAt","httpModify","gsRegex","RegExp","gsIndices","httpRegex","httpIndices","groups","regex","indices","postModify","group","captures","exec","bucketValue","pathValue","opt_local","opt_writable","opt_xform","ArgSpec","self","FbsBlob","opt_elideCopy","blobType","data_","byteLength","set","size_","type_","realBlob","sliced","buffer","blobby","uint8Arrays","finalLength_1","merged_1","index_1","finalized","observer_Observer","Observer","nextOrObserver","opt_error","opt_complete","next","complete","observer","UploadTaskSnapshot","bytesTransferred","totalBytes","task","ref","urls","task_UploadTask","UploadTask","transferred_","needToFetchStatus_","needToFetchMetadata_","observers_","error_","uploadUrl_","request_","chunkMultiplier_","resolve_","reject_","ref_","authWrapper_","location_","blob_","metadata_","resumable_","shouldDoResumable_","state_","errorHandler_","completeTransitions_","transition_","metadataErrorHandler_","promise_","start_","makeProgressCallback_","sizeBefore","loaded","updateProgress_","createResumable_","fetchStatus_","fetchMetadata_","continueUpload_","oneShotUpload_","resolveToken_","getAuthToken","createRequest","getPromise","statusRequest","uploadRequest","newStatus","increaseMultiplier_","metadataRequest","multipartRequest","transferred","old","notifyObservers_","cancel","wasPaused","externalState","on","completed","typeValidator","_p","nextOrObserverValidator","nextValidator","observerValidator","nextOrObserverMessage","makeBinder","binder","addObserver_","removeObserver_","binderNextOrObserverValidator","binderSpecs","onFulfilled","onRejected","catch","notifyObserver_","finishPromise_","triggered","bind","snapshot","resume","pause","toString","newRef","newPath","service","put","throwIfRoot_","putString","delete","getDownloadURL","failrequest_FailRequest","FailRequest","appDelete","requestmap_RequestMap","RequestMap","map_","id_","addRequest","r","unmap","clear","authwrapper_AuthWrapper","AuthWrapper","maker","requestMaker","bucket_","deleted_","app_","options","extractBucket_","storageRefMaker_","requestMaker_","pool_","service_","maxOperationRetryTime_","maxUploadRetryTime_","requestMap_","config","getToken","response","accessToken","_error","request","deleteApp","setMaxUploadRetryTime","time","setMaxOperationRetryTime","NetworkRequest","errorCallback","pendingXhr_","backoffId_","canceled_","appDelete_","url_","method_","headers_","body_","successCodes_","additionalRetryCodes_","callback_","errorCallback_","progressCallback_","timeout_","doTheRequest","backoffCallback","progressListener","progressEvent","lengthComputable","RequestEndStatus","hitServer","isRetryStatusCode_","wasCanceled","successCode","backoffDone","requestWentThrough","wasSuccessCode","result","isFiveHundredCode","extraRetryCodes","isExtraRetryCode","isRequestSpecificRetryCode","opt_canceled","Service","authWrapperBucket","internals_","service_ServiceInternals","test","refFromURL","ServiceInternals"],"mappings":"AAAA,IACUA,sBAAsB,IAE1BC,GACA,SAAUC,EAAQC,EAAqBC,GAE7C,YC2FM,SAAAC,GAAgCC,GAC9B,MAAW,WACnBA,EAEM,QAAAC,KAIE,MAAC,IAAwBC,IAAKC,GAAQC,QAFsB,kFAK9D,QAAAC,GAAqCC,GACnC,MAAC,IAAwBJ,IACzBC,GAAiBI,iBACX,WAAOD,EAErB,qBAgBM,QAAAE,GAAsCC,GACpC,MAAC,IAAwBP,IACzBC,GAAeO,eACC,qBACZD,EAC6B,0EAKnC,QAAAE,KAIE,MAAC,IAAwBT,IAAKC,GAAgBS,gBAFc,+FAK9D,QAAAC,GAAmCP,GACjC,MAAC,IAAwBJ,IACzBC,GAAaW,aAC0B,4CAAOR,EAEtD,MAEM,QAA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GAC5BrZ,GACqB,yBAClBmB,MAELU,WACE8I,KAAagI,EAAsByG,sBACzCC,IAEA3f,OAAAwF,eAAIwc,EAAA/hB,UAAqB,yBjC6rGnBwF,IiC7rGN,WACQ,MAAKwL,MAAagI,EAC1B7O,yBjC8rGMqH,YAAY,EACZC,ciC/rGL,IAEDsQ,EAAA/hB,UAAwB2f,yBAAxB,SAAqCD,GAC/BrZ,GACwB,4BACrBmB,MAELU,WACE8I,KAAagI,EAAyB2G,yBAC5CD,IAEA3f,OAAAwF,eAAIwc,EAAA/hB,UAAG,OjC2rGDwF,IiC3rGN,WACQ,MAAKwL,MACbwN,IjC4rGMhN,YAAY,EACZC,ciC7rGL,IAED1R,OAAAwF,eAAIwc,EAAA/hB,UAAQ,YjC8rGNwF,IiC9rGN,WACQ,MAAKwL,MACbiR,IjC+rGMzQ,YAAY,EACZC,ciChsGL,IACFsQ,KAKDG,GAAA,WAGE,QAAAG,GAA4BpF,GACtBjM,KAAS8N,GACf7B,EAUF,MAJEoF,GAAAriB,UAAMqd,OAAN,WAEQ,MADFrM,MAAS8N,GAAa9F,EAAawG,YAClB7e,MACvB+G,KACD2a,IjCmsGgCzpB,GAAqC,gBAAIsX,EkBh1GxE,IAYgBS,IAAa,SAyBhBT,IArCbrX,EAAA,GAqCwB,YlB21GvB,KACS,MAAMkI,GACN,KAAU6F,OACR","file":"firebase-storage.js","sourcesContent":["try {\n webpackJsonpFirebase([1],{\n\n/***/ 23:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// CONCATENATED MODULE: ./src/storage/implementation/constants.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Constants used in the Firebase Storage library.\r\n */\n/**\r\n * Domain and scheme for API calls.\r\n */\nvar domainBase = 'https://firebasestorage.googleapis.com';\n/**\r\n * Domain and scheme for object downloads.\r\n */\nvar downloadBase = 'https://firebasestorage.googleapis.com';\n/**\r\n * Base URL for non-upload calls to the API.\r\n */\nvar apiBaseUrl = '/v0';\n/**\r\n * Base URL for upload calls to the API.\r\n */\nvar apiUploadBaseUrl = '/v0';\nfunction setDomainBase(domainBase) {\n domainBase = domainBase;\n}\nvar configOption = 'storageBucket';\n/**\r\n * 1 minute\r\n */\nvar shortMaxOperationRetryTime = 1 * 60 * 1000;\n/**\r\n * 2 minutes\r\n */\nvar defaultMaxOperationRetryTime = 2 * 60 * 1000;\n/**\r\n * 10 minutes\r\n */\nvar defaultMaxUploadRetryTime = 10 * 60 * 100;\n/**\r\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\r\n * enough for us to use it directly.\r\n */\nvar minSafeInteger = -9007199254740991;\n// CONCATENATED MODULE: ./src/storage/implementation/error.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\nvar FirebaseStorageError = function () {\n function FirebaseStorageError(code, message) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n FirebaseStorageError.prototype.codeProp = function () {\n return this.code;\n };\n FirebaseStorageError.prototype.codeEquals = function (code) {\n return prependCode(code) === this.codeProp();\n };\n FirebaseStorageError.prototype.serverResponseProp = function () {\n return this.serverResponse_;\n };\n FirebaseStorageError.prototype.setServerResponseProp = function (serverResponse) {\n this.serverResponse_ = serverResponse;\n };\n Object.defineProperty(FirebaseStorageError.prototype, \"name\", {\n get: function get() {\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"code\", {\n get: function get() {\n return this.code_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"message\", {\n get: function get() {\n return this.message_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n get: function get() {\n return this.serverResponse_;\n },\n enumerable: true,\n configurable: true\n });\n return FirebaseStorageError;\n}();\n\nvar errors = {};\nvar Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\nfunction prependCode(code) {\n return 'storage/' + code;\n}\nfunction unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' + 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\nfunction objectNotFound(path) {\n return new FirebaseStorageError(Code.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nfunction bucketNotFound(bucket) {\n return new FirebaseStorageError(Code.BUCKET_NOT_FOUND, \"Bucket '\" + bucket + \"' does not exist.\");\n}\nfunction projectNotFound(project) {\n return new FirebaseStorageError(Code.PROJECT_NOT_FOUND, \"Project '\" + project + \"' does not exist.\");\n}\nfunction quotaExceeded(bucket) {\n return new FirebaseStorageError(Code.QUOTA_EXCEEDED, \"Quota for bucket '\" + bucket + \"' exceeded, please view quota on \" + 'https://firebase.google.com/pricing/.');\n}\nfunction unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' + 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\nfunction unauthorized(path) {\n return new FirebaseStorageError(Code.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nfunction retryLimitExceeded() {\n return new FirebaseStorageError(Code.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nfunction invalidChecksum(path, checksum, calculated) {\n return new FirebaseStorageError(Code.INVALID_CHECKSUM, \"Uploaded/downloaded object '\" + path + \"' has checksum '\" + checksum + \"' which does not match '\" + calculated + \"'. Please retry the upload/download.\");\n}\nfunction error_canceled() {\n return new FirebaseStorageError(Code.CANCELED, 'User canceled the upload/download.');\n}\nfunction invalidEventName(name) {\n return new FirebaseStorageError(Code.INVALID_EVENT_NAME, \"Invalid event name '\" + name + \"'.\");\n}\nfunction invalidUrl(url) {\n return new FirebaseStorageError(Code.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nfunction invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(Code.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nfunction noDefaultBucket() {\n return new FirebaseStorageError(Code.NO_DEFAULT_BUCKET, 'No default bucket ' + \"found. Did you set the '\" + configOption + \"' property when initializing the app?\");\n}\nfunction cannotSliceBlob() {\n return new FirebaseStorageError(Code.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nfunction serverFileWrongSize() {\n return new FirebaseStorageError(Code.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nfunction noDownloadURL() {\n return new FirebaseStorageError(Code.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nfunction invalidArgument(index, fnName, message) {\n return new FirebaseStorageError(Code.INVALID_ARGUMENT, 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message);\n}\nfunction invalidArgumentCount(argMin, argMax, fnName, real) {\n var countPart;\n var plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n } else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(Code.INVALID_ARGUMENT_COUNT, 'Invalid argument count in `' + fnName + '`: Expected ' + countPart + ' ' + plural + ', received ' + real + '.');\n}\nfunction appDeleted() {\n return new FirebaseStorageError(Code.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\r\n * @param name The name of the operation that was invalid.\r\n */\nfunction invalidRootOperation(name) {\n return new FirebaseStorageError(Code.INVALID_ROOT_OPERATION, \"The operation '\" + name + \"' cannot be performed on a root reference, create a non-root \" + \"reference using child, such as .child('file.png').\");\n}\n/**\r\n * @param format The format that was not valid.\r\n * @param message A message describing the format violation.\r\n */\nfunction invalidFormat(format, message) {\n return new FirebaseStorageError(Code.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\r\n * @param message A message describing the internal error.\r\n */\nfunction internalError(message) {\n throw new FirebaseStorageError(Code.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/string.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\nvar StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\nfunction formatValidator(stringFormat) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' + StringFormat.RAW + ', ' + StringFormat.BASE64 + ', ' + StringFormat.BASE64URL + ', ' + StringFormat.DATA_URL + '].';\n }\n}\n/**\r\n * @struct\r\n */\nvar StringData = function () {\n function StringData(data, opt_contentType) {\n this.data = data;\n this.contentType = opt_contentType || null;\n }\n return StringData;\n}();\n\nfunction dataFromString(format, string) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n // assert(false);\n throw unknown();\n}\nfunction utf8Bytes_(string) {\n var b = [];\n for (var i = 0; i < string.length; i++) {\n var c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n } else {\n if (c <= 2047) {\n b.push(192 | c >> 6, 128 | c & 63);\n } else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n var valid = i < string.length - 1 && (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n } else {\n var hi = c;\n var lo = string.charCodeAt(++i);\n c = 65536 | (hi & 1023) << 10 | lo & 1023;\n b.push(240 | c >> 18, 128 | c >> 12 & 63, 128 | c >> 6 & 63, 128 | c & 63);\n }\n } else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n } else {\n b.push(224 | c >> 12, 128 | c >> 6 & 63, 128 | c & 63);\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\nfunction percentEncodedBytes_(string) {\n var decoded;\n try {\n decoded = decodeURIComponent(string);\n } catch (e) {\n throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n return utf8Bytes_(decoded);\n}\nfunction base64Bytes_(format, string) {\n switch (format) {\n case StringFormat.BASE64:\n {\n var hasMinus = string.indexOf('-') !== -1;\n var hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64url encoded?\");\n }\n break;\n }\n case StringFormat.BASE64URL:\n {\n var hasPlus = string.indexOf('+') !== -1;\n var hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n var bytes;\n try {\n bytes = atob(string);\n } catch (e) {\n throw invalidFormat(format, 'Invalid character found');\n }\n var array = new Uint8Array(bytes.length);\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n/**\r\n * @struct\r\n */\nvar string_DataURLParts = function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n var middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64 ? middle.substring(0, middle.length - ';base64'.length) : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n return DataURLParts;\n}();\nfunction dataURLBytes_(string) {\n var parts = new string_DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n } else {\n return percentEncodedBytes_(parts.rest);\n }\n}\nfunction dataURLContentType_(string) {\n var parts = new string_DataURLParts(string);\n return parts.contentType;\n}\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n return s.substring(s.length - end.length) === end;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/taskenums.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\nvar InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\nvar TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\nfunction taskStateFromInternalTaskState(state) {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/object.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Contains methods for working with objects.\r\n */\nfunction contains(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction forEach(obj, f) {\n for (var key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\nfunction clone(obj) {\n if (obj == null) {\n return {};\n }\n var c = {};\n forEach(obj, function (key, val) {\n c[key] = val;\n });\n return c;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/promise_external.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_promise__ = __webpack_require__(4);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Implements the promise abstraction interface for external\r\n * (public SDK) packaging, which just passes through to the firebase-app impl.\r\n */\n/**\r\n * @template T\r\n * @param {function((function(T): void),\r\n * (function(!Error): void))} resolver\r\n */\n\nfunction make(resolver) {\n return new __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */](resolver);\n}\n/**\r\n * @template T\r\n */\nfunction promise_external_resolve(value) {\n return __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].resolve(value);\n}\nfunction promise_external_reject(error) {\n return __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].reject(error);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/type.ts\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @return False if the object is undefined or null, true otherwise.\r\n */\nfunction isDef(p) {\n return p != null;\n}\nfunction isJustDef(p) {\n return p !== void 0;\n}\nfunction isFunction(p) {\n return typeof p === 'function';\n}\nfunction isObject(p) {\n return (typeof p === 'undefined' ? 'undefined' : _typeof(p)) === 'object';\n}\nfunction isNonNullObject(p) {\n return isObject(p) && p !== null;\n}\nfunction isNonArrayObject(p) {\n return isObject(p) && !Array.isArray(p);\n}\nfunction isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\nfunction isNumber(p) {\n return typeof p === 'number' || p instanceof Number;\n}\nfunction isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\nfunction isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n// CONCATENATED MODULE: ./src/storage/implementation/xhrio.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @enum{number}\r\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode || (ErrorCode = {}));\n// CONCATENATED MODULE: ./src/storage/implementation/xhrio_network.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n/**\r\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\r\n * doesn't work in React Native on Android.\r\n */\nvar xhrio_network_NetworkXhrIo = function () {\n function NetworkXhrIo() {\n var _this = this;\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = ErrorCode.NO_ERROR;\n this.sendPromise_ = make(function (resolve, reject) {\n _this.xhr_.addEventListener('abort', function (event) {\n _this.errorCode_ = ErrorCode.ABORT;\n resolve(_this);\n });\n _this.xhr_.addEventListener('error', function (event) {\n _this.errorCode_ = ErrorCode.NETWORK_ERROR;\n resolve(_this);\n });\n _this.xhr_.addEventListener('load', function (event) {\n resolve(_this);\n });\n });\n }\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.send = function (url, method, opt_body, opt_headers) {\n var _this = this;\n if (this.sent_) {\n throw internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (isDef(opt_headers)) {\n var headers = opt_headers;\n forEach(headers, function (key, val) {\n _this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (isDef(opt_body)) {\n this.xhr_.send(opt_body);\n } else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw internalError('cannot .getErrorCode() before sending');\n }\n return this.errorCode_;\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getStatus = function () {\n if (!this.sent_) {\n throw internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n } catch (e) {\n return -1;\n }\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw internalError('cannot .getResponseText() before sending');\n }\n return this.xhr_.responseText;\n };\n /**\r\n * Aborts the request.\r\n * @override\r\n */\n NetworkXhrIo.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.addUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.removeUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n return NetworkXhrIo;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/xhriopool.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * Factory-like class for creating XhrIo instances.\r\n */\nvar xhriopool_XhrIoPool = function () {\n function XhrIoPool() {}\n XhrIoPool.prototype.createXhrIo = function () {\n return new xhrio_network_NetworkXhrIo();\n };\n return XhrIoPool;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/json.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * Returns the Object resulting from parsing the given JSON, or null if the\r\n * given string does not represent a JSON object.\r\n */\nfunction jsonObjectOrNull(s) {\n var obj;\n try {\n obj = JSON.parse(s);\n } catch (e) {\n return null;\n }\n if (isNonArrayObject(obj)) {\n return obj;\n } else {\n return null;\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/location.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Functionality related to the parsing/composition of bucket/\r\n * object location.\r\n */\n\n/**\r\n * @struct\r\n */\nvar location_Location = function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n Object.defineProperty(Location.prototype, \"path\", {\n get: function get() {\n return this.path_;\n },\n enumerable: true,\n configurable: true\n });\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n Location.makeFromBucketSpec = function (bucketString) {\n var bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n } catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n } else {\n throw invalidDefaultBucket(bucketString);\n }\n };\n Location.makeFromUrl = function (url) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n var gsPath = '(/(.*))?$';\n var path = '(/([^?#]*).*)?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = { bucket: 1, path: 3 };\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n var version = 'v[A-Za-z0-9_]+';\n var httpRegex = new RegExp('^https?://firebasestorage\\\\.googleapis\\\\.com/' + version + '/b/' + bucketDomain + '/o' + path, 'i');\n var httpIndices = { bucket: 1, path: 3 };\n var groups = [{ regex: gsRegex, indices: gsIndices, postModify: gsModify }, { regex: httpRegex, indices: httpIndices, postModify: httpModify }];\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw invalidUrl(url);\n }\n return location;\n };\n return Location;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/path.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Contains helper methods for manipulating paths.\r\n */\n/**\r\n * @return Null if the path is already at the root.\r\n */\nfunction parent(path) {\n if (path.length == 0) {\n return null;\n }\n var index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n var newPath = path.slice(0, index);\n return newPath;\n}\nfunction child(path, childPath) {\n var canonicalChildPath = childPath.split('/').filter(function (component) {\n return component.length > 0;\n }).join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n } else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\r\n * Returns the last component of a path.\r\n * '/foo/bar' -> 'bar'\r\n * '/foo/bar/baz/' -> 'baz/'\r\n * '/a' -> 'a'\r\n */\nfunction lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n } else {\n return path.slice(index + 1);\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/url.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Functions to create and manipulate URLs for the server API.\r\n */\n\n\nfunction makeNormalUrl(urlPart) {\n return domainBase + apiBaseUrl + urlPart;\n}\nfunction makeDownloadUrl(urlPart) {\n return downloadBase + apiBaseUrl + urlPart;\n}\nfunction makeUploadUrl(urlPart) {\n return domainBase + apiUploadBaseUrl + urlPart;\n}\nfunction makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n forEach(params, function (key, val) {\n var nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/metadata.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\nfunction noXform_(metadata, value) {\n return value;\n}\n/**\r\n * @struct\r\n */\nvar Mapping = function () {\n function Mapping(server, opt_local, opt_writable, opt_xform) {\n this.server = server;\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n return Mapping;\n}();\n\nvar mappings_ = null;\nfunction xformPath(fullPath) {\n var valid = isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n } else {\n fullPath = fullPath;\n return lastComponent(fullPath);\n }\n}\nfunction getMappings() {\n if (mappings_) {\n return mappings_;\n }\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n function mappingsXformPath(metadata, fullPath) {\n return xformPath(fullPath);\n }\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\r\n * Coerces the second param to a number, if it is defined.\r\n */\n function xformSize(metadata, size) {\n if (isDef(size)) {\n return +size;\n } else {\n return size;\n }\n }\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n /**\r\n * Transforms a comma-separated string of tokens into a list of download\r\n * URLs.\r\n */\n function xformTokens(metadata, tokens) {\n var valid = isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = makeDownloadUrl(urlPart);\n var queryString = makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(new Mapping('downloadTokens', 'downloadURLs', false, xformTokens));\n mappings_ = mappings;\n return mappings_;\n}\nfunction addRef(metadata, authWrapper) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new location_Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\nfunction fromResource(authWrapper, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\nfunction fromResourceString(authWrapper, resourceString, mappings) {\n var obj = jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n var resource = obj;\n return fromResource(authWrapper, resource, mappings);\n}\nfunction toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\nfunction metadataValidator(p) {\n var validType = p && isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (var key in p) {\n var val = p[key];\n if (key === 'customMetadata') {\n if (!isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n } else {\n if (isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/args.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n/**\r\n * @param name Name of the function.\r\n * @param specs Argument specs.\r\n * @param passed The actual arguments passed to the function.\r\n * @throws {fbs.Error} If the arguments are invalid.\r\n */\nfunction validate(name, specs, passed) {\n var minArgs = specs.length;\n var maxArgs = specs.length;\n for (var i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n var validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw invalidArgumentCount(minArgs, maxArgs, name, passed.length);\n }\n for (var i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n } catch (e) {\n if (e instanceof Error) {\n throw invalidArgument(i, name, e.message);\n } else {\n throw invalidArgument(i, name, e);\n }\n }\n }\n}\n/**\r\n * @struct\r\n */\nvar args_ArgSpec = function () {\n function ArgSpec(validator, opt_optional) {\n var self = this;\n this.validator = function (p) {\n if (self.optional && !isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n return ArgSpec;\n}();\n\nfunction and_(v1, v2) {\n return function (p) {\n v1(p);\n v2(p);\n };\n}\nfunction stringSpec(opt_validator, opt_optional) {\n function stringValidator(p) {\n if (!isString(p)) {\n throw 'Expected string.';\n }\n }\n var validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n } else {\n validator = stringValidator;\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction uploadDataSpec() {\n function validator(p) {\n var valid = p instanceof Uint8Array || p instanceof ArrayBuffer || isNativeBlobDefined() && p instanceof Blob;\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction metadataSpec(opt_optional) {\n return new args_ArgSpec(metadataValidator, opt_optional);\n}\nfunction nonNegativeNumberSpec() {\n function validator(p) {\n var valid = isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction looseObjectSpec(opt_validator, opt_optional) {\n function validator(p) {\n var isLooseObject = p === null || isDef(p) && p instanceof Object;\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction nullFunctionSpec(opt_optional) {\n function validator(p) {\n var valid = p === null || isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/fs.ts\n\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n } else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n } else {\n return undefined;\n }\n}\n/**\r\n * Concatenates one or more values together and converts them to a Blob.\r\n *\r\n * @param var_args The values that will make up the resulting blob.\r\n * @return The blob.\r\n */\nfunction getBlob() {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n for (var i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n } else {\n if (isNativeBlobDefined()) {\n return new Blob(var_args);\n } else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\r\n * Slices the blob. The returned blob contains data from the start byte\r\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\r\n *\r\n * @param blob The blob to be sliced.\r\n * @param start Index of the starting byte.\r\n * @param end Index of the ending byte.\r\n * @return The blob slice or null if not supported.\r\n */\nfunction sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n } else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n } else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/blob.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @file Provides a Blob-like wrapper for various binary types (including the\r\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\r\n * making uploads possible in environments without the native Blob type.\r\n */\n\n\n\n\n/**\r\n * @param opt_elideCopy If true, doesn't copy mutable input data\r\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\r\n * modified after this blob's construction.\r\n */\nvar blob_FbsBlob = function () {\n function FbsBlob(data, opt_elideCopy) {\n var size = 0;\n var blobType = '';\n if (isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n } else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n } else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n } else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data;\n } else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n } else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n FbsBlob.getBlob = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (isNativeBlobDefined()) {\n var blobby = var_args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n } else {\n return val;\n }\n });\n return new FbsBlob(getBlob.apply(null, blobby));\n } else {\n var uint8Arrays = var_args.map(function (val) {\n if (isString(val)) {\n return dataFromString(StringFormat.RAW, val).data;\n } else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n return FbsBlob;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/array.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * Returns true if the object is contained in the array (compared with ===).\r\n * @template T\r\n */\nfunction array_contains(array, elem) {\n return array.indexOf(elem) !== -1;\n}\n/**\r\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\r\n * @template T\r\n */\nfunction array_clone(arraylike) {\n return Array.prototype.slice.call(arraylike);\n}\n/**\r\n * Removes the given element from the given array, if it is contained.\r\n * Directly modifies the passed-in array.\r\n * @template T\r\n */\nfunction remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/requestinfo.ts\nvar RequestInfo = function () {\n function RequestInfo(url, method,\n /**\r\n * Returns the value with which to resolve the request's promise. Only called\r\n * if the request is successful. Throw from this function to reject the\r\n * returned Request's promise with the thrown error.\r\n * Note: The XhrIo passed to this function may be reused after this callback\r\n * returns. Do not keep a reference to it in any way.\r\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\r\n * Called with the current number of bytes uploaded and total size (-1 if not\r\n * computable) of the request body (i.e. used to report upload progress).\r\n */\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n return RequestInfo;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/requests.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n/**\r\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\r\n */\nfunction handlerCheck(cndn) {\n if (!cndn) {\n throw unknown();\n }\n}\nfunction metadataHandler(authWrapper, mappings) {\n function handler(xhr, text) {\n var metadata = fromResourceString(authWrapper, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n return handler;\n}\nfunction sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n if (xhr.getStatus() === 401) {\n newErr = unauthenticated();\n } else {\n if (xhr.getStatus() === 402) {\n newErr = quotaExceeded(location.bucket);\n } else {\n if (xhr.getStatus() === 403) {\n newErr = unauthorized(location.path);\n } else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction getMetadata(authWrapper, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'GET';\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction updateMetadata(authWrapper, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'PATCH';\n var body = toResourceString(metadata, mappings);\n var headers = { 'Content-Type': 'application/json; charset=utf-8' };\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction deleteObject(authWrapper, location) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'DELETE';\n var timeout = authWrapper.maxOperationRetryTime();\n function handler(xhr, text) {}\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction determineContentType_(metadata, blob) {\n return metadata && metadata['contentType'] || blob && blob.type() || 'application/octet-stream';\n}\nfunction metadataForUpload_(location, blob, opt_metadata) {\n var metadata = clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\nfunction multipartUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n function genBoundary() {\n var str = '';\n for (var i = 0; i < 2; i++) {\n str = str + Math.random().toString().slice(2);\n }\n return str;\n }\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var metadataString = toResourceString(metadata, mappings);\n var preBlobPart = '--' + boundary + '\\r\\n' + 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' + metadataString + '\\r\\n--' + boundary + '\\r\\n' + 'Content-Type: ' + metadata['contentType'] + '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = blob_FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw cannotSliceBlob();\n }\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @param current The number of bytes that have been uploaded so far.\r\n * @param total The total number of bytes in the upload.\r\n * @param opt_finalized True if the server has finished the upload.\r\n * @param opt_metadata The upload metadata, should\r\n * only be passed if opt_finalized is true.\r\n * @struct\r\n */\nvar ResumableUploadStatus = function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n return ResumableUploadStatus;\n}();\n\nfunction checkResumeHeader_(xhr, opt_allowed) {\n var status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n } catch (e) {\n handlerCheck(false);\n }\n var allowed = opt_allowed || ['active'];\n handlerCheck(array_contains(allowed, status));\n return status;\n}\nfunction createResumableUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = toResourceString(metadata, mappings);\n var timeout = authWrapper.maxUploadRetryTime();\n function handler(xhr, text) {\n checkResumeHeader_(xhr);\n var url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n } catch (e) {\n handlerCheck(false);\n }\n handlerCheck(isString(url));\n return url;\n }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n */\nfunction getResumableUploadStatus(authWrapper, location, url, blob) {\n var headers = { 'X-Goog-Upload-Command': 'query' };\n function handler(xhr, text) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n } catch (e) {\n handlerCheck(false);\n }\n var size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * Any uploads via the resumable upload API must transfer a number of bytes\r\n * that is a multiple of this number.\r\n */\nvar resumableUploadChunkSize = 256 * 1024;\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n * @param chunkSize Number of bytes to upload.\r\n * @param opt_status The previous status.\r\n * If not passed or null, we start from the beginning.\r\n * @throws fbs.Error If the upload is already complete, the passed in status\r\n * has a final size inconsistent with the blob, or the blob cannot be sliced\r\n * for upload.\r\n */\nfunction continueResumableUpload(location, authWrapper, url, blob, chunkSize, mappings, opt_status, opt_progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n } else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw serverFileWrongSize();\n }\n var bytesLeft = status.total - status.current;\n var bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n var startByte = status.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n var body = blob.slice(startByte, endByte);\n if (body === null) {\n throw cannotSliceBlob();\n }\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n } else {\n metadata = null;\n }\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/observer.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * @struct\r\n */\nvar observer_Observer = function () {\n function Observer(nextOrObserver, opt_error, opt_complete) {\n var asFunctions = isFunction(nextOrObserver) || isDef(opt_error) || isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n } else {\n var observer = nextOrObserver;\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n return Observer;\n}();\n\n// CONCATENATED MODULE: ./src/storage/tasksnapshot.ts\nvar UploadTaskSnapshot = function () {\n function UploadTaskSnapshot(bytesTransferred, totalBytes, state, metadata, task, ref) {\n this.bytesTransferred = bytesTransferred;\n this.totalBytes = totalBytes;\n this.state = state;\n this.metadata = metadata;\n this.task = task;\n this.ref = ref;\n }\n Object.defineProperty(UploadTaskSnapshot.prototype, \"downloadURL\", {\n get: function get() {\n if (this.metadata !== null) {\n var urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n return UploadTaskSnapshot;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/async.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Method for invoking a callback asynchronously.\r\n */\n\n/**\r\n * Returns a function that invokes f with its arguments asynchronously as a\r\n * microtask, i.e. as soon as possible after the current script returns back\r\n * into browser code.\r\n */\nfunction async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promise_external_resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}\n// CONCATENATED MODULE: ./src/storage/task.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Defines types for interacting with blob transfer tasks.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\r\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\r\n * upload and manage callbacks for various events.\r\n */\nvar task_UploadTask = function () {\n /**\r\n * @param ref The firebaseStorage.Reference object this task came\r\n * from, untyped to avoid cyclic dependencies.\r\n * @param blob The blob to upload.\r\n */\n function UploadTask(ref, authWrapper, location, mappings, blob, metadata) {\n if (metadata === void 0) {\n metadata = null;\n }\n var _this = this;\n this.transferred_ = 0;\n this.needToFetchStatus_ = false;\n this.needToFetchMetadata_ = false;\n this.observers_ = [];\n this.error_ = null;\n this.uploadUrl_ = null;\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n this.resolve_ = null;\n this.reject_ = null;\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = function (error) {\n _this.request_ = null;\n _this.chunkMultiplier_ = 1;\n if (error.codeEquals(Code.CANCELED)) {\n _this.needToFetchStatus_ = true;\n _this.completeTransitions_();\n } else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = function (error) {\n _this.request_ = null;\n if (error.codeEquals(Code.CANCELED)) {\n _this.completeTransitions_();\n } else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = make(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n _this.start_();\n });\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, function () {});\n }\n UploadTask.prototype.makeProgressCallback_ = function () {\n var _this = this;\n var sizeBefore = this.transferred_;\n return function (loaded, total) {\n _this.updateProgress_(sizeBefore + loaded);\n };\n };\n UploadTask.prototype.shouldDoResumable_ = function (blob) {\n return blob.size() > 256 * 1024;\n };\n UploadTask.prototype.start_ = function () {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n } else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n } else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n } else {\n this.continueUpload_();\n }\n }\n }\n } else {\n this.oneShotUpload_();\n }\n };\n UploadTask.prototype.resolveToken_ = function (callback) {\n var _this = this;\n this.authWrapper_.getAuthToken().then(function (authToken) {\n switch (_this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n _this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n _this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n };\n // TODO(andysoto): assert false\n UploadTask.prototype.createResumable_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = createResumableUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var createRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = createRequest;\n createRequest.getPromise().then(function (url) {\n _this.request_ = null;\n _this.uploadUrl_ = url;\n _this.needToFetchStatus_ = false;\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.fetchStatus_ = function () {\n var _this = this;\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo = getResumableUploadStatus(_this.authWrapper_, _this.location_, url, _this.blob_);\n var statusRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this.request_ = null;\n _this.updateProgress_(status.current);\n _this.needToFetchStatus_ = false;\n if (status.finalized) {\n _this.needToFetchMetadata_ = true;\n }\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.continueUpload_ = function () {\n var _this = this;\n var chunkSize = resumableUploadChunkSize * this.chunkMultiplier_;\n var status = new ResumableUploadStatus(this.transferred_, this.blob_.size());\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo;\n try {\n requestInfo = continueResumableUpload(_this.location_, _this.authWrapper_, url, _this.blob_, chunkSize, _this.mappings_, status, _this.makeProgressCallback_());\n } catch (e) {\n _this.error_ = e;\n _this.transition_(InternalTaskState.ERROR);\n return;\n }\n var uploadRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = uploadRequest;\n uploadRequest.getPromise().then(function (newStatus) {\n _this.increaseMultiplier_();\n _this.request_ = null;\n _this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n _this.metadata_ = newStatus.metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n } else {\n _this.completeTransitions_();\n }\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.increaseMultiplier_ = function () {\n var currentSize = resumableUploadChunkSize * this.chunkMultiplier_;\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n };\n UploadTask.prototype.fetchMetadata_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = getMetadata(_this.authWrapper_, _this.location_, _this.mappings_);\n var metadataRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.metadataErrorHandler_);\n });\n };\n UploadTask.prototype.oneShotUpload_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = multipartUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var multipartRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.updateProgress_(_this.blob_.size());\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.updateProgress_ = function (transferred) {\n var old = this.transferred_;\n this.transferred_ = transferred;\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n };\n UploadTask.prototype.transition_ = function (state) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = error_canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n };\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n };\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n get: function get() {\n var externalState = taskStateFromInternalTaskState(this.state_);\n return new UploadTaskSnapshot(this.transferred_, this.blob_.size(), externalState, this.metadata_, this, this.ref_);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Adds a callback for an event.\r\n * @param type The type of event to listen for.\r\n */\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n if (nextOrObserver === void 0) {\n nextOrObserver = undefined;\n }\n if (error === void 0) {\n error = undefined;\n }\n if (completed === void 0) {\n completed = undefined;\n }\n function typeValidator(_p) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw \"Expected one of the event types: [\" + TaskEvent.STATE_CHANGED + \"].\";\n }\n }\n var nextOrObserverMessage = 'Expected a function or an Object with one of ' + '`next`, `error`, `complete` properties.';\n var nextValidator = nullFunctionSpec(true).validator;\n var observerValidator = looseObjectSpec(null, true).validator;\n function nextOrObserverValidator(p) {\n try {\n nextValidator(p);\n return;\n } catch (e) {}\n try {\n observerValidator(p);\n var anyDefined = isJustDef(p['next']) || isJustDef(p['error']) || isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n } catch (e) {\n throw nextOrObserverMessage;\n }\n }\n var specs = [stringSpec(typeValidator), looseObjectSpec(nextOrObserverValidator, true), nullFunctionSpec(true), nullFunctionSpec(true)];\n validate('on', specs, arguments);\n var self = this;\n function makeBinder(specs) {\n function binder(nextOrObserver, error, opt_complete) {\n if (specs !== null) {\n validate('on', specs, arguments);\n }\n var observer = new observer_Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return function () {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n function binderNextOrObserverValidator(p) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n var binderSpecs = [looseObjectSpec(binderNextOrObserverValidator), nullFunctionSpec(true), nullFunctionSpec(true)];\n var typeOnly = !(isJustDef(nextOrObserver) || isJustDef(error) || isJustDef(completed));\n if (typeOnly) {\n return makeBinder(binderSpecs);\n } else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n };\n /**\r\n * This object behaves like a Promise, and resolves with its snapshot data\r\n * when the upload completes.\r\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\r\n * @param onRejected The rejection callback.\r\n */\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(onFulfilled, onRejected);\n };\n /**\r\n * Equivalent to calling `then(null, onRejected)`.\r\n */\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\r\n * Adds the given observer.\r\n */\n UploadTask.prototype.addObserver_ = function (observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n };\n /**\r\n * Removes the given observer.\r\n */\n UploadTask.prototype.removeObserver_ = function (observer) {\n remove(this.observers_, observer);\n };\n UploadTask.prototype.notifyObservers_ = function () {\n var _this = this;\n this.finishPromise_();\n var observers = array_clone(this.observers_);\n observers.forEach(function (observer) {\n _this.notifyObserver_(observer);\n });\n };\n UploadTask.prototype.finishPromise_ = function () {\n if (this.resolve_ !== null) {\n var triggered = true;\n switch (taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n async(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this.reject_;\n async(toCall.bind(null, this.error_))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n };\n UploadTask.prototype.notifyObserver_ = function (observer) {\n var externalState = taskStateFromInternalTaskState(this.state_);\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n async(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n async(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n async(observer.error.bind(observer, this.error_))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n async(observer.error.bind(observer, this.error_))();\n }\n }\n };\n /**\r\n * Resumes a paused task. Has no effect on a currently running or failed task.\r\n * @return True if the operation took effect, false if ignored.\r\n */\n UploadTask.prototype.resume = function () {\n validate('resume', [], arguments);\n var valid = this.state_ === InternalTaskState.PAUSED || this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n };\n /**\r\n * Pauses a currently running task. Has no effect on a paused or failed task.\r\n * @return True if the operation took effect, false if ignored.\r\n */\n UploadTask.prototype.pause = function () {\n validate('pause', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n };\n /**\r\n * Cancels a currently running or paused task. Has no effect on a complete or\r\n * failed task.\r\n * @return True if the operation took effect, false if ignored.\r\n */\n UploadTask.prototype.cancel = function () {\n validate('cancel', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING || this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n };\n return UploadTask;\n}();\n\n// CONCATENATED MODULE: ./src/storage/reference.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Defines the Firebase Storage Reference class.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\r\n * Provides methods to interact with a bucket in the Firebase Storage service.\r\n * @param location An fbs.location, or the URL at\r\n * which to base this object, in one of the following forms:\r\n * gs:///\r\n * http[s]://firebasestorage.googleapis.com/\r\n * /b//o/\r\n * Any query or fragment strings will be ignored in the http[s]\r\n * format. If no value is passed, the storage object will use a URL based on\r\n * the project ID of the base firebase.App instance.\r\n */\nvar reference_Reference = function () {\n function Reference(authWrapper, location) {\n this.authWrapper = authWrapper;\n if (location instanceof location_Location) {\n this.location = location;\n } else {\n this.location = location_Location.makeFromUrl(location);\n }\n }\n /**\r\n * @return The URL for the bucket and path this object references,\r\n * in the form gs:///\r\n * @override\r\n */\n Reference.prototype.toString = function () {\n validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n };\n Reference.prototype.newRef = function (authWrapper, location) {\n return new Reference(authWrapper, location);\n };\n Reference.prototype.mappings = function () {\n return getMappings();\n };\n /**\r\n * @return A reference to the object obtained by\r\n * appending childPath, removing any duplicate, beginning, or trailing\r\n * slashes.\r\n */\n Reference.prototype.child = function (childPath) {\n validate('child', [stringSpec()], arguments);\n var newPath = child(this.location.path, childPath);\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n };\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\r\n * @return A reference to the parent of the\r\n * current object, or null if the current object is the root.\r\n */\n get: function get() {\n var newPath = parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\r\n * @return An reference to the root of this\r\n * object's bucket.\r\n */\n get: function get() {\n var location = new location_Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n get: function get() {\n return this.location.bucket;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n get: function get() {\n return this.location.path;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n get: function get() {\n return lastComponent(this.location.path);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n get: function get() {\n return this.authWrapper.service();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Uploads a blob to this object's location.\r\n * @param data The blob to upload.\r\n * @return An UploadTask that lets you control and\r\n * observe the upload.\r\n */\n Reference.prototype.put = function (data, metadata) {\n if (metadata === void 0) {\n metadata = null;\n }\n validate('put', [uploadDataSpec(), metadataSpec(true)], arguments);\n this.throwIfRoot_('put');\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data), metadata);\n };\n /**\r\n * Uploads a string to this object's location.\r\n * @param string The string to upload.\r\n * @param opt_format The format of the string to upload.\r\n * @return An UploadTask that lets you control and\r\n * observe the upload.\r\n */\n Reference.prototype.putString = function (string, format, opt_metadata) {\n if (format === void 0) {\n format = StringFormat.RAW;\n }\n validate('putString', [stringSpec(), stringSpec(formatValidator, true), metadataSpec(true)], arguments);\n this.throwIfRoot_('putString');\n var data = dataFromString(format, string);\n var metadata = clone(opt_metadata);\n if (!isDef(metadata['contentType']) && isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data.data, true), metadata);\n };\n /**\r\n * Deletes the object at this location.\r\n * @return A promise that resolves if the deletion succeeds.\r\n */\n Reference.prototype.delete = function () {\n validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\r\n * A promise that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n */\n Reference.prototype.getMetadata = function () {\n validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = getMetadata(self.authWrapper, self.location, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\r\n * Updates the metadata for this object.\r\n * @param metadata The new metadata for the object.\r\n * Only values that have been explicitly set will be changed. Explicitly\r\n * setting a value to null will remove the metadata.\r\n * @return A promise that resolves\r\n * with the new metadata for this object.\r\n * @see firebaseStorage.Reference.prototype.getMetadata\r\n */\n Reference.prototype.updateMetadata = function (metadata) {\n validate('updateMetadata', [metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = updateMetadata(self.authWrapper, self.location, metadata, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\r\n * @return A promise that resolves with the download\r\n * URL for this object.\r\n */\n Reference.prototype.getDownloadURL = function () {\n validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function (metadata) {\n var url = metadata['downloadURLs'][0];\n if (isDef(url)) {\n return url;\n } else {\n throw noDownloadURL();\n }\n });\n };\n Reference.prototype.throwIfRoot_ = function (name) {\n if (this.location.path === '') {\n throw invalidRootOperation(name);\n }\n };\n return Reference;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/failrequest.ts\n\n/**\r\n * A request whose promise always fails.\r\n * @struct\r\n * @template T\r\n */\nvar failrequest_FailRequest = function () {\n function FailRequest(error) {\n this.promise_ = promise_external_reject(error);\n }\n /** @inheritDoc */\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n FailRequest.prototype.cancel = function (appDelete) {\n if (appDelete === void 0) {\n appDelete = false;\n }\n };\n return FailRequest;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/requestmap.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/**\r\n * @struct\r\n */\nvar requestmap_RequestMap = function () {\n function RequestMap() {\n this.map_ = {};\n this.id_ = minSafeInteger;\n }\n /**\r\n * Registers the given request with this map.\r\n * The request is unregistered when it completes.\r\n * @param r The request to register.\r\n */\n RequestMap.prototype.addRequest = function (r) {\n var id = this.id_;\n this.id_++;\n this.map_[id] = r;\n var self = this;\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n };\n /**\r\n * Cancels all registered requests.\r\n */\n RequestMap.prototype.clear = function () {\n forEach(this.map_, function (key, val) {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n };\n return RequestMap;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/authwrapper.ts\n\n\n\n\n\n\n\n/**\r\n * @param app If null, getAuthToken always resolves with null.\r\n * @param service The storage service associated with this auth wrapper.\r\n * Untyped to avoid circular type dependencies.\r\n * @struct\r\n */\nvar authwrapper_AuthWrapper = function () {\n function AuthWrapper(app, maker, requestMaker, service, pool) {\n this.bucket_ = null;\n this.deleted_ = false;\n this.app_ = app;\n if (this.app_ !== null) {\n var options = this.app_.options;\n if (isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = defaultMaxUploadRetryTime;\n this.requestMap_ = new requestmap_RequestMap();\n }\n AuthWrapper.extractBucket_ = function (config) {\n var bucketString = config[configOption] || null;\n if (bucketString == null) {\n return null;\n }\n var loc = location_Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n };\n AuthWrapper.prototype.getAuthToken = function () {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (this.app_ !== null && isDef(this.app_.INTERNAL) && isDef(this.app_.INTERNAL.getToken)) {\n return this.app_.INTERNAL.getToken().then(function (response) {\n if (response !== null) {\n return response.accessToken;\n } else {\n return null;\n }\n }, function (_error) {\n return null;\n });\n } else {\n return promise_external_resolve(null);\n }\n };\n AuthWrapper.prototype.bucket = function () {\n if (this.deleted_) {\n throw appDeleted();\n } else {\n return this.bucket_;\n }\n };\n /**\r\n * The service associated with this auth wrapper. Untyped to avoid circular\r\n * type dependencies.\r\n */\n AuthWrapper.prototype.service = function () {\n return this.service_;\n };\n /**\r\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\r\n * at the given Location.\r\n * @param loc The Location.\r\n * @return Actually a firebaseStorage.Reference, typing not allowed\r\n * because of circular dependency problems.\r\n */\n AuthWrapper.prototype.makeStorageReference = function (loc) {\n return this.storageRefMaker_(this, loc);\n };\n AuthWrapper.prototype.makeRequest = function (requestInfo, authToken) {\n if (!this.deleted_) {\n var request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n } else {\n return new failrequest_FailRequest(appDeleted());\n }\n };\n /**\r\n * Stop running requests and prevent more from being created.\r\n */\n AuthWrapper.prototype.deleteApp = function () {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n };\n AuthWrapper.prototype.maxUploadRetryTime = function () {\n return this.maxUploadRetryTime_;\n };\n AuthWrapper.prototype.setMaxUploadRetryTime = function (time) {\n this.maxUploadRetryTime_ = time;\n };\n AuthWrapper.prototype.maxOperationRetryTime = function () {\n return this.maxOperationRetryTime_;\n };\n AuthWrapper.prototype.setMaxOperationRetryTime = function (time) {\n this.maxOperationRetryTime_ = time;\n };\n return AuthWrapper;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/backoff.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @param f May be invoked\r\n * before the function returns.\r\n * @param callback Get all the arguments passed to the function\r\n * passed to f, including the initial boolean.\r\n */\nfunction start(f, callback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n function canceled() {\n return cancelState === 2;\n }\n var triggeredCallback = false;\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n function handler(success) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n var mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n var waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n } else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n var stopped = false;\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n } else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\r\n * Stops the retry loop from repeating.\r\n * If the function is currently \"in between\" retries, it is invoked immediately\r\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\r\n * after the current invocation finishes iff the current invocation would have\r\n * triggered another retry.\r\n */\nfunction stop(id) {\n id(false);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/request.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Defines methods used to actually send HTTP requests from\r\n * abstract representations.\r\n */\n\n\n\n\n\n\n\n\n/**\r\n * @struct\r\n * @template T\r\n */\nvar request_NetworkRequest = function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n this.pendingXhr_ = null;\n this.backoffId_ = null;\n this.resolve_ = null;\n this.reject_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n var self = this;\n this.promise_ = make(function (resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n /**\r\n * Actually starts the retry loop.\r\n */\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n var xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr.send(self.url_, self.method_, self.body_, self.headers_).then(function (xhr) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr;\n var hitServer = xhr.getErrorCode() === ErrorCode.NO_ERROR;\n var status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = xhr.getErrorCode() === ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n var successCode = array_contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n /**\r\n * @param requestWentThrough True if the request eventually went\r\n * through, false if it hit the retry limit or was canceled.\r\n */\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var xhr = status.xhr;\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(xhr, xhr.getResponseText());\n if (isJustDef(result)) {\n resolve(result);\n } else {\n resolve();\n }\n } catch (e) {\n reject(e);\n }\n } else {\n if (xhr !== null) {\n var err = unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n } else {\n reject(err);\n }\n } else {\n if (status.canceled) {\n var err = self.appDelete_ ? appDeleted() : error_canceled();\n reject(err);\n } else {\n var err = retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n } else {\n this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n };\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429];\n var isExtraRetryCode = array_contains(extraRetryCodes, status);\n var isRequestSpecificRetryCode = array_contains(this.additionalRetryCodes_, status);\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n return NetworkRequest;\n}();\n/**\r\n * A collection of information about the result of a network request.\r\n * @param opt_canceled Defaults to false.\r\n * @struct\r\n */\nvar RequestEndStatus = function () {\n function RequestEndStatus(wasSuccessCode, xhr, opt_canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.xhr = xhr;\n this.canceled = !!opt_canceled;\n }\n return RequestEndStatus;\n}();\n\nfunction addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\nfunction addVersionHeader_(headers) {\n var number = typeof firebase !== 'undefined' ? firebase.SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n/**\r\n * @template T\r\n */\nfunction makeRequest(requestInfo, authToken, pool) {\n var queryPart = makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new request_NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n// CONCATENATED MODULE: ./src/storage/service.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n/**\r\n * A service that provides firebaseStorage.Reference instances.\r\n * @param opt_url gs:// url to a custom Storage Bucket\r\n *\r\n * @struct\r\n */\nvar service_Service = function () {\n function Service(app, pool, url) {\n this.bucket_ = null;\n function maker(authWrapper, loc) {\n return new reference_Reference(authWrapper, loc);\n }\n this.authWrapper_ = new authwrapper_AuthWrapper(app, maker, makeRequest, this, pool);\n this.app_ = app;\n if (url != null) {\n this.bucket_ = location_Location.makeFromBucketSpec(url);\n } else {\n var authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new location_Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new service_ServiceInternals(this);\n }\n /**\r\n * Returns a firebaseStorage.Reference for the given path in the default\r\n * bucket.\r\n */\n Service.prototype.ref = function (path) {\n function validator(path) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n validate('ref', [stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n var ref = new reference_Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n } else {\n return ref;\n }\n };\n /**\r\n * Returns a firebaseStorage.Reference object for the given absolute URL,\r\n * which must be a gs:// or http[s]:// URL.\r\n */\n Service.prototype.refFromURL = function (url) {\n function validator(p) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n location_Location.makeFromUrl(p);\n } catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n validate('refFromURL', [stringSpec(validator, false)], arguments);\n return new reference_Reference(this.authWrapper_, url);\n };\n Object.defineProperty(Service.prototype, \"maxUploadRetryTime\", {\n get: function get() {\n return this.authWrapper_.maxUploadRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxUploadRetryTime = function (time) {\n validate('setMaxUploadRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxUploadRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"maxOperationRetryTime\", {\n get: function get() {\n return this.authWrapper_.maxOperationRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxOperationRetryTime = function (time) {\n validate('setMaxOperationRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxOperationRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"app\", {\n get: function get() {\n return this.app_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Service.prototype, \"INTERNAL\", {\n get: function get() {\n return this.internals_;\n },\n enumerable: true,\n configurable: true\n });\n return Service;\n}();\n\n/**\r\n * @struct\r\n */\nvar service_ServiceInternals = function () {\n function ServiceInternals(service) {\n this.service_ = service;\n }\n /**\r\n * Called when the associated app is deleted.\r\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\r\n */\n ServiceInternals.prototype.delete = function () {\n this.service_.authWrapper_.deleteApp();\n return promise_external_resolve(undefined);\n };\n return ServiceInternals;\n}();\n\n// CONCATENATED MODULE: ./src/storage.ts\n/* harmony export (immutable) */ __webpack_exports__[\"registerStorage\"] = registerStorage;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app__ = __webpack_require__(5);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n/**\r\n * Type constant for Firebase Storage.\r\n */\nvar STORAGE_TYPE = 'storage';\nfunction factory(app, unused, opt_url) {\n return new service_Service(app, new xhriopool_XhrIoPool(), opt_url);\n}\nfunction registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: service_Service,\n Reference: reference_Reference\n };\n instance.INTERNAL.registerService(STORAGE_TYPE, factory, namespaceExports, undefined,\n // Allow multiple storage instances per app.\n true);\n}\nregisterStorage(__WEBPACK_IMPORTED_MODULE_5__app__[\"default\"]);\n\n/***/ })\n\n},[23]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-storage.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-storage.js","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { configOption } from './constants';\n\nexport class FirebaseStorageError implements Error {\n private code_: string;\n private message_: string;\n private serverResponse_: string | null;\n private name_: string;\n\n constructor(code: Code, message: string) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n\n codeProp(): string {\n return this.code;\n }\n\n codeEquals(code: Code): boolean {\n return prependCode(code) === this.codeProp();\n }\n\n serverResponseProp(): string | null {\n return this.serverResponse_;\n }\n\n setServerResponseProp(serverResponse: string | null) {\n this.serverResponse_ = serverResponse;\n }\n\n get name(): string {\n return this.name_;\n }\n\n get code(): string {\n return this.code_;\n }\n\n get message(): string {\n return this.message_;\n }\n\n get serverResponse(): null | string {\n return this.serverResponse_;\n }\n}\n\nexport const errors = {};\n\n/**\n * @enum {string}\n */\nexport type Code = string;\nexport const Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\n\nexport function prependCode(code: Code): string {\n return 'storage/' + code;\n}\n\nexport function unknown(): FirebaseStorageError {\n let message =\n 'An unknown error occurred, please check the error payload for ' +\n 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\n\nexport function objectNotFound(path: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.OBJECT_NOT_FOUND,\n \"Object '\" + path + \"' does not exist.\"\n );\n}\n\nexport function bucketNotFound(bucket: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.BUCKET_NOT_FOUND,\n \"Bucket '\" + bucket + \"' does not exist.\"\n );\n}\n\nexport function projectNotFound(project: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.PROJECT_NOT_FOUND,\n \"Project '\" + project + \"' does not exist.\"\n );\n}\n\nexport function quotaExceeded(bucket: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.QUOTA_EXCEEDED,\n \"Quota for bucket '\" +\n bucket +\n \"' exceeded, please view quota on \" +\n 'https://firebase.google.com/pricing/.'\n );\n}\n\nexport function unauthenticated(): FirebaseStorageError {\n let message =\n 'User is not authenticated, please authenticate using Firebase ' +\n 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\n\nexport function unauthorized(path: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.UNAUTHORIZED,\n \"User does not have permission to access '\" + path + \"'.\"\n );\n}\n\nexport function retryLimitExceeded(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.RETRY_LIMIT_EXCEEDED,\n 'Max retry time for operation exceeded, please try again.'\n );\n}\n\nexport function invalidChecksum(\n path: string,\n checksum: string,\n calculated: string\n): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_CHECKSUM,\n \"Uploaded/downloaded object '\" +\n path +\n \"' has checksum '\" +\n checksum +\n \"' which does not match '\" +\n calculated +\n \"'. Please retry the upload/download.\"\n );\n}\n\nexport function canceled(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.CANCELED,\n 'User canceled the upload/download.'\n );\n}\n\nexport function invalidEventName(name: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_EVENT_NAME,\n \"Invalid event name '\" + name + \"'.\"\n );\n}\n\nexport function invalidUrl(url: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_URL,\n \"Invalid URL '\" + url + \"'.\"\n );\n}\n\nexport function invalidDefaultBucket(bucket: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_DEFAULT_BUCKET,\n \"Invalid default bucket '\" + bucket + \"'.\"\n );\n}\n\nexport function noDefaultBucket(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.NO_DEFAULT_BUCKET,\n 'No default bucket ' +\n \"found. Did you set the '\" +\n configOption +\n \"' property when initializing the app?\"\n );\n}\n\nexport function cannotSliceBlob(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.CANNOT_SLICE_BLOB,\n 'Cannot slice blob for upload. Please retry the upload.'\n );\n}\n\nexport function serverFileWrongSize(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.SERVER_FILE_WRONG_SIZE,\n 'Server recorded incorrect upload file size, please retry the upload.'\n );\n}\n\nexport function noDownloadURL(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.NO_DOWNLOAD_URL,\n 'The given file does not have any download URLs.'\n );\n}\n\nexport function invalidArgument(\n index: number,\n fnName: string,\n message: string\n): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_ARGUMENT,\n 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message\n );\n}\n\nexport function invalidArgumentCount(\n argMin: number,\n argMax: number,\n fnName: string,\n real: number\n): FirebaseStorageError {\n let countPart;\n let plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n } else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(\n Code.INVALID_ARGUMENT_COUNT,\n 'Invalid argument count in `' +\n fnName +\n '`: Expected ' +\n countPart +\n ' ' +\n plural +\n ', received ' +\n real +\n '.'\n );\n}\n\nexport function appDeleted(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.APP_DELETED,\n 'The Firebase app was deleted.'\n );\n}\n\n/**\n * @param name The name of the operation that was invalid.\n */\nexport function invalidRootOperation(name: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_ROOT_OPERATION,\n \"The operation '\" +\n name +\n \"' cannot be performed on a root reference, create a non-root \" +\n \"reference using child, such as .child('file.png').\"\n );\n}\n\n/**\n * @param format The format that was not valid.\n * @param message A message describing the format violation.\n */\nexport function invalidFormat(\n format: string,\n message: string\n): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_FORMAT,\n \"String does not match format '\" + format + \"': \" + message\n );\n}\n\n/**\n * @param message A message describing the internal error.\n */\nexport function internalError(message: string): FirebaseStorageError {\n throw new FirebaseStorageError(\n Code.INTERNAL_ERROR,\n 'Internal error: ' + message\n );\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/error.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as errorsExports from './error';\nimport { errors } from './error';\n\n/**\n * @enum {string}\n */\nexport type StringFormat = string;\nexport const StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\n\nexport function formatValidator(stringFormat: string) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' +\n StringFormat.RAW +\n ', ' +\n StringFormat.BASE64 +\n ', ' +\n StringFormat.BASE64URL +\n ', ' +\n StringFormat.DATA_URL +\n '].';\n }\n}\n\n/**\n * @struct\n */\nexport class StringData {\n contentType: string | null;\n\n constructor(public data: Uint8Array, opt_contentType?: string | null) {\n this.contentType = opt_contentType || null;\n }\n}\n\nexport function dataFromString(\n format: StringFormat,\n string: string\n): StringData {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n\n // assert(false);\n throw errorsExports.unknown();\n}\n\nexport function utf8Bytes_(string: string): Uint8Array {\n let b = [];\n for (let i = 0; i < string.length; i++) {\n let c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n } else {\n if (c <= 2047) {\n b.push(192 | (c >> 6), 128 | (c & 63));\n } else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n let valid =\n i < string.length - 1 &&\n (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n } else {\n let hi = c;\n let lo = string.charCodeAt(++i);\n c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\n b.push(\n 240 | (c >> 18),\n 128 | ((c >> 12) & 63),\n 128 | ((c >> 6) & 63),\n 128 | (c & 63)\n );\n }\n } else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n } else {\n b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\n\nexport function percentEncodedBytes_(string: string): Uint8Array {\n let decoded;\n try {\n decoded = decodeURIComponent(string);\n } catch (e) {\n throw errorsExports.invalidFormat(\n StringFormat.DATA_URL,\n 'Malformed data URL.'\n );\n }\n return utf8Bytes_(decoded);\n}\n\nexport function base64Bytes_(format: StringFormat, string: string): Uint8Array {\n switch (format) {\n case StringFormat.BASE64: {\n let hasMinus = string.indexOf('-') !== -1;\n let hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n let invalidChar = hasMinus ? '-' : '_';\n throw errorsExports.invalidFormat(\n format,\n \"Invalid character '\" +\n invalidChar +\n \"' found: is it base64url encoded?\"\n );\n }\n break;\n }\n case StringFormat.BASE64URL: {\n let hasPlus = string.indexOf('+') !== -1;\n let hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n let invalidChar = hasPlus ? '+' : '/';\n throw errorsExports.invalidFormat(\n format,\n \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\"\n );\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n let bytes;\n try {\n bytes = atob(string);\n } catch (e) {\n throw errorsExports.invalidFormat(format, 'Invalid character found');\n }\n let array = new Uint8Array(bytes.length);\n for (let i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n\n/**\n * @struct\n */\nclass DataURLParts {\n base64: boolean = false;\n contentType: string | null = null;\n rest: string;\n\n constructor(dataURL: string) {\n let matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw errorsExports.invalidFormat(\n StringFormat.DATA_URL,\n \"Must be formatted 'data:[][;base64],\"\n );\n }\n let middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64\n ? middle.substring(0, middle.length - ';base64'.length)\n : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n}\n\nexport function dataURLBytes_(string: string): Uint8Array {\n let parts = new DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n } else {\n return percentEncodedBytes_(parts.rest);\n }\n}\n\nexport function dataURLContentType_(string: string): string | null {\n let parts = new DataURLParts(string);\n return parts.contentType;\n}\n\nfunction endsWith(s: string, end: string): boolean {\n const longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n\n return s.substring(s.length - end.length) === end;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/string.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Enumerations used for upload tasks.\n */\n\n/**\n * Enum for task events.\n * @enum {string}\n */\nexport type TaskEvent = string;\nexport const TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\n\n/**\n * Internal enum for task state.\n * @enum {string}\n */\nexport type InternalTaskState = string;\nexport const InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\n\n/**\n * External (API-surfaced) enum for task state.\n * @enum {string}\n */\nexport type TaskState = string;\nexport const TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\n\nexport function taskStateFromInternalTaskState(\n state: InternalTaskState\n): TaskState {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/taskenums.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Contains methods for working with objects.\n */\nexport function contains(obj: Object, prop: string): boolean {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function forEach(\n obj: { [key: string]: T },\n f: (p1: string, p2: T) => void\n) {\n for (let key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\n\nexport function clone(obj?: { [key: string]: any } | null): T {\n if (obj == null) {\n return {} as T;\n }\n\n let c: { [name: string]: any } = {};\n forEach(obj, function(key, val) {\n c[key] = val;\n });\n return c as T;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/object.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Implements the promise abstraction interface for external\n * (public SDK) packaging, which just passes through to the firebase-app impl.\n */\n\n/**\n * @template T\n * @param {function((function(T): void),\n * (function(!Error): void))} resolver\n */\n\nimport { PromiseImpl } from '../../utils/promise';\n\nexport function make(\n resolver: (p1: (p1: T) => void, p2: (p1: Error) => void) => void\n): Promise {\n return new PromiseImpl(resolver);\n}\n\n/**\n * @template T\n */\nexport function resolve(value: T): Promise {\n return PromiseImpl.resolve(value) as Promise;\n}\n\nexport function reject(error: Error): Promise {\n return PromiseImpl.reject(error) as Promise;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/promise_external.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @return False if the object is undefined or null, true otherwise.\n */\nexport function isDef(p: any): boolean {\n return p != null;\n}\n\nexport function isJustDef(p: any): boolean {\n return p !== void 0;\n}\n\nexport function isFunction(p: any): boolean {\n return typeof p === 'function';\n}\n\nexport function isObject(p: any): boolean {\n return typeof p === 'object';\n}\n\nexport function isNonNullObject(p: any): boolean {\n return isObject(p) && p !== null;\n}\n\nexport function isNonArrayObject(p: any): boolean {\n return isObject(p) && !Array.isArray(p);\n}\n\nexport function isString(p: any): boolean {\n return typeof p === 'string' || p instanceof String;\n}\n\nexport function isNumber(p: any): boolean {\n return typeof p === 'number' || p instanceof Number;\n}\n\nexport function isNativeBlob(p: any): boolean {\n return isNativeBlobDefined() && p instanceof Blob;\n}\n\nexport function isNativeBlobDefined(): boolean {\n return typeof Blob !== 'undefined';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/type.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as type from './type';\n\n/**\n * Returns the Object resulting from parsing the given JSON, or null if the\n * given string does not represent a JSON object.\n */\nexport function jsonObjectOrNull(s: string): { [name: string]: any } | null {\n let obj;\n try {\n obj = JSON.parse(s);\n } catch (e) {\n return null;\n }\n if (type.isNonArrayObject(obj)) {\n return obj;\n } else {\n return null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/json.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Contains helper methods for manipulating paths.\n */\n\n/**\n * @return Null if the path is already at the root.\n */\nexport function parent(path: string): string | null {\n if (path.length == 0) {\n return null;\n }\n let index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n let newPath = path.slice(0, index);\n return newPath;\n}\n\nexport function child(path: string, childPath: string): string {\n let canonicalChildPath = childPath\n .split('/')\n .filter(function(component) {\n return component.length > 0;\n })\n .join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n } else {\n return path + '/' + canonicalChildPath;\n }\n}\n\n/**\n * Returns the last component of a path.\n * '/foo/bar' -> 'bar'\n * '/foo/bar/baz/' -> 'baz/'\n * '/a' -> 'a'\n */\nexport function lastComponent(path: string): string {\n let index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n } else {\n return path.slice(index + 1);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/path.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Functions to create and manipulate URLs for the server API.\n */\nimport * as constants from './constants';\nimport * as object from './object';\n\nexport function makeNormalUrl(urlPart: string): string {\n return constants.domainBase + constants.apiBaseUrl + urlPart;\n}\n\nexport function makeDownloadUrl(urlPart: string): string {\n return constants.downloadBase + constants.apiBaseUrl + urlPart;\n}\n\nexport function makeUploadUrl(urlPart: string): string {\n return constants.domainBase + constants.apiUploadBaseUrl + urlPart;\n}\n\nexport function makeQueryString(params: { [key: string]: string }): string {\n let encode = encodeURIComponent;\n let queryPart = '?';\n object.forEach(params, function(key, val) {\n let nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/url.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Documentation for the metadata format\n */\nimport { Metadata } from '../metadata';\n\nimport { AuthWrapper } from './authwrapper';\nimport * as json from './json';\nimport { Location } from './location';\nimport * as path from './path';\nimport * as type from './type';\nimport * as UrlUtils from './url';\n\nexport function noXform_(metadata: Metadata, value: any): any {\n return value;\n}\n\n/**\n * @struct\n */\nexport class Mapping {\n local: string;\n writable: boolean;\n xform: (p1: Metadata, p2: any) => any;\n\n constructor(\n public server: string,\n opt_local?: string | null,\n opt_writable?: boolean,\n opt_xform?: (p1: Metadata, p2: any) => any | null\n ) {\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n}\ntype Mappings = Mapping[];\n\nexport { Mappings };\n\nlet mappings_: Mappings | null = null;\n\nexport function xformPath(fullPath: any): string {\n let valid = type.isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n } else {\n fullPath = fullPath as string;\n return path.lastComponent(fullPath);\n }\n}\n\nexport function getMappings(): Mappings {\n if (mappings_) {\n return mappings_;\n }\n let mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n\n function mappingsXformPath(metadata: Metadata, fullPath: any): string {\n return xformPath(fullPath);\n }\n let nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n\n /**\n * Coerces the second param to a number, if it is defined.\n */\n function xformSize(metadata: Metadata, size: any): number | null | undefined {\n if (type.isDef(size)) {\n return +(size as number);\n } else {\n return size;\n }\n }\n let sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n\n /**\n * Transforms a comma-separated string of tokens into a list of download\n * URLs.\n */\n function xformTokens(metadata: Metadata, tokens: any): string[] {\n let valid = type.isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n let encode = encodeURIComponent;\n let tokensList = tokens.split(',');\n let urls = tokensList.map(function(token: string) {\n let bucket: string = metadata['bucket'] as string;\n let path: string = metadata['fullPath'] as string;\n let urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n let base = UrlUtils.makeDownloadUrl(urlPart);\n let queryString = UrlUtils.makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(\n new Mapping('downloadTokens', 'downloadURLs', false, xformTokens)\n );\n mappings_ = mappings;\n return mappings_;\n}\n\nexport function addRef(metadata: Metadata, authWrapper: AuthWrapper) {\n function generateRef() {\n let bucket: string = metadata['bucket'] as string;\n let path: string = metadata['fullPath'] as string;\n let loc = new Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\n\nexport function fromResource(\n authWrapper: AuthWrapper,\n resource: { [name: string]: any },\n mappings: Mappings\n): Metadata {\n let metadata: Metadata = {} as Metadata;\n metadata['type'] = 'file';\n let len = mappings.length;\n for (let i = 0; i < len; i++) {\n let mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\n\nexport function fromResourceString(\n authWrapper: AuthWrapper,\n resourceString: string,\n mappings: Mappings\n): Metadata | null {\n let obj = json.jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n let resource = obj as Metadata;\n return fromResource(authWrapper, resource, mappings);\n}\n\nexport function toResourceString(\n metadata: Metadata,\n mappings: Mappings\n): string {\n let resource: {\n [prop: string]: any;\n } = {};\n let len = mappings.length;\n for (let i = 0; i < len; i++) {\n let mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\n\nexport function metadataValidator(p: any) {\n let validType = p && type.isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (let key in p) {\n let val = p[key];\n if (key === 'customMetadata') {\n if (!type.isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n } else {\n if (type.isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/metadata.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as errorsExports from './error';\nimport { errors } from './error';\nimport * as MetadataUtils from './metadata';\nimport * as type from './type';\n\n/**\n * @param name Name of the function.\n * @param specs Argument specs.\n * @param passed The actual arguments passed to the function.\n * @throws {fbs.Error} If the arguments are invalid.\n */\nexport function validate(name: string, specs: ArgSpec[], passed: IArguments) {\n let minArgs = specs.length;\n let maxArgs = specs.length;\n for (let i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n let validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw errorsExports.invalidArgumentCount(\n minArgs,\n maxArgs,\n name,\n passed.length\n );\n }\n for (let i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n } catch (e) {\n if (e instanceof Error) {\n throw errorsExports.invalidArgument(i, name, e.message);\n } else {\n throw errorsExports.invalidArgument(i, name, e);\n }\n }\n }\n}\n\n/**\n * @struct\n */\nexport class ArgSpec {\n validator: (p1: any) => void;\n optional: boolean;\n\n constructor(validator: (p1: any) => void, opt_optional?: boolean) {\n let self = this;\n this.validator = function(p: any) {\n if (self.optional && !type.isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n}\n\nexport function and_(v1: (p1: any) => void, v2: Function): (p1: any) => void {\n return function(p) {\n v1(p);\n v2(p);\n };\n}\n\nexport function stringSpec(\n opt_validator?: (p1: any) => void | null,\n opt_optional?: boolean\n): ArgSpec {\n function stringValidator(p: any) {\n if (!type.isString(p)) {\n throw 'Expected string.';\n }\n }\n let validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n } else {\n validator = stringValidator;\n }\n return new ArgSpec(validator, opt_optional);\n}\n\nexport function uploadDataSpec(): ArgSpec {\n function validator(p: any) {\n let valid =\n p instanceof Uint8Array ||\n p instanceof ArrayBuffer ||\n (type.isNativeBlobDefined() && p instanceof Blob);\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new ArgSpec(validator);\n}\n\nexport function metadataSpec(opt_optional?: boolean): ArgSpec {\n return new ArgSpec(MetadataUtils.metadataValidator, opt_optional);\n}\n\nexport function nonNegativeNumberSpec(): ArgSpec {\n function validator(p: any) {\n let valid = type.isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new ArgSpec(validator);\n}\n\nexport function looseObjectSpec(\n opt_validator?: ((p1: any) => void) | null,\n opt_optional?: boolean\n): ArgSpec {\n function validator(p: any) {\n let isLooseObject = p === null || (type.isDef(p) && p instanceof Object);\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\n\nexport function nullFunctionSpec(opt_optional?: boolean): ArgSpec {\n function validator(p: any) {\n let valid = p === null || type.isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/args.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @fileoverview Some methods copied from goog.fs.\n * We don't include goog.fs because it pulls in a bunch of Deferred code that\n * bloats the size of the released binary.\n */\nimport * as array from './array';\nimport * as type from './type';\n\ndeclare var IBlobBuilder;\ndeclare var BlobBuilder;\ndeclare var WebKitBlobBuilder;\n\nfunction getBlobBuilder(): (typeof IBlobBuilder) | undefined {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n } else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n } else {\n return undefined;\n }\n}\n\n/**\n * Concatenates one or more values together and converts them to a Blob.\n *\n * @param var_args The values that will make up the resulting blob.\n * @return The blob.\n */\nexport function getBlob(...var_args: (string | Blob | ArrayBuffer)[]): Blob {\n let BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n let bb = new BlobBuilder();\n for (let i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n } else {\n if (type.isNativeBlobDefined()) {\n return new Blob(var_args);\n } else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n\n/**\n * Slices the blob. The returned blob contains data from the start byte\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\n *\n * @param blob The blob to be sliced.\n * @param start Index of the starting byte.\n * @param end Index of the ending byte.\n * @return The blob slice or null if not supported.\n */\nexport function sliceBlob(blob: Blob, start: number, end: number): Blob | null {\n if ((blob as any).webkitSlice) {\n return (blob as any).webkitSlice(start, end);\n } else if ((blob as any).mozSlice) {\n return (blob as any).mozSlice(start, end);\n } else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/fs.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * Returns true if the object is contained in the array (compared with ===).\n * @template T\n */\nexport function contains(array: T[], elem: T): boolean {\n return array.indexOf(elem) !== -1;\n}\n\n/**\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\n * @template T\n */\nexport function clone(arraylike: T[]): T[] {\n return Array.prototype.slice.call(arraylike);\n}\n\n/**\n * Removes the given element from the given array, if it is contained.\n * Directly modifies the passed-in array.\n * @template T\n */\nexport function remove(array: T[], elem: T) {\n const i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/array.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Defines methods for interacting with the network.\n */\n\nimport { Metadata } from '../metadata';\n\nimport * as array from './array';\nimport { AuthWrapper } from './authwrapper';\nimport { FbsBlob } from './blob';\nimport * as errorsExports from './error';\nimport { FirebaseStorageError } from './error';\nimport { errors } from './error';\nimport { Location } from './location';\nimport * as MetadataUtils from './metadata';\nimport * as object from './object';\nimport { RequestInfo } from './requestinfo';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nimport { XhrIo } from './xhrio';\n\n/**\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\n */\nexport function handlerCheck(cndn: boolean) {\n if (!cndn) {\n throw errorsExports.unknown();\n }\n}\n\nexport function metadataHandler(\n authWrapper: AuthWrapper,\n mappings: MetadataUtils.Mappings\n): (p1: XhrIo, p2: string) => Metadata {\n function handler(xhr: XhrIo, text: string): Metadata {\n let metadata = MetadataUtils.fromResourceString(\n authWrapper,\n text,\n mappings\n );\n handlerCheck(metadata !== null);\n return metadata as Metadata;\n }\n return handler;\n}\n\nexport function sharedErrorHandler(\n location: Location\n): (p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError {\n function errorHandler(\n xhr: XhrIo,\n err: FirebaseStorageError\n ): FirebaseStorageError {\n let newErr;\n if (xhr.getStatus() === 401) {\n newErr = errorsExports.unauthenticated();\n } else {\n if (xhr.getStatus() === 402) {\n newErr = errorsExports.quotaExceeded(location.bucket);\n } else {\n if (xhr.getStatus() === 403) {\n newErr = errorsExports.unauthorized(location.path);\n } else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\n\nexport function objectErrorHandler(\n location: Location\n): (p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError {\n let shared = sharedErrorHandler(location);\n\n function errorHandler(\n xhr: XhrIo,\n err: FirebaseStorageError\n ): FirebaseStorageError {\n let newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = errorsExports.objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\n\nexport function getMetadata(\n authWrapper: AuthWrapper,\n location: Location,\n mappings: MetadataUtils.Mappings\n): RequestInfo {\n let urlPart = location.fullServerUrl();\n let url = UrlUtils.makeNormalUrl(urlPart);\n let method = 'GET';\n let timeout = authWrapper.maxOperationRetryTime();\n let requestInfo = new RequestInfo(\n url,\n method,\n metadataHandler(authWrapper, mappings),\n timeout\n );\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nexport function updateMetadata(\n authWrapper: AuthWrapper,\n location: Location,\n metadata: Metadata,\n mappings: MetadataUtils.Mappings\n): RequestInfo {\n let urlPart = location.fullServerUrl();\n let url = UrlUtils.makeNormalUrl(urlPart);\n let method = 'PATCH';\n let body = MetadataUtils.toResourceString(metadata, mappings);\n let headers = { 'Content-Type': 'application/json; charset=utf-8' };\n let timeout = authWrapper.maxOperationRetryTime();\n let requestInfo = new RequestInfo(\n url,\n method,\n metadataHandler(authWrapper, mappings),\n timeout\n );\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nexport function deleteObject(\n authWrapper: AuthWrapper,\n location: Location\n): RequestInfo {\n let urlPart = location.fullServerUrl();\n let url = UrlUtils.makeNormalUrl(urlPart);\n let method = 'DELETE';\n let timeout = authWrapper.maxOperationRetryTime();\n\n function handler(xhr: XhrIo, text: string) {}\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nexport function determineContentType_(\n metadata: Metadata | null,\n blob: FbsBlob | null\n): string {\n return (\n (metadata && metadata['contentType']) ||\n (blob && blob.type()) ||\n 'application/octet-stream'\n );\n}\n\nexport function metadataForUpload_(\n location: Location,\n blob: FbsBlob,\n opt_metadata?: Metadata | null\n): Metadata {\n let metadata = object.clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\n\nexport function multipartUpload(\n authWrapper: AuthWrapper,\n location: Location,\n mappings: MetadataUtils.Mappings,\n blob: FbsBlob,\n opt_metadata?: Metadata | null\n): RequestInfo {\n let urlPart = location.bucketOnlyServerUrl();\n let headers: { [prop: string]: string } = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n\n function genBoundary() {\n let str = '';\n for (let i = 0; i < 2; i++) {\n str = str + Math.random().toString().slice(2);\n }\n return str;\n }\n let boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n let metadata = metadataForUpload_(location, blob, opt_metadata);\n let metadataString = MetadataUtils.toResourceString(metadata, mappings);\n let preBlobPart =\n '--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\n metadataString +\n '\\r\\n--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: ' +\n metadata['contentType'] +\n '\\r\\n\\r\\n';\n let postBlobPart = '\\r\\n--' + boundary + '--';\n let body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n let urlParams = { name: metadata['fullPath'] };\n let url = UrlUtils.makeUploadUrl(urlPart);\n let method = 'POST';\n let timeout = authWrapper.maxUploadRetryTime();\n let requestInfo = new RequestInfo(\n url,\n method,\n metadataHandler(authWrapper, mappings),\n timeout\n );\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n/**\n * @param current The number of bytes that have been uploaded so far.\n * @param total The total number of bytes in the upload.\n * @param opt_finalized True if the server has finished the upload.\n * @param opt_metadata The upload metadata, should\n * only be passed if opt_finalized is true.\n * @struct\n */\nexport class ResumableUploadStatus {\n finalized: boolean;\n metadata: Metadata | null;\n\n constructor(\n public current: number,\n public total: number,\n finalized?: boolean,\n metadata?: Metadata | null\n ) {\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n}\n\nexport function checkResumeHeader_(xhr: XhrIo, opt_allowed?: string[]): string {\n let status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n } catch (e) {\n handlerCheck(false);\n }\n let allowed = opt_allowed || ['active'];\n handlerCheck(array.contains(allowed, status));\n return status as string;\n}\n\nexport function createResumableUpload(\n authWrapper: AuthWrapper,\n location: Location,\n mappings: MetadataUtils.Mappings,\n blob: FbsBlob,\n opt_metadata?: Metadata | null\n): RequestInfo {\n let urlPart = location.bucketOnlyServerUrl();\n let metadata = metadataForUpload_(location, blob, opt_metadata);\n let urlParams = { name: metadata['fullPath'] };\n let url = UrlUtils.makeUploadUrl(urlPart);\n let method = 'POST';\n let headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n let body = MetadataUtils.toResourceString(metadata, mappings);\n let timeout = authWrapper.maxUploadRetryTime();\n\n function handler(xhr: XhrIo, text: string): string {\n checkResumeHeader_(xhr);\n let url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n } catch (e) {\n handlerCheck(false);\n }\n handlerCheck(type.isString(url));\n return url as string;\n }\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n */\nexport function getResumableUploadStatus(\n authWrapper: AuthWrapper,\n location: Location,\n url: string,\n blob: FbsBlob\n): RequestInfo {\n let headers = { 'X-Goog-Upload-Command': 'query' };\n\n function handler(xhr: XhrIo, text: string): ResumableUploadStatus {\n let status = checkResumeHeader_(xhr, ['active', 'final']);\n let sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n } catch (e) {\n handlerCheck(false);\n }\n let size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n let method = 'POST';\n let timeout = authWrapper.maxUploadRetryTime();\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n/**\n * Any uploads via the resumable upload API must transfer a number of bytes\n * that is a multiple of this number.\n */\nexport const resumableUploadChunkSize: number = 256 * 1024;\n\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n * @param chunkSize Number of bytes to upload.\n * @param opt_status The previous status.\n * If not passed or null, we start from the beginning.\n * @throws fbs.Error If the upload is already complete, the passed in status\n * has a final size inconsistent with the blob, or the blob cannot be sliced\n * for upload.\n */\nexport function continueResumableUpload(\n location: Location,\n authWrapper: AuthWrapper,\n url: string,\n blob: FbsBlob,\n chunkSize: number,\n mappings: MetadataUtils.Mappings,\n opt_status?: ResumableUploadStatus | null,\n opt_progressCallback?: ((p1: number, p2: number) => void) | null\n): RequestInfo {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n let status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n } else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw errorsExports.serverFileWrongSize();\n }\n let bytesLeft = status.total - status.current;\n let bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n let startByte = status.current;\n let endByte = startByte + bytesToUpload;\n let uploadCommand =\n bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n let headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n let body = blob.slice(startByte, endByte);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n\n function handler(xhr: XhrIo, text: string): ResumableUploadStatus {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n let uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n let newCurrent = status.current + bytesToUpload;\n let size = blob.size();\n let metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n } else {\n metadata = null;\n }\n return new ResumableUploadStatus(\n newCurrent,\n size,\n uploadStatus === 'final',\n metadata\n );\n }\n let method = 'POST';\n let timeout = authWrapper.maxUploadRetryTime();\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/requests.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Method for invoking a callback asynchronously.\n */\nimport * as promiseimpl from './promise_external';\n\n/**\n * Returns a function that invokes f with its arguments asynchronously as a\n * microtask, i.e. as soon as possible after the current script returns back\n * into browser code.\n */\nexport function async(f: Function): Function {\n return function(...argsToForward: any[]) {\n promiseimpl.resolve(true).then(function() {\n f.apply(null, argsToForward);\n });\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/async.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Provides a method for running a function with exponential\n * backoff.\n */\ntype id = (p1: boolean) => void;\n\nexport { id };\n\n/**\n * @param f May be invoked\n * before the function returns.\n * @param callback Get all the arguments passed to the function\n * passed to f, including the initial boolean.\n */\nexport function start(\n f: (\n p1: (success: boolean, ...rest: any[]) => void,\n canceled: boolean\n ) => void,\n callback: Function,\n timeout: number\n): id {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n let waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n let timeoutId: any = null;\n let hitTimeout = false;\n let cancelState = 0;\n\n function canceled() {\n return cancelState === 2;\n }\n let triggeredCallback = false;\n\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n\n function callWithDelay(millis: number): void {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n\n function handler(success: boolean, ...var_args: any[]): void {\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n let mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n let waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n } else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n let stopped = false;\n\n function stop(wasTimeout: boolean): void {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n } else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function() {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n\n/**\n * Stops the retry loop from repeating.\n * If the function is currently \"in between\" retries, it is invoked immediately\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\n * after the current invocation finishes iff the current invocation would have\n * triggered another retry.\n */\nexport function stop(id: id) {\n id(false);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/backoff.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Defines methods used to actually send HTTP requests from\n * abstract representations.\n */\nimport * as array from './array';\nimport * as backoff from './backoff';\nimport * as errorsExports from './error';\nimport { FirebaseStorageError } from './error';\nimport { errors } from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport { RequestInfo } from './requestinfo';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nimport * as XhrIoExports from './xhrio';\nimport { Headers, XhrIo } from './xhrio';\nimport { XhrIoPool } from './xhriopool';\nimport { FirebaseNamespace } from '../../app/firebase_app';\n\ndeclare var firebase: FirebaseNamespace;\n\n/**\n * @template T\n */\nexport interface Request {\n getPromise(): Promise;\n\n /**\n * Cancels the request. IMPORTANT: the promise may still be resolved with an\n * appropriate value (if the request is finished before you call this method,\n * but the promise has not yet been resolved), so don't just assume it will be\n * rejected if you call this function.\n * @param appDelete True if the cancelation came from the app being deleted.\n */\n cancel(appDelete?: boolean): void;\n}\n\n/**\n * @struct\n * @template T\n */\nclass NetworkRequest implements Request {\n private url_: string;\n private method_: string;\n private headers_: Headers;\n private body_: string | Blob | Uint8Array | null;\n private successCodes_: number[];\n private additionalRetryCodes_: number[];\n private pendingXhr_: XhrIo | null = null;\n private backoffId_: backoff.id | null = null;\n private resolve_: Function | null = null;\n private reject_: Function | null = null;\n private canceled_: boolean = false;\n private appDelete_: boolean = false;\n private callback_: (p1: XhrIo, p2: string) => T;\n private errorCallback_:\n | ((p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError)\n | null;\n private progressCallback_: ((p1: number, p2: number) => void) | null;\n private timeout_: number;\n private pool_: XhrIoPool;\n promise_: Promise;\n\n constructor(\n url: string,\n method: string,\n headers: Headers,\n body: string | Blob | Uint8Array | null,\n successCodes: number[],\n additionalRetryCodes: number[],\n callback: (p1: XhrIo, p2: string) => T,\n errorCallback:\n | ((p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError)\n | null,\n timeout: number,\n progressCallback: ((p1: number, p2: number) => void) | null,\n pool: XhrIoPool\n ) {\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n let self = this;\n this.promise_ = promiseimpl.make(function(resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n\n /**\n * Actually starts the retry loop.\n */\n private start_() {\n let self = this;\n\n function doTheRequest(\n backoffCallback: (p1: boolean, ...p2: any[]) => void,\n canceled: boolean\n ) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n let xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n\n function progressListener(progressEvent: ProgressEvent) {\n let loaded = progressEvent.loaded;\n let total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr\n .send(self.url_, self.method_, self.body_, self.headers_)\n .then(function(xhr: XhrIo) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr as XhrIo;\n let hitServer =\n xhr.getErrorCode() === XhrIoExports.ErrorCode.NO_ERROR;\n let status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n let wasCanceled =\n xhr.getErrorCode() === XhrIoExports.ErrorCode.ABORT;\n backoffCallback(\n false,\n new RequestEndStatus(false, null, wasCanceled)\n );\n return;\n }\n let successCode = array.contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n\n /**\n * @param requestWentThrough True if the request eventually went\n * through, false if it hit the retry limit or was canceled.\n */\n function backoffDone(\n requestWentThrough: boolean,\n status: RequestEndStatus\n ) {\n let resolve = self.resolve_ as Function;\n let reject = self.reject_ as Function;\n let xhr = status.xhr as XhrIo;\n if (status.wasSuccessCode) {\n try {\n let result = self.callback_(xhr, xhr.getResponseText());\n if (type.isJustDef(result)) {\n resolve(result);\n } else {\n resolve();\n }\n } catch (e) {\n reject(e);\n }\n } else {\n if (xhr !== null) {\n let err = errorsExports.unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n } else {\n reject(err);\n }\n } else {\n if (status.canceled) {\n let err = self.appDelete_\n ? errorsExports.appDeleted()\n : errorsExports.canceled();\n reject(err);\n } else {\n let err = errorsExports.retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n } else {\n this.backoffId_ = backoff.start(doTheRequest, backoffDone, this.timeout_);\n }\n }\n\n /** @inheritDoc */\n getPromise() {\n return this.promise_;\n }\n\n /** @inheritDoc */\n cancel(appDelete?: boolean) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n backoff.stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n }\n\n private isRetryStatusCode_(status: number): boolean {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n let isFiveHundredCode = status >= 500 && status < 600;\n let extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429\n ];\n let isExtraRetryCode = array.contains(extraRetryCodes, status);\n let isRequestSpecificRetryCode = array.contains(\n this.additionalRetryCodes_,\n status\n );\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n }\n}\n\n/**\n * A collection of information about the result of a network request.\n * @param opt_canceled Defaults to false.\n * @struct\n */\nexport class RequestEndStatus {\n /**\n * True if the request was canceled.\n */\n canceled: boolean;\n\n constructor(\n public wasSuccessCode: boolean,\n public xhr: XhrIo | null,\n opt_canceled?: boolean\n ) {\n this.canceled = !!opt_canceled;\n }\n}\n\nexport function addAuthHeader_(headers: Headers, authToken: string | null) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\n\nexport function addVersionHeader_(headers: Headers) {\n let number =\n typeof firebase !== 'undefined' ? firebase.SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n\n/**\n * @template T\n */\nexport function makeRequest(\n requestInfo: RequestInfo,\n authToken: string | null,\n pool: XhrIoPool\n): Request {\n let queryPart = UrlUtils.makeQueryString(requestInfo.urlParams);\n let url = requestInfo.url + queryPart;\n let headers = object.clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new NetworkRequest(\n url,\n requestInfo.method,\n headers,\n requestInfo.body,\n requestInfo.successCodes,\n requestInfo.additionalRetryCodes,\n requestInfo.handler,\n requestInfo.errorHandler,\n requestInfo.timeout,\n requestInfo.progressCallback,\n pool\n );\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/request.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { StringFormat } from './storage/implementation/string';\nimport { TaskEvent } from './storage/implementation/taskenums';\nimport { TaskState } from './storage/implementation/taskenums';\nimport { XhrIoPool } from './storage/implementation/xhriopool';\nimport { Reference } from './storage/reference';\nimport { Service } from './storage/service';\nimport firebase from './app';\nimport { FirebaseApp, FirebaseServiceFactory } from './app/firebase_app';\n/**\n * Type constant for Firebase Storage.\n */\nconst STORAGE_TYPE = 'storage';\n\nfunction factory(app: FirebaseApp, unused: any, opt_url?: string): Service {\n return new Service(app, new XhrIoPool(), opt_url);\n}\n\nexport function registerStorage(instance) {\n let namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: Service,\n Reference: Reference\n };\n instance.INTERNAL.registerService(\n STORAGE_TYPE,\n factory as FirebaseServiceFactory,\n namespaceExports,\n undefined,\n // Allow multiple storage instances per app.\n true\n );\n}\n\nregisterStorage(firebase);\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @fileoverview Constants used in the Firebase Storage library.\n */\n\n/**\n * Domain and scheme for API calls.\n */\nexport const domainBase: string = 'https://firebasestorage.googleapis.com';\n\n/**\n * Domain and scheme for object downloads.\n */\nexport const downloadBase: string = 'https://firebasestorage.googleapis.com';\n\n/**\n * Base URL for non-upload calls to the API.\n */\nexport const apiBaseUrl: string = '/v0';\n\n/**\n * Base URL for upload calls to the API.\n */\nexport const apiUploadBaseUrl: string = '/v0';\n\nexport function setDomainBase(domainBase: string) {\n domainBase = domainBase;\n}\n\nexport const configOption: string = 'storageBucket';\n\n/**\n * 1 minute\n */\nexport const shortMaxOperationRetryTime: number = 1 * 60 * 1000;\n\n/**\n * 2 minutes\n */\nexport const defaultMaxOperationRetryTime: number = 2 * 60 * 1000;\n\n/**\n * 10 minutes\n */\nexport const defaultMaxUploadRetryTime: number = 10 * 60 * 100;\n\n/**\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\n * enough for us to use it directly.\n */\nexport const minSafeInteger: number = -9007199254740991;\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/constants.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview A lightweight wrapper around XMLHttpRequest with a\n * goog.net.XhrIo-like interface.\n */\n\nexport type Headers = { [name: string]: string | number };\n\nexport interface XhrIo {\n send(\n url: string,\n method: string,\n opt_body?: ArrayBufferView | Blob | string | null,\n opt_headers?: Headers\n ): Promise;\n\n getErrorCode(): ErrorCode;\n\n getStatus(): number;\n\n getResponseText(): string;\n\n /**\n * Abort the request.\n */\n abort(): void;\n\n getResponseHeader(header: string): string | null;\n\n addUploadProgressListener(listener: (p1: Event) => void): void;\n\n removeUploadProgressListener(listener: (p1: Event) => void): void;\n}\n\n/**\n * @enum{number}\n */\nexport enum ErrorCode {\n NO_ERROR = 0,\n NETWORK_ERROR = 1,\n ABORT = 2\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/xhrio.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as errorsExports from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport * as type from './type';\nimport * as XhrIoExports from './xhrio';\nimport { Headers, XhrIo } from './xhrio';\n\n/**\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\n * doesn't work in React Native on Android.\n */\nexport class NetworkXhrIo implements XhrIo {\n private xhr_: XMLHttpRequest;\n private errorCode_: XhrIoExports.ErrorCode;\n private sendPromise_: Promise;\n private sent_: boolean = false;\n\n constructor() {\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = XhrIoExports.ErrorCode.NO_ERROR;\n this.sendPromise_ = promiseimpl.make((resolve, reject) => {\n this.xhr_.addEventListener('abort', event => {\n this.errorCode_ = XhrIoExports.ErrorCode.ABORT;\n resolve(this);\n });\n this.xhr_.addEventListener('error', event => {\n this.errorCode_ = XhrIoExports.ErrorCode.NETWORK_ERROR;\n resolve(this);\n });\n this.xhr_.addEventListener('load', event => {\n resolve(this);\n });\n });\n }\n\n /**\n * @override\n */\n send(\n url: string,\n method: string,\n opt_body?: ArrayBufferView | Blob | string | null,\n opt_headers?: Headers\n ): Promise {\n if (this.sent_) {\n throw errorsExports.internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (type.isDef(opt_headers)) {\n const headers = opt_headers as Headers;\n object.forEach(headers, (key, val) => {\n this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (type.isDef(opt_body)) {\n this.xhr_.send(opt_body);\n } else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n }\n\n /**\n * @override\n */\n getErrorCode(): XhrIoExports.ErrorCode {\n if (!this.sent_) {\n throw errorsExports.internalError(\n 'cannot .getErrorCode() before sending'\n );\n }\n return this.errorCode_;\n }\n\n /**\n * @override\n */\n getStatus(): number {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n } catch (e) {\n return -1;\n }\n }\n\n /**\n * @override\n */\n getResponseText(): string {\n if (!this.sent_) {\n throw errorsExports.internalError(\n 'cannot .getResponseText() before sending'\n );\n }\n return this.xhr_.responseText;\n }\n\n /**\n * Aborts the request.\n * @override\n */\n abort() {\n this.xhr_.abort();\n }\n\n /**\n * @override\n */\n getResponseHeader(header: string): string | null {\n return this.xhr_.getResponseHeader(header);\n }\n\n /**\n * @override\n */\n addUploadProgressListener(listener: (p1: Event) => void) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n }\n\n /**\n * @override\n */\n removeUploadProgressListener(listener: (p1: Event) => void) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/xhrio_network.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Replacement for goog.net.XhrIoPool that works with fbs.XhrIo.\n */\nimport { XhrIo } from './xhrio';\nimport { NetworkXhrIo } from './xhrio_network';\n\n/**\n * Factory-like class for creating XhrIo instances.\n */\nexport class XhrIoPool {\n createXhrIo(): XhrIo {\n return new NetworkXhrIo();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/xhriopool.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Functionality related to the parsing/composition of bucket/\n * object location.\n */\nimport * as errorsExports from './error';\nimport { errors } from './error';\n\n/**\n * @struct\n */\nexport class Location {\n private path_: string;\n\n constructor(public readonly bucket: string, path: string) {\n this.path_ = path;\n }\n\n get path(): string {\n return this.path_;\n }\n\n fullServerUrl(): string {\n let encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n }\n\n bucketOnlyServerUrl(): string {\n let encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n }\n\n static makeFromBucketSpec(bucketString: string): Location {\n let bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n } catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n } else {\n throw errorsExports.invalidDefaultBucket(bucketString);\n }\n }\n\n static makeFromUrl(url: string): Location {\n let location = null;\n let bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n\n function gsModify(loc: Location) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n let gsPath = '(/(.*))?$';\n let path = '(/([^?#]*).*)?$';\n let gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n let gsIndices = { bucket: 1, path: 3 };\n\n function httpModify(loc: Location) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n let version = 'v[A-Za-z0-9_]+';\n let httpRegex = new RegExp(\n '^https?://firebasestorage\\\\.googleapis\\\\.com/' +\n version +\n '/b/' +\n bucketDomain +\n '/o' +\n path,\n 'i'\n );\n let httpIndices = { bucket: 1, path: 3 };\n let groups = [\n { regex: gsRegex, indices: gsIndices, postModify: gsModify },\n { regex: httpRegex, indices: httpIndices, postModify: httpModify }\n ];\n for (let i = 0; i < groups.length; i++) {\n let group = groups[i];\n let captures = group.regex.exec(url);\n if (captures) {\n let bucketValue = captures[group.indices.bucket];\n let pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw errorsExports.invalidUrl(url);\n }\n return location;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/location.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @file Provides a Blob-like wrapper for various binary types (including the\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\n * making uploads possible in environments without the native Blob type.\n */\nimport * as fs from './fs';\nimport * as string from './string';\nimport { StringFormat } from './string';\nimport * as type from './type';\n\n/**\n * @param opt_elideCopy If true, doesn't copy mutable input data\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\n * modified after this blob's construction.\n */\nexport class FbsBlob {\n private data_: Blob | Uint8Array;\n private size_: number;\n private type_: string;\n\n constructor(data: Blob | Uint8Array | ArrayBuffer, opt_elideCopy?: boolean) {\n let size: number = 0;\n let blobType: string = '';\n if (type.isNativeBlob(data)) {\n this.data_ = data as Blob;\n size = (data as Blob).size;\n blobType = (data as Blob).type;\n } else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n } else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n } else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data as Uint8Array;\n } else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data as Uint8Array);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n\n size(): number {\n return this.size_;\n }\n\n type(): string {\n return this.type_;\n }\n\n slice(startByte: number, endByte: number): FbsBlob | null {\n if (type.isNativeBlob(this.data_)) {\n let realBlob = this.data_ as Blob;\n let sliced = fs.sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n } else {\n let slice = new Uint8Array(\n (this.data_ as Uint8Array).buffer,\n startByte,\n endByte - startByte\n );\n return new FbsBlob(slice, true);\n }\n }\n\n static getBlob(...var_args: (string | FbsBlob)[]): FbsBlob | null {\n if (type.isNativeBlobDefined()) {\n var blobby: (Blob | Uint8Array | string)[] = var_args.map(function(\n val: string | FbsBlob\n ): Blob | Uint8Array | string {\n if (val instanceof FbsBlob) {\n return val.data_;\n } else {\n return val;\n }\n });\n return new FbsBlob(fs.getBlob.apply(null, blobby));\n } else {\n let uint8Arrays: Uint8Array[] = var_args.map(function(\n val: string | FbsBlob\n ): Uint8Array {\n if (type.isString(val)) {\n return string.dataFromString(StringFormat.RAW, val as string).data;\n } else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return (val as FbsBlob).data_ as Uint8Array;\n }\n });\n let finalLength = 0;\n uint8Arrays.forEach(function(array: Uint8Array): void {\n finalLength += array.byteLength;\n });\n let merged = new Uint8Array(finalLength);\n let index = 0;\n uint8Arrays.forEach(function(array: Uint8Array) {\n for (let i = 0; i < array.length; i++) {\n merged[index++] = array[i];\n }\n });\n return new FbsBlob(merged, true);\n }\n }\n\n uploadData(): Blob | Uint8Array {\n return this.data_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/blob.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { FirebaseStorageError } from './error';\nimport { Headers, XhrIo } from './xhrio';\n\nexport type UrlParams = { [name: string]: string };\n\nexport class RequestInfo {\n urlParams: UrlParams = {};\n headers: Headers = {};\n body: Blob | string | Uint8Array | null = null;\n\n errorHandler:\n | ((p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError)\n | null = null;\n\n /**\n * Called with the current number of bytes uploaded and total size (-1 if not\n * computable) of the request body (i.e. used to report upload progress).\n */\n progressCallback: ((p1: number, p2: number) => void) | null = null;\n successCodes: number[] = [200];\n additionalRetryCodes: number[] = [];\n\n constructor(\n public url: string,\n public method: string,\n /**\n * Returns the value with which to resolve the request's promise. Only called\n * if the request is successful. Throw from this function to reject the\n * returned Request's promise with the thrown error.\n * Note: The XhrIo passed to this function may be reused after this callback\n * returns. Do not keep a reference to it in any way.\n */\n public handler: (p1: XhrIo, p2: string) => T,\n public timeout: number\n ) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/requestinfo.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as type from './type';\n\ntype NextFn = (value: T) => void;\ntype ErrorFn = (error: Error) => void;\ntype CompleteFn = () => void;\ntype Unsubscribe = () => void;\n\ntype Subscribe = (\n next: NextFn | { [name: string]: string | null },\n error?: ErrorFn,\n complete?: CompleteFn\n) => Unsubscribe;\n\nexport { NextFn, ErrorFn, CompleteFn, Unsubscribe, Subscribe };\n\n/**\n * @struct\n */\nexport class Observer {\n next: NextFn | null;\n error: ErrorFn | null;\n complete: CompleteFn | null;\n\n constructor(\n nextOrObserver: NextFn | { [name: string]: string | null } | null,\n opt_error?: ErrorFn | null,\n opt_complete?: CompleteFn | null\n ) {\n let asFunctions =\n type.isFunction(nextOrObserver) ||\n type.isDef(opt_error) ||\n type.isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver as NextFn | null;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n } else {\n const observer = nextOrObserver as {\n next?: NextFn | null;\n error?: ErrorFn | null;\n complete?: CompleteFn | null;\n };\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/observer.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { TaskState } from './implementation/taskenums';\nimport * as type from './implementation/type';\nimport { Metadata } from './metadata';\nimport { Reference } from './reference';\nimport { UploadTask } from './task';\n\nexport class UploadTaskSnapshot {\n constructor(\n readonly bytesTransferred: number,\n readonly totalBytes: number,\n readonly state: TaskState,\n readonly metadata: Metadata | null,\n readonly task: UploadTask,\n readonly ref: Reference\n ) {}\n\n get downloadURL(): string | null {\n if (this.metadata !== null) {\n let urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/tasksnapshot.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @fileoverview Defines types for interacting with blob transfer tasks.\n */\n\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { FbsBlob } from './implementation/blob';\nimport { FirebaseStorageError } from './implementation/error';\nimport { InternalTaskState } from './implementation/taskenums';\nimport { Metadata } from './metadata';\nimport {\n NextFn,\n ErrorFn,\n CompleteFn,\n Unsubscribe,\n Observer\n} from './implementation/observer';\nimport { Request } from './implementation/request';\nimport * as RequestExports from './implementation/request';\nimport { Subscribe } from './implementation/observer';\nimport { TaskEvent, TaskState } from './implementation/taskenums';\nimport { UploadTaskSnapshot } from './tasksnapshot';\nimport * as fbsArgs from './implementation/args';\nimport { ArgSpec } from './implementation/args';\nimport * as fbsArray from './implementation/array';\nimport { async as fbsAsync } from './implementation/async';\nimport { errors as fbsErrors } from './implementation/error';\nimport * as errors from './implementation/error';\nimport { Location } from './implementation/location';\nimport * as fbsMetadata from './implementation/metadata';\nimport * as fbsPromiseimpl from './implementation/promise_external';\nimport { RequestInfo } from './implementation/requestinfo';\nimport * as fbsRequests from './implementation/requests';\nimport * as fbsTaskEnums from './implementation/taskenums';\nimport * as typeUtils from './implementation/type';\nimport { Reference } from './reference';\n\n/**\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\n * upload and manage callbacks for various events.\n */\nexport class UploadTask {\n private ref_: Reference;\n private authWrapper_: AuthWrapper;\n private location_: Location;\n private blob_: FbsBlob;\n private metadata_: Metadata | null;\n private mappings_: fbsMetadata.Mappings;\n private transferred_: number = 0;\n private needToFetchStatus_: boolean = false;\n private needToFetchMetadata_: boolean = false;\n private observers_: Observer[] = [];\n private resumable_: boolean;\n private state_: InternalTaskState;\n private error_: Error | null = null;\n private uploadUrl_: string | null = null;\n private request_: Request | null = null;\n private chunkMultiplier_: number = 1;\n private errorHandler_: (p1: FirebaseStorageError) => void;\n private metadataErrorHandler_: (p1: FirebaseStorageError) => void;\n private resolve_: ((p1: UploadTaskSnapshot) => void) | null = null;\n private reject_: ((p1: Error) => void) | null = null;\n private promise_: Promise;\n\n /**\n * @param ref The firebaseStorage.Reference object this task came\n * from, untyped to avoid cyclic dependencies.\n * @param blob The blob to upload.\n */\n constructor(\n ref: Reference,\n authWrapper: AuthWrapper,\n location: Location,\n mappings: fbsMetadata.Mappings,\n blob: FbsBlob,\n metadata: Metadata | null = null\n ) {\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = error => {\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n if (error.codeEquals(errors.Code.CANCELED)) {\n this.needToFetchStatus_ = true;\n this.completeTransitions_();\n } else {\n this.error_ = error;\n this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = error => {\n this.request_ = null;\n if (error.codeEquals(errors.Code.CANCELED)) {\n this.completeTransitions_();\n } else {\n this.error_ = error;\n this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = fbsPromiseimpl.make((resolve, reject) => {\n this.resolve_ = resolve;\n this.reject_ = reject;\n this.start_();\n });\n\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, () => {});\n }\n\n private makeProgressCallback_(): (p1: number, p2: number) => void {\n const sizeBefore = this.transferred_;\n return (loaded, total) => {\n this.updateProgress_(sizeBefore + loaded);\n };\n }\n\n private shouldDoResumable_(blob: FbsBlob): boolean {\n return blob.size() > 256 * 1024;\n }\n\n private start_() {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n } else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n } else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n } else {\n this.continueUpload_();\n }\n }\n }\n } else {\n this.oneShotUpload_();\n }\n }\n\n private resolveToken_(callback: (p1: string | null) => void) {\n this.authWrapper_.getAuthToken().then(authToken => {\n switch (this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n }\n\n // TODO(andysoto): assert false\n\n private createResumable_() {\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.createResumableUpload(\n this.authWrapper_,\n this.location_,\n this.mappings_,\n this.blob_,\n this.metadata_\n );\n const createRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = createRequest;\n createRequest.getPromise().then((url: string) => {\n this.request_ = null;\n this.uploadUrl_ = url;\n this.needToFetchStatus_ = false;\n this.completeTransitions_();\n }, this.errorHandler_);\n });\n }\n\n private fetchStatus_() {\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n const url = this.uploadUrl_ as string;\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.getResumableUploadStatus(\n this.authWrapper_,\n this.location_,\n url,\n this.blob_\n );\n const statusRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = statusRequest;\n statusRequest.getPromise().then(status => {\n status = status as fbsRequests.ResumableUploadStatus;\n this.request_ = null;\n this.updateProgress_(status.current);\n this.needToFetchStatus_ = false;\n if (status.finalized) {\n this.needToFetchMetadata_ = true;\n }\n this.completeTransitions_();\n }, this.errorHandler_);\n });\n }\n\n private continueUpload_() {\n const chunkSize =\n fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n const status = new fbsRequests.ResumableUploadStatus(\n this.transferred_,\n this.blob_.size()\n );\n\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n const url = this.uploadUrl_ as string;\n this.resolveToken_(authToken => {\n let requestInfo;\n try {\n requestInfo = fbsRequests.continueResumableUpload(\n this.location_,\n this.authWrapper_,\n url,\n this.blob_,\n chunkSize,\n this.mappings_,\n status,\n this.makeProgressCallback_()\n );\n } catch (e) {\n this.error_ = e;\n this.transition_(InternalTaskState.ERROR);\n return;\n }\n const uploadRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = uploadRequest;\n uploadRequest\n .getPromise()\n .then((newStatus: fbsRequests.ResumableUploadStatus) => {\n this.increaseMultiplier_();\n this.request_ = null;\n this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n this.metadata_ = newStatus.metadata;\n this.transition_(InternalTaskState.SUCCESS);\n } else {\n this.completeTransitions_();\n }\n }, this.errorHandler_);\n });\n }\n\n private increaseMultiplier_() {\n const currentSize =\n fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n }\n\n private fetchMetadata_() {\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.getMetadata(\n this.authWrapper_,\n this.location_,\n this.mappings_\n );\n const metadataRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = metadataRequest;\n metadataRequest.getPromise().then(metadata => {\n this.request_ = null;\n this.metadata_ = metadata;\n this.transition_(InternalTaskState.SUCCESS);\n }, this.metadataErrorHandler_);\n });\n }\n\n private oneShotUpload_() {\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.multipartUpload(\n this.authWrapper_,\n this.location_,\n this.mappings_,\n this.blob_,\n this.metadata_\n );\n const multipartRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = multipartRequest;\n multipartRequest.getPromise().then(metadata => {\n this.request_ = null;\n this.metadata_ = metadata;\n this.updateProgress_(this.blob_.size());\n this.transition_(InternalTaskState.SUCCESS);\n }, this.errorHandler_);\n });\n }\n\n private updateProgress_(transferred: number) {\n const old = this.transferred_;\n this.transferred_ = transferred;\n\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n }\n\n private transition_(state: InternalTaskState) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n const wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = errors.canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n }\n\n private completeTransitions_() {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n }\n\n get snapshot(): UploadTaskSnapshot {\n const externalState = fbsTaskEnums.taskStateFromInternalTaskState(\n this.state_\n );\n return new UploadTaskSnapshot(\n this.transferred_,\n this.blob_.size(),\n externalState,\n this.metadata_,\n this,\n this.ref_\n );\n }\n\n /**\n * Adds a callback for an event.\n * @param type The type of event to listen for.\n */\n on(\n type: TaskEvent,\n nextOrObserver = undefined,\n error = undefined,\n completed = undefined\n ): Unsubscribe | Subscribe {\n function typeValidator(_p: any) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw `Expected one of the event types: [${TaskEvent.STATE_CHANGED}].`;\n }\n }\n const nextOrObserverMessage =\n 'Expected a function or an Object with one of ' +\n '`next`, `error`, `complete` properties.';\n const nextValidator = fbsArgs.nullFunctionSpec(true).validator;\n const observerValidator = fbsArgs.looseObjectSpec(null, true).validator;\n\n function nextOrObserverValidator(p: any) {\n try {\n nextValidator(p);\n return;\n } catch (e) {}\n try {\n observerValidator(p);\n const anyDefined =\n typeUtils.isJustDef(p['next']) ||\n typeUtils.isJustDef(p['error']) ||\n typeUtils.isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n } catch (e) {\n throw nextOrObserverMessage;\n }\n }\n const specs = [\n fbsArgs.stringSpec(typeValidator),\n fbsArgs.looseObjectSpec(nextOrObserverValidator, true),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n fbsArgs.validate('on', specs, arguments);\n const self = this;\n\n function makeBinder(\n specs: ArgSpec[] | null\n ): Subscribe {\n function binder(\n nextOrObserver:\n | NextFn\n | { [name: string]: string | null }\n | null,\n error?: ErrorFn | null,\n opt_complete?: CompleteFn | null\n ) {\n if (specs !== null) {\n fbsArgs.validate('on', specs, arguments);\n }\n const observer = new Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return () => {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n\n function binderNextOrObserverValidator(p: any) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n const binderSpecs = [\n fbsArgs.looseObjectSpec(binderNextOrObserverValidator),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n const typeOnly = !(\n typeUtils.isJustDef(nextOrObserver) ||\n typeUtils.isJustDef(error) ||\n typeUtils.isJustDef(completed)\n );\n if (typeOnly) {\n return makeBinder(binderSpecs);\n } else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n }\n\n /**\n * This object behaves like a Promise, and resolves with its snapshot data\n * when the upload completes.\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\n * @param onRejected The rejection callback.\n */\n then(\n onFulfilled?: ((value: UploadTaskSnapshot) => U | PromiseLike) | null,\n onRejected?: ((error: any) => U | PromiseLike) | null\n ): Promise {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(\n onFulfilled as (value: UploadTaskSnapshot) => U | PromiseLike,\n onRejected as ((error: any) => PromiseLike) | null\n );\n }\n\n /**\n * Equivalent to calling `then(null, onRejected)`.\n */\n catch(onRejected: (p1: Error) => T | PromiseLike): Promise {\n return this.then(null, onRejected);\n }\n\n /**\n * Adds the given observer.\n */\n private addObserver_(observer: Observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n }\n\n /**\n * Removes the given observer.\n */\n private removeObserver_(observer: Observer) {\n fbsArray.remove(this.observers_, observer);\n }\n\n private notifyObservers_() {\n this.finishPromise_();\n const observers = fbsArray.clone(this.observers_);\n observers.forEach(observer => {\n this.notifyObserver_(observer);\n });\n }\n\n private finishPromise_() {\n if (this.resolve_ !== null) {\n let triggered = true;\n switch (fbsTaskEnums.taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n fbsAsync(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n const toCall = this.reject_ as ((p1: Error) => void);\n fbsAsync(toCall.bind(null, this.error_ as Error))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n }\n\n private notifyObserver_(observer: Observer) {\n const externalState = fbsTaskEnums.taskStateFromInternalTaskState(\n this.state_\n );\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n fbsAsync(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n fbsAsync(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_ as Error))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_ as Error))();\n }\n }\n }\n\n /**\n * Resumes a paused task. Has no effect on a currently running or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n resume(): boolean {\n fbsArgs.validate('resume', [], arguments);\n const valid =\n this.state_ === InternalTaskState.PAUSED ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n }\n\n /**\n * Pauses a currently running task. Has no effect on a paused or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n pause(): boolean {\n fbsArgs.validate('pause', [], arguments);\n const valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n }\n\n /**\n * Cancels a currently running or paused task. Has no effect on a complete or\n * failed task.\n * @return True if the operation took effect, false if ignored.\n */\n cancel(): boolean {\n fbsArgs.validate('cancel', [], arguments);\n const valid =\n this.state_ === InternalTaskState.RUNNING ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/task.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Defines the Firebase Storage Reference class.\n */\nimport * as args from './implementation/args';\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { FbsBlob } from './implementation/blob';\nimport * as errorsExports from './implementation/error';\nimport { errors } from './implementation/error';\nimport { Location } from './implementation/location';\nimport * as metadata from './implementation/metadata';\nimport * as object from './implementation/object';\nimport * as path from './implementation/path';\nimport * as requests from './implementation/requests';\nimport * as fbsString from './implementation/string';\nimport { StringFormat } from './implementation/string';\nimport * as type from './implementation/type';\nimport { Metadata } from './metadata';\nimport { Service } from './service';\nimport { UploadTask } from './task';\n\n/**\n * Provides methods to interact with a bucket in the Firebase Storage service.\n * @param location An fbs.location, or the URL at\n * which to base this object, in one of the following forms:\n * gs:///\n * http[s]://firebasestorage.googleapis.com/\n * /b//o/\n * Any query or fragment strings will be ignored in the http[s]\n * format. If no value is passed, the storage object will use a URL based on\n * the project ID of the base firebase.App instance.\n */\nexport class Reference {\n protected location: Location;\n\n constructor(protected authWrapper: AuthWrapper, location: string | Location) {\n if (location instanceof Location) {\n this.location = location;\n } else {\n this.location = Location.makeFromUrl(location);\n }\n }\n\n /**\n * @return The URL for the bucket and path this object references,\n * in the form gs:///\n * @override\n */\n toString(): string {\n args.validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n }\n\n protected newRef(authWrapper: AuthWrapper, location: Location): Reference {\n return new Reference(authWrapper, location);\n }\n\n protected mappings(): metadata.Mappings {\n return metadata.getMappings();\n }\n\n /**\n * @return A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n child(childPath: string): Reference {\n args.validate('child', [args.stringSpec()], arguments);\n let newPath = path.child(this.location.path, childPath);\n let location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n }\n\n /**\n * @return A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get parent(): Reference | null {\n let newPath = path.parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n let location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n }\n\n /**\n * @return An reference to the root of this\n * object's bucket.\n */\n get root(): Reference {\n let location = new Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n }\n\n get bucket(): string {\n return this.location.bucket;\n }\n\n get fullPath(): string {\n return this.location.path;\n }\n\n get name(): string {\n return path.lastComponent(this.location.path);\n }\n\n get storage(): Service {\n return this.authWrapper.service();\n }\n\n /**\n * Uploads a blob to this object's location.\n * @param data The blob to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n put(\n data: Blob | Uint8Array | ArrayBuffer,\n metadata: Metadata | null = null\n ): UploadTask {\n args.validate(\n 'put',\n [args.uploadDataSpec(), args.metadataSpec(true)],\n arguments\n );\n this.throwIfRoot_('put');\n return new UploadTask(\n this,\n this.authWrapper,\n this.location,\n this.mappings(),\n new FbsBlob(data),\n metadata\n );\n }\n\n /**\n * Uploads a string to this object's location.\n * @param string The string to upload.\n * @param opt_format The format of the string to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n putString(\n string: string,\n format: StringFormat = StringFormat.RAW,\n opt_metadata?: Metadata\n ): UploadTask {\n args.validate(\n 'putString',\n [\n args.stringSpec(),\n args.stringSpec(fbsString.formatValidator, true),\n args.metadataSpec(true)\n ],\n arguments\n );\n this.throwIfRoot_('putString');\n let data = fbsString.dataFromString(format, string);\n let metadata = object.clone(opt_metadata);\n if (!type.isDef(metadata['contentType']) && type.isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new UploadTask(\n this,\n this.authWrapper,\n this.location,\n this.mappings(),\n new FbsBlob(data.data, true),\n metadata\n );\n }\n\n /**\n * Deletes the object at this location.\n * @return A promise that resolves if the deletion succeeds.\n */\n delete(): Promise {\n args.validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n let self = this;\n return this.authWrapper.getAuthToken().then(function(authToken) {\n let requestInfo = requests.deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n }\n\n /**\n * A promise that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retreived, the promise is\n * rejected.\n */\n getMetadata(): Promise {\n args.validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n let self = this;\n return this.authWrapper.getAuthToken().then(function(authToken) {\n let requestInfo = requests.getMetadata(\n self.authWrapper,\n self.location,\n self.mappings()\n );\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n }\n\n /**\n * Updates the metadata for this object.\n * @param metadata The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @return A promise that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n updateMetadata(metadata: Metadata): Promise {\n args.validate('updateMetadata', [args.metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n let self = this;\n return this.authWrapper.getAuthToken().then(function(authToken) {\n let requestInfo = requests.updateMetadata(\n self.authWrapper,\n self.location,\n metadata,\n self.mappings()\n );\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n }\n\n /**\n * @return A promise that resolves with the download\n * URL for this object.\n */\n getDownloadURL(): Promise {\n args.validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function(metadata) {\n let url = (metadata['downloadURLs'] as string[])[0];\n if (type.isDef(url)) {\n return url;\n } else {\n throw errorsExports.noDownloadURL();\n }\n });\n }\n\n private throwIfRoot_(name: string) {\n if (this.location.path === '') {\n throw errorsExports.invalidRootOperation(name);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/reference.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { FirebaseStorageError } from './error';\nimport * as promiseimpl from './promise_external';\nimport * as RequestExports from './request';\nimport { Request } from './request';\n\n/**\n * A request whose promise always fails.\n * @struct\n * @template T\n */\nexport class FailRequest implements Request {\n promise_: Promise;\n\n constructor(error: FirebaseStorageError) {\n this.promise_ = promiseimpl.reject(error);\n }\n\n /** @inheritDoc */\n getPromise() {\n return this.promise_;\n }\n\n /** @inheritDoc */\n cancel(appDelete = false) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/failrequest.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as object from './object';\nimport * as RequestExports from './request';\nimport { Request } from './request';\nimport * as constants from './constants';\n\n/**\n * @struct\n */\nexport class RequestMap {\n private map_: { [key: number]: Request } = {};\n private id_: number;\n\n constructor() {\n this.id_ = constants.minSafeInteger;\n }\n\n /**\n * Registers the given request with this map.\n * The request is unregistered when it completes.\n * @param r The request to register.\n */\n addRequest(r: Request) {\n let id = this.id_;\n this.id_++;\n this.map_[id] = r;\n let self = this;\n\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n }\n\n /**\n * Cancels all registered requests.\n */\n clear() {\n object.forEach(this.map_, (key: string, val: Request) => {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/requestmap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { Reference } from '../reference';\nimport { Service } from '../service';\nimport * as constants from './constants';\nimport * as errorsExports from './error';\nimport { errors } from './error';\nimport { FailRequest } from './failrequest';\nimport { Location } from './location';\nimport * as promiseimpl from './promise_external';\nimport { Request } from './request';\nimport { RequestInfo } from './requestinfo';\nimport { requestMaker } from './requestmaker';\nimport { RequestMap } from './requestmap';\nimport * as type from './type';\nimport { XhrIoPool } from './xhriopool';\nimport { FirebaseApp, FirebaseAuthTokenData } from '../../app/firebase_app';\n\n/**\n * @param app If null, getAuthToken always resolves with null.\n * @param service The storage service associated with this auth wrapper.\n * Untyped to avoid circular type dependencies.\n * @struct\n */\nexport class AuthWrapper {\n private app_: FirebaseApp | null;\n private bucket_: string | null = null;\n\n /**\n maker\n */\n private storageRefMaker_: (p1: AuthWrapper, p2: Location) => Reference;\n private requestMaker_: requestMaker;\n private pool_: XhrIoPool;\n private service_: Service;\n private maxOperationRetryTime_: number;\n private maxUploadRetryTime_: number;\n private requestMap_: RequestMap;\n private deleted_: boolean = false;\n\n constructor(\n app: FirebaseApp | null,\n maker: (p1: AuthWrapper, p2: Location) => Reference,\n requestMaker: requestMaker,\n service: Service,\n pool: XhrIoPool\n ) {\n this.app_ = app;\n if (this.app_ !== null) {\n let options = this.app_.options;\n if (type.isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = constants.defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = constants.defaultMaxUploadRetryTime;\n this.requestMap_ = new RequestMap();\n }\n\n private static extractBucket_(config: {\n [prop: string]: any;\n }): string | null {\n let bucketString = config[constants.configOption] || null;\n if (bucketString == null) {\n return null;\n }\n let loc: Location = Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n }\n\n getAuthToken(): Promise {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (\n this.app_ !== null &&\n type.isDef(this.app_.INTERNAL) &&\n type.isDef(this.app_.INTERNAL.getToken)\n ) {\n return this.app_.INTERNAL.getToken().then(\n function(response: FirebaseAuthTokenData | null): string | null {\n if (response !== null) {\n return response.accessToken;\n } else {\n return null;\n }\n },\n function(_error) {\n return null;\n }\n );\n } else {\n return promiseimpl.resolve(null) as Promise;\n }\n }\n\n bucket(): string | null {\n if (this.deleted_) {\n throw errorsExports.appDeleted();\n } else {\n return this.bucket_;\n }\n }\n\n /**\n * The service associated with this auth wrapper. Untyped to avoid circular\n * type dependencies.\n */\n service(): Service {\n return this.service_;\n }\n\n /**\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\n * at the given Location.\n * @param loc The Location.\n * @return Actually a firebaseStorage.Reference, typing not allowed\n * because of circular dependency problems.\n */\n makeStorageReference(loc: Location): Reference {\n return this.storageRefMaker_(this, loc);\n }\n\n makeRequest(\n requestInfo: RequestInfo,\n authToken: string | null\n ): Request {\n if (!this.deleted_) {\n let request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n } else {\n return new FailRequest(errorsExports.appDeleted());\n }\n }\n\n /**\n * Stop running requests and prevent more from being created.\n */\n deleteApp() {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n }\n\n maxUploadRetryTime(): number {\n return this.maxUploadRetryTime_;\n }\n\n setMaxUploadRetryTime(time: number) {\n this.maxUploadRetryTime_ = time;\n }\n\n maxOperationRetryTime(): number {\n return this.maxOperationRetryTime_;\n }\n\n setMaxOperationRetryTime(time: number) {\n this.maxOperationRetryTime_ = time;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/authwrapper.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as args from './implementation/args';\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { Location } from './implementation/location';\nimport * as fbsPromiseImpl from './implementation/promise_external';\nimport * as RequestExports from './implementation/request';\nimport { Request } from './implementation/request';\nimport { XhrIoPool } from './implementation/xhriopool';\nimport { Reference } from './reference';\nimport { FirebaseApp } from '../app/firebase_app';\n\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n *\n * @struct\n */\nexport class Service {\n authWrapper_: AuthWrapper;\n private app_: FirebaseApp;\n private bucket_: Location | null = null;\n private internals_: ServiceInternals;\n\n constructor(app: FirebaseApp, pool: XhrIoPool, url?: string) {\n function maker(authWrapper: AuthWrapper, loc: Location) {\n return new Reference(authWrapper, loc);\n }\n this.authWrapper_ = new AuthWrapper(\n app,\n maker,\n RequestExports.makeRequest,\n this,\n pool\n );\n this.app_ = app;\n if (url != null) {\n this.bucket_ = Location.makeFromBucketSpec(url);\n } else {\n const authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new ServiceInternals(this);\n }\n\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n ref(path?: string): Reference {\n function validator(path: string) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n args.validate('ref', [args.stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n\n let ref = new Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n } else {\n return ref;\n }\n }\n\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n refFromURL(url: string): Reference {\n function validator(p: string) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n Location.makeFromUrl(p);\n } catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n args.validate('refFromURL', [args.stringSpec(validator, false)], arguments);\n return new Reference(this.authWrapper_, url);\n }\n\n get maxUploadRetryTime(): number {\n return this.authWrapper_.maxUploadRetryTime();\n }\n\n setMaxUploadRetryTime(time: number) {\n args.validate(\n 'setMaxUploadRetryTime',\n [args.nonNegativeNumberSpec()],\n arguments\n );\n this.authWrapper_.setMaxUploadRetryTime(time);\n }\n\n get maxOperationRetryTime(): number {\n return this.authWrapper_.maxOperationRetryTime();\n }\n\n setMaxOperationRetryTime(time: number) {\n args.validate(\n 'setMaxOperationRetryTime',\n [args.nonNegativeNumberSpec()],\n arguments\n );\n this.authWrapper_.setMaxOperationRetryTime(time);\n }\n\n get app(): FirebaseApp {\n return this.app_;\n }\n\n get INTERNAL(): ServiceInternals {\n return this.internals_;\n }\n}\n\n/**\n * @struct\n */\nexport class ServiceInternals {\n service_: Service;\n\n constructor(service: Service) {\n this.service_ = service;\n }\n\n /**\n * Called when the associated app is deleted.\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\n */\n delete(): Promise {\n this.service_.authWrapper_.deleteApp();\n return fbsPromiseImpl.resolve(undefined);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/service.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///firebase-storage.js","webpack:///./storage/index.js","webpack:///../storage/dist/esm/src/implementation/error.js","webpack:///../storage/dist/esm/src/implementation/string.js","webpack:///../storage/dist/esm/src/implementation/taskenums.js","webpack:///../storage/dist/esm/src/implementation/object.js","webpack:///../storage/dist/esm/src/implementation/promise_external.js","webpack:///../storage/dist/esm/src/implementation/type.js","webpack:///../storage/dist/esm/src/implementation/json.js","webpack:///../storage/dist/esm/src/implementation/path.js","webpack:///../storage/dist/esm/src/implementation/url.js","webpack:///../storage/dist/esm/src/implementation/metadata.js","webpack:///../storage/dist/esm/src/implementation/args.js","webpack:///../storage/dist/esm/src/implementation/fs.js","webpack:///../storage/dist/esm/src/implementation/array.js","webpack:///../storage/dist/esm/src/implementation/requests.js","webpack:///../storage/dist/esm/src/implementation/async.js","webpack:///../storage/dist/esm/src/implementation/backoff.js","webpack:///../storage/dist/esm/src/implementation/request.js","webpack:///../storage/dist/esm/index.js","webpack:///../storage/dist/esm/src/implementation/xhrio.js","webpack:///../storage/dist/esm/src/implementation/constants.js","webpack:///../storage/dist/esm/src/implementation/xhrio_network.js","webpack:///../storage/dist/esm/src/implementation/xhriopool.js","webpack:///../storage/dist/esm/src/implementation/location.js","webpack:///../storage/dist/esm/src/implementation/blob.js","webpack:///../storage/dist/esm/src/implementation/requestinfo.js","webpack:///../storage/dist/esm/src/implementation/observer.js","webpack:///../storage/dist/esm/src/tasksnapshot.js","webpack:///../storage/dist/esm/src/task.js","webpack:///../storage/dist/esm/src/reference.js","webpack:///../storage/dist/esm/src/implementation/failrequest.js","webpack:///../storage/dist/esm/src/implementation/requestmap.js","webpack:///../storage/dist/esm/src/implementation/authwrapper.js","webpack:///../storage/dist/esm/src/service.js"],"names":["webpackJsonpFirebase","118","module","exports","__webpack_require__","119","__webpack_exports__","prependCode","code","unknown","FirebaseStorageError","Code","UNKNOWN","objectNotFound","path","OBJECT_NOT_FOUND","quotaExceeded","bucket","QUOTA_EXCEEDED","unauthenticated","UNAUTHENTICATED","unauthorized","UNAUTHORIZED","retryLimitExceeded","RETRY_LIMIT_EXCEEDED","error_canceled","CANCELED","invalidUrl","url","INVALID_URL","invalidDefaultBucket","INVALID_DEFAULT_BUCKET","cannotSliceBlob","CANNOT_SLICE_BLOB","serverFileWrongSize","SERVER_FILE_WRONG_SIZE","noDownloadURL","NO_DOWNLOAD_URL","invalidArgument","index","fnName","message","INVALID_ARGUMENT","invalidArgumentCount","argMin","argMax","real","countPart","plural","INVALID_ARGUMENT_COUNT","appDeleted","APP_DELETED","invalidRootOperation","name","INVALID_ROOT_OPERATION","invalidFormat","format","INVALID_FORMAT","internalError","INTERNAL_ERROR","formatValidator","stringFormat","StringFormat","RAW","BASE64","BASE64URL","DATA_URL","dataFromString","string","StringData","utf8Bytes_","base64Bytes_","dataURLBytes_","dataURLContentType_","b","i","length","c","charCodeAt","push","valid","hi","lo","Uint8Array","percentEncodedBytes_","decoded","decodeURIComponent","e","hasMinus","indexOf","hasUnder","invalidChar","hasPlus","hasSlash","replace","bytes","atob","array","parts","string_DataURLParts","base64","rest","contentType","endsWith","s","end","substring","taskStateFromInternalTaskState","state","InternalTaskState","RUNNING","PAUSING","CANCELING","TaskState","PAUSED","SUCCESS","ERROR","contains","obj","prop","Object","prototype","hasOwnProperty","call","forEach","f","key","clone","val","make","resolver","Promise","promise_external_resolve","value","resolve","promise_external_reject","error","reject","isDef","p","isJustDef","isFunction","isObject","isNonNullObject","isNonArrayObject","Array","isArray","isString","String","isNumber","Number","isNativeBlob","isNativeBlobDefined","Blob","jsonObjectOrNull","JSON","parse","path_parent","lastIndexOf","slice","child","childPath","canonicalChildPath","split","filter","component","join","lastComponent","makeNormalUrl","urlPart","domainBase","apiBaseUrl","makeDownloadUrl","downloadBase","makeUploadUrl","apiUploadBaseUrl","makeQueryString","params","encode","encodeURIComponent","queryPart","nextPart","noXform_","metadata","xformPath","fullPath","getMappings","mappingsXformPath","xformSize","size","xformTokens","tokens","map","token","alt","mappings_","mappings","Mapping","nameMapping","xform","sizeMapping","addRef","authWrapper","generateRef","loc","location_Location","makeStorageReference","defineProperty","get","fromResource","resource","len","mapping","local","server","fromResourceString","resourceString","toResourceString","writable","stringify","metadataValidator","validate","specs","passed","minArgs","maxArgs","optional","validator","Error","and_","v1","v2","stringSpec","opt_validator","opt_optional","stringValidator","args_ArgSpec","uploadDataSpec","ArrayBuffer","metadataSpec","nonNegativeNumberSpec","looseObjectSpec","undefined","nullFunctionSpec","getBlobBuilder","BlobBuilder","WebKitBlobBuilder","getBlob","var_args","_i","arguments","bb","append","sliceBlob","blob","start","webkitSlice","mozSlice","array_contains","elem","array_clone","arraylike","remove","splice","handlerCheck","cndn","metadataHandler","handler","xhr","text","sharedErrorHandler","location","errorHandler","err","newErr","getStatus","setServerResponseProp","serverResponseProp","objectErrorHandler","shared","getMetadata","fullServerUrl","timeout","maxOperationRetryTime","requestInfo","RequestInfo","updateMetadata","body","headers","Content-Type","deleteObject","successCodes","determineContentType_","type","metadataForUpload_","opt_metadata","multipartUpload","bucketOnlyServerUrl","X-Goog-Upload-Protocol","boundary","str","Math","random","metadataString","preBlobPart","postBlobPart","blob_FbsBlob","urlParams","maxUploadRetryTime","uploadData","checkResumeHeader_","opt_allowed","status","getResponseHeader","createResumableUpload","X-Goog-Upload-Command","X-Goog-Upload-Header-Content-Length","X-Goog-Upload-Header-Content-Type","getResumableUploadStatus","sizeString","parseInt","isNaN","ResumableUploadStatus","continueResumableUpload","chunkSize","opt_status","opt_progressCallback","uploadStatus","newCurrent","current","bytesToUpload","total","bytesLeft","min","startByte","endByte","uploadCommand","X-Goog-Upload-Offset","progressCallback","async_async","argsToForward","then","apply","callback","canceled","cancelState","triggerCallback","triggeredCallback","callWithDelay","millis","timeoutId","setTimeout","success","hitTimeout","waitSeconds","waitMillis","stop","wasTimeout","stopped","clearTimeout","id","addAuthHeader_","authToken","addVersionHeader_","number","esm","SDK_VERSION","makeRequest","pool","request_NetworkRequest","method","additionalRetryCodes","factory","app","unused","opt_url","service_Service","xhriopool_XhrIoPool","registerStorage","instance","namespaceExports","TaskEvent","Storage","Reference","reference_Reference","INTERNAL","registerService","STORAGE_TYPE","ErrorCode","defaultMaxOperationRetryTime","defaultMaxUploadRetryTime","minSafeInteger","this","code_","message_","serverResponse_","name_","codeProp","codeEquals","serverResponse","enumerable","configurable","BUCKET_NOT_FOUND","PROJECT_NOT_FOUND","INVALID_CHECKSUM","INVALID_EVENT_NAME","NO_DEFAULT_BUCKET","data","opt_contentType","DataURLParts","dataURL","matches","match","middle","STATE_CHANGED","xhrio_network_NetworkXhrIo","NetworkXhrIo","_this","sent_","xhr_","XMLHttpRequest","errorCode_","NO_ERROR","sendPromise_","addEventListener","event","ABORT","NETWORK_ERROR","send","opt_body","opt_headers","open","setRequestHeader","getErrorCode","getResponseText","responseText","abort","header","addUploadProgressListener","listener","upload","removeUploadProgressListener","removeEventListener","XhrIoPool","createXhrIo","Location","path_","makeFromBucketSpec","bucketString","bucketLocation","makeFromUrl","gsModify","charAt","httpModify","gsRegex","RegExp","gsIndices","httpRegex","httpIndices","groups","regex","indices","postModify","group","captures","exec","bucketValue","pathValue","opt_local","opt_writable","opt_xform","ArgSpec","self","FbsBlob","opt_elideCopy","blobType","data_","byteLength","set","size_","type_","realBlob","sliced","buffer","blobby","uint8Arrays","finalLength_1","merged_1","index_1","finalized","observer_Observer","Observer","nextOrObserver","opt_error","opt_complete","next","complete","observer","UploadTaskSnapshot","bytesTransferred","totalBytes","task","ref","urls","task_UploadTask","UploadTask","transferred_","needToFetchStatus_","needToFetchMetadata_","observers_","error_","uploadUrl_","request_","chunkMultiplier_","resolve_","reject_","ref_","authWrapper_","location_","blob_","metadata_","resumable_","shouldDoResumable_","state_","errorHandler_","completeTransitions_","transition_","metadataErrorHandler_","promise_","start_","makeProgressCallback_","sizeBefore","loaded","updateProgress_","createResumable_","fetchStatus_","fetchMetadata_","continueUpload_","oneShotUpload_","resolveToken_","getAuthToken","createRequest","getPromise","statusRequest","uploadRequest","newStatus","increaseMultiplier_","metadataRequest","multipartRequest","transferred","old","notifyObservers_","cancel","wasPaused","externalState","on","completed","typeValidator","_p","nextOrObserverValidator","nextValidator","observerValidator","nextOrObserverMessage","makeBinder","binder","addObserver_","removeObserver_","binderNextOrObserverValidator","binderSpecs","onFulfilled","onRejected","catch","notifyObserver_","finishPromise_","triggered","bind","snapshot","resume","pause","toString","newRef","newPath","service","put","throwIfRoot_","putString","delete","getDownloadURL","failrequest_FailRequest","FailRequest","appDelete","requestmap_RequestMap","RequestMap","map_","id_","addRequest","r","unmap","clear","authwrapper_AuthWrapper","AuthWrapper","maker","requestMaker","bucket_","deleted_","app_","options","extractBucket_","storageRefMaker_","requestMaker_","pool_","service_","maxOperationRetryTime_","maxUploadRetryTime_","requestMap_","config","getToken","response","accessToken","_error","request","deleteApp","setMaxUploadRetryTime","time","setMaxOperationRetryTime","NetworkRequest","errorCallback","pendingXhr_","backoffId_","canceled_","appDelete_","url_","method_","headers_","body_","successCodes_","additionalRetryCodes_","callback_","errorCallback_","progressCallback_","timeout_","doTheRequest","backoffCallback","progressListener","progressEvent","lengthComputable","RequestEndStatus","hitServer","isRetryStatusCode_","wasCanceled","successCode","backoffDone","requestWentThrough","wasSuccessCode","result","isFiveHundredCode","extraRetryCodes","isExtraRetryCode","isRequestSpecificRetryCode","opt_canceled","Service","authWrapperBucket","internals_","service_ServiceInternals","test","refFromURL","ServiceInternals"],"mappings":";;;;;AAKA,IACQA,sBAAsB,IAExBC,IACA,SAAUC,EAAQC,EAASC,GCOjCA,EAAA,MDgBMC,IACA,SAAUH,EAAQI,EAAqBF,GAE7C,YE2DA,SAAAG,GAAAC,GACA,iBAAAA,EAEA,QAAAC,KAGA,UAAAC,IAAAC,GAAAC,QAFA,kFAIA,QAAAC,GAAAC,GACA,UAAAJ,IAAAC,GAAAI,iBAAA,WAAAD,EAAA,qBAQA,QAAAE,GAAAC,GACA,UAAAP,IAAAC,GAAAO,eAAA,qBACAD,EACA,0EAGA,QAAAE,KAGA,UAAAT,IAAAC,GAAAS,gBAFA,+FAIA,QAAAC,GAAAP,GACA,UAAAJ,IAAAC,GAAAW,aAAA,4CAAAR,EAAA,MAEA,QAAAS,KACA,UAAAb,IAAAC,GAAAa,qBAAA,4DAWA,QAAAC,KACA,UAAAf,IAAAC,GAAAe,SAAA,sCAKA,QAAAC,GAAAC,GACA,UAAAlB,IAAAC,GAAAkB,YAAA,gBAAAD,EAAA,MAEA,QAAAE,GAAAb,GACA,UAAAP,IAAAC,GAAAoB,uBAAA,2BAAAd,EAAA,MAQA,QAAAe,KACA,UAAAtB,IAAAC,GAAAsB,kBAAA,0DAEA,QAAAC,KACA,UAAAxB,IAAAC,GAAAwB,uBAAA,wEAEA,QAAAC,KACA,UAAA1B,IAAAC,GAAA0B,gBAAA,mDAEA,QAAAC,GAAAC,EAAAC,EAAAC,GACA,UAAA/B,IAAAC,GAAA+B,iBAAA,wBAAAF,EAAA,cAAAD,EAAA,KAAAE,GAEA,QAAAE,GAAAC,EAAAC,EAAAL,EAAAM,GACA,GAAAC,GACAC,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,YAAA,EACAC,cAAA,IAEAmQ,KAMAG,GAAA,WACA,QAAAG,GAAApF,GACA9L,KAAA2N,GAAA7B,EAUA,MAJAoF,GAAAjiB,UAAAid,OAAA,WAEA,MADAlM,MAAA2N,GAAA9F,EAAAwG,YACAze,MAAA8G,KAEAwa,If7IAppB,GAAA,gBAAAoX,EAyBA,IAAAS,IAAA,SAiBAT,IAAAb,GAAA,YnBmoHG,MACO,MAAMrO,GACN,KAAU4F,OACR","file":"firebase-storage.js","sourcesContent":["/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\ntry {\n webpackJsonpFirebase([2],{\n\n/***/ 118:\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n__webpack_require__(119);\n\n\n/***/ }),\n\n/***/ 119:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ../app/dist/esm/index.js + 1 modules\nvar esm = __webpack_require__(6);\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/constants.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Constants used in the Firebase Storage library.\n */\n/**\n * Domain and scheme for API calls.\n */\nvar domainBase = 'https://firebasestorage.googleapis.com';\n/**\n * Domain and scheme for object downloads.\n */\nvar downloadBase = 'https://firebasestorage.googleapis.com';\n/**\n * Base URL for non-upload calls to the API.\n */\nvar apiBaseUrl = '/v0';\n/**\n * Base URL for upload calls to the API.\n */\nvar apiUploadBaseUrl = '/v0';\nfunction setDomainBase(domainBase) {\n domainBase = domainBase;\n}\nvar configOption = 'storageBucket';\n/**\n * 1 minute\n */\nvar shortMaxOperationRetryTime = 1 * 60 * 1000;\n/**\n * 2 minutes\n */\nvar defaultMaxOperationRetryTime = 2 * 60 * 1000;\n/**\n * 10 minutes\n */\nvar defaultMaxUploadRetryTime = 10 * 60 * 100;\n/**\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\n * enough for us to use it directly.\n */\nvar minSafeInteger = -9007199254740991;\n\n//# sourceMappingURL=constants.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/error.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar FirebaseStorageError = /** @class */ (function () {\n function FirebaseStorageError(code, message) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n FirebaseStorageError.prototype.codeProp = function () {\n return this.code;\n };\n FirebaseStorageError.prototype.codeEquals = function (code) {\n return prependCode(code) === this.codeProp();\n };\n FirebaseStorageError.prototype.serverResponseProp = function () {\n return this.serverResponse_;\n };\n FirebaseStorageError.prototype.setServerResponseProp = function (serverResponse) {\n this.serverResponse_ = serverResponse;\n };\n Object.defineProperty(FirebaseStorageError.prototype, \"name\", {\n get: function () {\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"code\", {\n get: function () {\n return this.code_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"message\", {\n get: function () {\n return this.message_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n get: function () {\n return this.serverResponse_;\n },\n enumerable: true,\n configurable: true\n });\n return FirebaseStorageError;\n}());\n\nvar errors = {};\nvar Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\nfunction prependCode(code) {\n return 'storage/' + code;\n}\nfunction unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' +\n 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\nfunction objectNotFound(path) {\n return new FirebaseStorageError(Code.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nfunction bucketNotFound(bucket) {\n return new FirebaseStorageError(Code.BUCKET_NOT_FOUND, \"Bucket '\" + bucket + \"' does not exist.\");\n}\nfunction projectNotFound(project) {\n return new FirebaseStorageError(Code.PROJECT_NOT_FOUND, \"Project '\" + project + \"' does not exist.\");\n}\nfunction quotaExceeded(bucket) {\n return new FirebaseStorageError(Code.QUOTA_EXCEEDED, \"Quota for bucket '\" +\n bucket +\n \"' exceeded, please view quota on \" +\n 'https://firebase.google.com/pricing/.');\n}\nfunction unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' +\n 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\nfunction unauthorized(path) {\n return new FirebaseStorageError(Code.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nfunction retryLimitExceeded() {\n return new FirebaseStorageError(Code.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nfunction invalidChecksum(path, checksum, calculated) {\n return new FirebaseStorageError(Code.INVALID_CHECKSUM, \"Uploaded/downloaded object '\" +\n path +\n \"' has checksum '\" +\n checksum +\n \"' which does not match '\" +\n calculated +\n \"'. Please retry the upload/download.\");\n}\nfunction error_canceled() {\n return new FirebaseStorageError(Code.CANCELED, 'User canceled the upload/download.');\n}\nfunction invalidEventName(name) {\n return new FirebaseStorageError(Code.INVALID_EVENT_NAME, \"Invalid event name '\" + name + \"'.\");\n}\nfunction invalidUrl(url) {\n return new FirebaseStorageError(Code.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nfunction invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(Code.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nfunction noDefaultBucket() {\n return new FirebaseStorageError(Code.NO_DEFAULT_BUCKET, 'No default bucket ' +\n \"found. Did you set the '\" +\n configOption +\n \"' property when initializing the app?\");\n}\nfunction cannotSliceBlob() {\n return new FirebaseStorageError(Code.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nfunction serverFileWrongSize() {\n return new FirebaseStorageError(Code.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nfunction noDownloadURL() {\n return new FirebaseStorageError(Code.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nfunction invalidArgument(index, fnName, message) {\n return new FirebaseStorageError(Code.INVALID_ARGUMENT, 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message);\n}\nfunction invalidArgumentCount(argMin, argMax, fnName, real) {\n var countPart;\n var plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n }\n else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(Code.INVALID_ARGUMENT_COUNT, 'Invalid argument count in `' +\n fnName +\n '`: Expected ' +\n countPart +\n ' ' +\n plural +\n ', received ' +\n real +\n '.');\n}\nfunction appDeleted() {\n return new FirebaseStorageError(Code.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\n * @param name The name of the operation that was invalid.\n */\nfunction invalidRootOperation(name) {\n return new FirebaseStorageError(Code.INVALID_ROOT_OPERATION, \"The operation '\" +\n name +\n \"' cannot be performed on a root reference, create a non-root \" +\n \"reference using child, such as .child('file.png').\");\n}\n/**\n * @param format The format that was not valid.\n * @param message A message describing the format violation.\n */\nfunction invalidFormat(format, message) {\n return new FirebaseStorageError(Code.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\n * @param message A message describing the internal error.\n */\nfunction internalError(message) {\n throw new FirebaseStorageError(Code.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n\n//# sourceMappingURL=error.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/string.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\nfunction formatValidator(stringFormat) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' +\n StringFormat.RAW +\n ', ' +\n StringFormat.BASE64 +\n ', ' +\n StringFormat.BASE64URL +\n ', ' +\n StringFormat.DATA_URL +\n '].';\n }\n}\n/**\n * @struct\n */\nvar StringData = /** @class */ (function () {\n function StringData(data, opt_contentType) {\n this.data = data;\n this.contentType = opt_contentType || null;\n }\n return StringData;\n}());\n\nfunction dataFromString(format, string) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n // assert(false);\n throw unknown();\n}\nfunction utf8Bytes_(string) {\n var b = [];\n for (var i = 0; i < string.length; i++) {\n var c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n }\n else {\n if (c <= 2047) {\n b.push(192 | (c >> 6), 128 | (c & 63));\n }\n else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n var valid = i < string.length - 1 &&\n (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n }\n else {\n var hi = c;\n var lo = string.charCodeAt(++i);\n c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\n b.push(240 | (c >> 18), 128 | ((c >> 12) & 63), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n }\n else {\n b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\nfunction percentEncodedBytes_(string) {\n var decoded;\n try {\n decoded = decodeURIComponent(string);\n }\n catch (e) {\n throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n return utf8Bytes_(decoded);\n}\nfunction base64Bytes_(format, string) {\n switch (format) {\n case StringFormat.BASE64: {\n var hasMinus = string.indexOf('-') !== -1;\n var hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw invalidFormat(format, \"Invalid character '\" +\n invalidChar +\n \"' found: is it base64url encoded?\");\n }\n break;\n }\n case StringFormat.BASE64URL: {\n var hasPlus = string.indexOf('+') !== -1;\n var hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n var bytes;\n try {\n bytes = atob(string);\n }\n catch (e) {\n throw invalidFormat(format, 'Invalid character found');\n }\n var array = new Uint8Array(bytes.length);\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n/**\n * @struct\n */\nvar string_DataURLParts = /** @class */ (function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n var middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64\n ? middle.substring(0, middle.length - ';base64'.length)\n : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n return DataURLParts;\n}());\nfunction dataURLBytes_(string) {\n var parts = new string_DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n }\n else {\n return percentEncodedBytes_(parts.rest);\n }\n}\nfunction dataURLContentType_(string) {\n var parts = new string_DataURLParts(string);\n return parts.contentType;\n}\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n return s.substring(s.length - end.length) === end;\n}\n\n//# sourceMappingURL=string.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/taskenums.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\nvar InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\nvar TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\nfunction taskStateFromInternalTaskState(state) {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n\n//# sourceMappingURL=taskenums.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/object.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains methods for working with objects.\n */\nfunction contains(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction forEach(obj, f) {\n for (var key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\nfunction clone(obj) {\n if (obj == null) {\n return {};\n }\n var c = {};\n forEach(obj, function (key, val) {\n c[key] = val;\n });\n return c;\n}\n\n//# sourceMappingURL=object.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/promise_external.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Implements the promise abstraction interface for external\n * (public SDK) packaging, which just passes through to the firebase-app impl.\n */\n/**\n * @template T\n * @param {function((function(T): void),\n * (function(!Error): void))} resolver\n */\nfunction make(resolver) {\n return new Promise(resolver);\n}\n/**\n * @template T\n */\nfunction promise_external_resolve(value) {\n return Promise.resolve(value);\n}\nfunction promise_external_reject(error) {\n return Promise.reject(error);\n}\n\n//# sourceMappingURL=promise_external.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/type.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @return False if the object is undefined or null, true otherwise.\n */\nfunction isDef(p) {\n return p != null;\n}\nfunction isJustDef(p) {\n return p !== void 0;\n}\nfunction isFunction(p) {\n return typeof p === 'function';\n}\nfunction isObject(p) {\n return typeof p === 'object';\n}\nfunction isNonNullObject(p) {\n return isObject(p) && p !== null;\n}\nfunction isNonArrayObject(p) {\n return isObject(p) && !Array.isArray(p);\n}\nfunction isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\nfunction isNumber(p) {\n return typeof p === 'number' || p instanceof Number;\n}\nfunction isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\nfunction isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n\n//# sourceMappingURL=type.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/xhrio.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @enum{number}\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode = ErrorCode || (ErrorCode = {}));\n\n//# sourceMappingURL=xhrio.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/xhrio_network.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/**\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\n * doesn't work in React Native on Android.\n */\nvar xhrio_network_NetworkXhrIo = /** @class */ (function () {\n function NetworkXhrIo() {\n var _this = this;\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = ErrorCode.NO_ERROR;\n this.sendPromise_ = make(function (resolve, reject) {\n _this.xhr_.addEventListener('abort', function (event) {\n _this.errorCode_ = ErrorCode.ABORT;\n resolve(_this);\n });\n _this.xhr_.addEventListener('error', function (event) {\n _this.errorCode_ = ErrorCode.NETWORK_ERROR;\n resolve(_this);\n });\n _this.xhr_.addEventListener('load', function (event) {\n resolve(_this);\n });\n });\n }\n /**\n * @override\n */\n NetworkXhrIo.prototype.send = function (url, method, opt_body, opt_headers) {\n var _this = this;\n if (this.sent_) {\n throw internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (isDef(opt_headers)) {\n var headers = opt_headers;\n forEach(headers, function (key, val) {\n _this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (isDef(opt_body)) {\n this.xhr_.send(opt_body);\n }\n else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw internalError('cannot .getErrorCode() before sending');\n }\n return this.errorCode_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getStatus = function () {\n if (!this.sent_) {\n throw internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n }\n catch (e) {\n return -1;\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw internalError('cannot .getResponseText() before sending');\n }\n return this.xhr_.responseText;\n };\n /**\n * Aborts the request.\n * @override\n */\n NetworkXhrIo.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.addUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.removeUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n return NetworkXhrIo;\n}());\n\n\n//# sourceMappingURL=xhrio_network.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/xhriopool.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Factory-like class for creating XhrIo instances.\n */\nvar xhriopool_XhrIoPool = /** @class */ (function () {\n function XhrIoPool() {\n }\n XhrIoPool.prototype.createXhrIo = function () {\n return new xhrio_network_NetworkXhrIo();\n };\n return XhrIoPool;\n}());\n\n\n//# sourceMappingURL=xhriopool.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/json.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Returns the Object resulting from parsing the given JSON, or null if the\n * given string does not represent a JSON object.\n */\nfunction jsonObjectOrNull(s) {\n var obj;\n try {\n obj = JSON.parse(s);\n }\n catch (e) {\n return null;\n }\n if (isNonArrayObject(obj)) {\n return obj;\n }\n else {\n return null;\n }\n}\n\n//# sourceMappingURL=json.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/location.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functionality related to the parsing/composition of bucket/\n * object location.\n */\n\n/**\n * @struct\n */\nvar location_Location = /** @class */ (function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n Object.defineProperty(Location.prototype, \"path\", {\n get: function () {\n return this.path_;\n },\n enumerable: true,\n configurable: true\n });\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n Location.makeFromBucketSpec = function (bucketString) {\n var bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n }\n catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n }\n else {\n throw invalidDefaultBucket(bucketString);\n }\n };\n Location.makeFromUrl = function (url) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n var gsPath = '(/(.*))?$';\n var path = '(/([^?#]*).*)?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = { bucket: 1, path: 3 };\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n var version = 'v[A-Za-z0-9_]+';\n var httpRegex = new RegExp('^https?://firebasestorage\\\\.googleapis\\\\.com/' +\n version +\n '/b/' +\n bucketDomain +\n '/o' +\n path, 'i');\n var httpIndices = { bucket: 1, path: 3 };\n var groups = [\n { regex: gsRegex, indices: gsIndices, postModify: gsModify },\n { regex: httpRegex, indices: httpIndices, postModify: httpModify }\n ];\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw invalidUrl(url);\n }\n return location;\n };\n return Location;\n}());\n\n\n//# sourceMappingURL=location.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/path.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains helper methods for manipulating paths.\n */\n/**\n * @return Null if the path is already at the root.\n */\nfunction path_parent(path) {\n if (path.length == 0) {\n return null;\n }\n var index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n var newPath = path.slice(0, index);\n return newPath;\n}\nfunction child(path, childPath) {\n var canonicalChildPath = childPath\n .split('/')\n .filter(function (component) {\n return component.length > 0;\n })\n .join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n }\n else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\n * Returns the last component of a path.\n * '/foo/bar' -> 'bar'\n * '/foo/bar/baz/' -> 'baz/'\n * '/a' -> 'a'\n */\nfunction lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n }\n else {\n return path.slice(index + 1);\n }\n}\n\n//# sourceMappingURL=path.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/url.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functions to create and manipulate URLs for the server API.\n */\n\n\nfunction makeNormalUrl(urlPart) {\n return domainBase + apiBaseUrl + urlPart;\n}\nfunction makeDownloadUrl(urlPart) {\n return downloadBase + apiBaseUrl + urlPart;\n}\nfunction makeUploadUrl(urlPart) {\n return domainBase + apiUploadBaseUrl + urlPart;\n}\nfunction makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n forEach(params, function (key, val) {\n var nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n\n//# sourceMappingURL=url.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/metadata.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nfunction noXform_(metadata, value) {\n return value;\n}\n/**\n * @struct\n */\nvar Mapping = /** @class */ (function () {\n function Mapping(server, opt_local, opt_writable, opt_xform) {\n this.server = server;\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n return Mapping;\n}());\n\nvar mappings_ = null;\nfunction xformPath(fullPath) {\n var valid = isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n }\n else {\n fullPath = fullPath;\n return lastComponent(fullPath);\n }\n}\nfunction getMappings() {\n if (mappings_) {\n return mappings_;\n }\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n function mappingsXformPath(metadata, fullPath) {\n return xformPath(fullPath);\n }\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\n * Coerces the second param to a number, if it is defined.\n */\n function xformSize(metadata, size) {\n if (isDef(size)) {\n return +size;\n }\n else {\n return size;\n }\n }\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n /**\n * Transforms a comma-separated string of tokens into a list of download\n * URLs.\n */\n function xformTokens(metadata, tokens) {\n var valid = isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = makeDownloadUrl(urlPart);\n var queryString = makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(new Mapping('downloadTokens', 'downloadURLs', false, xformTokens));\n mappings_ = mappings;\n return mappings_;\n}\nfunction addRef(metadata, authWrapper) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new location_Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\nfunction fromResource(authWrapper, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\nfunction fromResourceString(authWrapper, resourceString, mappings) {\n var obj = jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n var resource = obj;\n return fromResource(authWrapper, resource, mappings);\n}\nfunction toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\nfunction metadataValidator(p) {\n var validType = p && isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (var key in p) {\n var val = p[key];\n if (key === 'customMetadata') {\n if (!isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n }\n else {\n if (isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n\n//# sourceMappingURL=metadata.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/args.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * @param name Name of the function.\n * @param specs Argument specs.\n * @param passed The actual arguments passed to the function.\n * @throws {fbs.Error} If the arguments are invalid.\n */\nfunction validate(name, specs, passed) {\n var minArgs = specs.length;\n var maxArgs = specs.length;\n for (var i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n var validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw invalidArgumentCount(minArgs, maxArgs, name, passed.length);\n }\n for (var i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n }\n catch (e) {\n if (e instanceof Error) {\n throw invalidArgument(i, name, e.message);\n }\n else {\n throw invalidArgument(i, name, e);\n }\n }\n }\n}\n/**\n * @struct\n */\nvar args_ArgSpec = /** @class */ (function () {\n function ArgSpec(validator, opt_optional) {\n var self = this;\n this.validator = function (p) {\n if (self.optional && !isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n return ArgSpec;\n}());\n\nfunction and_(v1, v2) {\n return function (p) {\n v1(p);\n v2(p);\n };\n}\nfunction stringSpec(opt_validator, opt_optional) {\n function stringValidator(p) {\n if (!isString(p)) {\n throw 'Expected string.';\n }\n }\n var validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n }\n else {\n validator = stringValidator;\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction uploadDataSpec() {\n function validator(p) {\n var valid = p instanceof Uint8Array ||\n p instanceof ArrayBuffer ||\n (isNativeBlobDefined() && p instanceof Blob);\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction metadataSpec(opt_optional) {\n return new args_ArgSpec(metadataValidator, opt_optional);\n}\nfunction nonNegativeNumberSpec() {\n function validator(p) {\n var valid = isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction looseObjectSpec(opt_validator, opt_optional) {\n function validator(p) {\n var isLooseObject = p === null || (isDef(p) && p instanceof Object);\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction nullFunctionSpec(opt_optional) {\n function validator(p) {\n var valid = p === null || isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\n\n//# sourceMappingURL=args.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/fs.js\n\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n }\n else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n }\n else {\n return undefined;\n }\n}\n/**\n * Concatenates one or more values together and converts them to a Blob.\n *\n * @param var_args The values that will make up the resulting blob.\n * @return The blob.\n */\nfunction getBlob() {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n for (var i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n }\n else {\n if (isNativeBlobDefined()) {\n return new Blob(var_args);\n }\n else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\n * Slices the blob. The returned blob contains data from the start byte\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\n *\n * @param blob The blob to be sliced.\n * @param start Index of the starting byte.\n * @param end Index of the ending byte.\n * @return The blob slice or null if not supported.\n */\nfunction sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n }\n else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n }\n else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n\n//# sourceMappingURL=fs.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/blob.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file Provides a Blob-like wrapper for various binary types (including the\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\n * making uploads possible in environments without the native Blob type.\n */\n\n\n\n\n/**\n * @param opt_elideCopy If true, doesn't copy mutable input data\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\n * modified after this blob's construction.\n */\nvar blob_FbsBlob = /** @class */ (function () {\n function FbsBlob(data, opt_elideCopy) {\n var size = 0;\n var blobType = '';\n if (isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n }\n else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n }\n else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n }\n else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data;\n }\n else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n }\n else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n FbsBlob.getBlob = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (isNativeBlobDefined()) {\n var blobby = var_args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n }\n else {\n return val;\n }\n });\n return new FbsBlob(getBlob.apply(null, blobby));\n }\n else {\n var uint8Arrays = var_args.map(function (val) {\n if (isString(val)) {\n return dataFromString(StringFormat.RAW, val).data;\n }\n else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n return FbsBlob;\n}());\n\n\n//# sourceMappingURL=blob.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/array.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns true if the object is contained in the array (compared with ===).\n * @template T\n */\nfunction array_contains(array, elem) {\n return array.indexOf(elem) !== -1;\n}\n/**\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\n * @template T\n */\nfunction array_clone(arraylike) {\n return Array.prototype.slice.call(arraylike);\n}\n/**\n * Removes the given element from the given array, if it is contained.\n * Directly modifies the passed-in array.\n * @template T\n */\nfunction remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n\n//# sourceMappingURL=array.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/requestinfo.js\nvar RequestInfo = /** @class */ (function () {\n function RequestInfo(url, method, \n /**\n * Returns the value with which to resolve the request's promise. Only called\n * if the request is successful. Throw from this function to reject the\n * returned Request's promise with the thrown error.\n * Note: The XhrIo passed to this function may be reused after this callback\n * returns. Do not keep a reference to it in any way.\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\n * Called with the current number of bytes uploaded and total size (-1 if not\n * computable) of the request body (i.e. used to report upload progress).\n */\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n return RequestInfo;\n}());\n\n\n//# sourceMappingURL=requestinfo.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/requests.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n/**\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\n */\nfunction handlerCheck(cndn) {\n if (!cndn) {\n throw unknown();\n }\n}\nfunction metadataHandler(authWrapper, mappings) {\n function handler(xhr, text) {\n var metadata = fromResourceString(authWrapper, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n return handler;\n}\nfunction sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n if (xhr.getStatus() === 401) {\n newErr = unauthenticated();\n }\n else {\n if (xhr.getStatus() === 402) {\n newErr = quotaExceeded(location.bucket);\n }\n else {\n if (xhr.getStatus() === 403) {\n newErr = unauthorized(location.path);\n }\n else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction getMetadata(authWrapper, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'GET';\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction updateMetadata(authWrapper, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'PATCH';\n var body = toResourceString(metadata, mappings);\n var headers = { 'Content-Type': 'application/json; charset=utf-8' };\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction deleteObject(authWrapper, location) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'DELETE';\n var timeout = authWrapper.maxOperationRetryTime();\n function handler(xhr, text) { }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction determineContentType_(metadata, blob) {\n return ((metadata && metadata['contentType']) ||\n (blob && blob.type()) ||\n 'application/octet-stream');\n}\nfunction metadataForUpload_(location, blob, opt_metadata) {\n var metadata = clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\nfunction multipartUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n function genBoundary() {\n var str = '';\n for (var i = 0; i < 2; i++) {\n str =\n str +\n Math.random()\n .toString()\n .slice(2);\n }\n return str;\n }\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var metadataString = toResourceString(metadata, mappings);\n var preBlobPart = '--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\n metadataString +\n '\\r\\n--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: ' +\n metadata['contentType'] +\n '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = blob_FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw cannotSliceBlob();\n }\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param current The number of bytes that have been uploaded so far.\n * @param total The total number of bytes in the upload.\n * @param opt_finalized True if the server has finished the upload.\n * @param opt_metadata The upload metadata, should\n * only be passed if opt_finalized is true.\n * @struct\n */\nvar ResumableUploadStatus = /** @class */ (function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n return ResumableUploadStatus;\n}());\n\nfunction checkResumeHeader_(xhr, opt_allowed) {\n var status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n }\n catch (e) {\n handlerCheck(false);\n }\n var allowed = opt_allowed || ['active'];\n handlerCheck(array_contains(allowed, status));\n return status;\n}\nfunction createResumableUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = toResourceString(metadata, mappings);\n var timeout = authWrapper.maxUploadRetryTime();\n function handler(xhr, text) {\n checkResumeHeader_(xhr);\n var url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n }\n catch (e) {\n handlerCheck(false);\n }\n handlerCheck(isString(url));\n return url;\n }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n */\nfunction getResumableUploadStatus(authWrapper, location, url, blob) {\n var headers = { 'X-Goog-Upload-Command': 'query' };\n function handler(xhr, text) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n }\n catch (e) {\n handlerCheck(false);\n }\n var size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * Any uploads via the resumable upload API must transfer a number of bytes\n * that is a multiple of this number.\n */\nvar resumableUploadChunkSize = 256 * 1024;\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n * @param chunkSize Number of bytes to upload.\n * @param opt_status The previous status.\n * If not passed or null, we start from the beginning.\n * @throws fbs.Error If the upload is already complete, the passed in status\n * has a final size inconsistent with the blob, or the blob cannot be sliced\n * for upload.\n */\nfunction continueResumableUpload(location, authWrapper, url, blob, chunkSize, mappings, opt_status, opt_progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n }\n else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw serverFileWrongSize();\n }\n var bytesLeft = status.total - status.current;\n var bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n var startByte = status.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n var body = blob.slice(startByte, endByte);\n if (body === null) {\n throw cannotSliceBlob();\n }\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n }\n else {\n metadata = null;\n }\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n//# sourceMappingURL=requests.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/observer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @struct\n */\nvar observer_Observer = /** @class */ (function () {\n function Observer(nextOrObserver, opt_error, opt_complete) {\n var asFunctions = isFunction(nextOrObserver) ||\n isDef(opt_error) ||\n isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n }\n else {\n var observer = nextOrObserver;\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n return Observer;\n}());\n\n\n//# sourceMappingURL=observer.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/tasksnapshot.js\nvar UploadTaskSnapshot = /** @class */ (function () {\n function UploadTaskSnapshot(bytesTransferred, totalBytes, state, metadata, task, ref) {\n this.bytesTransferred = bytesTransferred;\n this.totalBytes = totalBytes;\n this.state = state;\n this.metadata = metadata;\n this.task = task;\n this.ref = ref;\n }\n Object.defineProperty(UploadTaskSnapshot.prototype, \"downloadURL\", {\n get: function () {\n if (this.metadata !== null) {\n var urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n return UploadTaskSnapshot;\n}());\n\n\n//# sourceMappingURL=tasksnapshot.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/async.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Method for invoking a callback asynchronously.\n */\n\n/**\n * Returns a function that invokes f with its arguments asynchronously as a\n * microtask, i.e. as soon as possible after the current script returns back\n * into browser code.\n */\nfunction async_async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promise_external_resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}\n\n//# sourceMappingURL=async.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/task.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines types for interacting with blob transfer tasks.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\n * upload and manage callbacks for various events.\n */\nvar task_UploadTask = /** @class */ (function () {\n /**\n * @param ref The firebaseStorage.Reference object this task came\n * from, untyped to avoid cyclic dependencies.\n * @param blob The blob to upload.\n */\n function UploadTask(ref, authWrapper, location, mappings, blob, metadata) {\n if (metadata === void 0) { metadata = null; }\n var _this = this;\n this.transferred_ = 0;\n this.needToFetchStatus_ = false;\n this.needToFetchMetadata_ = false;\n this.observers_ = [];\n this.error_ = null;\n this.uploadUrl_ = null;\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n this.resolve_ = null;\n this.reject_ = null;\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = function (error) {\n _this.request_ = null;\n _this.chunkMultiplier_ = 1;\n if (error.codeEquals(Code.CANCELED)) {\n _this.needToFetchStatus_ = true;\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = function (error) {\n _this.request_ = null;\n if (error.codeEquals(Code.CANCELED)) {\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = make(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n _this.start_();\n });\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, function () { });\n }\n UploadTask.prototype.makeProgressCallback_ = function () {\n var _this = this;\n var sizeBefore = this.transferred_;\n return function (loaded, total) {\n _this.updateProgress_(sizeBefore + loaded);\n };\n };\n UploadTask.prototype.shouldDoResumable_ = function (blob) {\n return blob.size() > 256 * 1024;\n };\n UploadTask.prototype.start_ = function () {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n }\n else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n }\n else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n }\n else {\n this.continueUpload_();\n }\n }\n }\n }\n else {\n this.oneShotUpload_();\n }\n };\n UploadTask.prototype.resolveToken_ = function (callback) {\n var _this = this;\n this.authWrapper_.getAuthToken().then(function (authToken) {\n switch (_this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n _this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n _this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n };\n // TODO(andysoto): assert false\n UploadTask.prototype.createResumable_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = createResumableUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var createRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = createRequest;\n createRequest.getPromise().then(function (url) {\n _this.request_ = null;\n _this.uploadUrl_ = url;\n _this.needToFetchStatus_ = false;\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.fetchStatus_ = function () {\n var _this = this;\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo = getResumableUploadStatus(_this.authWrapper_, _this.location_, url, _this.blob_);\n var statusRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this.request_ = null;\n _this.updateProgress_(status.current);\n _this.needToFetchStatus_ = false;\n if (status.finalized) {\n _this.needToFetchMetadata_ = true;\n }\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.continueUpload_ = function () {\n var _this = this;\n var chunkSize = resumableUploadChunkSize * this.chunkMultiplier_;\n var status = new ResumableUploadStatus(this.transferred_, this.blob_.size());\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo;\n try {\n requestInfo = continueResumableUpload(_this.location_, _this.authWrapper_, url, _this.blob_, chunkSize, _this.mappings_, status, _this.makeProgressCallback_());\n }\n catch (e) {\n _this.error_ = e;\n _this.transition_(InternalTaskState.ERROR);\n return;\n }\n var uploadRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = uploadRequest;\n uploadRequest\n .getPromise()\n .then(function (newStatus) {\n _this.increaseMultiplier_();\n _this.request_ = null;\n _this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n _this.metadata_ = newStatus.metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }\n else {\n _this.completeTransitions_();\n }\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.increaseMultiplier_ = function () {\n var currentSize = resumableUploadChunkSize * this.chunkMultiplier_;\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n };\n UploadTask.prototype.fetchMetadata_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = getMetadata(_this.authWrapper_, _this.location_, _this.mappings_);\n var metadataRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.metadataErrorHandler_);\n });\n };\n UploadTask.prototype.oneShotUpload_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = multipartUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var multipartRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.updateProgress_(_this.blob_.size());\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.updateProgress_ = function (transferred) {\n var old = this.transferred_;\n this.transferred_ = transferred;\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n };\n UploadTask.prototype.transition_ = function (state) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = error_canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n };\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n };\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n get: function () {\n var externalState = taskStateFromInternalTaskState(this.state_);\n return new UploadTaskSnapshot(this.transferred_, this.blob_.size(), externalState, this.metadata_, this, this.ref_);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a callback for an event.\n * @param type The type of event to listen for.\n */\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n if (nextOrObserver === void 0) { nextOrObserver = undefined; }\n if (error === void 0) { error = undefined; }\n if (completed === void 0) { completed = undefined; }\n function typeValidator(_p) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw \"Expected one of the event types: [\" + TaskEvent.STATE_CHANGED + \"].\";\n }\n }\n var nextOrObserverMessage = 'Expected a function or an Object with one of ' +\n '`next`, `error`, `complete` properties.';\n var nextValidator = nullFunctionSpec(true).validator;\n var observerValidator = looseObjectSpec(null, true).validator;\n function nextOrObserverValidator(p) {\n try {\n nextValidator(p);\n return;\n }\n catch (e) { }\n try {\n observerValidator(p);\n var anyDefined = isJustDef(p['next']) ||\n isJustDef(p['error']) ||\n isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n }\n catch (e) {\n throw nextOrObserverMessage;\n }\n }\n var specs = [\n stringSpec(typeValidator),\n looseObjectSpec(nextOrObserverValidator, true),\n nullFunctionSpec(true),\n nullFunctionSpec(true)\n ];\n validate('on', specs, arguments);\n var self = this;\n function makeBinder(specs) {\n function binder(nextOrObserver, error, opt_complete) {\n if (specs !== null) {\n validate('on', specs, arguments);\n }\n var observer = new observer_Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return function () {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n function binderNextOrObserverValidator(p) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n var binderSpecs = [\n looseObjectSpec(binderNextOrObserverValidator),\n nullFunctionSpec(true),\n nullFunctionSpec(true)\n ];\n var typeOnly = !(isJustDef(nextOrObserver) ||\n isJustDef(error) ||\n isJustDef(completed));\n if (typeOnly) {\n return makeBinder(binderSpecs);\n }\n else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n };\n /**\n * This object behaves like a Promise, and resolves with its snapshot data\n * when the upload completes.\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\n * @param onRejected The rejection callback.\n */\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(onFulfilled, onRejected);\n };\n /**\n * Equivalent to calling `then(null, onRejected)`.\n */\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\n * Adds the given observer.\n */\n UploadTask.prototype.addObserver_ = function (observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n };\n /**\n * Removes the given observer.\n */\n UploadTask.prototype.removeObserver_ = function (observer) {\n remove(this.observers_, observer);\n };\n UploadTask.prototype.notifyObservers_ = function () {\n var _this = this;\n this.finishPromise_();\n var observers = array_clone(this.observers_);\n observers.forEach(function (observer) {\n _this.notifyObserver_(observer);\n });\n };\n UploadTask.prototype.finishPromise_ = function () {\n if (this.resolve_ !== null) {\n var triggered = true;\n switch (taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n async_async(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this.reject_;\n async_async(toCall.bind(null, this.error_))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n };\n UploadTask.prototype.notifyObserver_ = function (observer) {\n var externalState = taskStateFromInternalTaskState(this.state_);\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n async_async(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n async_async(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n async_async(observer.error.bind(observer, this.error_))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n async_async(observer.error.bind(observer, this.error_))();\n }\n }\n };\n /**\n * Resumes a paused task. Has no effect on a currently running or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.resume = function () {\n validate('resume', [], arguments);\n var valid = this.state_ === InternalTaskState.PAUSED ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n };\n /**\n * Pauses a currently running task. Has no effect on a paused or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.pause = function () {\n validate('pause', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n };\n /**\n * Cancels a currently running or paused task. Has no effect on a complete or\n * failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.cancel = function () {\n validate('cancel', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n };\n return UploadTask;\n}());\n\n\n//# sourceMappingURL=task.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/reference.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines the Firebase Storage Reference class.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Provides methods to interact with a bucket in the Firebase Storage service.\n * @param location An fbs.location, or the URL at\n * which to base this object, in one of the following forms:\n * gs:///\n * http[s]://firebasestorage.googleapis.com/\n * /b//o/\n * Any query or fragment strings will be ignored in the http[s]\n * format. If no value is passed, the storage object will use a URL based on\n * the project ID of the base firebase.App instance.\n */\nvar reference_Reference = /** @class */ (function () {\n function Reference(authWrapper, location) {\n this.authWrapper = authWrapper;\n if (location instanceof location_Location) {\n this.location = location;\n }\n else {\n this.location = location_Location.makeFromUrl(location);\n }\n }\n /**\n * @return The URL for the bucket and path this object references,\n * in the form gs:///\n * @override\n */\n Reference.prototype.toString = function () {\n validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n };\n Reference.prototype.newRef = function (authWrapper, location) {\n return new Reference(authWrapper, location);\n };\n Reference.prototype.mappings = function () {\n return getMappings();\n };\n /**\n * @return A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n Reference.prototype.child = function (childPath) {\n validate('child', [stringSpec()], arguments);\n var newPath = child(this.location.path, childPath);\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n };\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\n * @return A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get: function () {\n var newPath = path_parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\n * @return An reference to the root of this\n * object's bucket.\n */\n get: function () {\n var location = new location_Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n get: function () {\n return this.location.bucket;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n get: function () {\n return this.location.path;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n get: function () {\n return lastComponent(this.location.path);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n get: function () {\n return this.authWrapper.service();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Uploads a blob to this object's location.\n * @param data The blob to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.put = function (data, metadata) {\n if (metadata === void 0) { metadata = null; }\n validate('put', [uploadDataSpec(), metadataSpec(true)], arguments);\n this.throwIfRoot_('put');\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data), metadata);\n };\n /**\n * Uploads a string to this object's location.\n * @param string The string to upload.\n * @param opt_format The format of the string to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.putString = function (string, format, opt_metadata) {\n if (format === void 0) { format = StringFormat.RAW; }\n validate('putString', [\n stringSpec(),\n stringSpec(formatValidator, true),\n metadataSpec(true)\n ], arguments);\n this.throwIfRoot_('putString');\n var data = dataFromString(format, string);\n var metadata = clone(opt_metadata);\n if (!isDef(metadata['contentType']) && isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data.data, true), metadata);\n };\n /**\n * Deletes the object at this location.\n * @return A promise that resolves if the deletion succeeds.\n */\n Reference.prototype.delete = function () {\n validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * A promise that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retreived, the promise is\n * rejected.\n */\n Reference.prototype.getMetadata = function () {\n validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = getMetadata(self.authWrapper, self.location, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * Updates the metadata for this object.\n * @param metadata The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @return A promise that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n Reference.prototype.updateMetadata = function (metadata) {\n validate('updateMetadata', [metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = updateMetadata(self.authWrapper, self.location, metadata, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * @return A promise that resolves with the download\n * URL for this object.\n */\n Reference.prototype.getDownloadURL = function () {\n validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function (metadata) {\n var url = metadata['downloadURLs'][0];\n if (isDef(url)) {\n return url;\n }\n else {\n throw noDownloadURL();\n }\n });\n };\n Reference.prototype.throwIfRoot_ = function (name) {\n if (this.location.path === '') {\n throw invalidRootOperation(name);\n }\n };\n return Reference;\n}());\n\n\n//# sourceMappingURL=reference.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/failrequest.js\n\n/**\n * A request whose promise always fails.\n * @struct\n * @template T\n */\nvar failrequest_FailRequest = /** @class */ (function () {\n function FailRequest(error) {\n this.promise_ = promise_external_reject(error);\n }\n /** @inheritDoc */\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n FailRequest.prototype.cancel = function (appDelete) {\n if (appDelete === void 0) { appDelete = false; }\n };\n return FailRequest;\n}());\n\n\n//# sourceMappingURL=failrequest.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/requestmap.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * @struct\n */\nvar requestmap_RequestMap = /** @class */ (function () {\n function RequestMap() {\n this.map_ = {};\n this.id_ = minSafeInteger;\n }\n /**\n * Registers the given request with this map.\n * The request is unregistered when it completes.\n * @param r The request to register.\n */\n RequestMap.prototype.addRequest = function (r) {\n var id = this.id_;\n this.id_++;\n this.map_[id] = r;\n var self = this;\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n };\n /**\n * Cancels all registered requests.\n */\n RequestMap.prototype.clear = function () {\n forEach(this.map_, function (key, val) {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n };\n return RequestMap;\n}());\n\n\n//# sourceMappingURL=requestmap.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/authwrapper.js\n\n\n\n\n\n\n\n/**\n * @param app If null, getAuthToken always resolves with null.\n * @param service The storage service associated with this auth wrapper.\n * Untyped to avoid circular type dependencies.\n * @struct\n */\nvar authwrapper_AuthWrapper = /** @class */ (function () {\n function AuthWrapper(app, maker, requestMaker, service, pool) {\n this.bucket_ = null;\n this.deleted_ = false;\n this.app_ = app;\n if (this.app_ !== null) {\n var options = this.app_.options;\n if (isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = defaultMaxUploadRetryTime;\n this.requestMap_ = new requestmap_RequestMap();\n }\n AuthWrapper.extractBucket_ = function (config) {\n var bucketString = config[configOption] || null;\n if (bucketString == null) {\n return null;\n }\n var loc = location_Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n };\n AuthWrapper.prototype.getAuthToken = function () {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (this.app_ !== null &&\n isDef(this.app_.INTERNAL) &&\n isDef(this.app_.INTERNAL.getToken)) {\n return this.app_.INTERNAL.getToken().then(function (response) {\n if (response !== null) {\n return response.accessToken;\n }\n else {\n return null;\n }\n }, function (_error) {\n return null;\n });\n }\n else {\n return promise_external_resolve(null);\n }\n };\n AuthWrapper.prototype.bucket = function () {\n if (this.deleted_) {\n throw appDeleted();\n }\n else {\n return this.bucket_;\n }\n };\n /**\n * The service associated with this auth wrapper. Untyped to avoid circular\n * type dependencies.\n */\n AuthWrapper.prototype.service = function () {\n return this.service_;\n };\n /**\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\n * at the given Location.\n * @param loc The Location.\n * @return Actually a firebaseStorage.Reference, typing not allowed\n * because of circular dependency problems.\n */\n AuthWrapper.prototype.makeStorageReference = function (loc) {\n return this.storageRefMaker_(this, loc);\n };\n AuthWrapper.prototype.makeRequest = function (requestInfo, authToken) {\n if (!this.deleted_) {\n var request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n }\n else {\n return new failrequest_FailRequest(appDeleted());\n }\n };\n /**\n * Stop running requests and prevent more from being created.\n */\n AuthWrapper.prototype.deleteApp = function () {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n };\n AuthWrapper.prototype.maxUploadRetryTime = function () {\n return this.maxUploadRetryTime_;\n };\n AuthWrapper.prototype.setMaxUploadRetryTime = function (time) {\n this.maxUploadRetryTime_ = time;\n };\n AuthWrapper.prototype.maxOperationRetryTime = function () {\n return this.maxOperationRetryTime_;\n };\n AuthWrapper.prototype.setMaxOperationRetryTime = function (time) {\n this.maxOperationRetryTime_ = time;\n };\n return AuthWrapper;\n}());\n\n\n//# sourceMappingURL=authwrapper.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/backoff.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @param f May be invoked\n * before the function returns.\n * @param callback Get all the arguments passed to the function\n * passed to f, including the initial boolean.\n */\nfunction start(f, callback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n function canceled() {\n return cancelState === 2;\n }\n var triggeredCallback = false;\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n function handler(success) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n var mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n var waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n }\n else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n var stopped = false;\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n }\n else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\n * Stops the retry loop from repeating.\n * If the function is currently \"in between\" retries, it is invoked immediately\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\n * after the current invocation finishes iff the current invocation would have\n * triggered another retry.\n */\nfunction stop(id) {\n id(false);\n}\n\n//# sourceMappingURL=backoff.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/request.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines methods used to actually send HTTP requests from\n * abstract representations.\n */\n\n\n\n\n\n\n\n\n\n/**\n * @struct\n * @template T\n */\nvar request_NetworkRequest = /** @class */ (function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n this.pendingXhr_ = null;\n this.backoffId_ = null;\n this.resolve_ = null;\n this.reject_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n var self = this;\n this.promise_ = make(function (resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n /**\n * Actually starts the retry loop.\n */\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n var xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr\n .send(self.url_, self.method_, self.body_, self.headers_)\n .then(function (xhr) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr;\n var hitServer = xhr.getErrorCode() === ErrorCode.NO_ERROR;\n var status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = xhr.getErrorCode() === ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n var successCode = array_contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n /**\n * @param requestWentThrough True if the request eventually went\n * through, false if it hit the retry limit or was canceled.\n */\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var xhr = status.xhr;\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(xhr, xhr.getResponseText());\n if (isJustDef(result)) {\n resolve(result);\n }\n else {\n resolve();\n }\n }\n catch (e) {\n reject(e);\n }\n }\n else {\n if (xhr !== null) {\n var err = unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n }\n else {\n reject(err);\n }\n }\n else {\n if (status.canceled) {\n var err = self.appDelete_\n ? appDeleted()\n : error_canceled();\n reject(err);\n }\n else {\n var err = retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n }\n else {\n this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n };\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429\n ];\n var isExtraRetryCode = array_contains(extraRetryCodes, status);\n var isRequestSpecificRetryCode = array_contains(this.additionalRetryCodes_, status);\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n return NetworkRequest;\n}());\n/**\n * A collection of information about the result of a network request.\n * @param opt_canceled Defaults to false.\n * @struct\n */\nvar RequestEndStatus = /** @class */ (function () {\n function RequestEndStatus(wasSuccessCode, xhr, opt_canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.xhr = xhr;\n this.canceled = !!opt_canceled;\n }\n return RequestEndStatus;\n}());\n\nfunction addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\nfunction addVersionHeader_(headers) {\n var number = typeof esm[\"default\"] !== 'undefined' ? esm[\"default\"].SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n/**\n * @template T\n */\nfunction makeRequest(requestInfo, authToken, pool) {\n var queryPart = makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new request_NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n\n//# sourceMappingURL=request.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/service.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n *\n * @struct\n */\nvar service_Service = /** @class */ (function () {\n function Service(app, pool, url) {\n this.bucket_ = null;\n function maker(authWrapper, loc) {\n return new reference_Reference(authWrapper, loc);\n }\n this.authWrapper_ = new authwrapper_AuthWrapper(app, maker, makeRequest, this, pool);\n this.app_ = app;\n if (url != null) {\n this.bucket_ = location_Location.makeFromBucketSpec(url);\n }\n else {\n var authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new location_Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new service_ServiceInternals(this);\n }\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n Service.prototype.ref = function (path) {\n function validator(path) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n validate('ref', [stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n var ref = new reference_Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n }\n else {\n return ref;\n }\n };\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n Service.prototype.refFromURL = function (url) {\n function validator(p) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n location_Location.makeFromUrl(p);\n }\n catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n validate('refFromURL', [stringSpec(validator, false)], arguments);\n return new reference_Reference(this.authWrapper_, url);\n };\n Object.defineProperty(Service.prototype, \"maxUploadRetryTime\", {\n get: function () {\n return this.authWrapper_.maxUploadRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxUploadRetryTime = function (time) {\n validate('setMaxUploadRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxUploadRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"maxOperationRetryTime\", {\n get: function () {\n return this.authWrapper_.maxOperationRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxOperationRetryTime = function (time) {\n validate('setMaxOperationRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxOperationRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"app\", {\n get: function () {\n return this.app_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Service.prototype, \"INTERNAL\", {\n get: function () {\n return this.internals_;\n },\n enumerable: true,\n configurable: true\n });\n return Service;\n}());\n\n/**\n * @struct\n */\nvar service_ServiceInternals = /** @class */ (function () {\n function ServiceInternals(service) {\n this.service_ = service;\n }\n /**\n * Called when the associated app is deleted.\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\n */\n ServiceInternals.prototype.delete = function () {\n this.service_.authWrapper_.deleteApp();\n return promise_external_resolve(undefined);\n };\n return ServiceInternals;\n}());\n\n\n//# sourceMappingURL=service.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/index.js\n/* harmony export (immutable) */ __webpack_exports__[\"registerStorage\"] = registerStorage;\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n/**\n * Type constant for Firebase Storage.\n */\nvar STORAGE_TYPE = 'storage';\nfunction factory(app, unused, opt_url) {\n return new service_Service(app, new xhriopool_XhrIoPool(), opt_url);\n}\nfunction registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: service_Service,\n Reference: reference_Reference\n };\n instance.INTERNAL.registerService(STORAGE_TYPE, factory, namespaceExports, undefined, \n // Allow multiple storage instances per app.\n true);\n}\nregisterStorage(esm[\"default\"]);\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ })\n\n},[118]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-storage.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-storage.js","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nrequire('@firebase/storage');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./storage/index.js\n// module id = 118\n// module chunks = 2","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { configOption } from './constants';\nvar FirebaseStorageError = /** @class */ (function () {\n function FirebaseStorageError(code, message) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n FirebaseStorageError.prototype.codeProp = function () {\n return this.code;\n };\n FirebaseStorageError.prototype.codeEquals = function (code) {\n return prependCode(code) === this.codeProp();\n };\n FirebaseStorageError.prototype.serverResponseProp = function () {\n return this.serverResponse_;\n };\n FirebaseStorageError.prototype.setServerResponseProp = function (serverResponse) {\n this.serverResponse_ = serverResponse;\n };\n Object.defineProperty(FirebaseStorageError.prototype, \"name\", {\n get: function () {\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"code\", {\n get: function () {\n return this.code_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"message\", {\n get: function () {\n return this.message_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n get: function () {\n return this.serverResponse_;\n },\n enumerable: true,\n configurable: true\n });\n return FirebaseStorageError;\n}());\nexport { FirebaseStorageError };\nexport var errors = {};\nexport var Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\nexport function prependCode(code) {\n return 'storage/' + code;\n}\nexport function unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' +\n 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\nexport function objectNotFound(path) {\n return new FirebaseStorageError(Code.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nexport function bucketNotFound(bucket) {\n return new FirebaseStorageError(Code.BUCKET_NOT_FOUND, \"Bucket '\" + bucket + \"' does not exist.\");\n}\nexport function projectNotFound(project) {\n return new FirebaseStorageError(Code.PROJECT_NOT_FOUND, \"Project '\" + project + \"' does not exist.\");\n}\nexport function quotaExceeded(bucket) {\n return new FirebaseStorageError(Code.QUOTA_EXCEEDED, \"Quota for bucket '\" +\n bucket +\n \"' exceeded, please view quota on \" +\n 'https://firebase.google.com/pricing/.');\n}\nexport function unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' +\n 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\nexport function unauthorized(path) {\n return new FirebaseStorageError(Code.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nexport function retryLimitExceeded() {\n return new FirebaseStorageError(Code.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nexport function invalidChecksum(path, checksum, calculated) {\n return new FirebaseStorageError(Code.INVALID_CHECKSUM, \"Uploaded/downloaded object '\" +\n path +\n \"' has checksum '\" +\n checksum +\n \"' which does not match '\" +\n calculated +\n \"'. Please retry the upload/download.\");\n}\nexport function canceled() {\n return new FirebaseStorageError(Code.CANCELED, 'User canceled the upload/download.');\n}\nexport function invalidEventName(name) {\n return new FirebaseStorageError(Code.INVALID_EVENT_NAME, \"Invalid event name '\" + name + \"'.\");\n}\nexport function invalidUrl(url) {\n return new FirebaseStorageError(Code.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nexport function invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(Code.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nexport function noDefaultBucket() {\n return new FirebaseStorageError(Code.NO_DEFAULT_BUCKET, 'No default bucket ' +\n \"found. Did you set the '\" +\n configOption +\n \"' property when initializing the app?\");\n}\nexport function cannotSliceBlob() {\n return new FirebaseStorageError(Code.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nexport function serverFileWrongSize() {\n return new FirebaseStorageError(Code.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nexport function noDownloadURL() {\n return new FirebaseStorageError(Code.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nexport function invalidArgument(index, fnName, message) {\n return new FirebaseStorageError(Code.INVALID_ARGUMENT, 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message);\n}\nexport function invalidArgumentCount(argMin, argMax, fnName, real) {\n var countPart;\n var plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n }\n else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(Code.INVALID_ARGUMENT_COUNT, 'Invalid argument count in `' +\n fnName +\n '`: Expected ' +\n countPart +\n ' ' +\n plural +\n ', received ' +\n real +\n '.');\n}\nexport function appDeleted() {\n return new FirebaseStorageError(Code.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\n * @param name The name of the operation that was invalid.\n */\nexport function invalidRootOperation(name) {\n return new FirebaseStorageError(Code.INVALID_ROOT_OPERATION, \"The operation '\" +\n name +\n \"' cannot be performed on a root reference, create a non-root \" +\n \"reference using child, such as .child('file.png').\");\n}\n/**\n * @param format The format that was not valid.\n * @param message A message describing the format violation.\n */\nexport function invalidFormat(format, message) {\n return new FirebaseStorageError(Code.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\n * @param message A message describing the internal error.\n */\nexport function internalError(message) {\n throw new FirebaseStorageError(Code.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n\n//# sourceMappingURL=error.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/error.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as errorsExports from './error';\nexport var StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\nexport function formatValidator(stringFormat) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' +\n StringFormat.RAW +\n ', ' +\n StringFormat.BASE64 +\n ', ' +\n StringFormat.BASE64URL +\n ', ' +\n StringFormat.DATA_URL +\n '].';\n }\n}\n/**\n * @struct\n */\nvar StringData = /** @class */ (function () {\n function StringData(data, opt_contentType) {\n this.data = data;\n this.contentType = opt_contentType || null;\n }\n return StringData;\n}());\nexport { StringData };\nexport function dataFromString(format, string) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n // assert(false);\n throw errorsExports.unknown();\n}\nexport function utf8Bytes_(string) {\n var b = [];\n for (var i = 0; i < string.length; i++) {\n var c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n }\n else {\n if (c <= 2047) {\n b.push(192 | (c >> 6), 128 | (c & 63));\n }\n else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n var valid = i < string.length - 1 &&\n (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n }\n else {\n var hi = c;\n var lo = string.charCodeAt(++i);\n c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\n b.push(240 | (c >> 18), 128 | ((c >> 12) & 63), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n }\n else {\n b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\nexport function percentEncodedBytes_(string) {\n var decoded;\n try {\n decoded = decodeURIComponent(string);\n }\n catch (e) {\n throw errorsExports.invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n return utf8Bytes_(decoded);\n}\nexport function base64Bytes_(format, string) {\n switch (format) {\n case StringFormat.BASE64: {\n var hasMinus = string.indexOf('-') !== -1;\n var hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw errorsExports.invalidFormat(format, \"Invalid character '\" +\n invalidChar +\n \"' found: is it base64url encoded?\");\n }\n break;\n }\n case StringFormat.BASE64URL: {\n var hasPlus = string.indexOf('+') !== -1;\n var hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw errorsExports.invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n var bytes;\n try {\n bytes = atob(string);\n }\n catch (e) {\n throw errorsExports.invalidFormat(format, 'Invalid character found');\n }\n var array = new Uint8Array(bytes.length);\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n/**\n * @struct\n */\nvar DataURLParts = /** @class */ (function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw errorsExports.invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n var middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64\n ? middle.substring(0, middle.length - ';base64'.length)\n : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n return DataURLParts;\n}());\nexport function dataURLBytes_(string) {\n var parts = new DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n }\n else {\n return percentEncodedBytes_(parts.rest);\n }\n}\nexport function dataURLContentType_(string) {\n var parts = new DataURLParts(string);\n return parts.contentType;\n}\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n return s.substring(s.length - end.length) === end;\n}\n\n//# sourceMappingURL=string.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/string.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\nexport var InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\nexport var TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\nexport function taskStateFromInternalTaskState(state) {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n\n//# sourceMappingURL=taskenums.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/taskenums.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains methods for working with objects.\n */\nexport function contains(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nexport function forEach(obj, f) {\n for (var key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\nexport function clone(obj) {\n if (obj == null) {\n return {};\n }\n var c = {};\n forEach(obj, function (key, val) {\n c[key] = val;\n });\n return c;\n}\n\n//# sourceMappingURL=object.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/object.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Implements the promise abstraction interface for external\n * (public SDK) packaging, which just passes through to the firebase-app impl.\n */\n/**\n * @template T\n * @param {function((function(T): void),\n * (function(!Error): void))} resolver\n */\nexport function make(resolver) {\n return new Promise(resolver);\n}\n/**\n * @template T\n */\nexport function resolve(value) {\n return Promise.resolve(value);\n}\nexport function reject(error) {\n return Promise.reject(error);\n}\n\n//# sourceMappingURL=promise_external.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/promise_external.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @return False if the object is undefined or null, true otherwise.\n */\nexport function isDef(p) {\n return p != null;\n}\nexport function isJustDef(p) {\n return p !== void 0;\n}\nexport function isFunction(p) {\n return typeof p === 'function';\n}\nexport function isObject(p) {\n return typeof p === 'object';\n}\nexport function isNonNullObject(p) {\n return isObject(p) && p !== null;\n}\nexport function isNonArrayObject(p) {\n return isObject(p) && !Array.isArray(p);\n}\nexport function isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\nexport function isNumber(p) {\n return typeof p === 'number' || p instanceof Number;\n}\nexport function isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\nexport function isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n\n//# sourceMappingURL=type.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/type.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as type from './type';\n/**\n * Returns the Object resulting from parsing the given JSON, or null if the\n * given string does not represent a JSON object.\n */\nexport function jsonObjectOrNull(s) {\n var obj;\n try {\n obj = JSON.parse(s);\n }\n catch (e) {\n return null;\n }\n if (type.isNonArrayObject(obj)) {\n return obj;\n }\n else {\n return null;\n }\n}\n\n//# sourceMappingURL=json.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/json.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains helper methods for manipulating paths.\n */\n/**\n * @return Null if the path is already at the root.\n */\nexport function parent(path) {\n if (path.length == 0) {\n return null;\n }\n var index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n var newPath = path.slice(0, index);\n return newPath;\n}\nexport function child(path, childPath) {\n var canonicalChildPath = childPath\n .split('/')\n .filter(function (component) {\n return component.length > 0;\n })\n .join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n }\n else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\n * Returns the last component of a path.\n * '/foo/bar' -> 'bar'\n * '/foo/bar/baz/' -> 'baz/'\n * '/a' -> 'a'\n */\nexport function lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n }\n else {\n return path.slice(index + 1);\n }\n}\n\n//# sourceMappingURL=path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/path.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functions to create and manipulate URLs for the server API.\n */\nimport * as constants from './constants';\nimport * as object from './object';\nexport function makeNormalUrl(urlPart) {\n return constants.domainBase + constants.apiBaseUrl + urlPart;\n}\nexport function makeDownloadUrl(urlPart) {\n return constants.downloadBase + constants.apiBaseUrl + urlPart;\n}\nexport function makeUploadUrl(urlPart) {\n return constants.domainBase + constants.apiUploadBaseUrl + urlPart;\n}\nexport function makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n object.forEach(params, function (key, val) {\n var nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n\n//# sourceMappingURL=url.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/url.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as json from './json';\nimport { Location } from './location';\nimport * as path from './path';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nexport function noXform_(metadata, value) {\n return value;\n}\n/**\n * @struct\n */\nvar Mapping = /** @class */ (function () {\n function Mapping(server, opt_local, opt_writable, opt_xform) {\n this.server = server;\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n return Mapping;\n}());\nexport { Mapping };\nvar mappings_ = null;\nexport function xformPath(fullPath) {\n var valid = type.isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n }\n else {\n fullPath = fullPath;\n return path.lastComponent(fullPath);\n }\n}\nexport function getMappings() {\n if (mappings_) {\n return mappings_;\n }\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n function mappingsXformPath(metadata, fullPath) {\n return xformPath(fullPath);\n }\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\n * Coerces the second param to a number, if it is defined.\n */\n function xformSize(metadata, size) {\n if (type.isDef(size)) {\n return +size;\n }\n else {\n return size;\n }\n }\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n /**\n * Transforms a comma-separated string of tokens into a list of download\n * URLs.\n */\n function xformTokens(metadata, tokens) {\n var valid = type.isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = UrlUtils.makeDownloadUrl(urlPart);\n var queryString = UrlUtils.makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(new Mapping('downloadTokens', 'downloadURLs', false, xformTokens));\n mappings_ = mappings;\n return mappings_;\n}\nexport function addRef(metadata, authWrapper) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\nexport function fromResource(authWrapper, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\nexport function fromResourceString(authWrapper, resourceString, mappings) {\n var obj = json.jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n var resource = obj;\n return fromResource(authWrapper, resource, mappings);\n}\nexport function toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\nexport function metadataValidator(p) {\n var validType = p && type.isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (var key in p) {\n var val = p[key];\n if (key === 'customMetadata') {\n if (!type.isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n }\n else {\n if (type.isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n\n//# sourceMappingURL=metadata.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/metadata.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as errorsExports from './error';\nimport * as MetadataUtils from './metadata';\nimport * as type from './type';\n/**\n * @param name Name of the function.\n * @param specs Argument specs.\n * @param passed The actual arguments passed to the function.\n * @throws {fbs.Error} If the arguments are invalid.\n */\nexport function validate(name, specs, passed) {\n var minArgs = specs.length;\n var maxArgs = specs.length;\n for (var i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n var validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw errorsExports.invalidArgumentCount(minArgs, maxArgs, name, passed.length);\n }\n for (var i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n }\n catch (e) {\n if (e instanceof Error) {\n throw errorsExports.invalidArgument(i, name, e.message);\n }\n else {\n throw errorsExports.invalidArgument(i, name, e);\n }\n }\n }\n}\n/**\n * @struct\n */\nvar ArgSpec = /** @class */ (function () {\n function ArgSpec(validator, opt_optional) {\n var self = this;\n this.validator = function (p) {\n if (self.optional && !type.isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n return ArgSpec;\n}());\nexport { ArgSpec };\nexport function and_(v1, v2) {\n return function (p) {\n v1(p);\n v2(p);\n };\n}\nexport function stringSpec(opt_validator, opt_optional) {\n function stringValidator(p) {\n if (!type.isString(p)) {\n throw 'Expected string.';\n }\n }\n var validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n }\n else {\n validator = stringValidator;\n }\n return new ArgSpec(validator, opt_optional);\n}\nexport function uploadDataSpec() {\n function validator(p) {\n var valid = p instanceof Uint8Array ||\n p instanceof ArrayBuffer ||\n (type.isNativeBlobDefined() && p instanceof Blob);\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new ArgSpec(validator);\n}\nexport function metadataSpec(opt_optional) {\n return new ArgSpec(MetadataUtils.metadataValidator, opt_optional);\n}\nexport function nonNegativeNumberSpec() {\n function validator(p) {\n var valid = type.isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new ArgSpec(validator);\n}\nexport function looseObjectSpec(opt_validator, opt_optional) {\n function validator(p) {\n var isLooseObject = p === null || (type.isDef(p) && p instanceof Object);\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\nexport function nullFunctionSpec(opt_optional) {\n function validator(p) {\n var valid = p === null || type.isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\n\n//# sourceMappingURL=args.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/args.js\n// module id = null\n// module chunks = ","import * as type from './type';\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n }\n else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n }\n else {\n return undefined;\n }\n}\n/**\n * Concatenates one or more values together and converts them to a Blob.\n *\n * @param var_args The values that will make up the resulting blob.\n * @return The blob.\n */\nexport function getBlob() {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n for (var i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n }\n else {\n if (type.isNativeBlobDefined()) {\n return new Blob(var_args);\n }\n else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\n * Slices the blob. The returned blob contains data from the start byte\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\n *\n * @param blob The blob to be sliced.\n * @param start Index of the starting byte.\n * @param end Index of the ending byte.\n * @return The blob slice or null if not supported.\n */\nexport function sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n }\n else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n }\n else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n\n//# sourceMappingURL=fs.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/fs.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns true if the object is contained in the array (compared with ===).\n * @template T\n */\nexport function contains(array, elem) {\n return array.indexOf(elem) !== -1;\n}\n/**\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\n * @template T\n */\nexport function clone(arraylike) {\n return Array.prototype.slice.call(arraylike);\n}\n/**\n * Removes the given element from the given array, if it is contained.\n * Directly modifies the passed-in array.\n * @template T\n */\nexport function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n\n//# sourceMappingURL=array.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/array.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as array from './array';\nimport { FbsBlob } from './blob';\nimport * as errorsExports from './error';\nimport * as MetadataUtils from './metadata';\nimport * as object from './object';\nimport { RequestInfo } from './requestinfo';\nimport * as type from './type';\nimport * as UrlUtils from './url';\n/**\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\n */\nexport function handlerCheck(cndn) {\n if (!cndn) {\n throw errorsExports.unknown();\n }\n}\nexport function metadataHandler(authWrapper, mappings) {\n function handler(xhr, text) {\n var metadata = MetadataUtils.fromResourceString(authWrapper, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n return handler;\n}\nexport function sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n if (xhr.getStatus() === 401) {\n newErr = errorsExports.unauthenticated();\n }\n else {\n if (xhr.getStatus() === 402) {\n newErr = errorsExports.quotaExceeded(location.bucket);\n }\n else {\n if (xhr.getStatus() === 403) {\n newErr = errorsExports.unauthorized(location.path);\n }\n else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nexport function objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = errorsExports.objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nexport function getMetadata(authWrapper, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = UrlUtils.makeNormalUrl(urlPart);\n var method = 'GET';\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nexport function updateMetadata(authWrapper, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = UrlUtils.makeNormalUrl(urlPart);\n var method = 'PATCH';\n var body = MetadataUtils.toResourceString(metadata, mappings);\n var headers = { 'Content-Type': 'application/json; charset=utf-8' };\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nexport function deleteObject(authWrapper, location) {\n var urlPart = location.fullServerUrl();\n var url = UrlUtils.makeNormalUrl(urlPart);\n var method = 'DELETE';\n var timeout = authWrapper.maxOperationRetryTime();\n function handler(xhr, text) { }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nexport function determineContentType_(metadata, blob) {\n return ((metadata && metadata['contentType']) ||\n (blob && blob.type()) ||\n 'application/octet-stream');\n}\nexport function metadataForUpload_(location, blob, opt_metadata) {\n var metadata = object.clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\nexport function multipartUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n function genBoundary() {\n var str = '';\n for (var i = 0; i < 2; i++) {\n str =\n str +\n Math.random()\n .toString()\n .slice(2);\n }\n return str;\n }\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var metadataString = MetadataUtils.toResourceString(metadata, mappings);\n var preBlobPart = '--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\n metadataString +\n '\\r\\n--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: ' +\n metadata['contentType'] +\n '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n var urlParams = { name: metadata['fullPath'] };\n var url = UrlUtils.makeUploadUrl(urlPart);\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param current The number of bytes that have been uploaded so far.\n * @param total The total number of bytes in the upload.\n * @param opt_finalized True if the server has finished the upload.\n * @param opt_metadata The upload metadata, should\n * only be passed if opt_finalized is true.\n * @struct\n */\nvar ResumableUploadStatus = /** @class */ (function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n return ResumableUploadStatus;\n}());\nexport { ResumableUploadStatus };\nexport function checkResumeHeader_(xhr, opt_allowed) {\n var status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n }\n catch (e) {\n handlerCheck(false);\n }\n var allowed = opt_allowed || ['active'];\n handlerCheck(array.contains(allowed, status));\n return status;\n}\nexport function createResumableUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var urlParams = { name: metadata['fullPath'] };\n var url = UrlUtils.makeUploadUrl(urlPart);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = MetadataUtils.toResourceString(metadata, mappings);\n var timeout = authWrapper.maxUploadRetryTime();\n function handler(xhr, text) {\n checkResumeHeader_(xhr);\n var url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n }\n catch (e) {\n handlerCheck(false);\n }\n handlerCheck(type.isString(url));\n return url;\n }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n */\nexport function getResumableUploadStatus(authWrapper, location, url, blob) {\n var headers = { 'X-Goog-Upload-Command': 'query' };\n function handler(xhr, text) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n }\n catch (e) {\n handlerCheck(false);\n }\n var size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * Any uploads via the resumable upload API must transfer a number of bytes\n * that is a multiple of this number.\n */\nexport var resumableUploadChunkSize = 256 * 1024;\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n * @param chunkSize Number of bytes to upload.\n * @param opt_status The previous status.\n * If not passed or null, we start from the beginning.\n * @throws fbs.Error If the upload is already complete, the passed in status\n * has a final size inconsistent with the blob, or the blob cannot be sliced\n * for upload.\n */\nexport function continueResumableUpload(location, authWrapper, url, blob, chunkSize, mappings, opt_status, opt_progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n }\n else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw errorsExports.serverFileWrongSize();\n }\n var bytesLeft = status.total - status.current;\n var bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n var startByte = status.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n var body = blob.slice(startByte, endByte);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n }\n else {\n metadata = null;\n }\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n//# sourceMappingURL=requests.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/requests.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Method for invoking a callback asynchronously.\n */\nimport * as promiseimpl from './promise_external';\n/**\n * Returns a function that invokes f with its arguments asynchronously as a\n * microtask, i.e. as soon as possible after the current script returns back\n * into browser code.\n */\nexport function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}\n\n//# sourceMappingURL=async.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/async.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @param f May be invoked\n * before the function returns.\n * @param callback Get all the arguments passed to the function\n * passed to f, including the initial boolean.\n */\nexport function start(f, callback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n function canceled() {\n return cancelState === 2;\n }\n var triggeredCallback = false;\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n function handler(success) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n var mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n var waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n }\n else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n var stopped = false;\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n }\n else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\n * Stops the retry loop from repeating.\n * If the function is currently \"in between\" retries, it is invoked immediately\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\n * after the current invocation finishes iff the current invocation would have\n * triggered another retry.\n */\nexport function stop(id) {\n id(false);\n}\n\n//# sourceMappingURL=backoff.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/backoff.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines methods used to actually send HTTP requests from\n * abstract representations.\n */\nimport firebase from '@firebase/app';\nimport * as array from './array';\nimport * as backoff from './backoff';\nimport * as errorsExports from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nimport * as XhrIoExports from './xhrio';\n/**\n * @struct\n * @template T\n */\nvar NetworkRequest = /** @class */ (function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n this.pendingXhr_ = null;\n this.backoffId_ = null;\n this.resolve_ = null;\n this.reject_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n var self = this;\n this.promise_ = promiseimpl.make(function (resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n /**\n * Actually starts the retry loop.\n */\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n var xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr\n .send(self.url_, self.method_, self.body_, self.headers_)\n .then(function (xhr) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr;\n var hitServer = xhr.getErrorCode() === XhrIoExports.ErrorCode.NO_ERROR;\n var status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = xhr.getErrorCode() === XhrIoExports.ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n var successCode = array.contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n /**\n * @param requestWentThrough True if the request eventually went\n * through, false if it hit the retry limit or was canceled.\n */\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var xhr = status.xhr;\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(xhr, xhr.getResponseText());\n if (type.isJustDef(result)) {\n resolve(result);\n }\n else {\n resolve();\n }\n }\n catch (e) {\n reject(e);\n }\n }\n else {\n if (xhr !== null) {\n var err = errorsExports.unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n }\n else {\n reject(err);\n }\n }\n else {\n if (status.canceled) {\n var err = self.appDelete_\n ? errorsExports.appDeleted()\n : errorsExports.canceled();\n reject(err);\n }\n else {\n var err = errorsExports.retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n }\n else {\n this.backoffId_ = backoff.start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n backoff.stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n };\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429\n ];\n var isExtraRetryCode = array.contains(extraRetryCodes, status);\n var isRequestSpecificRetryCode = array.contains(this.additionalRetryCodes_, status);\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n return NetworkRequest;\n}());\n/**\n * A collection of information about the result of a network request.\n * @param opt_canceled Defaults to false.\n * @struct\n */\nvar RequestEndStatus = /** @class */ (function () {\n function RequestEndStatus(wasSuccessCode, xhr, opt_canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.xhr = xhr;\n this.canceled = !!opt_canceled;\n }\n return RequestEndStatus;\n}());\nexport { RequestEndStatus };\nexport function addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\nexport function addVersionHeader_(headers) {\n var number = typeof firebase !== 'undefined' ? firebase.SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n/**\n * @template T\n */\nexport function makeRequest(requestInfo, authToken, pool) {\n var queryPart = UrlUtils.makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = object.clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n\n//# sourceMappingURL=request.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/request.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport firebase from '@firebase/app';\nimport { StringFormat } from './src/implementation/string';\nimport { TaskEvent } from './src/implementation/taskenums';\nimport { TaskState } from './src/implementation/taskenums';\nimport { XhrIoPool } from './src/implementation/xhriopool';\nimport { Reference } from './src/reference';\nimport { Service } from './src/service';\n/**\n * Type constant for Firebase Storage.\n */\nvar STORAGE_TYPE = 'storage';\nfunction factory(app, unused, opt_url) {\n return new Service(app, new XhrIoPool(), opt_url);\n}\nexport function registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: Service,\n Reference: Reference\n };\n instance.INTERNAL.registerService(STORAGE_TYPE, factory, namespaceExports, undefined, \n // Allow multiple storage instances per app.\n true);\n}\nregisterStorage(firebase);\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/index.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @enum{number}\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode = ErrorCode || (ErrorCode = {}));\n\n//# sourceMappingURL=xhrio.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/xhrio.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Constants used in the Firebase Storage library.\n */\n/**\n * Domain and scheme for API calls.\n */\nexport var domainBase = 'https://firebasestorage.googleapis.com';\n/**\n * Domain and scheme for object downloads.\n */\nexport var downloadBase = 'https://firebasestorage.googleapis.com';\n/**\n * Base URL for non-upload calls to the API.\n */\nexport var apiBaseUrl = '/v0';\n/**\n * Base URL for upload calls to the API.\n */\nexport var apiUploadBaseUrl = '/v0';\nexport function setDomainBase(domainBase) {\n domainBase = domainBase;\n}\nexport var configOption = 'storageBucket';\n/**\n * 1 minute\n */\nexport var shortMaxOperationRetryTime = 1 * 60 * 1000;\n/**\n * 2 minutes\n */\nexport var defaultMaxOperationRetryTime = 2 * 60 * 1000;\n/**\n * 10 minutes\n */\nexport var defaultMaxUploadRetryTime = 10 * 60 * 100;\n/**\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\n * enough for us to use it directly.\n */\nexport var minSafeInteger = -9007199254740991;\n\n//# sourceMappingURL=constants.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/constants.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as errorsExports from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport * as type from './type';\nimport * as XhrIoExports from './xhrio';\n/**\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\n * doesn't work in React Native on Android.\n */\nvar NetworkXhrIo = /** @class */ (function () {\n function NetworkXhrIo() {\n var _this = this;\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = XhrIoExports.ErrorCode.NO_ERROR;\n this.sendPromise_ = promiseimpl.make(function (resolve, reject) {\n _this.xhr_.addEventListener('abort', function (event) {\n _this.errorCode_ = XhrIoExports.ErrorCode.ABORT;\n resolve(_this);\n });\n _this.xhr_.addEventListener('error', function (event) {\n _this.errorCode_ = XhrIoExports.ErrorCode.NETWORK_ERROR;\n resolve(_this);\n });\n _this.xhr_.addEventListener('load', function (event) {\n resolve(_this);\n });\n });\n }\n /**\n * @override\n */\n NetworkXhrIo.prototype.send = function (url, method, opt_body, opt_headers) {\n var _this = this;\n if (this.sent_) {\n throw errorsExports.internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (type.isDef(opt_headers)) {\n var headers = opt_headers;\n object.forEach(headers, function (key, val) {\n _this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (type.isDef(opt_body)) {\n this.xhr_.send(opt_body);\n }\n else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getErrorCode() before sending');\n }\n return this.errorCode_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getStatus = function () {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n }\n catch (e) {\n return -1;\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getResponseText() before sending');\n }\n return this.xhr_.responseText;\n };\n /**\n * Aborts the request.\n * @override\n */\n NetworkXhrIo.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.addUploadProgressListener = function (listener) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.removeUploadProgressListener = function (listener) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n return NetworkXhrIo;\n}());\nexport { NetworkXhrIo };\n\n//# sourceMappingURL=xhrio_network.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/xhrio_network.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NetworkXhrIo } from './xhrio_network';\n/**\n * Factory-like class for creating XhrIo instances.\n */\nvar XhrIoPool = /** @class */ (function () {\n function XhrIoPool() {\n }\n XhrIoPool.prototype.createXhrIo = function () {\n return new NetworkXhrIo();\n };\n return XhrIoPool;\n}());\nexport { XhrIoPool };\n\n//# sourceMappingURL=xhriopool.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/xhriopool.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functionality related to the parsing/composition of bucket/\n * object location.\n */\nimport * as errorsExports from './error';\n/**\n * @struct\n */\nvar Location = /** @class */ (function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n Object.defineProperty(Location.prototype, \"path\", {\n get: function () {\n return this.path_;\n },\n enumerable: true,\n configurable: true\n });\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n Location.makeFromBucketSpec = function (bucketString) {\n var bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n }\n catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n }\n else {\n throw errorsExports.invalidDefaultBucket(bucketString);\n }\n };\n Location.makeFromUrl = function (url) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n var gsPath = '(/(.*))?$';\n var path = '(/([^?#]*).*)?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = { bucket: 1, path: 3 };\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n var version = 'v[A-Za-z0-9_]+';\n var httpRegex = new RegExp('^https?://firebasestorage\\\\.googleapis\\\\.com/' +\n version +\n '/b/' +\n bucketDomain +\n '/o' +\n path, 'i');\n var httpIndices = { bucket: 1, path: 3 };\n var groups = [\n { regex: gsRegex, indices: gsIndices, postModify: gsModify },\n { regex: httpRegex, indices: httpIndices, postModify: httpModify }\n ];\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw errorsExports.invalidUrl(url);\n }\n return location;\n };\n return Location;\n}());\nexport { Location };\n\n//# sourceMappingURL=location.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/location.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file Provides a Blob-like wrapper for various binary types (including the\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\n * making uploads possible in environments without the native Blob type.\n */\nimport * as fs from './fs';\nimport * as string from './string';\nimport { StringFormat } from './string';\nimport * as type from './type';\n/**\n * @param opt_elideCopy If true, doesn't copy mutable input data\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\n * modified after this blob's construction.\n */\nvar FbsBlob = /** @class */ (function () {\n function FbsBlob(data, opt_elideCopy) {\n var size = 0;\n var blobType = '';\n if (type.isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n }\n else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n }\n else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n }\n else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data;\n }\n else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (type.isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = fs.sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n }\n else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n FbsBlob.getBlob = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (type.isNativeBlobDefined()) {\n var blobby = var_args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n }\n else {\n return val;\n }\n });\n return new FbsBlob(fs.getBlob.apply(null, blobby));\n }\n else {\n var uint8Arrays = var_args.map(function (val) {\n if (type.isString(val)) {\n return string.dataFromString(StringFormat.RAW, val).data;\n }\n else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n return FbsBlob;\n}());\nexport { FbsBlob };\n\n//# sourceMappingURL=blob.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/blob.js\n// module id = null\n// module chunks = ","var RequestInfo = /** @class */ (function () {\n function RequestInfo(url, method, \n /**\n * Returns the value with which to resolve the request's promise. Only called\n * if the request is successful. Throw from this function to reject the\n * returned Request's promise with the thrown error.\n * Note: The XhrIo passed to this function may be reused after this callback\n * returns. Do not keep a reference to it in any way.\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\n * Called with the current number of bytes uploaded and total size (-1 if not\n * computable) of the request body (i.e. used to report upload progress).\n */\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n return RequestInfo;\n}());\nexport { RequestInfo };\n\n//# sourceMappingURL=requestinfo.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/requestinfo.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as type from './type';\n/**\n * @struct\n */\nvar Observer = /** @class */ (function () {\n function Observer(nextOrObserver, opt_error, opt_complete) {\n var asFunctions = type.isFunction(nextOrObserver) ||\n type.isDef(opt_error) ||\n type.isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n }\n else {\n var observer = nextOrObserver;\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n return Observer;\n}());\nexport { Observer };\n\n//# sourceMappingURL=observer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/observer.js\n// module id = null\n// module chunks = ","var UploadTaskSnapshot = /** @class */ (function () {\n function UploadTaskSnapshot(bytesTransferred, totalBytes, state, metadata, task, ref) {\n this.bytesTransferred = bytesTransferred;\n this.totalBytes = totalBytes;\n this.state = state;\n this.metadata = metadata;\n this.task = task;\n this.ref = ref;\n }\n Object.defineProperty(UploadTaskSnapshot.prototype, \"downloadURL\", {\n get: function () {\n if (this.metadata !== null) {\n var urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n return UploadTaskSnapshot;\n}());\nexport { UploadTaskSnapshot };\n\n//# sourceMappingURL=tasksnapshot.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/tasksnapshot.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines types for interacting with blob transfer tasks.\n */\nimport { InternalTaskState } from './implementation/taskenums';\nimport { Observer } from './implementation/observer';\nimport { TaskEvent, TaskState } from './implementation/taskenums';\nimport { UploadTaskSnapshot } from './tasksnapshot';\nimport * as fbsArgs from './implementation/args';\nimport * as fbsArray from './implementation/array';\nimport { async as fbsAsync } from './implementation/async';\nimport * as errors from './implementation/error';\nimport * as fbsPromiseimpl from './implementation/promise_external';\nimport * as fbsRequests from './implementation/requests';\nimport * as fbsTaskEnums from './implementation/taskenums';\nimport * as typeUtils from './implementation/type';\n/**\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\n * upload and manage callbacks for various events.\n */\nvar UploadTask = /** @class */ (function () {\n /**\n * @param ref The firebaseStorage.Reference object this task came\n * from, untyped to avoid cyclic dependencies.\n * @param blob The blob to upload.\n */\n function UploadTask(ref, authWrapper, location, mappings, blob, metadata) {\n if (metadata === void 0) { metadata = null; }\n var _this = this;\n this.transferred_ = 0;\n this.needToFetchStatus_ = false;\n this.needToFetchMetadata_ = false;\n this.observers_ = [];\n this.error_ = null;\n this.uploadUrl_ = null;\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n this.resolve_ = null;\n this.reject_ = null;\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = function (error) {\n _this.request_ = null;\n _this.chunkMultiplier_ = 1;\n if (error.codeEquals(errors.Code.CANCELED)) {\n _this.needToFetchStatus_ = true;\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = function (error) {\n _this.request_ = null;\n if (error.codeEquals(errors.Code.CANCELED)) {\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = fbsPromiseimpl.make(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n _this.start_();\n });\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, function () { });\n }\n UploadTask.prototype.makeProgressCallback_ = function () {\n var _this = this;\n var sizeBefore = this.transferred_;\n return function (loaded, total) {\n _this.updateProgress_(sizeBefore + loaded);\n };\n };\n UploadTask.prototype.shouldDoResumable_ = function (blob) {\n return blob.size() > 256 * 1024;\n };\n UploadTask.prototype.start_ = function () {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n }\n else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n }\n else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n }\n else {\n this.continueUpload_();\n }\n }\n }\n }\n else {\n this.oneShotUpload_();\n }\n };\n UploadTask.prototype.resolveToken_ = function (callback) {\n var _this = this;\n this.authWrapper_.getAuthToken().then(function (authToken) {\n switch (_this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n _this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n _this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n };\n // TODO(andysoto): assert false\n UploadTask.prototype.createResumable_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.createResumableUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var createRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = createRequest;\n createRequest.getPromise().then(function (url) {\n _this.request_ = null;\n _this.uploadUrl_ = url;\n _this.needToFetchStatus_ = false;\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.fetchStatus_ = function () {\n var _this = this;\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.getResumableUploadStatus(_this.authWrapper_, _this.location_, url, _this.blob_);\n var statusRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this.request_ = null;\n _this.updateProgress_(status.current);\n _this.needToFetchStatus_ = false;\n if (status.finalized) {\n _this.needToFetchMetadata_ = true;\n }\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.continueUpload_ = function () {\n var _this = this;\n var chunkSize = fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n var status = new fbsRequests.ResumableUploadStatus(this.transferred_, this.blob_.size());\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo;\n try {\n requestInfo = fbsRequests.continueResumableUpload(_this.location_, _this.authWrapper_, url, _this.blob_, chunkSize, _this.mappings_, status, _this.makeProgressCallback_());\n }\n catch (e) {\n _this.error_ = e;\n _this.transition_(InternalTaskState.ERROR);\n return;\n }\n var uploadRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = uploadRequest;\n uploadRequest\n .getPromise()\n .then(function (newStatus) {\n _this.increaseMultiplier_();\n _this.request_ = null;\n _this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n _this.metadata_ = newStatus.metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }\n else {\n _this.completeTransitions_();\n }\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.increaseMultiplier_ = function () {\n var currentSize = fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n };\n UploadTask.prototype.fetchMetadata_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.getMetadata(_this.authWrapper_, _this.location_, _this.mappings_);\n var metadataRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.metadataErrorHandler_);\n });\n };\n UploadTask.prototype.oneShotUpload_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.multipartUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var multipartRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.updateProgress_(_this.blob_.size());\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.updateProgress_ = function (transferred) {\n var old = this.transferred_;\n this.transferred_ = transferred;\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n };\n UploadTask.prototype.transition_ = function (state) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = errors.canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n };\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n };\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n get: function () {\n var externalState = fbsTaskEnums.taskStateFromInternalTaskState(this.state_);\n return new UploadTaskSnapshot(this.transferred_, this.blob_.size(), externalState, this.metadata_, this, this.ref_);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a callback for an event.\n * @param type The type of event to listen for.\n */\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n if (nextOrObserver === void 0) { nextOrObserver = undefined; }\n if (error === void 0) { error = undefined; }\n if (completed === void 0) { completed = undefined; }\n function typeValidator(_p) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw \"Expected one of the event types: [\" + TaskEvent.STATE_CHANGED + \"].\";\n }\n }\n var nextOrObserverMessage = 'Expected a function or an Object with one of ' +\n '`next`, `error`, `complete` properties.';\n var nextValidator = fbsArgs.nullFunctionSpec(true).validator;\n var observerValidator = fbsArgs.looseObjectSpec(null, true).validator;\n function nextOrObserverValidator(p) {\n try {\n nextValidator(p);\n return;\n }\n catch (e) { }\n try {\n observerValidator(p);\n var anyDefined = typeUtils.isJustDef(p['next']) ||\n typeUtils.isJustDef(p['error']) ||\n typeUtils.isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n }\n catch (e) {\n throw nextOrObserverMessage;\n }\n }\n var specs = [\n fbsArgs.stringSpec(typeValidator),\n fbsArgs.looseObjectSpec(nextOrObserverValidator, true),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n fbsArgs.validate('on', specs, arguments);\n var self = this;\n function makeBinder(specs) {\n function binder(nextOrObserver, error, opt_complete) {\n if (specs !== null) {\n fbsArgs.validate('on', specs, arguments);\n }\n var observer = new Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return function () {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n function binderNextOrObserverValidator(p) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n var binderSpecs = [\n fbsArgs.looseObjectSpec(binderNextOrObserverValidator),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n var typeOnly = !(typeUtils.isJustDef(nextOrObserver) ||\n typeUtils.isJustDef(error) ||\n typeUtils.isJustDef(completed));\n if (typeOnly) {\n return makeBinder(binderSpecs);\n }\n else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n };\n /**\n * This object behaves like a Promise, and resolves with its snapshot data\n * when the upload completes.\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\n * @param onRejected The rejection callback.\n */\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(onFulfilled, onRejected);\n };\n /**\n * Equivalent to calling `then(null, onRejected)`.\n */\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\n * Adds the given observer.\n */\n UploadTask.prototype.addObserver_ = function (observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n };\n /**\n * Removes the given observer.\n */\n UploadTask.prototype.removeObserver_ = function (observer) {\n fbsArray.remove(this.observers_, observer);\n };\n UploadTask.prototype.notifyObservers_ = function () {\n var _this = this;\n this.finishPromise_();\n var observers = fbsArray.clone(this.observers_);\n observers.forEach(function (observer) {\n _this.notifyObserver_(observer);\n });\n };\n UploadTask.prototype.finishPromise_ = function () {\n if (this.resolve_ !== null) {\n var triggered = true;\n switch (fbsTaskEnums.taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n fbsAsync(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this.reject_;\n fbsAsync(toCall.bind(null, this.error_))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n };\n UploadTask.prototype.notifyObserver_ = function (observer) {\n var externalState = fbsTaskEnums.taskStateFromInternalTaskState(this.state_);\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n fbsAsync(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n fbsAsync(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_))();\n }\n }\n };\n /**\n * Resumes a paused task. Has no effect on a currently running or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.resume = function () {\n fbsArgs.validate('resume', [], arguments);\n var valid = this.state_ === InternalTaskState.PAUSED ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n };\n /**\n * Pauses a currently running task. Has no effect on a paused or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.pause = function () {\n fbsArgs.validate('pause', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n };\n /**\n * Cancels a currently running or paused task. Has no effect on a complete or\n * failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.cancel = function () {\n fbsArgs.validate('cancel', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n };\n return UploadTask;\n}());\nexport { UploadTask };\n\n//# sourceMappingURL=task.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/task.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines the Firebase Storage Reference class.\n */\nimport * as args from './implementation/args';\nimport { FbsBlob } from './implementation/blob';\nimport * as errorsExports from './implementation/error';\nimport { Location } from './implementation/location';\nimport * as metadata from './implementation/metadata';\nimport * as object from './implementation/object';\nimport * as path from './implementation/path';\nimport * as requests from './implementation/requests';\nimport * as fbsString from './implementation/string';\nimport { StringFormat } from './implementation/string';\nimport * as type from './implementation/type';\nimport { UploadTask } from './task';\n/**\n * Provides methods to interact with a bucket in the Firebase Storage service.\n * @param location An fbs.location, or the URL at\n * which to base this object, in one of the following forms:\n * gs:///\n * http[s]://firebasestorage.googleapis.com/\n * /b//o/\n * Any query or fragment strings will be ignored in the http[s]\n * format. If no value is passed, the storage object will use a URL based on\n * the project ID of the base firebase.App instance.\n */\nvar Reference = /** @class */ (function () {\n function Reference(authWrapper, location) {\n this.authWrapper = authWrapper;\n if (location instanceof Location) {\n this.location = location;\n }\n else {\n this.location = Location.makeFromUrl(location);\n }\n }\n /**\n * @return The URL for the bucket and path this object references,\n * in the form gs:///\n * @override\n */\n Reference.prototype.toString = function () {\n args.validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n };\n Reference.prototype.newRef = function (authWrapper, location) {\n return new Reference(authWrapper, location);\n };\n Reference.prototype.mappings = function () {\n return metadata.getMappings();\n };\n /**\n * @return A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n Reference.prototype.child = function (childPath) {\n args.validate('child', [args.stringSpec()], arguments);\n var newPath = path.child(this.location.path, childPath);\n var location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n };\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\n * @return A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get: function () {\n var newPath = path.parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n var location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\n * @return An reference to the root of this\n * object's bucket.\n */\n get: function () {\n var location = new Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n get: function () {\n return this.location.bucket;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n get: function () {\n return this.location.path;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n get: function () {\n return path.lastComponent(this.location.path);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n get: function () {\n return this.authWrapper.service();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Uploads a blob to this object's location.\n * @param data The blob to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.put = function (data, metadata) {\n if (metadata === void 0) { metadata = null; }\n args.validate('put', [args.uploadDataSpec(), args.metadataSpec(true)], arguments);\n this.throwIfRoot_('put');\n return new UploadTask(this, this.authWrapper, this.location, this.mappings(), new FbsBlob(data), metadata);\n };\n /**\n * Uploads a string to this object's location.\n * @param string The string to upload.\n * @param opt_format The format of the string to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.putString = function (string, format, opt_metadata) {\n if (format === void 0) { format = StringFormat.RAW; }\n args.validate('putString', [\n args.stringSpec(),\n args.stringSpec(fbsString.formatValidator, true),\n args.metadataSpec(true)\n ], arguments);\n this.throwIfRoot_('putString');\n var data = fbsString.dataFromString(format, string);\n var metadata = object.clone(opt_metadata);\n if (!type.isDef(metadata['contentType']) && type.isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new UploadTask(this, this.authWrapper, this.location, this.mappings(), new FbsBlob(data.data, true), metadata);\n };\n /**\n * Deletes the object at this location.\n * @return A promise that resolves if the deletion succeeds.\n */\n Reference.prototype.delete = function () {\n args.validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = requests.deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * A promise that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retreived, the promise is\n * rejected.\n */\n Reference.prototype.getMetadata = function () {\n args.validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = requests.getMetadata(self.authWrapper, self.location, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * Updates the metadata for this object.\n * @param metadata The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @return A promise that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n Reference.prototype.updateMetadata = function (metadata) {\n args.validate('updateMetadata', [args.metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = requests.updateMetadata(self.authWrapper, self.location, metadata, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * @return A promise that resolves with the download\n * URL for this object.\n */\n Reference.prototype.getDownloadURL = function () {\n args.validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function (metadata) {\n var url = metadata['downloadURLs'][0];\n if (type.isDef(url)) {\n return url;\n }\n else {\n throw errorsExports.noDownloadURL();\n }\n });\n };\n Reference.prototype.throwIfRoot_ = function (name) {\n if (this.location.path === '') {\n throw errorsExports.invalidRootOperation(name);\n }\n };\n return Reference;\n}());\nexport { Reference };\n\n//# sourceMappingURL=reference.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/reference.js\n// module id = null\n// module chunks = ","import * as promiseimpl from './promise_external';\n/**\n * A request whose promise always fails.\n * @struct\n * @template T\n */\nvar FailRequest = /** @class */ (function () {\n function FailRequest(error) {\n this.promise_ = promiseimpl.reject(error);\n }\n /** @inheritDoc */\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n FailRequest.prototype.cancel = function (appDelete) {\n if (appDelete === void 0) { appDelete = false; }\n };\n return FailRequest;\n}());\nexport { FailRequest };\n\n//# sourceMappingURL=failrequest.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/failrequest.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as object from './object';\nimport * as constants from './constants';\n/**\n * @struct\n */\nvar RequestMap = /** @class */ (function () {\n function RequestMap() {\n this.map_ = {};\n this.id_ = constants.minSafeInteger;\n }\n /**\n * Registers the given request with this map.\n * The request is unregistered when it completes.\n * @param r The request to register.\n */\n RequestMap.prototype.addRequest = function (r) {\n var id = this.id_;\n this.id_++;\n this.map_[id] = r;\n var self = this;\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n };\n /**\n * Cancels all registered requests.\n */\n RequestMap.prototype.clear = function () {\n object.forEach(this.map_, function (key, val) {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n };\n return RequestMap;\n}());\nexport { RequestMap };\n\n//# sourceMappingURL=requestmap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/requestmap.js\n// module id = null\n// module chunks = ","import * as constants from './constants';\nimport * as errorsExports from './error';\nimport { FailRequest } from './failrequest';\nimport { Location } from './location';\nimport * as promiseimpl from './promise_external';\nimport { RequestMap } from './requestmap';\nimport * as type from './type';\n/**\n * @param app If null, getAuthToken always resolves with null.\n * @param service The storage service associated with this auth wrapper.\n * Untyped to avoid circular type dependencies.\n * @struct\n */\nvar AuthWrapper = /** @class */ (function () {\n function AuthWrapper(app, maker, requestMaker, service, pool) {\n this.bucket_ = null;\n this.deleted_ = false;\n this.app_ = app;\n if (this.app_ !== null) {\n var options = this.app_.options;\n if (type.isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = constants.defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = constants.defaultMaxUploadRetryTime;\n this.requestMap_ = new RequestMap();\n }\n AuthWrapper.extractBucket_ = function (config) {\n var bucketString = config[constants.configOption] || null;\n if (bucketString == null) {\n return null;\n }\n var loc = Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n };\n AuthWrapper.prototype.getAuthToken = function () {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (this.app_ !== null &&\n type.isDef(this.app_.INTERNAL) &&\n type.isDef(this.app_.INTERNAL.getToken)) {\n return this.app_.INTERNAL.getToken().then(function (response) {\n if (response !== null) {\n return response.accessToken;\n }\n else {\n return null;\n }\n }, function (_error) {\n return null;\n });\n }\n else {\n return promiseimpl.resolve(null);\n }\n };\n AuthWrapper.prototype.bucket = function () {\n if (this.deleted_) {\n throw errorsExports.appDeleted();\n }\n else {\n return this.bucket_;\n }\n };\n /**\n * The service associated with this auth wrapper. Untyped to avoid circular\n * type dependencies.\n */\n AuthWrapper.prototype.service = function () {\n return this.service_;\n };\n /**\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\n * at the given Location.\n * @param loc The Location.\n * @return Actually a firebaseStorage.Reference, typing not allowed\n * because of circular dependency problems.\n */\n AuthWrapper.prototype.makeStorageReference = function (loc) {\n return this.storageRefMaker_(this, loc);\n };\n AuthWrapper.prototype.makeRequest = function (requestInfo, authToken) {\n if (!this.deleted_) {\n var request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n }\n else {\n return new FailRequest(errorsExports.appDeleted());\n }\n };\n /**\n * Stop running requests and prevent more from being created.\n */\n AuthWrapper.prototype.deleteApp = function () {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n };\n AuthWrapper.prototype.maxUploadRetryTime = function () {\n return this.maxUploadRetryTime_;\n };\n AuthWrapper.prototype.setMaxUploadRetryTime = function (time) {\n this.maxUploadRetryTime_ = time;\n };\n AuthWrapper.prototype.maxOperationRetryTime = function () {\n return this.maxOperationRetryTime_;\n };\n AuthWrapper.prototype.setMaxOperationRetryTime = function (time) {\n this.maxOperationRetryTime_ = time;\n };\n return AuthWrapper;\n}());\nexport { AuthWrapper };\n\n//# sourceMappingURL=authwrapper.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/authwrapper.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as args from './implementation/args';\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { Location } from './implementation/location';\nimport * as fbsPromiseImpl from './implementation/promise_external';\nimport * as RequestExports from './implementation/request';\nimport { Reference } from './reference';\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n *\n * @struct\n */\nvar Service = /** @class */ (function () {\n function Service(app, pool, url) {\n this.bucket_ = null;\n function maker(authWrapper, loc) {\n return new Reference(authWrapper, loc);\n }\n this.authWrapper_ = new AuthWrapper(app, maker, RequestExports.makeRequest, this, pool);\n this.app_ = app;\n if (url != null) {\n this.bucket_ = Location.makeFromBucketSpec(url);\n }\n else {\n var authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new ServiceInternals(this);\n }\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n Service.prototype.ref = function (path) {\n function validator(path) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n args.validate('ref', [args.stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n var ref = new Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n }\n else {\n return ref;\n }\n };\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n Service.prototype.refFromURL = function (url) {\n function validator(p) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n Location.makeFromUrl(p);\n }\n catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n args.validate('refFromURL', [args.stringSpec(validator, false)], arguments);\n return new Reference(this.authWrapper_, url);\n };\n Object.defineProperty(Service.prototype, \"maxUploadRetryTime\", {\n get: function () {\n return this.authWrapper_.maxUploadRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxUploadRetryTime = function (time) {\n args.validate('setMaxUploadRetryTime', [args.nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxUploadRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"maxOperationRetryTime\", {\n get: function () {\n return this.authWrapper_.maxOperationRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxOperationRetryTime = function (time) {\n args.validate('setMaxOperationRetryTime', [args.nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxOperationRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"app\", {\n get: function () {\n return this.app_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Service.prototype, \"INTERNAL\", {\n get: function () {\n return this.internals_;\n },\n enumerable: true,\n configurable: true\n });\n return Service;\n}());\nexport { Service };\n/**\n * @struct\n */\nvar ServiceInternals = /** @class */ (function () {\n function ServiceInternals(service) {\n this.service_ = service;\n }\n /**\n * Called when the associated app is deleted.\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\n */\n ServiceInternals.prototype.delete = function () {\n this.service_.authWrapper_.deleteApp();\n return fbsPromiseImpl.resolve(undefined);\n };\n return ServiceInternals;\n}());\nexport { ServiceInternals };\n\n//# sourceMappingURL=service.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/service.js\n// module id = null\n// module chunks = "],"sourceRoot":""} \ No newline at end of file diff --git a/lib/firebase/firebase.d.ts b/lib/firebase/firebase.d.ts index f930b2d6..ea723351 100644 --- a/lib/firebase/firebase.d.ts +++ b/lib/firebase/firebase.d.ts @@ -1,437 +1,1614 @@ /** -* Copyright 2017 Google Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ declare namespace firebase { - type CompleteFn = ( ) => undefined ; + type CompleteFn = () => void; interface FirebaseError { - code : string ; - message : string ; - name : string ; - stack ? : string ; + code: string; + message: string; + name: string; + stack?: string; } - interface Observer < V , E > { - complete ( ) : any ; - error (error : E ) : any ; - next (value : V | null ) : any ; + interface Observer { + complete(): any; + error(error: E): any; + next(value: V | null): any; } - class Promise < T > extends Promise_Instance < T > { - static all (values : firebase.Promise < any > [] ) : firebase.Promise < any [] > ; - static reject (error : Error ) : firebase.Promise < any > ; - static resolve < T > (value ? : T ) : firebase.Promise < T > ; - } - class Promise_Instance < T > implements firebase.Thenable < any > { - constructor (resolver : (a : (a : T ) => undefined , b : (a : Error ) => undefined ) => any ) ; - catch (onReject ? : (a : Error ) => any ) : firebase.Thenable < any > ; - then (onResolve ? : (a : T ) => any , onReject ? : (a : Error ) => any ) : firebase.Promise < any > ; - } - - var SDK_VERSION : string ; - - interface Thenable < T > { - catch (onReject ? : (a : Error ) => any ) : any ; - then (onResolve ? : (a : T ) => any , onReject ? : (a : Error ) => any ) : firebase.Thenable < any > ; - } + var SDK_VERSION: string; - type Unsubscribe = ( ) => undefined ; + type Unsubscribe = () => void; interface User extends firebase.UserInfo { - delete ( ) : firebase.Promise < any > ; - emailVerified : boolean ; - getIdToken (forceRefresh ? : boolean ) : firebase.Promise < any > ; - getToken (forceRefresh ? : boolean ) : firebase.Promise < any > ; - isAnonymous : boolean ; - linkAndRetrieveDataWithCredential (credential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - linkWithCredential (credential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - linkWithPhoneNumber (phoneNumber : string , applicationVerifier : firebase.auth.ApplicationVerifier ) : firebase.Promise < any > ; - linkWithPopup (provider : firebase.auth.AuthProvider ) : firebase.Promise < any > ; - linkWithRedirect (provider : firebase.auth.AuthProvider ) : firebase.Promise < any > ; - phoneNumber : string | null ; - providerData : ( firebase.UserInfo | null ) [] ; - reauthenticateAndRetrieveDataWithCredential (credential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - reauthenticateWithCredential (credential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - reauthenticateWithPhoneNumber (phoneNumber : string , applicationVerifier : firebase.auth.ApplicationVerifier ) : firebase.Promise < any > ; - reauthenticateWithPopup (provider : firebase.auth.AuthProvider ) : firebase.Promise < any > ; - reauthenticateWithRedirect (provider : firebase.auth.AuthProvider ) : firebase.Promise < any > ; - refreshToken : string ; - reload ( ) : firebase.Promise < any > ; - sendEmailVerification ( ) : firebase.Promise < any > ; - toJSON ( ) : Object ; - unlink (providerId : string ) : firebase.Promise < any > ; - updateEmail (newEmail : string ) : firebase.Promise < any > ; - updatePassword (newPassword : string ) : firebase.Promise < any > ; - updatePhoneNumber (phoneCredential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - updateProfile (profile : { displayName : string | null , photoURL : string | null } ) : firebase.Promise < any > ; + delete(): Promise; + emailVerified: boolean; + getIdToken(forceRefresh?: boolean): Promise; + getToken(forceRefresh?: boolean): Promise; + isAnonymous: boolean; + linkAndRetrieveDataWithCredential( + credential: firebase.auth.AuthCredential + ): Promise; + linkWithCredential(credential: firebase.auth.AuthCredential): Promise; + linkWithPhoneNumber( + phoneNumber: string, + applicationVerifier: firebase.auth.ApplicationVerifier + ): Promise; + linkWithPopup(provider: firebase.auth.AuthProvider): Promise; + linkWithRedirect(provider: firebase.auth.AuthProvider): Promise; + metadata: firebase.auth.UserMetadata; + phoneNumber: string | null; + providerData: (firebase.UserInfo | null)[]; + reauthenticateAndRetrieveDataWithCredential( + credential: firebase.auth.AuthCredential + ): Promise; + reauthenticateWithCredential( + credential: firebase.auth.AuthCredential + ): Promise; + reauthenticateWithPhoneNumber( + phoneNumber: string, + applicationVerifier: firebase.auth.ApplicationVerifier + ): Promise; + reauthenticateWithPopup(provider: firebase.auth.AuthProvider): Promise; + reauthenticateWithRedirect( + provider: firebase.auth.AuthProvider + ): Promise; + refreshToken: string; + reload(): Promise; + sendEmailVerification( + actionCodeSettings?: firebase.auth.ActionCodeSettings | null + ): Promise; + toJSON(): Object; + unlink(providerId: string): Promise; + updateEmail(newEmail: string): Promise; + updatePassword(newPassword: string): Promise; + updatePhoneNumber( + phoneCredential: firebase.auth.AuthCredential + ): Promise; + updateProfile(profile: { + displayName: string | null; + photoURL: string | null; + }): Promise; } interface UserInfo { - displayName : string | null ; - email : string | null ; - phoneNumber : string | null ; - photoURL : string | null ; - providerId : string ; - uid : string ; + displayName: string | null; + email: string | null; + phoneNumber: string | null; + photoURL: string | null; + providerId: string; + uid: string; } - function app (name ? : string ) : firebase.app.App ; + function app(name?: string): firebase.app.App; - var apps : ( firebase.app.App | null ) [] ; + var apps: (firebase.app.App | null)[]; - function auth (app ? : firebase.app.App ) : firebase.auth.Auth ; + function auth(app?: firebase.app.App): firebase.auth.Auth; - function database (app ? : firebase.app.App ) : firebase.database.Database ; + function database(app?: firebase.app.App): firebase.database.Database; - function initializeApp (options : Object , name ? : string ) : firebase.app.App ; + function initializeApp(options: Object, name?: string): firebase.app.App; - function messaging (app ? : firebase.app.App ) : firebase.messaging.Messaging ; + function messaging(app?: firebase.app.App): firebase.messaging.Messaging; - function storage (app ? : firebase.app.App ) : firebase.storage.Storage ; + function storage(app?: firebase.app.App): firebase.storage.Storage; + + function firestore(app?: firebase.app.App): firebase.firestore.Firestore; } declare namespace firebase.app { interface App { - auth ( ) : firebase.auth.Auth ; - database ( ) : firebase.database.Database ; - delete ( ) : firebase.Promise < any > ; - messaging ( ) : firebase.messaging.Messaging ; - name : string ; - options : Object ; - storage (url ? : string ) : firebase.storage.Storage ; + auth(): firebase.auth.Auth; + database(): firebase.database.Database; + delete(): Promise; + messaging(): firebase.messaging.Messaging; + name: string; + options: Object; + storage(url?: string): firebase.storage.Storage; + firestore(): firebase.firestore.Firestore; } } declare namespace firebase.auth { - interface ActionCodeInfo { - } + interface ActionCodeInfo {} - type AdditionalUserInfo = { profile : Object | null , providerId : string , username ? : string | null } ; + type ActionCodeSettings = { + android?: { + installApp?: boolean; + minimumVersion?: string; + packageName: string; + }; + handleCodeInApp?: boolean; + iOS?: { bundleId: string }; + url: string; + }; + + type AdditionalUserInfo = { + isNewUser: boolean; + profile: Object | null; + providerId: string; + username?: string | null; + }; interface ApplicationVerifier { - type : string ; - verify ( ) : firebase.Promise < any > ; + type: string; + verify(): Promise; } interface Auth { - app : firebase.app.App ; - applyActionCode (code : string ) : firebase.Promise < any > ; - checkActionCode (code : string ) : firebase.Promise < any > ; - confirmPasswordReset (code : string , newPassword : string ) : firebase.Promise < any > ; - createUserWithEmailAndPassword (email : string , password : string ) : firebase.Promise < any > ; - currentUser : firebase.User | null ; - fetchProvidersForEmail (email : string ) : firebase.Promise < any > ; - getRedirectResult ( ) : firebase.Promise < any > ; - onAuthStateChanged (nextOrObserver : firebase.Observer < any , any > | ( (a : firebase.User | null ) => any ) , error ? : (a : firebase.auth.Error ) => any , completed ? : firebase.Unsubscribe ) : firebase.Unsubscribe ; - onIdTokenChanged (nextOrObserver : firebase.Observer < any , any > | ( (a : firebase.User | null ) => any ) , error ? : (a : firebase.auth.Error ) => any , completed ? : firebase.Unsubscribe ) : firebase.Unsubscribe ; - sendPasswordResetEmail (email : string ) : firebase.Promise < any > ; - setPersistence (persistence : firebase.auth.Auth.Persistence ) : firebase.Promise < any > ; - signInAndRetrieveDataWithCredential (credential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - signInAnonymously ( ) : firebase.Promise < any > ; - signInWithCredential (credential : firebase.auth.AuthCredential ) : firebase.Promise < any > ; - signInWithCustomToken (token : string ) : firebase.Promise < any > ; - signInWithEmailAndPassword (email : string , password : string ) : firebase.Promise < any > ; - signInWithPhoneNumber (phoneNumber : string , applicationVerifier : firebase.auth.ApplicationVerifier ) : firebase.Promise < any > ; - signInWithPopup (provider : firebase.auth.AuthProvider ) : firebase.Promise < any > ; - signInWithRedirect (provider : firebase.auth.AuthProvider ) : firebase.Promise < any > ; - signOut ( ) : firebase.Promise < any > ; - verifyPasswordResetCode (code : string ) : firebase.Promise < any > ; + app: firebase.app.App; + applyActionCode(code: string): Promise; + checkActionCode(code: string): Promise; + confirmPasswordReset(code: string, newPassword: string): Promise; + createUserWithEmailAndPassword( + email: string, + password: string + ): Promise; + currentUser: firebase.User | null; + fetchProvidersForEmail(email: string): Promise; + getRedirectResult(): Promise; + languageCode: string | null; + onAuthStateChanged( + nextOrObserver: + | firebase.Observer + | ((a: firebase.User | null) => any), + error?: (a: firebase.auth.Error) => any, + completed?: firebase.Unsubscribe + ): firebase.Unsubscribe; + onIdTokenChanged( + nextOrObserver: + | firebase.Observer + | ((a: firebase.User | null) => any), + error?: (a: firebase.auth.Error) => any, + completed?: firebase.Unsubscribe + ): firebase.Unsubscribe; + sendPasswordResetEmail( + email: string, + actionCodeSettings?: firebase.auth.ActionCodeSettings | null + ): Promise; + setPersistence(persistence: firebase.auth.Auth.Persistence): Promise; + signInAndRetrieveDataWithCredential( + credential: firebase.auth.AuthCredential + ): Promise; + signInAnonymously(): Promise; + signInWithCredential( + credential: firebase.auth.AuthCredential + ): Promise; + signInWithCustomToken(token: string): Promise; + signInWithEmailAndPassword(email: string, password: string): Promise; + signInWithPhoneNumber( + phoneNumber: string, + applicationVerifier: firebase.auth.ApplicationVerifier + ): Promise; + signInWithPopup(provider: firebase.auth.AuthProvider): Promise; + signInWithRedirect(provider: firebase.auth.AuthProvider): Promise; + signOut(): Promise; + useDeviceLanguage(): any; + verifyPasswordResetCode(code: string): Promise; } interface AuthCredential { - providerId : string ; + providerId: string; } interface AuthProvider { - providerId : string ; + providerId: string; } interface ConfirmationResult { - confirm (verificationCode : string ) : firebase.Promise < any > ; - verificationId : string ; + confirm(verificationCode: string): Promise; + verificationId: string; } class EmailAuthProvider extends EmailAuthProvider_Instance { - static PROVIDER_ID : string ; - static credential (email : string , password : string ) : firebase.auth.AuthCredential ; + static PROVIDER_ID: string; + static credential( + email: string, + password: string + ): firebase.auth.AuthCredential; } class EmailAuthProvider_Instance implements firebase.auth.AuthProvider { - providerId : string ; + providerId: string; } interface Error { - code : string ; - message : string ; + code: string; + message: string; } class FacebookAuthProvider extends FacebookAuthProvider_Instance { - static PROVIDER_ID : string ; - static credential (token : string ) : firebase.auth.AuthCredential ; + static PROVIDER_ID: string; + static credential(token: string): firebase.auth.AuthCredential; } class FacebookAuthProvider_Instance implements firebase.auth.AuthProvider { - addScope (scope : string ) : firebase.auth.AuthProvider ; - providerId : string ; - setCustomParameters (customOAuthParameters : Object ) : firebase.auth.AuthProvider ; + addScope(scope: string): firebase.auth.AuthProvider; + providerId: string; + setCustomParameters( + customOAuthParameters: Object + ): firebase.auth.AuthProvider; } class GithubAuthProvider extends GithubAuthProvider_Instance { - static PROVIDER_ID : string ; - static credential (token : string ) : firebase.auth.AuthCredential ; + static PROVIDER_ID: string; + static credential(token: string): firebase.auth.AuthCredential; } class GithubAuthProvider_Instance implements firebase.auth.AuthProvider { - addScope (scope : string ) : firebase.auth.AuthProvider ; - providerId : string ; - setCustomParameters (customOAuthParameters : Object ) : firebase.auth.AuthProvider ; + addScope(scope: string): firebase.auth.AuthProvider; + providerId: string; + setCustomParameters( + customOAuthParameters: Object + ): firebase.auth.AuthProvider; } class GoogleAuthProvider extends GoogleAuthProvider_Instance { - static PROVIDER_ID : string ; - static credential (idToken ? : string | null , accessToken ? : string | null ) : firebase.auth.AuthCredential ; + static PROVIDER_ID: string; + static credential( + idToken?: string | null, + accessToken?: string | null + ): firebase.auth.AuthCredential; } class GoogleAuthProvider_Instance implements firebase.auth.AuthProvider { - addScope (scope : string ) : firebase.auth.AuthProvider ; - providerId : string ; - setCustomParameters (customOAuthParameters : Object ) : firebase.auth.AuthProvider ; + addScope(scope: string): firebase.auth.AuthProvider; + providerId: string; + setCustomParameters( + customOAuthParameters: Object + ): firebase.auth.AuthProvider; } class PhoneAuthProvider extends PhoneAuthProvider_Instance { - static PROVIDER_ID : string ; - static credential (verificationId : string , verificationCode : string ) : firebase.auth.AuthCredential ; + static PROVIDER_ID: string; + static credential( + verificationId: string, + verificationCode: string + ): firebase.auth.AuthCredential; } class PhoneAuthProvider_Instance implements firebase.auth.AuthProvider { - constructor (auth ? : firebase.auth.Auth | null ) ; - providerId : string ; - verifyPhoneNumber (phoneNumber : string , applicationVerifier : firebase.auth.ApplicationVerifier ) : firebase.Promise < any > ; + constructor(auth?: firebase.auth.Auth | null); + providerId: string; + verifyPhoneNumber( + phoneNumber: string, + applicationVerifier: firebase.auth.ApplicationVerifier + ): Promise; } - class RecaptchaVerifier extends RecaptchaVerifier_Instance { - } - class RecaptchaVerifier_Instance implements firebase.auth.ApplicationVerifier { - constructor (container : any | string , parameters ? : Object | null , app ? : firebase.app.App | null ) ; - clear ( ) : any ; - render ( ) : firebase.Promise < any > ; - type : string ; - verify ( ) : firebase.Promise < any > ; + class RecaptchaVerifier extends RecaptchaVerifier_Instance {} + class RecaptchaVerifier_Instance + implements firebase.auth.ApplicationVerifier { + constructor( + container: any | string, + parameters?: Object | null, + app?: firebase.app.App | null + ); + clear(): any; + render(): Promise; + type: string; + verify(): Promise; } class TwitterAuthProvider extends TwitterAuthProvider_Instance { - static PROVIDER_ID : string ; - static credential (token : string , secret : string ) : firebase.auth.AuthCredential ; + static PROVIDER_ID: string; + static credential( + token: string, + secret: string + ): firebase.auth.AuthCredential; } class TwitterAuthProvider_Instance implements firebase.auth.AuthProvider { - providerId : string ; - setCustomParameters (customOAuthParameters : Object ) : firebase.auth.AuthProvider ; + providerId: string; + setCustomParameters( + customOAuthParameters: Object + ): firebase.auth.AuthProvider; } - type UserCredential = { additionalUserInfo ? : firebase.auth.AdditionalUserInfo | null , credential : firebase.auth.AuthCredential | null , operationType ? : string | null , user : firebase.User | null } ; + type UserCredential = { + additionalUserInfo?: firebase.auth.AdditionalUserInfo | null; + credential: firebase.auth.AuthCredential | null; + operationType?: string | null; + user: firebase.User | null; + }; + + interface UserMetadata { + creationTime?: string; + lastSignInTime?: string; + } } declare namespace firebase.auth.Auth { - type Persistence = string ; - var Persistence : { - LOCAL : Persistence , - NONE : Persistence , - SESSION : Persistence , + type Persistence = string; + var Persistence: { + LOCAL: Persistence; + NONE: Persistence; + SESSION: Persistence; }; } declare namespace firebase.database { interface DataSnapshot { - child (path : string ) : firebase.database.DataSnapshot ; - exists ( ) : boolean ; - exportVal ( ) : any ; - forEach (action : (a : firebase.database.DataSnapshot ) => boolean ) : boolean ; - getPriority ( ) : string | number | null ; - hasChild (path : string ) : boolean ; - hasChildren ( ) : boolean ; - key : string | null ; - numChildren ( ) : number ; - ref : firebase.database.Reference ; - toJSON ( ) : Object | null ; - val ( ) : any ; + child(path: string): firebase.database.DataSnapshot; + exists(): boolean; + exportVal(): any; + forEach(action: (a: firebase.database.DataSnapshot) => boolean): boolean; + getPriority(): string | number | null; + hasChild(path: string): boolean; + hasChildren(): boolean; + key: string | null; + numChildren(): number; + ref: firebase.database.Reference; + toJSON(): Object | null; + val(): any; } interface Database { - app : firebase.app.App ; - goOffline ( ) : any ; - goOnline ( ) : any ; - ref (path ? : string ) : firebase.database.Reference ; - refFromURL (url : string ) : firebase.database.Reference ; + app: firebase.app.App; + goOffline(): any; + goOnline(): any; + ref(path?: string): firebase.database.Reference; + refFromURL(url: string): firebase.database.Reference; } interface OnDisconnect { - cancel (onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - remove (onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - set (value : any , onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - setWithPriority (value : any , priority : number | string | null , onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - update (values : Object , onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; + cancel(onComplete?: (a: Error | null) => any): Promise; + remove(onComplete?: (a: Error | null) => any): Promise; + set(value: any, onComplete?: (a: Error | null) => any): Promise; + setWithPriority( + value: any, + priority: number | string | null, + onComplete?: (a: Error | null) => any + ): Promise; + update(values: Object, onComplete?: (a: Error | null) => any): Promise; } interface Query { - endAt (value : number | string | boolean | null , key ? : string ) : firebase.database.Query ; - equalTo (value : number | string | boolean | null , key ? : string ) : firebase.database.Query ; - isEqual (other : firebase.database.Query | null ) : boolean ; - limitToFirst (limit : number ) : firebase.database.Query ; - limitToLast (limit : number ) : firebase.database.Query ; - off (eventType ? : string , callback ? : (a : firebase.database.DataSnapshot , b ? : string | null ) => any , context ? : Object | null ) : any ; - on (eventType : string , callback : (a : firebase.database.DataSnapshot | null , b ? : string ) => any , cancelCallbackOrContext ? : Object | null , context ? : Object | null ) : (a : firebase.database.DataSnapshot | null , b ? : string ) => any ; - once (eventType : string , successCallback ? : (a : firebase.database.DataSnapshot , b ? : string ) => any , failureCallbackOrContext ? : Object | null , context ? : Object | null ) : firebase.Promise < any > ; - orderByChild (path : string ) : firebase.database.Query ; - orderByKey ( ) : firebase.database.Query ; - orderByPriority ( ) : firebase.database.Query ; - orderByValue ( ) : firebase.database.Query ; - ref : firebase.database.Reference ; - startAt (value : number | string | boolean | null , key ? : string ) : firebase.database.Query ; - toJSON ( ) : Object ; - toString ( ) : string ; + endAt( + value: number | string | boolean | null, + key?: string + ): firebase.database.Query; + equalTo( + value: number | string | boolean | null, + key?: string + ): firebase.database.Query; + isEqual(other: firebase.database.Query | null): boolean; + limitToFirst(limit: number): firebase.database.Query; + limitToLast(limit: number): firebase.database.Query; + off( + eventType?: string, + callback?: (a: firebase.database.DataSnapshot, b?: string | null) => any, + context?: Object | null + ): any; + on( + eventType: string, + callback: (a: firebase.database.DataSnapshot | null, b?: string) => any, + cancelCallbackOrContext?: Object | null, + context?: Object | null + ): (a: firebase.database.DataSnapshot | null, b?: string) => any; + once( + eventType: string, + successCallback?: (a: firebase.database.DataSnapshot, b?: string) => any, + failureCallbackOrContext?: Object | null, + context?: Object | null + ): Promise; + orderByChild(path: string): firebase.database.Query; + orderByKey(): firebase.database.Query; + orderByPriority(): firebase.database.Query; + orderByValue(): firebase.database.Query; + ref: firebase.database.Reference; + startAt( + value: number | string | boolean | null, + key?: string + ): firebase.database.Query; + toJSON(): Object; + toString(): string; } interface Reference extends firebase.database.Query { - child (path : string ) : firebase.database.Reference ; - key : string | null ; - onDisconnect ( ) : firebase.database.OnDisconnect ; - parent : firebase.database.Reference | null ; - path : string ; - push (value ? : any , onComplete ? : (a : Error | null ) => any ) : firebase.database.ThenableReference ; - remove (onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - root : firebase.database.Reference ; - set (value : any , onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - setPriority (priority : string | number | null , onComplete : (a : Error | null ) => any ) : firebase.Promise < any > ; - setWithPriority (newVal : any , newPriority : string | number | null , onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; - transaction (transactionUpdate : (a : any ) => any , onComplete ? : (a : Error | null , b : boolean , c : firebase.database.DataSnapshot | null ) => any , applyLocally ? : boolean ) : firebase.Promise < any > ; - update (values : Object , onComplete ? : (a : Error | null ) => any ) : firebase.Promise < any > ; + child(path: string): firebase.database.Reference; + key: string | null; + onDisconnect(): firebase.database.OnDisconnect; + parent: firebase.database.Reference | null; + path: string; + push( + value?: any, + onComplete?: (a: Error | null) => any + ): firebase.database.ThenableReference; + remove(onComplete?: (a: Error | null) => any): Promise; + root: firebase.database.Reference; + set(value: any, onComplete?: (a: Error | null) => any): Promise; + setPriority( + priority: string | number | null, + onComplete: (a: Error | null) => any + ): Promise; + setWithPriority( + newVal: any, + newPriority: string | number | null, + onComplete?: (a: Error | null) => any + ): Promise; + transaction( + transactionUpdate: (a: any) => any, + onComplete?: ( + a: Error | null, + b: boolean, + c: firebase.database.DataSnapshot | null + ) => any, + applyLocally?: boolean + ): Promise; + update(values: Object, onComplete?: (a: Error | null) => any): Promise; } - interface ThenableReference extends firebase.database.Reference , firebase.Thenable < any > { - } + interface ThenableReference + extends firebase.database.Reference, + PromiseLike {} - function enableLogging (logger ? : boolean | ( (a : string ) => any ) , persistent ? : boolean ) : any ; + function enableLogging( + logger?: boolean | ((a: string) => any), + persistent?: boolean + ): any; } declare namespace firebase.database.ServerValue { - var TIMESTAMP : Object ; + var TIMESTAMP: Object; } declare namespace firebase.messaging { interface Messaging { - deleteToken (token : string ) : firebase.Promise < any > | null ; - getToken ( ) : firebase.Promise < any > | null ; - onMessage (nextOrObserver : firebase.Observer < any , any > | ( (a : Object ) => any ) ) : firebase.Unsubscribe ; - onTokenRefresh (nextOrObserver : firebase.Observer < any , any > | ( (a : Object ) => any ) ) : firebase.Unsubscribe ; - requestPermission ( ) : firebase.Promise < any > | null ; - setBackgroundMessageHandler (callback : (a : Object ) => any ) : any ; - useServiceWorker (registration : any ) : any ; + deleteToken(token: string): Promise | null; + getToken(): Promise | null; + onMessage( + nextOrObserver: firebase.Observer | ((a: Object) => any) + ): firebase.Unsubscribe; + onTokenRefresh( + nextOrObserver: firebase.Observer | ((a: Object) => any) + ): firebase.Unsubscribe; + requestPermission(): Promise | null; + setBackgroundMessageHandler(callback: (a: Object) => any): any; + useServiceWorker(registration: any): any; } } declare namespace firebase.storage { interface FullMetadata extends firebase.storage.UploadMetadata { - bucket : string ; - downloadURLs : string [] ; - fullPath : string ; - generation : string ; - metageneration : string ; - name : string ; - size : number ; - timeCreated : string ; - updated : string ; + bucket: string; + downloadURLs: string[]; + fullPath: string; + generation: string; + metageneration: string; + name: string; + size: number; + timeCreated: string; + updated: string; } interface Reference { - bucket : string ; - child (path : string ) : firebase.storage.Reference ; - delete ( ) : firebase.Promise < any > ; - fullPath : string ; - getDownloadURL ( ) : firebase.Promise < any > ; - getMetadata ( ) : firebase.Promise < any > ; - name : string ; - parent : firebase.storage.Reference | null ; - put (data : any | any | any , metadata ? : firebase.storage.UploadMetadata ) : firebase.storage.UploadTask ; - putString (data : string , format ? : firebase.storage.StringFormat , metadata ? : firebase.storage.UploadMetadata ) : firebase.storage.UploadTask ; - root : firebase.storage.Reference ; - storage : firebase.storage.Storage ; - toString ( ) : string ; - updateMetadata (metadata : firebase.storage.SettableMetadata ) : firebase.Promise < any > ; + bucket: string; + child(path: string): firebase.storage.Reference; + delete(): Promise; + fullPath: string; + getDownloadURL(): Promise; + getMetadata(): Promise; + name: string; + parent: firebase.storage.Reference | null; + put( + data: any | any | any, + metadata?: firebase.storage.UploadMetadata + ): firebase.storage.UploadTask; + putString( + data: string, + format?: firebase.storage.StringFormat, + metadata?: firebase.storage.UploadMetadata + ): firebase.storage.UploadTask; + root: firebase.storage.Reference; + storage: firebase.storage.Storage; + toString(): string; + updateMetadata(metadata: firebase.storage.SettableMetadata): Promise; } interface SettableMetadata { - cacheControl ? : string | null ; - contentDisposition ? : string | null ; - contentEncoding ? : string | null ; - contentLanguage ? : string | null ; - contentType ? : string | null ; - customMetadata ? : { [ /* warning: coerced from ? */ key: string ]: string } | null ; + cacheControl?: string | null; + contentDisposition?: string | null; + contentEncoding?: string | null; + contentLanguage?: string | null; + contentType?: string | null; + customMetadata?: { + [/* warning: coerced from ? */ key: string]: string; + } | null; } interface Storage { - app : firebase.app.App ; - maxOperationRetryTime : number ; - maxUploadRetryTime : number ; - ref (path ? : string ) : firebase.storage.Reference ; - refFromURL (url : string ) : firebase.storage.Reference ; - setMaxOperationRetryTime (time : number ) : any ; - setMaxUploadRetryTime (time : number ) : any ; - } - - type StringFormat = string ; - var StringFormat : { - BASE64 : StringFormat , - BASE64URL : StringFormat , - DATA_URL : StringFormat , - RAW : StringFormat , + app: firebase.app.App; + maxOperationRetryTime: number; + maxUploadRetryTime: number; + ref(path?: string): firebase.storage.Reference; + refFromURL(url: string): firebase.storage.Reference; + setMaxOperationRetryTime(time: number): any; + setMaxUploadRetryTime(time: number): any; + } + + type StringFormat = string; + var StringFormat: { + BASE64: StringFormat; + BASE64URL: StringFormat; + DATA_URL: StringFormat; + RAW: StringFormat; }; - type TaskEvent = string ; - var TaskEvent : { - STATE_CHANGED : TaskEvent , + type TaskEvent = string; + var TaskEvent: { + STATE_CHANGED: TaskEvent; }; - type TaskState = string ; - var TaskState : { - CANCELED : TaskState , - ERROR : TaskState , - PAUSED : TaskState , - RUNNING : TaskState , - SUCCESS : TaskState , + type TaskState = string; + var TaskState: { + CANCELED: TaskState; + ERROR: TaskState; + PAUSED: TaskState; + RUNNING: TaskState; + SUCCESS: TaskState; }; interface UploadMetadata extends firebase.storage.SettableMetadata { - md5Hash ? : string | null ; + md5Hash?: string | null; } interface UploadTask { - cancel ( ) : boolean ; - catch (onRejected : (a : Error ) => any ) : firebase.Promise < any > ; - on (event : firebase.storage.TaskEvent , nextOrObserver ? : firebase.Observer < any , any > | null | ( (a : Object ) => any ) , error ? : ( (a : Error ) => any ) | null , complete ? : ( firebase.Unsubscribe ) | null ) : Function ; - pause ( ) : boolean ; - resume ( ) : boolean ; - snapshot : firebase.storage.UploadTaskSnapshot ; - then (onFulfilled ? : ( (a : firebase.storage.UploadTaskSnapshot ) => any ) | null , onRejected ? : ( (a : Error ) => any ) | null ) : firebase.Promise < any > ; + cancel(): boolean; + catch(onRejected: (a: Error) => any): Promise; + on( + event: firebase.storage.TaskEvent, + nextOrObserver?: + | firebase.Observer + | null + | ((a: Object) => any), + error?: ((a: Error) => any) | null, + complete?: (firebase.Unsubscribe) | null + ): Function; + pause(): boolean; + resume(): boolean; + snapshot: firebase.storage.UploadTaskSnapshot; + then( + onFulfilled?: ((a: firebase.storage.UploadTaskSnapshot) => any) | null, + onRejected?: ((a: Error) => any) | null + ): Promise; } interface UploadTaskSnapshot { - bytesTransferred : number ; - downloadURL : string | null ; - metadata : firebase.storage.FullMetadata ; - ref : firebase.storage.Reference ; - state : firebase.storage.TaskState ; - task : firebase.storage.UploadTask ; - totalBytes : number ; + bytesTransferred: number; + downloadURL: string | null; + metadata: firebase.storage.FullMetadata; + ref: firebase.storage.Reference; + state: firebase.storage.TaskState; + task: firebase.storage.UploadTask; + totalBytes: number; } } -declare module 'firebase' { - export = firebase; +declare namespace firebase.firestore { + /** + * Document data (for use with `DocumentReference.set()`) consists of fields + * mapped to values. + */ + export type DocumentData = { [field: string]: any }; + + /** + * Update data (for use with `DocumentReference.update()`) consists of field + * paths (e.g. 'foo' or 'foo.baz') mapped to values. Fields that contain dots + * reference nested fields within the document. + */ + export type UpdateData = { [fieldPath: string]: any }; + + /** Settings used to configure a `Firestore` instance. */ + export interface Settings { + /** The hostname to connect to. */ + host?: string; + /** Whether to use SSL when connecting. */ + ssl?: boolean; + } + + export type LogLevel = 'debug' | 'error' | 'silent'; + + function setLogLevel(logLevel: LogLevel): void; + + /** + * `Firestore` represents a Firestore Database and is the entry point for all + * Firestore operations. + */ + export class Firestore { + private constructor(); + + /** + * Specifies custom settings to be used to configure the `Firestore` + * instance. Must be set before invoking any other methods. + * + * @param settings The settings to use. + */ + settings(settings: Settings): void; + + /** + * Attempts to enable persistent storage, if possible. + * + * Must be called before any other methods (other than settings()). + * + * If this fails, enablePersistence() will reject the promise it returns. + * Note that even after this failure, the firestore instance will remain + * usable, however offline persistence will be disabled. + * + * There are several reasons why this can fail, which can be identified by + * the `code` on the error. + * + * * failed-precondition: The app is already open in another browser tab. + * * unimplemented: The browser is incompatible with the offline + * persistence implementation. + * + * @return A promise that represents successfully enabling persistent + * storage. + */ + enablePersistence(): Promise; + + /** + * Gets a `CollectionReference` instance that refers to the collection at + * the specified path. + * + * @param collectionPath A slash-separated path to a collection. + * @return The `CollectionReference` instance. + */ + collection(collectionPath: string): CollectionReference; + + /** + * Gets a `DocumentReference` instance that refers to the document at the + * specified path. + * + * @param documentPath A slash-separated path to a document. + * @return The `DocumentReference` instance. + */ + doc(documentPath: string): DocumentReference; + + /** + * Executes the given updateFunction and then attempts to commit the + * changes applied within the transaction. If any document read within the + * transaction has changed, the updateFunction will be retried. If it fails + * to commit after 5 attempts, the transaction will fail. + * + * @param updateFunction The function to execute within the transaction + * context. + * @return If the transaction completed successfully or was explicitly + * aborted (by the updateFunction returning a failed Promise), the Promise + * returned by the updateFunction will be returned here. Else if the + * transaction failed, a rejected Promise with the corresponding failure + * error will be returned. + */ + runTransaction( + updateFunction: (transaction: Transaction) => Promise + ): Promise; + + /** + * Creates a write batch, used for performing multiple writes as a single + * atomic operation. + */ + batch(): WriteBatch; + + /** + * The `firebase.app.App` associated with this `Firestore` instance. + */ + app: firebase.app.App; + + INTERNAL: { delete: () => Promise }; + } + + /** + * An immutable object representing a geo point in Firestore. The geo point + * is represented as latitude/longitude pair. + * + * Latitude values are in the range of [-90, 90]. + * Longitude values are in the range of [-180, 180]. + */ + export class GeoPoint { + /** + * Creates a new immutable GeoPoint object with the provided latitude and + * longitude values. + * @param latitude The latitude as number between -90 and 90. + * @param longitude The longitude as number between -180 and 180. + */ + constructor(latitude: number, longitude: number); + + readonly latitude: number; + readonly longitude: number; + } + + /** + * An immutable object representing an array of bytes. + */ + export class Blob { + private constructor(); + + /** + * Creates a new Blob from the given Base64 string, converting it to + * bytes. + */ + static fromBase64String(base64: string): Blob; + + /** + * Creates a new Blob from the given Uint8Array. + */ + static fromUint8Array(array: Uint8Array): Blob; + + /** + * Returns the bytes of this Blob as a Base64-encoded string. + */ + public toBase64(): string; + + /** + * Returns the bytes of this Blob in a new Uint8Array. + */ + public toUint8Array(): Uint8Array; + } + + /** + * A reference to a transaction. + * The `Transaction` object passed to a transaction's updateFunction provides + * the methods to read and write data within the transaction context. See + * `Firestore.runTransaction()`. + */ + export class Transaction { + private constructor(); + + /** + * Reads the document referenced by the provided `DocumentReference.` + * + * @param documentRef A reference to the document to be read. + * @return A DocumentSnapshot for the read data. + */ + get(documentRef: DocumentReference): Promise; + + /** + * Writes to the document referred to by the provided `DocumentReference`. + * If the document does not exist yet, it will be created. If you pass + * `SetOptions`, the provided data can be merged into the existing document. + * + * @param documentRef A reference to the document to be set. + * @param data An object of the fields and values for the document. + * @param options An object to configure the set behavior. + * @return This `Transaction` instance. Used for chaining method calls. + */ + set( + documentRef: DocumentReference, + data: DocumentData, + options?: SetOptions + ): Transaction; + + /** + * Updates fields in the document referred to by the provided + * `DocumentReference`. The update will fail if applied to a document that + * does not exist. + * + * @param documentRef A reference to the document to be updated. + * @param data An object containing the fields and values with which to + * update the document. Fields can contain dots to reference nested fields + * within the document. + * @return This `Transaction` instance. Used for chaining method calls. + */ + update(documentRef: DocumentReference, data: UpdateData): Transaction; + + /** + * Updates fields in the document referred to by the provided + * `DocumentReference`. The update will fail if applied to a document that + * does not exist. + * + * Nested fields can be updated by providing dot-separated field path + * strings or by providing FieldPath objects. + * + * @param documentRef A reference to the document to be updated. + * @param field The first field to update. + * @param value The first value. + * @param moreFieldsAndValues Additional key/value pairs. + * @return A Promise resolved once the data has been successfully written + * to the backend (Note that it won't resolve while you're offline). + */ + update( + documentRef: DocumentReference, + field: string | FieldPath, + value: any, + ...moreFieldsAndValues: any[] + ): Transaction; + + /** + * Deletes the document referred to by the provided `DocumentReference`. + * + * @param documentRef A reference to the document to be deleted. + * @return This `Transaction` instance. Used for chaining method calls. + */ + delete(documentRef: DocumentReference): Transaction; + } + + /** + * A write batch, used to perform multiple writes as a single atomic unit. + * + * A `WriteBatch` object can be acquired by calling `Firestore.batch()`. It + * provides methods for adding writes to the write batch. None of the + * writes will be committed (or visible locally) until `WriteBatch.commit()` + * is called. + * + * Unlike transactions, write batches are persisted offline and therefore are + * preferable when you don't need to condition your writes on read data. + */ + export class WriteBatch { + private constructor(); + + /** + * Writes to the document referred to by the provided `DocumentReference`. + * If the document does not exist yet, it will be created. If you pass + * `SetOptions`, the provided data can be merged into the existing document. + * + * @param documentRef A reference to the document to be set. + * @param data An object of the fields and values for the document. + * @param options An object to configure the set behavior. + * @return This `WriteBatch` instance. Used for chaining method calls. + */ + set( + documentRef: DocumentReference, + data: DocumentData, + options?: SetOptions + ): WriteBatch; + + /** + * Updates fields in the document referred to by the provided + * `DocumentReference`. The update will fail if applied to a document that + * does not exist. + * + * @param documentRef A reference to the document to be updated. + * @param data An object containing the fields and values with which to + * update the document. Fields can contain dots to reference nested fields + * within the document. + * @return This `WriteBatch` instance. Used for chaining method calls. + */ + update(documentRef: DocumentReference, data: UpdateData): WriteBatch; + + /** + * Updates fields in the document referred to by this `DocumentReference`. + * The update will fail if applied to a document that does not exist. + * + * Nested fields can be update by providing dot-separated field path strings + * or by providing FieldPath objects. + * + * @param documentRef A reference to the document to be updated. + * @param field The first field to update. + * @param value The first value. + * @param moreFieldsAndValues Additional key value pairs. + * @return A Promise resolved once the data has been successfully written + * to the backend (Note that it won't resolve while you're offline). + */ + update( + documentRef: DocumentReference, + field: string | FieldPath, + value: any, + ...moreFieldsAndValues: any[] + ): WriteBatch; + + /** + * Deletes the document referred to by the provided `DocumentReference`. + * + * @param documentRef A reference to the document to be deleted. + * @return This `WriteBatch` instance. Used for chaining method calls. + */ + delete(documentRef: DocumentReference): WriteBatch; + + /** + * Commits all of the writes in this write batch as a single atomic unit. + * + * @return A Promise resolved once all of the writes in the batch have been + * successfully written to the backend as an atomic unit. Note that it won't + * resolve while you're offline. + */ + commit(): Promise; + } + + /** + * Options for use with `DocumentReference.onSnapshot()` to control the + * behavior of the snapshot listener. + */ + export interface DocumentListenOptions { + /** + * Raise an event even if only metadata of the document changed. Default is + * false. + */ + readonly includeMetadataChanges?: boolean; + } + + /** + * An options object that configures the behavior of `set()` calls in + * `DocumentReference`, `WriteBatch` and `Transaction`. These calls can be + * configured to perform granular merges instead of overwriting the target + * documents in their entirety by providing a `SetOptions` with `merge: true`. + */ + export interface SetOptions { + /** + * Changes the behavior of a set() call to only replace the values specified + * in its data argument. Fields omitted from the set() call remain + * untouched. + */ + readonly merge?: boolean; + } + + /** + * A `DocumentReference` refers to a document location in a Firestore database + * and can be used to write, read, or listen to the location. The document at + * the referenced location may or may not exist. A `DocumentReference` can + * also be used to create a `CollectionReference` to a subcollection. + */ + export class DocumentReference { + private constructor(); + + /** The identifier of the document within its collection. */ + readonly id: string; + + /** + * The `Firestore` for the Firestore database (useful for performing + * transactions, etc.). + */ + readonly firestore: Firestore; + + /** + * A reference to the Collection to which this DocumentReference belongs. + */ + readonly parent: CollectionReference; + + /** + * A string representing the path of the referenced document (relative + * to the root of the database). + */ + readonly path: string; + + /** + * Gets a `CollectionReference` instance that refers to the collection at + * the specified path. + * + * @param collectionPath A slash-separated path to a collection. + * @return The `CollectionReference` instance. + */ + collection(collectionPath: string): CollectionReference; + + /** + * Returns true if this `DocumentReference` is equal to the provided one. + * + * @param other The `DocumentReference` to compare against. + * @return true if this `DocumentReference` is equal to the provided one. + */ + isEqual(other: DocumentReference): boolean; + + /** + * Writes to the document referred to by this `DocumentReference`. If the + * document does not yet exist, it will be created. If you pass + * `SetOptions`, the provided data can be merged into an existing document. + * + * @param data A map of the fields and values for the document. + * @param options An object to configure the set behavior. + * @return A Promise resolved once the data has been successfully written + * to the backend (Note that it won't resolve while you're offline). + */ + set(data: DocumentData, options?: SetOptions): Promise; + + /** + * Updates fields in the document referred to by this `DocumentReference`. + * The update will fail if applied to a document that does not exist. + * + * @param data An object containing the fields and values with which to + * update the document. Fields can contain dots to reference nested fields + * within the document. + * @return A Promise resolved once the data has been successfully written + * to the backend (Note that it won't resolve while you're offline). + */ + update(data: UpdateData): Promise; + + /** + * Updates fields in the document referred to by this `DocumentReference`. + * The update will fail if applied to a document that does not exist. + * + * Nested fields can be updated by providing dot-separated field path + * strings or by providing FieldPath objects. + * + * @param field The first field to update. + * @param value The first value. + * @param moreFieldsAndValues Additional key value pairs. + * @return A Promise resolved once the data has been successfully written + * to the backend (Note that it won't resolve while you're offline). + */ + update( + field: string | FieldPath, + value: any, + ...moreFieldsAndValues: any[] + ): Promise; + + /** + * Deletes the document referred to by this `DocumentReference`. + * + * @return A Promise resolved once the document has been successfully + * deleted from the backend (Note that it won't resolve while you're + * offline). + */ + delete(): Promise; + + /** + * Reads the document referred to by this `DocumentReference`. + * + * Note: get() attempts to provide up-to-date data when possible by waiting + * for data from the server, but it may return cached data or fail if you + * are offline and the server cannot be reached. + * + * @return A Promise resolved with a DocumentSnapshot containing the + * current document contents. + */ + get(): Promise; + + /** + * Attaches a listener for DocumentSnapshot events. You may either pass + * individual `onNext` and `onError` callbacks or pass a single observer + * object with `next` and `error` callbacks. + * + * NOTE: Although an `onCompletion` callback can be provided, it will + * never be called because the snapshot stream is never-ending. + * + * @param options Options controlling the listen behavior. + * @param onNext A callback to be called every time a new `DocumentSnapshot` + * is available. + * @param onError A callback to be called if the listen fails or is + * cancelled. No further callbacks will occur. + * @param observer A single object containing `next` and `error` callbacks. + * @return An unsubscribe function that can be called to cancel + * the snapshot listener. + */ + onSnapshot(observer: { + next?: (snapshot: DocumentSnapshot) => void; + error?: (error: FirestoreError) => void; + complete?: () => void; + }): () => void; + onSnapshot( + options: DocumentListenOptions, + observer: { + next?: (snapshot: DocumentSnapshot) => void; + error?: (error: Error) => void; + complete?: () => void; + } + ): () => void; + onSnapshot( + onNext: (snapshot: DocumentSnapshot) => void, + onError?: (error: Error) => void, + onCompletion?: () => void + ): () => void; + onSnapshot( + options: DocumentListenOptions, + onNext: (snapshot: DocumentSnapshot) => void, + onError?: (error: Error) => void, + onCompletion?: () => void + ): () => void; + } + + /** Metadata about a snapshot, describing the state of the snapshot. */ + export interface SnapshotMetadata { + /** + * True if the snapshot contains the result of local writes (e.g. set() or + * update() calls) that have not yet been committed to the backend. + * If your listener has opted into metadata updates (via + * `DocumentListenOptions` or `QueryListenOptions`) you will receive another + * snapshot with `hasPendingWrites` equal to false once the writes have been + * committed to the backend. + */ + readonly hasPendingWrites: boolean; + + /** + * True if the snapshot was created from cached data rather than + * guaranteed up-to-date server data. If your listener has opted into + * metadata updates (via `DocumentListenOptions` or `QueryListenOptions`) + * you will receive another snapshot with `fromCache` equal to false once + * the client has received up-to-date data from the backend. + */ + readonly fromCache: boolean; + } + + /** + * A `DocumentSnapshot` contains data read from a document in your Firestore + * database. The data can be extracted with `.data()` or `.get()` to + * get a specific field. + */ + export class DocumentSnapshot { + private constructor(); + + /** True if the document exists. */ + readonly exists: boolean; + /** A `DocumentReference` to the document location. */ + readonly ref: DocumentReference; + /** + * The ID of the document for which this `DocumentSnapshot` contains data. + */ + readonly id: string; + /** + * Metadata about this snapshot, concerning its source and if it has local + * modifications. + */ + readonly metadata: SnapshotMetadata; + + /** + * Retrieves all fields in the document as an Object. + * + * @return An Object containing all fields in the document. + */ + data(): DocumentData; + + /** + * Retrieves the field specified by `fieldPath`. + * + * @param fieldPath The path (e.g. 'foo' or 'foo.bar') to a specific field. + * @return The data at the specified field location or undefined if no such + * field exists in the document. + */ + get(fieldPath: string | FieldPath): any; + } + + /** + * The direction of a `Query.orderBy()` clause is specified as 'desc' or 'asc' + * (descending or ascending). + */ + export type OrderByDirection = 'desc' | 'asc'; + + /** + * Filter conditions in a `Query.where()` clause are specified using the + * strings '<', '<=', '==', '>=', and '>'. + */ + export type WhereFilterOp = '<' | '<=' | '==' | '>=' | '>'; + + /** + * Options for use with `Query.onSnapshot() to control the behavior of the + * snapshot listener. + */ + export interface QueryListenOptions { + /** + * Raise an event even if only metadata changes (i.e. one of the + * `QuerySnapshot.metadata` properties). Default is false. + */ + readonly includeQueryMetadataChanges?: boolean; + + /** + * Raise an event even if only metadata of a document in the query results + * changes (i.e. one of the `DocumentSnapshot.metadata` properties on one of + * the documents). Default is false. + */ + readonly includeDocumentMetadataChanges?: boolean; + } + + /** + * A `Query` refers to a Query which you can read or listen to. You can also + * construct refined `Query` objects by adding filters and ordering. + */ + export class Query { + protected constructor(); + + /** + * The `Firestore` for the Firestore database (useful for performing + * transactions, etc.). + */ + readonly firestore: Firestore; + + /** + * Creates and returns a new Query with the additional filter that documents + * must contain the specified field and the value should satisfy the + * relation constraint provided. + * + * @param fieldPath The path to compare + * @param opStr The operation string (e.g "<", "<=", "==", ">", ">="). + * @param value The value for comparison + * @return The created Query. + */ + where( + fieldPath: string | FieldPath, + opStr: WhereFilterOp, + value: any + ): Query; + + /** + * Creates and returns a new Query that's additionally sorted by the + * specified field, optionally in descending order instead of ascending. + * + * @param fieldPath The field to sort by. + * @param directionStr Optional direction to sort by ('asc' or 'desc'). If + * not specified, order will be ascending. + * @return The created Query. + */ + orderBy( + fieldPath: string | FieldPath, + directionStr?: OrderByDirection + ): Query; + + /** + * Creates and returns a new Query that's additionally limited to only + * return up to the specified number of documents. + * + * @param limit The maximum number of items to return. + * @return The created Query. + */ + limit(limit: number): Query; + + /** + * Creates and returns a new Query that starts at the provided document + * (inclusive). The starting position is relative to the order of the query. + * The document must contain all of the fields provided in the orderBy of + * this query. + * + * @param snapshot The snapshot of the document to start at. + * @return The created Query. + */ + startAt(snapshot: DocumentSnapshot): Query; + + /** + * Creates and returns a new Query that starts at the provided fields + * relative to the order of the query. The order of the field values + * must match the order of the order by clauses of the query. + * + * @param fieldValues The field values to start this query at, in order + * of the query's order by. + * @return The created Query. + */ + startAt(...fieldValues: any[]): Query; + + /** + * Creates and returns a new Query that starts after the provided document + * (exclusive). The starting position is relative to the order of the query. + * The document must contain all of the fields provided in the orderBy of + * this query. + * + * @param snapshot The snapshot of the document to start after. + * @return The created Query. + */ + startAfter(snapshot: DocumentSnapshot): Query; + + /** + * Creates and returns a new Query that starts after the provided fields + * relative to the order of the query. The order of the field values + * must match the order of the order by clauses of the query. + * + * @param fieldValues The field values to start this query after, in order + * of the query's order by. + * @return The created Query. + */ + startAfter(...fieldValues: any[]): Query; + + /** + * Creates and returns a new Query that ends before the provided document + * (exclusive). The end position is relative to the order of the query. The + * document must contain all of the fields provided in the orderBy of this + * query. + * + * @param snapshot The snapshot of the document to end before. + * @return The created Query. + */ + endBefore(snapshot: DocumentSnapshot): Query; + + /** + * Creates and returns a new Query that ends before the provided fields + * relative to the order of the query. The order of the field values + * must match the order of the order by clauses of the query. + * + * @param fieldValues The field values to end this query before, in order + * of the query's order by. + * @return The created Query. + */ + endBefore(...fieldValues: any[]): Query; + + /** + * Creates and returns a new Query that ends at the provided document + * (inclusive). The end position is relative to the order of the query. The + * document must contain all of the fields provided in the orderBy of this + * query. + * + * @param snapshot The snapshot of the document to end at. + * @return The created Query. + */ + endAt(snapshot: DocumentSnapshot): Query; + + /** + * Creates and returns a new Query that ends at the provided fields + * relative to the order of the query. The order of the field values + * must match the order of the order by clauses of the query. + * + * @param fieldValues The field values to end this query at, in order + * of the query's order by. + * @return The created Query. + */ + endAt(...fieldValues: any[]): Query; + + /** + * Returns true if this `Query` is equal to the provided one. + * + * @param other The `Query` to compare against. + * @return true if this `Query` is equal to the provided one. + */ + isEqual(other: Query): boolean; + + /** + * Executes the query and returns the results as a QuerySnapshot. + * + * @return A Promise that will be resolved with the results of the Query. + */ + get(): Promise; + + /** + * Attaches a listener for QuerySnapshot events. You may either pass + * individual `onNext` and `onError` callbacks or pass a single observer + * object with `next` and `error` callbacks. + * + * NOTE: Although an `onCompletion` callback can be provided, it will + * never be called because the snapshot stream is never-ending. + * + * @param options Options controlling the listen behavior. + * @param onNext A callback to be called every time a new `QuerySnapshot` + * is available. + * @param onError A callback to be called if the listen fails or is + * cancelled. No further callbacks will occur. + * @param observer A single object containing `next` and `error` callbacks. + * @return An unsubscribe function that can be called to cancel + * the snapshot listener. + */ + onSnapshot(observer: { + next?: (snapshot: QuerySnapshot) => void; + error?: (error: Error) => void; + complete?: () => void; + }): () => void; + onSnapshot( + options: QueryListenOptions, + observer: { + next?: (snapshot: QuerySnapshot) => void; + error?: (error: Error) => void; + complete?: () => void; + } + ): () => void; + onSnapshot( + onNext: (snapshot: QuerySnapshot) => void, + onError?: (error: Error) => void, + onCompletion?: () => void + ): () => void; + onSnapshot( + options: QueryListenOptions, + onNext: (snapshot: QuerySnapshot) => void, + onError?: (error: Error) => void, + onCompletion?: () => void + ): () => void; + } + + /** + * A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects + * representing the results of a query. The documents can be accessed as an + * array via the `docs` property or enumerated using the `forEach` method. The + * number of documents can be determined via the `empty` and `size` + * properties. + */ + export class QuerySnapshot { + private constructor(); + + /** + * The query on which you called `get` or `onSnapshot` in order to get this + * `QuerySnapshot`. + */ + readonly query: Query; + /** + * Metadata about this snapshot, concerning its source and if it has local + * modifications. + */ + readonly metadata: SnapshotMetadata; + /** + * An array of the documents that changed since the last snapshot. If this + * is the first snapshot, all documents will be in the list as added + * changes. + */ + readonly docChanges: DocumentChange[]; + + /** An array of all the documents in the QuerySnapshot. */ + readonly docs: DocumentSnapshot[]; + + /** The number of documents in the QuerySnapshot. */ + readonly size: number; + + /** True if there are no documents in the QuerySnapshot. */ + readonly empty: boolean; + + /** + * Enumerates all of the documents in the QuerySnapshot. + * + * @param callback A callback to be called with a `DocumentSnapshot` for + * each document in the snapshot. + * @param thisArg The `this` binding for the callback. + */ + forEach(callback: (result: DocumentSnapshot) => void, thisArg?: any): void; + } + + /** + * The type of of a `DocumentChange` may be 'added', 'removed', or 'modified'. + */ + export type DocumentChangeType = 'added' | 'removed' | 'modified'; + + /** + * A `DocumentChange` represents a change to the documents matching a query. + * It contains the document affected and the type of change that occurred. + */ + export interface DocumentChange { + /** The type of change ('added', 'modified', or 'removed'). */ + readonly type: DocumentChangeType; + + /** The document affected by this change. */ + readonly doc: DocumentSnapshot; + + /** + * The index of the changed document in the result set immediately prior to + * this DocumentChange (i.e. supposing that all prior DocumentChange objects + * have been applied). Is -1 for 'added' events. + */ + readonly oldIndex: number; + + /** + * The index of the changed document in the result set immediately after + * this DocumentChange (i.e. supposing that all prior DocumentChange + * objects and the current DocumentChange object have been applied). + * Is -1 for 'removed' events. + */ + readonly newIndex: number; + } + + /** + * A `CollectionReference` object can be used for adding documents, getting + * document references, and querying for documents (using the methods + * inherited from `Query`). + */ + export class CollectionReference extends Query { + private constructor(); + + /** The identifier of the collection. */ + readonly id: string; + + /** + * A reference to the containing Document if this is a subcollection, else + * null. + */ + readonly parent: DocumentReference | null; + + /** + * A string representing the path of the referenced collection (relative + * to the root of the database). + */ + readonly path: string; + + /** + * Get a `DocumentReference` for the document within the collection at the + * specified path. If no path is specified, an automatically-generated + * unique ID will be used for the returned DocumentReference. + * + * @param documentPath A slash-separated path to a document. + * @return The `DocumentReference` instance. + */ + doc(documentPath?: string): DocumentReference; + + /** + * Add a new document to this collection with the specified data, assigning + * it a document ID automatically. + * + * @param data An Object containing the data for the new document. + * @return A Promise resolved with a `DocumentReference` pointing to the + * newly created document after it has been written to the backend. + */ + add(data: DocumentData): Promise; + } + + /** + * Sentinel values that can be used when writing document fields with set() + * or update(). + */ + export class FieldValue { + private constructor(); + + /** + * Returns a sentinel used with set() or update() to include a + * server-generated timestamp in the written data. + */ + static serverTimestamp(): FieldValue; + + /** + * Returns a sentinel for use with update() to mark a field for deletion. + */ + static delete(): FieldValue; + } + + /** + * A FieldPath refers to a field in a document. The path may consist of a + * single field name (referring to a top-level field in the document), or a + * list of field names (referring to a nested field in the document). + */ + export class FieldPath { + /** + * Creates a FieldPath from the provided field names. If more than one field + * name is provided, the path will point to a nested field in a document. + * + * @param fieldNames A list of field names. + */ + constructor(...fieldNames: string[]); + + /** + * Returns a special sentinel FieldPath to refer to the ID of a document. + * It can be used in queries to sort or filter by the document ID. + */ + static documentId(): FieldPath; + } + + /** + * The set of Firestore status codes. The codes are the same at the ones + * exposed by gRPC here: + * https://github.com/grpc/grpc/blob/master/doc/statuscodes.md + * + * Possible values: + * - 'cancelled': The operation was cancelled (typically by the caller). + * - 'unknown': Unknown error or an error from a different error domain. + * - 'invalid-argument': Client specified an invalid argument. Note that this + * differs from 'failed-precondition'. 'invalid-argument' indicates + * arguments that are problematic regardless of the state of the system + * (e.g. an invalid field name). + * - 'deadline-exceeded': Deadline expired before operation could complete. + * For operations that change the state of the system, this error may be + * returned even if the operation has completed successfully. For example, + * a successful response from a server could have been delayed long enough + * for the deadline to expire. + * - 'not-found': Some requested document was not found. + * - 'already-exists': Some document that we attempted to create already + * exists. + * - 'permission-denied': The caller does not have permission to execute the + * specified operation. + * - 'resource-exhausted': Some resource has been exhausted, perhaps a + * per-user quota, or perhaps the entire file system is out of space. + * - 'failed-precondition': Operation was rejected because the system is not + * in a state required for the operation's execution. + * - 'aborted': The operation was aborted, typically due to a concurrency + * issue like transaction aborts, etc. + * - 'out-of-range': Operation was attempted past the valid range. + * - 'unimplemented': Operation is not implemented or not supported/enabled. + * - 'internal': Internal errors. Means some invariants expected by + * underlying system has been broken. If you see one of these errors, + * something is very broken. + * - 'unavailable': The service is currently unavailable. This is most likely + * a transient condition and may be corrected by retrying with a backoff. + * - 'data-loss': Unrecoverable data loss or corruption. + * - 'unauthenticated': The request does not have valid authentication + * credentials for the operation. + */ + export type FirestoreErrorCode = + | 'cancelled' + | 'unknown' + | 'invalid-argument' + | 'deadline-exceeded' + | 'not-found' + | 'already-exists' + | 'permission-denied' + | 'resource-exhausted' + | 'failed-precondition' + | 'aborted' + | 'out-of-range' + | 'unimplemented' + | 'internal' + | 'unavailable' + | 'data-loss' + | 'unauthenticated'; + + /** An error returned by a Firestore operation. */ + // TODO(b/63008957): FirestoreError should extend firebase.FirebaseError + export interface FirestoreError { + code: FirestoreErrorCode; + message: string; + name: string; + stack?: string; + } } + +export = firebase; diff --git a/lib/firebase/firebase.js b/lib/firebase/firebase.js index 31a69da4..529de8e1 100644 --- a/lib/firebase/firebase.js +++ b/lib/firebase/firebase.js @@ -1,326 +1,36 @@ -/*! @license Firebase v4.2.0 -Build: rev-d6b2db4 -Terms: https://firebase.google.com/terms/ - ---- - -typedarray.js -Copyright (c) 2010, Linden Research, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. */ - -var firebase=function(){var e=void 0===e?self:e;return function(t){function n(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var r=e.webpackJsonpFirebase;e.webpackJsonpFirebase=function(e,o,c){for(var s,a,u,f=0,l=[];f"}),n=this.serviceName+": "+n+" ("+o+").";var c=new i(o,n);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(c[s]=t[s]);return c},e}()},,,function(e,t,n){"use strict";function r(e,t){var n=new a(e,t);return n.subscribe.bind(n)}function o(e,t){if("object"!==(void 0===e?"undefined":s(e))||null===e)return!1;for(var n=0,r=t;n1)for(var n=1;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o=0&&(e.x=setTimeout(function(){e.S&&e.S()},t))},r(22),n.setImmediate=setImmediate,n.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=Function(""+e));for(var t=Array(arguments.length-1),n=0;n")&&(a=a.replace(ta,">"));-1!=a.indexOf('"')&&(a=a.replace(ua,"""));-1!=a.indexOf("'")&& -(a=a.replace(va,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(wa,"�"));return a},ra=/&/g,sa=//g,ua=/"/g,va=/'/g,wa=/\x00/g,qa=/[\x00&<>"']/,v=function(a,b){return-1!=a.indexOf(b)},ya=function(a,b){return ab?1:0};var za=function(a,b){b.unshift(a);u.call(this,oa.apply(null,b));b.shift()};t(za,u);za.prototype.name="AssertionError"; -var Aa=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);throw new za(""+e,f||[]);},w=function(a,b,c){a||Aa("",null,b,Array.prototype.slice.call(arguments,2));return a},Ba=function(a,b){throw new za("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ca=function(a,b,c){da(a)||Aa("Expected number but got %s: %s.",[fa(a),a],b,Array.prototype.slice.call(arguments,2));return a},Da=function(a,b,c){m(a)||Aa("Expected string but got %s: %s.",[fa(a), -a],b,Array.prototype.slice.call(arguments,2))},Ea=function(a,b,c){p(a)||Aa("Expected function but got %s: %s.",[fa(a),a],b,Array.prototype.slice.call(arguments,2))};var Ga=function(){this.Rc="";this.$e=Fa};Ga.prototype.mb=!0;Ga.prototype.kb=function(){return this.Rc};Ga.prototype.toString=function(){return"Const{"+this.Rc+"}"};var Ha=function(a){if(a instanceof Ga&&a.constructor===Ga&&a.$e===Fa)return a.Rc;Ba("expected object of type Const, got '"+a+"'");return"type_error:Const"},Fa={},Ia=function(a){var b=new Ga;b.Rc=a;return b};Ia("");var Ka=function(){this.Kc="";this.af=Ja};Ka.prototype.mb=!0;Ka.prototype.kb=function(){return this.Kc};Ka.prototype.toString=function(){return"TrustedResourceUrl{"+this.Kc+"}"}; -var La=function(a){if(a instanceof Ka&&a.constructor===Ka&&a.af===Ja)return a.Kc;Ba("expected object of type TrustedResourceUrl, got '"+a+"' of type "+fa(a));return"type_error:TrustedResourceUrl"},Na=function(a,b){a=Ma(a,b);b=new Ka;b.Kc=a;return b},Ma=function(a,b){var c=Ha(a);if(!Oa.test(c))throw Error("Invalid TrustedResourceUrl format: "+c);return c.replace(Pa,function(a,e){if(!Object.prototype.hasOwnProperty.call(b,e))throw Error('Found marker, "'+e+'", in format string, "'+c+'", but no valid label mapping found in args: '+ -JSON.stringify(b));a=b[e];return a instanceof Ga?Ha(a):encodeURIComponent(String(a))})},Pa=/%{(\w+)}/g,Oa=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank(#|$)/i,Ja={};var Qa=Array.prototype.indexOf?function(a,b,c){w(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(m(a))return m(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:m(a)?a.charAt(b):a[b]},Wa=function(a,b){return 0<=Qa(a,b)},Ya=function(a,b){b=Qa(a,b);var c;(c=0<=b)&&Xa(a,b);return c},Xa=function(a,b){w(null!=a.length);return 1==Array.prototype.splice.call(a,b,1).length},Za=function(a,b){var c=0;Ra(a,function(d,e){b.call(void 0,d,e,a)&&Xa(a,e)&&c++})},$a=function(a){return Array.prototype.concat.apply([],arguments)}, -ab=function(a){var b=a.length;if(0parseFloat(zb)){yb=String(Bb);break a}}yb=zb} -var Cb=yb,pb={},A=function(a){return qb(a,function(){for(var b=0,c=pa(String(Cb)).split("."),d=pa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f>4);64!=g&&(b(f<<4&240|g>>2),64!=l&&b(g<<6&192|l))}},Jb=function(){if(!Fb){Fb={};Gb={};for(var a=0;65>a;a++)Fb[a]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a), -Gb[Fb[a]]=a,62<=a&&(Gb["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(a)]=a)}};var Kb=function(){this.Ia=-1};var Nb=function(a,b){this.Ia=64;this.oc=k.Uint8Array?new Uint8Array(this.Ia):Array(this.Ia);this.Vc=this.nb=0;this.l=[];this.Sf=a;this.we=b;this.tg=k.Int32Array?new Int32Array(64):Array(64);ba(Lb)||(Lb=k.Int32Array?new Int32Array(Mb):Mb);this.reset()},Lb;t(Nb,Kb);for(var Ob=[],Pb=0;63>Pb;Pb++)Ob[Pb]=0;var Qb=$a(128,Ob);Nb.prototype.reset=function(){this.Vc=this.nb=0;this.l=k.Int32Array?new Int32Array(this.we):ab(this.we)}; -var Rb=function(a){var b=a.oc;w(b.length==a.Ia);for(var c=a.tg,d=0,e=0;eb;b++){d=c[b-15]|0;e=c[b-2]|0;e=(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10;var f=(c[b-16]|0)+((d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3)|0;var g=(c[b-7]|0)+e|0;c[b]=f+g|0}d=a.l[0]|0;e=a.l[1]|0;var l=a.l[2]|0,n=a.l[3]|0,C=a.l[4]|0,wb=a.l[5]|0,ec=a.l[6]|0;f=a.l[7]|0;for(b=0;64>b;b++){var mi=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&e^d&l^e&l)|0;g=C&wb^~C&ec;f=f+ -((C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7))|0;g=g+(Lb[b]|0)|0;g=f+(g+(c[b]|0)|0)|0;f=ec;ec=wb;wb=C;C=n+g|0;n=l;l=e;e=d;d=g+mi|0}a.l[0]=a.l[0]+d|0;a.l[1]=a.l[1]+e|0;a.l[2]=a.l[2]+l|0;a.l[3]=a.l[3]+n|0;a.l[4]=a.l[4]+C|0;a.l[5]=a.l[5]+wb|0;a.l[6]=a.l[6]+ec|0;a.l[7]=a.l[7]+f|0}; -Nb.prototype.update=function(a,b){ba(b)||(b=a.length);var c=0,d=this.nb;if(m(a))for(;c=e&&e==(e|0)))throw Error("message must be a byte array");this.oc[d++]=e;d==this.Ia&&(Rb(this),d=0)}else throw Error("message must be string or array");this.nb=d;this.Vc+=b}; -Nb.prototype.digest=function(){var a=[],b=8*this.Vc;56>this.nb?this.update(Qb,56-this.nb):this.update(Qb,this.Ia-(this.nb-56));for(var c=63;56<=c;c--)this.oc[c]=b&255,b/=256;Rb(this);for(c=b=0;c>d&255;return a}; -var Mb=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804, -4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var Tb=function(){Nb.call(this,8,Sb)};t(Tb,Nb);var Sb=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];var Ub=function(){this.Ka=this.Ka;this.Hc=this.Hc};Ub.prototype.Ka=!1;Ub.prototype.isDisposed=function(){return this.Ka};Ub.prototype.ib=function(){if(this.Hc)for(;this.Hc.length;)this.Hc.shift()()};var Vb=!z||9<=Number(Db),Wb=z&&!A("9");!vb||A("528");ub&&A("1.9b")||z&&A("8")||rb&&A("9.5")||vb&&A("528");ub&&!A("8")||z&&A("9");var Xb=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});k.addEventListener("test",ea,b);k.removeEventListener("test",ea,b);return a}();var B=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ua=!1;this.Je=!0};B.prototype.stopPropagation=function(){this.Ua=!0};B.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Je=!1};var Yb=function(a,b){B.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.fa=this.state=null;a&&this.init(a,b)};t(Yb,B); -Yb.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(ub){a:{try{ob(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;null===d?(this.offsetX=vb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=vb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX, -this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.fa=a;a.defaultPrevented&& -this.preventDefault()};Yb.prototype.stopPropagation=function(){Yb.Sc.stopPropagation.call(this);this.fa.stopPropagation?this.fa.stopPropagation():this.fa.cancelBubble=!0};Yb.prototype.preventDefault=function(){Yb.Sc.preventDefault.call(this);var a=this.fa;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Wb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};Yb.prototype.wf=function(){return this.fa};var Zb="closure_listenable_"+(1E6*Math.random()|0),$b=0;var ac=function(a,b,c,d,e){this.listener=a;this.Lc=null;this.src=b;this.type=c;this.capture=!!d;this.uc=e;this.key=++$b;this.yb=this.nc=!1},bc=function(a){a.yb=!0;a.listener=null;a.Lc=null;a.src=null;a.uc=null};var cc=function(a){this.src=a;this.J={};this.hc=0};cc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.J[f];a||(a=this.J[f]=[],this.hc++);var g=dc(a,b,d,e);-1d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e= -b.currentTarget;e;e=e.parentNode)d.push(e);e=a.type;for(var f=d.length-1;!b.Ua&&0<=f;f--)b.currentTarget=d[f],a=vc(d[f],e,!0,b),c=c&&a;for(f=0;!b.Ua&&f>>0),lc=function(a){w(a,"Listener can not be null.");if(p(a))return a;w(a.handleEvent,"An object listener must have handleEvent method.");a[wc]||(a[wc]=function(b){return a.handleEvent(b)}); -return a[wc]};var xc=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;var zc=function(){this.wa="";this.Ze=yc};zc.prototype.mb=!0;zc.prototype.kb=function(){return this.wa};zc.prototype.toString=function(){return"SafeUrl{"+this.wa+"}"}; -var Ac=function(a){if(a instanceof zc&&a.constructor===zc&&a.Ze===yc)return a.wa;Ba("expected object of type SafeUrl, got '"+a+"' of type "+fa(a));return"type_error:SafeUrl"},Bc=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Dc=function(a){if(a instanceof zc)return a;a=a.mb?a.kb():String(a);Bc.test(a)||(a="about:invalid#zClosurez");return Cc(a)},yc={},Cc=function(a){var b=new zc;b.wa=a;return b};Cc("about:blank");var Gc=function(a){var b=[];Ec(new Fc,a,b);return b.join("")},Fc=function(){this.Mc=void 0},Ec=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(ia(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f");f=f.join("")}f=e.createElement(f);g&&(m(g)?f.className=g:ia(g)?f.className=g.join(" "):nd(f,g));2=b.ed&&b.cancel())}this.De?this.De.call(this.je,this):this.Ud=!0;this.jb||Od(this,new Pd)}};Nd.prototype.he=function(a,b){this.dd=!1;Qd(this,a,b)}; -var Qd=function(a,b,c){a.jb=!0;a.ya=c;a.Lb=!b;Rd(a)},Td=function(a){if(a.jb){if(!a.Ud)throw new Sd;a.Ud=!1}};Nd.prototype.callback=function(a){Td(this);Ud(a);Qd(this,!0,a)};var Od=function(a,b){Td(a);Ud(b);Qd(a,!1,b)},Ud=function(a){w(!(a instanceof Nd),"An execution sequence may not be initiated with a blocking Deferred.")},Wd=function(a,b){Vd(a,null,b,void 0)},Vd=function(a,b,c,d){w(!a.$d,"Blocking Deferreds can not be re-used");a.Oc.push([b,c,d]);a.jb&&Rd(a)}; -Nd.prototype.then=function(a,b,c){var d,e,f=new D(function(a,b){d=a;e=b});Vd(this,d,function(a){a instanceof Pd?f.cancel():e(a)});return f.then(a,b,c)};rd(Nd); -var Xd=function(a){return Ta(a.Oc,function(a){return p(a[1])})},Rd=function(a){if(a.Wc&&a.jb&&Xd(a)){var b=a.Wc,c=Yd[b];c&&(k.clearTimeout(c.Mb),delete Yd[b]);a.Wc=0}a.w&&(a.w.ed--,delete a.w);b=a.ya;for(var d=c=!1;a.Oc.length&&!a.dd;){var e=a.Oc.shift(),f=e[0],g=e[1];e=e[2];if(f=a.Lb?g:f)try{var l=f.call(e||a.je,b);ba(l)&&(a.Lb=a.Lb&&(l==b||l instanceof Error),a.ya=b=l);if(sd(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.dd=!0}catch(n){b=n,a.Lb=!0,Xd(a)||(c=!0)}}a.ya=b;d&&(l=r(a.he, -a,!0),d=r(a.he,a,!1),b instanceof Nd?(Vd(b,l,d),b.$d=!0):b.then(l,d));c&&(b=new Zd(b),Yd[b.Mb]=b,a.Wc=b.Mb)},Sd=function(){u.call(this)};t(Sd,u);Sd.prototype.message="Deferred has already fired";Sd.prototype.name="AlreadyCalledError";var Pd=function(){u.call(this)};t(Pd,u);Pd.prototype.message="Deferred was canceled";Pd.prototype.name="CanceledError";var Zd=function(a){this.Mb=k.setTimeout(r(this.pg,this),0);this.$=a}; -Zd.prototype.pg=function(){w(Yd[this.Mb],"Cannot throw an error that is not scheduled.");delete Yd[this.Mb];throw this.$;};var Yd={};var de=function(a){var b={},c=b.document||document,d=La(a),e=document.createElement("SCRIPT"),f={Ke:e,gc:void 0},g=new Nd($d,f),l=null,n=null!=b.timeout?b.timeout:5E3;0=me(this).value)for(p(b)&&(b=b()),a=new ee(a,String(b),this.Be),c&&(a.le=c),c="log:"+a.Rf,(b=k.console)&&b.timeStamp&&b.timeStamp(c),(b=k.msWriteProfilerMark)&&b(c),c=this;c;){var d=c,e=a;if(d.re)for(var f=0;b=d.re[f];f++)b(e);c=c.getParent()}};ge.prototype.info=function(a,b){this.log(je,a,b)};ge.prototype.config=function(a,b){this.log(ke,a,b)}; -var ne={},oe=null,pe=function(a){oe||(oe=new ge(""),ne[""]=oe,oe.Me(ke));var b;if(!(b=ne[a])){b=new ge(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=pe(a.substr(0,c));c.gd||(c.gd={});c.gd[d]=b;b.w=c;ne[a]=b}return b};var G=function(){Ub.call(this);this.ea=new cc(this);this.cf=this;this.Ed=null};t(G,Ub);G.prototype[Zb]=!0;h=G.prototype;h.addEventListener=function(a,b,c,d){kc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){sc(this,a,b,c,d)}; -h.dispatchEvent=function(a){qe(this);var b=this.Ed;if(b){var c=[];for(var d=1;b;b=b.Ed)c.push(b),w(1E3>++d,"infinite loop")}b=this.cf;d=a.type||a;if(m(a))a=new B(a,b);else if(a instanceof B)a.target=a.target||b;else{var e=a;a=new B(d,b);nb(a,e)}e=!0;if(c)for(var f=c.length-1;!a.Ua&&0<=f;f--){var g=a.currentTarget=c[f];e=re(g,d,!0,a)&&e}a.Ua||(g=a.currentTarget=b,e=re(g,d,!0,a)&&e,a.Ua||(e=re(g,d,!1,a)&&e));if(c)for(f=0;!a.Ua&&f2*this.s&&ve(this),!0):!1};var ve=function(a){var b,c;if(a.s!=a.A.length){for(b=c=0;c=d.A.length)throw se;var e=d.A[b++];return a?e:d.ia[e]};return e};var we=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var xe=function(a){if(a.ga&&"function"==typeof a.ga)return a.ga();if(m(a))return a.split("");if(ja(a)){for(var b=[],c=a.length,d=0;db)throw Error("Bad port number "+b);a.rb=b}else a.rb=null},We=function(a,b,c){J(a);a.Da=c?Ye(b,!0):b},Xe=function(a,b,c){J(a);b instanceof Ze?(a.ca=b,a.ca.Rd(a.ba)):(c||(b=$e(b,ef)),a.ca=new Ze(b,0,a.ba))},K=function(a,b,c){J(a);a.ca.set(b,c)},ff=function(a,b){return a.ca.get(b)}; -Se.prototype.removeParameter=function(a){J(this);this.ca.remove(a);return this};var J=function(a){if(a.Mf)throw Error("Tried to modify a read-only Uri");};Se.prototype.Rd=function(a){this.ba=a;this.ca&&this.ca.Rd(a);return this}; -var gf=function(a){return a instanceof Se?a.clone():new Se(a,void 0)},hf=function(a,b){var c=new Se(null,void 0);Te(c,"https");a&&Ue(c,a);b&&We(c,b);return c},Ye=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},$e=function(a,b,c){return m(a)?(a=encodeURI(a).replace(b,jf),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},jf=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},af=/[#\/\?@]/g,cf=/[\#\?:]/g,bf=/[\#\?]/g,ef=/[\#\?@]/g, -df=/#/g,Ze=function(a,b,c){this.s=this.m=null;this.T=a||null;this.ba=!!c},kf=function(a){a.m||(a.m=new ue,a.s=0,a.T&&De(a.T,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))},mf=function(a){var b=ye(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new Ze(null,0,void 0);a=xe(a);for(var d=0;da?!1:!z||!Db||9',Da(Ha(a),"must provide justification"), -w(!/^[\s\xa0]*$/.test(Ha(a)),"must provide non-empty justification"),g.document.write(jd((new id).If(d))),g.document.close())):g=a.open(Ac(b),c,g);if(g)try{g.focus()}catch(l){}return g},wf=function(a){return new D(function(b){var c=function(){Be(2E3).then(function(){if(!a||a.closed)b();else return c()})};return c()})},xf=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,yf=function(){var a=null;return(new D(function(b){"complete"==k.document.readyState?b():(a=function(){b()},jc(window,"load",a))})).f(function(b){sc(window, -"load",a);throw b;})},Af=function(){return zf(void 0)?yf().then(function(){return new D(function(a,b){var c=k.document,d=setTimeout(function(){b(Error("Cordova framework is not ready."))},1E3);c.addEventListener("deviceready",function(){clearTimeout(d);a()},!1)})}):F(Error("Cordova must run in an Android or iOS file scheme."))},zf=function(a){a=a||L();return!("file:"!==Bf()||!a.toLowerCase().match(/iphone|ipad|ipod|android/))},Cf=function(){var a=k.window;try{return!(!a||a==a.top)}catch(b){return!1}}, -Df=function(){return firebase.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":firebase.INTERNAL.hasOwnProperty("node")?"Node":"Browser"},Ef=function(){var a=Df();return"ReactNative"===a||"Node"===a},rf=function(a){var b=a.toLowerCase();if(v(b,"opera/")||v(b,"opr/")||v(b,"opios/"))return"Opera";if(v(b,"iemobile"))return"IEMobile";if(v(b,"msie")||v(b,"trident/"))return"IE";if(v(b,"edge/"))return"Edge";if(v(b,"firefox/"))return"Firefox";if(v(b,"silk/"))return"Silk";if(v(b,"blackberry"))return"Blackberry"; -if(v(b,"webos"))return"Webos";if(!v(b,"safari/")||v(b,"chrome/")||v(b,"crios/")||v(b,"android"))if(!v(b,"chrome/")&&!v(b,"crios/")||v(b,"edge/")){if(v(b,"android"))return"Android";if((a=a.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==a.length)return a[1]}else return"Chrome";else return"Safari";return"Other"},Ff=function(a){var b=Df();return("Browser"===b?rf(L()):b)+"/JsCore/"+a},L=function(){return k.navigator&&k.navigator.userAgent||""},M=function(a,b){a=a.split(".");b=b||k;for(var c=0;cb)throw Error("Short delay should be less than long delay!");this.lg=a;this.Qf=b;a=c||L();d=d||Df();this.Lf=tf(a)||"ReactNative"===d};Rf.prototype.get=function(){return this.Lf?this.Qf:this.lg}; -var Sf=function(){var a=k.document;return a&&"undefined"!==typeof a.visibilityState?"visible"==a.visibilityState:!0},Tf=function(){var a=k.document,b=null;return Sf()||!a?E():(new D(function(c){b=function(){Sf()&&(a.removeEventListener("visibilitychange",b,!1),c())};a.addEventListener("visibilitychange",b,!1)})).f(function(c){a.removeEventListener("visibilitychange",b,!1);throw c;})};var Uf={};var Vf;try{var Wf={};Object.defineProperty(Wf,"abcd",{configurable:!0,enumerable:!0,value:1});Object.defineProperty(Wf,"abcd",{configurable:!0,enumerable:!0,value:2});Vf=2==Wf.abcd}catch(a){Vf=!1} -var N=function(a,b,c){Vf?Object.defineProperty(a,b,{configurable:!0,enumerable:!0,value:c}):a[b]=c},Xf=function(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&N(a,c,b[c])},Yf=function(a){var b={};Xf(b,a);return b},Zf=function(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},$f=function(a,b){if(!b||!b.length)return!0;if(!a)return!1;for(var c=0;c Auth section -> Sign in method tab.",a):"http"==d||"https"==d?c=oa("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",a):b= -"operation-not-supported-in-this-environment";O.call(this,b,c)};t(jg,O);var kg=function(a){this.Pf=a.sub;na();this.Ib=a.email||null;this.Zf=a.provider_id||null;this.ef=!!a.is_anonymous||"anonymous"==this.Zf};kg.prototype.getEmail=function(){return this.Ib};kg.prototype.isAnonymous=function(){return this.ef};var lg=function(a,b){return a.then(function(a){if(a.idToken){a:{var c=a.idToken.split(".");if(3==c.length){c=c[1];for(var e=(4-c.length%4)%4,f=0;fa.Yd&&(a.Qa=a.Yd);return b},Fi=function(a,b){a.stop();a.qb=Be(Gi(a,b)).then(function(){return a.eg?E():Tf()}).then(function(){return a.Wf()}).then(function(){Fi(a,!0)}).f(function(b){a.dg(b)&&Fi(a,!1)})};Ei.prototype.stop=function(){this.qb&&(this.qb.cancel(),this.qb=null)};var Mi=function(a){var b={};b["facebook.com"]=Hi;b["google.com"]=Ii;b["github.com"]=Ji;b["twitter.com"]=Ki;var c=a&&a.providerId;return c?b[c]?new b[c](a):new Li(a):null},Li=function(a){var b=Nf(a.rawUserInfo||"{}");a=a.providerId;if(!a)throw Error("Invalid additional user info!");N(this,"profile",ag(b||{}));N(this,"providerId",a)},Hi=function(a){Li.call(this,a);if("facebook.com"!=this.providerId)throw Error("Invalid provider id!");};t(Hi,Li); -var Ji=function(a){Li.call(this,a);if("github.com"!=this.providerId)throw Error("Invalid provider id!");N(this,"username",this.profile&&this.profile.login||null)};t(Ji,Li);var Ii=function(a){Li.call(this,a);if("google.com"!=this.providerId)throw Error("Invalid provider id!");};t(Ii,Li);var Ki=function(a){Li.call(this,a);if("twitter.com"!=this.providerId)throw Error("Invalid provider id!");N(this,"username",a.screenName||null)};t(Ki,Li);var Ni={zg:"local",NONE:"none",Ag:"session"},Oi=function(a){var b=new O("invalid-persistence-type"),c=new O("unsupported-persistence-type");a:{for(d in Ni)if(Ni[d]==a){var d=!0;break a}d=!1}if(!d||"string"!==typeof a)throw b;switch(Df()){case "ReactNative":if("session"===a)throw c;break;case "Node":if("none"!==a)throw c;break;default:if(!Hf()&&"none"!==a)throw c;}},Pi=function(a,b,c,d){this.Ce=a;this.Pd=b;this.fg=c;this.ac=d;this.V={};yi||(yi=new xi);a=yi;try{if(nf()){oi||(oi=new ni("firebaseLocalStorageDb", -"firebaseLocalStorage","fbase_key","value",1));var e=oi}else e=new a.ke.B;this.He=e}catch(f){this.He=new gi,this.ac=!0}try{this.Re=new a.ke.Xd}catch(f){this.Re=new gi}this.Ff=new gi;this.Wd=r(this.Pe,this);this.W={}},Qi,Ri=function(){Qi||(Qi=new Pi("firebase",":",!Of(L())&&Cf()?!0:!1,Kf()));return Qi},Si=function(a,b){switch(b){case "session":return a.Re;case "none":return a.Ff;default:return a.He}};h=Pi.prototype;h.aa=function(a,b){return this.Ce+this.Pd+a.name+(b?this.Pd+b:"")}; -h.get=function(a,b){return Si(this,a.B).get(this.aa(a,b))};h.remove=function(a,b){b=this.aa(a,b);"local"!=a.B||this.ac||(this.W[b]=null);return Si(this,a.B).remove(b)};h.set=function(a,b,c){var d=this.aa(a,c),e=this,f=Si(this,a.B);return f.set(d,b).then(function(){return f.get(d)}).then(function(b){"local"!=a.B||this.ac||(e.W[d]=b)})};h.addListener=function(a,b,c){a=this.aa(a,b);this.ac||(this.W[a]=k.localStorage.getItem(a));jb(this.V)&&this.Vd();this.V[a]||(this.V[a]=[]);this.V[a].push(c)}; -h.removeListener=function(a,b,c){a=this.aa(a,b);this.V[a]&&(Za(this.V[a],function(a){return a==c}),0==this.V[a].length&&delete this.V[a]);jb(this.V)&&this.Qc()};h.Vd=function(){Si(this,"local").gb(this.Wd);this.ac||nf()||Ti(this)};var Ti=function(a){Ui(a);a.zd=setInterval(function(){for(var b in a.V){var c=k.localStorage.getItem(b),d=a.W[b];c!=d&&(a.W[b]=c,c=new Yb({type:"storage",key:b,target:window,oldValue:d,newValue:c,Gd:!0}),a.Pe(c))}},1E3)},Ui=function(a){a.zd&&(clearInterval(a.zd),a.zd=null)}; -Pi.prototype.Qc=function(){Si(this,"local").Xa(this.Wd);Ui(this)}; -Pi.prototype.Pe=function(a){if(a&&a.wf){var b=a.fa.key;if(0==b.indexOf(this.Ce+this.Pd)&&this.V[b]){"undefined"!==typeof a.fa.Gd?Si(this,"local").Xa(this.Wd):Ui(this);if(this.fg){var c=k.localStorage.getItem(b),d=a.fa.newValue;if(d!==c)null!==d?k.localStorage.setItem(b,d):k.localStorage.removeItem(b);else if(this.W[b]===d&&"undefined"===typeof a.fa.Gd)return}if("undefined"!==typeof a.fa.Gd||this.W[b]!==k.localStorage.getItem(b))this.W[b]=k.localStorage.getItem(b),this.ce(b)}}else x(a,r(this.ce,this))}; -Pi.prototype.ce=function(a){this.V[a]&&x(this.V[a],function(a){a()})};var Vi=function(a,b){this.j=a;this.h=b||Ri()},Wi={name:"authEvent",B:"local"},Xi=function(a){return a.h.get(Wi,a.j).then(function(a){return ig(a)})};Vi.prototype.fb=function(a){this.h.addListener(Wi,this.j,a)};Vi.prototype.$b=function(a){this.h.removeListener(Wi,this.j,a)};var Yi=function(a){this.h=a||Ri()},Zi={name:"sessionId",B:"session"};Yi.prototype.sc=function(a){return this.h.get(Zi,a)};var $i=function(a,b,c,d,e,f){this.C=a;this.o=b;this.u=c;this.Ja=d||null;this.Qe=b+":"+c;this.gg=new Yi;this.oe=new Vi(this.Qe);this.ud=null;this.sa=[];this.Kf=e||500;this.$f=f||2E3;this.Nb=this.Ic=null},aj=function(a){return new O("invalid-cordova-configuration",a)}; -$i.prototype.Pa=function(){return this.Pb?this.Pb:this.Pb=Af().then(function(){if("function"!==typeof M("universalLinks.subscribe",k))throw aj("cordova-universal-links-plugin is not installed");if("undefined"===typeof M("BuildInfo.packageName",k))throw aj("cordova-plugin-buildinfo is not installed");if("function"!==typeof M("cordova.plugins.browsertab.openUrl",k))throw aj("cordova-plugin-browsertab is not installed");if("function"!==typeof M("cordova.InAppBrowser.open",k))throw aj("cordova-plugin-inappbrowser is not installed"); -},function(){throw new O("cordova-not-ready");})};var bj=function(){for(var a=20,b=[];0this.La-3E4?this.da?Ej(this,{grant_type:"refresh_token",refresh_token:this.da}):E(null):E({accessToken:this.Ga,expirationTime:this.La,refreshToken:this.da})};var Fj=function(a,b,c,d,e,f){Xf(this,{uid:a,displayName:d||null,photoURL:e||null,email:c||null,phoneNumber:f||null,providerId:b})},Gj=function(a,b){B.call(this,a);for(var c in b)this[c]=b[c]};t(Gj,B); -var S=function(a,b,c){this.K=[];this.o=a.apiKey;this.u=a.appName;this.C=a.authDomain||null;a=firebase.SDK_VERSION?Ff(firebase.SDK_VERSION):null;this.g=new R(this.o,null,a);this.qa=new Bj(this.g);Hj(this,b.idToken);Dj(this.qa,b);N(this,"refreshToken",this.qa.da);Ij(this,c||{});G.call(this);this.Jc=!1;this.C&&Jf()&&(this.v=wj(this.C,this.o,this.u));this.Pc=[];this.ra=null;this.sb=Jj(this);this.Cb=r(this.rd,this);var d=this;this.ha=null;this.Ee=function(a){d.bc(a.Nf)};this.xd=null};t(S,G); -S.prototype.bc=function(a){this.ha=a;Vg(this.g,a)};var Kj=function(a,b){a.xd&&sc(a.xd,"languageCodeChanged",a.Ee);(a.xd=b)&&kc(b,"languageCodeChanged",a.Ee)};S.prototype.rd=function(){this.sb.qb&&(this.sb.stop(),this.sb.start())}; -var Lj=function(a){try{return firebase.app(a.u).auth()}catch(b){throw new O("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+a.u+"'!");}},Jj=function(a){return new Ei(function(){return a.getIdToken(!0)},function(a){return a&&"auth/network-request-failed"==a.code?!0:!1},function(){var b=a.qa.La-na()-3E5;return 0this.Ma&&(this.Ma=0);0==this.Ma&&U(this)&&Nj(U(this));this.removeAuthTokenListener(a)};h.addAuthTokenListener=function(a){var b=this;this.Ha.push(a);this.c(this.xa.then(function(){b.Ba||Wa(b.Ha,a)&&a(Ik(b))}))};h.removeAuthTokenListener=function(a){Za(this.Ha,function(b){return b==a})};var Hk=function(a,b){a.Bb.push(b);a.c(a.xa.then(function(){!a.Ba&&Wa(a.Bb,b)&&a.jc!==a.getUid()&&(a.jc=a.getUid(),b(Ik(a)))}))};h=T.prototype; -h["delete"]=function(){this.Ba=!0;for(var a=0;al||l>=Jk.length)throw new O("internal-error","Argument validator received an unsupported number of arguments.");e=Jk[l]+" argument "+(e.name?'"'+e.name+'" ':"")+"must be "+e.R+".";break a}e=null}}if(e)throw new O("argument-error",d+" failed: "+e);return b.apply(this,a)};for(var e in b)a[e]=b[e];for(e in b.prototype)a.prototype[e]= -b.prototype[e];return a},Uk=function(a){a=a.split(".");return a[a.length-1]};Y(T.prototype,{applyActionCode:{name:"applyActionCode",a:[V("code")]},checkActionCode:{name:"checkActionCode",a:[V("code")]},confirmPasswordReset:{name:"confirmPasswordReset",a:[V("code"),V("newPassword")]},createUserWithEmailAndPassword:{name:"createUserWithEmailAndPassword",a:[V("email"),V("password")]},fetchProvidersForEmail:{name:"fetchProvidersForEmail",a:[V("email")]},getRedirectResult:{name:"getRedirectResult",a:[]},onAuthStateChanged:{name:"onAuthStateChanged",a:[X(W(),Lk(),"nextOrObserver"), -Lk("opt_error",!0),Lk("opt_completed",!0)]},onIdTokenChanged:{name:"onIdTokenChanged",a:[X(W(),Lk(),"nextOrObserver"),Lk("opt_error",!0),Lk("opt_completed",!0)]},sendPasswordResetEmail:{name:"sendPasswordResetEmail",a:[V("email"),X(W("opt_actionCodeSettings",!0),Mk(null,!0),"opt_actionCodeSettings",!0)]},Sd:{name:"setPersistence",a:[V("persistence")]},signInAndRetrieveDataWithCredential:{name:"signInAndRetrieveDataWithCredential",a:[Qk()]},signInAnonymously:{name:"signInAnonymously",a:[]},signInWithCredential:{name:"signInWithCredential", -a:[Qk()]},signInWithCustomToken:{name:"signInWithCustomToken",a:[V("token")]},signInWithEmailAndPassword:{name:"signInWithEmailAndPassword",a:[V("email"),V("password")]},signInWithPhoneNumber:{name:"signInWithPhoneNumber",a:[V("phoneNumber"),Sk()]},signInWithPopup:{name:"signInWithPopup",a:[Rk()]},signInWithRedirect:{name:"signInWithRedirect",a:[Rk()]},signOut:{name:"signOut",a:[]},toJSON:{name:"toJSON",a:[V(null,!0)]},verifyPasswordResetCode:{name:"verifyPasswordResetCode",a:[V("code")]}}); -T.Persistence=Ni;T.Persistence.LOCAL="local";T.Persistence.SESSION="session";T.Persistence.NONE="none"; -Y(S.prototype,{"delete":{name:"delete",a:[]},getIdToken:{name:"getIdToken",a:[Kk()]},getToken:{name:"getToken",a:[Kk()]},linkAndRetrieveDataWithCredential:{name:"linkAndRetrieveDataWithCredential",a:[Qk()]},linkWithCredential:{name:"linkWithCredential",a:[Qk()]},linkWithPhoneNumber:{name:"linkWithPhoneNumber",a:[V("phoneNumber"),Sk()]},linkWithPopup:{name:"linkWithPopup",a:[Rk()]},linkWithRedirect:{name:"linkWithRedirect",a:[Rk()]},reauthenticateAndRetrieveDataWithCredential:{name:"reauthenticateAndRetrieveDataWithCredential", -a:[Qk()]},reauthenticateWithCredential:{name:"reauthenticateWithCredential",a:[Qk()]},reauthenticateWithPhoneNumber:{name:"reauthenticateWithPhoneNumber",a:[V("phoneNumber"),Sk()]},reauthenticateWithPopup:{name:"reauthenticateWithPopup",a:[Rk()]},reauthenticateWithRedirect:{name:"reauthenticateWithRedirect",a:[Rk()]},reload:{name:"reload",a:[]},sendEmailVerification:{name:"sendEmailVerification",a:[X(W("opt_actionCodeSettings",!0),Mk(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",a:[V(null, -!0)]},unlink:{name:"unlink",a:[V("provider")]},updateEmail:{name:"updateEmail",a:[V("email")]},updatePassword:{name:"updatePassword",a:[V("password")]},updatePhoneNumber:{name:"updatePhoneNumber",a:[Qk("phone")]},updateProfile:{name:"updateProfile",a:[W("profile")]}});Y(D.prototype,{f:{name:"catch"},then:{name:"then"}});Y(Bi.prototype,{confirm:{name:"confirm",a:[V("verificationCode")]}});Z(Dg,"credential",function(a,b){return new Ag(a,b)},[V("email"),V("password")]); -Y(sg.prototype,{addScope:{name:"addScope",a:[V("scope")]},setCustomParameters:{name:"setCustomParameters",a:[W("customOAuthParameters")]}});Z(sg,"credential",tg,[X(V(),W(),"token")]);Y(ug.prototype,{addScope:{name:"addScope",a:[V("scope")]},setCustomParameters:{name:"setCustomParameters",a:[W("customOAuthParameters")]}});Z(ug,"credential",vg,[X(V(),W(),"token")]);Y(wg.prototype,{addScope:{name:"addScope",a:[V("scope")]},setCustomParameters:{name:"setCustomParameters",a:[W("customOAuthParameters")]}}); -Z(wg,"credential",xg,[X(V(),X(W(),Mk()),"idToken"),X(V(),Mk(),"accessToken",!0)]);Y(yg.prototype,{setCustomParameters:{name:"setCustomParameters",a:[W("customOAuthParameters")]}});Z(yg,"credential",zg,[X(V(),W(),"token"),V("secret",!0)]);Y(P.prototype,{addScope:{name:"addScope",a:[V("scope")]},credential:{name:"credential",a:[X(V(),Mk(),"idToken",!0),X(V(),Mk(),"accessToken",!0)]},setCustomParameters:{name:"setCustomParameters",a:[W("customOAuthParameters")]}}); -Z(Ig,"credential",Kg,[V("verificationId"),V("verificationCode")]);Y(Ig.prototype,{verifyPhoneNumber:{name:"verifyPhoneNumber",a:[V("phoneNumber"),Sk()]}});Y(O.prototype,{toJSON:{name:"toJSON",a:[V(null,!0)]}});Y(Ng.prototype,{toJSON:{name:"toJSON",a:[V(null,!0)]}});Y(jg.prototype,{toJSON:{name:"toJSON",a:[V(null,!0)]}});Y(Yh.prototype,{clear:{name:"clear",a:[]},render:{name:"render",a:[]},verify:{name:"verify",a:[]}}); -(function(){if("undefined"!==typeof firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService){var a={Auth:T,Error:O};Z(a,"EmailAuthProvider",Dg,[]);Z(a,"FacebookAuthProvider",sg,[]);Z(a,"GithubAuthProvider",ug,[]);Z(a,"GoogleAuthProvider",wg,[]);Z(a,"TwitterAuthProvider",yg,[]);Z(a,"OAuthProvider",P,[V("providerId")]);Z(a,"PhoneAuthProvider",Ig,[Ok()]);Z(a,"RecaptchaVerifier",Yh,[X(V(),Nk(),"recaptchaContainer"),W("recaptchaParameters",!0),Pk()]);firebase.INTERNAL.registerService("auth",function(a, -c){a=new T(a);c({INTERNAL:{getUid:r(a.getUid,a),getToken:r(a.xf,a),addAuthTokenListener:r(a.df,a),removeAuthTokenListener:r(a.ag,a)}});return a},a,function(a,c){if("create"===a)try{c.auth()}catch(d){}});firebase.INTERNAL.extendNamespace({User:S})}else throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");})();}).call(this); - -try{webpackJsonpFirebase([0],[function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o});var r=n(7),i=function(t,e){if(!t)throw o(e)},o=function(t){return Error("Firebase Database ("+r.a.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),i=function(t){for(var e=[],n=0,r=0;r255;)e[n++]=255&i,i>>=8;e[n++]=i}return e},o=function(t){if(t.length<8192)return String.fromCharCode.apply(null,t);for(var e="",n=0;n>2,l=(3&o)<<4|a>>4,p=(15&a)<<2|c>>6,d=63&c;u||(d=64,s||(p=64)),r.push(n[h],n[l],n[p],n[d])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(i(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):o(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.N();for(var n=e?this.T:this.O,r=[],i=0;i>4;if(r.push(p),64!=c){var d=a<<4&240|c>>2;if(r.push(d),64!=l){var f=c<<6&192|l;r.push(f)}}}return r},N:function(){if(!this._){this._={},this.O={},this.S={},this.T={};for(var t=0;t=this.ENCODED_VALS_BASE.length&&(this.O[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.T[this.ENCODED_VALS.charAt(t)]=t)}}},a=function(){function t(){this.blockSize=-1}return t}(),u=this&&this.I||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(){var e=t.call(this)||this;e.P=[],e.R=[],e.D=[],e.F=[],e.L=0,e.M=0,e.blockSize=64,e.F[0]=128;for(var n=1;n>>31)}for(var o,s,a=this.P[0],u=this.P[1],c=this.P[2],h=this.P[3],l=this.P[4],r=0;r<80;r++){r<40?r<20?(o=h^u&(c^h),s=1518500249):(o=u^c^h,s=1859775393):r<60?(o=u&c|h&(u|c),s=2400959708):(o=u^c^h,s=3395469782);var i=(a<<5|a>>>27)+o+l+s+n[r]&4294967295;l=h,h=c,c=4294967295&(u<<30|u>>>2),u=a,a=i}this.P[0]=this.P[0]+a&4294967295,this.P[1]=this.P[1]+u&4294967295,this.P[2]=this.P[2]+c&4294967295,this.P[3]=this.P[3]+h&4294967295,this.P[4]=this.P[4]+l&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.R,o=this.L;r=56;n--)this.R[n]=255&e,e/=256;this.W(this.R);for(var r=0,n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.P[n]>>i&255,++r;return t},e}(a);n.d(e,"a",function(){return g}),n.d(e,"f",function(){return m}),n.d(e,"e",function(){return b}),n.d(e,"y",function(){return C}),n.d(e,"u",function(){return w}),n.d(e,"j",function(){return S}),n.d(e,"s",function(){return T}),n.d(e,"t",function(){return N}),n.d(e,"k",function(){return I}),n.d(e,"o",function(){return P}),n.d(e,"B",function(){return R}),n.d(e,"C",function(){return D}),n.d(e,"q",function(){return j}),n.d(e,"n",function(){return x}),n.d(e,"c",function(){return k}),n.d(e,"b",function(){return F}),n.d(e,"v",function(){return A}),n.d(e,"A",function(){return L}),n.d(e,"w",function(){return M}),n.d(e,"d",function(){return W}),n.d(e,"z",function(){return q}),n.d(e,"i",function(){return Q}),n.d(e,"h",function(){return U}),n.d(e,"p",function(){return V}),n.d(e,"r",function(){return B}),n.d(e,"l",function(){return H}),n.d(e,"m",function(){return z}),n.d(e,"g",function(){return G}),n.d(e,"x",function(){return X});var h,l=n(0),p=n(2),d=n(11),f=n(3),_=n(8),y=n(6),v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g=function(){var t=1;return function(){return t++}}(),m=function(t){var e=Object(d.b)(t);return s.encodeByteArray(e,!0)},b=function(t){try{return h?new h(t,"base64").toString("utf8"):s.decodeString(t,!0)}catch(t){T("base64Decode failed: ",t)}return null},C=function(t){var e=Object(d.b)(t),n=new c;n.update(e);var r=n.digest();return s.encodeByteArray(r)},E=function t(){for(var e=[],n=0;nn?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r},Q=function(t,e){if(Array.isArray(t))for(var n=0;n=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023),n=i+1023,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074)))),s=[],o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(e?1:0),s.reverse(),a=s.join("");var u="";for(o=0;o<64;o+=8){var c=parseInt(a.substr(o,8),2).toString(16);1===c.length&&(c="0"+c),u+=c}return u.toLowerCase()},V=function(){return!("object"!==("undefined"==typeof window?"undefined":v(window))||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},B=function(){return"object"===("undefined"==typeof Windows?"undefined":v(Windows))&&"object"===v(Windows.UI)},H=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=Error(t+" at "+e.path+": "+n);return r.code=t.toUpperCase(),r},K=RegExp("^-?\\d{1,10}$"),Y=function(t){if(K.test(t)){var e=+t;if(e>=-2147483648&&e<=2147483647)return e}return null},z=function(t){try{t()}catch(t){setTimeout(function(){var e=t.stack||"";throw R("Exception was thrown by user callback.",e),t},Math.floor(0))}},G=function(){return("object"===("undefined"==typeof window?"undefined":v(window))&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},X=function(t,e){var n=setTimeout(t,e);return"object"===(void 0===n?"undefined":v(n))&&n.unref&&n.unref(),n}},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"l",function(){return i}),n.d(e,"f",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"j",function(){return u}),n.d(e,"h",function(){return c}),n.d(e,"k",function(){return h}),n.d(e,"d",function(){return l}),n.d(e,"e",function(){return p}),n.d(e,"g",function(){return d}),n.d(e,"i",function(){return f}),n.d(e,"c",function(){return _});var r=("function"==typeof Symbol&&Symbol.iterator,function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}),i=function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},o=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},s=function(t,e){return o(e,function(e,n){t[e]=n}),t},a=function(t){return s({},t)},u=function(t){for(var e in t)return!1;return!0},c=function(t){var e=0;for(var n in t)e++;return e},h=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n,t[i],i,t);return r},l=function(t,e,n){for(var r in t)if(e.call(n,t[r],r,t))return r},p=function(t,e,n){var r=l(t,e,n);return r&&t[r]},d=function(t){for(var e in t)return e},f=function(t){var e=[],n=0;for(var r in t)e[n++]=t[r];return e},_=function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!e(n,t[n]))return!1;return!0}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(t){return JSON.parse(t)},i=function(t){return JSON.stringify(t)}},,,function(t,e,n){"use strict";n.d(e,"a",function(){return s}),n.d(e,"c",function(){return a}),n.d(e,"b",function(){return u});var r=n(7),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},s=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(o())},a=function(){return"object"===("undefined"==typeof navigator?"undefined":i(navigator))&&"ReactNative"===navigator.product},u=function(){return!0===r.a.NODE_CLIENT||!0===r.a.NODE_ADMIN}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"4.2.0"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(){function t(t){this.Q=t,this.U="firebase:"}return t.prototype.set=function(t,e){null==e?this.Q.removeItem(this.V(t)):this.Q.setItem(this.V(t),Object(r.b)(e))},t.prototype.get=function(t){var e=this.Q.getItem(this.V(t));return null==e?null:Object(r.a)(e)},t.prototype.remove=function(t){this.Q.removeItem(this.V(t))},t.prototype.V=function(t){return this.U+t},t.prototype.toString=function(){return""+this.Q},t}(),o=n(2),s=function(){function t(){this.H={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.H[t]:this.H[t]=e},t.prototype.get=function(t){return Object(o.b)(this.H,t)?this.H[t]:null},t.prototype.remove=function(t){delete this.H[t]},t}();n.d(e,"a",function(){return u}),n.d(e,"b",function(){return c});var a=function(t){try{if("undefined"!=typeof window&&void 0!==window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new i(e)}}catch(t){}return new s},u=a("localStorage"),c=a("sessionStorage")},function(t,e,n){"use strict";n.d(e,"e",function(){return r}),n.d(e,"h",function(){return i}),n.d(e,"g",function(){return o}),n.d(e,"f",function(){return s}),n.d(e,"b",function(){return a}),n.d(e,"a",function(){return u}),n.d(e,"c",function(){return c}),n.d(e,"i",function(){return h}),n.d(e,"d",function(){return l});var r="5",i="v",o="s",s="r",a="f",u="firebaseio.com",c="ls",h="websocket",l="long_polling"},,function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"a",function(){return o});var r=n(0),i=function(t){for(var e=[],n=0,i=0;i=55296&&o<=56319){var s=o-55296;i++,Object(r.a)(i>6|192,e[n++]=63&o|128):o<65536?(e[n++]=o>>12|224,e[n++]=o>>6&63|128,e[n++]=63&o|128):(e[n++]=o>>18|240,e[n++]=o>>12&63|128,e[n++]=o>>6&63|128,e[n++]=63&o|128)}return e},o=function(t){for(var e=0,n=0;n=55296&&r<=56319?(e+=4,n++):e+=3}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(2),o=function(){function t(){this.K={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),Object(i.b)(this.K,t)||(this.K[t]=0),this.K[t]+=e},t.prototype.get=function(){return Object(r.a)(this.K)},t}();n.d(e,"a",function(){return s});var s=function(){function t(){}return t.getCollection=function(t){var e=""+t;return this.Y[e]||(this.Y[e]=new o),this.Y[e]},t.getOrCreateReporter=function(t,e){var n=""+t;return this.G[n]||(this.G[n]=e()),this.G[n]},t.Y={},t.G={},t}()},,,,,,function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return d});var r=n(5),i=n(0),o=n(1),s=n(12),a=n(9),u=n(7),c=n(8),h=n(3),l=n(6),p=null;"undefined"!=typeof MozWebSocket?p=MozWebSocket:"undefined"!=typeof WebSocket&&(p=WebSocket);var d=function(){function e(t,n,r,i){this.connId=t,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.X=Object(o.t)(this.connId),this.$=s.a.getCollection(n),this.connURL=e.J(n,r,i)}return e.J=function(t,e,n){var r={};return r[a.h]=a.e,!Object(l.b)()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(a.a)&&(r[a.f]=a.b),e&&(r[a.g]=e),n&&(r[a.c]=n),t.connectionURL(a.i,r)},e.prototype.open=function(e,n){var i=this;this.onDisconnect=n,this.onMessage=e,this.X("Websocket connecting to "+this.connURL),this.Z=!1,c.a.set("previous_websocket_failure",!0);try{if(Object(l.b)()){var o=u.a.NODE_ADMIN?"AdminNode":"Node",s={headers:{"User-Agent":"Firebase/"+a.e+"/"+r.default.SDK_VERSION+"/"+t.platform+"/"+o}},h=t.env,d=0==this.connURL.indexOf("wss://")?h.HTTPS_PROXY||h.https_proxy:h.HTTP_PROXY||h.http_proxy;d&&(s.proxy={origin:d}),this.mySock=new p(this.connURL,[],s)}else this.mySock=new p(this.connURL)}catch(t){this.X("Error instantiating WebSocket.");var f=t.message||t.data;return f&&this.X(f),void this.tt()}this.mySock.onopen=function(){i.X("Websocket connected."),i.Z=!0},this.mySock.onclose=function(){i.X("Websocket connection was disconnected."),i.mySock=null,i.tt()},this.mySock.onmessage=function(t){i.handleIncomingFrame(t)},this.mySock.onerror=function(t){i.X("WebSocket error. Closing connection.");var e=t.message||t.data;e&&i.X(e),i.tt()}},e.prototype.start=function(){},e.forceDisallow=function(){e.et=!0},e.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(t=!0)}return!t&&null!==p&&!e.et},e.previouslyFailed=function(){return c.a.isInMemoryStorage||!0===c.a.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){c.a.remove("previous_websocket_failure")},e.prototype.nt=function(t){if(this.frames.push(t),this.frames.length==this.totalFrames){var e=this.frames.join("");this.frames=null;var n=Object(h.a)(e);this.onMessage(n)}},e.prototype.rt=function(t){this.totalFrames=t,this.frames=[]},e.prototype.it=function(t){if(Object(i.a)(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=+t;if(!isNaN(e))return this.rt(e),null}return this.rt(1),t},e.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.$.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.nt(e);else{var n=this.it(e);null!==n&&this.nt(n)}}},e.prototype.send=function(t){this.resetKeepAlive();var e=Object(h.b)(t);this.bytesSent+=e.length,this.$.incrementCounter("bytes_sent",e.length);var n=Object(o.z)(e,16384);n.length>1&&this.ot(n.length+"");for(var r=0;r0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(t){}e+="/"+i}return e}function i(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}function o(t,e){return Object(Wt.v)(t.name,e.name)}function s(t,e){return Object(Wt.v)(t,e)}function a(t,e){if(void 0===e&&(e=null),null===t)return Vt.EMPTY_NODE;if("object"===(void 0===t?"undefined":zt(t))&&".priority"in t&&(e=t[".priority"]),Object(Yt.a)(null===e||"string"==typeof e||"number"==typeof e||"object"===(void 0===e?"undefined":zt(e))&&".sv"in e,"Invalid priority type found: "+(void 0===e?"undefined":zt(e))),"object"===(void 0===t?"undefined":zt(t))&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!==(void 0===t?"undefined":zt(t))||".sv"in t)return new wt(t,a(e));if(t instanceof Array||!Gt){var n=Vt.EMPTY_NODE,r=t;return Object(Kt.f)(r,function(t,e){if(Object(Kt.b)(r,t)&&"."!==t.substring(0,1)){var i=a(e);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}}),n.updatePriority(a(e))}var i=[],u=!1,c=t;if(Object(Kt.f)(c,function(t,e){if("string"!=typeof t||"."!==t.substring(0,1)){var n=a(c[t]);n.isEmpty()||(u=u||!n.getPriority().isEmpty(),i.push(new st(t,n)))}}),0==i.length)return Vt.EMPTY_NODE;var h=kt(i,o,function(t){return t.name},s);if(u){var l=kt(i,Nt.getCompare());return new Vt(h,a(e),new Mt({".priority":l},{".priority":Nt}))}return new Vt(h,a(e),Mt.Default)}Object.defineProperty(e,"__esModule",{value:!0});var u,c,h,l,p,d,f,_=n(1),y=n(11),v=function(){function t(t,e){if(void 0===e){this.ct=t.split("/");for(var n=0,r=0;r0&&(this.ct[n]=this.ct[r],n++);this.ct.length=n,this.ht=0}else this.ct=t,this.ht=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.ht>=this.ct.length?null:this.ct[this.ht]},t.prototype.getLength=function(){return this.ct.length-this.ht},t.prototype.popFront=function(){var e=this.ht;return e=this.ct.length)return null;for(var e=[],n=this.ht;n0&&n.push(i[r]);return new t(n,0)},t.prototype.isEmpty=function(){return this.ht>=this.ct.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;it.getLength())return!1;for(;e0&&(this.dt+=1),this.pt.push(t),this.dt+=Object(y.a)(t),this.ft()},t.prototype.pop=function(){var t=this.pt.pop();this.dt-=Object(y.a)(t),this.pt.length>0&&(this.dt-=1)},t.prototype.ft=function(){if(this.dt>t.MAX_PATH_LENGTH_BYTES)throw Error(this.lt+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.dt+").");if(this.pt.length>t.MAX_PATH_DEPTH)throw Error(this.lt+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.pt.length?"":"in property '"+this.pt.join(".")+"'"},t}(),m=n(0),b=n(2),C=n(8),E=n(9),w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O=function(){function t(t,e,n,r,i){void 0===i&&(i=""),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=C.a.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&C.a.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){Object(m.a)("string"==typeof t,"typeof type must == string"),Object(m.a)("object"===(void 0===e?"undefined":w(e)),"typeof params must == object");var n;if(t===E.i)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==E.d)throw Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return Object(b.f)(e,function(t,e){r.push(t+"="+e)}),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}(),S=n(1),T=function(t){var e=N(t),n=e.subdomain;"firebase"===e.domain&&Object(S.o)(e.host+" is no longer supported. Please use .firebaseio.com instead"),n&&"undefined"!=n||Object(S.o)("Cannot parse Firebase url. Please use https://.firebaseio.com"),e.secure||Object(S.C)();var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new O(e.host,e.secure,n,r),path:new v(e.pathString)}},N=function(t){var e="",n="",i="",o="",s=!0,a="https",u=443;if("string"==typeof t){var c=t.indexOf("//");c>=0&&(a=t.substring(0,c-1),t=t.substring(c+2));var h=t.indexOf("/");-1===h&&(h=t.length),e=t.substring(0,h),o=r(t.substring(h));var l=e.split(".");3===l.length?(n=l[1],i=l[0].toLowerCase()):2===l.length&&(n=l[0]),(c=e.indexOf(":"))>=0&&(s="https"===a||"wss"===a,u=parseInt(e.substring(c+1),10))}return{host:e,port:u,domain:n,subdomain:i,secure:s,scheme:a,pathString:o}},I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P=function(t,e,n,r){var i;if(rn&&(i=0===n?"none":"no more than "+n),i){var o=t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".";throw Error(o)}},R=function(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw Error(i(t,e,r)+"must be a valid function.")},D=function(t,e,n,r){if((!r||n)&&("object"!==(void 0===n?"undefined":I(n))||null===n))throw Error(i(t,e,r)+"must be a valid context object.")},j=n(2),x=n(1),k=n(11),F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A=/[\[\].#$\/\u0000-\u001F\u007F]/,L=/[\[\].#$\u0000-\u001F\u007F]/,M=function(t){return"string"==typeof t&&0!==t.length&&!A.test(t)},W=function(t){return"string"==typeof t&&0!==t.length&&!L.test(t)},q=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),W(t)},Q=function(t){return null===t||"string"==typeof t||"number"==typeof t&&!Object(x.q)(t)||t&&"object"===(void 0===t?"undefined":F(t))&&Object(j.b)(t,".sv")},U=function(t,e,n,r,o){o&&void 0===n||V(i(t,e,o),n,r)},V=function t(e,n,r){var i=r instanceof v?new g(r,e):r;if(void 0===n)throw Error(e+"contains undefined "+i.toErrorString());if("function"==typeof n)throw Error(e+"contains a function "+i.toErrorString()+" with contents = "+n);if(Object(x.q)(n))throw Error(e+"contains "+n+" "+i.toErrorString());if("string"==typeof n&&n.length>10485760/3&&Object(k.a)(n)>10485760)throw Error(e+"contains a string greater than 10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===(void 0===n?"undefined":F(n))){var o=!1,s=!1;if(Object(j.f)(n,function(n,r){if(".value"===n)o=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!M(n)))throw Error(e+" contains an invalid key ("+n+") "+i.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),t(e,r,i),i.pop()}),o&&s)throw Error(e+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},B=function(t,e){var n,r;for(n=0;n=0;o--)s[o]=t.charAt(r%64),r=Math.floor(r/64);Object(it.a)(0===r,"Cannot push at time == 0");var a=s.join("");if(i){for(o=11;o>=0&&63===n[o];o--)n[o]=0;n[o]++}else for(o=0;o<12;o++)n[o]=Math.floor(64*Math.random());for(o=0;o<12;o++)a+=t.charAt(n[o]);return Object(it.a)(20===a.length,"nextPushId: Length should be 20."),a}}(),st=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),at=n(1),ut=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new st(at.c,t),r=new st(at.c,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return st.MIN},t}(),ct=n(1),ht=n(0),lt=this&&this.I||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return u},set:function(t){u=t},enumerable:!0,configurable:!0}),e.prototype.compare=function(t,e){return Object(ct.v)(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw Object(ht.b)("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return st.MIN},e.prototype.maxPost=function(){return new st(ct.b,u)},e.prototype.makePost=function(t,e){return Object(ht.a)("string"==typeof t,"KeyIndex indexValue must always be a string."),new st(t,u)},e.prototype.toString=function(){return".key"},e}(ut),dt=new pt,ft=n(0),_t=n(1),yt=n(2),vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt=function(t){return"number"==typeof t?"number:"+Object(_t.h)(t):"string:"+t},mt=function(t){if(t.isLeafNode()){var e=t.val();Object(ft.a)("string"==typeof e||"number"==typeof e||"object"===(void 0===e?"undefined":vt(e))&&Object(yt.b)(e,".sv"),"Priority must be a string or number.")}else Object(ft.a)(t===c||t.isEmpty(),"priority of unexpected type.");Object(ft.a)(t===c||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},bt=n(0),Ct=n(1),Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt=function(){function t(e,n){void 0===n&&(n=t.vt.EMPTY_NODE),this.gt=e,this.mt=n,this.bt=null,Object(bt.a)(void 0!==this.gt&&null!==this.gt,"LeafNode shouldn't be created with null/undefined value."),mt(this.mt)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return h},set:function(t){h=t},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.mt},t.prototype.updatePriority=function(e){return new t(this.gt,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.mt:t.vt.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.mt:t.vt.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.vt.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.mt)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(Object(bt.a)(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.vt.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.bt){var t="";this.mt.isEmpty()||(t+="priority:"+gt(this.mt.val())+":");var e=Et(this.gt);t+=e+":",t+="number"===e?Object(Ct.h)(this.gt):this.gt,this.bt=Object(Ct.y)(t)}return this.bt},t.prototype.getValue=function(){return this.gt},t.prototype.compareTo=function(e){return e===t.vt.EMPTY_NODE?1:e instanceof t.vt?-1:(Object(bt.a)(e.isLeafNode(),"Unknown node type"),this.Ct(e))},t.prototype.Ct=function(e){var n=Et(e.gt),r=Et(this.gt),i=t.VALUE_TYPE_ORDER.indexOf(n),o=t.VALUE_TYPE_ORDER.indexOf(r);return Object(bt.a)(i>=0,"Unknown leaf type: "+n),Object(bt.a)(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.gt0},t.prototype.peek=function(){if(0===this.Ot.length)return null;var t=this.Ot[this.Ot.length-1];return this.wt?this.wt(t.key,t.value):{key:t.key,value:t.value}},t}(),Pt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:Dt.EMPTY_NODE,this.right=null!=o?o:Dt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.St=function(){return this.left.isEmpty()?this:this.left.St()},t.prototype.minKey=function(){return this.St().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r,i;return i=this,r=n(t,i.key),i=r<0?i.copy(null,null,null,i.left.insert(t,e,n),null):0===r?i.copy(null,e,null,null,null):i.copy(null,null,null,null,i.right.insert(t,e,n)),i.Tt()},t.prototype.Nt=function(){if(this.left.isEmpty())return Dt.EMPTY_NODE;var t=this;return t.left.It()||t.left.left.It()||(t=t.Pt()),t=t.copy(null,null,null,t.left.Nt(),null),t.Tt()},t.prototype.remove=function(t,e){var n,r;if(n=this,e(t,n.key)<0)n.left.isEmpty()||n.left.It()||n.left.left.It()||(n=n.Pt()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.It()&&(n=n.Rt()),n.right.isEmpty()||n.right.It()||n.right.left.It()||(n=n.Dt()),0===e(t,n.key)){if(n.right.isEmpty())return Dt.EMPTY_NODE;r=n.right.St(),n=n.copy(r.key,r.value,null,null,n.right.Nt())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.Tt()},t.prototype.It=function(){return this.color},t.prototype.Tt=function(){var t=this;return t.right.It()&&!t.left.It()&&(t=t.jt()),t.left.It()&&t.left.left.It()&&(t=t.Rt()),t.left.It()&&t.right.It()&&(t=t.xt()),t},t.prototype.Pt=function(){var t=this.xt();return t.right.left.It()&&(t=t.copy(null,null,null,null,t.right.Rt()),t=t.jt(),t=t.xt()),t},t.prototype.Dt=function(){var t=this.xt();return t.left.left.It()&&(t=t.Rt(),t=t.xt()),t},t.prototype.jt=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.Rt=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.xt=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.kt=function(){var t=this.Ft();return Math.pow(2,t)<=this.count()+1},t.prototype.Ft=function(){var t;if(this.It()&&this.left.It())throw Error("Red node has red child("+this.key+","+this.value+")");if(this.right.It())throw Error("Right child of ("+this.key+","+this.value+") is red");if((t=this.left.Ft())!==this.right.Ft())throw Error("Black depths differ");return t+(this.It()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Rt=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new Pt(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.Ft=function(){return 0},t.prototype.It=function(){return!1},t}(),Dt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.At=e,this.Lt=n}return t.prototype.insert=function(e,n){return new t(this.At,this.Lt.insert(e,n,this.At).copy(null,null,Pt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.At,this.Lt.remove(e,this.At).copy(null,null,Pt.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.Lt;!n.isEmpty();){if(0===(e=this.At(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.Lt,r=null;!n.isEmpty();){if(0===(e=this.At(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw Error("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.isEmpty=function(){return this.Lt.isEmpty()},t.prototype.count=function(){return this.Lt.count()},t.prototype.minKey=function(){return this.Lt.minKey()},t.prototype.maxKey=function(){return this.Lt.maxKey()},t.prototype.inorderTraversal=function(t){return this.Lt.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.Lt.reverseTraversal(t)},t.prototype.getIterator=function(t){return new It(this.Lt,null,this.At,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new It(this.Lt,t,this.At,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new It(this.Lt,t,this.At,!0,e)},t.prototype.getReverseIterator=function(t){return new It(this.Lt,null,this.At,!0,t)},t.EMPTY_NODE=new Rt,t}(),jt=Math.log(2),xt=function(){function t(t){this.count=function(t){return parseInt(Math.log(t)/jt,10)}(t+1),this.Mt=this.count-1;var e=function(t){return parseInt(Array(t+1).join("1"),2)}(this.count);this.Wt=t+1&e}return t.prototype.nextBitIsOne=function(){var t=!(this.Wt&1<0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===Ht?-1:0},t.prototype.withIndex=function(e){if(e===dt||this.Vt.hasIndex(e))return this;var n=this.Vt.addIndex(e,this.Ut);return new t(this.Ut,this.mt,n)},t.prototype.isIndexed=function(t){return t===dt||this.Vt.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.Ut.count()===e.Ut.count()){for(var n=this.getIterator(Nt),r=e.getIterator(Nt),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.Ht=function(t){return t===dt?null:this.Vt.get(""+t)},t.Bt=/^(0|[1-9]\d*)$/,t}(),Bt=function(t){function e(){return t.call(this,new Dt(s),Vt.EMPTY_NODE,Mt.Default)||this}return Ut(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Vt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Vt),Ht=new Bt;Object.defineProperties(st,{MIN:{value:new st(Qt.c,Vt.EMPTY_NODE)},MAX:{value:new st(Qt.b,Ht)}}),pt.Kt=Vt.EMPTY_NODE,wt.vt=Vt,function(t){c=t}(Ht),function(t){p=t}(Ht);var Kt=n(2),Yt=n(0),zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt=!0;!function(t){l=t}(a);var Xt,$t,Jt=n(1),Zt=this&&this.I||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Zt(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?Object(Jt.v)(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return st.MIN},e.prototype.maxPost=function(){return st.MAX},e.prototype.makePost=function(t,e){var n=a(t);return new st(e,n)},e.prototype.toString=function(){return".value"},e}(ut),ee=new te,ne=n(0),re=n(1),ie=this&&this.I||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(t){function e(e){var n=t.call(this)||this;return n.Yt=e,Object(ne.a)(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return ie(e,t),e.prototype.extractChild=function(t){return t.getChild(this.Yt)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.Yt).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?Object(re.v)(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=a(t),r=Vt.EMPTY_NODE.updateChild(this.Yt,n);return new st(e,r)},e.prototype.maxPost=function(){var t=Vt.EMPTY_NODE.updateChild(this.Yt,Ht);return new st(re.b,t)},e.prototype.toString=function(){return this.Yt.slice().join("/")},e}(ut),se=function(){function t(t,e,n){this.zt=t,this.Gt=e,this.Xt=n}return t.prototype.val=function(){return P("DataSnapshot.val",0,0,arguments.length),this.zt.val()},t.prototype.exportVal=function(){return P("DataSnapshot.exportVal",0,0,arguments.length),this.zt.val(!0)},t.prototype.toJSON=function(){return P("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return P("DataSnapshot.exists",0,0,arguments.length),!this.zt.isEmpty()},t.prototype.child=function(e){P("DataSnapshot.child",0,1,arguments.length),e+="",G("DataSnapshot.child",1,e,!1);var n=new v(e),r=this.Gt.child(n);return new t(this.zt.getChild(n),r,Nt)},t.prototype.hasChild=function(t){P("DataSnapshot.hasChild",1,1,arguments.length),G("DataSnapshot.hasChild",1,t,!1);var e=new v(t);return!this.zt.getChild(e).isEmpty()},t.prototype.getPriority=function(){return P("DataSnapshot.getPriority",0,0,arguments.length),this.zt.getPriority().val()},t.prototype.forEach=function(e){var n=this;return P("DataSnapshot.forEach",1,1,arguments.length),R("DataSnapshot.forEach",1,e,!1),!this.zt.isLeafNode()&&!!this.zt.forEachChild(this.Xt,function(r,i){return e(new t(i,n.Gt.child(r),Nt))})},t.prototype.hasChildren=function(){return P("DataSnapshot.hasChildren",0,0,arguments.length),!this.zt.isLeafNode()&&!this.zt.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.Gt.getKey()},enumerable:!0,configurable:!0}),t.prototype.numChildren=function(){return P("DataSnapshot.numChildren",0,0,arguments.length),this.zt.numChildren()},t.prototype.getRef=function(){return P("DataSnapshot.ref",0,0,arguments.length),this.Gt},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),ae=n(3),ue=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath()+":"+this.eventType+":"+Object(ae.b)(this.snapshot.exportVal())},t}(),ce=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path+":cancel"},t}(),he=n(2),le=n(0),pe=function(){function t(t,e,n){this.$t=t,this.Jt=e,this.Zt=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new ue("value",this,new se(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.Zt;if("cancel"===t.getEventType()){Object(le.a)(this.Jt,"Raising a cancel event on a listener with no cancel callback");var n=this.Jt;return function(){n.call(e,t.error)}}var r=this.$t;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.Jt?new ce(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.$t||!this.$t||e.$t===this.$t&&e.Zt===this.Zt)},t.prototype.hasAnyCallback=function(){return null!==this.$t},t}(),de=function(){function t(t,e,n){this.te=t,this.Jt=e,this.Zt=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,Object(he.b)(this.te,e)},t.prototype.createCancelEvent=function(t,e){return this.Jt?new ce(this,t,e):null},t.prototype.createEvent=function(t,e){Object(le.a)(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new ue(t.type,this,new se(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.Zt;if("cancel"===t.getEventType()){Object(le.a)(this.Jt,"Raising a cancel event on a listener with no cancel callback");var n=this.Jt;return function(){n.call(e,t.error)}}var r=this.te[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){if(e instanceof t){if(!this.te||!e.te)return!0;if(this.Zt===e.Zt){var n=Object(he.h)(e.te);if(n===Object(he.h)(this.te)){if(1===n){var r=Object(he.g)(e.te),i=Object(he.g)(this.te);return!(i!==r||e.te[r]&&this.te[i]&&e.te[r]!==this.te[i])}return Object(he.c)(this.te,function(t,n){return e.te[t]===n})}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.te},t}(),fe=n(0),_e=n(1),ye=n(4),ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ge=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.ee=n,this.ne=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(fe.a)(Xt,"Reference.ts has not been loaded"),Xt},set:function(t){Xt=t},enumerable:!0,configurable:!0}),t.re=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===dt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!=_e.c)throw Error(r);if("string"!=typeof e)throw Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!=_e.b)throw Error(r);if("string"!=typeof n)throw Error(i)}}else if(t.getIndex()===Nt){if(null!=e&&!Q(e)||null!=n&&!Q(n))throw Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Object(fe.a)(t.getIndex()instanceof oe||t.getIndex()===ee,"unknown index type."),null!=e&&"object"===(void 0===e?"undefined":ve(e))||null!=n&&"object"===(void 0===n?"undefined":ve(n)))throw Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.ie=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.oe=function(t){if(!0===this.ne)throw Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.ee},t.prototype.getRef=function(){return P("Query.ref",0,0,arguments.length),new t.se(this.repo,this.path)},t.prototype.on=function(e,n,r,i){P("Query.on",2,4,arguments.length),Y("Query.on",1,e,!1),R("Query.on",2,n,!1);var o=t.ae("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var s={};s[e]=n,this.onChildEvent(s,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new pe(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new de(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){P("Query.off",0,3,arguments.length),Y("Query.off",1,t,!0),R("Query.off",2,e,!0),D("Query.off",3,n,!0);var r=null,i=null;"value"===t?r=new pe(e||null,null,n||null):t&&(e&&(i={},i[t]=e),r=new de(i,null,n||null)),this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;P("Query.once",1,4,arguments.length),Y("Query.once",1,e,!1),R("Query.once",2,n,!0);var s=t.ae("Query.once",r,i),a=!0,u=new ye.a;Object(ye.c)(u.promise);var c=function t(r){a&&(a=!1,o.off(e,t),n&&n.bind(s.context)(r),u.resolve(r))};return this.on(e,c,function(t){o.off(e,c),s.cancel&&s.cancel.bind(s.context)(t),u.reject(t)}),u.promise},t.prototype.limitToFirst=function(e){if(P("Query.limitToFirst",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.ee.hasLimit())throw Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.ee.limitToFirst(e),this.ne)},t.prototype.limitToLast=function(e){if(P("Query.limitToLast",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.ee.hasLimit())throw Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.ee.limitToLast(e),this.ne)},t.prototype.orderByChild=function(e){if(P("Query.orderByChild",1,1,arguments.length),"$key"===e)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===e)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===e)throw Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');G("Query.orderByChild",1,e,!1),this.oe("Query.orderByChild");var n=new v(e);if(n.isEmpty())throw Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new oe(n),i=this.ee.orderBy(r);return t.re(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){P("Query.orderByKey",0,0,arguments.length),this.oe("Query.orderByKey");var e=this.ee.orderBy(dt);return t.re(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){P("Query.orderByPriority",0,0,arguments.length),this.oe("Query.orderByPriority");var e=this.ee.orderBy(Nt);return t.re(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){P("Query.orderByValue",0,0,arguments.length),this.oe("Query.orderByValue");var e=this.ee.orderBy(ee);return t.re(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),P("Query.startAt",0,2,arguments.length),U("Query.startAt",1,e,this.path,!0),z("Query.startAt",2,n,!0);var r=this.ee.startAt(e,n);if(t.ie(r),t.re(r),this.ee.hasStart())throw Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.ne)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),P("Query.endAt",0,2,arguments.length),U("Query.endAt",1,e,this.path,!0),z("Query.endAt",2,n,!0);var r=this.ee.endAt(e,n);if(t.ie(r),t.re(r),this.ee.hasEnd())throw Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.ne)},t.prototype.equalTo=function(t,e){if(P("Query.equalTo",1,2,arguments.length),U("Query.equalTo",1,t,this.path,!1),z("Query.equalTo",2,e,!0),this.ee.hasStart())throw Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.ee.hasEnd())throw Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return P("Query.toString",0,0,arguments.length),""+this.repo+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return P("Query.toJSON",0,1,arguments.length),""+this},t.prototype.queryObject=function(){return this.ee.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=Object(_e.d)(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(P("Query.isEqual",1,1,arguments.length),!(e instanceof t))throw Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.");var n=this.repo===e.repo,r=this.path.equals(e.path),i=this.queryIdentifier()===e.queryIdentifier();return n&&r&&i},t.ae=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,R(t,3,r.cancel,!0),r.context=n,D(t,4,r.context,!0);else if(e)if("object"===(void 0===e?"undefined":ve(e))&&null!==e)r.context=e;else{if("function"!=typeof e)throw Error(i(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),me=n(2),be=function(){function t(){this.set={}}return t.prototype.add=function(t,e){this.set[t]=null===e||e},t.prototype.contains=function(t){return Object(me.b)(this.set,t)},t.prototype.get=function(t){return this.contains(t)?this.set[t]:void 0},t.prototype.remove=function(t){delete this.set[t]},t.prototype.clear=function(){this.set={}},t.prototype.isEmpty=function(){return Object(me.j)(this.set)},t.prototype.count=function(){return Object(me.h)(this.set)},t.prototype.each=function(t){Object(me.f)(this.set,function(e,n){return t(e,n)})},t.prototype.keys=function(){var t=[];return Object(me.f)(this.set,function(e){t.push(e)}),t},t}(),Ce=function(){function t(){this.gt=null,this.Ut=null}return t.prototype.find=function(t){if(null!=this.gt)return this.gt.getChild(t);if(t.isEmpty()||null==this.Ut)return null;var e=t.getFront();return t=t.popFront(),this.Ut.contains(e)?this.Ut.get(e).find(t):null},t.prototype.remember=function(e,n){if(e.isEmpty())this.gt=n,this.Ut=null;else if(null!==this.gt)this.gt=this.gt.updateChild(e,n);else{null==this.Ut&&(this.Ut=new be);var r=e.getFront();this.Ut.contains(r)||this.Ut.add(r,new t);var i=this.Ut.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.gt=null,this.Ut=null,!0;if(null!==this.gt){if(this.gt.isLeafNode())return!1;var e=this.gt;this.gt=null;var n=this;return e.forEachChild(Nt,function(t,e){n.remember(new v(t),e)}),this.forget(t)}if(null!==this.Ut){var r=t.getFront();return t=t.popFront(),this.Ut.contains(r)&&this.Ut.get(r).forget(t)&&this.Ut.remove(r),!!this.Ut.isEmpty()&&(this.Ut=null,!0)}return!0},t.prototype.forEachTree=function(t,e){null!==this.gt?e(t,this.gt):this.forEachChild(function(n,r){var i=new v(t+"/"+n);r.forEachTree(i,e)})},t.prototype.forEachChild=function(t){null!==this.Ut&&this.Ut.each(function(e,n){t(e,n)})},t}(),Ee=n(0),we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe=function(t){return t=t||{},t.timestamp=t.timestamp||(new Date).getTime(),t},Se=function(t,e){return t&&"object"===(void 0===t?"undefined":we(t))?(Object(Ee.a)(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t},Te=function(t,e){var n=new Ce;return t.forEachTree(new v(""),function(t,r){n.remember(t,Ne(r,e))}),n},Ne=function t(e,n){var r,i=e.getPriority().val(),o=Se(i,n);if(e.isLeafNode()){var s=e,u=Se(s.getValue(),n);return u!==s.getValue()||o!==s.getPriority().val()?new wt(u,a(o)):e}var c=e;return r=c,o!==c.getPriority().val()&&(r=r.updatePriority(new wt(o))),c.forEachChild(Nt,function(e,i){var o=t(i,n);o!==i&&(r=r.updateImmediateChild(e,o))}),r},Ie=n(0);!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}($t||($t={}));var Pe,Re,De=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,Object(Ie.a)(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),je=n(0),xe=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=$t.ACK_USER_WRITE,this.source=De.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return Object(je.a)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new v(e));return new t(v.Empty,n,this.revert)}return Object(je.a)(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),ke=n(1),Fe=n(2),Ae=function(){return Pe||(Pe=new Dt(ke.A)),Pe},Le=function(){function t(t,e){void 0===e&&(e=Ae()),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return Object(Fe.f)(e,function(t,e){n=n.set(new v(t),e)}),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:v.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new v(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=this.children.get(r)||t.Empty,o=i.set(e.popFront(),n),s=this.children.insert(r,o);return new t(this.value,s)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=this.children.get(r)||t.Empty,o=i.setTree(e.popFront(),n),s=void 0;return s=o.isEmpty()?this.children.remove(r):this.children.insert(r,o),new t(this.value,s)},t.prototype.fold=function(t){return this.ue(v.Empty,t)},t.prototype.ue=function(t,e){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.ue(t.child(r),e)}),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.ce(t,v.Empty,e)},t.prototype.ce=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.ce(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.he(t,v.Empty,e)},t.prototype.he=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.he(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.le(v.Empty,t)},t.prototype.le=function(t,e){this.children.inorderTraversal(function(n,r){r.le(t.child(n),e)}),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal(function(e,n){n.value&&t(e,n.value)})},t.Empty=new t(null),t}(),Me=function(){function t(t,e){this.source=t,this.path=e,this.type=$t.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,v.Empty):new t(this.source,this.path.popFront())},t}(),We=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=$t.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,v.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),qe=n(0),Qe=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=$t.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new v(e));return n.isEmpty()?null:n.value?new We(this.source,v.Empty,n.value):new t(this.source,v.Empty,n)}return Object(qe.a)(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source+" merge: "+this.children+")"},t}(),Ue=function(){function t(t,e,n){this.zt=t,this.pe=e,this.de=n}return t.prototype.isFullyInitialized=function(){return this.pe},t.prototype.isFiltered=function(){return this.de},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.de;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.de||this.zt.hasChild(t)},t.prototype.getNode=function(){return this.zt},t}(),Ve=function(){function t(t,e){this.fe=t,this._e=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new Ue(e,n,r),this._e)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.fe,new Ue(e,n,r))},t.prototype.getEventCache=function(){return this.fe},t.prototype.getCompleteEventSnap=function(){return this.fe.isFullyInitialized()?this.fe.getNode():null},t.prototype.getServerCache=function(){return this._e},t.prototype.getCompleteServerSnap=function(){return this._e.isFullyInitialized()?this._e.getNode():null},t.Empty=new t(new Ue(Vt.EMPTY_NODE,!1,!1),new Ue(Vt.EMPTY_NODE,!1,!1)),t}(),Be=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),He=n(0),Ke=function(){function t(t){this.Xt=t}return t.prototype.updateChild=function(t,e,n,r,i,o){Object(He.a)(t.isIndexed(this.Xt),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()==n.isEmpty()?t:(null!=o&&(n.isEmpty()?t.hasChild(e)?o.trackChildChange(Be.childRemovedChange(e,s)):Object(He.a)(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(Be.childAddedChange(e,n)):o.trackChildChange(Be.childChangedChange(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.Xt))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Nt,function(t,r){e.hasChild(t)||n.trackChildChange(Be.childRemovedChange(t,r))}),e.isLeafNode()||e.forEachChild(Nt,function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(Be.childChangedChange(e,r,i))}else n.trackChildChange(Be.childAddedChange(e,r))})),e.withIndex(this.Xt)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Vt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.Xt},t}(),Ye=n(2),ze=n(0),Ge=function(){function t(){this.ye={}}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;Object(ze.a)(e==Be.CHILD_ADDED||e==Be.CHILD_CHANGED||e==Be.CHILD_REMOVED,"Only child changes supported for tracking"),Object(ze.a)(".priority"!==n,"Only non-priority child changes can be tracked.");var r=Object(Ye.l)(this.ye,n);if(r){var i=r.type;if(e==Be.CHILD_ADDED&&i==Be.CHILD_REMOVED)this.ye[n]=Be.childChangedChange(n,t.snapshotNode,r.snapshotNode);else if(e==Be.CHILD_REMOVED&&i==Be.CHILD_ADDED)delete this.ye[n];else if(e==Be.CHILD_REMOVED&&i==Be.CHILD_CHANGED)this.ye[n]=Be.childRemovedChange(n,r.oldSnap);else if(e==Be.CHILD_CHANGED&&i==Be.CHILD_ADDED)this.ye[n]=Be.childAddedChange(n,t.snapshotNode);else{if(e!=Be.CHILD_CHANGED||i!=Be.CHILD_CHANGED)throw Object(ze.b)("Illegal combination of changes: "+t+" occurred after "+r);this.ye[n]=Be.childChangedChange(n,t.snapshotNode,r.oldSnap)}}else this.ye[n]=t},t.prototype.getChanges=function(){return Object(Ye.i)(this.ye)},t}(),Xe=function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}(),$e=new Xe,Je=function(){function t(t,e,n){void 0===n&&(n=null),this.ve=t,this.ge=e,this.me=n}return t.prototype.getCompleteChild=function(t){var e=this.ge.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.me?new Ue(this.me,!0,!1):this.ge.getServerCache();return this.ve.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.me?this.me:this.ge.getCompleteServerSnap(),i=this.ve.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),Ze=n(0),tn=function(){function t(t,e){this.viewCache=t,this.changes=e}return t}(),en=function(){function t(t){this.be=t}return t.prototype.assertIndexed=function(t){Object(Ze.a)(t.getEventCache().getNode().isIndexed(this.be.getIndex()),"Event snap not indexed"),Object(Ze.a)(t.getServerCache().getNode().isIndexed(this.be.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var o,s,a=new Ge;if(n.type===$t.OVERWRITE){var u=n;u.source.fromUser?o=this.Ce(e,u.path,u.snap,r,i,a):(Object(Ze.a)(u.source.fromServer,"Unknown source."),s=u.source.tagged||e.getServerCache().isFiltered()&&!u.path.isEmpty(),o=this.Ee(e,u.path,u.snap,r,i,s,a))}else if(n.type===$t.MERGE){var c=n;c.source.fromUser?o=this.we(e,c.path,c.children,r,i,a):(Object(Ze.a)(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered(),o=this.Oe(e,c.path,c.children,r,i,s,a))}else if(n.type===$t.ACK_USER_WRITE){var h=n;o=h.revert?this.Se(e,h.path,r,i,a):this.Te(e,h.path,h.affectedTree,r,i,a)}else{if(n.type!==$t.LISTEN_COMPLETE)throw Object(Ze.b)("Unknown operation type: "+n.type);o=this.Ne(e,n.path,r,a)}var l=a.getChanges();return t.Ie(e,o,l),new tn(o,l)},t.Ie=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>0||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(Be.valueChange(e.getCompleteEventSnap()))}},t.prototype.Pe=function(t,e,n,r,i){var o=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,a=void 0;if(e.isEmpty())if(Object(Ze.a)(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var u=t.getCompleteServerSnap(),c=u instanceof Vt?u:Vt.EMPTY_NODE,h=n.calcCompleteEventChildren(c);s=this.be.updateFullNode(t.getEventCache().getNode(),h,i)}else{var l=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.be.updateFullNode(t.getEventCache().getNode(),l,i)}else{var p=e.getFront();if(".priority"==p){Object(Ze.a)(1==e.getLength(),"Can't have a priority with additional path components");var d=o.getNode();a=t.getServerCache().getNode();var f=n.calcEventCacheAfterServerOverwrite(e,d,a);s=null!=f?this.be.updatePriority(d,f):o.getNode()}else{var _=e.popFront(),y=void 0;if(o.isCompleteForChild(p)){a=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,o.getNode(),a);y=null!=v?o.getNode().getImmediateChild(p).updateChild(_,v):o.getNode().getImmediateChild(p)}else y=n.calcCompleteChild(p,t.getServerCache());s=null!=y?this.be.updateChild(o.getNode(),p,y,_,r,i):o.getNode()}}return t.updateEventSnap(s,o.isFullyInitialized()||e.isEmpty(),this.be.filtersNodes())},t.prototype.Ee=function(t,e,n,r,i,o,s){var a,u=t.getServerCache(),c=o?this.be:this.be.getIndexedFilter();if(e.isEmpty())a=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var h=u.getNode().updateChild(e,n);a=c.updateFullNode(u.getNode(),h,null)}else{var l=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var p=e.popFront(),d=u.getNode().getImmediateChild(l),f=d.updateChild(p,n);a=".priority"==l?c.updatePriority(u.getNode(),f):c.updateChild(u.getNode(),l,f,p,$e,null)}var _=t.updateServerSnap(a,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),y=new Je(r,_,i);return this.Pe(_,e,r,y,s)},t.prototype.Ce=function(t,e,n,r,i,o){var s,a,u=t.getEventCache(),c=new Je(r,t,i);if(e.isEmpty())a=this.be.updateFullNode(t.getEventCache().getNode(),n,o),s=t.updateEventSnap(a,!0,this.be.filtersNodes());else{var h=e.getFront();if(".priority"===h)a=this.be.updatePriority(t.getEventCache().getNode(),n),s=t.updateEventSnap(a,u.isFullyInitialized(),u.isFiltered());else{var l=e.popFront(),p=u.getNode().getImmediateChild(h),d=void 0;if(l.isEmpty())d=n;else{var f=c.getCompleteChild(h);d=null!=f?".priority"===l.getBack()&&f.getChild(l.parent()).isEmpty()?f:f.updateChild(l,n):Vt.EMPTY_NODE}if(p.equals(d))s=t;else{var _=this.be.updateChild(u.getNode(),h,d,l,c,o);s=t.updateEventSnap(_,u.isFullyInitialized(),this.be.filtersNodes())}}}return s},t.Re=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.we=function(e,n,r,i,o,s){var a=this,u=e;return r.foreach(function(r,c){var h=n.child(r);t.Re(e,h.getFront())&&(u=a.Ce(u,h,c,i,o,s))}),r.foreach(function(r,c){var h=n.child(r);t.Re(e,h.getFront())||(u=a.Ce(u,h,c,i,o,s))}),u},t.prototype.De=function(t,e){return e.foreach(function(e,n){t=t.updateChild(e,n)}),t},t.prototype.Oe=function(t,e,n,r,i,o,s){var a=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:Le.Empty.setTree(e,n);var h=t.getServerCache().getNode();return u.children.inorderTraversal(function(e,n){if(h.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),l=a.De(u,n);c=a.Ee(c,new v(e),l,r,i,o,s)}}),u.children.inorderTraversal(function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!h.hasChild(e)&&!u){var l=t.getServerCache().getNode().getImmediateChild(e),p=a.De(l,n);c=a.Ee(c,new v(e),p,r,i,o,s)}}),c},t.prototype.Te=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var s=t.getServerCache().isFiltered(),a=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&a.isFullyInitialized()||a.isCompleteForPath(e))return this.Ee(t,e,a.getNode().getChild(e),r,i,s,o);if(e.isEmpty()){var u=Le.Empty;return a.getNode().forEachChild(dt,function(t,e){u=u.set(new v(t),e)}),this.Oe(t,e,u,r,i,s,o)}return t}var c=Le.Empty;return n.foreach(function(t,n){var r=e.child(t);a.isCompleteForPath(r)&&(c=c.set(t,a.getNode().getChild(r)))}),this.Oe(t,e,c,r,i,s,o)},t.prototype.Ne=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.Pe(o,e,n,$e,r)},t.prototype.Se=function(t,e,n,r,i){var o;if(null!=n.shadowingWrite(e))return t;var s=new Je(n,t,r),a=t.getEventCache().getNode(),u=void 0;if(e.isEmpty()||".priority"===e.getFront()){var c=void 0;if(t.getServerCache().isFullyInitialized())c=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var h=t.getServerCache().getNode();Object(Ze.a)(h instanceof Vt,"serverChildren would be complete if leaf node"),c=n.calcCompleteEventChildren(h)}c=c,u=this.be.updateFullNode(a,c,i)}else{var l=e.getFront(),p=n.calcCompleteChild(l,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(l)&&(p=a.getImmediateChild(l)),u=null!=p?this.be.updateChild(a,l,p,e.popFront(),s,i):t.getEventCache().getNode().hasChild(l)?this.be.updateChild(a,l,Vt.EMPTY_NODE,e.popFront(),s,i):a,u.isEmpty()&&t.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(t.getCompleteServerSnap()),o.isLeafNode()&&(u=this.be.updateFullNode(u,o,i)))}return o=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(v.Empty),t.updateEventSnap(u,o,this.be.filtersNodes())},t}(),nn=n(0),rn=function(){function t(t){this.je=t,this.Xt=this.je.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach(function(t){t.type===Be.CHILD_CHANGED&&r.Xt.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(Be.childMovedChange(t.childName,t.snapshotNode))}),this.xe(i,Be.CHILD_REMOVED,t,n,e),this.xe(i,Be.CHILD_ADDED,t,n,e),this.xe(i,Be.CHILD_MOVED,o,n,e),this.xe(i,Be.CHILD_CHANGED,t,n,e),this.xe(i,Be.VALUE,t,n,e),i},t.prototype.xe=function(t,e,n,r,i){var o=this,s=n.filter(function(t){return t.type===e});s.sort(this.ke.bind(this)),s.forEach(function(e){var n=o.Fe(e,i);r.forEach(function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.je))})})},t.prototype.Fe=function(t,e){return"value"===t.type||"child_removed"===t.type?t:(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.Xt),t)},t.prototype.ke=function(t,e){if(null==t.childName||null==e.childName)throw Object(nn.b)("Should only compare child_ events.");var n=new st(t.childName,t.snapshotNode),r=new st(e.childName,e.snapshotNode);return this.Xt.compare(n,r)},t}(),on=n(0),sn=function(){function t(t,e){this.je=t,this.Ae=[];var n=this.je.getQueryParams(),r=new Ke(n.getIndex()),i=n.getNodeFilter();this.Le=new en(i);var o=e.getServerCache(),s=e.getEventCache(),a=r.updateFullNode(Vt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Vt.EMPTY_NODE,s.getNode(),null),c=new Ue(a,o.isFullyInitialized(),r.filtersNodes()),h=new Ue(u,s.isFullyInitialized(),i.filtersNodes());this.ge=new Ve(h,c),this.Me=new rn(this.je)}return t.prototype.getQuery=function(){return this.je},t.prototype.getServerCache=function(){return this.ge.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.ge.getCompleteServerSnap();return e&&(this.je.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.Ae.length},t.prototype.addEventRegistration=function(t){this.Ae.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){Object(on.a)(null==t,"A cancel should cancel all event registrations.");var r=this.je.path;this.Ae.forEach(function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)})}if(t){for(var i=[],o=0;othis.He,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.Be.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.Ve=this.Ve.addWrite(t,e)),this.He=n},t.prototype.addMerge=function(t,e,n){Object(fn.a)(n>this.He,"Stacking an older merge on top of newer ones"),this.Be.push({path:t,children:e,writeId:n,visible:!0}),this.Ve=this.Ve.addWrites(t,e),this.He=n},t.prototype.getWrite=function(t){for(var e=0;e=0,"removeWrite called with nonexistent writeId.");var r=this.Be[n];this.Be.splice(n,1);for(var i=r.visible,o=!1,s=this.Be.length-1;i&&s>=0;){var a=this.Be[s];a.visible&&(s>=n&&this.Ke(a,r.path)?i=!1:r.path.contains(a.path)&&(o=!0)),s--}if(i){if(o)return this.Ye(),!0;if(r.snap)this.Ve=this.Ve.removeWrite(r.path);else{var u=r.children;Object(dn.f)(u,function(t){e.Ve=e.Ve.removeWrite(r.path.child(t))})}return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.Ve.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.Ve.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(v.Empty)){var s=function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))},a=t.ze(this.Be,s,e),u=n||Vt.EMPTY_NODE;return a.apply(u)}return null}var c=this.Ve.getCompleteNode(e);if(null!=c)return c;var h=this.Ve.childCompoundWrite(e);if(h.isEmpty())return n;if(null!=n||h.hasCompleteWrite(v.Empty)){var u=n||Vt.EMPTY_NODE;return h.apply(u)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Vt.EMPTY_NODE,r=this.Ve.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(Nt,function(t,e){n=n.updateImmediateChild(t,e)}),n;if(e){var i=this.Ve.childCompoundWrite(t);return e.forEachChild(Nt,function(t,e){var r=i.childCompoundWrite(new v(t)).apply(e);n=n.updateImmediateChild(t,r)}),i.getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n}return this.Ve.childCompoundWrite(t).getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){Object(fn.a)(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.Ve.hasCompleteWrite(i))return null;var o=this.Ve.childCompoundWrite(i);return o.isEmpty()?r.getChild(e):o.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.Ve.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.Ve.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.Ve.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var s,a=this.Ve.childCompoundWrite(t),u=a.getCompleteNode(v.Empty);if(null!=u)s=u;else{if(null==e)return[];s=a.apply(e)}if(s=s.withIndex(o),s.isEmpty()||s.isLeafNode())return[];for(var c=[],h=o.getCompare(),l=i?s.getReverseIteratorFrom(n,o):s.getIteratorFrom(n,o),p=l.getNext();p&&c.length0?this.He=this.Be[this.Be.length-1].writeId:this.He=-1},t.Ge=function(t){return t.visible},t.ze=function(t,e,n){for(var r=pn.Empty,i=0;i0&&!r&&(h?this.$e.stopListening(t.pn(e),null):c.forEach(function(e){var n=i.en[t.an(e)];i.$e.stopListening(t.pn(e),n)})),this.fn(c)}return a},t.prototype.calcCompleteEventCache=function(t,e){var n=this.Ze,r=this.Je.findOnPath(t,function(e,n){var r=v.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.hn=function(t){return t.fold(function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),Object(mn.f)(n,function(t,e){r=r.concat(e)}),r})},t.prototype.fn=function(e){for(var n=0;n0&&Object(Tn.b)(t.wn,e)&&(n[e]=i,r=!0)}),r&&this.En.reportStats(n),Object(Nn.x)(this.Sn.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Dn=n(1),jn=function(){function t(){this.Tn=[],this.Nn=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;ndocument.domain="'+document.domain+'";<\/script>');var s=""+o+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(t){Object($n.s)("frame writing exception"),t.stack&&Object($n.s)(t.stack),Object($n.s)(t)}}}return t.qn=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||Object($n.s)("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var e=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)},Math.floor(0))),Object(er.b)()&&this.myID){var n={};n.disconn="t",n.id=this.myID,n.pw=this.myPW;var r=this.urlFn(n);t.nodeRestRequest(r)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.Qn(););},t.prototype.Qn=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+30+n.length<=1870;){var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.Un(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.Qn()},t.prototype.Un=function(t,e){var n=this;this.outstandingRequests.add(e,1);var r=function(){n.outstandingRequests.remove(e),n.Qn()},i=setTimeout(r,Math.floor(25e3)),o=function(){clearTimeout(i),r()};this.addTag(t,o)},t.prototype.addTag=function(t,e){var n=this;Object(er.b)()?this.doNodeLongPoll(t,e):setTimeout(function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){Object($n.s)("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(t){}},Math.floor(1))},t}(),sr=n(18),ar=n(1),ur=function(){function t(t){this.Vn(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[ir,sr.a]},enumerable:!0,configurable:!0}),t.prototype.Vn=function(e){var n=sr.a&&sr.a.isAvailable(),r=n&&!sr.a.previouslyFailed();if(e.webSocketOnly&&(n||Object(ar.B)("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.Bn=[sr.a];else{var i=this.Bn=[];Object(ar.i)(t.ALL_TRANSPORTS,function(t,e){e&&e.isAvailable()&&i.push(e)})}},t.prototype.initialTransport=function(){if(this.Bn.length>0)return this.Bn[0];throw Error("No transports available")},t.prototype.upgradeTransport=function(){return this.Bn.length>1?this.Bn[1]:null},t}(),cr=n(1),hr=n(8),lr=n(9),pr=function(){function t(t,e,n,r,i,o,s){this.id=t,this.Hn=e,this.Fn=n,this.Kn=r,this.An=i,this.Yn=o,this.lastSessionId=s,this.connectionCount=0,this.pendingDataMessages=[],this.zn=0,this.X=Object(cr.t)("c:"+this.id+":"),this.Gn=new ur(e),this.X("Connection created"),this.Xn()}return t.prototype.Xn=function(){var t=this,e=this.Gn.initialTransport();this.$n=new e(this.Jn(),this.Hn,void 0,this.lastSessionId),this.Zn=e.responsesRequiredToBeHealthy||0;var n=this.tr(this.$n),r=this.er(this.$n);this.nr=this.$n,this.rr=this.$n,this.ir=null,this.or=!1,setTimeout(function(){t.$n&&t.$n.open(n,r)},Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.sr=Object(cr.x)(function(){t.sr=null,t.or||(t.$n&&t.$n.bytesReceived>102400?(t.X("Connection exceeded healthy timeout but has received "+t.$n.bytesReceived+" bytes. Marking connection healthy."),t.or=!0,t.$n.markConnectionHealthy()):t.$n&&t.$n.bytesSent>10240?t.X("Connection exceeded healthy timeout but has sent "+t.$n.bytesSent+" bytes. Leaving connection alive."):(t.X("Closing unhealthy connection after timeout."),t.close()))},Math.floor(i)))},t.prototype.Jn=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.er=function(t){var e=this;return function(n){t===e.$n?e.ar(n):t===e.ir?(e.X("Secondary connection lost."),e.ur()):e.X("closing an old connection")}},t.prototype.tr=function(t){var e=this;return function(n){2!=e.zn&&(t===e.rr?e.cr(n):t===e.ir?e.hr(n):e.X("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.lr(e)},t.prototype.tryCleanupConnection=function(){this.nr===this.ir&&this.rr===this.ir&&(this.X("cleaning up and promoting a connection: "+this.ir.connId),this.$n=this.ir,this.ir=null)},t.prototype.pr=function(t){if("t"in t){var e=t.t;"a"===e?this.dr():"r"===e?(this.X("Got a reset on secondary, closing it"),this.ir.close(),this.nr!==this.ir&&this.rr!==this.ir||this.close()):"o"===e&&(this.X("got pong on secondary."),this.fr--,this.dr())}},t.prototype.hr=function(t){var e=Object(cr.w)("t",t),n=Object(cr.w)("d",t);if("c"==e)this.pr(n);else{if("d"!=e)throw Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.dr=function(){this.fr<=0?(this.X("Secondary connection is healthy."),this.or=!0,this.ir.markConnectionHealthy(),this._r()):(this.X("sending ping on secondary."),this.ir.send({t:"c",d:{t:"p",d:{}}}))},t.prototype._r=function(){this.ir.start(),this.X("sending client ack on secondary"),this.ir.send({t:"c",d:{t:"a",d:{}}}),this.X("Ending transmission on primary"),this.$n.send({t:"c",d:{t:"n",d:{}}}),this.nr=this.ir,this.tryCleanupConnection()},t.prototype.cr=function(t){var e=Object(cr.w)("t",t),n=Object(cr.w)("d",t);"c"==e?this.yr(n):"d"==e&&this.vr(n)},t.prototype.vr=function(t){this.gr(),this.Fn(t)},t.prototype.gr=function(){this.or||--this.Zn<=0&&(this.X("Primary connection is healthy."),this.or=!0,this.$n.markConnectionHealthy())},t.prototype.yr=function(t){var e=Object(cr.w)("t",t);if("d"in t){var n=t.d;if("h"===e)this.mr(n);else if("n"===e){this.X("recvd end transmission on primary"),this.rr=this.ir;for(var r=0;r3e4&&(this.Wr=wr),this.$r=null}}else this.X("Window isn't visible. Delaying reconnect."),this.Wr=this.qr,this.Xr=(new Date).getTime();var e=(new Date).getTime()-this.Xr,n=Math.max(0,this.Wr-e);n=Math.random()*n,this.X("Trying to reconnect in "+n+"ms"),this.Jr(n),this.Wr=Math.min(this.qr,1.3*this.Wr)}this.Ir(!1)},e.prototype._i=function(){if(this.gi()){this.X("Making a connection attempt"),this.Xr=(new Date).getTime(),this.$r=null;var t=this.vr.bind(this),n=this.Kn.bind(this),r=this.yi.bind(this),i=this.id+":"+e.mi++,o=this,s=this.lastSessionId,a=!1,u=null,c=function(){u?u.close():(a=!0,r())},h=function(t){Object(vr.a)(u,"sendRequest call when we're not connected not allowed."),u.sendRequest(t)};this.Hr={close:c,sendRequest:h};var l=this.Yr;this.Yr=!1,this.Rr.getToken(l).then(function(e){a?Object(gr.s)("getToken() completed but was canceled"):(Object(gr.s)("getToken() completed. Creating connection."),o.Kr=e&&e.accessToken,u=new pr(i,o.Hn,t,n,r,function(t){Object(gr.B)(t+" ("+o.Hn+")"),o.interrupt("server_kill")},s))}).then(null,function(t){o.X("Failed to get token: "+t),a||(mr.a.NODE_ADMIN&&Object(gr.B)(t),c())})}},e.prototype.interrupt=function(t){Object(gr.s)("Interrupting connection for reason: "+t),this.xr[t]=!0,this.Hr?this.Hr.close():(this.Ur&&(clearTimeout(this.Ur),this.Ur=null),this.Mr&&this.yi())},e.prototype.resume=function(t){Object(gr.s)("Resuming connection for reason: "+t),delete this.xr[t],Object(_r.j)(this.xr)&&(this.Wr=wr,this.Hr||this.Jr(0))},e.prototype.pi=function(t){var e=t-(new Date).getTime();this.Pr({serverTimeOffset:e})},e.prototype.vi=function(){for(var t=0;t=3&&(this.Wr=3e4,this.Rr.notifyForInvalidToken())},e.prototype.li=function(t){this.Qr?this.Qr(t):"msg"in t&&"undefined"!=typeof console&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.fi=function(){var t=this;this.tryAuth(),Object(_r.f)(this.kr,function(e,n){Object(_r.f)(n,function(e,n){t.ei(n)})});for(var e=0;e=200&&a.status<300){try{t=Object(Rr.a)(a.responseText)}catch(t){Object(Pr.B)("Failed to parse JSON response for "+s+": "+a.responseText)}n(null,t)}else 401!==a.status&&404!==a.status&&Object(Pr.B)("Got unsuccessful REST response for "+s+" Status: "+a.status),n(a.status);n=null}},a.open("GET",s,!0),a.send()})},e}(dr),kr=n(3),Fr=n(1),Ar=n(2),Lr=n(12),Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr=function(){function t(t,e,n){var r=this;this.Hn=t,this.app=n,this.dataUpdateCount=0,this.On=null,this.Ei=new jn,this.wi=1,this.Oi=null,this.An=new Ce,this.Si=null;var i=new wn(n);if(this.$=Lr.a.getCollection(t),e||Object(Fr.g)())this.En=new xr(this.Hn,this.Nr.bind(this),i),setTimeout(this.Ir.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if("object"!==(void 0===o?"undefined":Mr(o)))throw Error("Only objects are supported for option databaseAuthVariableOverride");try{Object(kr.b)(o)}catch(t){throw Error("Invalid authOverride provided: "+t)}}this.Si=new Sr(this.Hn,this.Nr.bind(this),this.Ir.bind(this),this.Pr.bind(this),i,o),this.En=this.Si}i.addTokenChangeListener(function(t){r.En.refreshAuthToken(t)}),this.Ti=Lr.a.getOrCreateReporter(t,function(){return new Rn(r.$,r.En)}),this.Ni(),this.Ii=new Cn,this.Pi=new bn({startListening:function(t,e,n,i){var o=[],s=r.Ii.getNode(t.path);return s.isEmpty()||(o=r.Pi.applyServerOverwrite(t.path,s),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.Ri("connected",!1),this.Di=new bn({startListening:function(t,e,n,i){return r.En.listen(t,n,e,function(e,n){var o=i(e,n);r.Ei.raiseEventsForChangedPath(t.path,o)}),[]},stopListening:function(t,e){r.En.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.Hn.secure?"https://":"http://")+this.Hn.host},t.prototype.name=function(){return this.Hn.namespace},t.prototype.serverTime=function(){var t=this.Ii.getNode(new v(".info/serverTimeOffset")),e=t.val()||0;return(new Date).getTime()+e},t.prototype.generateServerValues=function(){return Oe({timestamp:this.serverTime()})},t.prototype.Nr=function(t,e,n,r){this.dataUpdateCount++;var i=new v(t);e=this.Oi?this.Oi(t,e):e;var o=[];if(r)if(n){var s=Object(Ar.k)(e,function(t){return a(t)});o=this.Di.applyTaggedQueryMerge(i,s,r)}else{var u=a(e);o=this.Di.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=Object(Ar.k)(e,function(t){return a(t)});o=this.Di.applyServerMerge(i,c)}else{var h=a(e);o=this.Di.applyServerOverwrite(i,h)}var l=i;o.length>0&&(l=this.ji(i)),this.Ei.raiseEventsForChangedPath(l,o)},t.prototype.xi=function(t){this.Oi=t},t.prototype.Ir=function(t){this.Ri("connected",t),!1===t&&this.ki()},t.prototype.Pr=function(t){var e=this;Object(Fr.i)(t,function(t,n){e.Ri(n,t)})},t.prototype.Ri=function(t,e){var n=new v("/.info/"+t),r=a(e);this.Ii.updateSnapshot(n,r);var i=this.Pi.applyServerOverwrite(n,r);this.Ei.raiseEventsForChangedPath(n,i)},t.prototype.Fi=function(){return this.wi++},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.X("set",{path:""+t,value:e,priority:n});var o=this.generateServerValues(),s=a(e,n),u=Ne(s,o),c=this.Fi(),h=this.Di.applyUserOverwrite(t,u,c,!0);this.Ei.queueEvents(h),this.En.put(""+t,s.val(!0),function(e,n){var o="ok"===e;o||Object(Fr.B)("set at "+t+" failed: "+e);var s=i.Di.ackUserWrite(c,!o);i.Ei.raiseEventsForChangedPath(t,s),i.callOnCompleteCallback(r,e,n)});var l=this.Ai(t);this.ji(l),this.Ei.raiseEventsForChangedPath(l,[])},t.prototype.update=function(t,e,n){var r=this;this.X("update",{path:""+t,value:e});var i=!0,o=this.generateServerValues(),s={};if(Object(Ar.f)(e,function(t,e){i=!1;var n=a(e);s[t]=Ne(n,o)}),i)Object(Fr.s)("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var u=this.Fi(),c=this.Di.applyUserMerge(t,s,u);this.Ei.queueEvents(c),this.En.merge(""+t,e,function(e,i){var o="ok"===e;o||Object(Fr.B)("update at "+t+" failed: "+e);var s=r.Di.ackUserWrite(u,!o),a=s.length>0?r.ji(t):t;r.Ei.raiseEventsForChangedPath(a,s),r.callOnCompleteCallback(n,e,i)}),Object(Ar.f)(e,function(e){var n=r.Ai(t.child(e));r.ji(n)}),this.Ei.raiseEventsForChangedPath(t,[])}},t.prototype.ki=function(){var t=this;this.X("onDisconnectEvents");var e=this.generateServerValues(),n=Te(this.An,e),r=[];n.forEachTree(v.Empty,function(e,n){r=r.concat(t.Di.applyServerOverwrite(e,n));var i=t.Ai(e);t.ji(i)}),this.An=new Ce,this.Ei.raiseEventsForChangedPath(v.Empty,r)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.En.onDisconnectCancel(""+t,function(r,i){"ok"===r&&n.An.forget(t),n.callOnCompleteCallback(e,r,i)})},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=a(e);this.En.onDisconnectPut(""+t,i.val(!0),function(e,o){"ok"===e&&r.An.remember(t,i),r.callOnCompleteCallback(n,e,o)})},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=a(e,n);this.En.onDisconnectPut(""+t,o.val(!0),function(e,n){"ok"===e&&i.An.remember(t,o),i.callOnCompleteCallback(r,e,n)})},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(Object(Ar.j)(e))return Object(Fr.s)("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.En.onDisconnectMerge(""+t,e,function(i,o){"ok"===i&&Object(Ar.f)(e,function(e,n){var i=a(n);r.An.remember(t.child(e),i)}),r.callOnCompleteCallback(n,i,o)})},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.Pi.addEventRegistration(t,e):this.Di.addEventRegistration(t,e),this.Ei.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.Pi.removeEventRegistration(t,e):this.Di.removeEventRegistration(t,e),this.Ei.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.Si&&this.Si.interrupt("repo_interrupt")},t.prototype.resume=function(){this.Si&&this.Si.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!=typeof console){var e;t?(this.On||(this.On=new Sn(this.$)),e=this.On.get()):e=this.$.get();var n=Object.keys(e).reduce(function(t,e){return Math.max(e.length,t)},0);Object(Ar.f)(e,function(t,e){for(var r=t.length;r=0)return null!=i&&i.trackChildChange(Be.childChangedChange(e,n,l)),a.updateImmediateChild(e,n);null!=i&&i.trackChildChange(Be.childRemovedChange(e,l));var f=a.updateImmediateChild(e,Vt.EMPTY_NODE);return null!=p&&this.Vi.matches(p)?(null!=i&&i.trackChildChange(Be.childAddedChange(p.name,p.node)),f.updateImmediateChild(p.name,p.node)):f}return n.isEmpty()?t:h&&o(c,u)>=0?(null!=i&&(i.trackChildChange(Be.childRemovedChange(c.name,c.node)),i.trackChildChange(Be.childAddedChange(e,n))),a.updateImmediateChild(e,n).updateImmediateChild(c.name,Vt.EMPTY_NODE)):t},t}(),Vr=n(0),Br=n(1),Hr=n(3),Kr=function(){function t(){this.Yi=!1,this.zi=!1,this.Gi=!1,this.Xi=!1,this.$i=!1,this.Bi=0,this.Ji="",this.Zi=null,this.to="",this.eo=null,this.no="",this.Xt=Nt}return t.prototype.hasStart=function(){return this.zi},t.prototype.isViewFromLeft=function(){return""===this.Ji?this.zi:this.Ji===t.ro.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return Object(Vr.a)(this.zi,"Only valid if start has been set"),this.Zi},t.prototype.getIndexStartName=function(){return Object(Vr.a)(this.zi,"Only valid if start has been set"),this.Gi?this.to:Br.c},t.prototype.hasEnd=function(){return this.Xi},t.prototype.getIndexEndValue=function(){return Object(Vr.a)(this.Xi,"Only valid if end has been set"),this.eo},t.prototype.getIndexEndName=function(){return Object(Vr.a)(this.Xi,"Only valid if end has been set"),this.$i?this.no:Br.b},t.prototype.hasLimit=function(){return this.Yi},t.prototype.hasAnchoredLimit=function(){return this.Yi&&""!==this.Ji},t.prototype.getLimit=function(){return Object(Vr.a)(this.Yi,"Only valid if limit has been set"),this.Bi},t.prototype.getIndex=function(){return this.Xt},t.prototype.io=function(){var e=new t;return e.Yi=this.Yi,e.Bi=this.Bi,e.zi=this.zi,e.Zi=this.Zi,e.Gi=this.Gi,e.to=this.to,e.Xi=this.Xi,e.eo=this.eo,e.$i=this.$i,e.no=this.no,e.Xt=this.Xt,e.Ji=this.Ji,e},t.prototype.limit=function(t){var e=this.io();return e.Yi=!0,e.Bi=t,e.Ji="",e},t.prototype.limitToFirst=function(e){var n=this.io();return n.Yi=!0,n.Bi=e,n.Ji=t.ro.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.io();return n.Yi=!0,n.Bi=e,n.Ji=t.ro.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.io();return n.zi=!0,void 0===t&&(t=null),n.Zi=t,null!=e?(n.Gi=!0,n.to=e):(n.Gi=!1,n.to=""),n},t.prototype.endAt=function(t,e){var n=this.io();return n.Xi=!0,void 0===t&&(t=null),n.eo=t,void 0!==e?(n.$i=!0,n.no=e):(n.$i=!1,n.no=""),n},t.prototype.orderBy=function(t){var e=this.io();return e.Xt=t,e},t.prototype.getQueryObject=function(){var e=t.ro,n={};if(this.zi&&(n[e.INDEX_START_VALUE]=this.Zi,this.Gi&&(n[e.INDEX_START_NAME]=this.to)),this.Xi&&(n[e.INDEX_END_VALUE]=this.eo,this.$i&&(n[e.INDEX_END_NAME]=this.no)),this.Yi){n[e.LIMIT]=this.Bi;var r=this.Ji;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.Xt!==Nt&&(n[e.INDEX]=""+this.Xt),n},t.prototype.loadsAllData=function(){return!(this.zi||this.Xi||this.Yi)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.Xt==Nt},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new Ke(this.getIndex()):this.hasLimit()?new Ur(this):new qr(this)},t.prototype.toRestQueryStringParameters=function(){var e=t.oo,n={};if(this.isDefault())return n;var r;return this.Xt===Nt?r=e.PRIORITY_INDEX:this.Xt===ee?r=e.VALUE_INDEX:this.Xt===dt?r=e.KEY_INDEX:(Object(Vr.a)(this.Xt instanceof oe,"Unrecognized index type!"),r=""+this.Xt),n[e.ORDER_BY]=Object(Hr.b)(r),this.zi&&(n[e.START_AT]=Object(Hr.b)(this.Zi),this.Gi&&(n[e.START_AT]+=","+Object(Hr.b)(this.to))),this.Xi&&(n[e.END_AT]=Object(Hr.b)(this.eo),this.$i&&(n[e.END_AT]+=","+Object(Hr.b)(this.no))),this.Yi&&(this.isViewFromLeft()?n[e.LIMIT_TO_FIRST]=this.Bi:n[e.LIMIT_TO_LAST]=this.Bi),n},t.ro={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.oo={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),Yr=n(1),zr=n(4),Gr=this&&this.I||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xr=function(t){function e(e,n){if(!(e instanceof Wr))throw Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,Kr.DEFAULT,!1)||this}return Gr(e,t),e.prototype.getKey=function(){return P("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return P("Reference.child",1,1,arguments.length),"number"==typeof t?t+="":t instanceof v||(null===this.path.getFront()?X("Reference.child",1,t,!1):G("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){P("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){P("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){P("Reference.set",1,2,arguments.length),$("Reference.set",this.path),U("Reference.set",1,t,this.path,!1),R("Reference.set",2,e,!0);var n=new zr.a;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(P("Reference.update",1,2,arguments.length),$("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;Object(Zr.f)(this.zt.children,function(r,i){e(new t(r,n,i))})},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild(function(e){e.forEachDescendant(t,!0,n)}),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild(function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)})},t.prototype.path=function(){return new v(null===this.ao?this.so:this.ao.path()+"/"+this.so)},t.prototype.name=function(){return this.so},t.prototype.parent=function(){return this.ao},t.prototype.uo=function(){null!==this.ao&&this.ao.co(this.so,this)},t.prototype.co=function(t,e){var n=e.isEmpty(),r=Object(Zr.b)(this.zt.children,t);n&&r?(delete this.zt.children[t],this.zt.childCount--,this.uo()):n||r||(this.zt.children[t]=e.zt,this.zt.childCount++,this.uo())},t}(),ni=n(0),ri=n(1),ii=n(2),oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}($r||($r={})),Wr.ho=25,Wr.prototype.Ni=function(){this.lo=new ei},Wr.prototype.startTransaction=function(t,e,n,r){this.X("transaction on "+t);var i=function(){},o=new Xr(this,t);o.on("value",i);var s=function(){o.off("value",i)},u={path:t,update:e,onComplete:n,status:null,order:Object(ri.a)(),applyLocally:r,retryCount:0,unwatcher:s,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},c=this.po(t);u.currentInputSnapshot=c;var h=u.update(c.val());if(void 0===h){if(u.unwatcher(),u.currentOutputSnapshotRaw=null,u.currentOutputSnapshotResolved=null,u.onComplete){var l=new se(u.currentInputSnapshot,new Xr(this,u.path),Nt);u.onComplete(null,!1,l)}}else{V("transaction failed: Data returned ",h,u.path),u.status=$r.RUN;var p=this.lo.subTree(t),d=p.getValue()||[];d.push(u),p.setValue(d);var f=void 0;"object"===(void 0===h?"undefined":oi(h))&&null!==h&&Object(ii.b)(h,".priority")?(f=Object(ii.l)(h,".priority"),Object(ni.a)(Q(f),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):f=(this.Di.calcCompleteEventCache(t)||Vt.EMPTY_NODE).getPriority().val(),f=f;var _=this.generateServerValues(),y=a(h,f),v=Ne(y,_);u.currentOutputSnapshotRaw=y,u.currentOutputSnapshotResolved=v,u.currentWriteId=this.Fi();var g=this.Di.applyUserOverwrite(t,v,u.currentWriteId,u.applyLocally);this.Ei.raiseEventsForChangedPath(t,g),this.do()}},Wr.prototype.po=function(t,e){return this.Di.calcCompleteEventCache(t,e)||Vt.EMPTY_NODE},Wr.prototype.do=function(t){var e=this;if(void 0===t&&(t=this.lo),t||this.fo(t),null!==t.getValue()){var n=this._o(t);Object(ni.a)(n.length>0,"Sending zero length transaction queue"),n.every(function(t){return t.status===$r.RUN})&&this.yo(t.path(),n)}else t.hasChildren()&&t.forEachChild(function(t){e.do(t)})},Wr.prototype.yo=function(t,e){for(var n=this,r=e.map(function(t){return t.currentWriteId}),i=this.po(t,r),o=i,s=i.hash(),a=0;a=Wr.ho)h=!0,l="maxretry",r=r.concat(this.Di.ackUserWrite(u.currentWriteId,!0));else{var p=this.po(u.path,o);u.currentInputSnapshot=p;var d=t[s].update(p.val());if(void 0!==d){V("transaction failed: Data returned ",d,u.path);var f=a(d),_="object"===(void 0===d?"undefined":oi(d))&&null!=d&&Object(ii.b)(d,".priority");_||(f=f.updatePriority(p.getPriority()));var y=u.currentWriteId,g=this.generateServerValues(),m=Ne(f,g);u.currentOutputSnapshotRaw=f,u.currentOutputSnapshotResolved=m,u.currentWriteId=this.Fi(),o.splice(o.indexOf(y),1),r=r.concat(this.Di.applyUserOverwrite(u.path,m,u.currentWriteId,u.applyLocally)),r=r.concat(this.Di.ackUserWrite(y,!0))}else h=!0,l="nodata",r=r.concat(this.Di.ackUserWrite(u.currentWriteId,!0))}if(this.Ei.raiseEventsForChangedPath(e,r),r=[],h&&(t[s].status=$r.COMPLETED,function(t){setTimeout(t,Math.floor(0))}(t[s].unwatcher),t[s].onComplete))if("nodata"===l){var b=new Xr(this,t[s].path),C=t[s].currentInputSnapshot,E=new se(C,b,Nt);n.push(t[s].onComplete.bind(null,null,!1,E))}else n.push(t[s].onComplete.bind(null,Error(l),!1,null))}this.fo(this.lo);for(var s=0;s0?n:null)}t.forEachChild(function(t){e.fo(t)})},Wr.prototype.Ai=function(t){var e=this,n=this.vo(t).path(),r=this.lo.subTree(t);return r.forEachAncestor(function(t){e.bo(t)}),this.bo(r),r.forEachDescendant(function(t){e.bo(t)}),n},Wr.prototype.bo=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,o=0;o>6,128|63&r);else if(55296==(64512&r)){var o=n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189)}else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function T(t){var e;try{e=decodeURIComponent(t)}catch(t){throw g(ee.DATA_URL,"Malformed data URL.")}return U(e)}function A(t,e){switch(t){case ee.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r){var o=n?"-":"_";throw g(t,"Invalid character '"+o+"' found: is it base64url encoded?")}break;case ee.BASE64URL:var i=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(i||a){var o=i?"+":"/";throw g(t,"Invalid character '"+o+"' found: is it base64 encoded?")}e=e.replace(/-/g,"+").replace(/_/g,"/")}var u;try{u=atob(e)}catch(e){throw g(t,"Invalid character found")}for(var s=new Uint8Array(u.length),c=0;c=e.length)&&t.substring(t.length-e.length)===e}function S(t){switch(t){case ie.RUNNING:case ie.PAUSING:case ie.CANCELING:return ae.RUNNING;case ie.PAUSED:return ae.PAUSED;case ie.SUCCESS:return ae.SUCCESS;case ie.CANCELED:return ae.CANCELED;case ie.ERROR:default:return ae.ERROR}}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function I(t,e){for(var n in t)k(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return I(t,function(t,n){e[t]=n}),e}function x(t){return new ue.b(t)}function P(t){return ue.b.resolve(t)}function D(t){return ue.b.reject(t)}function M(t){return null!=t}function W(t){return void 0!==t}function B(t){return"function"==typeof t}function G(t){return"object"===(void 0===t?"undefined":se(t))}function j(t){return G(t)&&null!==t}function q(t){return G(t)&&!Array.isArray(t)}function F(t){return"string"==typeof t||t instanceof String}function H(t){return"number"==typeof t||t instanceof Number}function z(t){return X()&&t instanceof Blob}function X(){return"undefined"!=typeof Blob}function V(t){var e;try{e=JSON.parse(t)}catch(t){return null}return q(e)?e:null}function K(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}function Z(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}function J(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function Q(t){return Xt+Kt+t}function Y(t){return Vt+Kt+t}function $(t){return Xt+Zt+t}function tt(t){var e=encodeURIComponent,n="?";return I(t,function(t,r){var o=e(t)+"="+e(r);n=n+o+"&"}),n=n.slice(0,-1)}function et(t,e){return e}function nt(t){return!F(t)||t.length<2?t:(t=t,J(t))}function rt(){function t(t,e){return nt(e)}function e(t,e){return M(e)?+e:e}function n(t,e){if(!(F(e)&&e.length>0))return[];var n=encodeURIComponent;return e.split(",").map(function(e){var r=t.bucket,o=t.fullPath;return Y("/b/"+n(r)+"/o/"+n(o))+tt({alt:"media",token:e})})}if(fe)return fe;var r=[];r.push(new he("bucket")),r.push(new he("generation")),r.push(new he("metageneration")),r.push(new he("name","fullPath",!0));var o=new he("name");o.xform=t,r.push(o);var i=new he("size");return i.xform=e,r.push(i),r.push(new he("timeCreated")),r.push(new he("updated")),r.push(new he("md5Hash",null,!0)),r.push(new he("cacheControl",null,!0)),r.push(new he("contentDisposition",null,!0)),r.push(new he("contentEncoding",null,!0)),r.push(new he("contentLanguage",null,!0)),r.push(new he("contentType",null,!0)),r.push(new he("metadata","customMetadata",!0)),r.push(new he("downloadTokens","downloadURLs",!1,n)),fe=r}function ot(t,e){function n(){var n=t.bucket,r=t.fullPath,o=new pe(n,r);return e.makeStorageReference(o)}Object.defineProperty(t,"ref",{get:n})}function it(t,e,n){var r={};r.type="file";for(var o=n.length,i=0;i=0))throw"Expected a number 0 or greater."}return new de(t)}function _t(t,e){function n(e){if(!(null===e||M(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)}return new de(n,e)}function vt(t){function e(t){if(null!==t&&!B(t))throw"Expected a Function."}return new de(e,t)}function bt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function mt(){for(var t=[],e=0;e0&&(p=Math.min(p,o));var h=c.current,_=h+p,v=p===l?"upload, finalize":"upload",b={"X-Goog-Upload-Command":v,"X-Goog-Upload-Offset":c.current},m=r.slice(h,_);if(null===m)throw f();var y=e.maxUploadRetryTime(),g=new ve(n,"POST",s,y);return g.headers=b,g.body=m.uploadData(),g.progressCallback=u||null,g.errorHandler=Tt(t),g}function Mt(t){return function(){for(var e=[],n=0;n0&&(t.Authorization="Firebase "+e)}function jt(t){var e="undefined"!=typeof firebase?firebase.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,i=L(t.headers);return Gt(i,e),jt(i),new Te(o,t.method,i,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}function Ft(t,e,n){return new Ne(t,new le,n)}function Ht(t){var e={TaskState:ae,TaskEvent:oe,StringFormat:ee,Storage:Ne,Reference:Re};t.INTERNAL.registerService(Ce,Ft,e,void 0,!0)}Object.defineProperty(e,"__esModule",{value:!0});var zt,Xt="https://firebasestorage.googleapis.com",Vt="https://firebasestorage.googleapis.com",Kt="/v0",Zt="/v0",Jt=12e4,Qt=6e4,Yt=-9007199254740991,$t=function(){function t(t,e){this.t=r(t),this.e="Firebase Storage: "+e,this.n=null,this.r="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return r(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.n},t.prototype.setServerResponseProp=function(t){this.n=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.n},enumerable:!0,configurable:!0}),t}(),te={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},ee={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},ne=function(){function t(t,e){this.data=t,this.contentType=e||null}return t}(),re=function(){function t(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw g(ee.DATA_URL,"Must be formatted 'data:[][;base64],");var n=e[1]||null;null!=n&&(this.base64=C(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=t.substring(t.indexOf(",")+1)}return t}(),oe={STATE_CHANGED:"state_changed"},ie={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},ae={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"},ue=n(4),se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(zt||(zt={}));var ce=function(){function t(){var t=this;this.o=!1,this.i=new XMLHttpRequest,this.a=zt.NO_ERROR,this.u=x(function(e,n){t.i.addEventListener("abort",function(n){t.a=zt.ABORT,e(t)}),t.i.addEventListener("error",function(n){t.a=zt.NETWORK_ERROR,e(t)}),t.i.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var o=this;if(this.o)throw R("cannot .send() more than once");return this.o=!0,this.i.open(e,t,!0),M(r)&&I(r,function(t,e){o.i.setRequestHeader(t,""+e)}),M(n)?this.i.send(n):this.i.send(),this.u},t.prototype.getErrorCode=function(){if(!this.o)throw R("cannot .getErrorCode() before sending");return this.a},t.prototype.getStatus=function(){if(!this.o)throw R("cannot .getStatus() before sending");try{return this.i.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.o)throw R("cannot .getResponseText() before sending");return this.i.responseText},t.prototype.abort=function(){this.i.abort()},t.prototype.getResponseHeader=function(t){return this.i.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.removeEventListener("progress",t)},t}(),le=function(){function t(){}return t.prototype.createXhrIo=function(){return new ce},t}(),pe=function(){function t(t,e){this.bucket=t,this.s=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.s},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw h(e)},t.makeFromUrl=function(e){function n(t){"/"===t.path.charAt(t.path.length-1)&&(t.s=t.s.slice(0,-1))}function r(t){t.s=decodeURIComponent(t.path)}for(var o=null,i=RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a={bucket:1,path:3},u=RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),s={bucket:1,path:3},c=[{regex:i,indices:a,postModify:n},{regex:u,indices:s,postModify:r}],l=0;l262144},t.prototype.W=function(){this.I===ie.RUNNING&&null===this.y&&(this.S?null===this.m?this.j():this.f?this.q():this.d?this.F():this.H():this.z())},t.prototype.X=function(t){var e=this;this.T.getAuthToken().then(function(n){switch(e.I){case ie.RUNNING:t(n);break;case ie.CANCELING:e.P(ie.CANCELED);break;case ie.PAUSING:e.P(ie.PAUSED)}})},t.prototype.j=function(){var t=this;this.X(function(e){var n=xt(t.T,t.A,t.C,t.N,t.O),r=t.T.makeRequest(n,e);t.y=r,r.getPromise().then(function(e){t.y=null,t.m=e,t.f=!1,t.x()},t.L)})},t.prototype.q=function(){var t=this,e=this.m;this.X(function(n){var r=Pt(t.T,t.A,e,t.N),o=t.T.makeRequest(r,n);t.y=o,o.getPromise().then(function(e){e=e,t.y=null,t.G(e.current),t.f=!1,e.finalized&&(t.d=!0),t.x()},t.L)})},t.prototype.H=function(){var t=this,e=262144*this.g,n=new be(this.h,this.N.size()),r=this.m;this.X(function(o){var i;try{i=Dt(t.A,t.T,r,t.N,e,t.C,n,t.B())}catch(e){return t.v=e,void t.P(ie.ERROR)}var a=t.T.makeRequest(i,o);t.y=a,a.getPromise().then(function(e){t.V(),t.y=null,t.G(e.current),e.finalized?(t.O=e.metadata,t.P(ie.SUCCESS)):t.x()},t.L)})},t.prototype.V=function(){262144*this.g<33554432&&(this.g*=2)},t.prototype.F=function(){var t=this;this.X(function(e){var n=Nt(t.T,t.A,t.C),r=t.T.makeRequest(n,e);t.y=r,r.getPromise().then(function(e){t.y=null,t.O=e,t.P(ie.SUCCESS)},t.D)})},t.prototype.z=function(){var t=this;this.X(function(e){var n=It(t.T,t.A,t.C,t.N,t.O),r=t.T.makeRequest(n,e);t.y=r,r.getPromise().then(function(e){t.y=null,t.O=e,t.G(t.N.size()),t.P(ie.SUCCESS)},t.L)})},t.prototype.G=function(t){var e=this.h;this.h=t,this.h!==e&&this.K()},t.prototype.P=function(t){if(this.I!==t)switch(t){case ie.CANCELING:case ie.PAUSING:this.I=t,null!==this.y&&this.y.cancel();break;case ie.RUNNING:var e=this.I===ie.PAUSED;this.I=t,e&&(this.K(),this.W());break;case ie.PAUSED:this.I=t,this.K();break;case ie.CANCELED:this.v=l(),this.I=t,this.K();break;case ie.ERROR:case ie.SUCCESS:this.I=t,this.K()}},t.prototype.x=function(){switch(this.I){case ie.PAUSING:this.P(ie.PAUSED);break;case ie.CANCELING:this.P(ie.CANCELED);break;case ie.RUNNING:this.W()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=S(this.I);return new ye(this.h,this.N.size(),t,this.O,this,this.U)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){function o(e){if(t!==oe.STATE_CHANGED)throw"Expected one of the event types: ["+oe.STATE_CHANGED+"]."}function i(t){try{return void c(t)}catch(t){}try{if(l(t),!(W(t.next)||W(t.error)||W(t.complete)))throw"";return}catch(t){throw s}}function a(t){function e(e,n,o){null!==t&&ct("on",t,arguments);var i=new me(e,n,r);return p.Z(i),function(){p.J(i)}}return e}function u(t){if(null===t)throw s;i(t)}void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var s="Expected a function or an Object with one of `next`, `error`, `complete` properties.",c=vt(!0).validator,l=_t(null,!0).validator;ct("on",[pt(o),_t(i,!0),vt(!0),vt(!0)],arguments);var p=this,h=[_t(u),vt(!0),vt(!0)];return W(e)||W(n)||W(r)?a(null)(e,n,r):a(h)},t.prototype.then=function(t,e){return this.M.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.Z=function(t){this._.push(t),this.Q(t)},t.prototype.J=function(t){Et(this._,t)},t.prototype.K=function(){var t=this;this.Y(),Rt(this._).forEach(function(e){t.Q(e)})},t.prototype.Y=function(){if(null!==this.R){var t=!0;switch(S(this.I)){case ae.SUCCESS:Mt(this.R.bind(null,this.snapshot))();break;case ae.CANCELED:case ae.ERROR:Mt(this.w.bind(null,this.v))();break;default:t=!1}t&&(this.R=null,this.w=null)}},t.prototype.Q=function(t){switch(S(this.I)){case ae.RUNNING:case ae.PAUSED:null!==t.next&&Mt(t.next.bind(t,this.snapshot))();break;case ae.SUCCESS:null!==t.complete&&Mt(t.complete.bind(t))();break;case ae.CANCELED:case ae.ERROR:null!==t.error&&Mt(t.error.bind(t,this.v))();break;default:null!==t.error&&Mt(t.error.bind(t,this.v))()}},t.prototype.resume=function(){ct("resume",[],arguments);var t=this.I===ie.PAUSED||this.I===ie.PAUSING;return t&&this.P(ie.RUNNING),t},t.prototype.pause=function(){ct("pause",[],arguments);var t=this.I===ie.RUNNING;return t&&this.P(ie.PAUSING),t},t.prototype.cancel=function(){ct("cancel",[],arguments);var t=this.I===ie.RUNNING||this.I===ie.PAUSING;return t&&this.P(ie.CANCELING),t},t}(),Re=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof pe?e:pe.makeFromUrl(e)}return t.prototype.toString=function(){return ct("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return rt()},t.prototype.child=function(t){ct("child",[pt()],arguments);var e=Z(this.location.path,t),n=new pe(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=K(this.location.path);if(null===t)return null;var e=new pe(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new pe(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),ct("put",[ht(),ft(!0)],arguments),this.$("put"),new ge(this,this.authWrapper,this.location,this.mappings(),new _e(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=ee.RAW),ct("putString",[pt(),pt(E,!0),ft(!0)],arguments),this.$("putString");var r=w(e,t),o=L(n);return!M(o.contentType)&&M(r.contentType)&&(o.contentType=r.contentType),new ge(this,this.authWrapper,this.location,this.mappings(),new _e(r.data,!0),o)},t.prototype.delete=function(){ct("delete",[],arguments),this.$("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Ct(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){ct("getMetadata",[],arguments),this.$("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Nt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){ct("updateMetadata",[ft()],arguments),this.$("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=Ot(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return ct("getDownloadURL",[],arguments),this.$("getDownloadURL"),this.getMetadata().then(function(t){var e=t.downloadURLs[0];if(M(e))return e;throw _()})},t.prototype.$=function(t){if(""===this.location.path)throw y(t)},t}(),Ee=function(){function t(t){this.M=D(t)}return t.prototype.getPromise=function(){return this.M},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),we=function(){function t(){this.tt={},this.et=Yt}return t.prototype.addRequest=function(t){function e(){delete r.tt[n]}var n=this.et;this.et++,this.tt[n]=t;var r=this;t.getPromise().then(e,e)},t.prototype.clear=function(){I(this.tt,function(t,e){e&&e.cancel(!0)}),this.tt={}},t}(),Ue=function(){function t(e,n,r,o,i){if(this.nt=null,this.rt=!1,this.ot=e,null!==this.ot){var a=this.ot.options;M(a)&&(this.nt=t.it(a))}this.ut=n,this.st=r,this.ct=i,this.lt=o,this.pt=Jt,this.ht=Qt,this.ft=new we}return t.it=function(t){var e=t.storageBucket||null;return null==e?null:pe.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.ot&&M(this.ot.INTERNAL)&&M(this.ot.INTERNAL.getToken)?this.ot.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):P(null)},t.prototype.bucket=function(){if(this.rt)throw m();return this.nt},t.prototype.service=function(){return this.lt},t.prototype.makeStorageReference=function(t){return this.ut(this,t)},t.prototype.makeRequest=function(t,e){if(this.rt)return new Ee(m());var n=this.st(t,e,this.ct);return this.ft.addRequest(n),n},t.prototype.deleteApp=function(){this.rt=!0,this.ot=null,this.ft.clear()},t.prototype.maxUploadRetryTime=function(){return this.ht},t.prototype.setMaxUploadRetryTime=function(t){this.ht=t},t.prototype.maxOperationRetryTime=function(){return this.pt},t.prototype.setMaxOperationRetryTime=function(t){this.pt=t},t}(),Te=function(){function t(t,e,n,r,o,i,a,u,s,c,l){this.dt=null,this._t=null,this.R=null,this.w=null,this.vt=!1,this.bt=!1,this.mt=t,this.yt=e,this.gt=n,this.Rt=r,this.Et=o.slice(),this.wt=i.slice(),this.Ut=a,this.Tt=u,this.At=c,this.Nt=s,this.ct=l;var p=this;this.M=x(function(t,e){p.R=t,p.w=e,p.W()})}return t.prototype.W=function(){function t(t,e){function r(t){var e=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.At&&n.At(e,r)}if(e)return void t(!1,new Ae(!1,null,!0));var o=n.ct.createXhrIo();n.dt=o,null!==n.At&&o.addUploadProgressListener(r),o.send(n.mt,n.yt,n.Rt,n.gt).then(function(e){null!==n.At&&e.removeUploadProgressListener(r),n.dt=null,e=e;var o=e.getErrorCode()===zt.NO_ERROR,i=e.getStatus();if(!o||n.Ot(i)){var a=e.getErrorCode()===zt.ABORT;return void t(!1,new Ae(!1,null,a))}var u=gt(n.Et,i);t(!0,new Ae(u,e))})}function e(t,e){var r=n.R,i=n.w,a=e.xhr;if(e.wasSuccessCode)try{var u=n.Ut(a,a.getResponseText());W(u)?r(u):r()}catch(t){i(t)}else if(null!==a){var s=o();s.setServerResponseProp(a.getResponseText()),i(n.Tt?n.Tt(a,s):s)}else if(e.canceled){var s=n.bt?m():l();i(s)}else{var s=c();i(s)}}var n=this;this.vt?e(!1,new Ae(!1,null,!0)):this._t=Wt(t,e,this.Nt)},t.prototype.getPromise=function(){return this.M},t.prototype.cancel=function(t){this.vt=!0,this.bt=t||!1,null!==this._t&&Bt(this._t),null!==this.dt&&this.dt.abort()},t.prototype.Ot=function(t){var e=t>=500&&t<600,n=[408,429],r=gt(n,t),o=gt(this.wt,t);return e||r||o},t}(),Ae=function(){function t(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}return t}(),Ne=function(){function t(t,e,n){function r(t,e){return new Re(t,e)}if(this.nt=null,this.T=new Ue(t,r,qt,this,e),this.ot=t,null!=n)this.nt=pe.makeFromBucketSpec(n);else{var o=this.T.bucket();null!=o&&(this.nt=new pe(o,""))}this.Ct=new Oe(this)}return t.prototype.ref=function(t){function e(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."}if(ct("ref",[pt(e,!0)],arguments),null==this.nt)throw Error("No Storage Bucket defined in Firebase Options.");var n=new Re(this.T,this.nt);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{pe.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}}return ct("refFromURL",[pt(e,!1)],arguments),new Re(this.T,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.T.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){ct("setMaxUploadRetryTime",[dt()],arguments),this.T.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.T.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){ct("setMaxOperationRetryTime",[dt()],arguments),this.T.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.ot},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.Ct},enumerable:!0,configurable:!0}),t}(),Oe=function(){function t(t){this.lt=t}return t.prototype.delete=function(){return this.lt.T.deleteApp(),P(void 0)},t}();e.registerStorage=Ht;var Ce="storage";Ht(n(5).default)}},[23])}catch(t){throw Error("Cannot instantiate firebase-storage.js - be sure to load firebase-app.js first.")} +/*! + * @license Firebase v4.6.1 + * Build: rev-0ea11f2 + * Terms: https://firebase.google.com/terms/ + */ +var firebase=function(){var e=void 0===e?self:e;return function(t){function r(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var n=e.webpackJsonpFirebase;e.webpackJsonpFirebase=function(e,o,a){for(var c,s,u,f=0,l=[];f1)for(var r=1;r255;)t[r++]=255&o,o>>=8;t[r++]=o}return t},o=function(e){if(e.length<8192)return String.fromCharCode.apply(null,e);for(var t="",r=0;r>2,l=(3&i)<<4|c>>4,h=(15&c)<<2|u>>6,p=63&u;s||(p=64,a||(h=64)),n.push(r[f],r[l],r[h],r[p])}return n.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(n(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):o(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.O();for(var r=t?this.g:this.b,n=[],o=0;o>4;if(n.push(h),64!=u){var p=c<<4&240|u>>2;if(n.push(p),64!=l){var d=u<<6&192|l;n.push(d)}}}return n},O:function(){if(!this.y){this.y={},this.b={},this._={},this.g={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.b[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.g[this.ENCODED_VALS.charAt(e)]=e)}}},t.base64Encode=function(e){var r=n(e);return t.base64.encodeByteArray(r,!0)},t.base64Decode=function(e){try{return t.base64.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}},function(e,t,r){"use strict";function n(e){return JSON.parse(e)}function o(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonEval=n,t.stringify=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.forEach=function(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(r,e[r])},t.extend=function(e,r){return t.forEach(r,function(t,r){e[t]=r}),e},t.clone=function(e){return t.extend({},e)},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.getCount=function(e){var t=0;for(var r in e)t++;return t},t.map=function(e,t,r){var n={};for(var o in e)n[o]=t.call(r,e[o],o,e);return n},t.findKey=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return n},t.findValue=function(e,r,n){var o=t.findKey(e,r,n);return o&&e[o]},t.getAnyKey=function(e){for(var t in e)return t},t.getValues=function(e){var t=[],r=0;for(var n in e)t[r++]=e[n];return t},t.every=function(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&!t(r,e[r]))return!1;return!0}},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){r(58),e.exports=r(6).default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(59),o=(r.n(n),r(63)),i=(r.n(o),r(64));r.n(i)},function(t,r,n){(function(t){var r=function(){if(void 0!==t)return t;if(void 0!==e)return e;if("undefined"!=typeof self)return self;throw Error("unable to locate global object")}();"undefined"==typeof Promise&&(r.Promise=Promise=n(60))}).call(r,n(19))},function(e,t,r){(function(t){!function(r){function n(){}function o(e,t){return function(){e.apply(t,arguments)}}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this.T=[],l(e,this)}function a(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e.T.push(t);e._handled=!0,i.A(function(){var r=1===e._state?t.onFulfilled:t.onRejected;if(null===r)return void(1===e._state?c:s)(t.promise,e._value);var n;try{n=r(e._value)}catch(e){return void s(t.promise,e)}c(t.promise,n)})}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof i)return e._state=3,e._value=t,void u(e);if("function"==typeof r)return void l(o(r,t),e)}e._state=1,e._value=t,u(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e.T.length&&i.A(function(){e._handled||i.j(e._value)});for(var t=0,r=e.T.length;t=0&&(e.N=setTimeout(function(){e.M&&e.M()},t))},n(62),r.setImmediate=setImmediate,r.clearImmediate=clearImmediate},function(e,t,r){(function(e,t){!function(e,r){"use strict";function n(e){"function"!=typeof e&&(e=Function(""+e));for(var t=Array(arguments.length-1),r=0;r>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o"}),r=this.serviceName+": "+r+" ("+o+").";var i=new a(o,r);for(var c in t)t.hasOwnProperty(c)&&"_"!==c.slice(-1)&&(i[c]=t[c]);return i},e}();t.ErrorFactory=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(29),o=r(30);t.decode=function(e){var t={},r={},i={},a="";try{var c=e.split(".");t=o.jsonEval(n.base64Decode(c[0])||""),r=o.jsonEval(n.base64Decode(c[1])||""),a=c[2],i=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:i,signature:a}},t.isValidTimestamp=function(e){var r,n,o=t.decode(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof o&&(o.hasOwnProperty("nbf")?r=o.nbf:o.hasOwnProperty("iat")&&(r=o.iat),n=o.hasOwnProperty("exp")?o.exp:r+86400),i&&r&&n&&i>=r&&i<=n},t.issuedAtTime=function(e){var r=t.decode(e).claims;return"object"==typeof r&&r.hasOwnProperty("iat")?r.iat:null},t.isValidFormat=function(e){var r=t.decode(e),n=r.claims;return!!r.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},t.isAdmin=function(e){var r=t.decode(e).claims;return"object"==typeof r&&!0===r.admin}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(31);t.querystring=function(e){var t=[];return n.forEach(e,function(e,r){Array.isArray(r)?r.forEach(function(r){t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var r=e.split("=");t[r[0]]=r[1]}}),t}},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(72),i=function(e){function t(){var t=e.call(this)||this;t.D=[],t.I=[],t.x=[],t.F=[],t.L=0,t.R=0,t.blockSize=64,t.F[0]=128;for(var r=1;r>>31)}for(var i,a,c=this.D[0],s=this.D[1],u=this.D[2],f=this.D[3],l=this.D[4],n=0;n<80;n++){n<40?n<20?(i=f^s&(u^f),a=1518500249):(i=s^u^f,a=1859775393):n<60?(i=s&u|f&(s|u),a=2400959708):(i=s^u^f,a=3395469782);var o=(c<<5|c>>>27)+i+l+a+r[n]&4294967295;l=f,f=u,u=4294967295&(s<<30|s>>>2),s=c,c=o}this.D[0]=this.D[0]+c&4294967295,this.D[1]=this.D[1]+s&4294967295,this.D[2]=this.D[2]+u&4294967295,this.D[3]=this.D[3]+f&4294967295,this.D[4]=this.D[4]+l&4294967295},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var r=t-this.blockSize,n=0,o=this.I,i=this.L;n=56;r--)this.I[r]=255&t,t/=256;this.B(this.I);for(var n=0,r=0;r<5;r++)for(var o=24;o>=0;o-=8)e[n]=this.D[r]>>o&255,++n;return e},t}(o.Hash);t.Sha1=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.blockSize=-1}return e}();t.Hash=n},function(e,t,r){"use strict";function n(e,t){var r=new c(e,t);return r.subscribe.bind(r)}function o(e,t){return function(){for(var r=[],n=0;n 4. Need to update it?")}var o=e+" failed: ";return o+=n+" argument "}function o(e,t,r,o){if((!o||r)&&"string"!=typeof r)throw Error(n(e,t,o)+"must be a valid firebase namespace.")}function i(e,t,r,o){if((!o||r)&&"function"!=typeof r)throw Error(n(e,t,o)+"must be a valid function.")}function a(e,t,r,o){if((!o||r)&&("object"!=typeof r||null===r))throw Error(n(e,t,o)+"must be a valid context object.")}Object.defineProperty(t,"__esModule",{value:!0}),t.validateArgCount=function(e,t,r,n){var o;if(nr&&(o=0===r?"none":"no more than "+r),o){var i=e+" failed: Was called with "+n+(1===n?" argument.":" arguments.")+" Expects "+o+".";throw Error(i)}},t.errorPrefix=n,t.validateNamespace=o,t.validateCallback=i,t.validateContextObject=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(28);t.stringToByteArray=function(e){for(var t=[],r=0,o=0;o=55296&&i<=56319){var a=i-55296;o++,n.assert(o>6|192,t[r++]=63&i|128):i<65536?(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128)}return t},t.stringLength=function(e){for(var t=0,r=0;r=55296&&n<=56319?(t+=4,r++):t+=3}return t}}])}().default; + +/*! + * @license Firebase v4.6.1 + * Build: rev-0ea11f2 + * Terms: https://firebase.google.com/terms/ + */ +try{webpackJsonpFirebase([4],{76:function(t,n,e){e(77)},77:function(t,n,e){(function(t){(function(){function t(t){return"string"==typeof t}function n(t){return"boolean"==typeof t}function i(){}function r(t){var n=typeof t;if("object"==n){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return n;var e=Object.prototype.toString.call(t);if("[object Window]"==e)return"object";if("[object Array]"==e||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==e||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==n&&void 0===t.call)return"object";return n}function o(t){return null===t}function a(t){return"array"==r(t)}function s(t){var n=r(t);return"array"==n||"object"==n&&"number"==typeof t.length}function u(t){return"function"==r(t)}function c(t){var n=typeof t;return"object"==n&&null!=t||"function"==n}function h(t,n,e){return t.call.apply(t.bind,arguments)}function f(t,n,e){if(!t)throw Error();if(2")&&(t=t.replace(lu,">")),-1!=t.indexOf('"')&&(t=t.replace(pu,""")),-1!=t.indexOf("'")&&(t=t.replace(du,"'")),-1!=t.indexOf("\0")&&(t=t.replace(vu,"�")),t):t}function b(t,n){return-1!=t.indexOf(n)}function w(t,n){return tn?1:0}function y(t,n){n.unshift(t),v.call(this,m.apply(null,n)),n.shift()}function I(t,n){throw new y("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function T(n,e){var i=n.length,r=t(n)?n.split(""):n;for(--i;0<=i;--i)i in r&&e.call(void 0,r[i],i,n)}function k(n){t:{for(var e=ke,i=n.length,r=t(n)?n.split(""):n,o=0;oe?null:t(n)?n.charAt(e):n[e]}function A(t,n){return 0<=bu(t,n)}function E(t,n){n=bu(t,n);var e;return(e=0<=n)&&Array.prototype.splice.call(t,n,1),e}function N(t,n){var e=0;T(t,function(i,r){n.call(void 0,i,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&e++})}function S(t){return Array.prototype.concat.apply([],arguments)}function O(t){var n=t.length;if(0"),s=s.join("")}return s=o.createElement(s),u&&(t(u)?s.className=u:a(u)?s.className=u.join(" "):Lt(s,u)),2i.keyCode||void 0!=i.returnValue)){t:{var r=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(t){r=!0}(r||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],r=n.b;r;r=r.parentNode)i.push(r);for(t=t.type,r=i.length-1;0<=r;r--){n.b=i[r];var o=an(i[r],t,!0,n);e=e&&o}for(r=0;r>4),64!=a&&(n(o<<4&240|a>>2),64!=s&&n(a<<6&192|s))}}function Cn(){if(!Ac){Ac={},Ec={};for(var t=0;65>t;t++)Ac[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Ec[Ac[t]]=t,62<=t&&(Ec["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}}function _n(t,n){this.g=[],this.v=t,this.o=n||null,this.f=this.a=!1,this.c=void 0,this.u=this.w=this.i=!1,this.h=0,this.b=null,this.l=0}function Rn(t,n,e){t.a=!0,t.c=e,t.f=!n,Un(t)}function Dn(t){if(t.a){if(!t.u)throw new Mn;t.u=!1}}function Ln(t,n){xn(t,null,n,void 0)}function xn(t,n,e,i){t.g.push([n,e,i]),t.a&&Un(t)}function jn(t){return Iu(t.g,function(t){return u(t[1])})}function Un(t){if(t.h&&t.a&&jn(t)){var n=t.h,e=Sc[n];e&&(ou.clearTimeout(e.a),delete Sc[n]),t.h=0}t.b&&(t.b.l--,delete t.b),n=t.c;for(var i=e=!1;t.g.length&&!t.i;){var r=t.g.shift(),o=r[0],a=r[1];if(r=r[2],o=t.f?a:o)try{var s=o.call(r||t.o,n);void 0!==s&&(t.f=t.f&&(s==n||s instanceof Error),t.c=n=s),(q(n)||"function"==typeof ou.Promise&&n instanceof ou.Promise)&&(i=!0,t.i=!0)}catch(i){n=i,t.f=!0,jn(t)||(e=!0)}}t.c=n,i&&(s=l(t.m,t,!0),i=l(t.m,t,!1),n instanceof _n?(xn(n,s,i),n.w=!0):n.then(s,i)),e&&(n=new Fn(n),Sc[n.a]=n,t.h=n.a)}function Mn(){v.call(this)}function Vn(){v.call(this)}function Fn(t){this.a=ou.setTimeout(l(this.c,this),0),this.b=t}function Kn(){this.b=-1}function qn(t,n){this.b=-1,this.b=Oc,this.f=ou.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=n,this.l=ou.Int32Array?new Int32Array(64):Array(64),Nc||(Nc=ou.Int32Array?new Int32Array(Dc):Dc),this.reset()}function Xn(t){for(var n=t.f,e=t.l,i=0,r=0;rn;n++){r=0|e[n-15],i=0|e[n-2];var o=(0|e[n-16])+((r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3)|0,a=(0|e[n-7])+((i>>>17|i<<15)^(i>>>19|i<<13)^i>>>10)|0;e[n]=o+a|0}i=0|t.a[0],r=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],h=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],n=0;64>n;n++){var l=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&r^i&s^r&s)|0;a=c&h^~c&f,o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0,a=a+(0|Nc[n])|0,a=o+(a+(0|e[n])|0)|0,o=f,f=h,h=c,c=u+a|0,u=s,s=r,r=i,i=a+l|0}t.a[0]=t.a[0]+i|0,t.a[1]=t.a[1]+r|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+h|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function Bn(n,e,i){void 0===i&&(i=e.length);var r=0,o=n.c;if(t(e))for(;r=a&&a==(0|a)))throw Error("message must be a byte array");n.f[o++]=a,o==n.b&&(Xn(n),o=0)}}n.c=o,n.g+=i}function Hn(){qn.call(this,8,Lc)}function Wn(n){if(n.P&&"function"==typeof n.P)return n.P();if(t(n))return n.split("");if(s(n)){for(var e=[],i=n.length,r=0;rn)throw Error("Bad port number "+n);t.i=n}else t.i=null}function Qn(t,n,e){n instanceof se?(t.a=n,ve(t.a,t.f)):(e||(n=oe(n,Vc)),t.a=new se(n,0,t.f))}function te(t,n,e){t.a.set(n,e)}function ne(t,n){return t.a.get(n)}function ee(t){return t instanceof Yn?new Yn(t):new Yn(t,void 0)}function ie(t,n){var e=new Yn(null,void 0);return $n(e,"https"),t&&(e.b=t),n&&(e.g=n),e}function re(t,n){return t?n?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function oe(n,e,i){return t(n)?(n=encodeURI(n).replace(e,ae),i&&(n=n.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n):null}function ae(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)}function se(t,n,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function ue(t){t.a||(t.a=new kn,t.b=0,t.c&&Jn(t.c,function(n,e){he(t,decodeURIComponent(n.replace(/\+/g," ")),e)}))}function ce(t){var n=Gn(t);if(void 0===n)throw Error("Keys are undefined");var e=new se(null,0,void 0);t=Wn(t);for(var i=0;i2*t.c&&An(t)))}function le(t,n){return ue(t),n=de(t,n),En(t.a.b,n)}function pe(t,n,e){fe(t,n),0t||Su&&xu&&!(9',t=Rt(t),a.document.write(_t(t)),a.document.close())):a=t.open(St(n),e,a),a)try{a.focus()}catch(t){}return a}function Je(t){return new Z(function(n){function e(){gn(2e3).then(function(){if(t&&!t.closed)return e();n()})}return e()})}function Ye(){var t=null;return new Z(function(n){"complete"==ou.document.readyState?n():(t=function(){n()},nn(window,"load",t))}).s(function(n){throw en(window,"load",t),n})}function $e(){return Ze(void 0)?Ye().then(function(){return new Z(function(t,n){var e=ou.document,i=setTimeout(function(){n(Error("Cordova framework is not ready."))},1e3);e.addEventListener("deviceready",function(){clearTimeout(i),t()},!1)})}):et(Error("Cordova must run in an Android or iOS file scheme."))}function Ze(t){return t=t||ri(),!("file:"!==ci()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Qe(){var t=ou.window;try{return!(!t||t==t.top)}catch(t){return!1}}function ti(){return iu.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":iu.INTERNAL.hasOwnProperty("node")?"Node":"Browser"}function ni(){var t=ti();return"ReactNative"===t||"Node"===t}function ei(t){var n=t.toLowerCase();return b(n,"opera/")||b(n,"opr/")||b(n,"opios/")?"Opera":b(n,"iemobile")?"IEMobile":b(n,"msie")||b(n,"trident/")?"IE":b(n,"edge/")?"Edge":b(n,"firefox/")?$c:b(n,"silk/")?"Silk":b(n,"blackberry")?"Blackberry":b(n,"webos")?"Webos":!b(n,"safari/")||b(n,"chrome/")||b(n,"crios/")||b(n,"android")?!b(n,"chrome/")&&!b(n,"crios/")||b(n,"edge/")?b(n,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":Zc:"Safari"}function ii(t,n){n=n||[];var e,i=[],r={};for(e in Qc)r[Qc[e]]=!0;for(e=0;en)throw Error("Short delay should be less than long delay!");this.c=t,this.b=n,t=e||ri(),i=i||ti(),this.a=We(t)||"ReactNative"===i}function wi(){var t=ou.document;return!t||void 0===t.visibilityState||"visible"==t.visibilityState}function yi(){var t=ou.document,n=null;return wi()||!t?nt():new Z(function(e){n=function(){wi()&&(t.removeEventListener("visibilitychange",n,!1),e())},t.addEventListener("visibilitychange",n,!1)}).s(function(e){throw t.removeEventListener("visibilitychange",n,!1),e})}function Ii(t){try{var n=new Date(parseInt(t,10));if(!isNaN(n.getTime())&&!/[^0-9]/.test(t))return n.toUTCString()}catch(t){}return null}function Ti(t,n,e){th?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,value:e}):t[n]=e}function ki(t,n){if(n)for(var e in n)n.hasOwnProperty(e)&&Ti(t,e,n[e])}function Ai(t){var n={};return ki(n,t),n}function Ei(t){var n,e={};for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Ni(t,n){if(!n||!n.length)return!0;if(!t)return!1;for(var e=0;e Auth section -> Sign in method tab.",t):"http"==i||"https"==i?e=m("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):n="operation-not-supported-in-this-environment",Pi.call(this,n,e)}function pr(t,n,e){Pi.call(this,t,e),t=n||{},t.rb&&Ti(this,"email",t.rb),t.Y&&Ti(this,"phoneNumber",t.Y),t.credential&&Ti(this,"credential",t.credential)}function dr(t){if(t.code){var n=t.code||"";0==n.indexOf(hh)&&(n=n.substring(hh.length));var e={credential:ur(t)};if(t.email)e.rb=t.email;else{if(!t.phoneNumber)return new Pi(n,t.message||void 0);e.Y=t.phoneNumber}return new pr(n,e,t.message)}return null}function vr(t){this.f=t}function mr(t,n,e){var i="Node"==ti();if(!(i=ou.XMLHttpRequest||i&&iu.INTERNAL.node&&iu.INTERNAL.node.XMLHttpRequest))throw new Pi("internal-error","The XMLHttpRequest compatibility library was not found.");this.b=t,t=n||{},this.i=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.l=t.secureTokenTimeout||Sh,this.c=x(t.secureTokenHeaders||Oh),this.g=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.firebaseTimeout||Ph,this.a=x(t.firebaseHeaders||Ch),e&&(this.a["X-Client-Version"]=e,this.c["X-Client-Version"]=e),this.f=new Me,this.o=new vr(i)}function gr(t,n){n?t.a["X-Firebase-Locale"]=n:delete t.a["X-Firebase-Locale"]}function br(t,n){n?(t.a["X-Client-Version"]=n,t.c["X-Client-Version"]=n):(delete t.a["X-Client-Version"],delete t.c["X-Client-Version"])}function wr(t,n,e,i,r,o,a){gi()?(He()?t=l(t.m,t):(Eh||(Eh=new Z(function(t,n){yr(t,n)})),t=l(t.u,t)),t(n,e,i,r,o,a)):e&&e(null)}function yr(t,n){((window.gapi||{}).client||{}).request?t():(ou[Rh]=function(){((window.gapi||{}).client||{}).request?t():n(Error("CORS_UNSUPPORTED"))},Ln(De(At(_h,{onload:Rh})),function(){n(Error("CORS_UNSUPPORTED"))}))}function Ir(t,n){return new Z(function(e,i){"refresh_token"==n.grant_type&&n.refresh_token||"authorization_code"==n.grant_type&&n.code?wr(t,t.i+"?key="+encodeURIComponent(t.b),function(t){t?t.error?i(Mr(t)):t.access_token&&t.refresh_token?e(t):i(new Pi("internal-error")):i(new Pi("network-request-failed"))},"POST",""+ce(n),t.c,t.l.get()):i(new Pi("internal-error"))})}function Tr(t,n,e,i,r,o){var a=ee(t.g+n);te(a,"key",t.b),o&&te(a,"cb",""+uu());var s="GET"==e;if(s)for(var u in i)i.hasOwnProperty(u)&&te(a,u,i[u]);return new Z(function(n,o){wr(t,""+a,function(t){t?t.error?o(Mr(t,r||{})):n(t):o(new Pi("network-request-failed"))},e,s?void 0:Mt(li(i)),t.a,t.h.get())})}function kr(t){if(!Gc.test(t.email))throw new Pi("invalid-email")}function Ar(t){"email"in t&&kr(t)}function Er(t,n){return Ur(t,Mh,{identifier:n,continueUri:ui()?qe():"http://localhost"}).then(function(t){return t.allProviders||[]})}function Nr(t){return Ur(t,Bh,{}).then(function(t){return t.authorizedDomains||[]})}function Sr(t){if(!t[Nh])throw new Pi("internal-error")}function Or(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new Pi("internal-error")}else{if(!t.sessionInfo)throw new Pi("missing-verification-id");if(!t.code)throw new Pi("missing-verification-code")}}function Pr(t,n){return Ur(t,Gh,n)}function Cr(t,n,e){return Ur(t,Fh,{idToken:n,deleteProvider:e})}function _r(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new Pi("internal-error")}function Rr(t){var n=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",n=dr(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",n=dr(t)):"EMAIL_EXISTS"==t.errorMessage&&(t.code="email-already-in-use",n=dr(t)),n)throw n;if(!t[Nh])throw new Pi("internal-error")}function Dr(t,n){return n.returnIdpCredential=!0,Ur(t,$h,n)}function Lr(t,n){return n.returnIdpCredential=!0,Ur(t,Qh,n)}function xr(t,n){return n.returnIdpCredential=!0,n.autoCreate=!1,Ur(t,Zh,n)}function jr(t){if(!t.oobCode)throw new Pi("invalid-action-code")}function Ur(t,n,e){if(!Ni(e,n.ea))return et(new Pi("internal-error"));var i,r=n.yb||"POST";return nt(e).then(n.D).then(function(){return n.T&&(e.returnSecureToken=!0),Tr(t,n.endpoint,r,e,n.Lb,n.nb||!1)}).then(function(t){return i=t}).then(n.O).then(function(){if(!n.ga)return i;if(!(n.ga in i))throw new Pi("internal-error");return i[n.ga]})}function Mr(t,n){var e=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",i={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(e=i[e]?new Pi(i[e]):null)return e;e=t.error&&t.error.message||"",i={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},j(i,n||{}),n=(n=e.match(/^[^\s]+\s*:\s*(.*)$/))&&1n.c?Bn(n,Rc,56-n.c):Bn(n,Rc,n.b-(n.c-56));for(var i=63;56<=i;i--)n.f[i]=255&e,e/=256;for(Xn(n),i=e=0;i>r&255;return Sn(t)}function xo(t,n,e,i){var r=Do(),o=new hr(n,i,null,r,new Pi("no-auth-event")),a=oi("BuildInfo.packageName",ou);if("string"!=typeof a)throw new Pi("invalid-cordova-configuration");var s=oi("BuildInfo.displayName",ou),u={};if(ri().toLowerCase().match(/iphone|ipad|ipod/))u.ibi=a;else{if(!ri().toLowerCase().match(/android/))return et(new Pi("operation-not-supported-in-this-environment"));u.apn=a}s&&(u.appDisplayName=s),r=Lo(r),u.sessionId=r;var c=Zr(t.u,t.i,t.l,n,e,null,i,t.m,u,t.o);return t.ba().then(function(){var n=t.h;return t.A.a.set(bf,o.B(),n)}).then(function(){var n=oi("cordova.plugins.browsertab.isAvailable",ou);if("function"!=typeof n)throw new Pi("invalid-cordova-configuration");var e=null;n(function(n){if(n){if("function"!=typeof(e=oi("cordova.plugins.browsertab.openUrl",ou)))throw new Pi("invalid-cordova-configuration");e(c)}else{if("function"!=typeof(e=oi("cordova.InAppBrowser.open",ou)))throw new Pi("invalid-cordova-configuration");n=ri(),n=!(!n.match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!n.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),t.a=e(c,n?"_blank":"_system","location=yes")}})})}function jo(t,n){for(var e=0;et.f&&(t.a=t.f),n)}function ha(t,n){fa(t),t.b=gn(ca(t,n)).then(function(){return t.l?nt():yi()}).then(function(){return t.h()}).then(function(){ha(t,!0)}).s(function(n){t.i(n)&&ha(t,!1)})}function fa(t){t.b&&(t.b.cancel(),t.b=null)}function la(t){this.f=t,this.b=this.a=null,this.c=0}function pa(t,n){var e=n[Nh],i=n.refreshToken;n=da(n.expiresIn),t.b=e,t.c=n,t.a=i}function da(t){return uu()+1e3*parseInt(t,10)}function va(t,n){return Ir(t.f,n).then(function(n){return t.b=n.access_token,t.c=da(n.expires_in),t.a=n.refresh_token,{accessToken:t.b,expirationTime:t.c,refreshToken:t.a}}).s(function(n){throw"auth/user-token-expired"==n.code&&(t.a=null),n})}function ma(t,n){this.a=t||null,this.b=n||null,ki(this,{lastSignInTime:Ii(n||null),creationTime:Ii(t||null)})}function ga(t){return new ma(t.a,t.b)}function ba(t,n,e,i,r,o){ki(this,{uid:t,displayName:i||null,photoURL:r||null,email:e||null,phoneNumber:o||null,providerId:n})}function wa(t,n){Bt.call(this,t);for(var e in n)this[e]=n[e]}function ya(t,n,e){this.A=[],this.G=t.apiKey,this.o=t.appName,this.w=t.authDomain||null,t=iu.SDK_VERSION?ii(iu.SDK_VERSION):null,this.c=new mr(this.G,Vr(Lh),t),this.h=new la(this.c),Oa(this,n[Nh]),pa(this.h,n),Ti(this,"refreshToken",this.h.a),Ra(this,e||{}),fn.call(this),this.I=!1,this.w&&si()&&(this.a=Yo(this.w,this.G,this.o)),this.N=[],this.i=null,this.l=Ea(this),this.U=l(this.Ga,this);var i=this;this.ha=null,this.ra=function(t){i.na(t.h)},this.W=null,this.R=[],this.qa=function(t){Ta(i,t.f)},this.V=null}function Ia(t,n){t.W&&en(t.W,"languageCodeChanged",t.ra),(t.W=n)&&Zt(n,"languageCodeChanged",t.ra)}function Ta(t,n){t.R=n,br(t.c,iu.SDK_VERSION?ii(iu.SDK_VERSION,t.R):null)}function ka(t,n){t.V&&en(t.V,"frameworkChanged",t.qa),(t.V=n)&&Zt(n,"frameworkChanged",t.qa)}function Aa(t){try{return iu.app(t.o).auth()}catch(n){throw new Pi("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.o+"'!")}}function Ea(t){return new ua(function(){return t.F(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var n=t.h.c-uu()-3e5;return 0r||r>=Ef.length)throw new Pi("internal-error","Argument validator received an unsupported number of arguments.");e=Ef[r],i=(i?"":e+" argument ")+(n.name?'"'+n.name+'" ':"")+"must be "+n.K+".";break t}i=null}}if(i)throw new Pi("argument-error",t+" failed: "+i)}function _s(n,e){return{name:n||"",K:"a valid string",optional:!!e,M:t}}function Rs(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:n}}function Ds(t,n){return{name:t||"",K:"a valid object",optional:!!n,M:c}}function Ls(t,n){return{name:t||"",K:"a function",optional:!!n,M:u}}function xs(t,n){return{name:t||"",K:"null",optional:!!n,M:o}}function js(){return{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}}}function Us(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof ls)}}}function Ms(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof iu.app.App)}}}function Vs(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(n){if(!n)return!1;var e=!t||n.providerId===t;return!(!n.wa||!e)}}}function Fs(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}}function Ks(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(n){return!!(n&&t(n.type)&&u(n.verify))}}}function qs(t,n,e,i){return{name:e||"",K:t.K+" or "+n.K,optional:!!i,M:function(e){return t.M(e)||n.M(e)}}}function Xs(t,n,e,i,r,o){if(Ti(this,"type","recaptcha"),this.b=this.c=null,this.m=!1,this.l=n,this.a=e||{theme:"light",type:"image"},this.g=[],this.a[Of])throw new Pi("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[Pf],!Dt(n)||!this.h&&Dt(n).hasChildNodes())throw new Pi("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new mr(t,o||null,r||null),this.o=i||function(){return null};var a=this;this.i=[];var s=this.a[Nf];this.a[Nf]=function(t){if(Bs(a,t),"function"==typeof s)s(t);else if("string"==typeof s){var n=oi(s,ou);"function"==typeof n&&n(t)}};var u=this.a[Sf];this.a[Sf]=function(){if(Bs(a,null),"function"==typeof u)u();else if("string"==typeof u){var t=oi(u,ou);"function"==typeof t&&t()}}}function Bs(t,n){for(var e=0;e>>0),su=0,uu=Date.now||function(){return+new Date};d(v,Error),v.prototype.name="CustomError";var cu=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},hu=/&/g,fu=//g,pu=/"/g,du=/'/g,vu=/\x00/g,mu=/[\x00&<>"']/;d(y,v),y.prototype.name="AssertionError";var gu,bu=Array.prototype.indexOf?function(t,n,e){return Array.prototype.indexOf.call(t,n,e)}:function(n,e,i){if(i=null==i?0:0>i?Math.max(0,n.length+i):i,t(n))return t(e)&&1==e.length?n.indexOf(e,i):-1;for(;iparseFloat(Ru)){Eu=Lu+"";break t}}Eu=Ru}var xu,ju={},Uu=ou.document;xu=Uu&&Su?V()||("CSS1Compat"==Uu.compatMode?parseInt(Eu,10):5):void 0,X.prototype.get=function(){if(0"),Rt(""),Rt("
");var ec={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},ic={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},rc=/\uffff/.test("￿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,oc=0,ac={};qt.prototype.oa=!1,qt.prototype.ta=function(){if(this.Fa)for(;this.Fa.length;)this.Fa.shift()()};var sc=Object.freeze||function(t){return t},uc=!Su||9<=+xu,cc=Su&&!F("9"),hc=function(){if(!ou.addEventListener||!Object.defineProperty)return!1;var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}});return ou.addEventListener("test",i,n),ou.removeEventListener("test",i,n),t}();Bt.prototype.c=function(){this.Ab=!1},d(Ht,Bt);var fc=sc({2:"touch",3:"pen",4:"mouse"});Ht.prototype.c=function(){Ht.ib.c.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,cc)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},Ht.prototype.g=function(){return this.a};var lc="closure_listenable_"+(1e6*Math.random()|0),pc=0,dc="closure_lm_"+(1e6*Math.random()|0),vc={},mc=0,gc="__closure_events_fn_"+(1e9*Math.random()>>>0);d(fn,qt),fn.prototype[lc]=!0,fn.prototype.removeEventListener=function(t,n,e,i){en(this,t,n,e,i)},fn.prototype.ta=function(){if(fn.ib.ta.call(this),this.u){var t,n=this.u,e=0;for(t in n.a){for(var i=n.a[t],r=0;r=In(this).value)for(u(n)&&(n=n()),t=new bn(t,n+"",this.f),e&&(t.a=e),e="log:"+t.b,(t=ou.console)&&t.timeStamp&&t.timeStamp(e),(t=ou.msWriteProfilerMark)&&t(e),e=this;e;)e=e.a};var Tc={},kc=null;eu=kn.prototype,eu.P=function(){An(this);for(var t=[],n=0;n=--n.l&&n.cancel()}this.v?this.v.call(this.o,this):this.u=!0,this.a||(t=new Vn,Dn(this),Rn(this,!1,t))}},_n.prototype.m=function(t,n){this.i=!1,Rn(this,t,n)},_n.prototype.A=function(t){Dn(this),Rn(this,!0,t)},_n.prototype.then=function(t,n,e){var i,r,o=new Z(function(t,n){i=t,r=n});return xn(this,i,function(t){t instanceof Vn?o.cancel():r(t)}),o.then(t,n,e)},K(_n),d(Mn,v),Mn.prototype.message="Deferred has already fired",Mn.prototype.name="AlreadyCalledError",d(Vn,v),Vn.prototype.message="Deferred was canceled",Vn.prototype.name="CanceledError",Fn.prototype.c=function(){throw delete Sc[this.a],this.b};var Nc,Sc={};d(qn,Kn);for(var Oc=64,Pc=Oc-1,Cc=[],_c=0;_cthis.c-3e4?this.a?va(this,{grant_type:"refresh_token",refresh_token:this.a}):nt(null):nt({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},ma.prototype.B=function(){return{lastLoginAt:this.b,createdAt:this.a}},d(wa,Bt),d(ya,fn),ya.prototype.na=function(t){this.ha=t,gr(this.c,t)},ya.prototype.$=function(){return this.ha},ya.prototype.Ka=function(){return O(this.R)},ya.prototype.Ga=function(){this.l.b&&(fa(this.l),this.l.start())},Ti(ya.prototype,"providerId","firebase"),eu=ya.prototype,eu.reload=function(){var t=this;return Ya(this,La(this).then(function(){return Fa(t).then(function(){return Ca(t)}).then(Da)}))},eu.F=function(t){var n=this;return Ya(this,La(this).then(function(){return n.h.getToken(t)}).then(function(t){if(!t)throw new Pi("internal-error");return t.accessToken!=n.pa&&(Oa(n,t.accessToken),ln(n,new wa("tokenChanged"))),Ma(n,"refreshToken",t.refreshToken),t.accessToken}))},eu.getToken=function(t){return nh["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(nh["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.")),this.F(t)},eu.gc=function(t){if(!(t=t.users)||!t.length)throw new Pi("internal-error");t=t[0],Ra(this,{uid:t.localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt});for(var n=Xa(t),e=0;ethis.o&&(this.o=0),0==this.o&&Es(this)&&Sa(Es(this)),this.removeAuthTokenListener(t)},eu.addAuthTokenListener=function(t){var n=this;this.m.push(t),Ps(this,this.i.then(function(){n.l||A(n.m,t)&&t(Ns(n))}))},eu.removeAuthTokenListener=function(t){N(this.m,function(n){return n==t})},eu.delete=function(){this.l=!0;for(var t=0;tn?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r},t.each=function(e,t){if(Array.isArray(e))for(var n=0;n=Math.pow(2,-1022)?(a=Math.min(Math.floor(Math.log(e)/Math.LN2),1023),i=a+1023,o=Math.round(e*Math.pow(2,52-a)-Math.pow(2,52))):(i=0,o=Math.round(e/Math.pow(2,-1074)))),u=[],s=52;s;s-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(s=11;s;s-=1)u.push(i%2?1:0),i=Math.floor(i/2);u.push(n?1:0),u.reverse(),l=u.join("");var h="";for(s=0;s<64;s+=8){var c=parseInt(l.substr(s,8),2).toString(16);1===c.length&&(c="0"+c),h+=c}return h.toLowerCase()},t.isChromeExtensionContentScript=function(){return!("object"!=typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},t.isWindowsStoreApp=function(){return"object"==typeof Windows&&"object"==typeof Windows.UI},t.errorForServerCode=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==e?n="Client doesn't have permission to access the desired data.":"unavailable"==e&&(n="The service is unavailable");var r=Error(e+" at "+t.path+": "+n);return r.code=e.toUpperCase(),r},t.e=RegExp("^-?\\d{1,10}$"),t.tryParseInt=function(e){if(t.e.test(e)){var n=+e;if(n>=-2147483648&&n<=2147483647)return n}return null},t.exceptionGuard=function(e){try{e()}catch(e){setTimeout(function(){var n=e.stack||"";throw t.warn("Exception was thrown by user callback.",n),e},Math.floor(0))}},t.callUserCallback=function(e){for(var n=[],r=1;r=0},t.exportPropGetter=function(e,t,n){Object.defineProperty(e,t,{get:n})},t.setTimeoutNonBlocking=function(e,t){var n=setTimeout(e,t);return"object"==typeof n&&n.unref&&n.unref(),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(0),o=function(){function e(e,t){if(void 0===t){this.n=e.split("/");for(var n=0,r=0;r0&&(this.n[n]=this.n[r],n++);this.n.length=n,this.i=0}else this.n=e,this.i=t}return Object.defineProperty(e,"Empty",{get:function(){return new e("")},enumerable:!0,configurable:!0}),e.prototype.getFront=function(){return this.i>=this.n.length?null:this.n[this.i]},e.prototype.getLength=function(){return this.n.length-this.i},e.prototype.popFront=function(){var t=this.i;return t=this.n.length)return null;for(var t=[],n=this.i;n0&&n.push(i[r]);return new e(n,0)},e.prototype.isEmpty=function(){return this.i>=this.n.length},e.relativePath=function(t,n){var r=t.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return e.relativePath(t.popFront(),n.popFront());throw Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+t+")")},e.comparePaths=function(e,t){for(var n=e.slice(),i=t.slice(),o=0;oe.getLength())return!1;for(;t0&&(this.l+=1),this.u.push(e),this.l+=i.stringLength(e),this.f()},e.prototype.pop=function(){var e=this.u.pop();this.l-=i.stringLength(e),this.u.length>0&&(this.l-=1)},e.prototype.f=function(){if(this.l>e.MAX_PATH_LENGTH_BYTES)throw Error(this.o+"has a key path longer than "+e.MAX_PATH_LENGTH_BYTES+" bytes ("+this.l+").");if(this.u.length>e.MAX_PATH_DEPTH)throw Error(this.o+"path specified exceeds the maximum depth that can be written ("+e.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},e.prototype.toErrorString=function(){return 0==this.u.length?"":"in property '"+this.u.join(".")+"'"},e}();t.ValidationPath=a},function(e,t,n){"use strict";function r(e){a=e}function i(e){s=e}var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a,s,u=n(14),l=n(1),h=n(5),c=n(15);t.setNodeFromJSON=r,t.setMaxNode=i;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?l.nameCompare(e.name,t.name):i},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return h.NamedNode.MIN},t.prototype.maxPost=function(){return new h.NamedNode(l.MAX_NAME,new c.LeafNode("[PRIORITY-POST]",s))},t.prototype.makePost=function(e,t){var n=a(e);return new h.NamedNode(t,new c.LeafNode("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(u.Index);t.PriorityIndex=p,t.PRIORITY_INDEX=new p},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(0),a=n(1),s=n(16),u=n(5),l=n(37),h=n(3),c=n(10),p=n(39),d=n(15),f=n(41),_=function(){function e(e,t,n){this._=e,this.y=t,this.g=n,this.m=null,this.y&&l.validatePriorityNode(this.y),this._.isEmpty()&&o.assert(!this.y||this.y.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return i||(i=new e(new s.SortedMap(f.NAME_COMPARATOR),null,p.IndexMap.Default))},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.y||i},e.prototype.updatePriority=function(t){return this._.isEmpty()?this:new e(this._,t,this.g)},e.prototype.getImmediateChild=function(e){if(".priority"===e)return this.getPriority();var t=this._.get(e);return null===t?i:t},e.prototype.getChild=function(e){var t=e.getFront();return null===t?this:this.getImmediateChild(t).getChild(e.popFront())},e.prototype.hasChild=function(e){return null!==this._.get(e)},e.prototype.updateImmediateChild=function(t,n){if(o.assert(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new u.NamedNode(t,n),a=void 0,s=void 0,l=void 0;return n.isEmpty()?(a=this._.remove(t),s=this.g.removeFromIndexes(r,this._)):(a=this._.insert(t,n),s=this.g.addToIndexes(r,this._)),l=a.isEmpty()?i:this.y,new e(a,l,s)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;o.assert(".priority"!==e.getFront()||1===e.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(e.popFront(),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this._.isEmpty()},e.prototype.numChildren=function(){return this._.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(h.PRIORITY_INDEX,function(a,s){n[a]=s.val(t),r++,o&&e.e.test(a)?i=Math.max(i,+a):o=!1}),!t&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.m){var e="";this.getPriority().isEmpty()||(e+="priority:"+l.priorityHashText(this.getPriority().val())+":"),this.forEachChild(h.PRIORITY_INDEX,function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)}),this.m=""===e?"":a.sha1(e)}return this.m},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.C(n);if(r){var i=r.getPredecessorKey(new u.NamedNode(e,t));return i?i.name:null}return this._.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.C(e);if(t){var n=t.minKey();return n&&n.name}return this._.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new u.NamedNode(t,this._.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.C(e);if(t){var n=t.maxKey();return n&&n.name}return this._.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new u.NamedNode(t,this._.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.C(e);return n?n.inorderTraversal(function(e){return t(e.name,e.node)}):this._.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.C(t);if(n)return n.getIteratorFrom(e,function(e){return e});for(var r=this._.getIteratorFrom(e.name,u.NamedNode.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.C(t);if(n)return n.getReverseIteratorFrom(e,function(e){return e});for(var r=this._.getReverseIteratorFrom(e.name,u.NamedNode.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===t.MAX_NODE?-1:0},e.prototype.withIndex=function(t){if(t===c.KEY_INDEX||this.g.hasIndex(t))return this;var n=this.g.addIndex(t,this._);return new e(this._,this.y,n)},e.prototype.isIndexed=function(e){return e===c.KEY_INDEX||this.g.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this._.count()===t._.count()){for(var n=this.getIterator(h.PRIORITY_INDEX),r=t.getIterator(h.PRIORITY_INDEX),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},e.prototype.C=function(e){return e===c.KEY_INDEX?null:this.g.get(""+e)},e.e=/^(0|[1-9]\d*)$/,e}();t.ChildrenNode=_;var y=function(e){function t(){return e.call(this,new s.SortedMap(f.NAME_COMPARATOR),_.EMPTY_NODE,p.IndexMap.Default)||this}return r(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return _.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(_);t.MaxNode=y,t.MAX_NODE=new y,Object.defineProperties(u.NamedNode,{MIN:{value:new u.NamedNode(a.MIN_NAME,_.EMPTY_NODE)},MAX:{value:new u.NamedNode(a.MAX_NAME,t.MAX_NODE)}}),c.KeyIndex.__EMPTY_NODE=_.EMPTY_NODE,d.LeafNode.__childrenNodeConstructor=_,l.setMaxNode(t.MAX_NODE),h.setMaxNode(t.MAX_NODE)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}();t.NamedNode=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(0),o=n(1),a=n(0),s=n(0);t.N=/[\[\].#$\/\u0000-\u001F\u007F]/,t.P=/[\[\].#$\u0000-\u001F\u007F]/,t.S=10485760,t.isValidKey=function(e){return"string"==typeof e&&0!==e.length&&!t.N.test(e)},t.isValidPathString=function(e){return"string"==typeof e&&0!==e.length&&!t.P.test(e)},t.isValidRootPathString=function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),t.isValidPathString(e)},t.isValidPriority=function(e){return null===e||"string"==typeof e||"number"==typeof e&&!o.isInvalidJSONNumber(e)||e&&"object"==typeof e&&i.contains(e,".sv")},t.validateFirebaseDataArg=function(e,n,r,i,o){o&&void 0===r||t.validateFirebaseData(a.errorPrefix(e,n,o),r,i)},t.validateFirebaseData=function(e,n,a){var u=a instanceof r.Path?new r.ValidationPath(a,e):a;if(void 0===n)throw Error(e+"contains undefined "+u.toErrorString());if("function"==typeof n)throw Error(e+"contains a function "+u.toErrorString()+" with contents = "+n);if(o.isInvalidJSONNumber(n))throw Error(e+"contains "+n+" "+u.toErrorString());if("string"==typeof n&&n.length>t.S/3&&s.stringLength(n)>t.S)throw Error(e+"contains a string greater than "+t.S+" utf8 bytes "+u.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"==typeof n){var l=!1,h=!1;if(i.forEach(n,function(n,r){if(".value"===n)l=!0;else if(".priority"!==n&&".sv"!==n&&(h=!0,!t.isValidKey(n)))throw Error(e+" contains an invalid key ("+n+") "+u.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');u.push(n),t.validateFirebaseData(e,r,u),u.pop()}),l&&h)throw Error(e+' contains ".value" child '+u.toErrorString()+" in addition to actual children.")}},t.validateFirebaseMergePaths=function(e,n){var i,o;for(i=0;i=0,"Unknown leaf type: "+n),i.assert(a>=0,"Unknown leaf type: "+r),o===a?"object"===r?0:this.T0},e.prototype.peek=function(){if(0===this.O.length)return null;var e=this.O[this.O.length-1];return this.R?this.R(e.key,e.value):{key:e.key,value:e.value}},e}();t.SortedMapIterator=r;var i=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:a.EMPTY_NODE,this.right=null!=o?o:a.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.A=function(){return this.left.isEmpty()?this:this.left.A()},e.prototype.minKey=function(){return this.A().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r,i;return i=this,r=n(e,i.key),i=r<0?i.copy(null,null,null,i.left.insert(e,t,n),null):0===r?i.copy(null,t,null,null,null):i.copy(null,null,null,null,i.right.insert(e,t,n)),i.D()},e.prototype.M=function(){if(this.left.isEmpty())return a.EMPTY_NODE;var e=this;return e.left.L()||e.left.left.L()||(e=e.F()),e=e.copy(null,null,null,e.left.M(),null),e.D()},e.prototype.remove=function(e,t){var n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.L()||n.left.left.L()||(n=n.F()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.L()&&(n=n.x()),n.right.isEmpty()||n.right.L()||n.right.left.L()||(n=n.k()),0===t(e,n.key)){if(n.right.isEmpty())return a.EMPTY_NODE;r=n.right.A(),n=n.copy(r.key,r.value,null,null,n.right.M())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.D()},e.prototype.L=function(){return this.color},e.prototype.D=function(){var e=this;return e.right.L()&&!e.left.L()&&(e=e.W()),e.left.L()&&e.left.left.L()&&(e=e.x()),e.left.L()&&e.right.L()&&(e=e.j()),e},e.prototype.F=function(){var e=this.j();return e.right.left.L()&&(e=e.copy(null,null,null,null,e.right.x()),e=e.W(),e=e.j()),e},e.prototype.k=function(){var e=this.j();return e.left.left.L()&&(e=e.x(),e=e.j()),e},e.prototype.W=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.x=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.j=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.V=function(){var e=this.Q();return Math.pow(2,e)<=this.count()+1},e.prototype.Q=function(){var e;if(this.L()&&this.left.L())throw Error("Red node has red child("+this.key+","+this.value+")");if(this.right.L())throw Error("Right child of ("+this.key+","+this.value+") is red");if((e=this.left.Q())!==this.right.Q())throw Error("Black depths differ");return e+(this.L()?0:1)},e.RED=!0,e.BLACK=!1,e}();t.LLRBNode=i;var o=function(){function e(){}return e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new i(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.Q=function(){return 0},e.prototype.L=function(){return!1},e}();t.LLRBEmptyNode=o;var a=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.U=t,this.B=n}return e.prototype.insert=function(t,n){return new e(this.U,this.B.insert(t,n,this.U).copy(null,null,i.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.U,this.B.remove(t,this.U).copy(null,null,i.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.B;!n.isEmpty();){if(0===(t=this.U(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.B,r=null;!n.isEmpty();){if(0===(t=this.U(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.B.isEmpty()},e.prototype.count=function(){return this.B.count()},e.prototype.minKey=function(){return this.B.minKey()},e.prototype.maxKey=function(){return this.B.maxKey()},e.prototype.inorderTraversal=function(e){return this.B.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.B.reverseTraversal(e)},e.prototype.getIterator=function(e){return new r(this.B,null,this.U,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new r(this.B,e,this.U,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new r(this.B,e,this.U,!0,t)},e.prototype.getReverseIterator=function(e){return new r(this.B,null,this.U,!0,e)},e.EMPTY_NODE=new o,e}();t.SortedMap=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(43),i=n(11),o=n(2),a=n(44),s=n(86),u=n(97),l=n(0),h=n(1),c=n(0),p=n(98),d=n(25),f=n(100),_=n(49),y=n(101),v=n(50),g=n(106),m=n(32),C=function(){function e(e,t,n){var r=this;this.H=e,this.app=n,this.dataUpdateCount=0,this.G=null,this.K=new y.EventQueue,this.Y=1,this.X=null,this.z=new a.SparseSnapshotTree,this.J=null;var i=new p.AuthTokenProvider(n);if(this.$=d.StatsManager.getCollection(e),t||h.beingCrawled())this.Z=new g.ReadonlyRestClient(this.H,this.ee.bind(this),i),setTimeout(this.te.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if("object"!=typeof o)throw Error("Only objects are supported for option databaseAuthVariableOverride");try{l.stringify(o)}catch(e){throw Error("Invalid authOverride provided: "+e)}}this.J=new v.PersistentConnection(this.H,this.ee.bind(this),this.te.bind(this),this.ne.bind(this),i,o),this.Z=this.J}i.addTokenChangeListener(function(e){r.Z.refreshAuthToken(e)}),this.re=d.StatsManager.getOrCreateReporter(e,function(){return new f.StatsReporter(r.$,r.Z)}),this.ie(),this.oe=new u.SnapshotHolder,this.ae=new s.SyncTree({startListening:function(e,t,n,i){var o=[],a=r.oe.getNode(e.path);return a.isEmpty()||(o=r.ae.applyServerOverwrite(e.path,a),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.se("connected",!1),this.ue=new s.SyncTree({startListening:function(e,t,n,i){return r.Z.listen(e,n,t,function(t,n){var o=i(t,n);r.K.raiseEventsForChangedPath(e.path,o)}),[]},stopListening:function(e,t){r.Z.unlisten(e,t)}})}return e.prototype.toString=function(){return(this.H.secure?"https://":"http://")+this.H.host},e.prototype.name=function(){return this.H.namespace},e.prototype.serverTime=function(){var e=this.oe.getNode(new o.Path(".info/serverTimeOffset")),t=e.val()||0;return(new Date).getTime()+t},e.prototype.generateServerValues=function(){return r.generateWithValues({timestamp:this.serverTime()})},e.prototype.ee=function(e,t,n,r){this.dataUpdateCount++;var a=new o.Path(e);t=this.X?this.X(e,t):t;var s=[];if(r)if(n){var u=c.map(t,function(e){return i.nodeFromJSON(e)});s=this.ue.applyTaggedQueryMerge(a,u,r)}else{var l=i.nodeFromJSON(t);s=this.ue.applyTaggedQueryOverwrite(a,l,r)}else if(n){var h=c.map(t,function(e){return i.nodeFromJSON(e)});s=this.ue.applyServerMerge(a,h)}else{var p=i.nodeFromJSON(t);s=this.ue.applyServerOverwrite(a,p)}var d=a;s.length>0&&(d=this.le(a)),this.K.raiseEventsForChangedPath(d,s)},e.prototype.he=function(e){this.X=e},e.prototype.te=function(e){this.se("connected",e),!1===e&&this.ce()},e.prototype.ne=function(e){var t=this;h.each(e,function(e,n){t.se(n,e)})},e.prototype.se=function(e,t){var n=new o.Path("/.info/"+e),r=i.nodeFromJSON(t);this.oe.updateSnapshot(n,r);var a=this.ae.applyServerOverwrite(n,r);this.K.raiseEventsForChangedPath(n,a)},e.prototype.pe=function(){return this.Y++},e.prototype.setWithPriority=function(e,t,n,o){var a=this;this.de("set",{path:""+e,value:t,priority:n});var s=this.generateServerValues(),u=i.nodeFromJSON(t,n),l=r.resolveDeferredValueSnapshot(u,s),c=this.pe(),p=this.ue.applyUserOverwrite(e,l,c,!0);this.K.queueEvents(p),this.Z.put(""+e,u.val(!0),function(t,n){var r="ok"===t;r||h.warn("set at "+e+" failed: "+t);var i=a.ue.ackUserWrite(c,!r);a.K.raiseEventsForChangedPath(e,i),a.callOnCompleteCallback(o,t,n)});var d=this.fe(e);this.le(d),this.K.raiseEventsForChangedPath(d,[])},e.prototype.update=function(e,t,n){var o=this;this.de("update",{path:""+e,value:t});var a=!0,s=this.generateServerValues(),u={};if(c.forEach(t,function(e,t){a=!1;var n=i.nodeFromJSON(t);u[e]=r.resolveDeferredValueSnapshot(n,s)}),a)h.log("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var l=this.pe(),p=this.ue.applyUserMerge(e,u,l);this.K.queueEvents(p),this.Z.merge(""+e,t,function(t,r){var i="ok"===t;i||h.warn("update at "+e+" failed: "+t);var a=o.ue.ackUserWrite(l,!i),s=a.length>0?o.le(e):e;o.K.raiseEventsForChangedPath(s,a),o.callOnCompleteCallback(n,t,r)}),c.forEach(t,function(t){var n=o.fe(e.child(t));o.le(n)}),this.K.raiseEventsForChangedPath(e,[])}},e.prototype.ce=function(){var e=this;this.de("onDisconnectEvents");var t=this.generateServerValues(),n=r.resolveDeferredValueTree(this.z,t),i=[];n.forEachTree(o.Path.Empty,function(t,n){i=i.concat(e.ue.applyServerOverwrite(t,n));var r=e.fe(t);e.le(r)}),this.z=new a.SparseSnapshotTree,this.K.raiseEventsForChangedPath(o.Path.Empty,i)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.Z.onDisconnectCancel(""+e,function(r,i){"ok"===r&&n.z.forget(e),n.callOnCompleteCallback(t,r,i)})},e.prototype.onDisconnectSet=function(e,t,n){var r=this,o=i.nodeFromJSON(t);this.Z.onDisconnectPut(""+e,o.val(!0),function(t,i){"ok"===t&&r.z.remember(e,o),r.callOnCompleteCallback(n,t,i)})},e.prototype.onDisconnectSetWithPriority=function(e,t,n,r){var o=this,a=i.nodeFromJSON(t,n);this.Z.onDisconnectPut(""+e,a.val(!0),function(t,n){"ok"===t&&o.z.remember(e,a),o.callOnCompleteCallback(r,t,n)})},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(c.isEmpty(t))return h.log("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.Z.onDisconnectMerge(""+e,t,function(o,a){"ok"===o&&c.forEach(t,function(t,n){var o=i.nodeFromJSON(n);r.z.remember(e.child(t),o)}),r.callOnCompleteCallback(n,o,a)})},e.prototype.addEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.ae.addEventRegistration(e,t):this.ue.addEventRegistration(e,t),this.K.raiseEventsAtPath(e.path,n)},e.prototype.removeEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.ae.removeEventRegistration(e,t):this.ue.removeEventRegistration(e,t),this.K.raiseEventsAtPath(e.path,n)},e.prototype.interrupt=function(){this.J&&this.J.interrupt("repo_interrupt")},e.prototype.resume=function(){this.J&&this.J.resume("repo_interrupt")},e.prototype.stats=function(e){if(void 0===e&&(e=!1),"undefined"!=typeof console){var t;e?(this.G||(this.G=new _.StatsListener(this.$)),t=this.G.get()):t=this.$.get();var n=Object.keys(t).reduce(function(e,t){return Math.max(t.length,e)},0);c.forEach(t,function(e,t){for(var r=e.length;r0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(e){}t+="/"+i}return t}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(34),a=n(1);t.parseRepoInfo=function(e){var n=t.parseURL(e),r=n.subdomain;"firebase"===n.domain&&a.fatal(n.host+" is no longer supported. Please use .firebaseio.com instead"),r&&"undefined"!=r||a.fatal("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||a.warnIfPageIsSecure();var s="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new o.RepoInfo(n.host,n.secure,r,s),path:new i.Path(n.pathString)}},t.parseURL=function(e){var t="",n="",i="",o="",a=!0,s="https",u=443;if("string"==typeof e){var l=e.indexOf("//");l>=0&&(s=e.substring(0,l-1),e=e.substring(l+2));var h=e.indexOf("/");-1===h&&(h=e.length),t=e.substring(0,h),o=r(e.substring(h));var c=t.split(".");3===c.length?(n=c[1],i=c[0].toLowerCase()):2===c.length&&(n=c[0]),(l=t.indexOf(":"))>=0&&(a="https"===s||"wss"===s,u=parseInt(t.substring(l+1),10))}return{host:t,port:u,domain:n,subdomain:i,secure:a,scheme:s,pathString:o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(0),o=n(12),a=n(13),s=function(){function e(e,t,n,r,i){void 0===i&&(i=""),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=e.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=o.PersistentStorage.get("host:"+e)||this.host}return e.prototype.needsQueryParam=function(){return this.host!==this.internalHost},e.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},e.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},e.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},e.prototype.updateHost=function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&o.PersistentStorage.set("host:"+this.host,this.internalHost))},e.prototype.connectionURL=function(e,t){r.assert("string"==typeof e,"typeof type must == string"),r.assert("object"==typeof t,"typeof params must == object");var n;if(e===a.WEBSOCKET)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(e!==a.LONG_POLLING)throw Error("Unknown connection type: "+e);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(t.ns=this.namespace);var o=[];return i.forEach(t,function(e,t){o.push(e+"="+t)}),n+o.join("&")},e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e},e.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},e}();t.RepoInfo=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(7),o=n(1),a=n(0),s=function(){function e(e,t){this.Ie=e,this.Oe=t}return e.prototype.cancel=function(e){r.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),r.validateCallback("OnDisconnect.cancel",1,e,!0);var t=new a.Deferred;return this.Ie.onDisconnectCancel(this.Oe,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){r.validateArgCount("OnDisconnect.remove",0,1,arguments.length),i.validateWritablePath("OnDisconnect.remove",this.Oe),r.validateCallback("OnDisconnect.remove",1,e,!0);var t=new a.Deferred;return this.Ie.onDisconnectSet(this.Oe,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){r.validateArgCount("OnDisconnect.set",1,2,arguments.length),i.validateWritablePath("OnDisconnect.set",this.Oe),i.validateFirebaseDataArg("OnDisconnect.set",1,e,this.Oe,!1),r.validateCallback("OnDisconnect.set",2,t,!0);var n=new a.Deferred;return this.Ie.onDisconnectSet(this.Oe,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){r.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),i.validateWritablePath("OnDisconnect.setWithPriority",this.Oe),i.validateFirebaseDataArg("OnDisconnect.setWithPriority",1,e,this.Oe,!1),i.validatePriority("OnDisconnect.setWithPriority",2,t,!1),r.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var o=new a.Deferred;return this.Ie.onDisconnectSetWithPriority(this.Oe,e,t,o.wrapCallback(n)),o.promise},e.prototype.update=function(e,t){if(r.validateArgCount("OnDisconnect.update",1,2,arguments.length),i.validateWritablePath("OnDisconnect.update",this.Oe),Array.isArray(e)){for(var n={},s=0;s3e4&&(this.nt=v),this._t=null}}else this.de("Window isn't visible. Delaying reconnect."),this.nt=this.rt,this.ft=(new Date).getTime();var t=(new Date).getTime()-this.ft,n=Math.max(0,this.nt-t);n=Math.random()*n,this.de("Trying to reconnect in "+n+"ms"),this.yt(n),this.nt=Math.min(this.rt,1.3*this.nt)}this.te(!1)},t.prototype.Ft=function(){if(this.Wt()){this.de("Making a connection attempt"),this.ft=(new Date).getTime(),this._t=null;var e=this.wt.bind(this),n=this.At.bind(this),r=this.xt.bind(this),i=this.id+":"+t.jt++,o=this,a=this.lastSessionId,l=!1,h=null,c=function(){h?h.close():(l=!0,r())},p=function(e){s.assert(h,"sendRequest call when we're not connected not allowed."),h.sendRequest(e)};this.lt={close:c,sendRequest:p};var _=this.ct;this.ct=!1,this.Ke.getToken(_).then(function(t){l?u.log("getToken() completed but was canceled"):(u.log("getToken() completed. Creating connection."),o.ht=t&&t.accessToken,h=new d.Connection(i,o.H,e,n,r,function(e){u.warn(e+" ("+o.H+")"),o.interrupt("server_kill")},a))}).then(null,function(e){o.de("Failed to get token: "+e),l||(f.CONSTANTS.NODE_ADMIN&&u.warn(e),c())})}},t.prototype.interrupt=function(e){u.log("Interrupting connection for reason: "+e),this.ze[e]=!0,this.lt?this.lt.close():(this.ot&&(clearTimeout(this.ot),this.ot=null),this.tt&&this.xt())},t.prototype.resume=function(e){u.log("Resuming connection for reason: "+e),delete this.ze[e],o.isEmpty(this.ze)&&(this.nt=v,this.lt||this.yt(0))},t.prototype.Dt=function(e){var t=e-(new Date).getTime();this.ne({serverTimeOffset:t})},t.prototype.kt=function(){for(var e=0;e=3&&(this.nt=3e4,this.Ke.notifyForInvalidToken())},t.prototype.Ot=function(e){this.it?this.it(e):"msg"in e&&"undefined"!=typeof console&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.Lt=function(){var e=this;this.tryAuth(),o.forEach(this.Je,function(t,n){o.forEach(n,function(t,n){e.mt(n)})});for(var t=0;t0,"Requires a non-empty array")}return e.prototype.trigger=function(e){for(var t=[],n=1;n0&&(this.rn=r.setTimeoutNonBlocking(function(){e.rn=null,e.nn||(e.Yt&&e.Yt.bytesReceived>102400?(e.de("Connection exceeded healthy timeout but has received "+e.Yt.bytesReceived+" bytes. Marking connection healthy."),e.nn=!0,e.Yt.markConnectionHealthy()):e.Yt&&e.Yt.bytesSent>10240?e.de("Connection exceeded healthy timeout but has sent "+e.Yt.bytesSent+" bytes. Leaving connection alive."):(e.de("Closing unhealthy connection after timeout."),e.close()))},Math.floor(o)))},e.prototype.Xt=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.$t=function(e){var t=this;return function(n){e===t.Yt?t.in(n):e===t.tn?(t.de("Secondary connection lost."),t.an()):t.de("closing an old connection")}},e.prototype.Jt=function(e){var t=this;return function(n){2!=t.Ht&&(e===t.en?t.sn(n):e===t.tn?t.un(n):t.de("message on old connection"))}},e.prototype.sendRequest=function(e){var t={t:"d",d:e};this.ln(t)},e.prototype.tryCleanupConnection=function(){this.Zt===this.tn&&this.en===this.tn&&(this.de("cleaning up and promoting a connection: "+this.tn.connId),this.Yt=this.tn,this.tn=null)},e.prototype.hn=function(e){if("t"in e){var t=e.t;"a"===t?this.cn():"r"===t?(this.de("Got a reset on secondary, closing it"),this.tn.close(),this.Zt!==this.tn&&this.en!==this.tn||this.close()):"o"===t&&(this.de("got pong on secondary."),this.pn--,this.cn())}},e.prototype.un=function(e){var t=r.requireKey("t",e),n=r.requireKey("d",e);if("c"==t)this.hn(n);else{if("d"!=t)throw Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}},e.prototype.cn=function(){this.pn<=0?(this.de("Secondary connection is healthy."),this.nn=!0,this.tn.markConnectionHealthy(),this.dn()):(this.de("sending ping on secondary."),this.tn.send({t:"c",d:{t:"p",d:{}}}))},e.prototype.dn=function(){this.tn.start(),this.de("sending client ack on secondary"),this.tn.send({t:"c",d:{t:"a",d:{}}}),this.de("Ending transmission on primary"),this.Yt.send({t:"c",d:{t:"n",d:{}}}),this.Zt=this.tn,this.tryCleanupConnection()},e.prototype.sn=function(e){var t=r.requireKey("t",e),n=r.requireKey("d",e);"c"==t?this.fn(n):"d"==t&&this.wt(n)},e.prototype.wt=function(e){this._n(),this.Ut(e)},e.prototype._n=function(){this.nn||--this.zt<=0&&(this.de("Primary connection is healthy."),this.nn=!0,this.Yt.markConnectionHealthy())},e.prototype.fn=function(e){var t=r.requireKey("t",e);if("d"in e){var n=e.d;if("h"===t)this.yn(n);else if("n"===t){this.de("recvd end transmission on primary"),this.en=this.tn;for(var i=0;idocument.domain="'+document.domain+'";<\/script>');var h=""+u+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(h),this.myIFrame.doc.close()}catch(e){r.log("frame writing exception"),e.stack&&r.log(e.stack),r.log(e)}}}return e.Dn=function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||r.log("No IE domain setting required")}catch(n){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.prototype.close=function(){var n=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==n.myIFrame&&(document.body.removeChild(n.myIFrame),n.myIFrame=null)},Math.floor(0))),l.isNodeSdk()&&this.myID){var r={};r[t.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM]="t",r[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,r[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW;var i=this.urlFn(r);e.nodeRestRequest(i)}var o=this.onDisconnect;o&&(this.onDisconnect=null,o())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.Mn(););},e.prototype.Mn=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,e[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW,e[t.FIREBASE_LONGPOLL_SERIAL_PARAM]=this.currentSerial;for(var n=this.urlFn(e),r="",i=0;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+30+r.length<=1870;){var o=this.pendingSegs.shift();r=r+"&"+t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+i+"="+o.seg+"&"+t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+i+"="+o.ts+"&"+t.FIREBASE_LONGPOLL_DATA_PARAM+i+"="+o.d,i++}return n+=r,this.Ln(n,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.Mn()},e.prototype.Ln=function(e,t){var n=this;this.outstandingRequests.add(t,1);var r=function(){n.outstandingRequests.remove(t),n.Mn()},i=setTimeout(r,Math.floor(25e3)),o=function(){clearTimeout(i),r()};this.addTag(e,o)},e.prototype.addTag=function(e,t){var n=this;l.isNodeSdk()?this.doNodeLongPoll(e,t):setTimeout(function(){try{if(!n.sendNewPolls)return;var i=n.myIFrame.doc.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var e=i.readyState;e&&"loaded"!==e&&"complete"!==e||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),t())},i.onerror=function(){r.log("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(i)}catch(e){}},Math.floor(1))},e}();t.FirebaseIFrameScriptHolder=c},function(e,t,n){"use strict";(function(e){function r(e){d=e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(0),a=n(1),s=n(25),u=n(13),l=n(0),h=n(12),c=n(0),p=n(0),d=null;"undefined"!=typeof MozWebSocket?d=MozWebSocket:"undefined"!=typeof WebSocket&&(d=WebSocket),t.setWebSocketImpl=r;var f=function(){function t(e,n,r,i){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.de=a.logWrapper(this.connId),this.$=s.StatsManager.getCollection(n),this.connURL=t.Fn(n,r,i)}return t.Fn=function(e,t,n){var r={};return r[u.VERSION_PARAM]=u.PROTOCOL_VERSION,!p.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(u.FORGE_DOMAIN)&&(r[u.REFERER_PARAM]=u.FORGE_REF),t&&(r[u.TRANSPORT_SESSION_PARAM]=t),n&&(r[u.LAST_SESSION_PARAM]=n),e.connectionURL(u.WEBSOCKET,r)},t.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.de("Websocket connecting to "+this.connURL),this.bn=!1,h.PersistentStorage.set("previous_websocket_failure",!0);try{if(p.isNodeSdk()){var o=l.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/"+u.PROTOCOL_VERSION+"/"+i.default.SDK_VERSION+"/"+e.platform+"/"+o}},s=e.env,c=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;c&&(a.proxy={origin:c}),this.mySock=new d(this.connURL,[],a)}else this.mySock=new d(this.connURL)}catch(e){this.de("Error instantiating WebSocket.");var f=e.message||e.data;return f&&this.de(f),void this.wn()}this.mySock.onopen=function(){r.de("Websocket connected."),r.bn=!0},this.mySock.onclose=function(){r.de("Websocket connection was disconnected."),r.mySock=null,r.wn()},this.mySock.onmessage=function(e){r.handleIncomingFrame(e)},this.mySock.onerror=function(e){r.de("WebSocket error. Closing connection.");var t=e.message||e.data;t&&r.de(t),r.wn()}},t.prototype.start=function(){},t.forceDisallow=function(){t.On=!0},t.isAvailable=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&null!==d&&!t.On},t.previouslyFailed=function(){return h.PersistentStorage.isInMemoryStorage||!0===h.PersistentStorage.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){h.PersistentStorage.remove("previous_websocket_failure")},t.prototype.xn=function(e){if(this.frames.push(e),this.frames.length==this.totalFrames){var t=this.frames.join("");this.frames=null;var n=c.jsonEval(t);this.onMessage(n)}},t.prototype.kn=function(e){this.totalFrames=e,this.frames=[]},t.prototype.Wn=function(e){if(o.assert(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=+e;if(!isNaN(t))return this.kn(t),null}return this.kn(1),e},t.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.$.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.xn(t);else{var n=this.Wn(t);null!==n&&this.xn(n)}}},t.prototype.send=function(e){this.resetKeepAlive();var t=c.stringify(e);this.bytesSent+=t.length,this.$.incrementCounter("bytes_sent",t.length);var n=a.splitStringBySize(t,16384);n.length>1&&this.jn(n.length+"");for(var r=0;r=0;a--)s[a]=e.charAt(i%64),i=Math.floor(i/64);r.assert(0===i,"Cannot push at time == 0");var u=s.join("");if(o){for(a=11;a>=0&&63===n[a];a--)n[a]=0;n[a]++}else for(a=0;a<12;a++)n[a]=Math.floor(64*Math.random());for(a=0;a<12;a++)u+=e.charAt(n[a]);return r.assert(20===u.length,"nextPushId: Length should be 20."),u}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),i=n(85),o=n(0),a=n(0),s=function(){function e(e,t,n){this.Xn=e,this.zn=t,this.Jn=n}return e.prototype.respondsTo=function(e){return"value"===e},e.prototype.createEvent=function(e,t){var n=t.getQueryParams().getIndex();return new i.DataEvent("value",this,new r.DataSnapshot(e.snapshotNode,t.getRef(),n))},e.prototype.getEventRunner=function(e){var t=this.Jn;if("cancel"===e.getEventType()){a.assert(this.zn,"Raising a cancel event on a listener with no cancel callback");var n=this.zn;return function(){n.call(t,e.error)}}var r=this.Xn;return function(){r.call(t,e.snapshot)}},e.prototype.createCancelEvent=function(e,t){return this.zn?new i.CancelEvent(this,e,t):null},e.prototype.matches=function(t){return t instanceof e&&(!t.Xn||!this.Xn||t.Xn===this.Xn&&t.Jn===this.Jn)},e.prototype.hasAnyCallback=function(){return null!==this.Xn},e}();t.ValueEventRegistration=s;var u=function(){function e(e,t,n){this.$n=e,this.zn=t,this.Jn=n}return e.prototype.respondsTo=function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,o.contains(this.$n,t)},e.prototype.createCancelEvent=function(e,t){return this.zn?new i.CancelEvent(this,e,t):null},e.prototype.createEvent=function(e,t){a.assert(null!=e.childName,"Child events should have a childName.");var n=t.getRef().child(e.childName),o=t.getQueryParams().getIndex();return new i.DataEvent(e.type,this,new r.DataSnapshot(e.snapshotNode,n,o),e.prevName)},e.prototype.getEventRunner=function(e){var t=this.Jn;if("cancel"===e.getEventType()){a.assert(this.zn,"Raising a cancel event on a listener with no cancel callback");var n=this.zn;return function(){n.call(t,e.error)}}var r=this.$n[e.eventType];return function(){r.call(t,e.snapshot,e.prevName)}},e.prototype.matches=function(t){if(t instanceof e){if(!this.$n||!t.$n)return!0;if(this.Jn===t.Jn){var n=o.getCount(t.$n);if(n===o.getCount(this.$n)){if(1===n){var r=o.getAnyKey(t.$n),i=o.getAnyKey(this.$n);return!(i!==r||t.$n[r]&&this.$n[i]&&t.$n[r]!==this.$n[i])}return o.every(this.$n,function(e,n){return t.$n[e]===n})}}}return!1},e.prototype.hasAnyCallback=function(){return null!==this.$n},e}();t.ChildEventRegistration=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}return e.prototype.getPath=function(){var e=this.snapshot.getRef();return"value"===this.eventType?e.path:e.getParent().path},e.prototype.getEventType=function(){return this.eventType},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.getPath()+":"+this.eventType+":"+r.stringify(this.snapshot.exportVal())},e}();t.DataEvent=i;var o=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return"cancel"},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path+":cancel"},e}();t.CancelEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(87),a=n(4),s=n(0),u=n(23),l=n(88),h=n(89),c=n(8),p=n(46),d=n(2),f=n(47),_=n(95),y=function(){function e(e){this.Zn=e,this.er=u.ImmutableTree.Empty,this.tr=new _.WriteTree,this.nr={},this.rr={}}return e.prototype.applyUserOverwrite=function(e,t,n,r){return this.tr.addOverwrite(e,t,n,r),r?this.ir(new p.Overwrite(c.OperationSource.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.tr.addMerge(e,t,n);var r=u.ImmutableTree.fromObject(t);return this.ir(new h.Merge(c.OperationSource.User,e,r))},e.prototype.ackUserWrite=function(e,t){void 0===t&&(t=!1);var n=this.tr.getWrite(e);if(this.tr.removeWrite(e)){var r=u.ImmutableTree.Empty;return null!=n.snap?r=r.set(d.Path.Empty,!0):s.forEach(n.children,function(e,t){r=r.set(new d.Path(e),t)}),this.ir(new o.AckUserWrite(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.ir(new p.Overwrite(c.OperationSource.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=u.ImmutableTree.fromObject(t);return this.ir(new h.Merge(c.OperationSource.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.ir(new l.ListenComplete(c.OperationSource.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var i=this.or(r);if(null!=i){var o=e.ar(i),a=o.path,s=o.queryId,u=d.Path.relativePath(a,t),l=new p.Overwrite(c.OperationSource.forServerTaggedQuery(s),u,n);return this.sr(a,l)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var i=this.or(r);if(i){var o=e.ar(i),a=o.path,s=o.queryId,l=d.Path.relativePath(a,t),p=u.ImmutableTree.fromObject(n),f=new h.Merge(c.OperationSource.forServerTaggedQuery(s),l,p);return this.sr(a,f)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.or(n);if(r){var i=e.ar(r),o=i.path,a=i.queryId,s=d.Path.relativePath(o,t),u=new l.ListenComplete(c.OperationSource.forServerTaggedQuery(a),s);return this.sr(o,u)}return[]},e.prototype.addEventRegistration=function(t,n){var i=t.path,o=null,s=!1;this.er.foreachOnPath(i,function(e,t){var n=d.Path.relativePath(e,i);o=o||t.getCompleteServerCache(n),s=s||t.hasCompleteView()});var u=this.er.get(i);u?(s=s||u.hasCompleteView(),o=o||u.getCompleteServerCache(d.Path.Empty)):(u=new f.SyncPoint,this.er=this.er.set(i,u));var l;null!=o?l=!0:(l=!1,o=a.ChildrenNode.EMPTY_NODE,this.er.subtree(i).foreachChild(function(e,t){var n=t.getCompleteServerCache(d.Path.Empty);n&&(o=o.updateImmediateChild(e,n))}));var h=u.viewExistsForQuery(t);if(!h&&!t.getQueryParams().loadsAllData()){var c=e.ur(t);r.assert(!(c in this.rr),"View does not exist, but we have a tag");var p=e.lr();this.rr[c]=p,this.nr["_"+p]=c}var _=this.tr.childWrites(i),y=u.addEventRegistration(t,n,_,o,l);if(!h&&!s){var v=u.viewForQuery(t);y=y.concat(this.hr(t,v))}return y},e.prototype.removeEventRegistration=function(t,n,r){var i=this,o=t.path,a=this.er.get(o),s=[];if(a&&("default"===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.er=this.er.remove(o));var l=u.removed;s=u.events;var h=-1!==l.findIndex(function(e){return e.getQueryParams().loadsAllData()}),c=this.er.findOnPath(o,function(e,t){return t.hasCompleteView()});if(h&&!c){var p=this.er.subtree(o);if(!p.isEmpty())for(var d=this.cr(p),f=0;f0&&!r&&(h?this.Zn.stopListening(e.dr(t),null):l.forEach(function(t){var n=i.rr[e.ur(t)];i.Zn.stopListening(e.dr(t),n)})),this._r(l)}return s},e.prototype.calcCompleteEventCache=function(e,t){var n=this.tr,r=this.er.findOnPath(e,function(t,n){var r=d.Path.relativePath(t,e),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(e,r,t,!0)},e.prototype.cr=function(e){return e.fold(function(e,t,n){if(t&&t.hasCompleteView())return[t.getCompleteView()];var r=[];return t&&(r=t.getQueryViews()),s.forEach(n,function(e,t){r=r.concat(t)}),r})},e.prototype._r=function(t){for(var n=0;n0||!e.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(a.Change.valueChange(t.getCompleteEventSnap()))}},e.prototype.Lr=function(e,t,n,r,o){var a=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var u=void 0,l=void 0;if(t.isEmpty())if(i.assert(e.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),e.getServerCache().isFiltered()){var h=e.getCompleteServerSnap(),c=h instanceof s.ChildrenNode?h:s.ChildrenNode.EMPTY_NODE,p=n.calcCompleteEventChildren(c);u=this.Sr.updateFullNode(e.getEventCache().getNode(),p,o)}else{var d=n.calcCompleteEventCache(e.getCompleteServerSnap());u=this.Sr.updateFullNode(e.getEventCache().getNode(),d,o)}else{var f=t.getFront();if(".priority"==f){i.assert(1==t.getLength(),"Can't have a priority with additional path components");var _=a.getNode();l=e.getServerCache().getNode();var y=n.calcEventCacheAfterServerOverwrite(t,_,l);u=null!=y?this.Sr.updatePriority(_,y):a.getNode()}else{var v=t.popFront(),g=void 0;if(a.isCompleteForChild(f)){l=e.getServerCache().getNode();var m=n.calcEventCacheAfterServerOverwrite(t,a.getNode(),l);g=null!=m?a.getNode().getImmediateChild(f).updateChild(v,m):a.getNode().getImmediateChild(f)}else g=n.calcCompleteChild(f,e.getServerCache());u=null!=g?this.Sr.updateChild(a.getNode(),f,g,v,r,o):a.getNode()}}return e.updateEventSnap(u,a.isFullyInitialized()||t.isEmpty(),this.Sr.filtersNodes())},e.prototype.wr=function(e,t,n,r,i,o,a){var s,u=e.getServerCache(),l=o?this.Sr:this.Sr.getIndexedFilter();if(t.isEmpty())s=l.updateFullNode(u.getNode(),n,null);else if(l.filtersNodes()&&!u.isFiltered()){var h=u.getNode().updateChild(t,n);s=l.updateFullNode(u.getNode(),h,null)}else{var p=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var d=t.popFront(),f=u.getNode().getImmediateChild(p),_=f.updateChild(d,n);s=".priority"==p?l.updatePriority(u.getNode(),_):l.updateChild(u.getNode(),p,_,d,c.NO_COMPLETE_CHILD_SOURCE,null)}var y=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),l.filtersNodes()),v=new c.WriteTreeCompleteChildSource(r,y,i);return this.Lr(y,t,r,v,a)},e.prototype.Tr=function(e,t,n,r,i,o){var a,u,l=e.getEventCache(),h=new c.WriteTreeCompleteChildSource(r,e,i);if(t.isEmpty())u=this.Sr.updateFullNode(e.getEventCache().getNode(),n,o),a=e.updateEventSnap(u,!0,this.Sr.filtersNodes());else{var p=t.getFront();if(".priority"===p)u=this.Sr.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(u,l.isFullyInitialized(),l.isFiltered());else{var d=t.popFront(),f=l.getNode().getImmediateChild(p),_=void 0;if(d.isEmpty())_=n;else{var y=h.getCompleteChild(p);_=null!=y?".priority"===d.getBack()&&y.getChild(d.parent()).isEmpty()?y:y.updateChild(d,n):s.ChildrenNode.EMPTY_NODE}if(f.equals(_))a=e;else{var v=this.Sr.updateChild(l.getNode(),p,_,d,h,o);a=e.updateEventSnap(v,l.isFullyInitialized(),this.Sr.filtersNodes())}}}return a},e.Fr=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.Ir=function(t,n,r,i,o,a){var s=this,u=t;return r.foreach(function(r,l){var h=n.child(r);e.Fr(t,h.getFront())&&(u=s.Tr(u,h,l,i,o,a))}),r.foreach(function(r,l){var h=n.child(r);e.Fr(t,h.getFront())||(u=s.Tr(u,h,l,i,o,a))}),u},e.prototype.xr=function(e,t){return t.foreach(function(t,n){e=e.updateChild(t,n)}),e},e.prototype.Rr=function(e,t,n,r,i,o,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,c=e;u=t.isEmpty()?n:l.ImmutableTree.Empty.setTree(t,n);var p=e.getServerCache().getNode();return u.children.inorderTraversal(function(t,n){if(p.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),l=s.xr(u,n);c=s.wr(c,new h.Path(t),l,r,i,o,a)}}),u.children.inorderTraversal(function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!p.hasChild(t)&&!u){var l=e.getServerCache().getNode().getImmediateChild(t),d=s.xr(l,n);c=s.wr(c,new h.Path(t),d,r,i,o,a)}}),c},e.prototype.Ar=function(e,t,n,r,i,o){if(null!=r.shadowingWrite(t))return e;var a=e.getServerCache().isFiltered(),s=e.getServerCache();if(null!=n.value){if(t.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(t))return this.wr(e,t,s.getNode().getChild(t),r,i,a,o);if(t.isEmpty()){var c=l.ImmutableTree.Empty;return s.getNode().forEachChild(u.KEY_INDEX,function(e,t){c=c.set(new h.Path(e),t)}),this.Rr(e,t,c,r,i,a,o)}return e}var p=l.ImmutableTree.Empty;return n.foreach(function(e,n){var r=t.child(e);s.isCompleteForPath(r)&&(p=p.set(e,s.getNode().getChild(r)))}),this.Rr(e,t,p,r,i,a,o)},e.prototype.Dr=function(e,t,n,r){var i=e.getServerCache(),o=e.updateServerSnap(i.getNode(),i.isFullyInitialized()||t.isEmpty(),i.isFiltered());return this.Lr(o,t,n,c.NO_COMPLETE_CHILD_SOURCE,r)},e.prototype.Or=function(e,t,n,r,o){var a;if(null!=n.shadowingWrite(t))return e;var u=new c.WriteTreeCompleteChildSource(n,e,r),l=e.getEventCache().getNode(),p=void 0;if(t.isEmpty()||".priority"===t.getFront()){var d=void 0;if(e.getServerCache().isFullyInitialized())d=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var f=e.getServerCache().getNode();i.assert(f instanceof s.ChildrenNode,"serverChildren would be complete if leaf node"),d=n.calcCompleteEventChildren(f)}d=d,p=this.Sr.updateFullNode(l,d,o)}else{var _=t.getFront(),y=n.calcCompleteChild(_,e.getServerCache());null==y&&e.getServerCache().isCompleteForChild(_)&&(y=l.getImmediateChild(_)),p=null!=y?this.Sr.updateChild(l,_,y,t.popFront(),u,o):e.getEventCache().getNode().hasChild(_)?this.Sr.updateChild(l,_,s.ChildrenNode.EMPTY_NODE,t.popFront(),u,o):l,p.isEmpty()&&e.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(e.getCompleteServerSnap()),a.isLeafNode()&&(p=this.Sr.updateFullNode(p,a,o)))}return a=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(h.Path.Empty),e.updateEventSnap(p,a,this.Sr.filtersNodes())},e}();t.ViewProcessor=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(9),o=n(0),a=function(){function e(){this.kr={}}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;o.assert(t==i.Change.CHILD_ADDED||t==i.Change.CHILD_CHANGED||t==i.Change.CHILD_REMOVED,"Only child changes supported for tracking"),o.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var a=r.safeGet(this.kr,n);if(a){var s=a.type;if(t==i.Change.CHILD_ADDED&&s==i.Change.CHILD_REMOVED)this.kr[n]=i.Change.childChangedChange(n,e.snapshotNode,a.snapshotNode);else if(t==i.Change.CHILD_REMOVED&&s==i.Change.CHILD_ADDED)delete this.kr[n];else if(t==i.Change.CHILD_REMOVED&&s==i.Change.CHILD_CHANGED)this.kr[n]=i.Change.childRemovedChange(n,a.oldSnap);else if(t==i.Change.CHILD_CHANGED&&s==i.Change.CHILD_ADDED)this.kr[n]=i.Change.childAddedChange(n,e.snapshotNode);else{if(t!=i.Change.CHILD_CHANGED||s!=i.Change.CHILD_CHANGED)throw o.assertionError("Illegal combination of changes: "+e+" occurred after "+a);this.kr[n]=i.Change.childChangedChange(n,e.snapshotNode,a.oldSnap)}}else this.kr[n]=e},e.prototype.getChanges=function(){return r.getValues(this.kr)},e}();t.ChildChangeAccumulator=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),i=function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}();t.Wr=i,t.NO_COMPLETE_CHILD_SOURCE=new i;var o=function(){function e(e,t,n){void 0===n&&(n=null),this.jr=e,this.Nr=t,this.Vr=n}return e.prototype.getCompleteChild=function(e){var t=this.Nr.getEventCache();if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.Vr?new r.CacheNode(this.Vr,!0,!1):this.Nr.getServerCache();return this.jr.calcCompleteChild(e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.Vr?this.Vr:this.Nr.getCompleteServerSnap(),i=this.jr.calcIndexedSlice(r,t,1,n,e);return 0===i.length?null:i[0]},e}();t.WriteTreeCompleteChildSource=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=n(9),o=n(0),a=function(){function e(e){this.mr=e,this.me=this.mr.getQueryParams().getIndex()}return e.prototype.generateEventsForChanges=function(e,t,n){var r=this,o=[],a=[];return e.forEach(function(e){e.type===i.Change.CHILD_CHANGED&&r.me.indexedValueChanged(e.oldSnap,e.snapshotNode)&&a.push(i.Change.childMovedChange(e.childName,e.snapshotNode))}),this.Qr(o,i.Change.CHILD_REMOVED,e,n,t),this.Qr(o,i.Change.CHILD_ADDED,e,n,t),this.Qr(o,i.Change.CHILD_MOVED,a,n,t),this.Qr(o,i.Change.CHILD_CHANGED,e,n,t),this.Qr(o,i.Change.VALUE,e,n,t),o},e.prototype.Qr=function(e,t,n,r,i){var o=this,a=n.filter(function(e){return e.type===t});a.sort(this.qr.bind(this)),a.forEach(function(t){var n=o.Ur(t,i);r.forEach(function(r){r.respondsTo(t.type)&&e.push(r.createEvent(n,o.mr))})})},e.prototype.Ur=function(e,t){return"value"===e.type||"child_removed"===e.type?e:(e.prevName=t.getPredecessorChildName(e.childName,e.snapshotNode,this.me),e)},e.prototype.qr=function(e,t){if(null==e.childName||null==t.childName)throw o.assertionError("Should only compare child_ events.");var n=new r.NamedNode(e.childName,e.snapshotNode),i=new r.NamedNode(t.childName,t.snapshotNode);return this.me.compare(n,i)},e}();t.EventGenerator=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(0),o=n(2),a=n(96),s=n(3),u=n(4),l=function(){function e(){this.Br=a.CompoundWrite.Empty,this.Hr=[],this.Gr=-1}return e.prototype.childWrites=function(e){return new h(e,this)},e.prototype.addOverwrite=function(e,t,n,r){i.assert(n>this.Gr,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.Hr.push({path:e,snap:t,writeId:n,visible:r}),r&&(this.Br=this.Br.addWrite(e,t)),this.Gr=n},e.prototype.addMerge=function(e,t,n){i.assert(n>this.Gr,"Stacking an older merge on top of newer ones"),this.Hr.push({path:e,children:t,writeId:n,visible:!0}),this.Br=this.Br.addWrites(e,t),this.Gr=n},e.prototype.getWrite=function(e){for(var t=0;t=0,"removeWrite called with nonexistent writeId.");var o=this.Hr[n];this.Hr.splice(n,1);for(var a=o.visible,s=!1,u=this.Hr.length-1;a&&u>=0;){var l=this.Hr[u];l.visible&&(u>=n&&this.Kr(l,o.path)?a=!1:o.path.contains(l.path)&&(s=!0)),u--}if(a){if(s)return this.Yr(),!0;if(o.snap)this.Br=this.Br.removeWrite(o.path);else{var h=o.children;r.forEach(h,function(e){t.Br=t.Br.removeWrite(o.path.child(e))})}return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.Br.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,i){if(r||i){var a=this.Br.childCompoundWrite(t);if(!i&&a.isEmpty())return n;if(i||null!=n||a.hasCompleteWrite(o.Path.Empty)){var s=function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))},l=e.Xr(this.Hr,s,t),h=n||u.ChildrenNode.EMPTY_NODE;return l.apply(h)}return null}var c=this.Br.getCompleteNode(t);if(null!=c)return c;var p=this.Br.childCompoundWrite(t);if(p.isEmpty())return n;if(null!=n||p.hasCompleteWrite(o.Path.Empty)){var h=n||u.ChildrenNode.EMPTY_NODE;return p.apply(h)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=u.ChildrenNode.EMPTY_NODE,r=this.Br.getCompleteNode(e);if(r)return r.isLeafNode()||r.forEachChild(s.PRIORITY_INDEX,function(e,t){n=n.updateImmediateChild(e,t)}),n;if(t){var i=this.Br.childCompoundWrite(e);return t.forEachChild(s.PRIORITY_INDEX,function(e,t){var r=i.childCompoundWrite(new o.Path(e)).apply(t);n=n.updateImmediateChild(e,r)}),i.getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n}return this.Br.childCompoundWrite(e).getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n,r){i.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var o=e.child(t);if(this.Br.hasCompleteWrite(o))return null;var a=this.Br.childCompoundWrite(o);return a.isEmpty()?r.getChild(t):a.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),i=this.Br.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(t)?this.Br.childCompoundWrite(r).apply(n.getNode().getImmediateChild(t)):null},e.prototype.shadowingWrite=function(e){return this.Br.getCompleteNode(e)},e.prototype.calcIndexedSlice=function(e,t,n,r,i,a){var s,u=this.Br.childCompoundWrite(e),l=u.getCompleteNode(o.Path.Empty);if(null!=l)s=l;else{if(null==t)return[];s=u.apply(t)}if(s=s.withIndex(a),s.isEmpty()||s.isLeafNode())return[];for(var h=[],c=a.getCompare(),p=i?s.getReverseIteratorFrom(n,a):s.getIteratorFrom(n,a),d=p.getNext();d&&h.length0?this.Gr=this.Hr[this.Hr.length-1].writeId:this.Gr=-1},e.zr=function(e){return e.visible},e.Xr=function(e,t,n){for(var s=a.CompoundWrite.Empty,u=0;u0&&r.contains(e.ri,t)&&(n[t]=i,o=!0)}),o&&this.Z.reportStats(n),i.setTimeoutNonBlocking(this.ii.bind(this),Math.floor(2*Math.random()*3e5))},e}();t.StatsReporter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(){this.oi=[],this.ai=0}return e.prototype.queueEvents=function(e){for(var t=null,n=0;n0)return this.ci[0];throw Error("No transports available")},e.prototype.upgradeTransport=function(){return this.ci.length>1?this.ci[1]:null},e}();t.TransportManager=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.Ut=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse=200&&h.status<300){try{e=a.jsonEval(h.responseText)}catch(e){o.warn("Failed to parse JSON response for "+l+": "+h.responseText)}n(null,e)}else 401!==h.status&&404!==h.status&&o.warn("Got unsuccessful REST response for "+l+" Status: "+h.status),n(h.status);n=null}},h.open("GET",l,!0),h.send()})},t}(l.ServerActions);t.ReadonlyRestClient=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(10),a=n(3),s=n(38),u=n(42),l=n(24),h=n(108),c=n(56),p=n(0),d=function(){function e(){this.fi=!1,this._i=!1,this.yi=!1,this.vi=!1,this.gi=!1,this.mi=0,this.Ci="",this.Ei=null,this.Ni="",this.Pi=null,this.bi="",this.me=a.PRIORITY_INDEX}return e.prototype.hasStart=function(){return this._i},e.prototype.isViewFromLeft=function(){return""===this.Ci?this._i:this.Ci===e.Si.VIEW_FROM_LEFT},e.prototype.getIndexStartValue=function(){return r.assert(this._i,"Only valid if start has been set"),this.Ei},e.prototype.getIndexStartName=function(){return r.assert(this._i,"Only valid if start has been set"),this.yi?this.Ni:i.MIN_NAME},e.prototype.hasEnd=function(){return this.vi},e.prototype.getIndexEndValue=function(){return r.assert(this.vi,"Only valid if end has been set"),this.Pi},e.prototype.getIndexEndName=function(){return r.assert(this.vi,"Only valid if end has been set"),this.gi?this.bi:i.MAX_NAME},e.prototype.hasLimit=function(){return this.fi},e.prototype.hasAnchoredLimit=function(){return this.fi&&""!==this.Ci},e.prototype.getLimit=function(){return r.assert(this.fi,"Only valid if limit has been set"),this.mi},e.prototype.getIndex=function(){return this.me},e.prototype.Ti=function(){var t=new e;return t.fi=this.fi,t.mi=this.mi,t._i=this._i,t.Ei=this.Ei,t.yi=this.yi,t.Ni=this.Ni,t.vi=this.vi,t.Pi=this.Pi,t.gi=this.gi,t.bi=this.bi,t.me=this.me,t.Ci=this.Ci,t},e.prototype.limit=function(e){var t=this.Ti();return t.fi=!0,t.mi=e,t.Ci="",t},e.prototype.limitToFirst=function(t){var n=this.Ti();return n.fi=!0,n.mi=t,n.Ci=e.Si.VIEW_FROM_LEFT,n},e.prototype.limitToLast=function(t){var n=this.Ti();return n.fi=!0,n.mi=t,n.Ci=e.Si.VIEW_FROM_RIGHT,n},e.prototype.startAt=function(e,t){var n=this.Ti();return n._i=!0,void 0===e&&(e=null),n.Ei=e,null!=t?(n.yi=!0,n.Ni=t):(n.yi=!1,n.Ni=""),n},e.prototype.endAt=function(e,t){var n=this.Ti();return n.vi=!0,void 0===e&&(e=null),n.Pi=e,void 0!==t?(n.gi=!0,n.bi=t):(n.gi=!1,n.bi=""),n},e.prototype.orderBy=function(e){var t=this.Ti();return t.me=e,t},e.prototype.getQueryObject=function(){var t=e.Si,n={};if(this._i&&(n[t.INDEX_START_VALUE]=this.Ei,this.yi&&(n[t.INDEX_START_NAME]=this.Ni)),this.vi&&(n[t.INDEX_END_VALUE]=this.Pi,this.gi&&(n[t.INDEX_END_NAME]=this.bi)),this.fi){n[t.LIMIT]=this.mi;var r=this.Ci;""===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),n[t.VIEW_FROM]=r}return this.me!==a.PRIORITY_INDEX&&(n[t.INDEX]=""+this.me),n},e.prototype.loadsAllData=function(){return!(this._i||this.vi||this.fi)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.me==a.PRIORITY_INDEX},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new l.IndexedFilter(this.getIndex()):this.hasLimit()?new h.LimitedFilter(this):new c.RangedFilter(this)},e.prototype.toRestQueryStringParameters=function(){var t=e.wi,n={};if(this.isDefault())return n;var i;return this.me===a.PRIORITY_INDEX?i=t.PRIORITY_INDEX:this.me===s.VALUE_INDEX?i=t.VALUE_INDEX:this.me===o.KEY_INDEX?i=t.KEY_INDEX:(r.assert(this.me instanceof u.PathIndex,"Unrecognized index type!"),i=""+this.me),n[t.ORDER_BY]=p.stringify(i),this._i&&(n[t.START_AT]=p.stringify(this.Ei),this.yi&&(n[t.START_AT]+=","+p.stringify(this.Ni))),this.vi&&(n[t.END_AT]=p.stringify(this.Pi),this.gi&&(n[t.END_AT]+=","+p.stringify(this.bi))),this.fi&&(this.isViewFromLeft()?n[t.LIMIT_TO_FIRST]=this.mi:n[t.LIMIT_TO_LAST]=this.mi),n},e.Si={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},e.wi={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},e.DEFAULT=new e,e}();t.QueryParams=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(56),i=n(4),o=n(5),a=n(0),s=n(9),u=function(){function e(e){this.Ii=new r.RangedFilter(e),this.me=e.getIndex(),this.mi=e.getLimit(),this.Ri=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,a,s){return this.Ii.matches(new o.NamedNode(t,n))||(n=i.ChildrenNode.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()=0)return null!=u&&u.trackChildChange(s.Change.childChangedChange(t,n,_)),c.updateImmediateChild(t,n);null!=u&&u.trackChildChange(s.Change.childRemovedChange(t,_));var g=c.updateImmediateChild(t,i.ChildrenNode.EMPTY_NODE);return null!=y&&this.Ii.matches(y)?(null!=u&&u.trackChildChange(s.Change.childAddedChange(y.name,y.node)),g.updateImmediateChild(y.name,y.node)):g}return n.isEmpty()?e:f&&l(d,p)>=0?(null!=u&&(u.trackChildChange(s.Change.childRemovedChange(d.name,d.node)),u.trackChildChange(s.Change.childAddedChange(t,n))),c.updateImmediateChild(t,n).updateImmediateChild(d.name,i.ChildrenNode.EMPTY_NODE)):e},e}();t.LimitedFilter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=n(21),a=n(22),s=n(2),u=n(110),l=n(3),h=n(1),c=n(43),p=n(7),d=n(0),f=n(11),_=n(4),y=n(17);!function(e){e[e.RUN=0]="RUN",e[e.SENT=1]="SENT",e[e.COMPLETED=2]="COMPLETED",e[e.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",e[e.NEEDS_ABORT=4]="NEEDS_ABORT"}(r=t.TransactionStatus||(t.TransactionStatus={})),y.Repo.Ai=25,y.Repo.prototype.ie=function(){this.Di=new u.Tree},y.Repo.prototype.startTransaction=function(e,t,n,s){this.de("transaction on "+e);var u=function(){},y=new o.Reference(this,e);y.on("value",u);var v=function(){y.off("value",u)},g={path:e,update:t,onComplete:n,status:null,order:h.LUIDGenerator(),applyLocally:s,retryCount:0,unwatcher:v,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},m=this.Mi(e);g.currentInputSnapshot=m;var C=g.update(m.val());if(void 0===C){if(g.unwatcher(),g.currentOutputSnapshotRaw=null,g.currentOutputSnapshotResolved=null,g.onComplete){var E=new a.DataSnapshot(g.currentInputSnapshot,new o.Reference(this,g.path),l.PRIORITY_INDEX);g.onComplete(null,!1,E)}}else{p.validateFirebaseData("transaction failed: Data returned ",C,g.path),g.status=r.RUN;var N=this.Di.subTree(e),P=N.getValue()||[];P.push(g),N.setValue(P);var b=void 0;"object"==typeof C&&null!==C&&d.contains(C,".priority")?(b=d.safeGet(C,".priority"),i.assert(p.isValidPriority(b),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):b=(this.ue.calcCompleteEventCache(e)||_.ChildrenNode.EMPTY_NODE).getPriority().val(),b=b;var S=this.generateServerValues(),T=f.nodeFromJSON(C,b),w=c.resolveDeferredValueSnapshot(T,S);g.currentOutputSnapshotRaw=T,g.currentOutputSnapshotResolved=w,g.currentWriteId=this.pe();var I=this.ue.applyUserOverwrite(e,w,g.currentWriteId,g.applyLocally);this.K.raiseEventsForChangedPath(e,I),this.Li()}},y.Repo.prototype.Mi=function(e,t){return this.ue.calcCompleteEventCache(e,t)||_.ChildrenNode.EMPTY_NODE},y.Repo.prototype.Li=function(e){var t=this;if(void 0===e&&(e=this.Di),e||this.Fi(e),null!==e.getValue()){var n=this.xi(e);i.assert(n.length>0,"Sending zero length transaction queue"),n.every(function(e){return e.status===r.RUN})&&this.ki(e.path(),n)}else e.hasChildren()&&e.forEachChild(function(e){t.Li(e)})},y.Repo.prototype.ki=function(e,t){for(var n=this,u=t.map(function(e){return e.currentWriteId}),c=this.Mi(e,u),p=c,d=c.hash(),f=0;f=y.Repo.Ai)E=!0,N="maxretry",u=u.concat(this.ue.ackUserWrite(m.currentWriteId,!0));else{var P=this.Mi(m.path,v);m.currentInputSnapshot=P;var b=e[g].update(P.val());if(void 0!==b){p.validateFirebaseData("transaction failed: Data returned ",b,m.path);var S=f.nodeFromJSON(b),T="object"==typeof b&&null!=b&&d.contains(b,".priority");T||(S=S.updatePriority(P.getPriority()));var w=m.currentWriteId,I=this.generateServerValues(),R=c.resolveDeferredValueSnapshot(S,I);m.currentOutputSnapshotRaw=S,m.currentOutputSnapshotResolved=R,m.currentWriteId=this.pe(),v.splice(v.indexOf(w),1),u=u.concat(this.ue.applyUserOverwrite(m.path,R,m.currentWriteId,m.applyLocally)),u=u.concat(this.ue.ackUserWrite(w,!0))}else E=!0,N="nodata",u=u.concat(this.ue.ackUserWrite(m.currentWriteId,!0))}if(this.K.raiseEventsForChangedPath(t,u),u=[],E&&(e[g].status=r.COMPLETED,function(e){setTimeout(e,Math.floor(0))}(e[g].unwatcher),e[g].onComplete))if("nodata"===N){var O=new o.Reference(this,e[g].path),A=e[g].currentInputSnapshot,D=new a.DataSnapshot(A,O,l.PRIORITY_INDEX);n.push(e[g].onComplete.bind(null,null,!1,D))}else n.push(e[g].onComplete.bind(null,Error(N),!1,null))}this.Fi(this.Di);for(var g=0;g0?n:null)}e.forEachChild(function(e){t.Fi(e)})},y.Repo.prototype.fe=function(e){var t=this,n=this.Wi(e).path(),r=this.Di.subTree(e);return r.forEachAncestor(function(e){t.Qi(e)}),this.Qi(r),r.forEachDescendant(function(e){t.Qi(e)}),n},y.Repo.prototype.Qi=function(e){var t=e.getValue();if(null!==t){for(var n=[],o=[],a=-1,s=0;s0},e.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},e.prototype.forEachChild=function(t){var n=this;o.forEach(this._e.children,function(r,i){t(new e(r,n,i))})},e.prototype.forEachDescendant=function(e,t,n){t&&!n&&e(this),this.forEachChild(function(t){t.forEachDescendant(e,!0,n)}),t&&n&&e(this)},e.prototype.forEachAncestor=function(e,t){for(var n=t?this:this.parent();null!==n;){if(e(n))return!0;n=n.parent()}return!1},e.prototype.forEachImmediateDescendantWithValue=function(e){this.forEachChild(function(t){null!==t.getValue()?e(t):t.forEachImmediateDescendantWithValue(e)})},e.prototype.path=function(){return new i.Path(null===this.Ui?this.qi:this.Ui.path()+"/"+this.qi)},e.prototype.name=function(){return this.qi},e.prototype.parent=function(){return this.Ui},e.prototype.Bi=function(){null!==this.Ui&&this.Ui.Hi(this.qi,this)},e.prototype.Hi=function(e,t){var n=t.isEmpty(),r=o.contains(this._e.children,e);n&&r?(delete this._e.children[e],this._e.childCount--,this.Bi()):n||r||(this._e.children[e]=t._e,this._e.childCount++,this.Bi())},e}();t.Tree=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(54),i=n(53);t.forceLongPolling=function(){r.WebSocketConnection.forceDisallow(),i.BrowserPollConnection.forceAllow()},t.forceWebSockets=function(){i.BrowserPollConnection.forceDisallow()},t.isWebSocketsAvailable=function(){return r.WebSocketConnection.isAvailable()},t.setSecurityDebugCallback=function(e,t){e.repo.J.it=t},t.stats=function(e,t){e.repo.stats(t)},t.statsIncrementCounter=function(e,t){e.repo.statsIncrementCounter(t)},t.dataUpdateCount=function(e){return e.repo.dataUpdateCount},t.interceptServerData=function(e,t){return e.repo.he(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),i=n(50),o=n(26),a=n(52);t.DataConnection=i.PersistentConnection,i.PersistentConnection.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},i.PersistentConnection.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)},t.RealTimeConnection=a.Connection,t.hijackHash=function(e){var t=i.PersistentConnection.prototype.put;return i.PersistentConnection.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){i.PersistentConnection.prototype.put=t}},t.ConnectionTarget=r.RepoInfo,t.queryIdentifier=function(e){return e.queryIdentifier()},t.listens=function(e){return e.repo.J.Je},t.forceRestClient=function(e){o.RepoManager.getInstance().forceRestClient(e)}}],[78])}catch(e){throw Error("Cannot instantiate firebase-database.js - be sure to load firebase-app.js first.")} + +/*! + * @license Firebase v4.6.1 + * Build: rev-0ea11f2 + * Terms: https://firebase.google.com/terms/ + */ +try{webpackJsonpFirebase([3],{116:function(e,t,r){r(117)},117:function(e,t,r){"use strict";function n(e){var t=new Uint8Array(e);return window.btoa(String.fromCharCode.apply(null,t))}function o(e){var t=function(e){return self&&"ServiceWorkerGlobalScope"in self?new A(e):new k(e)},r={Messaging:k};e.INTERNAL.registerService("messaging",t,r)}Object.defineProperty(t,"__esModule",{value:!0});var i,s=r(0),a={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key"},c=(i={},i[a.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",i[a.AVAILABLE_IN_SW]="This method is available in a service worker context.",i["should-be-overriden"]="This method should be overriden by extended classes.",i["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i["permission-default"]="The required permissions were not granted and dismissed instead.",i["permission-blocked"]="The required permissions were not granted and blocked instead.",i["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",i["notifications-blocked"]="Notifications have been blocked.",i[a.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",i["sw-registration-expected"]="A service worker registration was the expected input.",i["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",i["invalid-saved-token"]="Unable to access details of the saved token.",i["sw-reg-redundant"]="The service worker being used for push was made redundant.",i["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$message}",i["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",i["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",i["use-sw-before-get-token"]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",i["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",i["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",i["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",i["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",i["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",i["failed-to-delete-token"]="Unable to delete the currently saved token.",i["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i["bad-scope"]="The service worker scope must be a string with at least one character.",i["bad-vapid-key"]="The public VAPID key must be a string with at least one character.",i["bad-subscription"]="The subscription must be a valid PushSubscription.",i["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",i["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",i["failed-delete-vapid-key"]="The VAPID key could not be deleted.",i),u={codes:a,map:c},_=function(e){return n(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},d=[4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110],f={userVisibleOnly:!0,applicationServerKey:new Uint8Array(d)},h={ENDPOINT:"https://fcm.googleapis.com",APPLICATION_SERVER_KEY:d,SUBSCRIPTION_OPTIONS:f},p="fcm_token_object_Store",l=function(){function e(){this.e=new s.ErrorFactory("messaging","Messaging",u.map),this.t=null}return e.prototype.r=function(){return this.t?this.t:(this.t=new Promise(function(t,r){var n=indexedDB.open(e.DB_NAME,1);n.onerror=function(e){r(e.target.error)},n.onsuccess=function(e){t(e.target.result)},n.onupgradeneeded=function(e){var t=e.target.result,r=t.createObjectStore(p,{keyPath:"swScope"});r.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.t)},e.prototype.closeDatabase=function(){var e=this;return this.t?this.t.then(function(t){t.close(),e.t=null}):Promise.resolve()},e.prototype.getTokenDetailsFromToken=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction([p]),i=o.objectStore(p),s=i.index("fcmToken"),a=s.get(e);a.onerror=function(e){n(e.target.error)},a.onsuccess=function(e){r(e.target.result)}})})},e.prototype.n=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction([p]),i=o.objectStore(p),s=i.get(e);s.onerror=function(e){n(e.target.error)},s.onsuccess=function(e){r(e.target.result)}})})},e.prototype.o=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction([p]),i=o.objectStore(p),s=[],a=i.openCursor();a.onerror=function(e){n(e.target.error)},a.onsuccess=function(t){var n=t.target.result;n?(n.value.fcmSenderId===e&&s.push(n.value),n.continue()):r(s)}})})},e.prototype.subscribeToFCM=function(e,t,r){var n=this,o=_(t.getKey("p256dh")),i=_(t.getKey("auth")),s="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+o+"&encryption_auth="+i;r&&(s+="&pushSet="+r);var a=new Headers;a.append("Content-Type","application/x-www-form-urlencoded");var c={method:"POST",headers:a,body:s};return fetch(h.ENDPOINT+"/fcm/connect/subscribe",c).then(function(e){return e.json()}).then(function(e){var t=e;if(t.error){var r=t.error.message;throw n.e.create(u.codes.TOKEN_SUBSCRIBE_FAILED,{message:r})}if(!t.token)throw n.e.create(u.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw n.e.create(u.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},e.prototype.i=function(e,t){return e.endpoint===t.endpoint&&_(e.getKey("auth"))===t.auth&&_(e.getKey("p256dh"))===t.p256dh},e.prototype.s=function(e,t,r,n,o){var i={swScope:t.scope,endpoint:r.endpoint,auth:_(r.getKey("auth")),p256dh:_(r.getKey("p256dh")),fcmToken:n,fcmPushSet:o,fcmSenderId:e};return this.r().then(function(e){return new Promise(function(t,r){var n=e.transaction([p],"readwrite"),o=n.objectStore(p),s=o.put(i);s.onerror=function(e){r(e.target.error)},s.onsuccess=function(e){t()}})})},e.prototype.getSavedToken=function(e,t){var r=this;return t instanceof ServiceWorkerRegistration?"string"!=typeof e||0===e.length?Promise.reject(this.e.create(u.codes.BAD_SENDER_ID)):this.o(e).then(function(r){if(0!==r.length){var n=r.findIndex(function(r){return t.scope===r.swScope&&e===r.fcmSenderId});if(-1!==n)return r[n]}}).then(function(e){if(e)return t.pushManager.getSubscription().catch(function(e){throw r.e.create(u.codes.GET_SUBSCRIPTION_FAILED)}).then(function(t){if(t&&r.i(t,e))return e.fcmToken})}):Promise.reject(this.e.create(u.codes.SW_REGISTRATION_EXPECTED))},e.prototype.createToken=function(e,t){var r=this;if("string"!=typeof e||0===e.length)return Promise.reject(this.e.create(u.codes.BAD_SENDER_ID));if(!(t instanceof ServiceWorkerRegistration))return Promise.reject(this.e.create(u.codes.SW_REGISTRATION_EXPECTED));var n,o;return t.pushManager.getSubscription().then(function(e){return e||t.pushManager.subscribe(h.SUBSCRIPTION_OPTIONS)}).then(function(t){return n=t,r.subscribeToFCM(e,n)}).then(function(i){return o=i,r.s(e,t,n,o.token,o.pushSet)}).then(function(){return o.token})},e.prototype.deleteToken=function(e){var t=this;return"string"!=typeof e||0===e.length?Promise.reject(this.e.create(u.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(e).then(function(e){if(!e)throw t.e.create(u.codes.DELETE_TOKEN_NOT_FOUND);return t.r().then(function(r){return new Promise(function(n,o){var i=r.transaction([p],"readwrite"),s=i.objectStore(p),a=s.delete(e.swScope);a.onerror=function(e){o(e.target.error)},a.onsuccess=function(r){if(0===r.target.result)return void o(t.e.create(u.codes.FAILED_TO_DELETE_TOKEN));n(e)}})})})},e}(),g=l,E="messagingSenderId",T=function(){function e(e){var t=this;if(this.e=new s.ErrorFactory("messaging","Messaging",u.map),!e.options[E]||"string"!=typeof e.options[E])throw this.e.create(u.codes.BAD_SENDER_ID);this.a=e.options[E],this.c=new g,this.app=e,this.INTERNAL={},this.INTERNAL.delete=function(){return t.delete}}return e.prototype.getToken=function(){var e=this,t=this.u();return"granted"!==t?"denied"===t?Promise.reject(this.e.create(u.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null):this._().then(function(t){return e.c.getSavedToken(e.a,t).then(function(r){return r||e.c.createToken(e.a,t)})})},e.prototype.deleteToken=function(e){var t=this;return this.c.deleteToken(e).then(function(){return t._().then(function(e){if(e)return e.pushManager.getSubscription()}).then(function(e){if(e)return e.unsubscribe()})})},e.prototype._=function(){throw this.e.create(u.codes.SHOULD_BE_INHERITED)},e.prototype.requestPermission=function(){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,r){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,r){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw this.e.create(u.codes.AVAILABLE_IN_SW)},e.prototype.delete=function(){return this.c.closeDatabase()},e.prototype.u=function(){return Notification.permission},e.prototype.getTokenManager=function(){return this.c},e}(),S=T,b={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},v={PUSH_MSG_RECEIVED:"push-msg-received",NOTIFICATION_CLICKED:"notification-clicked"},I=function(e,t){return r={},r[b.TYPE_OF_MSG]=e,r[b.DATA]=t,r;var r},m={PARAMS:b,TYPES_OF_MSG:v,createNewMsg:I},y={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"},N=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),w=function(e){function t(t){var r=e.call(this,t)||this;return r.d,r.f,r.h=null,r.p=Object(s.createSubscribe)(function(e){r.h=e}),r.l=null,r.g=Object(s.createSubscribe)(function(e){r.l=e}),r.T(),r}return N(t,e),t.prototype.getToken=function(){var t=this;return this.S()?this.b().then(function(){return e.prototype.getToken.call(t)}):Promise.reject(this.e.create(u.codes.UNSUPPORTED_BROWSER))},t.prototype.b=function(){var e=this;if(this.f)return this.f;var t=document.querySelector('link[rel="manifest"]');return this.f=t?fetch(t.href).then(function(e){return e.json()}).catch(function(){return Promise.resolve()}).then(function(t){if(t&&t.gcm_sender_id&&"103953800507"!==t.gcm_sender_id)throw e.e.create(u.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.f},t.prototype.requestPermission=function(){var e=this;return"granted"===Notification.permission?Promise.resolve():new Promise(function(t,r){var n=function(n){return"granted"===n?t():r("denied"===n?e.e.create(u.codes.PERMISSION_BLOCKED):e.e.create(u.codes.PERMISSION_DEFAULT))},o=Notification.requestPermission(function(e){o||n(e)});o&&o.then(n)})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw this.e.create(u.codes.SW_REGISTRATION_EXPECTED);if(void 0!==this.d)throw this.e.create(u.codes.USE_SW_BEFORE_GET_TOKEN);this.d=e},t.prototype.onMessage=function(e,t,r){return this.p(e,t,r)},t.prototype.onTokenRefresh=function(e,t,r){return this.g(e,t,r)},t.prototype.v=function(e){var t=this,r=e.installing||e.waiting||e.active;return new Promise(function(n,o){if(!r)return void o(t.e.create(u.codes.NO_SW_IN_REG));if("activated"===r.state)return void n(e);if("redundant"===r.state)return void o(t.e.create(u.codes.SW_REG_REDUNDANT));var i=function(){if("activated"===r.state)n(e);else{if("redundant"!==r.state)return;o(t.e.create(u.codes.SW_REG_REDUNDANT))}r.removeEventListener("statechange",i)};r.addEventListener("statechange",i)})},t.prototype._=function(){var e=this;return this.d?this.v(this.d):(this.d=null,navigator.serviceWorker.register(y.path,{scope:y.scope}).catch(function(t){throw e.e.create(u.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(t){return e.v(t).then(function(){return e.d=t,t.update(),t})}))},t.prototype.T=function(){var e=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[m.PARAMS.TYPE_OF_MSG]){var r=t.data;switch(r[m.PARAMS.TYPE_OF_MSG]){case m.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case m.TYPES_OF_MSG.NOTIFICATION_CLICKED:var n=r[m.PARAMS.DATA];e.h.next(n)}}},!1)},t.prototype.S=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},t}(S),k=w,O=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),D=function(e){function t(t){var r=e.call(this,t)||this;return self.addEventListener("push",function(e){return r.I(e)},!1),self.addEventListener("pushsubscriptionchange",function(e){return r.m(e)},!1),self.addEventListener("notificationclick",function(e){return r.y(e)},!1),r.N=null,r}return O(t,e),t.prototype.I=function(e){var t,r=this;try{t=e.data.json()}catch(e){return}var n=this.w().then(function(e){if(e){if(t.notification||r.N)return r.k(t)}else{var n=r.O(t);if(n){var o=n.title||"";return self.registration.showNotification(o,n)}if(r.N)return r.N(t)}});e.waitUntil(n)},t.prototype.m=function(e){var t=this,r=this.getToken().then(function(e){if(!e)throw t.e.create(u.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var r=null,n=t.getTokenManager();return n.getTokenDetailsFromToken(e).then(function(e){if(!(r=e))throw t.e.create(u.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(h.SUBSCRIPTION_OPTIONS)}).then(function(e){return n.subscribeToFCM(r.fcmSenderId,e,r.fcmPushSet)}).catch(function(e){return n.deleteToken(r.fcmToken).then(function(){throw t.e.create(u.codes.UNABLE_TO_RESUBSCRIBE,{message:e})})})});e.waitUntil(r)},t.prototype.y=function(e){var t=this;if(e.notification&&e.notification.data&&e.notification.data.FCM_MSG){e.stopImmediatePropagation(),e.notification.close();var r=e.notification.data.FCM_MSG,n=r.notification.click_action;if(n){var o=this.D(n).then(function(e){return e||self.clients.openWindow(n)}).then(function(e){if(e){r.notification,delete r.notification;var n=m.createNewMsg(m.TYPES_OF_MSG.NOTIFICATION_CLICKED,r);return t.A(e,n)}});e.waitUntil(o)}}},t.prototype.O=function(e){if(e&&"object"==typeof e.notification){var t=Object.assign({},e.notification);return t.data=(r={},r.FCM_MSG=e,r),t;var r}},t.prototype.setBackgroundMessageHandler=function(e){if(e&&"function"!=typeof e)throw this.e.create(u.codes.BG_HANDLER_FUNCTION_EXPECTED);this.N=e},t.prototype.D=function(e){var t=new URL(e).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(e){for(var r=null,n=0;n>6,128|63&r);else if(55296==(64512&r)){var o=n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189)}else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function T(t){var e;try{e=decodeURIComponent(t)}catch(t){throw y(ne.DATA_URL,"Malformed data URL.")}return U(e)}function A(t,e){switch(t){case ne.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r){var o=n?"-":"_";throw y(t,"Invalid character '"+o+"' found: is it base64url encoded?")}break;case ne.BASE64URL:var i=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(i||a){var o=i?"+":"/";throw y(t,"Invalid character '"+o+"' found: is it base64 encoded?")}e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(e){throw y(t,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c=e.length)&&t.substring(t.length-e.length)===e}function S(t){switch(t){case ae.RUNNING:case ae.PAUSING:case ae.CANCELING:return se.RUNNING;case ae.PAUSED:return se.PAUSED;case ae.SUCCESS:return se.SUCCESS;case ae.CANCELED:return se.CANCELED;case ae.ERROR:default:return se.ERROR}}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function I(t,e){for(var n in t)k(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return I(t,function(t,n){e[t]=n}),e}function P(t){return new Promise(t)}function x(t){return Promise.resolve(t)}function D(t){return Promise.reject(t)}function M(t){return null!=t}function W(t){return void 0!==t}function B(t){return"function"==typeof t}function G(t){return"object"==typeof t}function j(t){return G(t)&&null!==t}function q(t){return G(t)&&!Array.isArray(t)}function F(t){return"string"==typeof t||t instanceof String}function H(t){return"number"==typeof t||t instanceof Number}function z(t){return X()&&t instanceof Blob}function X(){return"undefined"!=typeof Blob}function V(t){var e;try{e=JSON.parse(t)}catch(t){return null}return q(e)?e:null}function K(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}function Z(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}function J(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function Q(t){return Vt+Zt+t}function Y(t){return Kt+Zt+t}function $(t){return Vt+Jt+t}function tt(t){var e=encodeURIComponent,n="?";return I(t,function(t,r){var o=e(t)+"="+e(r);n=n+o+"&"}),n=n.slice(0,-1)}function et(t,e){return e}function nt(t){return!F(t)||t.length<2?t:(t=t,J(t))}function rt(){function t(t,e){return nt(e)}function e(t,e){return M(e)?+e:e}function n(t,e){if(!(F(e)&&e.length>0))return[];var n=encodeURIComponent;return e.split(",").map(function(e){var r=t.bucket,o=t.fullPath;return Y("/b/"+n(r)+"/o/"+n(o))+tt({alt:"media",token:e})})}if(pe)return pe;var r=[];r.push(new he("bucket")),r.push(new he("generation")),r.push(new he("metageneration")),r.push(new he("name","fullPath",!0));var o=new he("name");o.xform=t,r.push(o);var i=new he("size");return i.xform=e,r.push(i),r.push(new he("timeCreated")),r.push(new he("updated")),r.push(new he("md5Hash",null,!0)),r.push(new he("cacheControl",null,!0)),r.push(new he("contentDisposition",null,!0)),r.push(new he("contentEncoding",null,!0)),r.push(new he("contentLanguage",null,!0)),r.push(new he("contentType",null,!0)),r.push(new he("metadata","customMetadata",!0)),r.push(new he("downloadTokens","downloadURLs",!1,n)),pe=r}function ot(t,e){function n(){var n=t.bucket,r=t.fullPath,o=new le(n,r);return e.makeStorageReference(o)}Object.defineProperty(t,"ref",{get:n})}function it(t,e,n){var r={};r.type="file";for(var o=n.length,i=0;i=0))throw"Expected a number 0 or greater."}return new fe(t)}function _t(t,e){function n(e){if(!(null===e||M(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)}return new fe(n,e)}function vt(t){function e(t){if(null!==t&&!B(t))throw"Expected a Function."}return new fe(e,t)}function bt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function mt(){for(var t=[],e=0;e0&&(h=Math.min(h,o));var p=c.current,_=p+h,v=h===l?"upload, finalize":"upload",b={"X-Goog-Upload-Command":v,"X-Goog-Upload-Offset":c.current},m=r.slice(p,_);if(null===m)throw f();var g=e.maxUploadRetryTime(),y=new _e(n,"POST",u,g);return y.headers=b,y.body=m.uploadData(),y.progressCallback=s||null,y.errorHandler=Tt(t),y}function Mt(t){return function(){for(var e=[],n=0;n0&&(t.Authorization="Firebase "+e)}function jt(t){var e=void 0!==Xt.default?Xt.default.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,i=L(t.headers);return Gt(i,e),jt(i),new Ue(o,t.method,i,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}function Ft(t,e,n){return new Ae(t,new ce,n)}function Ht(t){var e={TaskState:se,TaskEvent:ie,StringFormat:ne,Storage:Ae,Reference:ye};t.INTERNAL.registerService(Oe,Ft,e,void 0,!0)}Object.defineProperty(e,"__esModule",{value:!0});var zt,Xt=n(6),Vt="https://firebasestorage.googleapis.com",Kt="https://firebasestorage.googleapis.com",Zt="/v0",Jt="/v0",Qt=12e4,Yt=6e4,$t=-9007199254740991,te=function(){function t(t,e){this.t=r(t),this.e="Firebase Storage: "+e,this.n=null,this.r="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return r(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.n},t.prototype.setServerResponseProp=function(t){this.n=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.n},enumerable:!0,configurable:!0}),t}(),ee={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},ne={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},re=function(){function t(t,e){this.data=t,this.contentType=e||null}return t}(),oe=function(){function t(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw y(ne.DATA_URL,"Must be formatted 'data:[][;base64],");var n=e[1]||null;null!=n&&(this.base64=C(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=t.substring(t.indexOf(",")+1)}return t}(),ie={STATE_CHANGED:"state_changed"},ae={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},se={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(zt=zt||(zt={}));var ue=function(){function t(){var t=this;this.o=!1,this.i=new XMLHttpRequest,this.a=zt.NO_ERROR,this.s=P(function(e,n){t.i.addEventListener("abort",function(n){t.a=zt.ABORT,e(t)}),t.i.addEventListener("error",function(n){t.a=zt.NETWORK_ERROR,e(t)}),t.i.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var o=this;if(this.o)throw R("cannot .send() more than once");return this.o=!0,this.i.open(e,t,!0),M(r)&&I(r,function(t,e){o.i.setRequestHeader(t,""+e)}),M(n)?this.i.send(n):this.i.send(),this.s},t.prototype.getErrorCode=function(){if(!this.o)throw R("cannot .getErrorCode() before sending");return this.a},t.prototype.getStatus=function(){if(!this.o)throw R("cannot .getStatus() before sending");try{return this.i.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.o)throw R("cannot .getResponseText() before sending");return this.i.responseText},t.prototype.abort=function(){this.i.abort()},t.prototype.getResponseHeader=function(t){return this.i.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){M(this.i.upload)&&this.i.upload.removeEventListener("progress",t)},t}(),ce=function(){function t(){}return t.prototype.createXhrIo=function(){return new ue},t}(),le=function(){function t(t,e){this.bucket=t,this.u=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.u},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw p(e)},t.makeFromUrl=function(e){function n(t){"/"===t.path.charAt(t.path.length-1)&&(t.u=t.u.slice(0,-1))}function r(t){t.u=decodeURIComponent(t.path)}for(var o=null,i=RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a={bucket:1,path:3},s=RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),u={bucket:1,path:3},c=[{regex:i,indices:a,postModify:n},{regex:s,indices:u,postModify:r}],l=0;l262144},t.prototype.M=function(){this.k===ae.RUNNING&&null===this.m&&(this.C?null===this.b?this.G():this.f?this.j():this.d?this.q():this.F():this.H())},t.prototype.z=function(t){var e=this;this.U.getAuthToken().then(function(n){switch(e.k){case ae.RUNNING:t(n);break;case ae.CANCELING:e.P(ae.CANCELED);break;case ae.PAUSING:e.P(ae.PAUSED)}})},t.prototype.G=function(){var t=this;this.z(function(e){var n=Pt(t.U,t.T,t.O,t.A,t.N),r=t.U.makeRequest(n,e);t.m=r,r.getPromise().then(function(e){t.m=null,t.b=e,t.f=!1,t.L()},t.I)})},t.prototype.j=function(){var t=this,e=this.b;this.z(function(n){var r=xt(t.U,t.T,e,t.A),o=t.U.makeRequest(r,n);t.m=o,o.getPromise().then(function(e){e=e,t.m=null,t.B(e.current),t.f=!1,e.finalized&&(t.d=!0),t.L()},t.I)})},t.prototype.F=function(){var t=this,e=262144*this.g,n=new ve(this.p,this.A.size()),r=this.b;this.z(function(o){var i;try{i=Dt(t.T,t.U,r,t.A,e,t.O,n,t.W())}catch(e){return t.v=e,void t.P(ae.ERROR)}var a=t.U.makeRequest(i,o);t.m=a,a.getPromise().then(function(e){t.X(),t.m=null,t.B(e.current),e.finalized?(t.N=e.metadata,t.P(ae.SUCCESS)):t.L()},t.I)})},t.prototype.X=function(){262144*this.g<33554432&&(this.g*=2)},t.prototype.q=function(){var t=this;this.z(function(e){var n=Nt(t.U,t.T,t.O),r=t.U.makeRequest(n,e);t.m=r,r.getPromise().then(function(e){t.m=null,t.N=e,t.P(ae.SUCCESS)},t.x)})},t.prototype.H=function(){var t=this;this.z(function(e){var n=It(t.U,t.T,t.O,t.A,t.N),r=t.U.makeRequest(n,e);t.m=r,r.getPromise().then(function(e){t.m=null,t.N=e,t.B(t.A.size()),t.P(ae.SUCCESS)},t.I)})},t.prototype.B=function(t){var e=this.p;this.p=t,this.p!==e&&this.V()},t.prototype.P=function(t){if(this.k!==t)switch(t){case ae.CANCELING:case ae.PAUSING:this.k=t,null!==this.m&&this.m.cancel();break;case ae.RUNNING:var e=this.k===ae.PAUSED;this.k=t,e&&(this.V(),this.M());break;case ae.PAUSED:this.k=t,this.V();break;case ae.CANCELED:this.v=l(),this.k=t,this.V();break;case ae.ERROR:case ae.SUCCESS:this.k=t,this.V()}},t.prototype.L=function(){switch(this.k){case ae.PAUSING:this.P(ae.PAUSED);break;case ae.CANCELING:this.P(ae.CANCELED);break;case ae.RUNNING:this.M()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=S(this.k);return new me(this.p,this.A.size(),t,this.N,this,this.w)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){function o(e){if(t!==ie.STATE_CHANGED)throw"Expected one of the event types: ["+ie.STATE_CHANGED+"]."}function i(t){try{return void c(t)}catch(t){}try{if(l(t),!(W(t.next)||W(t.error)||W(t.complete)))throw"";return}catch(t){throw u}}function a(t){function e(e,n,o){null!==t&&ct("on",t,arguments);var i=new be(e,n,r);return h.K(i),function(){h.Z(i)}}return e}function s(t){if(null===t)throw u;i(t)}void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var u="Expected a function or an Object with one of `next`, `error`, `complete` properties.",c=vt(!0).validator,l=_t(null,!0).validator;ct("on",[ht(o),_t(i,!0),vt(!0),vt(!0)],arguments);var h=this,p=[_t(s),vt(!0),vt(!0)];return W(e)||W(n)||W(r)?a(null)(e,n,r):a(p)},t.prototype.then=function(t,e){return this.D.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.K=function(t){this._.push(t),this.J(t)},t.prototype.Z=function(t){Et(this._,t)},t.prototype.V=function(){var t=this;this.Q(),Rt(this._).forEach(function(e){t.J(e)})},t.prototype.Q=function(){if(null!==this.y){var t=!0;switch(S(this.k)){case se.SUCCESS:Mt(this.y.bind(null,this.snapshot))();break;case se.CANCELED:case se.ERROR:Mt(this.R.bind(null,this.v))();break;default:t=!1}t&&(this.y=null,this.R=null)}},t.prototype.J=function(t){switch(S(this.k)){case se.RUNNING:case se.PAUSED:null!==t.next&&Mt(t.next.bind(t,this.snapshot))();break;case se.SUCCESS:null!==t.complete&&Mt(t.complete.bind(t))();break;case se.CANCELED:case se.ERROR:null!==t.error&&Mt(t.error.bind(t,this.v))();break;default:null!==t.error&&Mt(t.error.bind(t,this.v))()}},t.prototype.resume=function(){ct("resume",[],arguments);var t=this.k===ae.PAUSED||this.k===ae.PAUSING;return t&&this.P(ae.RUNNING),t},t.prototype.pause=function(){ct("pause",[],arguments);var t=this.k===ae.RUNNING;return t&&this.P(ae.PAUSING),t},t.prototype.cancel=function(){ct("cancel",[],arguments);var t=this.k===ae.RUNNING||this.k===ae.PAUSING;return t&&this.P(ae.CANCELING),t},t}(),ye=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof le?e:le.makeFromUrl(e)}return t.prototype.toString=function(){return ct("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return rt()},t.prototype.child=function(t){ct("child",[ht()],arguments);var e=Z(this.location.path,t),n=new le(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=K(this.location.path);if(null===t)return null;var e=new le(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new le(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),ct("put",[pt(),ft(!0)],arguments),this.Y("put"),new ge(this,this.authWrapper,this.location,this.mappings(),new de(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=ne.RAW),ct("putString",[ht(),ht(E,!0),ft(!0)],arguments),this.Y("putString");var r=w(e,t),o=L(n);return!M(o.contentType)&&M(r.contentType)&&(o.contentType=r.contentType),new ge(this,this.authWrapper,this.location,this.mappings(),new de(r.data,!0),o)},t.prototype.delete=function(){ct("delete",[],arguments),this.Y("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Ct(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){ct("getMetadata",[],arguments),this.Y("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Nt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){ct("updateMetadata",[ft()],arguments),this.Y("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=Ot(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return ct("getDownloadURL",[],arguments),this.Y("getDownloadURL"),this.getMetadata().then(function(t){var e=t.downloadURLs[0];if(M(e))return e;throw _()})},t.prototype.Y=function(t){if(""===this.location.path)throw g(t)},t}(),Re=function(){function t(t){this.D=D(t)}return t.prototype.getPromise=function(){return this.D},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ee=function(){function t(){this.$={},this.tt=$t}return t.prototype.addRequest=function(t){function e(){delete r.$[n]}var n=this.tt;this.tt++,this.$[n]=t;var r=this;t.getPromise().then(e,e)},t.prototype.clear=function(){I(this.$,function(t,e){e&&e.cancel(!0)}),this.$={}},t}(),we=function(){function t(e,n,r,o,i){if(this.et=null,this.nt=!1,this.rt=e,null!==this.rt){var a=this.rt.options;M(a)&&(this.et=t.ot(a))}this.it=n,this.at=r,this.st=i,this.ut=o,this.ct=Qt,this.lt=Yt,this.ht=new Ee}return t.ot=function(t){var e=t.storageBucket||null;return null==e?null:le.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.rt&&M(this.rt.INTERNAL)&&M(this.rt.INTERNAL.getToken)?this.rt.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):x(null)},t.prototype.bucket=function(){if(this.nt)throw m();return this.et},t.prototype.service=function(){return this.ut},t.prototype.makeStorageReference=function(t){return this.it(this,t)},t.prototype.makeRequest=function(t,e){if(this.nt)return new Re(m());var n=this.at(t,e,this.st);return this.ht.addRequest(n),n},t.prototype.deleteApp=function(){this.nt=!0,this.rt=null,this.ht.clear()},t.prototype.maxUploadRetryTime=function(){return this.lt},t.prototype.setMaxUploadRetryTime=function(t){this.lt=t},t.prototype.maxOperationRetryTime=function(){return this.ct},t.prototype.setMaxOperationRetryTime=function(t){this.ct=t},t}(),Ue=function(){function t(t,e,n,r,o,i,a,s,u,c,l){this.pt=null,this.ft=null,this.y=null,this.R=null,this.dt=!1,this._t=!1,this.vt=t,this.bt=e,this.mt=n,this.gt=r,this.yt=o.slice(),this.Rt=i.slice(),this.Et=a,this.wt=s,this.Ut=c,this.Tt=u,this.st=l;var h=this;this.D=P(function(t,e){h.y=t,h.R=e,h.M()})}return t.prototype.M=function(){function t(t,e){function r(t){var e=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.Ut&&n.Ut(e,r)}if(e)return void t(!1,new Te(!1,null,!0));var o=n.st.createXhrIo();n.pt=o,null!==n.Ut&&o.addUploadProgressListener(r),o.send(n.vt,n.bt,n.gt,n.mt).then(function(e){null!==n.Ut&&e.removeUploadProgressListener(r),n.pt=null,e=e;var o=e.getErrorCode()===zt.NO_ERROR,i=e.getStatus();if(!o||n.At(i)){var a=e.getErrorCode()===zt.ABORT;return void t(!1,new Te(!1,null,a))}var s=yt(n.yt,i);t(!0,new Te(s,e))})}function e(t,e){var r=n.y,i=n.R,a=e.xhr;if(e.wasSuccessCode)try{var s=n.Et(a,a.getResponseText());W(s)?r(s):r()}catch(t){i(t)}else if(null!==a){var u=o();u.setServerResponseProp(a.getResponseText()),i(n.wt?n.wt(a,u):u)}else if(e.canceled){var u=n._t?m():l();i(u)}else{var u=c();i(u)}}var n=this;this.dt?e(!1,new Te(!1,null,!0)):this.ft=Wt(t,e,this.Tt)},t.prototype.getPromise=function(){return this.D},t.prototype.cancel=function(t){this.dt=!0,this._t=t||!1,null!==this.ft&&Bt(this.ft),null!==this.pt&&this.pt.abort()},t.prototype.At=function(t){var e=t>=500&&t<600,n=[408,429],r=yt(n,t),o=yt(this.Rt,t);return e||r||o},t}(),Te=function(){function t(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}return t}(),Ae=function(){function t(t,e,n){function r(t,e){return new ye(t,e)}if(this.et=null,this.U=new we(t,r,qt,this,e),this.rt=t,null!=n)this.et=le.makeFromBucketSpec(n);else{var o=this.U.bucket();null!=o&&(this.et=new le(o,""))}this.Nt=new Ne(this)}return t.prototype.ref=function(t){function e(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."}if(ct("ref",[ht(e,!0)],arguments),null==this.et)throw Error("No Storage Bucket defined in Firebase Options.");var n=new ye(this.U,this.et);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{le.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}}return ct("refFromURL",[ht(e,!1)],arguments),new ye(this.U,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.U.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){ct("setMaxUploadRetryTime",[dt()],arguments),this.U.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.U.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){ct("setMaxOperationRetryTime",[dt()],arguments),this.U.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.rt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.Nt},enumerable:!0,configurable:!0}),t}(),Ne=function(){function t(t){this.ut=t}return t.prototype.delete=function(){return this.ut.U.deleteApp(),x(void 0)},t}();e.registerStorage=Ht;var Oe="storage";Ht(Xt.default)}},[118])}catch(t){throw Error("Cannot instantiate firebase-storage.js - be sure to load firebase-app.js first.")} //# sourceMappingURL=firebase.js.map diff --git a/lib/firebase/firebase.js.map b/lib/firebase/firebase.js.map index acc1fe0d..5ad70ab1 100644 --- a/lib/firebase/firebase.js.map +++ b/lib/firebase/firebase.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///firebase-app.js","webpack:/webpack/bootstrap fef9b2274b3ac5efdbf8","webpack:///src/utils/promise.ts","webpack:///src/app/firebase_app.ts","webpack:///src/app.ts","webpack:///src/app/errors.ts","webpack:///src/app/subscribe.ts","webpack:///src/utils/globalScope.ts","webpack:///(webpack)/buildin/global.js","webpack:///node_modules/process/browser.js","webpack:///src/utils/deep_copy.ts","webpack:///src/utils/shims.ts","webpack:///node_modules/promise-polyfill/promise.js","webpack:///node_modules/timers-browserify/main.js","webpack:///node_modules/setimmediate/setImmediate.js","firebase-auth.js","webpack:///firebase-database.js","webpack:///src/utils/assert.ts","webpack:///src/utils/crypt.ts","webpack:///src/utils/hash.ts","webpack:///src/utils/Sha1.ts","webpack:///src/database/core/util/util.ts","webpack:///src/utils/obj.ts","webpack:///src/utils/json.ts","webpack:///src/utils/environment.ts","webpack:///src/utils/constants.ts","webpack:///src/database/core/storage/DOMStorageWrapper.ts","webpack:///src/database/core/storage/MemoryStorage.ts","webpack:///src/database/core/storage/storage.ts","webpack:///src/database/realtime/Constants.ts","webpack:///src/utils/utf8.ts","webpack:///src/database/core/stats/StatsCollection.ts","webpack:///src/database/core/stats/StatsManager.ts","webpack:///src/database/realtime/WebSocketConnection.ts","webpack:///src/database/core/util/libs/parser.ts","webpack:///src/utils/validation.ts","webpack:///src/database/core/snap/comparators.ts","webpack:///src/database/core/snap/nodeFromJSON.ts","webpack:///src/database/core/snap/indexes/KeyIndex.ts","webpack:///src/database/core/snap/snap.ts","webpack:///src/database/core/snap/LeafNode.ts","webpack:///src/database/core/snap/indexes/PriorityIndex.ts","webpack:///src/database/core/snap/IndexMap.ts","webpack:///src/database/core/snap/ChildrenNode.ts","webpack:///src/database/core/util/Path.ts","webpack:///src/database/core/RepoInfo.ts","webpack:///src/database/core/util/validation.ts","webpack:///src/database/api/onDisconnect.ts","webpack:///src/database/api/TransactionResult.ts","webpack:///src/database/core/util/NextPushId.ts","webpack:///src/database/core/snap/Node.ts","webpack:///src/database/core/snap/indexes/Index.ts","webpack:///src/database/core/util/SortedMap.ts","webpack:///src/database/core/snap/childSet.ts","webpack:///src/database/core/snap/indexes/ValueIndex.ts","webpack:///src/database/api/Query.ts","webpack:///src/database/core/operation/Operation.ts","webpack:///src/database/core/snap/indexes/PathIndex.ts","webpack:///src/database/api/DataSnapshot.ts","webpack:///src/database/core/view/Event.ts","webpack:///src/database/core/view/EventRegistration.ts","webpack:///src/database/core/util/CountedSet.ts","webpack:///src/database/core/SparseSnapshotTree.ts","webpack:///src/database/core/util/ServerValues.ts","webpack:///src/database/core/util/ImmutableTree.ts","webpack:///src/database/core/SyncPoint.ts","webpack:///src/database/core/operation/AckUserWrite.ts","webpack:///src/database/core/operation/ListenComplete.ts","webpack:///src/database/core/operation/Overwrite.ts","webpack:///src/database/core/operation/Merge.ts","webpack:///src/database/core/view/CacheNode.ts","webpack:///src/database/core/view/ViewCache.ts","webpack:///src/database/core/view/Change.ts","webpack:///src/database/core/view/filter/IndexedFilter.ts","webpack:///src/database/core/view/ChildChangeAccumulator.ts","webpack:///src/database/core/view/CompleteChildSource.ts","webpack:///src/database/core/view/ViewProcessor.ts","webpack:///src/database/core/view/EventGenerator.ts","webpack:///src/database/core/view/View.ts","webpack:///src/database/core/CompoundWrite.ts","webpack:///src/database/core/WriteTree.ts","webpack:///src/database/core/SyncTree.ts","webpack:///src/database/core/SnapshotHolder.ts","webpack:///src/database/core/AuthTokenProvider.ts","webpack:///src/database/core/stats/StatsListener.ts","webpack:///src/database/core/stats/StatsReporter.ts","webpack:///src/database/core/view/EventQueue.ts","webpack:///src/database/core/util/EventEmitter.ts","webpack:///src/database/core/util/VisibilityMonitor.ts","webpack:///src/database/core/util/OnlineMonitor.ts","webpack:///src/utils/jwt.ts","webpack:///src/database/realtime/polling/PacketReceiver.ts","webpack:///src/database/realtime/BrowserPollConnection.ts","webpack:///src/database/realtime/TransportManager.ts","webpack:///src/database/realtime/Connection.ts","webpack:///src/database/core/ServerActions.ts","webpack:///src/database/core/PersistentConnection.ts","webpack:///src/utils/util.ts","webpack:///src/database/core/ReadonlyRestClient.ts","webpack:///src/database/core/Repo.ts","webpack:///src/database/core/view/filter/RangedFilter.ts","webpack:///src/database/core/view/filter/LimitedFilter.ts","webpack:///src/database/core/view/QueryParams.ts","webpack:///src/database/api/Reference.ts","webpack:///src/database/core/Repo_transaction.ts","webpack:///src/database/core/util/Tree.ts","webpack:///src/database/core/RepoManager.ts","webpack:///src/database/api/Database.ts","webpack:///src/database/api/internal.ts","webpack:///src/database/api/test_access.ts","webpack:///src/database.ts","webpack:///(webpack)/buildin/harmony-module.js","webpack:///firebase-messaging.js","webpack:///src/messaging/helpers/array-buffer-to-base64.ts","webpack:///src/messaging.ts","webpack:///src/messaging/models/errors.ts","webpack:///src/messaging/models/fcm-details.ts","webpack:///src/messaging/models/token-manager.ts","webpack:///src/messaging/controllers/controller-interface.ts","webpack:///src/messaging/models/worker-page-message.ts","webpack:///src/messaging/models/default-sw.ts","webpack:///src/messaging/controllers/window-controller.ts","webpack:///src/messaging/controllers/sw-controller.ts","webpack:///firebase-storage.js","webpack:///src/storage/implementation/error.ts","webpack:///src/storage/implementation/string.ts","webpack:///src/storage/implementation/taskenums.ts","webpack:///src/storage/implementation/object.ts","webpack:///src/storage/implementation/promise_external.ts","webpack:///src/storage/implementation/type.ts","webpack:///src/storage/implementation/json.ts","webpack:///src/storage/implementation/path.ts","webpack:///src/storage/implementation/url.ts","webpack:///src/storage/implementation/metadata.ts","webpack:///src/storage/implementation/args.ts","webpack:///src/storage/implementation/fs.ts","webpack:///src/storage/implementation/array.ts","webpack:///src/storage/implementation/requests.ts","webpack:///src/storage/implementation/async.ts","webpack:///src/storage/implementation/backoff.ts","webpack:///src/storage/implementation/request.ts","webpack:///src/storage.ts","webpack:///src/storage/implementation/constants.ts","webpack:///src/storage/implementation/xhrio.ts","webpack:///src/storage/implementation/xhrio_network.ts","webpack:///src/storage/implementation/xhriopool.ts","webpack:///src/storage/implementation/location.ts","webpack:///src/storage/implementation/blob.ts","webpack:///src/storage/implementation/requestinfo.ts","webpack:///src/storage/implementation/observer.ts","webpack:///src/storage/tasksnapshot.ts","webpack:///src/storage/task.ts","webpack:///src/storage/reference.ts","webpack:///src/storage/implementation/failrequest.ts","webpack:///src/storage/implementation/requestmap.ts","webpack:///src/storage/implementation/authwrapper.ts","webpack:///src/storage/service.ts"],"names":["firebase","window","self","modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","parentJsonpFunction","chunkIds","moreModules","executeModules","chunkId","result","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","shift","s","3","e","onScriptComplete","script","onerror","onload","clearTimeout","timeout","chunk","Error","undefined","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","createElement","type","charset","async","nc","setAttribute","src","p","setTimeout","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error","__webpack_exports__","PromiseImpl","Deferred","attachDummyErrorHandler","__WEBPACK_IMPORTED_MODULE_0__utils_globalScope__","this","wrapCallback","opt_nodeCallback","meta","opt_value","catch","createFirebaseNamespace","removeApp","callAppHooks","apps_","app","DEFAULT_ENTRY_NAME","contains","initializeApp","options","FirebaseAppImpl","namespace","getApps","keys","map","registerService","createService","serviceProperties","appHook","allowMultipleInstances","factories","appHooks","forEach","serviceNamespace","appArg","__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__","args","_i","arguments","_getService","bind","apply","extendNamespace","props","eventName","serviceName","factoryName","useAsService","useService","t","apps","__WEBPACK_IMPORTED_MODULE_2__utils_promise__","SDK_VERSION","INTERNAL","createSubscribe","__WEBPACK_IMPORTED_MODULE_0__subscribe__","ErrorFactory","__WEBPACK_IMPORTED_MODULE_1__errors__","deepExtend","code","appErrors","create","value","obj","key","tokenListeners","firebase_","isDeleted_","services_","name_","options_","getUid","getToken","addAuthTokenListener","callback","removeAuthTokenListener","filter","listener","checkDestroyed_","delete","_this","then","services","serviceKey","instanceKey","all","service","instanceIdentifier","instanceSpecifier","extendApp","log","errors","no-app","bad-app-name","duplicate-app","app-deleted","duplicate-service","sa-not-supported","invalid-app-argument","__WEBPACK_IMPORTED_MODULE_0__utils_shims__","ERROR_NAME","captureStackTrace","FirebaseError","message","err_1","stack","constructor","pattern","data","template","fullCode","replace","match","prop","slice","executor","onNoObservers","proxy","ObserverProxy","subscribe","implementsAnyMethods","methods","_typeof","methods_1","method","noop","__WEBPACK_IMPORTED_MODULE_0__utils_promise__","Symbol","iterator","observers","unsubscribes","observerCount","task","finalized","next","forEachObserver","observer","close","complete","nextOrObserver","unsub","unsubscribeOne","finalError","fn","sendOne","global","globalScope","scope","Function","g","eval","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","len","run","Item","array","process","nextTick","Array","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","deepCopy","target","source","Date","dateValue","getTime","patchProperty","findIndex","predicate","TypeError","thisArg","k","kValue","find","setImmediate","root","_state","_handled","_value","_deferreds","doResolve","handle","deferred","_immediateFn","cb","onFulfilled","onRejected","ret","newValue","finale","_unhandledRejectionFn","Handler","done","reason","ex","setTimeoutFunc","prom","arr","res","val","remaining","race","values","warn","_setImmediateFn","_setUnhandledRejectionFn","Timeout","id","clearFn","_id","_clearFn","setInterval","clearInterval","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","tasksByHandle","nextHandle","registerImmediate","runIfPresent","currentlyRunningATask","doc","attachTo","getPrototypeOf","toString","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","messagePrefix","Math","random","onGlobalMessage","event","indexOf","addEventListener","attachEvent","MessageChannel","channel","port1","port2","html","documentElement","onreadystatechange","removeChild","default","webpackJsonpFirebase","assert","assertionError","__WEBPACK_IMPORTED_MODULE_0__constants__","assertion","__WEBPACK_IMPORTED_MODULE_0__globalScope__","stringToByteArray","str","output","charCodeAt","byteArrayToString","bytes","String","fromCharCode","base64","_","O","S","T","ENCODED_VALS_BASE","ENCODED_VALS","ENCODED_VALS_WEBSAFE","HAS_NATIVE_SUPPORT","atob","encodeByteArray","input","opt_webSafe","isArray","init_","byteToCharMap","byteToCharMapWebSafe_","byteToCharMap_","byte1","haveByte2","byte2","haveByte3","byte3","outByte1","outByte2","outByte3","outByte4","join","encodeString","btoa","decodeString","decodeStringToByteArray","charToByteMap","charToByteMapWebSafe_","charToByteMap_","charAt","haveByte4","byte4","N","Hash","blockSize","__extends","extendStatics","setPrototypeOf","__proto__","b","__","Sha1","_super","chain_","buf_","W_","pad_","inbuf_","total_","reset","compress_","buf","opt_offset","W","f","a","update","opt_length","lengthMinusBlock","inbuf","digest","totalBits","j","LUIDGenerator","util_base64Encode","util_base64Decode","util_sha1","logger","enableLogging","logWrapper","fatal","warnIfPageIsSecure","isInvalidJSONNumber","executeWhenDOMReady","MIN_NAME","MAX_NAME","nameCompare","stringCompare","requireKey","ObjectToUniqueKey","splitStringBySize","each","doubleToIEEE754String","isChromeExtensionContentScript","isWindowsStoreApp","errorForServerCode","exceptionGuard","beingCrawled","setTimeoutNonBlocking","BufferImpl","__WEBPACK_IMPORTED_MODULE_0__utils_assert__","__WEBPACK_IMPORTED_MODULE_1__utils_obj__","__WEBPACK_IMPORTED_MODULE_4__utils_utf8__","__WEBPACK_IMPORTED_MODULE_5__utils_json__","__WEBPACK_IMPORTED_MODULE_6__storage_storage__","__WEBPACK_IMPORTED_MODULE_7__utils_environment__","utf8Bytes","sha1","sha1Bytes","buildLogMessage_","var_args","firstLog_","logger_","persistent","set","remove","prefix","location","protocol","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","readyState","called_1","wrappedFn_1","body","floor","aAsInt","tryParseInt","bAsInt","sort","segsize","dataSegs","substring","v","ln","bits","abs","pow","min","LN2","round","reverse","hexByteString","hexByte","parseInt","substr","toLowerCase","test","href","Windows","UI","query","path","toUpperCase","INTEGER_REGEXP_","RegExp","intVal","search","time","safeGet","clone","isEmpty","getCount","findKey","findValue","getAnyKey","getValues","every","extend","objTo","objFrom","rv","opt_obj","opt_this","jsonEval","stringify","JSON","parse","isMobileCordova","isReactNative","isNodeSdk","getUA","navigator","NODE_CLIENT","NODE_ADMIN","CONSTANTS","__WEBPACK_IMPORTED_MODULE_0__utils_json__","DOMStorageWrapper","domStorage_","prefix_","removeItem","prefixedName_","setItem","storedVal","getItem","__WEBPACK_IMPORTED_MODULE_0__utils_obj__","MemoryStorage","cache_","isInMemoryStorage","PersistentStorage","SessionStorage","storage_createStoragefor","domStorageName","domStorage","PROTOCOL_VERSION","VERSION_PARAM","TRANSPORT_SESSION_PARAM","REFERER_PARAM","FORGE_REF","FORGE_DOMAIN","LAST_SESSION_PARAM","WEBSOCKET","LONG_POLLING","stringLength","__WEBPACK_IMPORTED_MODULE_0__assert__","out","high","__WEBPACK_IMPORTED_MODULE_0__utils_deep_copy__","StatsCollection","counters_","incrementCounter","amount","StatsManager_StatsManager","StatsManager","getCollection","repoInfo","hashString","collections_","getOrCreateReporter","creatorFunction","reporters_","WebSocketConnection","__WEBPACK_IMPORTED_MODULE_0__app__","__WEBPACK_IMPORTED_MODULE_1__utils_assert__","__WEBPACK_IMPORTED_MODULE_2__core_util_util__","__WEBPACK_IMPORTED_MODULE_3__core_stats_StatsManager__","__WEBPACK_IMPORTED_MODULE_4__Constants__","__WEBPACK_IMPORTED_MODULE_5__utils_constants__","__WEBPACK_IMPORTED_MODULE_6__core_storage_storage__","__WEBPACK_IMPORTED_MODULE_7__utils_json__","__WEBPACK_IMPORTED_MODULE_8__utils_environment__","WebSocketImpl","MozWebSocket","WebSocket","connId","transportSessionId","lastSessionId","keepaliveTimer","frames","totalFrames","bytesSent","bytesReceived","log_","stats_","connURL","connectionURL_","urlParams","connectionURL","open","onMessage","onDisconnect","everConnected_","device","headers","User-Agent","platform","origin","mySock","onClosed_","onopen","onclose","handleIncomingFrame","start","forceDisallow","forceDisallow_","isAvailable","isOldAndroid","userAgent","oldAndroidRegex","oldAndroidMatch","parseFloat","previouslyFailed","markConnectionHealthy","appendFrame_","fullMess","jsonMess","handleNewFrameCount_","frameCount","extractFrameCount_","isNaN","mess","resetKeepAlive","remainingData","send","dataStr","sendString_","shutdown_","isClosed_","responsesRequiredToBeHealthy","healthyTimeout","decodePath","pathString","pathStringDecoded","pieces","split","piece","decodeURIComponent","validation_errorPrefix","fnName","argumentNumber","optional","argName","NAME_ONLY_COMPARATOR","left","right","__WEBPACK_IMPORTED_MODULE_0__util_util__","NAME_COMPARATOR","nodeFromJSON_nodeFromJSON","json","priority","ChildrenNode_ChildrenNode","EMPTY_NODE","nodeFromJSON__typeof","__WEBPACK_IMPORTED_MODULE_4__utils_assert__","LeafNode_LeafNode","USE_HINZE","node_1","jsonObj_1","__WEBPACK_IMPORTED_MODULE_3__utils_obj__","childData","childNode","isLeafNode","updateImmediateChild","updatePriority","children_1","childrenHavePriority_1","hinzeJsonObj_1","child","getPriority","NamedNode","childSet","childSet_buildChildSet","namedNode","sortedChildSet","PRIORITY_INDEX","getCompare","IndexMap_IndexMap",".priority","Default","__EMPTY_NODE","MAX_NODE","__childrenNodeConstructor","nodeFromJSON","PriorityIndex_MAX_NODE","_defaultIndexMap","__WEBPACK_IMPORTED_MODULE_0__util__","__WEBPACK_IMPORTED_MODULE_1__utils_utf8__","Path","pathOrString","pieceNum","pieces_","copyTo","pieceNum_","getFront","getLength","popFront","getBack","toUrlEncodedString","encodeURIComponent","begin","parent","childPathObj","childPieces","relativePath","outerPath","innerPath","outer","inner","comparePaths","leftKeys","rightKeys","cmp","equals","other","ValidationPath","errorPrefix_","parts_","byteLength_","max","checkValid_","pop","last","MAX_PATH_LENGTH_BYTES","MAX_PATH_DEPTH","toErrorString","__WEBPACK_IMPORTED_MODULE_2__storage_storage__","__WEBPACK_IMPORTED_MODULE_3__realtime_Constants__","RepoInfo","host","secure","webSocketOnly","persistenceKey","domain","internalHost","needsQueryParam","isCacheableHost","isDemoHost","isCustomHost","updateHost","newHost","params","pairs","toURLString","__WEBPACK_IMPORTED_MODULE_2__util__","parser_parseRepoInfo","dataURL","parsedUrl","parseURL","subdomain","scheme","port","colonInd","slashInd","parts","validation__typeof","validateArgCount","minCount","maxCount","argCount","argError","validateCallback","validateContextObject","context","validation___WEBPACK_IMPORTED_MODULE_1__utils_obj__","validation___WEBPACK_IMPORTED_MODULE_2__util__","util_validation__typeof","INVALID_KEY_REGEX_","INVALID_PATH_REGEX_","isValidKey","isValidPathString","isValidRootPathString","isValidPriority","validation_validateFirebaseDataArg","validation_validateFirebaseData","validateFirebaseData","errorPrefix","path_","hasDotValue_1","hasActualChild_1","validation_validateFirebaseMergePaths","mergePaths","curPath","prevPath","validation_validateFirebaseMergeDataArg","validation_validatePriority","validation_validateEventType","eventType","validation_validateKey","validation_validatePathString","validateRootPathString","validateWritablePath","validation_validateUrl","validation_validateBoolean","bool","__WEBPACK_IMPORTED_MODULE_3__utils_promise__","onDisconnect_OnDisconnect","OnDisconnect","repo_","cancel","onComplete","onDisconnectCancel","onDisconnectSet","setWithPriority","onDisconnectSetWithPriority","objectToMerge","newObjectToMerge","onDisconnectUpdate","TransactionResult_TransactionResult","TransactionResult","committed","snapshot","toJSON","NextPushId___WEBPACK_IMPORTED_MODULE_0__utils_assert__","nextPushId","PUSH_CHARS","lastPushTime","lastRandChars","now","duplicateTime","timeStampChars","node","Wrap","__WEBPACK_IMPORTED_MODULE_1__util_util__","Index_Index","Index","compare","indexedValueChanged","oldNode","newNode","oldWrapped","newWrapped","minPost","MIN","__WEBPACK_IMPORTED_MODULE_2__util_util__","__WEBPACK_IMPORTED_MODULE_3__utils_assert__","KeyIndex_KeyIndex","KeyIndex","isDefinedOn","maxPost","makePost","indexValue","KEY_INDEX","snap___WEBPACK_IMPORTED_MODULE_0__utils_assert__","snap___WEBPACK_IMPORTED_MODULE_1__util_util__","__WEBPACK_IMPORTED_MODULE_2__utils_obj__","snap__typeof","priorityHashText","validatePriorityNode","priorityNode","LeafNode___WEBPACK_IMPORTED_MODULE_0__utils_assert__","LeafNode___WEBPACK_IMPORTED_MODULE_1__util_util__","LeafNode__typeof","LeafNode","value_","priorityNode_","lazyHash_","newPriorityNode","getImmediateChild","childName","getChild","hasChild","getPredecessorChildName","newChildNode","updateChild","front","numChildren","forEachChild","index","action","exportFormat",".value","getValue","hash","toHash","compareTo","compareToLeafNode_","otherLeaf","otherLeafType","thisLeafType","otherIndex","VALUE_TYPE_ORDER","thisIndex","withIndex","isIndexed","PriorityIndex___WEBPACK_IMPORTED_MODULE_1__util_util__","PriorityIndex___extends","PriorityIndex_PriorityIndex","PriorityIndex","aPriority","bPriority","indexCmp","SortedMapIterator","startKey","comparator","isReverse_","resultGenerator_","nodeStack_","getNext","hasNext","peek","LLRBNode","color","RED","SortedMap","copy","count","inorderTraversal","reverseTraversal","min_","minKey","maxKey","insert","fixUp_","removeMin_","isRed_","moveRedLeft_","smallest","rotateRight_","moveRedRight_","rotateLeft_","colorFlip_","nl","nr","checkMaxDepth_","blackDepth","check_","BLACK","LLRBEmptyNode","comparator_","root_","getPredecessorKey","rightParent","getIterator","resultGenerator","getIteratorFrom","getReverseIteratorFrom","getReverseIterator","LOG_2","Base12Num","num","current_","mask","bits_","nextBitIsOne","childList","keyFn","mapSortFn","buildBalancedTree","low","middle","base12","buildPennant","chunkSize","childTree","attachPennant","pennant","isOne","IndexMap___WEBPACK_IMPORTED_MODULE_0__utils_assert__","IndexMap___WEBPACK_IMPORTED_MODULE_2__utils_obj__","fallbackObject","IndexMap","indexes_","indexSet_","indexKey","sortedMap","hasIndex","indexDefinition","addIndex","existingChildren","sawIndexedValue","iter","newIndex","indexName","newIndexSet","newIndexes","addToIndexes","indexedChildren","existingSnap","newChildren","removeFromIndexes","ChildrenNode___WEBPACK_IMPORTED_MODULE_0__utils_assert__","ChildrenNode___WEBPACK_IMPORTED_MODULE_1__util_util__","ChildrenNode___extends","ChildrenNode","children_","indexMap_","newIndexMap","newPriority","newImmediateChild","numKeys","allIntegerKeys","toHash_1","childHash","idx","resolveIndex_","predecessor","getFirstChildName","getFirstChild","getLastChildName","getLastChild","wrappedNode","startPost","endPost","ChildrenNode_MAX_NODE","otherChildrenNode","thisIter","otherIter","thisCurrent","otherCurrent","ChildrenNode_MaxNode","MaxNode","defineProperties","MAX","__referenceConstructor","OperationType","ValueIndex___WEBPACK_IMPORTED_MODULE_2__util_util__","ValueIndex___extends","ValueIndex_ValueIndex","ValueIndex","valueNode","VALUE_INDEX","PathIndex___WEBPACK_IMPORTED_MODULE_0__utils_assert__","PathIndex___WEBPACK_IMPORTED_MODULE_1__util_util__","PathIndex___extends","PathIndex_PathIndex","PathIndex","indexPath_","extractChild","snap","aChild","bChild","DataSnapshot_DataSnapshot","DataSnapshot","node_","ref_","index_","exportVal","exists","childPathString","childPath","childRef","hasChildren","getKey","getRef","DataEvent","eventRegistration","prevName","getPath","getParent","getEventType","getEventRunner","CancelEvent","EventRegistration___WEBPACK_IMPORTED_MODULE_2__utils_obj__","EventRegistration___WEBPACK_IMPORTED_MODULE_3__utils_assert__","EventRegistration_ValueEventRegistration","ValueEventRegistration","callback_","cancelCallback_","context_","respondsTo","createEvent","change","getQueryParams","getIndex","snapshotNode","eventData","ctx","cancelCB_1","cb_1","createCancelEvent","matches","hasAnyCallback","EventRegistration_ChildEventRegistration","ChildEventRegistration","callbacks_","eventToCheck","cancelCB_2","cb_2","otherCount","otherKey","thisKey","Query___WEBPACK_IMPORTED_MODULE_0__utils_assert__","__WEBPACK_IMPORTED_MODULE_5__core_util_util__","__WEBPACK_IMPORTED_MODULE_10__utils_promise__","Query__typeof","Query_Query","Query","repo","queryParams_","orderByCalled_","validateQueryEndpoints_","startNode","endNode","hasStart","getIndexStartValue","hasEnd","getIndexEndValue","tooManyArgsError","wrongArgTypeError","getIndexStartName","getIndexEndName","validateLimit_","hasLimit","hasAnchoredLimit","validateNoPreviousOrderByCall_","cancelCallbackOrContext","getCancelAndContextArgs_","onValueEvent","callbacks","onChildEvent","cancelCallback","container","addEventCallbackForQuery","removeEventCallbackForQuery","userCallback","cancelOrContext","firstCall","onceCallback","limitToFirst","limit","limitToLast","orderByChild","parsedPath","newParams","orderBy","orderByKey","orderByPriority","orderByValue","startAt","endAt","equalTo","queryObject","getQueryObject","queryIdentifier","isEqual","sameRepo","samePath","sameQueryIdentifier","CountedSet","add","clear","SparseSnapshotTree_SparseSnapshotTree","SparseSnapshotTree","childKey","remember","forget","self_1","tree","forEachTree","prefixPath","func","ServerValues___WEBPACK_IMPORTED_MODULE_0__utils_assert__","ServerValues__typeof","generateWithValues","resolveDeferredValue","serverValues","ServerValues_resolveDeferredValueTree","resolvedTree","ServerValues_resolveDeferredValueSnapshot","resolveDeferredValueSnapshot","rawPri","leafNode","childrenNode","Operation___WEBPACK_IMPORTED_MODULE_0__utils_assert__","emptyChildrenSingleton","SyncPoint___referenceConstructor","OperationSource","fromUser","fromServer","queryId","tagged","User","Server","forServerTaggedQuery","AckUserWrite___WEBPACK_IMPORTED_MODULE_0__utils_assert__","AckUserWrite_AckUserWrite","AckUserWrite","affectedTree","revert","ACK_USER_WRITE","operationForChild","children","subtree","Empty","ImmutableTree___WEBPACK_IMPORTED_MODULE_2__util__","ImmutableTree___WEBPACK_IMPORTED_MODULE_3__utils_obj__","ImmutableTree_EmptyChildren","ImmutableTree_ImmutableTree","ImmutableTree","fromObject","childSnap","findRootMostMatchingPathAndValue","childExistingPathAndValue","findRootMostValueAndPath","toSet","newChild","setTree","newTree","fold","fold_","pathSoFar","accum","findOnPath","findOnPath_","pathToFollow","nextChild","foreachOnPath","foreachOnPath_","currentRelativePath","foreach","foreach_","foreachChild","ListenComplete_ListenComplete","ListenComplete","LISTEN_COMPLETE","Overwrite_Overwrite","Overwrite","OVERWRITE","Merge___WEBPACK_IMPORTED_MODULE_3__utils_assert__","Merge_Merge","Merge","MERGE","CacheNode","fullyInitialized_","filtered_","isFullyInitialized","isFiltered","isCompleteForPath","isCompleteForChild","getNode","ViewCache_ViewCache","ViewCache","eventCache_","serverCache_","updateEventSnap","eventSnap","filtered","updateServerSnap","serverSnap","getEventCache","getCompleteEventSnap","getServerCache","getCompleteServerSnap","Change","oldSnap","valueChange","VALUE","childAddedChange","CHILD_ADDED","childRemovedChange","CHILD_REMOVED","childChangedChange","newSnapshot","oldSnapshot","CHILD_CHANGED","childMovedChange","CHILD_MOVED","IndexedFilter___WEBPACK_IMPORTED_MODULE_0__utils_assert__","IndexedFilter_IndexedFilter","IndexedFilter","affectedPath","optChangeAccumulator","oldChild","trackChildChange","updateFullNode","newSnap","filtersNodes","getIndexedFilter","ChildChangeAccumulator___WEBPACK_IMPORTED_MODULE_0__utils_obj__","__WEBPACK_IMPORTED_MODULE_2__utils_assert__","ChildChangeAccumulator_ChildChangeAccumulator","ChildChangeAccumulator","changeMap_","oldChange","oldType","getChanges","NoCompleteChildSource_","getCompleteChild","getChildAfterChild","NO_COMPLETE_CHILD_SOURCE","CompleteChildSource_WriteTreeCompleteChildSource","WriteTreeCompleteChildSource","writes_","viewCache_","optCompleteServerCache_","serverNode","calcCompleteChild","completeServerData","nodes","calcIndexedSlice","ProcessorResult","viewCache","changes","ViewProcessor_ViewProcessor","ViewProcessor","filter_","assertIndexed","applyOperation","oldViewCache","operation","writesCache","completeCache","newViewCache","filterServerNode","accumulator","overwrite","applyUserOverwrite_","applyServerOverwrite_","merge","applyUserMerge_","applyServerMerge_","ackUserWrite","revertUserWrite_","ackUserWrite_","listenComplete_","maybeAddValueEvent_","isLeafOrEmpty","oldCompleteSnap","generateEventCacheAfterServerEvent_","changePath","oldEventSnap","shadowingWrite","newEventCache","serverCache","completeChildren","completeEventChildren","calcCompleteEventChildren","completeNode","calcCompleteEventCache","oldEventNode","updatedPriority","calcEventCacheAfterServerOverwrite","childChangePath","newEventChild","eventChildUpdate","changedSnap","newServerCache","oldServerSnap","serverFilter","newServerNode","newEventSnap","cacheHasChild_","changedChildren","curViewCache","writePath","applyMerge_","viewMergeTree","serverChild","childMergeTree","isUnknownDeepMerge","ackPath","changedChildren_1","changedChildren_2","mergePath","serverCachePath","oldServerNode","completeServerCache","oldEventCache","serverChildren","EventGenerator___WEBPACK_IMPORTED_MODULE_2__utils_assert__","EventGenerator_EventGenerator","EventGenerator","query_","generateEventsForChanges","eventCache","eventRegistrations","events","moves","generateEventsForType_","registrations","filteredChanges","compareChanges_","materializedChange","materializeSingleChange_","registration","aWrapped","bWrapped","__WEBPACK_IMPORTED_MODULE_6__utils_assert__","View_View","View","initialViewCache","eventRegistrations_","indexFilter","getNodeFilter","processor_","initialServerCache","initialEventCache","eventGenerator_","getQuery","getCompleteServerCache","cache","loadsAllData","addEventRegistration","removeEventRegistration","cancelError","cancelEvents","path_1","maybeEvent","existing","generateEventsForChanges_","getInitialEvents","initialChanges","SyncPoint___WEBPACK_IMPORTED_MODULE_2__utils_assert__","SyncPoint___WEBPACK_IMPORTED_MODULE_3__utils_obj__","SyncPoint_SyncPoint","SyncPoint","views_","optCompleteServerCache","view","events_1","serverCacheComplete","eventCacheComplete","removed","hadCompleteView","hasCompleteView","viewQueryId","getQueryViews","viewForQuery","getCompleteView","viewExistsForQuery","CompoundWrite___WEBPACK_IMPORTED_MODULE_2__utils_obj__","__WEBPACK_IMPORTED_MODULE_5__utils_assert__","CompoundWrite_CompoundWrite","CompoundWrite","writeTree_","addWrite","rootmost","rootMostPath","addWrites","updates","newWrite","removeWrite","hasCompleteWrite","getCompleteNode","getCompleteChildren","childCompoundWrite","shadowingNode","applySubtreeWrite_","writeTree","priorityWrite_1","WriteTree___WEBPACK_IMPORTED_MODULE_0__utils_obj__","WriteTree___WEBPACK_IMPORTED_MODULE_1__utils_assert__","WriteTree_WriteTree","WriteTree","visibleWrites_","allWrites_","lastWriteId_","childWrites","WriteTreeRef","addOverwrite","writeId","visible","addMerge","getWrite","record","writeToRemove","splice","removedWriteWasVisible","removedWriteOverlapsWithOtherWrites","currentWrite","recordContainsPath_","resetTree_","getCompleteWriteData","treePath","writeIdsToExclude","includeHiddenWrites","write","mergeAtPath","layerTree_","layeredCache","subMerge","completeServerChildren","topLevelSet","merge_1","existingEventSnap","existingServerSnap","childMerge","toIterate","writeRecord","DefaultFilter_","writes","treeRoot","compoundWrite","deepNode","treePath_","existingServerCache","SyncTree___WEBPACK_IMPORTED_MODULE_0__utils_assert__","SyncTree___WEBPACK_IMPORTED_MODULE_1__util_util__","__WEBPACK_IMPORTED_MODULE_4__utils_obj__","SyncTree_SyncTree","SyncTree","listenProvider_","syncPointTree_","pendingWriteTree_","tagToQueryMap_","queryToTagMap_","applyUserOverwrite","newData","applyOperationToSyncPoints_","applyUserMerge","changeTree","affectedTree_1","applyServerOverwrite","applyServerMerge","applyListenComplete","applyTaggedQueryOverwrite","tag","queryKey","queryKeyForTag_","r","parseQueryKey_","queryPath","op","applyTaggedOperation_","applyTaggedQueryMerge","applyTaggedListenComplete","foundAncestorDefaultView","pathToSyncPoint","sp","syncPoint","childSyncPoint","viewAlreadyExists","makeQueryKey_","getNextQueryTag_","setupListener_","maybeSyncPoint","removedAndEvents","removingDefault","covered","parentSyncPoint","newViews","collectDistinctViewsForSubTree_","newQuery","createListenerForView_","startListening","queryForListening_","tagForQuery_","hashFn","stopListening","queryToRemove","tagToRemove","removeTags_","maybeChildSyncPoint","childMap","views_1","childViews","queries","removedQuery","removedQueryKey","removedQueryTag","isDefault","queriesToStop","queries_1","childQueries","queryToStop","status","splitIndex","nextQueryTag_","applyOperationHelper_","syncPointTree","applyOperationDescendantsHelper_","childOperation","childServerCache","childWritesCache","SnapshotHolder_SnapshotHolder","SnapshotHolder","rootNode_","updateSnapshot","newSnapshotNode","AuthTokenProvider___WEBPACK_IMPORTED_MODULE_0__util_util__","AuthTokenProvider","app_","forceRefresh","addTokenChangeListener","removeTokenChangeListener","notifyForInvalidToken","errorMessage","StatsListener___WEBPACK_IMPORTED_MODULE_0__utils_obj__","StatsListener","collection_","last_","newStats","delta","stat","StatsReporter___WEBPACK_IMPORTED_MODULE_0__utils_obj__","StatsReporter___WEBPACK_IMPORTED_MODULE_1__util_util__","FIRST_STATS_MIN_TIME","FIRST_STATS_MAX_TIME","StatsReporter_StatsReporter","StatsReporter","collection","server_","statsToReport_","statsListener_","reportStats_","includeStat","stats","reportedStats","haveStatsToReport","reportStats","EventQueue___WEBPACK_IMPORTED_MODULE_0__util_util__","EventQueue","eventLists_","recursionDepth_","queueEvents","eventDataList","currList","eventPath","EventList","raiseEventsAtPath","raiseQueuedEventsMatchingPredicate_","raiseEventsForChangedPath","changedPath","sentAll","eventList","raise","events_","eventFn","EventEmitter___WEBPACK_IMPORTED_MODULE_0__utils_assert__","EventEmitter","allowedEvents_","listeners_","trigger","validateEventType_","getInitialEvent","et","VisibilityMonitor___WEBPACK_IMPORTED_MODULE_1__utils_assert__","VisibilityMonitor___extends","VisibilityMonitor","hidden","visibilityChange","visible_","getInstance","OnlineMonitor___WEBPACK_IMPORTED_MODULE_0__utils_assert__","__WEBPACK_IMPORTED_MODULE_2__utils_environment__","OnlineMonitor___extends","OnlineMonitor","online_","currentlyOnline","__WEBPACK_IMPORTED_MODULE_0__database_core_util_util__","__WEBPACK_IMPORTED_MODULE_1__json__","jwt__typeof","decode","token","header","claims","signature","isValidFormat","decoded","isAdmin","__WEBPACK_IMPORTED_MODULE_0__core_util_util__","PacketReceiver","onMessage_","pendingResponses","currentResponseNum","closeAfterResponse","onClose","closeAfter","responseNum","handleResponse","requestNum","this_1","toProcess","BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__","__WEBPACK_IMPORTED_MODULE_2__core_stats_StatsManager__","__WEBPACK_IMPORTED_MODULE_6__utils_environment__","FIREBASE_LONGPOLL_COMMAND_CB_NAME","FIREBASE_LONGPOLL_DATA_CB_NAME","BrowserPollConnection_BrowserPollConnection","BrowserPollConnection","urlFn","curSegmentNum","onDisconnect_","myPacketOrderer","connectTimeoutTimer_","scriptTagHolder","BrowserPollConnection_FirebaseIFrameScriptHolder","command","arg1","arg2","incrementIncomingBytes_","password","sendNewPolls","pN","uniqueCallbackIdentifier","connectURL","addTag","startLongPoll","addDisconnectPingFrame","forceAllow","forceAllow_","myDisconnFrame","base64data","MAX_URL_DATA_SIZE","enqueueSegment","pw","style","display","FirebaseIFrameScriptHolder","commandCB","onMessageCB","outstandingRequests","pendingSegs","currentSerial","myIFrame","createIFrame_","iframeContents","iframe","contentWindow","contentDocument","alive","innerHTML","myID","myPW","theURL","nodeRestRequest","newRequest_","curDataString","theSeg","seg","ts","addLongPollTag_","segnum","totalsegs","url","serial","doNewRequest","keepaliveTimeout","readyStateCB","loadCB","doNodeLongPoll","newScript_1","rstate","parentNode","__WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__","TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__","TransportManager_TransportManager","TransportManager","initTransports_","isWebSocketsAvailable","isSkipPollConnection","transports_","transports_1","ALL_TRANSPORTS","transport","initialTransport","upgradeTransport","Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__","__WEBPACK_IMPORTED_MODULE_1__core_storage_storage__","__WEBPACK_IMPORTED_MODULE_2__Constants__","Connection_Connection","Connection","repoInfo_","onReady_","onKill_","connectionCount","pendingDataMessages","state_","transportManager_","start_","conn","conn_","nextTransportId_","primaryResponsesRequired_","onMessageReceived","connReceiver_","onConnectionLost","disconnReceiver_","tx_","rx_","secondaryConn_","isHealthy_","healthyTimeout_ms","healthyTimeout_","everConnected","onConnectionLost_","onSecondaryConnectionLost_","onPrimaryMessageReceived_","onSecondaryMessageReceived_","sendRequest","dataMsg","msg","sendData_","tryCleanupConnection","onSecondaryControl_","controlData","cmd","upgradeIfSecondaryHealthy_","secondaryResponsesRequired_","parsedData","layer","proceedWithUpgrade_","onControl_","onDataMessage_","onPrimaryResponse_","payload","onHandshake_","onConnectionShutdown_","onReset_","sendPingOnPrimaryIfNecessary_","handshake","timestamp","h","sessionId","onConnectionEstablished_","tryStartUpgrade_","startUpgrade_","closeConnections_","ServerActions","put","refreshAuthToken","onDisconnectPut","onDisconnectMerge","PersistentConnection___WEBPACK_IMPORTED_MODULE_0__app__","PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__","__WEBPACK_IMPORTED_MODULE_2__utils_json__","PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__","__WEBPACK_IMPORTED_MODULE_4__util_util__","__WEBPACK_IMPORTED_MODULE_10__utils_constants__","__WEBPACK_IMPORTED_MODULE_11__utils_environment__","PersistentConnection__typeof","PersistentConnection___extends","RECONNECT_MIN_DELAY","RECONNECT_MAX_DELAY_DEFAULT","PersistentConnection_PersistentConnection","PersistentConnection","onDataUpdate_","onConnectStatus_","onServerInfoUpdate_","authTokenProvider_","authOverride_","nextPersistentConnectionId_","interruptReasons_","listens_","outstandingPuts_","outstandingPutCount_","onDisconnectRequestQueue_","connected_","reconnectDelay_","maxReconnectDelay_","securityDebugCallback_","establishConnectionTimer_","requestCBHash_","requestNumber_","realtime_","authToken_","forceTokenRefresh_","invalidAuthTokenCount_","firstConnection_","lastConnectionAttemptTime_","lastConnectionEstablishedTime_","scheduleConnect_","onVisible_","onOnline_","onResponse","curReqNum","listen","currentHashFn","listenSpec","sendListen_","req","warnOnListenWarnings_","removeListen_","warnings","indexSpec","indexPath","tryAuth","reduceReconnectDelayIfAdminCredential_","credential","token_1","authMethod","requestData","cred","onAuthRevoked_","unlisten","sendUnlisten_","queryObj","sendOnDisconnect_","request","response","putInternal","sendPut_","queued","errorReason","reqNum","onDataPush_","onListenRevoked_","onSecurityDebugPacket_","handleTimestamp_","sendConnectStats_","restoreState_","establishConnection_","online","onRealtimeDisconnect_","cancelSentTransactions_","shouldReconnect_","timeSinceLastConnectSucceeded","timeSinceLastConnectAttempt","reconnectDelay","onDataMessage_1","onReady_1","onDisconnect_1","connId_1","nextConnectionId_","lastSessionId_1","canceled_1","connection_1","closeFn_1","sendRequestFn","accessToken","interrupt","resume","serverTimeOffset","q","normalizedPathString","statusCode","explanation","clientName","__WEBPACK_IMPORTED_MODULE_0__obj__","querystring","querystringParams","arrayVal","ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_0__utils_assert__","ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__","ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_2__utils_json__","ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_3__utils_obj__","ReadonlyRestClient___extends","ReadonlyRestClient_ReadonlyRestClient","ReadonlyRestClient","getListenId_","listenId","thisListen","queryStringParamaters","toRestQueryStringParameters","restRequest_","status_1","queryStringParameters","authTokenData","authToken","xhr","XMLHttpRequest","responseText","__WEBPACK_IMPORTED_MODULE_6__utils_json__","__WEBPACK_IMPORTED_MODULE_7__util_util__","__WEBPACK_IMPORTED_MODULE_8__utils_obj__","__WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__","Repo__typeof","Repo_Repo","Repo","forceRestClient","dataUpdateCount","eventQueue_","nextWriteId_","interceptServerDataCallback_","persistentConnection_","authTokenProvider","authOverride","statsReporter_","transactions_init_","infoData_","infoSyncTree_","infoEvents","updateInfo_","serverSyncTree_","serverTime","offsetNode","offset","generateServerValues","isMerge","taggedChildren","raw","taggedSnap","rerunTransactions_","interceptServerData_","connectStatus","runOnDisconnectEvents_","getNextWriteId_","newVal","newNodeUnresolved","success","clearEvents","callOnCompleteCallback","abortTransactions_","childrenToMerge","empty","changedKey","changedValue","writeId_1","resolvedOnDisconnectTree","showDelta","longestName","reduce","previousValue","currentValue","statsIncrementCounter","metric","__database","Database_Database","RangedFilter_RangedFilter","RangedFilter","indexedFilter_","startPost_","getStartPost_","endPost_","getEndPost_","getStartPost","getEndPost","startName","endName","LimitedFilter___WEBPACK_IMPORTED_MODULE_3__utils_assert__","LimitedFilter_LimitedFilter","LimitedFilter","rangedFilter_","limit_","getLimit","reverse_","isViewFromLeft","fullLimitUpdateChild_","inRange","indexCompare_1","foundStartPost","changeAccumulator","indexCmp_1","newChildNamedNode","windowBoundary","oldChildSnap","compareNext","QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__","QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__","__WEBPACK_IMPORTED_MODULE_9__utils_json__","QueryParams_QueryParams","QueryParams","limitSet_","startSet_","startNameSet_","endSet_","endNameSet_","viewFrom_","indexStartValue_","indexStartName_","indexEndValue_","indexEndName_","WIRE_PROTOCOL_CONSTANTS_","VIEW_FROM_LEFT","copy_","newLimit","VIEW_FROM_RIGHT","WIRE_PROTOCOL_CONSTANTS","INDEX_START_VALUE","INDEX_START_NAME","INDEX_END_VALUE","INDEX_END_NAME","LIMIT","viewFrom","VIEW_FROM","INDEX","REST_CONSTANTS","REST_QUERY_CONSTANTS_","qs","ORDER_BY","START_AT","END_AT","LIMIT_TO_FIRST","LIMIT_TO_LAST","DEFAULT","Reference___WEBPACK_IMPORTED_MODULE_2__core_util_util__","Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__","Reference___extends","Reference_Reference","Reference","parentPath","getRoot","databaseProp","database","transaction","transactionUpdate","applyLocally","promiseComplete","startTransaction","setPriority","thennablePushRef","pushRef","TransactionStatus","Tree___WEBPACK_IMPORTED_MODULE_0__utils_assert__","Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__","TreeNode","childCount","Tree_Tree","Tree","parent_","subTree","pathObj","setValue","updateParents_","forEachDescendant","includeSelf","childrenFirst","forEachAncestor","forEachImmediateDescendantWithValue","updateChild_","childEmpty","childExists","Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__","__WEBPACK_IMPORTED_MODULE_6__util_util__","__WEBPACK_IMPORTED_MODULE_9__utils_obj__","Repo_transaction__typeof","MAX_TRANSACTION_RETRIES_","transactionQueueTree_","valueCallback","watchRef","unwatcher","order","retryCount","abortReason","currentWriteId","currentInputSnapshot","currentOutputSnapshotRaw","currentOutputSnapshotResolved","currentState","getLatestState_","RUN","queueNode","nodeQueue","priorityForNode","sendReadyTransactions_","excludeSets","pruneCompletedTransactionsBelowNode_","buildTransactionQueue_","sendTransactionQueue_","setsToIgnore","txn","latestState","snapToSend","latestHash","SENT","dataToSend","pathToSend","COMPLETED","SENT_NEEDS_ABORT","NEEDS_ABORT","rootMostTransactionNode","getAncestorTransactionNode_","rerunTransactionQueue_","txnsToRerun","abortTransaction","currentNode","newDataNode","hasExplicitPriority","oldWriteId","newNodeResolved","lastInput","transactionNode","transactionQueue","aggregateTransactionQueuesForNode_","to","from","abortTransactionsOnNode_","lastSent","_staticInstance","RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__","RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__","RepoManager_RepoManager","RepoManager","repos_","useRestClient_","databaseFromApp","dbUrl","createRepo","deleteRepo","Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__","Database___WEBPACK_IMPORTED_MODULE_3__utils_promise__","Database","Database_DatabaseInternals","checkDeleted_","refFromURL","apiName","parsedURL","goOffline","goOnline","ServerValue","TIMESTAMP",".sv","DatabaseInternals","internal_namespaceObject","internal_forceLongPolling","internal_forceWebSockets","setSecurityDebugCallback","internal_stats","interceptServerData","__WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__","test_access_namespaceObject","DataConnection","RealTimeConnection","test_access_hijackHash","ConnectionTarget","listens","test_access_forceRestClient","simpleListen","echo","onEcho","newHash","oldPut","opt_onComplete","opt_hash","firebaseRef","_forceRestClient","registerDatabase","instance","__WEBPACK_IMPORTED_MODULE_4__database_core_util_util__","TEST_ACCESS","originalModule","webpackPolyfill","24","toBase64","arrayBuffer","uint8Version","Uint8Array","registerMessaging","factoryMethod","sw_controller_defaultExport","window_controller_defaultExport","namespaceExports","Messaging","_a","CODES","AVAILABLE_IN_WINDOW","AVAILABLE_IN_SW","SHOULD_BE_INHERITED","BAD_SENDER_ID","INCORRECT_GCM_SENDER_ID","PERMISSION_DEFAULT","PERMISSION_BLOCKED","UNSUPPORTED_BROWSER","NOTIFICATIONS_BLOCKED","FAILED_DEFAULT_REGISTRATION","SW_REGISTRATION_EXPECTED","GET_SUBSCRIPTION_FAILED","INVALID_SAVED_TOKEN","SW_REG_REDUNDANT","TOKEN_SUBSCRIBE_FAILED","TOKEN_SUBSCRIBE_NO_TOKEN","TOKEN_SUBSCRIBE_NO_PUSH_SET","USE_SW_BEFORE_GET_TOKEN","INVALID_DELETE_TOKEN","DELETE_TOKEN_NOT_FOUND","DELETE_SCOPE_NOT_FOUND","BG_HANDLER_FUNCTION_EXPECTED","NO_WINDOW_CLIENT_TO_MSG","UNABLE_TO_RESUBSCRIBE","NO_FCM_TOKEN_FOR_RESUBSCRIBE","FAILED_TO_DELETE_TOKEN","NO_SW_IN_REG","BAD_SCOPE","BAD_VAPID_KEY","BAD_SUBSCRIPTION","BAD_TOKEN","BAD_PUSH_SET","FAILED_DELETE_VAPID_KEY","ERROR_MAP","errors_defaultExport","codes","array_buffer_to_base64_defaultExport","FCM_APPLICATION_SERVER_KEY","SUBSCRIPTION_DETAILS","userVisibleOnly","applicationServerKey","fcm_details_defaultExport","ENDPOINT","APPLICATION_SERVER_KEY","SUBSCRIPTION_OPTIONS","__WEBPACK_IMPORTED_MODULE_0__app_errors__","FCM_TOKEN_OBJ_STORE","token_manager_TokenManager","TokenManager","errorFactory_","openDbPromise_","openDatabase_","indexedDB","onsuccess","onupgradeneeded","db","objectStore","createObjectStore","keyPath","createIndex","unique","closeDatabase","getTokenDetailsFromToken","fcmToken","getTokenDetailsFromSWScope_","swScope","scopeRequest","getAllTokenDetailsForSenderId_","senderId","senderIdTokens","cursorRequest","openCursor","cursor","continue","subscribeToFCM","subscription","pushSet","p256dh","auth","fcmSubscribeBody","endpoint","Headers","append","subscribeOptions","fetch","fcmTokenResponse","isSameSubscription_","masterTokenDetails","saveTokenDetails_","swRegistration","fcmPushSet","details","fcmSenderId","getSavedToken","ServiceWorkerRegistration","allTokenDetails","tokenDetails","pushManager","getSubscription","createToken","fcmTokenDetails","sub","deleteToken","token_manager_defaultExport","controller_interface___WEBPACK_IMPORTED_MODULE_0__app_errors__","SENDER_ID_OPTION_NAME","controller_interface_ControllerInterface","ControllerInterface","messagingSenderId_","tokenManager_","currentPermission","getNotificationPermission_","notification_permission_defaultExport","getSWRegistration_","unsubscribe","requestPermission","useServiceWorker","optError","optCompleted","onTokenRefresh","setBackgroundMessageHandler","Notification","permission","getTokenManager","controller_interface_defaultExport","PARAMS","TYPE_OF_MSG","DATA","msgType","PUSH_MSG_RECEIVED","NOTIFICATION_CLICKED","createNewMsg","msgData","worker_page_message_defaultExport","TYPES_OF_MSG","default_sw_defaultExport","__WEBPACK_IMPORTED_MODULE_5__app_subscribe__","window_controller_WindowController","WindowController","registrationToUse_","manifestCheckPromise_","messageObserver_","tokenRefreshObserver_","onTokenRefresh_","setupSWMessageListener_","isSupported_","manifestCheck_","manifestTag","querySelector","manifestContent","managePermissionResult","permissionPromise","waitForRegistrationToActivate_","serviceWorker","installing","waiting","state","stateChangeListener","removeEventListener","register","browserErrorMessage","workerPageMessage","pushMessage","PushSubscription","sw_controller___extends","sw_controller_SWController","SWController","onPush_","onSubChange_","onNotificationClick_","bgMessageHandler_","msgPayload","handleMsgPromise","hasVisibleClients_","hasVisibleClients","notification","sendMessageToWindowClients_","notificationDetails","getNotificationData_","notificationTitle","showNotification","waitUntil","promiseChain","tokenManager","newSubscription","stopImmediatePropagation","clickAction","getWindowClient_","windowClient","clients","openWindow","internalMsg","attemptToMessageClient_","notificationInformation","assign","URL","matchAll","includeUncontrolled","clientList","suitableClient","focus","client","some","visibilityState","23","prependCode","unknown","FirebaseStorageError","Code","UNKNOWN","objectNotFound","OBJECT_NOT_FOUND","quotaExceeded","bucket","QUOTA_EXCEEDED","unauthenticated","UNAUTHENTICATED","unauthorized","UNAUTHORIZED","retryLimitExceeded","RETRY_LIMIT_EXCEEDED","error_canceled","CANCELED","invalidUrl","INVALID_URL","invalidDefaultBucket","INVALID_DEFAULT_BUCKET","cannotSliceBlob","CANNOT_SLICE_BLOB","serverFileWrongSize","SERVER_FILE_WRONG_SIZE","noDownloadURL","NO_DOWNLOAD_URL","invalidArgument","INVALID_ARGUMENT","invalidArgumentCount","argMin","argMax","real","countPart","plural","INVALID_ARGUMENT_COUNT","appDeleted","APP_DELETED","invalidRootOperation","INVALID_ROOT_OPERATION","invalidFormat","format","INVALID_FORMAT","internalError","INTERNAL_ERROR","formatValidator","stringFormat","StringFormat","RAW","BASE64","BASE64URL","DATA_URL","dataFromString","string","StringData","utf8Bytes_","base64Bytes_","dataURLBytes_","dataURLContentType_","valid","hi","lo","percentEncodedBytes_","hasMinus","hasUnder","invalidChar","hasPlus","hasSlash","string_DataURLParts","rest","contentType","endsWith","end","taskStateFromInternalTaskState","InternalTaskState","RUNNING","PAUSING","CANCELING","TaskState","PAUSED","SUCCESS","ERROR","make","resolver","promise_external_resolve","promise_external_reject","isDef","isJustDef","isFunction","isObject","isNonNullObject","isNonArrayObject","isString","isNumber","isNativeBlob","isNativeBlobDefined","Blob","jsonObjectOrNull","lastIndexOf","canonicalChildPath","component","lastComponent","makeNormalUrl","urlPart","domainBase","apiBaseUrl","makeDownloadUrl","downloadBase","makeUploadUrl","apiUploadBaseUrl","makeQueryString","encode","queryPart","nextPart","noXform_","metadata","xformPath","fullPath","getMappings","mappingsXformPath","xformSize","size","xformTokens","tokens","alt","mappings_","mappings","Mapping","nameMapping","xform","sizeMapping","addRef","authWrapper","generateRef","loc","location_Location","makeStorageReference","fromResource","resource","mapping","local","server","fromResourceString","resourceString","toResourceString","writable","metadataValidator","validate","specs","passed","minArgs","maxArgs","validator","and_","v1","v2","stringSpec","opt_validator","opt_optional","stringValidator","args_ArgSpec","uploadDataSpec","ArrayBuffer","metadataSpec","nonNegativeNumberSpec","looseObjectSpec","nullFunctionSpec","getBlobBuilder","BlobBuilder","WebKitBlobBuilder","getBlob","bb","sliceBlob","blob","webkitSlice","mozSlice","array_contains","elem","array_clone","arraylike","handlerCheck","cndn","metadataHandler","handler","text","sharedErrorHandler","errorHandler","newErr","getStatus","setServerResponseProp","serverResponseProp","objectErrorHandler","shared","getMetadata","fullServerUrl","maxOperationRetryTime","requestInfo","RequestInfo","updateMetadata","Content-Type","deleteObject","successCodes","determineContentType_","metadataForUpload_","opt_metadata","multipartUpload","bucketOnlyServerUrl","X-Goog-Upload-Protocol","boundary","metadataString","preBlobPart","postBlobPart","blob_FbsBlob","maxUploadRetryTime","uploadData","checkResumeHeader_","opt_allowed","getResponseHeader","createResumableUpload","X-Goog-Upload-Command","X-Goog-Upload-Header-Content-Length","X-Goog-Upload-Header-Content-Type","getResumableUploadStatus","sizeString","ResumableUploadStatus","continueResumableUpload","opt_status","opt_progressCallback","uploadStatus","newCurrent","current","bytesToUpload","total","bytesLeft","startByte","endByte","uploadCommand","X-Goog-Upload-Offset","progressCallback","argsToForward","canceled","cancelState","triggerCallback","triggeredCallback","callWithDelay","millis","timeoutId","hitTimeout","waitSeconds","waitMillis","stop","wasTimeout","stopped","addAuthHeader_","addVersionHeader_","number","makeRequest","pool","request_NetworkRequest","additionalRetryCodes","factory","unused","opt_url","service_Service","xhriopool_XhrIoPool","registerStorage","TaskEvent","Storage","reference_Reference","STORAGE_TYPE","ErrorCode","defaultMaxOperationRetryTime","defaultMaxUploadRetryTime","minSafeInteger","code_","message_","serverResponse_","codeProp","codeEquals","serverResponse","BUCKET_NOT_FOUND","PROJECT_NOT_FOUND","INVALID_CHECKSUM","INVALID_EVENT_NAME","NO_DEFAULT_BUCKET","opt_contentType","DataURLParts","STATE_CHANGED","xhrio_network_NetworkXhrIo","NetworkXhrIo","sent_","xhr_","errorCode_","NO_ERROR","sendPromise_","ABORT","NETWORK_ERROR","opt_body","opt_headers","setRequestHeader","getErrorCode","getResponseText","abort","addUploadProgressListener","upload","removeUploadProgressListener","XhrIoPool","createXhrIo","Location","makeFromBucketSpec","bucketString","bucketLocation","makeFromUrl","gsModify","httpModify","gsRegex","gsIndices","httpRegex","httpIndices","groups","regex","indices","postModify","group","captures","exec","bucketValue","pathValue","opt_local","opt_writable","opt_xform","ArgSpec","FbsBlob","opt_elideCopy","blobType","data_","byteLength","size_","type_","realBlob","sliced","buffer","blobby","uint8Arrays","finalLength_1","merged_1","index_1","observer_Observer","Observer","opt_error","opt_complete","UploadTaskSnapshot","bytesTransferred","totalBytes","urls","task_UploadTask","UploadTask","transferred_","needToFetchStatus_","needToFetchMetadata_","observers_","error_","uploadUrl_","request_","chunkMultiplier_","resolve_","reject_","authWrapper_","location_","blob_","metadata_","resumable_","shouldDoResumable_","errorHandler_","completeTransitions_","transition_","metadataErrorHandler_","promise_","makeProgressCallback_","sizeBefore","loaded","updateProgress_","createResumable_","fetchStatus_","fetchMetadata_","continueUpload_","oneShotUpload_","resolveToken_","getAuthToken","createRequest","getPromise","statusRequest","uploadRequest","newStatus","increaseMultiplier_","metadataRequest","multipartRequest","transferred","old","notifyObservers_","wasPaused","externalState","completed","typeValidator","_p","nextOrObserverValidator","nextValidator","observerValidator","nextOrObserverMessage","makeBinder","binder","addObserver_","removeObserver_","binderNextOrObserverValidator","binderSpecs","notifyObserver_","finishPromise_","triggered","pause","newRef","newPath","throwIfRoot_","putString","getDownloadURL","failrequest_FailRequest","FailRequest","appDelete","requestmap_RequestMap","RequestMap","map_","id_","addRequest","unmap","authwrapper_AuthWrapper","AuthWrapper","maker","requestMaker","bucket_","deleted_","extractBucket_","storageRefMaker_","requestMaker_","pool_","service_","maxOperationRetryTime_","maxUploadRetryTime_","requestMap_","config","_error","deleteApp","setMaxUploadRetryTime","setMaxOperationRetryTime","NetworkRequest","errorCallback","pendingXhr_","backoffId_","canceled_","appDelete_","url_","method_","headers_","body_","successCodes_","additionalRetryCodes_","errorCallback_","progressCallback_","timeout_","doTheRequest","backoffCallback","progressListener","progressEvent","lengthComputable","RequestEndStatus","hitServer","isRetryStatusCode_","wasCanceled","successCode","backoffDone","requestWentThrough","wasSuccessCode","isFiveHundredCode","extraRetryCodes","isExtraRetryCode","isRequestSpecificRetryCode","opt_canceled","Service","authWrapperBucket","internals_","service_ServiceInternals","ServiceInternals"],"mappings":"AAAA,GAAIA,UAAW,WACH,GAAIC,OAA2B,KAAXA,EAAyBC,KAAOD,CACtD,OAAgB,UAAUE,GCqCpC,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAA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GAAA,GAAAD,eACAC,GAAAC,MAAAX,UAAA,SAAAK,GAEAf,EADAe,EAAAzK,OAIAyJ,EAAA,SAAA9C,GACAmE,EAAAE,MAAAhB,YAAArD,OA2CKiD,GAAA,sBAAAA,GAAApS,cAAA,UAvCL,WACA,GAAAyT,GAAArB,EAAAsB,eACAzB,GAAA,SAAA9C,GAGA,GAAAnQ,GAAAoT,EAAApS,cAAA,SACAhB,GAAA2U,mBAAA,WACAzB,EAAA/C,GACAnQ,EAAA2U,mBAAA,KACAF,EAAAG,YAAA5U,GACAA,EAAA,MAEAyU,EAAAhT,YAAAzB,OAIA,WACAiT,EAAA,SAAA9C,GACA3O,WAAA0R,EAAA,EAAA/C,OA8BAkD,EAAAzD,eACAyD,EAAAP,mBACC,mBAAA1U,UAAA,KAAAyN,EAAA5I,KAAA4I,EAAAzN,Qd6oD4BS,KAAKJ,EAASH,EAAoB,IAAKA,EAAoB,WAIzEuW;;Ae10Df;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;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;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;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;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;ACjSA,IACUC,sBAAsB,IAE1B,SAAUpW,EAAQkE,EAAqBtE,GAE7C,YAC+BA,GAAoBsD,EAAEgB,EAAqB,IAAK,WAAa,MAAOmS,KACpEzW,EAAoBsD,EAAEgB,EAAqB,IAAK,WAAa,MAAOoS,ICOjG,IAAAC,GAAA3W,EAAA,GASiByW,EAAG,SAAkBG,EAAS/L,GAC5C,IAAY+L,EACb,KAAoBF,GACtB7L,IAQyB6L,EAAG,SAAgB7L,GACtC,MAAU7I,OACO,sBACV2U,EAAA,EAAYjP,YACO,6BAGlCmD,KDKM,SAAUzK,EAAQkE,EAAqBtE,GAE7C,YACAkB,QAAOwC,eAAeY,EAAqB,cAAgB8D,OAAO,GEnChE,IAAAyO,GAAA7W,EAAA,IAIqB8W,EAAG,SA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S,IAAap9E,WACrE,GAAawkF,IAAKzmF,KAAa4sF,EACxCljC,IAEAntD,OAAAwC,eAAIm1F,EAAA13F,UAAkB,sBjC+rGhB0C,IiC/rGN,WACQ,MAAKc,MAAa4sF,EAC1B1J,sBjCgsGMjkF,YAAY,EACZD,ciCjsGL,IAEDk1F,EAAA13F,UAAqBu1F,sBAArB,SAAkCz1E,GAC5B0iE,GACqB,yBAClBiB,MAELh+E,WACEjC,KAAa4sF,EAAsBmF,sBACzCz1E,IAEA/f,OAAAwC,eAAIm1F,EAAA13F,UAAqB,yBjC6rGnB0C,IiC7rGN,WACQ,MAAKc,MAAa4sF,EAC1B5K,yBjC8rGM/iF,YAAY,EACZD,ciC/rGL,IAEDk1F,EAAA13F,UAAwBw1F,yBAAxB,SAAqC11E,GAC/B0iE,GACwB,4BACrBiB,MAELh+E,WACEjC,KAAa4sF,EAAyBoF,yBAC5C11E,IAEA/f,OAAAwC,eAAIm1F,EAAA13F,UAAG,OjC2rGD0C,IiC3rGN,WACQ,MAAKc,MACbigD,IjC4rGMhhD,YAAY,EACZD,ciC7rGL,IAEDzC,OAAAwC,eAAIm1F,EAAA13F,UAAQ,YjC8rGN0C,IiC9rGN,WACQ,MAAKc,MACbo0F,IjC+rGMn1F,YAAY,EACZD,ciChsGL,IACFk1F,KAKDG,GAAA,WAGE,QAAAC,GAA4BrvF,GACtBjF,KAASwxF,GACfvsF,EAUF,MAJEqvF,GAAA93F,UAAMkI,OAAN,WAEQ,MADF1E,MAASwxF,GAAa5E,EAAakF,YAClB7W,MACvB39E,KACDg3F,IjCmsGgC30F,GAAqC,gBAAI2mF,EkBh1GxE,IAYgBI,IAAa,SAyBhBJ,IArCbjrF,EAAA,GAqCwB,YlB21GvB,KACS,MAAMqE,GACN,KAAUrC,OACR","file":"firebase.js","sourcesContent":["var firebase = (function() {\n var window = typeof window === 'undefined' ? self : window;\n return /******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonpFirebase\"];\n/******/ \twindow[\"webpackJsonpFirebase\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId]) {\n/******/ \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n/******/ \t\t\t}\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n/******/ \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n/******/ \t\twhile(resolves.length) {\n/******/ \t\t\tresolves.shift()();\n/******/ \t\t}\n/******/ \t\tif(executeModules) {\n/******/ \t\t\tfor(i=0; i < executeModules.length; i++) {\n/******/ \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\treturn result;\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// objects to store loaded and loading chunks\n/******/ \tvar installedChunks = {\n/******/ \t\t3: 0\n/******/ \t};\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/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\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.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId) {\n/******/ \t\tvar installedChunkData = installedChunks[chunkId];\n/******/ \t\tif(installedChunkData === 0) {\n/******/ \t\t\treturn new Promise(function(resolve) { resolve(); });\n/******/ \t\t}\n/******/\n/******/ \t\t// a Promise means \"currently loading\".\n/******/ \t\tif(installedChunkData) {\n/******/ \t\t\treturn installedChunkData[2];\n/******/ \t\t}\n/******/\n/******/ \t\t// setup Promise in chunk cache\n/******/ \t\tvar promise = new Promise(function(resolve, reject) {\n/******/ \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n/******/ \t\t});\n/******/ \t\tinstalledChunkData[2] = promise;\n/******/\n/******/ \t\t// start chunk loading\n/******/ \t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\tvar script = document.createElement('script');\n/******/ \t\tscript.type = 'text/javascript';\n/******/ \t\tscript.charset = 'utf-8';\n/******/ \t\tscript.async = true;\n/******/ \t\tscript.timeout = 120000;\n/******/\n/******/ \t\tif (__webpack_require__.nc) {\n/******/ \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n/******/ \t\t}\n/******/ \t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".js\";\n/******/ \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n/******/ \t\tscript.onerror = script.onload = onScriptComplete;\n/******/ \t\tfunction onScriptComplete() {\n/******/ \t\t\t// avoid mem leaks in IE.\n/******/ \t\t\tscript.onerror = script.onload = null;\n/******/ \t\t\tclearTimeout(timeout);\n/******/ \t\t\tvar chunk = installedChunks[chunkId];\n/******/ \t\t\tif(chunk !== 0) {\n/******/ \t\t\t\tif(chunk) {\n/******/ \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n/******/ \t\t\t\t}\n/******/ \t\t\t\tinstalledChunks[chunkId] = undefined;\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\thead.appendChild(script);\n/******/\n/******/ \t\treturn promise;\n/******/ \t};\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// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// on error function for async loading\n/******/ \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return PromiseImpl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Deferred; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return attachDummyErrorHandler; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_globalScope__ = __webpack_require__(14);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\nvar PromiseImpl = __WEBPACK_IMPORTED_MODULE_0__utils_globalScope__[\"a\" /* globalScope */].Promise || __webpack_require__(20);\n/**\r\n * A deferred promise implementation.\r\n */\nvar Deferred = function () {\n /** @constructor */\n function Deferred() {\n var self = this;\n this.resolve = null;\n this.reject = null;\n this.promise = new PromiseImpl(function (resolve, reject) {\n self.resolve = resolve;\n self.reject = reject;\n });\n }\n /**\r\n * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around\r\n * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n * @param {((?function(?(Error)): (?|undefined))| (?function(?(Error),?=): (?|undefined)))=} opt_nodeCallback\r\n * @return {!function(?(Error), ?=)}\r\n */\n Deferred.prototype.wrapCallback = function (opt_nodeCallback) {\n var self = this;\n /**\r\n * @param {?Error} error\r\n * @param {?=} opt_value\r\n */\n function meta(error, opt_value) {\n if (error) {\n self.reject(error);\n } else {\n self.resolve(opt_value);\n }\n if (typeof opt_nodeCallback === 'function') {\n attachDummyErrorHandler(self.promise);\n // Some of our callbacks don't expect a value and our own tests\n // assert that the parameter length is 1\n if (opt_nodeCallback.length === 1) {\n opt_nodeCallback(error);\n } else {\n opt_nodeCallback(error, opt_value);\n }\n }\n }\n return meta;\n };\n return Deferred;\n}();\n\n/**\r\n * Chrome (and maybe other browsers) report an Error in the console if you reject a promise\r\n * and nobody handles the error. This is normally a good thing, but this will confuse devs who\r\n * never intended to use promises in the first place. So in some cases (in particular, if the\r\n * developer attached a callback), we should attach a dummy resolver to the promise to suppress\r\n * this error.\r\n *\r\n * Note: We can't do this all the time, since it breaks the Promise spec (though in the obscure\r\n * 3.3.3 section related to upgrading non-compliant promises).\r\n * @param {!firebase.Promise} promise\r\n */\nvar attachDummyErrorHandler = function attachDummyErrorHandler(promise) {\n promise.catch(function () {});\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// CONCATENATED MODULE: ./src/app/firebase_app.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__subscribe__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__errors__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_promise__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__ = __webpack_require__(17);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\nvar contains = function contains(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\n// An array to capture listeners before the true auth functions\n// exist\nvar tokenListeners = [];\n/**\r\n * Global context object for a collection of services using\r\n * a shared authentication state.\r\n */\nvar FirebaseAppImpl = function () {\n function FirebaseAppImpl(options, name, firebase_) {\n this.firebase_ = firebase_;\n this.isDeleted_ = false;\n this.services_ = {};\n this.name_ = name;\n this.options_ = Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"a\" /* deepCopy */])(options);\n this.INTERNAL = {\n getUid: function getUid() {\n return null;\n },\n getToken: function getToken() {\n return __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */].resolve(null);\n },\n addAuthTokenListener: function addAuthTokenListener(callback) {\n tokenListeners.push(callback);\n // Make sure callback is called, asynchronously, in the absence of the auth module\n setTimeout(function () {\n return callback(null);\n }, 0);\n },\n removeAuthTokenListener: function removeAuthTokenListener(callback) {\n tokenListeners = tokenListeners.filter(function (listener) {\n return listener !== callback;\n });\n }\n };\n }\n Object.defineProperty(FirebaseAppImpl.prototype, \"name\", {\n get: function get() {\n this.checkDestroyed_();\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"options\", {\n get: function get() {\n this.checkDestroyed_();\n return this.options_;\n },\n enumerable: true,\n configurable: true\n });\n FirebaseAppImpl.prototype.delete = function () {\n var _this = this;\n return new __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */](function (resolve) {\n _this.checkDestroyed_();\n resolve();\n }).then(function () {\n _this.firebase_.INTERNAL.removeApp(_this.name_);\n var services = [];\n Object.keys(_this.services_).forEach(function (serviceKey) {\n Object.keys(_this.services_[serviceKey]).forEach(function (instanceKey) {\n services.push(_this.services_[serviceKey][instanceKey]);\n });\n });\n return __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */].all(services.map(function (service) {\n return service.INTERNAL.delete();\n }));\n }).then(function () {\n _this.isDeleted_ = true;\n _this.services_ = {};\n });\n };\n /**\r\n * Return a service instance associated with this app (creating it\r\n * on demand), identified by the passed instanceIdentifier.\r\n *\r\n * NOTE: Currently storage is the only one that is leveraging this\r\n * functionality. They invoke it by calling:\r\n *\r\n * ```javascript\r\n * firebase.app().storage('STORAGE BUCKET ID')\r\n * ```\r\n *\r\n * The service name is passed to this already\r\n * @internal\r\n */\n FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) {\n if (instanceIdentifier === void 0) {\n instanceIdentifier = DEFAULT_ENTRY_NAME;\n }\n this.checkDestroyed_();\n if (!this.services_[name]) {\n this.services_[name] = {};\n }\n if (!this.services_[name][instanceIdentifier]) {\n /**\r\n * If a custom instance has been defined (i.e. not '[DEFAULT]')\r\n * then we will pass that instance on, otherwise we pass `null`\r\n */\n var instanceSpecifier = instanceIdentifier !== DEFAULT_ENTRY_NAME ? instanceIdentifier : undefined;\n var service = this.firebase_.INTERNAL.factories[name](this, this.extendApp.bind(this), instanceSpecifier);\n this.services_[name][instanceIdentifier] = service;\n }\n return this.services_[name][instanceIdentifier];\n };\n /**\r\n * Callback function used to extend an App instance at the time\r\n * of service instance creation.\r\n */\n FirebaseAppImpl.prototype.extendApp = function (props) {\n var _this = this;\n // Copy the object onto the FirebaseAppImpl prototype\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */])(this, props);\n /**\r\n * If the app has overwritten the addAuthTokenListener stub, forward\r\n * the active token listeners on to the true fxn.\r\n *\r\n * TODO: This function is required due to our current module\r\n * structure. Once we are able to rely strictly upon a single module\r\n * implementation, this code should be refactored and Auth should\r\n * provide these stubs and the upgrade logic\r\n */\n if (props.INTERNAL && props.INTERNAL.addAuthTokenListener) {\n tokenListeners.forEach(function (listener) {\n _this.INTERNAL.addAuthTokenListener(listener);\n });\n tokenListeners = [];\n }\n };\n /**\r\n * This function will throw an Error if the App has already been deleted -\r\n * use before performing API actions on the App.\r\n */\n FirebaseAppImpl.prototype.checkDestroyed_ = function () {\n if (this.isDeleted_) {\n error('app-deleted', { name: this.name_ });\n }\n };\n return FirebaseAppImpl;\n}();\n// Prevent dead-code elimination of these methods w/o invalid property\n// copying.\nFirebaseAppImpl.prototype.name && FirebaseAppImpl.prototype.options || FirebaseAppImpl.prototype.delete || console.log('dc');\n/**\r\n * Return a firebase namespace object.\r\n *\r\n * In production, this will be called exactly once and the result\r\n * assigned to the 'firebase' global. It may be called multiple times\r\n * in unit tests.\r\n */\nfunction createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */],\n SDK_VERSION: '4.2.0',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__subscribe__[\"a\" /* createSubscribe */],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_1__errors__[\"a\" /* ErrorFactory */],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: __WEBPACK_IMPORTED_MODULE_2__utils_promise__[\"b\" /* PromiseImpl */],\n deepExtend: __WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"c\" /* patchProperty */])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"c\" /* patchProperty */])(app, 'App', FirebaseAppImpl);\n /**\r\n * Create a new App instance (name must be unique).\r\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_deep_copy__[\"b\" /* deepExtend */])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}\nfunction error(code, args) {\n throw appErrors.create(code, args);\n}\n// TypeScript does not support non-string indexes!\n// let errors: {[code: AppError: string} = {\nvar errors = {\n 'no-app': \"No Firebase App '{$name}' has been created - \" + 'call Firebase App.initializeApp()',\n 'bad-app-name': \"Illegal App name: '{$name}\",\n 'duplicate-app': \"Firebase App named '{$name}' already exists\",\n 'app-deleted': \"Firebase App named '{$name}' already deleted\",\n 'duplicate-service': \"Firebase service named '{$name}' already registered\",\n 'sa-not-supported': 'Initializing the Firebase SDK with a service ' + 'account is only allowed in a Node.js environment. On client ' + 'devices, you should instead initialize the SDK with an api key and ' + 'auth domain',\n 'invalid-app-argument': 'firebase.{$name}() takes either no argument or a ' + 'Firebase App instance.'\n};\nvar appErrors = new __WEBPACK_IMPORTED_MODULE_1__errors__[\"a\" /* ErrorFactory */]('app', 'Firebase', errors);\n// CONCATENATED MODULE: ./src/app.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_shims__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_shims___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__utils_shims__);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n// Import the needed shims\n\n// Import the createFirebaseNamespace function\n\n// Export a single instance of firebase app\nvar firebase = createFirebaseNamespace();\n/* harmony default export */ __webpack_exports__[\"default\"] = (firebase);\n\n/***/ }),\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */,\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export patchCapture */\n/* unused harmony export FirebaseError */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ErrorFactory; });\nvar ERROR_NAME = 'FirebaseError';\nvar captureStackTrace = Error.captureStackTrace;\n// Export for faking in tests\nfunction patchCapture(captureFake) {\n var result = captureStackTrace;\n captureStackTrace = captureFake;\n return result;\n}\nvar FirebaseError = function () {\n function FirebaseError(code, message) {\n this.code = code;\n this.message = message;\n var stack;\n // We want the stack value, if implemented by Error\n if (captureStackTrace) {\n // Patches this.stack, omitted calls above ErrorFactory#create\n captureStackTrace(this, ErrorFactory.prototype.create);\n } else {\n var err_1 = Error.apply(this, arguments);\n this.name = ERROR_NAME;\n // Make non-enumerable getter for the property.\n Object.defineProperty(this, 'stack', {\n get: function get() {\n return err_1.stack;\n }\n });\n }\n }\n return FirebaseError;\n}();\n\n// Back-door inheritance\nFirebaseError.prototype = Object.create(Error.prototype);\nFirebaseError.prototype.constructor = FirebaseError;\nFirebaseError.prototype.name = ERROR_NAME;\nvar ErrorFactory = function () {\n function ErrorFactory(service, serviceName, errors) {\n this.service = service;\n this.serviceName = serviceName;\n this.errors = errors;\n // Matches {$name}, by default.\n this.pattern = /\\{\\$([^}]+)}/g;\n // empty\n }\n ErrorFactory.prototype.create = function (code, data) {\n if (data === undefined) {\n data = {};\n }\n var template = this.errors[code];\n var fullCode = this.service + '/' + code;\n var message;\n if (template === undefined) {\n message = 'Error';\n } else {\n message = template.replace(this.pattern, function (match, key) {\n var value = data[key];\n return value !== undefined ? value.toString() : '<' + key + '?>';\n });\n }\n // Service: Error message (service/code).\n message = this.serviceName + ': ' + message + ' (' + fullCode + ').';\n var err = new FirebaseError(fullCode, message);\n // Populate the Error object with message parts for programmatic\n // accesses (e.g., e.file).\n for (var prop in data) {\n if (!data.hasOwnProperty(prop) || prop.slice(-1) === '_') {\n continue;\n }\n err[prop] = data[prop];\n }\n return err;\n };\n return ErrorFactory;\n}();\n\n\n/***/ }),\n/* 11 */,\n/* 12 */,\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createSubscribe;\n/* unused harmony export async */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_promise__ = __webpack_require__(4);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\nfunction createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\nvar ObserverProxy = function () {\n /**\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\n function ObserverProxy(executor, onNoObservers) {\n var _this = this;\n this.observers = [];\n this.unsubscribes = [];\n this.observerCount = 0;\n // Micro-task scheduling by calling task.then().\n this.task = __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].resolve();\n this.finalized = false;\n this.onNoObservers = onNoObservers;\n // Call the executor asynchronously so subscribers that are called\n // synchronously after the creation of the subscribe function\n // can still receive the very first value generated in the executor.\n this.task.then(function () {\n executor(_this);\n }).catch(function (e) {\n _this.error(e);\n });\n }\n ObserverProxy.prototype.next = function (value) {\n this.forEachObserver(function (observer) {\n observer.next(value);\n });\n };\n ObserverProxy.prototype.error = function (error) {\n this.forEachObserver(function (observer) {\n observer.error(error);\n });\n this.close(error);\n };\n ObserverProxy.prototype.complete = function () {\n this.forEachObserver(function (observer) {\n observer.complete();\n });\n this.close();\n };\n /**\r\n * Subscribe function that can be used to add an Observer to the fan-out list.\r\n *\r\n * - We require that no event is sent to a subscriber sychronously to their\r\n * call to subscribe().\r\n */\n ObserverProxy.prototype.subscribe = function (nextOrObserver, error, complete) {\n var _this = this;\n var observer;\n if (nextOrObserver === undefined && error === undefined && complete === undefined) {\n throw new Error('Missing Observer.');\n }\n // Assemble an Observer object when passed as callback functions.\n if (implementsAnyMethods(nextOrObserver, ['next', 'error', 'complete'])) {\n observer = nextOrObserver;\n } else {\n observer = {\n next: nextOrObserver,\n error: error,\n complete: complete\n };\n }\n if (observer.next === undefined) {\n observer.next = noop;\n }\n if (observer.error === undefined) {\n observer.error = noop;\n }\n if (observer.complete === undefined) {\n observer.complete = noop;\n }\n var unsub = this.unsubscribeOne.bind(this, this.observers.length);\n // Attempt to subscribe to a terminated Observable - we\n // just respond to the Observer with the final error or complete\n // event.\n if (this.finalized) {\n this.task.then(function () {\n try {\n if (_this.finalError) {\n observer.error(_this.finalError);\n } else {\n observer.complete();\n }\n } catch (e) {\n // nothing\n }\n return;\n });\n }\n this.observers.push(observer);\n return unsub;\n };\n // Unsubscribe is synchronous - we guarantee that no events are sent to\n // any unsubscribed Observer.\n ObserverProxy.prototype.unsubscribeOne = function (i) {\n if (this.observers === undefined || this.observers[i] === undefined) {\n return;\n }\n delete this.observers[i];\n this.observerCount -= 1;\n if (this.observerCount === 0 && this.onNoObservers !== undefined) {\n this.onNoObservers(this);\n }\n };\n ObserverProxy.prototype.forEachObserver = function (fn) {\n if (this.finalized) {\n // Already closed by previous event....just eat the additional values.\n return;\n }\n // Since sendOne calls asynchronously - there is no chance that\n // this.observers will become undefined.\n for (var i = 0; i < this.observers.length; i++) {\n this.sendOne(i, fn);\n }\n };\n // Call the Observer via one of it's callback function. We are careful to\n // confirm that the observe has not been unsubscribed since this asynchronous\n // function had been queued.\n ObserverProxy.prototype.sendOne = function (i, fn) {\n var _this = this;\n // Execute the callback asynchronously\n this.task.then(function () {\n if (_this.observers !== undefined && _this.observers[i] !== undefined) {\n try {\n fn(_this.observers[i]);\n } catch (e) {\n // Ignore exceptions raised in Observers or missing methods of an\n // Observer.\n // Log error to console. b/31404806\n if (typeof console !== 'undefined' && console.error) {\n console.error(e);\n }\n }\n }\n });\n };\n ObserverProxy.prototype.close = function (err) {\n var _this = this;\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n if (err !== undefined) {\n this.finalError = err;\n }\n // Proxy is no longer needed - garbage collect references\n this.task.then(function () {\n _this.observers = undefined;\n _this.onNoObservers = undefined;\n });\n };\n return ObserverProxy;\n}();\n/** Turn synchronous function into one called asynchronously. */\nfunction async(fn, onError) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\nfunction implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}\nfunction noop() {\n // do nothing\n}\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return globalScope; });\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar scope;\nif (typeof global !== 'undefined') {\n scope = global;\n} else if (typeof self !== 'undefined') {\n scope = self;\n} else {\n try {\n scope = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n}\nvar globalScope = scope;\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(15)))\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = deepCopy;\n/* harmony export (immutable) */ __webpack_exports__[\"b\"] = deepExtend;\n/* harmony export (immutable) */ __webpack_exports__[\"c\"] = patchProperty;\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\nfunction deepCopy(value) {\n return deepExtend(undefined, value);\n}\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays). Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n */\nfunction deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n case Object:\n if (target === undefined) {\n target = {};\n }\n break;\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n for (var prop in source) {\n if (!source.hasOwnProperty(prop)) {\n continue;\n }\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n return target;\n}\n// TODO: Really needed (for JSCompiler type checking)?\nfunction patchProperty(obj, prop, value) {\n obj[prop] = value;\n}\n\n/***/ }),\n/* 18 */,\n/* 19 */\n/***/ (function(module, exports) {\n\n/**\r\n * This is the Array.prototype.findIndex polyfill from MDN\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\r\n * https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\r\n */\nif (!Array.prototype.findIndex) {\n Object.defineProperty(Array.prototype, 'findIndex', {\n value: function value(predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n var o = Object(this);\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n var len = o.length >>> 0;\n // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n var thisArg = arguments[1];\n // 5. Let k be 0.\n var k = 0;\n // 6. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return k.\n var kValue = o[k];\n if (predicate.call(thisArg, kValue, k, o)) {\n return k;\n }\n // e. Increase k by 1.\n k++;\n }\n // 7. Return -1.\n return -1;\n }\n });\n}\n/**\r\n * This is the Array.prototype.find polyfill from MDN\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\r\n * https://tc39.github.io/ecma262/#sec-array.prototype.find\r\n */\nif (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, 'find', {\n value: function value(predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n var o = Object(this);\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n var len = o.length >>> 0;\n // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n var thisArg = arguments[1];\n // 5. Let k be 0.\n var k = 0;\n // 6. Repeat, while k < len\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return kValue.\n var kValue = o[k];\n if (predicate.call(thisArg, kValue, k, o)) {\n return kValue;\n }\n // e. Increase k by 1.\n k++;\n }\n // 7. Return undefined.\n return undefined;\n }\n });\n}\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(setImmediate) {(function (root) {\n\n // Store setTimeout reference so promise-polyfill will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var setTimeoutFunc = setTimeout;\n\n function noop() {}\n \n // Polyfill for Function.prototype.bind\n function bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n }\n\n function Promise(fn) {\n if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n\n doResolve(fn, this);\n }\n\n function handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n }\n\n function resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n }\n\n function reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n }\n\n function finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n }\n\n function Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n }\n\n /**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\n function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }\n\n Promise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n };\n\n Promise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new (this.constructor)(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n };\n\n Promise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n };\n\n Promise.resolve = function (value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function (resolve) {\n resolve(value);\n });\n };\n\n Promise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n };\n\n Promise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n };\n\n // Use polyfill for setImmediate for performance gains\n Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\n function (fn) {\n setTimeoutFunc(fn, 0);\n };\n\n Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n };\n\n /**\n * Set the immediate function to execute callbacks\n * @param fn {function} Function to execute\n * @deprecated\n */\n Promise._setImmediateFn = function _setImmediateFn(fn) {\n Promise._immediateFn = fn;\n };\n\n /**\n * Change the function to execute on unhandled rejection\n * @param {function} fn Function to execute on unhandled rejection\n * @deprecated\n */\n Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n Promise._unhandledRejectionFn = fn;\n };\n \n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Promise;\n } else if (!root.Promise) {\n root.Promise = Promise;\n }\n\n})(this);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21).setImmediate))\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(22);\nexports.setImmediate = setImmediate;\nexports.clearImmediate = clearImmediate;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a ';\n }\n var iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n } catch (e) {\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])('frame writing exception');\n if (e.stack) {\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])(e.stack);\n }\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])(e);\n }\n } else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n /**\r\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\r\n * actually use.\r\n * @private\r\n * @return {Element}\r\n */\n FirebaseIFrameScriptHolder.createIFrame_ = function () {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n var a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])('No IE domain setting required');\n }\n } catch (e) {\n var domain = document.domain;\n iframe.src = \"javascript:void((function(){document.open();document.domain='\" + domain + \"';document.close();})())\";\n }\n } else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n iframe.doc = iframe.contentDocument; // Firefox, Opera, Safari\n } else if (iframe.contentWindow) {\n iframe.doc = iframe.contentWindow.document; // Internet Explorer\n } else if (iframe.document) {\n iframe.doc = iframe.document; //others?\n }\n return iframe;\n };\n /**\r\n * Cancel all outstanding queries and remove the frame.\r\n */\n FirebaseIFrameScriptHolder.prototype.close = function () {\n var _this = this;\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(function () {\n if (_this.myIFrame !== null) {\n document.body.removeChild(_this.myIFrame);\n _this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_environment__[\"b\" /* isNodeSdk */])() && this.myID) {\n var urlParams = {};\n urlParams[FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n var theURL = this.urlFn(urlParams);\n FirebaseIFrameScriptHolder.nodeRestRequest(theURL);\n }\n // Protect from being called recursively.\n var onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n };\n /**\r\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\r\n * @param {!string} id - The ID of this connection\r\n * @param {!string} pw - The password for this connection\r\n */\n FirebaseIFrameScriptHolder.prototype.startLongPoll = function (id, pw) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) {}\n };\n /**\r\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\r\n * too many outstanding requests and we are still alive.\r\n *\r\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\r\n * needed.\r\n */\n FirebaseIFrameScriptHolder.prototype.newRequest_ = function () {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (this.alive && this.sendNewPolls && this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)) {\n //construct our url\n this.currentSerial++;\n var urlParams = {};\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n var theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n var curDataString = '';\n var i = 0;\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n var nextSeg = this.pendingSegs[0];\n if (nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <= MAX_URL_DATA_SIZE) {\n //great, the segment will fit. Lets append it.\n var theSeg = this.pendingSegs.shift();\n curDataString = curDataString + '&' + FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM + i + '=' + theSeg.seg + '&' + FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET + i + '=' + theSeg.ts + '&' + FIREBASE_LONGPOLL_DATA_PARAM + i + '=' + theSeg.d;\n i++;\n } else {\n break;\n }\n }\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n return true;\n } else {\n return false;\n }\n };\n /**\r\n * Queue a packet for transmission to the server.\r\n * @param segnum - A sequential id for this packet segment used for reassembly\r\n * @param totalsegs - The total number of segments in this packet\r\n * @param data - The data for this segment.\r\n */\n FirebaseIFrameScriptHolder.prototype.enqueueSegment = function (segnum, totalsegs, data) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n };\n /**\r\n * Add a script tag for a regular long-poll request.\r\n * @param {!string} url - The URL of the script tag.\r\n * @param {!number} serial - The serial number of the request.\r\n * @private\r\n */\n FirebaseIFrameScriptHolder.prototype.addLongPollTag_ = function (url, serial) {\n var _this = this;\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n var doNewRequest = function doNewRequest() {\n _this.outstandingRequests.remove(serial);\n _this.newRequest_();\n };\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n var keepaliveTimeout = setTimeout(doNewRequest, Math.floor(KEEPALIVE_REQUEST_INTERVAL));\n var readyStateCB = function readyStateCB() {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n this.addTag(url, readyStateCB);\n };\n /**\r\n * Add an arbitrary script tag to the iframe.\r\n * @param {!string} url - The URL for the script tag source.\r\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\r\n */\n FirebaseIFrameScriptHolder.prototype.addTag = function (url, loadCB) {\n var _this = this;\n if (Object(__WEBPACK_IMPORTED_MODULE_6__utils_environment__[\"b\" /* isNodeSdk */])()) {\n this.doNodeLongPoll(url, loadCB);\n } else {\n setTimeout(function () {\n try {\n // if we're already closed, don't add this poll\n if (!_this.sendNewPolls) return;\n var newScript_1 = _this.myIFrame.doc.createElement('script');\n newScript_1.type = 'text/javascript';\n newScript_1.async = true;\n newScript_1.src = url;\n newScript_1.onload = newScript_1.onreadystatechange = function () {\n var rstate = newScript_1.readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript_1.onload = newScript_1.onreadystatechange = null;\n if (newScript_1.parentNode) {\n newScript_1.parentNode.removeChild(newScript_1);\n }\n loadCB();\n }\n };\n newScript_1.onerror = function () {\n Object(BrowserPollConnection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"s\" /* log */])('Long-poll script failed to load: ' + url);\n _this.sendNewPolls = false;\n _this.close();\n };\n _this.myIFrame.doc.body.appendChild(newScript_1);\n } catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n };\n return FirebaseIFrameScriptHolder;\n}();\n\n// CONCATENATED MODULE: ./src/database/realtime/TransportManager.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__ = __webpack_require__(18);\n/* harmony import */ var TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__ = __webpack_require__(1);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n/**\r\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\r\n * lifecycle.\r\n *\r\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\r\n * they are available.\r\n * @constructor\r\n */\nvar TransportManager_TransportManager = function () {\n /**\r\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\r\n */\n function TransportManager(repoInfo) {\n this.initTransports_(repoInfo);\n }\n Object.defineProperty(TransportManager, \"ALL_TRANSPORTS\", {\n /**\r\n * @const\r\n * @type {!Array.}\r\n */\n get: function get() {\n return [BrowserPollConnection_BrowserPollConnection, __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */]];\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @param {!RepoInfo} repoInfo\r\n * @private\r\n */\n TransportManager.prototype.initTransports_ = function (repoInfo) {\n var isWebSocketsAvailable = __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */] && __WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */]['isAvailable']();\n var isSkipPollConnection = isWebSocketsAvailable && !__WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */].previouslyFailed();\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable) Object(TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__[\"B\" /* warn */])(\"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\");\n isSkipPollConnection = true;\n }\n if (isSkipPollConnection) {\n this.transports_ = [__WEBPACK_IMPORTED_MODULE_1__WebSocketConnection__[\"a\" /* WebSocketConnection */]];\n } else {\n var transports_1 = this.transports_ = [];\n Object(TransportManager___WEBPACK_IMPORTED_MODULE_2__core_util_util__[\"i\" /* each */])(TransportManager.ALL_TRANSPORTS, function (i, transport) {\n if (transport && transport['isAvailable']()) {\n transports_1.push(transport);\n }\n });\n }\n };\n /**\r\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\r\n * initial transport to use\r\n */\n TransportManager.prototype.initialTransport = function () {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n } else {\n throw new Error('No transports available');\n }\n };\n /**\r\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\r\n * transport, or null\r\n */\n TransportManager.prototype.upgradeTransport = function () {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n } else {\n return null;\n }\n };\n return TransportManager;\n}();\n\n// CONCATENATED MODULE: ./src/database/realtime/Connection.ts\n/* harmony import */ var Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_storage_storage__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants__ = __webpack_require__(9);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n// Abort upgrade attempt if it takes longer than 60s.\nvar UPGRADE_TIMEOUT = 60000;\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nvar DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nvar BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nvar BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\nvar MESSAGE_TYPE = 't';\nvar MESSAGE_DATA = 'd';\nvar CONTROL_SHUTDOWN = 's';\nvar CONTROL_RESET = 'r';\nvar CONTROL_ERROR = 'e';\nvar CONTROL_PONG = 'o';\nvar SWITCH_ACK = 'a';\nvar END_TRANSMISSION = 'n';\nvar PING = 'p';\nvar SERVER_HELLO = 'h';\n/**\r\n * Creates a new real-time connection to the server using whichever method works\r\n * best in the current browser.\r\n *\r\n * @constructor\r\n */\nvar Connection_Connection = function () {\n /**\r\n * @param {!string} id - an id for this connection\r\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\r\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\r\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\r\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\r\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\r\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\r\n */\n function Connection(id, repoInfo_, onMessage_, onReady_, onDisconnect_, onKill_, lastSessionId) {\n this.id = id;\n this.repoInfo_ = repoInfo_;\n this.onMessage_ = onMessage_;\n this.onReady_ = onReady_;\n this.onDisconnect_ = onDisconnect_;\n this.onKill_ = onKill_;\n this.lastSessionId = lastSessionId;\n this.connectionCount = 0;\n this.pendingDataMessages = [];\n this.state_ = 0 /* CONNECTING */;\n this.log_ = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"t\" /* logWrapper */])('c:' + this.id + ':');\n this.transportManager_ = new TransportManager_TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n /**\r\n * Starts a connection attempt\r\n * @private\r\n */\n Connection.prototype.start_ = function () {\n var _this = this;\n var conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(this.nextTransportId_(), this.repoInfo_, undefined, this.lastSessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessageReceived = this.connReceiver_(this.conn_);\n var onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n /*\r\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\r\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\r\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\r\n * still have the context of your originating frame.\r\n */\n setTimeout(function () {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n _this.conn_ && _this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n var healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"x\" /* setTimeoutNonBlocking */])(function () {\n _this.healthyTimeout_ = null;\n if (!_this.isHealthy_) {\n if (_this.conn_ && _this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has received ' + _this.conn_.bytesReceived + ' bytes. Marking connection healthy.');\n _this.isHealthy_ = true;\n _this.conn_.markConnectionHealthy();\n } else if (_this.conn_ && _this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has sent ' + _this.conn_.bytesSent + ' bytes. Leaving connection alive.');\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n } else {\n _this.log_('Closing unhealthy connection after timeout.');\n _this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms));\n }\n };\n /**\r\n * @return {!string}\r\n * @private\r\n */\n Connection.prototype.nextTransportId_ = function () {\n return 'c:' + this.id + ':' + this.connectionCount++;\n };\n Connection.prototype.disconnReceiver_ = function (conn) {\n var _this = this;\n return function (everConnected) {\n if (conn === _this.conn_) {\n _this.onConnectionLost_(everConnected);\n } else if (conn === _this.secondaryConn_) {\n _this.log_('Secondary connection lost.');\n _this.onSecondaryConnectionLost_();\n } else {\n _this.log_('closing an old connection');\n }\n };\n };\n Connection.prototype.connReceiver_ = function (conn) {\n var _this = this;\n return function (message) {\n if (_this.state_ != 2 /* DISCONNECTED */) {\n if (conn === _this.rx_) {\n _this.onPrimaryMessageReceived_(message);\n } else if (conn === _this.secondaryConn_) {\n _this.onSecondaryMessageReceived_(message);\n } else {\n _this.log_('message on old connection');\n }\n }\n };\n };\n /**\r\n *\r\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\r\n */\n Connection.prototype.sendRequest = function (dataMsg) {\n // wrap in a data message envelope and send it on\n var msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n };\n Connection.prototype.tryCleanupConnection = function () {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_('cleaning up and promoting a connection: ' + this.secondaryConn_.connId);\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n };\n Connection.prototype.onSecondaryControl_ = function (controlData) {\n if (MESSAGE_TYPE in controlData) {\n var cmd = controlData[MESSAGE_TYPE];\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n } else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (this.tx_ === this.secondaryConn_ || this.rx_ === this.secondaryConn_) {\n this.close();\n }\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n };\n Connection.prototype.onSecondaryMessageReceived_ = function (parsedData) {\n var layer = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('t', parsedData);\n var data = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n } else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n } else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n };\n Connection.prototype.upgradeIfSecondaryHealthy_ = function () {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n } else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.proceedWithUpgrade_ = function () {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n this.tryCleanupConnection();\n };\n Connection.prototype.onPrimaryMessageReceived_ = function (parsedData) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n var layer = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('t', parsedData);\n var data = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n } else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n };\n Connection.prototype.onDataMessage_ = function (message) {\n this.onPrimaryResponse_();\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n };\n Connection.prototype.onPrimaryResponse_ = function () {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n };\n Connection.prototype.onControl_ = function (controlData) {\n var cmd = Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"w\" /* requireKey */])(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n var payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n } else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (var i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n } else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n } else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n } else if (cmd === CONTROL_ERROR) {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"k\" /* error */])('Server Error: ' + payload);\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n } else {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"k\" /* error */])('Unknown control packet command: ' + cmd);\n }\n }\n };\n /**\r\n *\r\n * @param {Object} handshake The handshake data returned from the server\r\n * @private\r\n */\n Connection.prototype.onHandshake_ = function (handshake) {\n var timestamp = handshake.ts;\n var version = handshake.v;\n var host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == 0 /* CONNECTING */) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (__WEBPACK_IMPORTED_MODULE_2__Constants__[\"e\" /* PROTOCOL_VERSION */] !== version) {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"B\" /* warn */])('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n };\n Connection.prototype.tryStartUpgrade_ = function () {\n var conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n };\n Connection.prototype.startUpgrade_ = function (conn) {\n var _this = this;\n this.secondaryConn_ = new conn(this.nextTransportId_(), this.repoInfo_, this.sessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessage = this.connReceiver_(this.secondaryConn_);\n var onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"x\" /* setTimeoutNonBlocking */])(function () {\n if (_this.secondaryConn_) {\n _this.log_('Timed out trying to upgrade.');\n _this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n };\n Connection.prototype.onReset_ = function (host) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === 1 /* CONNECTED */) {\n this.close();\n } else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n };\n Connection.prototype.onConnectionEstablished_ = function (conn, timestamp) {\n var _this = this;\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = 1 /* CONNECTED */;\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n } else {\n Object(Connection___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"x\" /* setTimeoutNonBlocking */])(function () {\n _this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n };\n Connection.prototype.sendPingOnPrimaryIfNecessary_ = function () {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === 1 /* CONNECTED */) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.onSecondaryConnectionLost_ = function () {\n var conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n };\n /**\r\n *\r\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\r\n * we should flush the host cache\r\n * @private\r\n */\n Connection.prototype.onConnectionLost_ = function (everConnected) {\n this.conn_ = null;\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === 0 /* CONNECTING */) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n __WEBPACK_IMPORTED_MODULE_1__core_storage_storage__[\"a\" /* PersistentStorage */].remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n } else if (this.state_ === 1 /* CONNECTED */) {\n this.log_('Realtime connection lost.');\n }\n this.close();\n };\n /**\r\n *\r\n * @param {string} reason\r\n * @private\r\n */\n Connection.prototype.onConnectionShutdown_ = function (reason) {\n this.log_('Connection shutdown command received. Shutting down...');\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n this.close();\n };\n Connection.prototype.sendData_ = function (data) {\n if (this.state_ !== 1 /* CONNECTED */) {\n throw 'Connection is not connected';\n } else {\n this.tx_.send(data);\n }\n };\n /**\r\n * Cleans up this connection, calling the appropriate callbacks\r\n */\n Connection.prototype.close = function () {\n if (this.state_ !== 2 /* DISCONNECTED */) {\n this.log_('Closing realtime connection.');\n this.state_ = 2 /* DISCONNECTED */;\n this.closeConnections_();\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n };\n /**\r\n *\r\n * @private\r\n */\n Connection.prototype.closeConnections_ = function () {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n };\n return Connection;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/ServerActions.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * Interface defining the set of actions that can be performed against the Firebase server\r\n * (basically corresponds to our wire protocol).\r\n *\r\n * @interface\r\n */\nvar ServerActions = function () {\n function ServerActions() {}\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, string)=} onComplete\r\n * @param {string=} hash\r\n */\n ServerActions.prototype.put = function (pathString, data, onComplete, hash) {};\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, ?string)} onComplete\r\n * @param {string=} hash\r\n */\n ServerActions.prototype.merge = function (pathString, data, onComplete, hash) {};\n /**\r\n * Refreshes the auth token for the current connection.\r\n * @param {string} token The authentication token\r\n */\n ServerActions.prototype.refreshAuthToken = function (token) {};\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, string)=} onComplete\r\n */\n ServerActions.prototype.onDisconnectPut = function (pathString, data, onComplete) {};\n /**\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {function(string, string)=} onComplete\r\n */\n ServerActions.prototype.onDisconnectMerge = function (pathString, data, onComplete) {};\n /**\r\n * @param {string} pathString\r\n * @param {function(string, string)=} onComplete\r\n */\n ServerActions.prototype.onDisconnectCancel = function (pathString, onComplete) {};\n /**\r\n * @param {Object.} stats\r\n */\n ServerActions.prototype.reportStats = function (stats) {};\n return ServerActions;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/PersistentConnection.ts\n/* harmony import */ var PersistentConnection___WEBPACK_IMPORTED_MODULE_0__app__ = __webpack_require__(5);\n/* harmony import */ var PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_json__ = __webpack_require__(3);\n/* harmony import */ var PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_constants__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_environment__ = __webpack_require__(6);\nvar PersistentConnection__typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar PersistentConnection___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar RECONNECT_MIN_DELAY = 1000;\nvar RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nvar RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nvar RECONNECT_DELAY_MULTIPLIER = 1.3;\nvar RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nvar SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nvar INVALID_AUTH_TOKEN_THRESHOLD = 3;\n/**\r\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\r\n *\r\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\r\n * in quotes to make sure the closure compiler does not minify them.\r\n */\nvar PersistentConnection_PersistentConnection = function (_super) {\n PersistentConnection___extends(PersistentConnection, _super);\n /**\r\n * @implements {ServerActions}\r\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\r\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\r\n * @param onConnectStatus_\r\n * @param onServerInfoUpdate_\r\n * @param authTokenProvider_\r\n * @param authOverride_\r\n */\n function PersistentConnection(repoInfo_, onDataUpdate_, onConnectStatus_, onServerInfoUpdate_, authTokenProvider_, authOverride_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.onConnectStatus_ = onConnectStatus_;\n _this.onServerInfoUpdate_ = onServerInfoUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n _this.authOverride_ = authOverride_;\n // Used for diagnostic logging.\n _this.id = PersistentConnection.nextPersistentConnectionId_++;\n _this.log_ = Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"t\" /* logWrapper */])('p:' + _this.id + ':');\n /** @private {Object} */\n _this.interruptReasons_ = {};\n _this.listens_ = {};\n _this.outstandingPuts_ = [];\n _this.outstandingPutCount_ = 0;\n _this.onDisconnectRequestQueue_ = [];\n _this.connected_ = false;\n _this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n _this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n _this.securityDebugCallback_ = null;\n _this.lastSessionId = null;\n /** @private {number|null} */\n _this.establishConnectionTimer_ = null;\n /** @private {boolean} */\n _this.visible_ = false;\n // Before we get connected, we keep a queue of pending messages to send.\n _this.requestCBHash_ = {};\n _this.requestNumber_ = 0;\n /** @private {?{\r\n * sendRequest(Object),\r\n * close()\r\n * }} */\n _this.realtime_ = null;\n /** @private {string|null} */\n _this.authToken_ = null;\n _this.forceTokenRefresh_ = false;\n _this.invalidAuthTokenCount_ = 0;\n _this.firstConnection_ = true;\n _this.lastConnectionAttemptTime_ = null;\n _this.lastConnectionEstablishedTime_ = null;\n if (authOverride_ && !Object(__WEBPACK_IMPORTED_MODULE_11__utils_environment__[\"b\" /* isNodeSdk */])()) {\n throw new Error('Auth override specified in options, but not supported on non Node.js platforms');\n }\n _this.scheduleConnect_(0);\n VisibilityMonitor.getInstance().on('visible', _this.onVisible_, _this);\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor.getInstance().on('online', _this.onOnline_, _this);\n }\n return _this;\n }\n /**\r\n * @param {!string} action\r\n * @param {*} body\r\n * @param {function(*)=} onResponse\r\n * @protected\r\n */\n PersistentConnection.prototype.sendRequest = function (action, body, onResponse) {\n var curReqNum = ++this.requestNumber_;\n var msg = { r: curReqNum, a: action, b: body };\n this.log_(Object(__WEBPACK_IMPORTED_MODULE_2__utils_json__[\"b\" /* stringify */])(msg));\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(this.connected_, \"sendRequest call when we're not connected not allowed.\");\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var queryId = query.queryIdentifier();\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(query.getQueryParams().isDefault() || !query.getQueryParams().loadsAllData(), 'listen() called for non-default but complete query');\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(!this.listens_[pathString][queryId], 'listen() called twice for same path/queryId.');\n var listenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n };\n /**\r\n * @param {!{onComplete(),\r\n * hashFn():!string,\r\n * query: !Query,\r\n * tag: ?number}} listenSpec\r\n * @private\r\n */\n PersistentConnection.prototype.sendListen_ = function (listenSpec) {\n var _this = this;\n var query = listenSpec.query;\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n var req = { /*path*/p: pathString };\n var action = 'q';\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n req['h'] = listenSpec.hashFn();\n this.sendRequest(action, req, function (message) {\n var payload = message['d'];\n var status = message['s'];\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n var currentListenSpec = _this.listens_[pathString] && _this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n _this.log_('listen response', message);\n if (status !== 'ok') {\n _this.removeListen_(pathString, queryId);\n }\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n };\n /**\r\n * @param {*} payload\r\n * @param {!Query} query\r\n * @private\r\n */\n PersistentConnection.warnOnListenWarnings_ = function (payload, query) {\n if (payload && (typeof payload === 'undefined' ? 'undefined' : PersistentConnection__typeof(payload)) === 'object' && Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"b\" /* contains */])(payload, 'w')) {\n var warnings = Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"l\" /* safeGet */])(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n var indexSpec = '\".indexOn\": \"' + query.getQueryParams().getIndex().toString() + '\"';\n var indexPath = query.path.toString();\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"B\" /* warn */])('Using an unspecified index. Consider adding ' + indexSpec + ' at ' + indexPath + ' to your security rules for better performance');\n }\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.refreshAuthToken = function (token) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n } else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, function () {});\n }\n }\n this.reduceReconnectDelayIfAdminCredential_(token);\n };\n /**\r\n * @param {!string} credential\r\n * @private\r\n */\n PersistentConnection.prototype.reduceReconnectDelayIfAdminCredential_ = function (credential) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n var isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || isAdmin(credential)) {\n this.log_('Admin auth credential detected. Reducing max reconnect time.');\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n };\n /**\r\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\r\n * a auth revoked (the connection is closed).\r\n */\n PersistentConnection.prototype.tryAuth = function () {\n var _this = this;\n if (this.connected_ && this.authToken_) {\n var token_1 = this.authToken_;\n var authMethod = isValidFormat(token_1) ? 'auth' : 'gauth';\n var requestData = { cred: token_1 };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n } else if (PersistentConnection__typeof(this.authOverride_) === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, function (res) {\n var status = res['s'];\n var data = res['d'] || 'error';\n if (_this.authToken_ === token_1) {\n if (status === 'ok') {\n _this.invalidAuthTokenCount_ = 0;\n } else {\n // Triggers reconnect and force refresh for auth token\n _this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.unlisten = function (query, tag) {\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(query.getQueryParams().isDefault() || !query.getQueryParams().loadsAllData(), 'unlisten() called for non-default but complete query');\n var listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n };\n PersistentConnection.prototype.sendUnlisten_ = function (pathString, queryId, queryObj, tag) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n var req = { /*path*/p: pathString };\n var action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n this.sendRequest(action, req);\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.onDisconnectPut = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'o',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.onDisconnectMerge = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'om',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.onDisconnectCancel = function (pathString, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'oc',\n data: null,\n onComplete: onComplete\n });\n }\n };\n PersistentConnection.prototype.sendOnDisconnect_ = function (action, pathString, data, onComplete) {\n var request = { /*path*/p: pathString, /*data*/d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, function (response) {\n if (onComplete) {\n setTimeout(function () {\n onComplete(response['s'], response['d']);\n }, Math.floor(0));\n }\n });\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.put = function (pathString, data, onComplete, hash) {\n this.putInternal('p', pathString, data, onComplete, hash);\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.merge = function (pathString, data, onComplete, hash) {\n this.putInternal('m', pathString, data, onComplete, hash);\n };\n PersistentConnection.prototype.putInternal = function (action, pathString, data, onComplete, hash) {\n var request = {\n /*path*/p: pathString,\n /*data*/d: data\n };\n if (hash !== undefined) request['h'] = hash;\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action: action,\n request: request,\n onComplete: onComplete\n });\n this.outstandingPutCount_++;\n var index = this.outstandingPuts_.length - 1;\n if (this.connected_) {\n this.sendPut_(index);\n } else {\n this.log_('Buffering put: ' + pathString);\n }\n };\n PersistentConnection.prototype.sendPut_ = function (index) {\n var _this = this;\n var action = this.outstandingPuts_[index].action;\n var request = this.outstandingPuts_[index].request;\n var onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n this.sendRequest(action, request, function (message) {\n _this.log_(action + ' response', message);\n delete _this.outstandingPuts_[index];\n _this.outstandingPutCount_--;\n // Clean up array occasionally.\n if (_this.outstandingPutCount_ === 0) {\n _this.outstandingPuts_ = [];\n }\n if (onComplete) onComplete(message['s'], message['d']);\n });\n };\n /**\r\n * @inheritDoc\r\n */\n PersistentConnection.prototype.reportStats = function (stats) {\n var _this = this;\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n var request = { /*counters*/c: stats };\n this.log_('reportStats', request);\n this.sendRequest( /*stats*/'s', request, function (result) {\n var status = result['s'];\n if (status !== 'ok') {\n var errorReason = result['d'];\n _this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n };\n /**\r\n * @param {*} message\r\n * @private\r\n */\n PersistentConnection.prototype.onDataMessage_ = function (message) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + Object(__WEBPACK_IMPORTED_MODULE_2__utils_json__[\"b\" /* stringify */])(message));\n var reqNum = message['r'];\n var onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message['b']);\n }\n } else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n } else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n };\n PersistentConnection.prototype.onDataPush_ = function (action, body) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd') this.onDataUpdate_(body['p'], body['d'],\n /*isMerge*/false, body['t']);else if (action === 'm') this.onDataUpdate_(body['p'], body['d'],\n /*isMerge=*/true, body['t']);else if (action === 'c') this.onListenRevoked_(body['p'], body['q']);else if (action === 'ac') this.onAuthRevoked_(body['s'], body['d']);else if (action === 'sd') this.onSecurityDebugPacket_(body);else Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"k\" /* error */])('Unrecognized action received from server: ' + Object(__WEBPACK_IMPORTED_MODULE_2__utils_json__[\"b\" /* stringify */])(action) + '\\nAre you using the latest client?');\n };\n PersistentConnection.prototype.onReady_ = function (timestamp, sessionId) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n };\n PersistentConnection.prototype.scheduleConnect_ = function (timeout) {\n var _this = this;\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(!this.realtime_, \"Scheduling a connect when we're already connected/ing?\");\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n this.establishConnectionTimer_ = setTimeout(function () {\n _this.establishConnectionTimer_ = null;\n _this.establishConnection_();\n }, Math.floor(timeout));\n };\n /**\r\n * @param {boolean} visible\r\n * @private\r\n */\n PersistentConnection.prototype.onVisible_ = function (visible) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (visible && !this.visible_ && this.reconnectDelay_ === this.maxReconnectDelay_) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n };\n PersistentConnection.prototype.onOnline_ = function (online) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n } else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n };\n PersistentConnection.prototype.onRealtimeDisconnect_ = function () {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n } else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n var timeSinceLastConnectSucceeded = new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT) this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n var timeSinceLastConnectAttempt = new Date().getTime() - this.lastConnectionAttemptTime_;\n var reconnectDelay = Math.max(0, this.reconnectDelay_ - timeSinceLastConnectAttempt);\n reconnectDelay = Math.random() * reconnectDelay;\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(this.maxReconnectDelay_, this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER);\n }\n this.onConnectStatus_(false);\n };\n PersistentConnection.prototype.establishConnection_ = function () {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n var onDataMessage_1 = this.onDataMessage_.bind(this);\n var onReady_1 = this.onReady_.bind(this);\n var onDisconnect_1 = this.onRealtimeDisconnect_.bind(this);\n var connId_1 = this.id + ':' + PersistentConnection.nextConnectionId_++;\n var self_1 = this;\n var lastSessionId_1 = this.lastSessionId;\n var canceled_1 = false;\n var connection_1 = null;\n var closeFn_1 = function closeFn_1() {\n if (connection_1) {\n connection_1.close();\n } else {\n canceled_1 = true;\n onDisconnect_1();\n }\n };\n var sendRequestFn = function sendRequestFn(msg) {\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(connection_1, \"sendRequest call when we're not connected not allowed.\");\n connection_1.sendRequest(msg);\n };\n this.realtime_ = {\n close: closeFn_1,\n sendRequest: sendRequestFn\n };\n var forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_.getToken(forceRefresh).then(function (result) {\n if (!canceled_1) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('getToken() completed. Creating connection.');\n self_1.authToken_ = result && result.accessToken;\n connection_1 = new Connection_Connection(connId_1, self_1.repoInfo_, onDataMessage_1, onReady_1, onDisconnect_1,\n /* onKill= */function (reason) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"B\" /* warn */])(reason + ' (' + self_1.repoInfo_.toString() + ')');\n self_1.interrupt(SERVER_KILL_INTERRUPT_REASON);\n }, lastSessionId_1);\n } else {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('getToken() completed but was canceled');\n }\n }).then(null, function (error) {\n self_1.log_('Failed to get token: ' + error);\n if (!canceled_1) {\n if (__WEBPACK_IMPORTED_MODULE_10__utils_constants__[\"a\" /* CONSTANTS */].NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"B\" /* warn */])(error);\n }\n closeFn_1();\n }\n });\n }\n };\n /**\r\n * @param {string} reason\r\n */\n PersistentConnection.prototype.interrupt = function (reason) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n } else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n };\n /**\r\n * @param {string} reason\r\n */\n PersistentConnection.prototype.resume = function (reason) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"j\" /* isEmpty */])(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n };\n PersistentConnection.prototype.handleTimestamp_ = function (timestamp) {\n var delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n };\n PersistentConnection.prototype.cancelSentTransactions_ = function () {\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n var put = this.outstandingPuts_[i];\n if (put && 'h' in put.request && put.queued) {\n if (put.onComplete) put.onComplete('disconnect');\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0) this.outstandingPuts_ = [];\n };\n /**\r\n * @param {!string} pathString\r\n * @param {Array.<*>=} query\r\n * @private\r\n */\n PersistentConnection.prototype.onListenRevoked_ = function (pathString, query) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n var queryId;\n if (!query) {\n queryId = 'default';\n } else {\n queryId = query.map(function (q) {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"d\" /* ObjectToUniqueKey */])(q);\n }).join('$');\n }\n var listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete) listen.onComplete('permission_denied');\n };\n /**\r\n * @param {!string} pathString\r\n * @param {!string} queryId\r\n * @return {{queries:Array., onComplete:function(string)}}\r\n * @private\r\n */\n PersistentConnection.prototype.removeListen_ = function (pathString, queryId) {\n var normalizedPathString = new Path(pathString).toString(); // normalize path.\n var listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"h\" /* getCount */])(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n } else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n };\n PersistentConnection.prototype.onAuthRevoked_ = function (statusCode, explanation) {\n Object(__WEBPACK_IMPORTED_MODULE_4__util_util__[\"s\" /* log */])('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n };\n PersistentConnection.prototype.onSecurityDebugPacket_ = function (body) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n } else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n };\n PersistentConnection.prototype.restoreState_ = function () {\n var _this = this;\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"f\" /* forEach */])(this.listens_, function (pathString, queries) {\n Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"f\" /* forEach */])(queries, function (key, listenSpec) {\n _this.sendListen_(listenSpec);\n });\n });\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i]) this.sendPut_(i);\n }\n while (this.onDisconnectRequestQueue_.length) {\n var request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(request.action, request.pathString, request.data, request.onComplete);\n }\n };\n /**\r\n * Sends client stats for first connection\r\n * @private\r\n */\n PersistentConnection.prototype.sendConnectStats_ = function () {\n var stats = {};\n var clientName = 'js';\n if (__WEBPACK_IMPORTED_MODULE_10__utils_constants__[\"a\" /* CONSTANTS */].NODE_ADMIN) {\n clientName = 'admin_node';\n } else if (__WEBPACK_IMPORTED_MODULE_10__utils_constants__[\"a\" /* CONSTANTS */].NODE_CLIENT) {\n clientName = 'node';\n }\n stats['sdk.' + clientName + '.' + PersistentConnection___WEBPACK_IMPORTED_MODULE_0__app__[\"default\"].SDK_VERSION.replace(/\\./g, '-')] = 1;\n if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_environment__[\"a\" /* isMobileCordova */])()) {\n stats['framework.cordova'] = 1;\n } else if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_environment__[\"c\" /* isReactNative */])()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n };\n /**\r\n * @return {boolean}\r\n * @private\r\n */\n PersistentConnection.prototype.shouldReconnect_ = function () {\n var online = OnlineMonitor.getInstance().currentlyOnline();\n return Object(PersistentConnection___WEBPACK_IMPORTED_MODULE_1__utils_obj__[\"j\" /* isEmpty */])(this.interruptReasons_) && online;\n };\n /**\r\n * @private\r\n */\n PersistentConnection.nextPersistentConnectionId_ = 0;\n /**\r\n * Counter for number of connections created. Mainly used for tagging in the logs\r\n * @type {number}\r\n * @private\r\n */\n PersistentConnection.nextConnectionId_ = 0;\n return PersistentConnection;\n}(ServerActions);\n\n// CONCATENATED MODULE: ./src/utils/util.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__obj__ = __webpack_require__(2);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a params\r\n * object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n *\r\n * @param {!Object} querystringParams\r\n * @return {string}\r\n */\nvar querystring = function querystring(querystringParams) {\n var params = [];\n Object(__WEBPACK_IMPORTED_MODULE_0__obj__[\"f\" /* forEach */])(querystringParams, function (key, value) {\n if (Array.isArray(value)) {\n value.forEach(function (arrayVal) {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\n });\n } else {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n });\n return params.length ? '&' + params.join('&') : '';\n};\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object (e.g. {arg: 'val', arg2: 'val2'})\r\n *\r\n * @param {string} querystring\r\n * @return {!Object}\r\n */\nvar querystringDecode = function querystringDecode(querystring) {\n var obj = {};\n var tokens = querystring.replace(/^\\?/, '').split('&');\n tokens.forEach(function (token) {\n if (token) {\n var key = token.split('=');\n obj[key[0]] = key[1];\n }\n });\n return obj;\n};\n// CONCATENATED MODULE: ./src/database/core/ReadonlyRestClient.ts\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(1);\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_2__utils_json__ = __webpack_require__(3);\n/* harmony import */ var ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_3__utils_obj__ = __webpack_require__(2);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar ReadonlyRestClient___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\n/**\r\n * An implementation of ServerActions that communicates with the server via REST requests.\r\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\r\n * persistent connection (using WebSockets or long-polling)\r\n */\nvar ReadonlyRestClient_ReadonlyRestClient = function (_super) {\n ReadonlyRestClient___extends(ReadonlyRestClient, _super);\n /**\r\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\r\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\r\n * @param {AuthTokenProvider} authTokenProvider_\r\n * @implements {ServerActions}\r\n */\n function ReadonlyRestClient(repoInfo_, onDataUpdate_, authTokenProvider_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n /** @private {function(...[*])} */\n _this.log_ = Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__[\"t\" /* logWrapper */])('p:rest:');\n /**\r\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\r\n * that's been removed. :-/\r\n *\r\n * @private {!Object.}\r\n */\n _this.listens_ = {};\n return _this;\n }\n ReadonlyRestClient.prototype.reportStats = function (stats) {\n throw new Error('Method not implemented.');\n };\n /**\r\n * @param {!Query} query\r\n * @param {?number=} tag\r\n * @return {string}\r\n * @private\r\n */\n ReadonlyRestClient.getListenId_ = function (query, tag) {\n if (tag !== undefined) {\n return 'tag$' + tag;\n } else {\n Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(query.getQueryParams().isDefault(), \"should have a tag if it's not a default query.\");\n return query.path.toString();\n }\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var _this = this;\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + query.queryIdentifier());\n // Mark this listener so we can tell if it's removed.\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n var thisListen = {};\n this.listens_[listenId] = thisListen;\n var queryStringParamaters = query.getQueryParams().toRestQueryStringParameters();\n this.restRequest_(pathString + '.json', queryStringParamaters, function (error, result) {\n var data = result;\n if (error === 404) {\n data = null;\n error = null;\n }\n if (error === null) {\n _this.onDataUpdate_(pathString, data, /*isMerge=*/false, tag);\n }\n if (Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_3__utils_obj__[\"l\" /* safeGet */])(_this.listens_, listenId) === thisListen) {\n var status_1;\n if (!error) {\n status_1 = 'ok';\n } else if (error == 401) {\n status_1 = 'permission_denied';\n } else {\n status_1 = 'rest_error:' + error;\n }\n onComplete(status_1, null);\n }\n });\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.unlisten = function (query, tag) {\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.refreshAuthToken = function (token) {\n // no-op since we just always call getToken.\n };\n /**\r\n * Performs a REST request to the given path, with the provided query string parameters,\r\n * and any auth credentials we have.\r\n *\r\n * @param {!string} pathString\r\n * @param {!Object.} queryStringParameters\r\n * @param {?function(?number, *=)} callback\r\n * @private\r\n */\n ReadonlyRestClient.prototype.restRequest_ = function (pathString, queryStringParameters, callback) {\n var _this = this;\n if (queryStringParameters === void 0) {\n queryStringParameters = {};\n }\n queryStringParameters['format'] = 'export';\n this.authTokenProvider_.getToken( /*forceRefresh=*/false).then(function (authTokenData) {\n var authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n var url = (_this.repoInfo_.secure ? 'https://' : 'http://') + _this.repoInfo_.host + pathString + '?' + querystring(queryStringParameters);\n _this.log_('Sending REST request for ' + url);\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (callback && xhr.readyState === 4) {\n _this.log_('REST Response for ' + url + ' received. status:', xhr.status, 'response:', xhr.responseText);\n var res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_2__utils_json__[\"a\" /* jsonEval */])(xhr.responseText);\n } catch (e) {\n Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__[\"B\" /* warn */])('Failed to parse JSON response for ' + url + ': ' + xhr.responseText);\n }\n callback(null, res);\n } else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n Object(ReadonlyRestClient___WEBPACK_IMPORTED_MODULE_1__util_util__[\"B\" /* warn */])('Got unsuccessful REST response for ' + url + ' Status: ' + xhr.status);\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n xhr.open('GET', url, /*asynchronous=*/true);\n xhr.send();\n });\n };\n return ReadonlyRestClient;\n}(ServerActions);\n\n// CONCATENATED MODULE: ./src/database/core/Repo.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_json__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_obj__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__ = __webpack_require__(12);\nvar Repo__typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar INTERRUPT_REASON = 'repo_interrupt';\n/**\r\n * A connection to a single data repository.\r\n */\nvar Repo_Repo = function () {\n /**\r\n * @param {!RepoInfo} repoInfo_\r\n * @param {boolean} forceRestClient\r\n * @param {!FirebaseApp} app\r\n */\n function Repo(repoInfo_, forceRestClient, app) {\n var _this = this;\n this.repoInfo_ = repoInfo_;\n this.app = app;\n this.dataUpdateCount = 0;\n this.statsListener_ = null;\n this.eventQueue_ = new EventQueue();\n this.nextWriteId_ = 1;\n this.interceptServerDataCallback_ = null;\n // A list of data pieces and paths to be set when this client disconnects.\n this.onDisconnect_ = new SparseSnapshotTree_SparseSnapshotTree();\n /**\r\n * TODO: This should be @private but it's used by test_access.js and internal.js\r\n * @type {?PersistentConnection}\r\n */\n this.persistentConnection_ = null;\n /** @type {!AuthTokenProvider} */\n var authTokenProvider = new AuthTokenProvider(app);\n this.stats_ = __WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__[\"a\" /* StatsManager */].getCollection(repoInfo_);\n if (forceRestClient || Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"g\" /* beingCrawled */])()) {\n this.server_ = new ReadonlyRestClient_ReadonlyRestClient(this.repoInfo_, this.onDataUpdate_.bind(this), authTokenProvider);\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n } else {\n var authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if ((typeof authOverride === 'undefined' ? 'undefined' : Repo__typeof(authOverride)) !== 'object') {\n throw new Error('Only objects are supported for option databaseAuthVariableOverride');\n }\n try {\n Object(__WEBPACK_IMPORTED_MODULE_6__utils_json__[\"b\" /* stringify */])(authOverride);\n } catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n this.persistentConnection_ = new PersistentConnection_PersistentConnection(this.repoInfo_, this.onDataUpdate_.bind(this), this.onConnectStatus_.bind(this), this.onServerInfoUpdate_.bind(this), authTokenProvider, authOverride);\n this.server_ = this.persistentConnection_;\n }\n authTokenProvider.addTokenChangeListener(function (token) {\n _this.server_.refreshAuthToken(token);\n });\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = __WEBPACK_IMPORTED_MODULE_10__stats_StatsManager__[\"a\" /* StatsManager */].getOrCreateReporter(repoInfo_, function () {\n return new StatsReporter_StatsReporter(_this.stats_, _this.server_);\n });\n this.transactions_init_();\n // Used for .info.\n this.infoData_ = new SnapshotHolder_SnapshotHolder();\n this.infoSyncTree_ = new SyncTree_SyncTree({\n startListening: function startListening(query, tag, currentHashFn, onComplete) {\n var infoEvents = [];\n var node = _this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = _this.infoSyncTree_.applyServerOverwrite(query.path, node);\n setTimeout(function () {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: function stopListening() {}\n });\n this.updateInfo_('connected', false);\n this.serverSyncTree_ = new SyncTree_SyncTree({\n startListening: function startListening(query, tag, currentHashFn, onComplete) {\n _this.server_.listen(query, currentHashFn, tag, function (status, data) {\n var events = onComplete(status, data);\n _this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: function stopListening(query, tag) {\n _this.server_.unlisten(query, tag);\n }\n });\n }\n /**\r\n * @return {string} The URL corresponding to the root of this Firebase.\r\n */\n Repo.prototype.toString = function () {\n return (this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host;\n };\n /**\r\n * @return {!string} The namespace represented by the repo.\r\n */\n Repo.prototype.name = function () {\n return this.repoInfo_.namespace;\n };\n /**\r\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\r\n */\n Repo.prototype.serverTime = function () {\n var offsetNode = this.infoData_.getNode(new Path('.info/serverTimeOffset'));\n var offset = offsetNode.val() || 0;\n return new Date().getTime() + offset;\n };\n /**\r\n * Generate ServerValues using some variables from the repo object.\r\n * @return {!Object}\r\n */\n Repo.prototype.generateServerValues = function () {\n return generateWithValues({\n timestamp: this.serverTime()\n });\n };\n /**\r\n * Called by realtime when we get new messages from the server.\r\n *\r\n * @private\r\n * @param {string} pathString\r\n * @param {*} data\r\n * @param {boolean} isMerge\r\n * @param {?number} tag\r\n */\n Repo.prototype.onDataUpdate_ = function (pathString, data, isMerge, tag) {\n // For testing.\n this.dataUpdateCount++;\n var path = new Path(pathString);\n data = this.interceptServerDataCallback_ ? this.interceptServerDataCallback_(pathString, data) : data;\n var events = [];\n if (tag) {\n if (isMerge) {\n var taggedChildren = Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"k\" /* map */])(data, function (raw) {\n return nodeFromJSON_nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyTaggedQueryMerge(path, taggedChildren, tag);\n } else {\n var taggedSnap = nodeFromJSON_nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(path, taggedSnap, tag);\n }\n } else if (isMerge) {\n var changedChildren = Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"k\" /* map */])(data, function (raw) {\n return nodeFromJSON_nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n } else {\n var snap = nodeFromJSON_nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n var affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n };\n /**\r\n * TODO: This should be @private but it's used by test_access.js and internal.js\r\n * @param {?function(!string, *):*} callback\r\n * @private\r\n */\n Repo.prototype.interceptServerData_ = function (callback) {\n this.interceptServerDataCallback_ = callback;\n };\n /**\r\n * @param {!boolean} connectStatus\r\n * @private\r\n */\n Repo.prototype.onConnectStatus_ = function (connectStatus) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n };\n /**\r\n * @param {!Object} updates\r\n * @private\r\n */\n Repo.prototype.onServerInfoUpdate_ = function (updates) {\n var _this = this;\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"i\" /* each */])(updates, function (value, key) {\n _this.updateInfo_(key, value);\n });\n };\n /**\r\n *\r\n * @param {!string} pathString\r\n * @param {*} value\r\n * @private\r\n */\n Repo.prototype.updateInfo_ = function (pathString, value) {\n var path = new Path('/.info/' + pathString);\n var newNode = nodeFromJSON_nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n var events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n };\n /**\r\n * @return {!number}\r\n * @private\r\n */\n Repo.prototype.getNextWriteId_ = function () {\n return this.nextWriteId_++;\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} newVal\r\n * @param {number|string|null} newPriority\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.setWithPriority = function (path, newVal, newPriority, onComplete) {\n var _this = this;\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_nodeFromJSON(newVal, newPriority);\n var newNode = ServerValues_resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n var writeId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, writeId, true);\n this.eventQueue_.queueEvents(events);\n this.server_.put(path.toString(), newNodeUnresolved.val( /*export=*/true), function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"B\" /* warn */])('set at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId, !success);\n _this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n var affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n };\n /**\r\n * @param {!Path} path\r\n * @param {!Object} childrenToMerge\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.update = function (path, childrenToMerge, onComplete) {\n var _this = this;\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n // Start with our existing data and merge each child into it.\n var empty = true;\n var serverValues = this.generateServerValues();\n var changedChildren = {};\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(childrenToMerge, function (changedKey, changedValue) {\n empty = false;\n var newNodeUnresolved = nodeFromJSON_nodeFromJSON(changedValue);\n changedChildren[changedKey] = ServerValues_resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n });\n if (!empty) {\n var writeId_1 = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserMerge(path, changedChildren, writeId_1);\n this.eventQueue_.queueEvents(events);\n this.server_.merge(path.toString(), childrenToMerge, function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"B\" /* warn */])('update at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId_1, !success);\n var affectedPath = clearEvents.length > 0 ? _this.rerunTransactions_(path) : path;\n _this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(childrenToMerge, function (changedPath) {\n var affectedPath = _this.abortTransactions_(path.child(changedPath));\n _this.rerunTransactions_(affectedPath);\n });\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n } else {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"s\" /* log */])(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n };\n /**\r\n * Applies all of the changes stored up in the onDisconnect_ tree.\r\n * @private\r\n */\n Repo.prototype.runOnDisconnectEvents_ = function () {\n var _this = this;\n this.log_('onDisconnectEvents');\n var serverValues = this.generateServerValues();\n var resolvedOnDisconnectTree = ServerValues_resolveDeferredValueTree(this.onDisconnect_, serverValues);\n var events = [];\n resolvedOnDisconnectTree.forEachTree(Path.Empty, function (path, snap) {\n events = events.concat(_this.serverSyncTree_.applyServerOverwrite(path, snap));\n var affectedPath = _this.abortTransactions_(path);\n _this.rerunTransactions_(affectedPath);\n });\n this.onDisconnect_ = new SparseSnapshotTree_SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path.Empty, events);\n };\n /**\r\n * @param {!Path} path\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectCancel = function (path, onComplete) {\n var _this = this;\n this.server_.onDisconnectCancel(path.toString(), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.forget(path);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} value\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectSet = function (path, value, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_nodeFromJSON(value);\n this.server_.onDisconnectPut(path.toString(), newNode.val( /*export=*/true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} value\r\n * @param {*} priority\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectSetWithPriority = function (path, value, priority, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(path.toString(), newNode.val( /*export=*/true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Path} path\r\n * @param {*} childrenToMerge\r\n * @param {?function(?Error, *=)} onComplete\r\n */\n Repo.prototype.onDisconnectUpdate = function (path, childrenToMerge, onComplete) {\n var _this = this;\n if (Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"j\" /* isEmpty */])(childrenToMerge)) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"s\" /* log */])(\"onDisconnect().update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n this.server_.onDisconnectMerge(path.toString(), childrenToMerge, function (status, errorReason) {\n if (status === 'ok') {\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(childrenToMerge, function (childName, childNode) {\n var newChildNode = nodeFromJSON_nodeFromJSON(childNode);\n _this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\r\n * @param {!Query} query\r\n * @param {!EventRegistration} eventRegistration\r\n */\n Repo.prototype.addEventCallbackForQuery = function (query, eventRegistration) {\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(query, eventRegistration);\n } else {\n events = this.serverSyncTree_.addEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n /**\r\n * @param {!Query} query\r\n * @param {?EventRegistration} eventRegistration\r\n */\n Repo.prototype.removeEventCallbackForQuery = function (query, eventRegistration) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(query, eventRegistration);\n } else {\n events = this.serverSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n Repo.prototype.interrupt = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n };\n Repo.prototype.resume = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n };\n Repo.prototype.stats = function (showDelta) {\n if (showDelta === void 0) {\n showDelta = false;\n }\n if (typeof console === 'undefined') return;\n var stats;\n if (showDelta) {\n if (!this.statsListener_) this.statsListener_ = new StatsListener(this.stats_);\n stats = this.statsListener_.get();\n } else {\n stats = this.stats_.get();\n }\n var longestName = Object.keys(stats).reduce(function (previousValue, currentValue) {\n return Math.max(currentValue.length, previousValue);\n }, 0);\n Object(__WEBPACK_IMPORTED_MODULE_8__utils_obj__[\"f\" /* forEach */])(stats, function (stat, value) {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (var i = stat.length; i < longestName + 2; i++) {\n stat += ' ';\n }console.log(stat + value);\n });\n };\n Repo.prototype.statsIncrementCounter = function (metric) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n };\n /**\r\n * @param {...*} var_args\r\n * @private\r\n */\n Repo.prototype.log_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n __WEBPACK_IMPORTED_MODULE_7__util_util__[\"s\" /* log */].apply(void 0, [prefix].concat(var_args));\n };\n /**\r\n * @param {?function(?Error, *=)} callback\r\n * @param {!string} status\r\n * @param {?string=} errorReason\r\n */\n Repo.prototype.callOnCompleteCallback = function (callback, status, errorReason) {\n if (callback) {\n Object(__WEBPACK_IMPORTED_MODULE_7__util_util__[\"m\" /* exceptionGuard */])(function () {\n if (status == 'ok') {\n callback(null);\n } else {\n var code = (status || 'error').toUpperCase();\n var message = code;\n if (errorReason) message += ': ' + errorReason;\n var error = new Error(message);\n error.code = code;\n callback(error);\n }\n });\n }\n };\n Object.defineProperty(Repo.prototype, \"database\", {\n get: function get() {\n return this.__database || (this.__database = new Database_Database(this));\n },\n enumerable: true,\n configurable: true\n });\n return Repo;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/view/filter/RangedFilter.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n/**\r\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\r\n *\r\n * @constructor\r\n * @implements {NodeFilter}\r\n */\nvar RangedFilter_RangedFilter = function () {\n /**\r\n * @param {!QueryParams} params\r\n */\n function RangedFilter(params) {\n this.indexedFilter_ = new IndexedFilter_IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n /**\r\n * @return {!NamedNode}\r\n */\n RangedFilter.prototype.getStartPost = function () {\n return this.startPost_;\n };\n /**\r\n * @return {!NamedNode}\r\n */\n RangedFilter.prototype.getEndPost = function () {\n return this.endPost_;\n };\n /**\r\n * @param {!NamedNode} node\r\n * @return {boolean}\r\n */\n RangedFilter.prototype.matches = function (node) {\n return this.index_.compare(this.getStartPost(), node) <= 0 && this.index_.compare(node, this.getEndPost()) <= 0;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode_ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode_ChildrenNode.EMPTY_NODE;\n }\n var filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_ChildrenNode.EMPTY_NODE);\n var self = this;\n newSnap.forEachChild(PRIORITY_INDEX, function (key, childNode) {\n if (!self.matches(new NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode_ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.getIndexedFilter = function () {\n return this.indexedFilter_;\n };\n /**\r\n * @inheritDoc\r\n */\n RangedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\r\n * @param {!QueryParams} params\r\n * @return {!NamedNode}\r\n * @private\r\n */\n RangedFilter.getStartPost_ = function (params) {\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n } else {\n return params.getIndex().minPost();\n }\n };\n /**\r\n * @param {!QueryParams} params\r\n * @return {!NamedNode}\r\n * @private\r\n */\n RangedFilter.getEndPost_ = function (params) {\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n } else {\n return params.getIndex().maxPost();\n }\n };\n return RangedFilter;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/view/filter/LimitedFilter.ts\n/* harmony import */ var LimitedFilter___WEBPACK_IMPORTED_MODULE_3__utils_assert__ = __webpack_require__(0);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n/**\r\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\r\n *\r\n * @constructor\r\n * @implements {NodeFilter}\r\n */\nvar LimitedFilter_LimitedFilter = function () {\n /**\r\n * @param {!QueryParams} params\r\n */\n function LimitedFilter(params) {\n this.rangedFilter_ = new RangedFilter_RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.rangedFilter_.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode_ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n } else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_.getIndexedFilter().updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n } else {\n return this.fullLimitUpdateChild_(snap, key, newChild, source, optChangeAccumulator);\n }\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n var filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode_ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n } else {\n if (this.limit_ * 2 < newSnap.numChildren() && newSnap.isIndexed(this.index_)) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode_ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n var iterator = void 0;\n if (this.reverse_) {\n iterator = newSnap.getReverseIteratorFrom(this.rangedFilter_.getEndPost(), this.index_);\n } else {\n iterator = newSnap.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_);\n }\n var count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n var next = iterator.getNext();\n var inRange = void 0;\n if (this.reverse_) {\n inRange = this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n } else {\n inRange = this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n } else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n } else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_ChildrenNode.EMPTY_NODE);\n var startPost = void 0;\n var endPost = void 0;\n var cmp = void 0;\n var iterator = void 0;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n var indexCompare_1 = this.index_.getCompare();\n cmp = function cmp(a, b) {\n return indexCompare_1(b, a);\n };\n } else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n var count = 0;\n var foundStartPost = false;\n while (iterator.hasNext()) {\n var next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n var inRange = foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n } else {\n filtered = filtered.updateImmediateChild(next.name, ChildrenNode_ChildrenNode.EMPTY_NODE);\n }\n }\n }\n }\n return this.rangedFilter_.getIndexedFilter().updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.getIndexedFilter = function () {\n return this.rangedFilter_.getIndexedFilter();\n };\n /**\r\n * @inheritDoc\r\n */\n LimitedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\r\n * @param {!Node} snap\r\n * @param {string} childKey\r\n * @param {!Node} childSnap\r\n * @param {!CompleteChildSource} source\r\n * @param {?ChildChangeAccumulator} changeAccumulator\r\n * @return {!Node}\r\n * @private\r\n */\n LimitedFilter.prototype.fullLimitUpdateChild_ = function (snap, childKey, childSnap, source, changeAccumulator) {\n // TODO: rename all cache stuff etc to general snap terminology\n var cmp;\n if (this.reverse_) {\n var indexCmp_1 = this.index_.getCompare();\n cmp = function cmp(a, b) {\n return indexCmp_1(b, a);\n };\n } else {\n cmp = this.index_.getCompare();\n }\n var oldEventCache = snap;\n Object(LimitedFilter___WEBPACK_IMPORTED_MODULE_3__utils_assert__[\"a\" /* assert */])(oldEventCache.numChildren() == this.limit_, '');\n var newChildNamedNode = new NamedNode(childKey, childSnap);\n var windowBoundary = this.reverse_ ? oldEventCache.getFirstChild(this.index_) : oldEventCache.getLastChild(this.index_);\n var inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n var oldChildSnap = oldEventCache.getImmediateChild(childKey);\n var nextChild = source.getChildAfterChild(this.index_, windowBoundary, this.reverse_);\n while (nextChild != null && (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(this.index_, nextChild, this.reverse_);\n }\n var compareNext = nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n var remainsInWindow = inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childChangedChange(childKey, childSnap, oldChildSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n } else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childRemovedChange(childKey, oldChildSnap));\n }\n var newEventCache = oldEventCache.updateImmediateChild(childKey, ChildrenNode_ChildrenNode.EMPTY_NODE);\n var nextChildInRange = nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childAddedChange(nextChild.name, nextChild.node));\n }\n return newEventCache.updateImmediateChild(nextChild.name, nextChild.node);\n } else {\n return newEventCache;\n }\n }\n } else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n } else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change.childRemovedChange(windowBoundary.name, windowBoundary.node));\n changeAccumulator.trackChildChange(Change.childAddedChange(childKey, childSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap).updateImmediateChild(windowBoundary.name, ChildrenNode_ChildrenNode.EMPTY_NODE);\n } else {\n return snap;\n }\n } else {\n return snap;\n }\n };\n return LimitedFilter;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/view/QueryParams.ts\n/* harmony import */ var QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_json__ = __webpack_require__(3);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\n\n/**\r\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\r\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\r\n * user-facing API level, so it is not done here.\r\n * @constructor\r\n */\nvar QueryParams_QueryParams = function () {\n function QueryParams() {\n this.limitSet_ = false;\n this.startSet_ = false;\n this.startNameSet_ = false;\n this.endSet_ = false;\n this.endNameSet_ = false;\n this.limit_ = 0;\n this.viewFrom_ = '';\n this.indexStartValue_ = null;\n this.indexStartName_ = '';\n this.indexEndValue_ = null;\n this.indexEndName_ = '';\n this.index_ = PRIORITY_INDEX;\n }\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.hasStart = function () {\n return this.startSet_;\n };\n /**\r\n * @return {boolean} True if it would return from left.\r\n */\n QueryParams.prototype.isViewFromLeft = function () {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n } else {\n return this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n }\n };\n /**\r\n * Only valid to call if hasStart() returns true\r\n * @return {*}\r\n */\n QueryParams.prototype.getIndexStartValue = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n };\n /**\r\n * Only valid to call if hasStart() returns true.\r\n * Returns the starting key name for the range defined by these query parameters\r\n * @return {!string}\r\n */\n QueryParams.prototype.getIndexStartName = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n } else {\n return QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__[\"c\" /* MIN_NAME */];\n }\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.hasEnd = function () {\n return this.endSet_;\n };\n /**\r\n * Only valid to call if hasEnd() returns true.\r\n * @return {*}\r\n */\n QueryParams.prototype.getIndexEndValue = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n };\n /**\r\n * Only valid to call if hasEnd() returns true.\r\n * Returns the end key name for the range defined by these query parameters\r\n * @return {!string}\r\n */\n QueryParams.prototype.getIndexEndName = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n } else {\n return QueryParams___WEBPACK_IMPORTED_MODULE_1__util_util__[\"b\" /* MAX_NAME */];\n }\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.hasLimit = function () {\n return this.limitSet_;\n };\n /**\r\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\r\n */\n QueryParams.prototype.hasAnchoredLimit = function () {\n return this.limitSet_ && this.viewFrom_ !== '';\n };\n /**\r\n * Only valid to call if hasLimit() returns true\r\n * @return {!number}\r\n */\n QueryParams.prototype.getLimit = function () {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n };\n /**\r\n * @return {!Index}\r\n */\n QueryParams.prototype.getIndex = function () {\n return this.index_;\n };\n /**\r\n * @return {!QueryParams}\r\n * @private\r\n */\n QueryParams.prototype.copy_ = function () {\n var copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n };\n /**\r\n * @param {!number} newLimit\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.limit = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n };\n /**\r\n * @param {!number} newLimit\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.limitToFirst = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n };\n /**\r\n * @param {!number} newLimit\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.limitToLast = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n };\n /**\r\n * @param {*} indexValue\r\n * @param {?string=} key\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.startAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n } else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n };\n /**\r\n * @param {*} indexValue\r\n * @param {?string=} key\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.endAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n } else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n };\n /**\r\n * @param {!Index} index\r\n * @return {!QueryParams}\r\n */\n QueryParams.prototype.orderBy = function (index) {\n var newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n };\n /**\r\n * @return {!Object}\r\n */\n QueryParams.prototype.getQueryObject = function () {\n var WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n var obj = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n var viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n } else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.loadsAllData = function () {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n };\n /**\r\n * @return {boolean}\r\n */\n QueryParams.prototype.isDefault = function () {\n return this.loadsAllData() && this.index_ == PRIORITY_INDEX;\n };\n /**\r\n * @return {!NodeFilter}\r\n */\n QueryParams.prototype.getNodeFilter = function () {\n if (this.loadsAllData()) {\n return new IndexedFilter_IndexedFilter(this.getIndex());\n } else if (this.hasLimit()) {\n return new LimitedFilter_LimitedFilter(this);\n } else {\n return new RangedFilter_RangedFilter(this);\n }\n };\n /**\r\n * Returns a set of REST query string parameters representing this query.\r\n *\r\n * @return {!Object.} query string parameters\r\n */\n QueryParams.prototype.toRestQueryStringParameters = function () {\n var REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n var qs = {};\n if (this.isDefault()) {\n return qs;\n }\n var orderBy;\n if (this.index_ === PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n } else if (this.index_ === VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n } else if (this.index_ === KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n } else {\n Object(QueryParams___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(this.index_ instanceof PathIndex_PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(orderBy);\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexStartName_);\n }\n }\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + Object(__WEBPACK_IMPORTED_MODULE_9__utils_json__[\"b\" /* stringify */])(this.indexEndName_);\n }\n }\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n } else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n return qs;\n };\n /**\r\n * Wire Protocol Constants\r\n * @const\r\n * @enum {string}\r\n * @private\r\n */\n QueryParams.WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n /**\r\n * REST Query Constants\r\n * @const\r\n * @enum {string}\r\n * @private\r\n */\n QueryParams.REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n /**\r\n * Default, empty query parameters\r\n * @type {!QueryParams}\r\n * @const\r\n */\n QueryParams.DEFAULT = new QueryParams();\n return QueryParams;\n}();\n\n// CONCATENATED MODULE: ./src/database/api/Reference.ts\n/* harmony import */ var Reference___WEBPACK_IMPORTED_MODULE_2__core_util_util__ = __webpack_require__(1);\n/* harmony import */ var Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__ = __webpack_require__(4);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar Reference___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\n\n\n\n\n\n\nvar Reference_Reference = function (_super) {\n Reference___extends(Reference, _super);\n /**\r\n * Call options:\r\n * new Reference(Repo, Path) or\r\n * new Reference(url: string, string|RepoManager)\r\n *\r\n * Externally - this is the firebase.database.Reference type.\r\n *\r\n * @param {!Repo} repo\r\n * @param {(!Path)} path\r\n * @extends {Query}\r\n */\n function Reference(repo, path) {\n var _this = this;\n if (!(repo instanceof Repo_Repo)) {\n throw new Error('new Reference() no longer supported - use app.database().');\n }\n // call Query's constructor, passing in the repo and path.\n _this = _super.call(this, repo, path, QueryParams_QueryParams.DEFAULT, false) || this;\n return _this;\n }\n /** @return {?string} */\n Reference.prototype.getKey = function () {\n validateArgCount('Reference.key', 0, 0, arguments.length);\n if (this.path.isEmpty()) return null;else return this.path.getBack();\n };\n /**\r\n * @param {!(string|Path)} pathString\r\n * @return {!Reference}\r\n */\n Reference.prototype.child = function (pathString) {\n validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n } else if (!(pathString instanceof Path)) {\n if (this.path.getFront() === null) validateRootPathString('Reference.child', 1, pathString, false);else validation_validatePathString('Reference.child', 1, pathString, false);\n }\n return new Reference(this.repo, this.path.child(pathString));\n };\n /** @return {?Reference} */\n Reference.prototype.getParent = function () {\n validateArgCount('Reference.parent', 0, 0, arguments.length);\n var parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n };\n /** @return {!Reference} */\n Reference.prototype.getRoot = function () {\n validateArgCount('Reference.root', 0, 0, arguments.length);\n var ref = this;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n };\n /** @return {!Database} */\n Reference.prototype.databaseProp = function () {\n return this.repo.database;\n };\n /**\r\n * @param {*} newVal\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.set = function (newVal, onComplete) {\n validateArgCount('Reference.set', 1, 2, arguments.length);\n validateWritablePath('Reference.set', this.path);\n validation_validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n validateCallback('Reference.set', 2, onComplete, true);\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.setWithPriority(this.path, newVal,\n /*priority=*/null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {!Object} objectToMerge\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.update = function (objectToMerge, onComplete) {\n validateArgCount('Reference.update', 1, 2, arguments.length);\n validateWritablePath('Reference.update', this.path);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n Object(Reference___WEBPACK_IMPORTED_MODULE_2__core_util_util__[\"B\" /* warn */])('Passing an Array to Firebase.update() is deprecated. ' + 'Use set() if you want to overwrite the existing data, or ' + 'an Object with integer keys if you really do want to ' + 'only update some of the children.');\n }\n validation_validateFirebaseMergeDataArg('Reference.update', 1, objectToMerge, this.path, false);\n validateCallback('Reference.update', 2, onComplete, true);\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.update(this.path, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {*} newVal\r\n * @param {string|number|null} newPriority\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.setWithPriority = function (newVal, newPriority, onComplete) {\n validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validateWritablePath('Reference.setWithPriority', this.path);\n validation_validateFirebaseDataArg('Reference.setWithPriority', 1, newVal, this.path, false);\n validation_validatePriority('Reference.setWithPriority', 2, newPriority, false);\n validateCallback('Reference.setWithPriority', 3, onComplete, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys') throw 'Reference.setWithPriority failed: ' + this.getKey() + ' is a read-only object.';\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.setWithPriority(this.path, newVal, newPriority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.remove = function (onComplete) {\n validateArgCount('Reference.remove', 0, 1, arguments.length);\n validateWritablePath('Reference.remove', this.path);\n validateCallback('Reference.remove', 1, onComplete, true);\n return this.set(null, onComplete);\n };\n /**\r\n * @param {function(*):*} transactionUpdate\r\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\r\n * @param {boolean=} applyLocally\r\n * @return {!Promise}\r\n */\n Reference.prototype.transaction = function (transactionUpdate, onComplete, applyLocally) {\n validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validateWritablePath('Reference.transaction', this.path);\n validateCallback('Reference.transaction', 1, transactionUpdate, false);\n validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validation_validateBoolean('Reference.transaction', 3, applyLocally, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys') throw 'Reference.transaction failed: ' + this.getKey() + ' is a read-only object.';\n if (applyLocally === undefined) applyLocally = true;\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n if (typeof onComplete === 'function') {\n Object(Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"c\" /* attachDummyErrorHandler */])(deferred.promise);\n }\n var promiseComplete = function promiseComplete(error, committed, snapshot) {\n if (error) {\n deferred.reject(error);\n } else {\n deferred.resolve(new TransactionResult_TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(this.path, transactionUpdate, promiseComplete, applyLocally);\n return deferred.promise;\n };\n /**\r\n * @param {string|number|null} priority\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Promise}\r\n */\n Reference.prototype.setPriority = function (priority, onComplete) {\n validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validateWritablePath('Reference.setPriority', this.path);\n validation_validatePriority('Reference.setPriority', 1, priority, false);\n validateCallback('Reference.setPriority', 2, onComplete, true);\n var deferred = new Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"a\" /* Deferred */]();\n this.repo.setWithPriority(this.path.child('.priority'), priority, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\r\n * @param {*=} value\r\n * @param {function(?Error)=} onComplete\r\n * @return {!Reference}\r\n */\n Reference.prototype.push = function (value, onComplete) {\n validateArgCount('Reference.push', 0, 2, arguments.length);\n validateWritablePath('Reference.push', this.path);\n validation_validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n validateCallback('Reference.push', 2, onComplete, true);\n var now = this.repo.serverTime();\n var name = nextPushId(now);\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n var thennablePushRef = this.child(name);\n var pushRef = this.child(name);\n var promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(function () {\n return pushRef;\n });\n } else {\n promise = Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"b\" /* PromiseImpl */].resolve(pushRef);\n }\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n if (typeof onComplete === 'function') {\n Object(Reference___WEBPACK_IMPORTED_MODULE_10__utils_promise__[\"c\" /* attachDummyErrorHandler */])(promise);\n }\n return thennablePushRef;\n };\n /**\r\n * @return {!OnDisconnect}\r\n */\n Reference.prototype.onDisconnect = function () {\n validateWritablePath('Reference.onDisconnect', this.path);\n return new onDisconnect_OnDisconnect(this.repo, this.path);\n };\n Object.defineProperty(Reference.prototype, \"database\", {\n get: function get() {\n return this.databaseProp();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"key\", {\n get: function get() {\n return this.getKey();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"parent\", {\n get: function get() {\n return this.getParent();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n get: function get() {\n return this.getRoot();\n },\n enumerable: true,\n configurable: true\n });\n return Reference;\n}(Query_Query);\n\n/**\r\n * Define reference constructor in various modules\r\n *\r\n * We are doing this here to avoid several circular\r\n * dependency issues\r\n */\nQuery_Query.__referenceConstructor = Reference_Reference;\nSyncPoint_SyncPoint.__referenceConstructor = Reference_Reference;\n// CONCATENATED MODULE: ./src/database/core/util/Tree.ts\n/* harmony import */ var Tree___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__ = __webpack_require__(2);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n/**\r\n * Node in a Tree.\r\n */\nvar TreeNode = function () {\n function TreeNode() {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n this.children = {};\n this.childCount = 0;\n this.value = null;\n }\n return TreeNode;\n}();\n\n/**\r\n * A light-weight tree, traversable by path. Nodes can have both values and children.\r\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\r\n * children.\r\n */\nvar Tree_Tree = function () {\n /**\r\n * @template T\r\n * @param {string=} name_ Optional name of the node.\r\n * @param {Tree=} parent_ Optional parent node.\r\n * @param {TreeNode=} node_ Optional node to wrap.\r\n */\n function Tree(name_, parent_, node_) {\n if (name_ === void 0) {\n name_ = '';\n }\n if (parent_ === void 0) {\n parent_ = null;\n }\n if (node_ === void 0) {\n node_ = new TreeNode();\n }\n this.name_ = name_;\n this.parent_ = parent_;\n this.node_ = node_;\n }\n /**\r\n * Returns a sub-Tree for the given path.\r\n *\r\n * @param {!(string|Path)} pathObj Path to look up.\r\n * @return {!Tree.} Tree for path.\r\n */\n Tree.prototype.subTree = function (pathObj) {\n // TODO: Require pathObj to be Path?\n var path = pathObj instanceof Path ? pathObj : new Path(pathObj);\n var child = this,\n next;\n while ((next = path.getFront()) !== null) {\n var childNode = Object(Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__[\"l\" /* safeGet */])(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n return child;\n };\n /**\r\n * Returns the data associated with this tree node.\r\n *\r\n * @return {?T} The data or null if no data exists.\r\n */\n Tree.prototype.getValue = function () {\n return this.node_.value;\n };\n /**\r\n * Sets data to this tree node.\r\n *\r\n * @param {!T} value Value to set.\r\n */\n Tree.prototype.setValue = function (value) {\n Object(Tree___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n };\n /**\r\n * Clears the contents of the tree node (its value and all children).\r\n */\n Tree.prototype.clear = function () {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n };\n /**\r\n * @return {boolean} Whether the tree has any children.\r\n */\n Tree.prototype.hasChildren = function () {\n return this.node_.childCount > 0;\n };\n /**\r\n * @return {boolean} Whether the tree is empty (no value or children).\r\n */\n Tree.prototype.isEmpty = function () {\n return this.getValue() === null && !this.hasChildren();\n };\n /**\r\n * Calls action for each child of this tree node.\r\n *\r\n * @param {function(!Tree.)} action Action to be called for each child.\r\n */\n Tree.prototype.forEachChild = function (action) {\n var _this = this;\n Object(Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__[\"f\" /* forEach */])(this.node_.children, function (child, childTree) {\n action(new Tree(child, _this, childTree));\n });\n };\n /**\r\n * Does a depth-first traversal of this node's descendants, calling action for each one.\r\n *\r\n * @param {function(!Tree.)} action Action to be called for each child.\r\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\r\n * false.\r\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\r\n * parent.\r\n */\n Tree.prototype.forEachDescendant = function (action, includeSelf, childrenFirst) {\n if (includeSelf && !childrenFirst) action(this);\n this.forEachChild(function (child) {\n child.forEachDescendant(action, /*includeSelf=*/true, childrenFirst);\n });\n if (includeSelf && childrenFirst) action(this);\n };\n /**\r\n * Calls action on each ancestor node.\r\n *\r\n * @param {function(!Tree.)} action Action to be called on each parent; return\r\n * true to abort.\r\n * @param {boolean=} includeSelf Whether to call action on this node as well.\r\n * @return {boolean} true if the action callback returned true.\r\n */\n Tree.prototype.forEachAncestor = function (action, includeSelf) {\n var node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n };\n /**\r\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\r\n * is found, action is called on it and traversal does not continue inside the node.\r\n * Action is *not* called on this node.\r\n *\r\n * @param {function(!Tree.)} action Action to be called for each child.\r\n */\n Tree.prototype.forEachImmediateDescendantWithValue = function (action) {\n this.forEachChild(function (child) {\n if (child.getValue() !== null) action(child);else child.forEachImmediateDescendantWithValue(action);\n });\n };\n /**\r\n * @return {!Path} The path of this tree node, as a Path.\r\n */\n Tree.prototype.path = function () {\n return new Path(this.parent_ === null ? this.name_ : this.parent_.path() + '/' + this.name_);\n };\n /**\r\n * @return {string} The name of the tree node.\r\n */\n Tree.prototype.name = function () {\n return this.name_;\n };\n /**\r\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\r\n */\n Tree.prototype.parent = function () {\n return this.parent_;\n };\n /**\r\n * Adds or removes this child from its parent based on whether it's empty or not.\r\n *\r\n * @private\r\n */\n Tree.prototype.updateParents_ = function () {\n if (this.parent_ !== null) this.parent_.updateChild_(this.name_, this);\n };\n /**\r\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\r\n *\r\n * @param {string} childName The name of the child to update.\r\n * @param {!Tree.} child The child to update.\r\n * @private\r\n */\n Tree.prototype.updateChild_ = function (childName, child) {\n var childEmpty = child.isEmpty();\n var childExists = Object(Tree___WEBPACK_IMPORTED_MODULE_2__utils_obj__[\"b\" /* contains */])(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n } else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n };\n return Tree;\n}();\n\n// CONCATENATED MODULE: ./src/database/core/Repo_transaction.ts\n/* harmony import */ var Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_obj__ = __webpack_require__(2);\nvar Repo_transaction__typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n/**\r\n * @enum {number}\r\n */\nvar TransactionStatus;\n(function (TransactionStatus) {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n TransactionStatus[TransactionStatus[\"RUN\"] = 0] = \"RUN\";\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n TransactionStatus[TransactionStatus[\"SENT\"] = 1] = \"SENT\";\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n TransactionStatus[TransactionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n TransactionStatus[TransactionStatus[\"SENT_NEEDS_ABORT\"] = 3] = \"SENT_NEEDS_ABORT\";\n // Temporary state used to mark transactions that need to be aborted.\n TransactionStatus[TransactionStatus[\"NEEDS_ABORT\"] = 4] = \"NEEDS_ABORT\";\n})(TransactionStatus || (TransactionStatus = {}));\n/**\r\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\r\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\r\n * @type {number}\r\n * @const\r\n * @private\r\n */\nRepo_Repo.MAX_TRANSACTION_RETRIES_ = 25;\n/**\r\n * Setup the transaction data structures\r\n * @private\r\n */\nRepo_Repo.prototype.transactions_init_ = function () {\n /**\r\n * Stores queues of outstanding transactions for Firebase locations.\r\n *\r\n * @type {!Tree.>}\r\n * @private\r\n */\n this.transactionQueueTree_ = new Tree_Tree();\n};\n/**\r\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\r\n *\r\n * @param {!Path} path Path at which to do transaction.\r\n * @param {function(*):*} transactionUpdate Update callback.\r\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\r\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\r\n */\nRepo_Repo.prototype.startTransaction = function (path, transactionUpdate, onComplete, applyLocally) {\n this.log_('transaction on ' + path);\n // Add a watch to make sure we get server updates.\n var valueCallback = function valueCallback() {};\n var watchRef = new Reference_Reference(this, path);\n watchRef.on('value', valueCallback);\n var unwatcher = function unwatcher() {\n watchRef.off('value', valueCallback);\n };\n // Initialize transaction.\n var transaction = {\n path: path,\n update: transactionUpdate,\n onComplete: onComplete,\n // One of TransactionStatus enums.\n status: null,\n // Used when combining transactions at different locations to figure out which one goes first.\n order: Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"a\" /* LUIDGenerator */])(),\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n // Function to call to clean up our .on() listener.\n unwatcher: unwatcher,\n // Stores why a transaction was aborted.\n abortReason: null,\n currentWriteId: null,\n currentInputSnapshot: null,\n currentOutputSnapshotRaw: null,\n currentOutputSnapshotResolved: null\n };\n // Run transaction initially.\n var currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n var newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n var snapshot = new DataSnapshot_DataSnapshot(transaction.currentInputSnapshot, new Reference_Reference(this, transaction.path), PRIORITY_INDEX);\n transaction.onComplete(null, false, snapshot);\n }\n } else {\n validation_validateFirebaseData('transaction failed: Data returned ', newVal, transaction.path);\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n var queueNode = this.transactionQueueTree_.subTree(path);\n var nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n queueNode.setValue(nodeQueue);\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n var priorityForNode = void 0;\n if ((typeof newVal === 'undefined' ? 'undefined' : Repo_transaction__typeof(newVal)) === 'object' && newVal !== null && Object(__WEBPACK_IMPORTED_MODULE_9__utils_obj__[\"b\" /* contains */])(newVal, '.priority')) {\n priorityForNode = Object(__WEBPACK_IMPORTED_MODULE_9__utils_obj__[\"l\" /* safeGet */])(newVal, '.priority');\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(isValidPriority(priorityForNode), 'Invalid priority returned by transaction. ' + 'Priority must be a valid string, finite number, server value, or null.');\n } else {\n var currentNode = this.serverSyncTree_.calcCompleteEventCache(path) || ChildrenNode_ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_nodeFromJSON(newVal, priorityForNode);\n var newNode = ServerValues_resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, transaction.currentWriteId, transaction.applyLocally);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n this.sendReadyTransactions_();\n }\n};\n/**\r\n * @param {!Path} path\r\n * @param {Array.=} excludeSets A specific set to exclude\r\n * @return {Node}\r\n * @private\r\n */\nRepo_Repo.prototype.getLatestState_ = function (path, excludeSets) {\n return this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) || ChildrenNode_ChildrenNode.EMPTY_NODE;\n};\n/**\r\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\r\n * complete.\r\n *\r\n * Externally it's called with no arguments, but it calls itself recursively with a particular\r\n * transactionQueueTree node to recurse through the tree.\r\n *\r\n * @param {Tree.>=} node transactionQueueTree node to start at.\r\n * @private\r\n */\nRepo_Repo.prototype.sendReadyTransactions_ = function (node) {\n var _this = this;\n if (node === void 0) {\n node = this.transactionQueueTree_;\n }\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n if (node.getValue() !== null) {\n var queue = this.buildTransactionQueue_(node);\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(queue.length > 0, 'Sending zero length transaction queue');\n var allRun = queue.every(function (transaction) {\n return transaction.status === TransactionStatus.RUN;\n });\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n } else if (node.hasChildren()) {\n node.forEachChild(function (childNode) {\n _this.sendReadyTransactions_(childNode);\n });\n }\n};\n/**\r\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\r\n *\r\n * @param {!Path} path The location of the queue.\r\n * @param {!Array.} queue Queue of transactions under the specified location.\r\n * @private\r\n */\nRepo_Repo.prototype.sendTransactionQueue_ = function (path, queue) {\n var _this = this;\n // Mark transactions as sent and increment retry count!\n var setsToIgnore = queue.map(function (txn) {\n return txn.currentWriteId;\n });\n var latestState = this.getLatestState_(path, setsToIgnore);\n var snapToSend = latestState;\n var latestHash = latestState.hash();\n for (var i = 0; i < queue.length; i++) {\n var txn = queue[i];\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(txn.status === TransactionStatus.RUN, 'tryToSendTransactionQueue_: items in queue should all be run.');\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n var relativePath = Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(relativePath /**@type {!Node} */, txn.currentOutputSnapshotRaw);\n }\n var dataToSend = snapToSend.val(true);\n var pathToSend = path;\n // Send the put.\n this.server_.put(pathToSend.toString(), dataToSend, function (status) {\n _this.log_('transaction put response', {\n path: pathToSend.toString(),\n status: status\n });\n var events = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(_this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId));\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n var node = queue[i].currentOutputSnapshotResolved;\n var ref = new Reference_Reference(_this, queue[i].path);\n var snapshot = new DataSnapshot_DataSnapshot(node, ref, PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, true, snapshot));\n }\n queue[i].unwatcher();\n }\n // Now remove the completed transactions.\n _this.pruneCompletedTransactionsBelowNode_(_this.transactionQueueTree_.subTree(path));\n // There may be pending transactions that we can now send.\n _this.sendReadyTransactions_();\n _this.eventQueue_.raiseEventsForChangedPath(path, events);\n // Finally, trigger onComplete callbacks.\n for (var i = 0; i < callbacks.length; i++) {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"m\" /* exceptionGuard */])(callbacks[i]);\n }\n } else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) queue[i].status = TransactionStatus.NEEDS_ABORT;else queue[i].status = TransactionStatus.RUN;\n }\n } else {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"B\" /* warn */])('transaction at ' + pathToSend.toString() + ' failed: ' + status);\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n _this.rerunTransactions_(path);\n }\n }, latestHash);\n};\n/**\r\n * Finds all transactions dependent on the data at changedPath and reruns them.\r\n *\r\n * Should be called any time cached data changes.\r\n *\r\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\r\n * be raised for.\r\n *\r\n * @param {!Path} changedPath The path in mergedData that changed.\r\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\r\n * @private\r\n */\nRepo_Repo.prototype.rerunTransactions_ = function (changedPath) {\n var rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n var path = rootMostTransactionNode.path();\n var queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n return path;\n};\n/**\r\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\r\n *\r\n * @param {Array.} queue The queue of transactions to run.\r\n * @param {!Path} path The path the queue is for.\r\n * @private\r\n */\nRepo_Repo.prototype.rerunTransactionQueue_ = function (queue, path) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n var events = [];\n // Ignore all of the sets we're going to re-run.\n var txnsToRerun = queue.filter(function (q) {\n return q.status === TransactionStatus.RUN;\n });\n var setsToIgnore = txnsToRerun.map(function (q) {\n return q.currentWriteId;\n });\n for (var i = 0; i < queue.length; i++) {\n var transaction = queue[i];\n var relativePath = Path.relativePath(path, transaction.path);\n var abortTransaction = false,\n abortReason = void 0;\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(relativePath !== null, 'rerunTransactionsUnderNode_: relativePath should not be null.');\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n } else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= Repo_Repo.MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n } else {\n // This code reruns a transaction\n var currentNode = this.getLatestState_(transaction.path, setsToIgnore);\n transaction.currentInputSnapshot = currentNode;\n var newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validation_validateFirebaseData('transaction failed: Data returned ', newData, transaction.path);\n var newDataNode = nodeFromJSON_nodeFromJSON(newData);\n var hasExplicitPriority = (typeof newData === 'undefined' ? 'undefined' : Repo_transaction__typeof(newData)) === 'object' && newData != null && Object(__WEBPACK_IMPORTED_MODULE_9__utils_obj__[\"b\" /* contains */])(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n var oldWriteId = transaction.currentWriteId;\n var serverValues = this.generateServerValues();\n var newNodeResolved = ServerValues_resolveDeferredValueSnapshot(newDataNode, serverValues);\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(this.serverSyncTree_.applyUserOverwrite(transaction.path, newNodeResolved, transaction.currentWriteId, transaction.applyLocally));\n events = events.concat(this.serverSyncTree_.ackUserWrite(oldWriteId, true));\n } else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function (unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n var ref = new Reference_Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n var lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n var snapshot = new DataSnapshot_DataSnapshot(lastInput, ref, PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n } else {\n callbacks.push(queue[i].onComplete.bind(null, new Error(abortReason), false, null));\n }\n }\n }\n }\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n // Now fire callbacks, now that we're in a good, known state.\n for (var i = 0; i < callbacks.length; i++) {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"m\" /* exceptionGuard */])(callbacks[i]);\n }\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n/**\r\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\r\n * the node for the given path if there are no pending transactions on any ancestor.\r\n *\r\n * @param {!Path} path The location to start at.\r\n * @return {!Tree.>} The rootmost node with a transaction.\r\n * @private\r\n */\nRepo_Repo.prototype.getAncestorTransactionNode_ = function (path) {\n var front;\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n var transactionNode = this.transactionQueueTree_;\n while ((front = path.getFront()) !== null && transactionNode.getValue() === null) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n return transactionNode;\n};\n/**\r\n * Builds the queue of all transactions at or below the specified transactionNode.\r\n *\r\n * @param {!Tree.>} transactionNode\r\n * @return {Array.} The generated queue.\r\n * @private\r\n */\nRepo_Repo.prototype.buildTransactionQueue_ = function (transactionNode) {\n // Walk any child transaction queues and aggregate them into a single queue.\n var transactionQueue = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function (a, b) {\n return a.order - b.order;\n });\n return transactionQueue;\n};\n/**\r\n * @param {!Tree.>} node\r\n * @param {Array.} queue\r\n * @private\r\n */\nRepo_Repo.prototype.aggregateTransactionQueuesForNode_ = function (node, queue) {\n var _this = this;\n var nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (var i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n node.forEachChild(function (child) {\n _this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n/**\r\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\r\n *\r\n * @param {!Tree.>} node\r\n * @private\r\n */\nRepo_Repo.prototype.pruneCompletedTransactionsBelowNode_ = function (node) {\n var _this = this;\n var queue = node.getValue();\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n node.forEachChild(function (childNode) {\n _this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n/**\r\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\r\n * since we consider them incompatible with transactions.\r\n *\r\n * @param {!Path} path Path for which we want to abort related transactions.\r\n * @return {!Path}\r\n * @private\r\n */\nRepo_Repo.prototype.abortTransactions_ = function (path) {\n var _this = this;\n var affectedPath = this.getAncestorTransactionNode_(path).path();\n var transactionNode = this.transactionQueueTree_.subTree(path);\n transactionNode.forEachAncestor(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n this.abortTransactionsOnNode_(transactionNode);\n transactionNode.forEachDescendant(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n return affectedPath;\n};\n/**\r\n * Abort transactions stored in this transaction queue node.\r\n *\r\n * @param {!Tree.>} node Node to abort transactions for.\r\n * @private\r\n */\nRepo_Repo.prototype.abortTransactionsOnNode_ = function (node) {\n var queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n var events = [];\n var lastSent = -1;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n } else if (queue[i].status === TransactionStatus.SENT) {\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(lastSent === i - 1, 'All SENT items should be at beginning of queue.');\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n } else {\n Object(Repo_transaction___WEBPACK_IMPORTED_MODULE_0__utils_assert__[\"a\" /* assert */])(queue[i].status === TransactionStatus.RUN, 'Unexpected transaction status in abort');\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true));\n if (queue[i].onComplete) {\n var snapshot = null;\n callbacks.push(queue[i].onComplete.bind(null, new Error('set'), false, snapshot));\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n } else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (var i = 0; i < callbacks.length; i++) {\n Object(__WEBPACK_IMPORTED_MODULE_6__util_util__[\"m\" /* exceptionGuard */])(callbacks[i]);\n }\n }\n};\n// CONCATENATED MODULE: ./src/database/core/RepoManager.ts\n/* harmony import */ var RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__ = __webpack_require__(2);\n/* harmony import */ var RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__ = __webpack_require__(1);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n/** @const {string} */\nvar DATABASE_URL_OPTION = 'databaseURL';\nvar _staticInstance;\n/**\r\n * Creates and caches Repo instances.\r\n */\nvar RepoManager_RepoManager = function () {\n function RepoManager() {\n /**\r\n * @private {!Object.}\r\n */\n this.repos_ = {};\n /**\r\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\r\n * @private {boolean}\r\n */\n this.useRestClient_ = false;\n }\n RepoManager.getInstance = function () {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n };\n // TODO(koss): Remove these functions unless used in tests?\n RepoManager.prototype.interrupt = function () {\n for (var repo in this.repos_) {\n this.repos_[repo].interrupt();\n }\n };\n RepoManager.prototype.resume = function () {\n for (var repo in this.repos_) {\n this.repos_[repo].resume();\n }\n };\n /**\r\n * This function should only ever be called to CREATE a new database instance.\r\n *\r\n * @param {!FirebaseApp} app\r\n * @return {!Database}\r\n */\n RepoManager.prototype.databaseFromApp = function (app) {\n var dbUrl = app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])(\"Can't determine Firebase Database URL. Be sure to include \" + DATABASE_URL_OPTION + ' option when calling firebase.intializeApp().');\n }\n var parsedUrl = parser_parseRepoInfo(dbUrl);\n var repoInfo = parsedUrl.repoInfo;\n validation_validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])('Database URL must point to the root of a Firebase Database ' + '(not including a child path).');\n }\n var repo = this.createRepo(repoInfo, app);\n return repo.database;\n };\n /**\r\n * Remove the repo and make sure it is disconnected.\r\n *\r\n * @param {!Repo} repo\r\n */\n RepoManager.prototype.deleteRepo = function (repo) {\n // This should never happen...\n if (Object(RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__[\"l\" /* safeGet */])(this.repos_, repo.app.name) !== repo) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])('Database ' + repo.app.name + ' has already been deleted.');\n }\n repo.interrupt();\n delete this.repos_[repo.app.name];\n };\n /**\r\n * Ensures a repo doesn't already exist and then creates one using the\r\n * provided app.\r\n *\r\n * @param {!RepoInfo} repoInfo The metadata about the Repo\r\n * @param {!FirebaseApp} app\r\n * @return {!Repo} The Repo object for the specified server / repoName.\r\n */\n RepoManager.prototype.createRepo = function (repoInfo, app) {\n var repo = Object(RepoManager___WEBPACK_IMPORTED_MODULE_0__utils_obj__[\"l\" /* safeGet */])(this.repos_, app.name);\n if (repo) {\n Object(RepoManager___WEBPACK_IMPORTED_MODULE_2__util_util__[\"o\" /* fatal */])('FIREBASE INTERNAL ERROR: Database initialized multiple times.');\n }\n repo = new Repo_Repo(repoInfo, this.useRestClient_, app);\n this.repos_[app.name] = repo;\n return repo;\n };\n /**\r\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\r\n * @param {boolean} forceRestClient\r\n */\n RepoManager.prototype.forceRestClient = function (forceRestClient) {\n this.useRestClient_ = forceRestClient;\n };\n return RepoManager;\n}();\n\n// CONCATENATED MODULE: ./src/database/api/Database.ts\n/* harmony import */ var Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__ = __webpack_require__(1);\n/* harmony import */ var Database___WEBPACK_IMPORTED_MODULE_3__utils_promise__ = __webpack_require__(4);\n/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\n\n\n\n\n\n\n\n/**\r\n * Class representing a firebase database.\r\n * @implements {FirebaseService}\r\n */\nvar Database_Database = function () {\n /**\r\n * The constructor should not be called by users of our public API.\r\n * @param {!Repo} repo_\r\n */\n function Database(repo_) {\n this.repo_ = repo_;\n if (!(repo_ instanceof Repo_Repo)) {\n Object(Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"o\" /* fatal */])(\"Don't call new Database() directly - please use firebase.database().\");\n }\n /** @type {Reference} */\n this.root_ = new Reference_Reference(repo_, Path.Empty);\n this.INTERNAL = new Database_DatabaseInternals(this);\n }\n Object.defineProperty(Database.prototype, \"app\", {\n get: function get() {\n return this.repo_.app;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Returns a reference to the root or the path specified in opt_pathString.\r\n * @param {string=} pathString\r\n * @return {!Reference} Firebase reference.\r\n */\n Database.prototype.ref = function (pathString) {\n this.checkDeleted_('ref');\n validateArgCount('database.ref', 0, 1, arguments.length);\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n };\n /**\r\n * Returns a reference to the root or the path specified in url.\r\n * We throw a exception if the url is not in the same domain as the\r\n * current repo.\r\n * @param {string} url\r\n * @return {!Reference} Firebase reference.\r\n */\n Database.prototype.refFromURL = function (url) {\n /** @const {string} */\n var apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n validateArgCount(apiName, 1, 1, arguments.length);\n var parsedURL = parser_parseRepoInfo(url);\n validation_validateUrl(apiName, 1, parsedURL);\n var repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== this.repo_.repoInfo_.host) {\n Object(Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"o\" /* fatal */])(apiName + ': Host name does not match the current database: ' + '(found ' + repoInfo.host + ' but expected ' + this.repo_.repoInfo_.host + ')');\n }\n return this.ref(parsedURL.path.toString());\n };\n /**\r\n * @param {string} apiName\r\n */\n Database.prototype.checkDeleted_ = function (apiName) {\n if (this.repo_ === null) {\n Object(Database___WEBPACK_IMPORTED_MODULE_0__core_util_util__[\"o\" /* fatal */])('Cannot call ' + apiName + ' on a deleted database.');\n }\n };\n // Make individual repo go offline.\n Database.prototype.goOffline = function () {\n validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n };\n Database.prototype.goOnline = function () {\n validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n };\n Database.ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n return Database;\n}();\n\nvar Database_DatabaseInternals = function () {\n /** @param {!Database} database */\n function DatabaseInternals(database) {\n this.database = database;\n }\n /** @return {Promise} */\n DatabaseInternals.prototype.delete = function () {\n this.database.checkDeleted_('delete');\n RepoManager_RepoManager.getInstance().deleteRepo(this.database.repo_);\n this.database.repo_ = null;\n this.database.root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return Database___WEBPACK_IMPORTED_MODULE_3__utils_promise__[\"b\" /* PromiseImpl */].resolve();\n };\n return DatabaseInternals;\n}();\n\n// CONCATENATED MODULE: ./src/database/api/internal.ts\nvar internal_namespaceObject = {};\n__webpack_require__.d(internal_namespaceObject, \"forceLongPolling\", function() { return internal_forceLongPolling; });\n__webpack_require__.d(internal_namespaceObject, \"forceWebSockets\", function() { return internal_forceWebSockets; });\n__webpack_require__.d(internal_namespaceObject, \"isWebSocketsAvailable\", function() { return isWebSocketsAvailable; });\n__webpack_require__.d(internal_namespaceObject, \"setSecurityDebugCallback\", function() { return setSecurityDebugCallback; });\n__webpack_require__.d(internal_namespaceObject, \"stats\", function() { return internal_stats; });\n__webpack_require__.d(internal_namespaceObject, \"statsIncrementCounter\", function() { return statsIncrementCounter; });\n__webpack_require__.d(internal_namespaceObject, \"dataUpdateCount\", function() { return dataUpdateCount; });\n__webpack_require__.d(internal_namespaceObject, \"interceptServerData\", function() { return interceptServerData; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__ = __webpack_require__(18);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/**\r\n * INTERNAL methods for internal-use only (tests, etc.).\r\n *\r\n * Customers shouldn't use these or else should be aware that they could break at any time.\r\n *\r\n * @const\r\n */\nvar internal_forceLongPolling = function forceLongPolling() {\n __WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__[\"a\" /* WebSocketConnection */].forceDisallow();\n BrowserPollConnection_BrowserPollConnection.forceAllow();\n};\nvar internal_forceWebSockets = function forceWebSockets() {\n BrowserPollConnection_BrowserPollConnection.forceDisallow();\n};\n/* Used by App Manager */\nvar isWebSocketsAvailable = function isWebSocketsAvailable() {\n return __WEBPACK_IMPORTED_MODULE_0__realtime_WebSocketConnection__[\"a\" /* WebSocketConnection */]['isAvailable']();\n};\nvar setSecurityDebugCallback = function setSecurityDebugCallback(ref, callback) {\n ref.repo.persistentConnection_.securityDebugCallback_ = callback;\n};\nvar internal_stats = function stats(ref, showDelta) {\n ref.repo.stats(showDelta);\n};\nvar statsIncrementCounter = function statsIncrementCounter(ref, metric) {\n ref.repo.statsIncrementCounter(metric);\n};\nvar dataUpdateCount = function dataUpdateCount(ref) {\n return ref.repo.dataUpdateCount;\n};\nvar interceptServerData = function interceptServerData(ref, callback) {\n return ref.repo.interceptServerData_(callback);\n};\n// CONCATENATED MODULE: ./src/database/api/test_access.ts\nvar test_access_namespaceObject = {};\n__webpack_require__.d(test_access_namespaceObject, \"DataConnection\", function() { return DataConnection; });\n__webpack_require__.d(test_access_namespaceObject, \"RealTimeConnection\", function() { return RealTimeConnection; });\n__webpack_require__.d(test_access_namespaceObject, \"hijackHash\", function() { return test_access_hijackHash; });\n__webpack_require__.d(test_access_namespaceObject, \"ConnectionTarget\", function() { return ConnectionTarget; });\n__webpack_require__.d(test_access_namespaceObject, \"queryIdentifier\", function() { return queryIdentifier; });\n__webpack_require__.d(test_access_namespaceObject, \"listens\", function() { return listens; });\n__webpack_require__.d(test_access_namespaceObject, \"forceRestClient\", function() { return test_access_forceRestClient; });\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\nvar DataConnection = PersistentConnection_PersistentConnection;\n/**\r\n * @param {!string} pathString\r\n * @param {function(*)} onComplete\r\n */\nPersistentConnection_PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n/**\r\n * @param {*} data\r\n * @param {function(*)} onEcho\r\n */\nPersistentConnection_PersistentConnection.prototype.echo = function (data, onEcho) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n// RealTimeConnection properties that we use in tests.\nvar RealTimeConnection = Connection_Connection;\n/**\r\n * @param {function(): string} newHash\r\n * @return {function()}\r\n */\nvar test_access_hijackHash = function hijackHash(newHash) {\n var oldPut = PersistentConnection_PersistentConnection.prototype.put;\n PersistentConnection_PersistentConnection.prototype.put = function (pathString, data, opt_onComplete, opt_hash) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function () {\n PersistentConnection_PersistentConnection.prototype.put = oldPut;\n };\n};\n/**\r\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\r\n */\nvar ConnectionTarget = RepoInfo;\n/**\r\n * @param {!Query} query\r\n * @return {!string}\r\n */\nvar queryIdentifier = function queryIdentifier(query) {\n return query.queryIdentifier();\n};\n/**\r\n * @param {!Query} firebaseRef\r\n * @return {!Object}\r\n */\nvar listens = function listens(firebaseRef) {\n return firebaseRef.repo.persistentConnection_.listens_;\n};\n/**\r\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\r\n *\r\n * @param {boolean} forceRestClient\r\n */\nvar test_access_forceRestClient = function forceRestClient(_forceRestClient) {\n RepoManager_RepoManager.getInstance().forceRestClient(_forceRestClient);\n};\n// CONCATENATED MODULE: ./src/database.ts\n/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (immutable) */ __webpack_exports__[\"registerDatabase\"] = registerDatabase;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__database_core_util_util__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_environment__ = __webpack_require__(6);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n\nfunction registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app) {\n return RepoManager_RepoManager.getInstance().databaseFromApp(app);\n },\n // firebase.database namespace properties\n {\n Reference: Reference_Reference,\n Query: Query_Query,\n Database: Database_Database,\n enableLogging: __WEBPACK_IMPORTED_MODULE_4__database_core_util_util__[\"j\" /* enableLogging */],\n INTERNAL: internal_namespaceObject,\n ServerValue: Database_Database.ServerValue,\n TEST_ACCESS: test_access_namespaceObject\n });\n if (Object(__WEBPACK_IMPORTED_MODULE_8__utils_environment__[\"b\" /* isNodeSdk */])()) {\n module.exports = namespace;\n }\n}\nregisterDatabase(__WEBPACK_IMPORTED_MODULE_0__app__[\"default\"]);\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(26)(module)))\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(originalModule) {\r\n\tif(!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true,\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n/***/ })\n],[25]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-database.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-database.js","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CONSTANTS } from './constants';\n\n/**\n * Throws an error if the provided assertion is falsy\n * @param {*} assertion The assertion to be tested for falsiness\n * @param {!string} message The message to display if the check fails\n */\nexport const assert = function(assertion, message) {\n if (!assertion) {\n throw assertionError(message);\n }\n};\n\n/**\n * Returns an Error object suitable for throwing.\n * @param {string} message\n * @return {!Error}\n */\nexport const assertionError = function(message) {\n return new Error(\n 'Firebase Database (' +\n CONSTANTS.SDK_VERSION +\n ') INTERNAL ASSERT FAILED: ' +\n message\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/assert.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { globalScope } from './globalScope';\n\nconst stringToByteArray = function(str) {\n var output = [],\n p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n while (c > 255) {\n output[p++] = c & 255;\n c >>= 8;\n }\n output[p++] = c;\n }\n return output;\n};\n\n/**\n * Turns an array of numbers into the string given by the concatenation of the\n * characters to which the numbers correspond.\n * @param {Array} bytes Array of numbers representing characters.\n * @return {string} Stringification of the array.\n */\nconst byteArrayToString = function(bytes) {\n var CHUNK_SIZE = 8192;\n\n // Special-case the simple case for speed's sake.\n if (bytes.length < CHUNK_SIZE) {\n return String.fromCharCode.apply(null, bytes);\n }\n\n // The remaining logic splits conversion by chunks since\n // Function#apply() has a maximum parameter count.\n // See discussion: http://goo.gl/LrWmZ9\n\n var str = '';\n for (var i = 0; i < bytes.length; i += CHUNK_SIZE) {\n var chunk = bytes.slice(i, i + CHUNK_SIZE);\n str += String.fromCharCode.apply(null, chunk);\n }\n return str;\n};\n\n// Static lookup maps, lazily populated by init_()\nexport const base64 = {\n /**\n * Maps bytes to characters.\n * @type {Object}\n * @private\n */\n byteToCharMap_: null,\n\n /**\n * Maps characters to bytes.\n * @type {Object}\n * @private\n */\n charToByteMap_: null,\n\n /**\n * Maps bytes to websafe characters.\n * @type {Object}\n * @private\n */\n byteToCharMapWebSafe_: null,\n\n /**\n * Maps websafe characters to bytes.\n * @type {Object}\n * @private\n */\n charToByteMapWebSafe_: null,\n\n /**\n * Our default alphabet, shared between\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\n * @type {string}\n */\n ENCODED_VALS_BASE:\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\n\n /**\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\n * @type {string}\n */\n get ENCODED_VALS() {\n return this.ENCODED_VALS_BASE + '+/=';\n },\n\n /**\n * Our websafe alphabet.\n * @type {string}\n */\n get ENCODED_VALS_WEBSAFE() {\n return this.ENCODED_VALS_BASE + '-_.';\n },\n\n /**\n * Whether this browser supports the atob and btoa functions. This extension\n * started at Mozilla but is now implemented by many browsers. We use the\n * ASSUME_* variables to avoid pulling in the full useragent detection library\n * but still allowing the standard per-browser compilations.\n *\n * @type {boolean}\n */\n HAS_NATIVE_SUPPORT: typeof globalScope.atob === 'function',\n\n /**\n * Base64-encode an array of bytes.\n *\n * @param {Array|Uint8Array} input An array of bytes (numbers with\n * value in [0, 255]) to encode.\n * @param {boolean=} opt_webSafe Boolean indicating we should use the\n * alternative alphabet.\n * @return {string} The base64 encoded string.\n */\n encodeByteArray(input, opt_webSafe?) {\n if (!Array.isArray(input)) {\n throw Error('encodeByteArray takes an array as a parameter');\n }\n\n this.init_();\n\n var byteToCharMap = opt_webSafe\n ? this.byteToCharMapWebSafe_\n : this.byteToCharMap_;\n\n var output = [];\n\n for (var i = 0; i < input.length; i += 3) {\n var byte1 = input[i];\n var haveByte2 = i + 1 < input.length;\n var byte2 = haveByte2 ? input[i + 1] : 0;\n var haveByte3 = i + 2 < input.length;\n var byte3 = haveByte3 ? input[i + 2] : 0;\n\n var outByte1 = byte1 >> 2;\n var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\n var outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\n var outByte4 = byte3 & 0x3f;\n\n if (!haveByte3) {\n outByte4 = 64;\n\n if (!haveByte2) {\n outByte3 = 64;\n }\n }\n\n output.push(\n byteToCharMap[outByte1],\n byteToCharMap[outByte2],\n byteToCharMap[outByte3],\n byteToCharMap[outByte4]\n );\n }\n\n return output.join('');\n },\n\n /**\n * Base64-encode a string.\n *\n * @param {string} input A string to encode.\n * @param {boolean=} opt_webSafe If true, we should use the\n * alternative alphabet.\n * @return {string} The base64 encoded string.\n */\n encodeString(input, opt_webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !opt_webSafe) {\n return btoa(input);\n }\n return this.encodeByteArray(stringToByteArray(input), opt_webSafe);\n },\n\n /**\n * Base64-decode a string.\n *\n * @param {string} input to decode.\n * @param {boolean=} opt_webSafe True if we should use the\n * alternative alphabet.\n * @return {string} string representing the decoded value.\n */\n decodeString(input, opt_webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !opt_webSafe) {\n return atob(input);\n }\n return byteArrayToString(this.decodeStringToByteArray(input, opt_webSafe));\n },\n\n /**\n * Base64-decode a string.\n *\n * In base-64 decoding, groups of four characters are converted into three\n * bytes. If the encoder did not apply padding, the input length may not\n * be a multiple of 4.\n *\n * In this case, the last group will have fewer than 4 characters, and\n * padding will be inferred. If the group has one or two characters, it decodes\n * to one byte. If the group has three characters, it decodes to two bytes.\n *\n * @param {string} input Input to decode.\n * @param {boolean=} opt_webSafe True if we should use the web-safe alphabet.\n * @return {!Array} bytes representing the decoded value.\n */\n decodeStringToByteArray(input, opt_webSafe) {\n this.init_();\n\n var charToByteMap = opt_webSafe\n ? this.charToByteMapWebSafe_\n : this.charToByteMap_;\n\n var output = [];\n\n for (var i = 0; i < input.length; ) {\n var byte1 = charToByteMap[input.charAt(i++)];\n\n var haveByte2 = i < input.length;\n var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\n ++i;\n\n var haveByte3 = i < input.length;\n var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n\n var haveByte4 = i < input.length;\n var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n\n if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\n throw Error();\n }\n\n var outByte1 = (byte1 << 2) | (byte2 >> 4);\n output.push(outByte1);\n\n if (byte3 != 64) {\n var outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\n output.push(outByte2);\n\n if (byte4 != 64) {\n var outByte3 = ((byte3 << 6) & 0xc0) | byte4;\n output.push(outByte3);\n }\n }\n }\n\n return output;\n },\n\n /**\n * Lazy static initialization function. Called before\n * accessing any of the static map variables.\n * @private\n */\n init_() {\n if (!this.byteToCharMap_) {\n this.byteToCharMap_ = {};\n this.charToByteMap_ = {};\n this.byteToCharMapWebSafe_ = {};\n this.charToByteMapWebSafe_ = {};\n\n // We want quick mappings back and forth, so we precompute two maps.\n for (var i = 0; i < this.ENCODED_VALS.length; i++) {\n this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\n this.charToByteMap_[this.byteToCharMap_[i]] = i;\n this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\n this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\n\n // Be forgiving when decoding and correctly decode both encodings.\n if (i >= this.ENCODED_VALS_BASE.length) {\n this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\n this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\n }\n }\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/crypt.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n// Copyright 2011 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Abstract cryptographic hash interface.\n *\n * See Sha1 and Md5 for sample implementations.\n *\n */\n\n/**\n * Create a cryptographic hash instance.\n *\n * @constructor\n * @struct\n */\nexport class Hash {\n /**\n * The block size for the hasher.\n * @type {number}\n */\n blockSize: number = -1;\n\n constructor() {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/hash.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Hash } from './hash';\n\n/**\n * @fileoverview SHA-1 cryptographic hash.\n * Variable names follow the notation in FIPS PUB 180-3:\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\n *\n * Usage:\n * var sha1 = new sha1();\n * sha1.update(bytes);\n * var hash = sha1.digest();\n *\n * Performance:\n * Chrome 23: ~400 Mbit/s\n * Firefox 16: ~250 Mbit/s\n *\n */\n\n/**\n * SHA-1 cryptographic hash constructor.\n *\n * The properties declared here are discussed in the above algorithm document.\n * @constructor\n * @extends {Hash}\n * @final\n * @struct\n */\nexport class Sha1 extends Hash {\n /**\n * Holds the previous values of accumulated variables a-e in the compress_\n * function.\n * @type {!Array}\n * @private\n */\n private chain_: Array = [];\n\n /**\n * A buffer holding the partially computed hash result.\n * @type {!Array}\n * @private\n */\n private buf_: Array = [];\n\n /**\n * An array of 80 bytes, each a part of the message to be hashed. Referred to\n * as the message schedule in the docs.\n * @type {!Array}\n * @private\n */\n private W_: Array = [];\n\n /**\n * Contains data needed to pad messages less than 64 bytes.\n * @type {!Array}\n * @private\n */\n private pad_: Array = [];\n\n /**\n * @private {number}\n */\n private inbuf_: number = 0;\n\n /**\n * @private {number}\n */\n private total_: number = 0;\n\n constructor() {\n super();\n\n this.blockSize = 512 / 8;\n\n this.pad_[0] = 128;\n for (var i = 1; i < this.blockSize; ++i) {\n this.pad_[i] = 0;\n }\n\n this.reset();\n }\n\n reset() {\n this.chain_[0] = 0x67452301;\n this.chain_[1] = 0xefcdab89;\n this.chain_[2] = 0x98badcfe;\n this.chain_[3] = 0x10325476;\n this.chain_[4] = 0xc3d2e1f0;\n\n this.inbuf_ = 0;\n this.total_ = 0;\n }\n\n /**\n * Internal compress helper function.\n * @param {!Array|!Uint8Array|string} buf Block to compress.\n * @param {number=} opt_offset Offset of the block in the buffer.\n * @private\n */\n compress_(buf, opt_offset?) {\n if (!opt_offset) {\n opt_offset = 0;\n }\n\n var W = this.W_;\n\n // get 16 big endian words\n if (typeof buf === 'string') {\n for (var i = 0; i < 16; i++) {\n // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\n // have a bug that turns the post-increment ++ operator into pre-increment\n // during JIT compilation. We have code that depends heavily on SHA-1 for\n // correctness and which is affected by this bug, so I've removed all uses\n // of post-increment ++ in which the result value is used. We can revert\n // this change once the Safari bug\n // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\n // most clients have been updated.\n W[i] =\n (buf.charCodeAt(opt_offset) << 24) |\n (buf.charCodeAt(opt_offset + 1) << 16) |\n (buf.charCodeAt(opt_offset + 2) << 8) |\n buf.charCodeAt(opt_offset + 3);\n opt_offset += 4;\n }\n } else {\n for (var i = 0; i < 16; i++) {\n W[i] =\n (buf[opt_offset] << 24) |\n (buf[opt_offset + 1] << 16) |\n (buf[opt_offset + 2] << 8) |\n buf[opt_offset + 3];\n opt_offset += 4;\n }\n }\n\n // expand to 80 words\n for (var i = 16; i < 80; i++) {\n var t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n W[i] = ((t << 1) | (t >>> 31)) & 0xffffffff;\n }\n\n var a = this.chain_[0];\n var b = this.chain_[1];\n var c = this.chain_[2];\n var d = this.chain_[3];\n var e = this.chain_[4];\n var f, k;\n\n // TODO(user): Try to unroll this loop to speed up the computation.\n for (var i = 0; i < 80; i++) {\n if (i < 40) {\n if (i < 20) {\n f = d ^ (b & (c ^ d));\n k = 0x5a827999;\n } else {\n f = b ^ c ^ d;\n k = 0x6ed9eba1;\n }\n } else {\n if (i < 60) {\n f = (b & c) | (d & (b | c));\n k = 0x8f1bbcdc;\n } else {\n f = b ^ c ^ d;\n k = 0xca62c1d6;\n }\n }\n\n var t = (((a << 5) | (a >>> 27)) + f + e + k + W[i]) & 0xffffffff;\n e = d;\n d = c;\n c = ((b << 30) | (b >>> 2)) & 0xffffffff;\n b = a;\n a = t;\n }\n\n this.chain_[0] = (this.chain_[0] + a) & 0xffffffff;\n this.chain_[1] = (this.chain_[1] + b) & 0xffffffff;\n this.chain_[2] = (this.chain_[2] + c) & 0xffffffff;\n this.chain_[3] = (this.chain_[3] + d) & 0xffffffff;\n this.chain_[4] = (this.chain_[4] + e) & 0xffffffff;\n }\n\n update(bytes, opt_length?) {\n // TODO(johnlenz): tighten the function signature and remove this check\n if (bytes == null) {\n return;\n }\n\n if (opt_length === undefined) {\n opt_length = bytes.length;\n }\n\n var lengthMinusBlock = opt_length - this.blockSize;\n var n = 0;\n // Using local instead of member variables gives ~5% speedup on Firefox 16.\n var buf = this.buf_;\n var inbuf = this.inbuf_;\n\n // The outer while loop should execute at most twice.\n while (n < opt_length) {\n // When we have no data in the block to top up, we can directly process the\n // input buffer (assuming it contains sufficient data). This gives ~25%\n // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\n // the data is provided in large chunks (or in multiples of 64 bytes).\n if (inbuf == 0) {\n while (n <= lengthMinusBlock) {\n this.compress_(bytes, n);\n n += this.blockSize;\n }\n }\n\n if (typeof bytes === 'string') {\n while (n < opt_length) {\n buf[inbuf] = bytes.charCodeAt(n);\n ++inbuf;\n ++n;\n if (inbuf == this.blockSize) {\n this.compress_(buf);\n inbuf = 0;\n // Jump to the outer loop so we use the full-block optimization.\n break;\n }\n }\n } else {\n while (n < opt_length) {\n buf[inbuf] = bytes[n];\n ++inbuf;\n ++n;\n if (inbuf == this.blockSize) {\n this.compress_(buf);\n inbuf = 0;\n // Jump to the outer loop so we use the full-block optimization.\n break;\n }\n }\n }\n }\n\n this.inbuf_ = inbuf;\n this.total_ += opt_length;\n }\n\n /** @override */\n digest() {\n var digest = [];\n var totalBits = this.total_ * 8;\n\n // Add pad 0x80 0x00*.\n if (this.inbuf_ < 56) {\n this.update(this.pad_, 56 - this.inbuf_);\n } else {\n this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\n }\n\n // Add # bits.\n for (var i = this.blockSize - 1; i >= 56; i--) {\n this.buf_[i] = totalBits & 255;\n totalBits /= 256; // Don't use bit-shifting here!\n }\n\n this.compress_(this.buf_);\n\n var n = 0;\n for (var i = 0; i < 5; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n digest[n] = (this.chain_[i] >> j) & 255;\n ++n;\n }\n }\n return digest;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/Sha1.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Query } from '../../api/Query';\n\ndeclare const window: any;\ndeclare const Windows: any;\n\nimport { assert } from '../../../utils/assert';\nimport { forEach } from '../../../utils/obj';\nimport { base64 } from '../../../utils/crypt';\nimport { Sha1 } from '../../../utils/Sha1';\nimport { stringToByteArray } from '../../../utils/utf8';\nimport { stringify } from '../../../utils/json';\nimport { SessionStorage } from '../storage/storage';\nimport { isNodeSdk } from '../../../utils/environment';\n\n/**\n * Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).\n * @type {function(): number} Generated ID.\n */\nexport const LUIDGenerator: (() => number) = (function() {\n let id = 1;\n return function() {\n return id++;\n };\n})();\n\n/**\n * URL-safe base64 encoding\n * @param {!string} str\n * @return {!string}\n */\nexport const base64Encode = function(str: string): string {\n const utf8Bytes = stringToByteArray(str);\n return base64.encodeByteArray(utf8Bytes, /*useWebSafe=*/ true);\n};\n\nlet BufferImpl;\nexport function setBufferImpl(impl) {\n BufferImpl = impl;\n}\n/**\n * URL-safe base64 decoding\n *\n * NOTE: DO NOT use the global atob() function - it does NOT support the\n * base64Url variant encoding.\n *\n * @param {string} str To be decoded\n * @return {?string} Decoded result, if possible\n */\nexport const base64Decode = function(str: string): string | null {\n try {\n if (BufferImpl) {\n return new BufferImpl(str, 'base64').toString('utf8');\n } else {\n return base64.decodeString(str, /*useWebSafe=*/ true);\n }\n } catch (e) {\n log('base64Decode failed: ', e);\n }\n return null;\n};\n\n/**\n * Sha1 hash of the input string\n * @param {!string} str The string to hash\n * @return {!string} The resulting hash\n */\nexport const sha1 = function(str: string): string {\n const utf8Bytes = stringToByteArray(str);\n const sha1 = new Sha1();\n sha1.update(utf8Bytes);\n const sha1Bytes = sha1.digest();\n return base64.encodeByteArray(sha1Bytes);\n};\n\n/**\n * @param {...*} var_args\n * @return {string}\n * @private\n */\nconst buildLogMessage_ = function(...var_args: any[]): string {\n let message = '';\n for (let i = 0; i < var_args.length; i++) {\n if (\n Array.isArray(var_args[i]) ||\n (var_args[i] &&\n typeof var_args[i] === 'object' &&\n typeof var_args[i].length === 'number')\n ) {\n message += buildLogMessage_.apply(null, var_args[i]);\n } else if (typeof var_args[i] === 'object') {\n message += stringify(var_args[i]);\n } else {\n message += var_args[i];\n }\n message += ' ';\n }\n\n return message;\n};\n\n/**\n * Use this for all debug messages in Firebase.\n * @type {?function(string)}\n */\nexport let logger: ((a: string) => void) | null = null;\n\n/**\n * Flag to check for log availability on first log message\n * @type {boolean}\n * @private\n */\nlet firstLog_ = true;\n\n/**\n * The implementation of Firebase.enableLogging (defined here to break dependencies)\n * @param {boolean|?function(string)} logger_ A flag to turn on logging, or a custom logger\n * @param {boolean=} persistent Whether or not to persist logging settings across refreshes\n */\nexport const enableLogging = function(\n logger_?: boolean | ((a: string) => void) | null,\n persistent?: boolean\n) {\n assert(\n !persistent || (logger_ === true || logger_ === false),\n \"Can't turn on custom loggers persistently.\"\n );\n if (logger_ === true) {\n if (typeof console !== 'undefined') {\n if (typeof console.log === 'function') {\n logger = console.log.bind(console);\n } else if (typeof console.log === 'object') {\n // IE does this.\n logger = function(message) {\n console.log(message);\n };\n }\n }\n if (persistent) SessionStorage.set('logging_enabled', true);\n } else if (typeof logger_ === 'function') {\n logger = logger_;\n } else {\n logger = null;\n SessionStorage.remove('logging_enabled');\n }\n};\n\n/**\n *\n * @param {...(string|Arguments)} var_args\n */\nexport const log = function(...var_args: string[]) {\n if (firstLog_ === true) {\n firstLog_ = false;\n if (logger === null && SessionStorage.get('logging_enabled') === true)\n enableLogging(true);\n }\n\n if (logger) {\n const message = buildLogMessage_.apply(null, var_args);\n logger(message);\n }\n};\n\n/**\n * @param {!string} prefix\n * @return {function(...[*])}\n */\nexport const logWrapper = function(\n prefix: string\n): (...var_args: any[]) => void {\n return function(...var_args: any[]) {\n log(prefix, ...var_args);\n };\n};\n\n/**\n * @param {...string} var_args\n */\nexport const error = function(...var_args: string[]) {\n if (typeof console !== 'undefined') {\n const message = 'FIREBASE INTERNAL ERROR: ' + buildLogMessage_(...var_args);\n if (typeof console.error !== 'undefined') {\n console.error(message);\n } else {\n console.log(message);\n }\n }\n};\n\n/**\n * @param {...string} var_args\n */\nexport const fatal = function(...var_args: string[]) {\n const message = buildLogMessage_(...var_args);\n throw new Error('FIREBASE FATAL ERROR: ' + message);\n};\n\n/**\n * @param {...*} var_args\n */\nexport const warn = function(...var_args: any[]) {\n if (typeof console !== 'undefined') {\n const message = 'FIREBASE WARNING: ' + buildLogMessage_(...var_args);\n if (typeof console.warn !== 'undefined') {\n console.warn(message);\n } else {\n console.log(message);\n }\n }\n};\n\n/**\n * Logs a warning if the containing page uses https. Called when a call to new Firebase\n * does not use https.\n */\nexport const warnIfPageIsSecure = function() {\n // Be very careful accessing browser globals. Who knows what may or may not exist.\n if (\n typeof window !== 'undefined' &&\n window.location &&\n window.location.protocol &&\n window.location.protocol.indexOf('https:') !== -1\n ) {\n warn(\n 'Insecure Firebase access from a secure page. ' +\n 'Please use https in calls to new Firebase().'\n );\n }\n};\n\n/**\n * @param {!String} methodName\n */\nexport const warnAboutUnsupportedMethod = function(methodName: string) {\n warn(\n methodName +\n ' is unsupported and will likely change soon. ' +\n 'Please do not use.'\n );\n};\n\n/**\n * Returns true if data is NaN, or +/- Infinity.\n * @param {*} data\n * @return {boolean}\n */\nexport const isInvalidJSONNumber = function(data: any): boolean {\n return (\n typeof data === 'number' &&\n (data != data || // NaN\n data == Number.POSITIVE_INFINITY ||\n data == Number.NEGATIVE_INFINITY)\n );\n};\n\n/**\n * @param {function()} fn\n */\nexport const executeWhenDOMReady = function(fn: () => void) {\n if (isNodeSdk() || document.readyState === 'complete') {\n fn();\n } else {\n // Modeled after jQuery. Try DOMContentLoaded and onreadystatechange (which\n // fire before onload), but fall back to onload.\n\n let called = false;\n let wrappedFn = function() {\n if (!document.body) {\n setTimeout(wrappedFn, Math.floor(10));\n return;\n }\n\n if (!called) {\n called = true;\n fn();\n }\n };\n\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', wrappedFn, false);\n // fallback to onload.\n window.addEventListener('load', wrappedFn, false);\n } else if ((document as any).attachEvent) {\n // IE.\n (document as any).attachEvent('onreadystatechange', function() {\n if (document.readyState === 'complete') wrappedFn();\n });\n // fallback to onload.\n (window as any).attachEvent('onload', wrappedFn);\n\n // jQuery has an extra hack for IE that we could employ (based on\n // http://javascript.nwbox.com/IEContentLoaded/) But it looks really old.\n // I'm hoping we don't need it.\n }\n }\n};\n\n/**\n * Minimum key name. Invalid for actual data, used as a marker to sort before any valid names\n * @type {!string}\n */\nexport const MIN_NAME = '[MIN_NAME]';\n\n/**\n * Maximum key name. Invalid for actual data, used as a marker to sort above any valid names\n * @type {!string}\n */\nexport const MAX_NAME = '[MAX_NAME]';\n\n/**\n * Compares valid Firebase key names, plus min and max name\n * @param {!string} a\n * @param {!string} b\n * @return {!number}\n */\nexport const nameCompare = function(a: string, b: string): number {\n if (a === b) {\n return 0;\n } else if (a === MIN_NAME || b === MAX_NAME) {\n return -1;\n } else if (b === MIN_NAME || a === MAX_NAME) {\n return 1;\n } else {\n const aAsInt = tryParseInt(a),\n bAsInt = tryParseInt(b);\n\n if (aAsInt !== null) {\n if (bAsInt !== null) {\n return aAsInt - bAsInt == 0 ? a.length - b.length : aAsInt - bAsInt;\n } else {\n return -1;\n }\n } else if (bAsInt !== null) {\n return 1;\n } else {\n return a < b ? -1 : 1;\n }\n }\n};\n\n/**\n * @param {!string} a\n * @param {!string} b\n * @return {!number} comparison result.\n */\nexport const stringCompare = function(a: string, b: string): number {\n if (a === b) {\n return 0;\n } else if (a < b) {\n return -1;\n } else {\n return 1;\n }\n};\n\n/**\n * @param {string} key\n * @param {Object} obj\n * @return {*}\n */\nexport const requireKey = function(\n key: string,\n obj: { [k: string]: any }\n): any {\n if (obj && key in obj) {\n return obj[key];\n } else {\n throw new Error(\n 'Missing required key (' + key + ') in object: ' + stringify(obj)\n );\n }\n};\n\n/**\n * @param {*} obj\n * @return {string}\n */\nexport const ObjectToUniqueKey = function(obj: any): string {\n if (typeof obj !== 'object' || obj === null) return stringify(obj);\n\n const keys = [];\n for (let k in obj) {\n keys.push(k);\n }\n\n // Export as json, but with the keys sorted.\n keys.sort();\n let key = '{';\n for (let i = 0; i < keys.length; i++) {\n if (i !== 0) key += ',';\n key += stringify(keys[i]);\n key += ':';\n key += ObjectToUniqueKey(obj[keys[i]]);\n }\n\n key += '}';\n return key;\n};\n\n/**\n * Splits a string into a number of smaller segments of maximum size\n * @param {!string} str The string\n * @param {!number} segsize The maximum number of chars in the string.\n * @return {Array.} The string, split into appropriately-sized chunks\n */\nexport const splitStringBySize = function(\n str: string,\n segsize: number\n): string[] {\n const len = str.length;\n\n if (len <= segsize) {\n return [str];\n }\n\n const dataSegs = [];\n for (let c = 0; c < len; c += segsize) {\n if (c + segsize > len) {\n dataSegs.push(str.substring(c, len));\n } else {\n dataSegs.push(str.substring(c, c + segsize));\n }\n }\n return dataSegs;\n};\n\n/**\n * Apply a function to each (key, value) pair in an object or\n * apply a function to each (index, value) pair in an array\n * @param {!(Object|Array)} obj The object or array to iterate over\n * @param {function(?, ?)} fn The function to apply\n */\nexport const each = function(\n obj: Object | Array,\n fn: (v?: any, k?: any) => void\n) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; ++i) {\n fn(i, obj[i]);\n }\n } else {\n /**\n * in the conversion of code we removed the goog.object.forEach\n * function which did a value,key callback. We standardized on\n * a single impl that does a key, value callback. So we invert\n * to not have to touch the `each` code points\n */\n forEach(obj, (key: any, val: any) => fn(val, key));\n }\n};\n\n/**\n * Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.\n * @param {function(*)} callback Callback function.\n * @param {?Object=} context Optional context to bind to.\n * @return {function(*)}\n */\nexport const bindCallback = function(\n callback: (a: any) => void,\n context?: object | null\n): Function {\n return context ? callback.bind(context) : callback;\n};\n\n/**\n * Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)\n * I made one modification at the end and removed the NaN / Infinity\n * handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.\n * @param {!number} v A double\n * @return {string}\n */\nexport const doubleToIEEE754String = function(v: number): string {\n assert(!isInvalidJSONNumber(v), 'Invalid JSON number'); // MJL\n\n const ebits = 11,\n fbits = 52;\n let bias = (1 << (ebits - 1)) - 1,\n s,\n e,\n f,\n ln,\n i,\n bits,\n str;\n\n // Compute sign, exponent, fraction\n // Skip NaN / Infinity handling --MJL.\n if (v === 0) {\n e = 0;\n f = 0;\n s = 1 / v === -Infinity ? 1 : 0;\n } else {\n s = v < 0;\n v = Math.abs(v);\n\n if (v >= Math.pow(2, 1 - bias)) {\n // Normalized\n ln = Math.min(Math.floor(Math.log(v) / Math.LN2), bias);\n e = ln + bias;\n f = Math.round(v * Math.pow(2, fbits - ln) - Math.pow(2, fbits));\n } else {\n // Denormalized\n e = 0;\n f = Math.round(v / Math.pow(2, 1 - bias - fbits));\n }\n }\n\n // Pack sign, exponent, fraction\n bits = [];\n for (i = fbits; i; i -= 1) {\n bits.push(f % 2 ? 1 : 0);\n f = Math.floor(f / 2);\n }\n for (i = ebits; i; i -= 1) {\n bits.push(e % 2 ? 1 : 0);\n e = Math.floor(e / 2);\n }\n bits.push(s ? 1 : 0);\n bits.reverse();\n str = bits.join('');\n\n // Return the data as a hex string. --MJL\n let hexByteString = '';\n for (i = 0; i < 64; i += 8) {\n let hexByte = parseInt(str.substr(i, 8), 2).toString(16);\n if (hexByte.length === 1) hexByte = '0' + hexByte;\n hexByteString = hexByteString + hexByte;\n }\n return hexByteString.toLowerCase();\n};\n\n/**\n * Used to detect if we're in a Chrome content script (which executes in an\n * isolated environment where long-polling doesn't work).\n * @return {boolean}\n */\nexport const isChromeExtensionContentScript = function(): boolean {\n return !!(\n typeof window === 'object' &&\n window['chrome'] &&\n window['chrome']['extension'] &&\n !/^chrome/.test(window.location.href)\n );\n};\n\n/**\n * Used to detect if we're in a Windows 8 Store app.\n * @return {boolean}\n */\nexport const isWindowsStoreApp = function(): boolean {\n // Check for the presence of a couple WinRT globals\n return typeof Windows === 'object' && typeof Windows.UI === 'object';\n};\n\n/**\n * Converts a server error code to a Javascript Error\n * @param {!string} code\n * @param {!Query} query\n * @return {Error}\n */\nexport const errorForServerCode = function(code: string, query: Query): Error {\n let reason = 'Unknown Error';\n if (code === 'too_big') {\n reason =\n 'The data requested exceeds the maximum size ' +\n 'that can be accessed with a single request.';\n } else if (code == 'permission_denied') {\n reason = \"Client doesn't have permission to access the desired data.\";\n } else if (code == 'unavailable') {\n reason = 'The service is unavailable';\n }\n\n const error = new Error(\n code + ' at ' + query.path.toString() + ': ' + reason\n );\n (error as any).code = code.toUpperCase();\n return error;\n};\n\n/**\n * Used to test for integer-looking strings\n * @type {RegExp}\n * @private\n */\nexport const INTEGER_REGEXP_ = new RegExp('^-?\\\\d{1,10}$');\n\n/**\n * If the string contains a 32-bit integer, return it. Else return null.\n * @param {!string} str\n * @return {?number}\n */\nexport const tryParseInt = function(str: string): number | null {\n if (INTEGER_REGEXP_.test(str)) {\n const intVal = Number(str);\n if (intVal >= -2147483648 && intVal <= 2147483647) {\n return intVal;\n }\n }\n return null;\n};\n\n/**\n * Helper to run some code but catch any exceptions and re-throw them later.\n * Useful for preventing user callbacks from breaking internal code.\n *\n * Re-throwing the exception from a setTimeout is a little evil, but it's very\n * convenient (we don't have to try to figure out when is a safe point to\n * re-throw it), and the behavior seems reasonable:\n *\n * * If you aren't pausing on exceptions, you get an error in the console with\n * the correct stack trace.\n * * If you're pausing on all exceptions, the debugger will pause on your\n * exception and then again when we rethrow it.\n * * If you're only pausing on uncaught exceptions, the debugger will only pause\n * on us re-throwing it.\n *\n * @param {!function()} fn The code to guard.\n */\nexport const exceptionGuard = function(fn: () => void) {\n try {\n fn();\n } catch (e) {\n // Re-throw exception when it's safe.\n setTimeout(function() {\n // It used to be that \"throw e\" would result in a good console error with\n // relevant context, but as of Chrome 39, you just get the firebase.js\n // file/line number where we re-throw it, which is useless. So we log\n // e.stack explicitly.\n const stack = e.stack || '';\n warn('Exception was thrown by user callback.', stack);\n throw e;\n }, Math.floor(0));\n }\n};\n\n/**\n * Helper function to safely call opt_callback with the specified arguments. It:\n * 1. Turns into a no-op if opt_callback is null or undefined.\n * 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.\n *\n * @param {?Function=} callback Optional onComplete callback.\n * @param {...*} var_args Arbitrary args to be passed to opt_onComplete\n */\nexport const callUserCallback = function(\n callback?: Function | null,\n ...var_args: any[]\n) {\n if (typeof callback === 'function') {\n exceptionGuard(function() {\n callback(...var_args);\n });\n }\n};\n\n/**\n * @return {boolean} true if we think we're currently being crawled.\n */\nexport const beingCrawled = function(): boolean {\n const userAgent =\n (typeof window === 'object' &&\n window['navigator'] &&\n window['navigator']['userAgent']) ||\n '';\n\n // For now we whitelist the most popular crawlers. We should refine this to be the set of crawlers we\n // believe to support JavaScript/AJAX rendering.\n // NOTE: Google Webmaster Tools doesn't really belong, but their \"This is how a visitor to your website\n // would have seen the page\" is flaky if we don't treat it as a crawler.\n return (\n userAgent.search(\n /googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i\n ) >= 0\n );\n};\n\n/**\n * Export a property of an object using a getter function.\n *\n * @param {!Object} object\n * @param {string} name\n * @param {!function(): *} fnGet\n */\nexport const exportPropGetter = function(\n object: Object,\n name: string,\n fnGet: () => any\n) {\n Object.defineProperty(object, name, { get: fnGet });\n};\n\n/**\n * Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.\n *\n * It is removed with clearTimeout() as normal.\n *\n * @param {Function} fn Function to run.\n * @param {number} time Milliseconds to wait before running.\n * @return {number|Object} The setTimeout() return value.\n */\nexport const setTimeoutNonBlocking = function(\n fn: Function,\n time: number\n): number | Object {\n const timeout: number | Object = setTimeout(fn, time);\n if (typeof timeout === 'object' && (timeout as any)['unref']) {\n (timeout as any)['unref']();\n }\n return timeout;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/util.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n// See http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/\n\nexport const contains = function(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nexport const safeGet = function(obj, key) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) return obj[key];\n // else return undefined.\n};\n\n/**\n * Enumerates the keys/values in an object, excluding keys defined on the prototype.\n *\n * @param {?Object.} obj Object to enumerate.\n * @param {!function(K, V)} fn Function to call for each key and value.\n * @template K,V\n */\nexport const forEach = function(obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn(key, obj[key]);\n }\n }\n};\n\n/**\n * Copies all the (own) properties from one object to another.\n * @param {!Object} objTo\n * @param {!Object} objFrom\n * @return {!Object} objTo\n */\nexport const extend = function(objTo, objFrom) {\n forEach(objFrom, function(key, value) {\n objTo[key] = value;\n });\n return objTo;\n};\n\n/**\n * Returns a clone of the specified object.\n * @param {!Object} obj\n * @return {!Object} cloned obj.\n */\nexport const clone = function(obj) {\n return extend({}, obj);\n};\n\n/**\n * Returns true if obj has typeof \"object\" and is not null. Unlike goog.isObject(), does not return true\n * for functions.\n *\n * @param obj {*} A potential object.\n * @returns {boolean} True if it's an object.\n */\nexport const isNonNullObject = function(obj) {\n return typeof obj === 'object' && obj !== null;\n};\n\nexport const isEmpty = function(obj) {\n for (var key in obj) {\n return false;\n }\n return true;\n};\n\nexport const getCount = function(obj) {\n var rv = 0;\n for (var key in obj) {\n rv++;\n }\n return rv;\n};\n\nexport const map = function(obj, f, opt_obj?) {\n var res = {};\n for (var key in obj) {\n res[key] = f.call(opt_obj, obj[key], key, obj);\n }\n return res;\n};\n\nexport const findKey = function(obj, fn, opt_this?) {\n for (var key in obj) {\n if (fn.call(opt_this, obj[key], key, obj)) {\n return key;\n }\n }\n return undefined;\n};\n\nexport const findValue = function(obj, fn, opt_this?) {\n var key = findKey(obj, fn, opt_this);\n return key && obj[key];\n};\n\nexport const getAnyKey = function(obj) {\n for (var key in obj) {\n return key;\n }\n};\n\nexport const getValues = function(obj) {\n var res = [];\n var i = 0;\n for (var key in obj) {\n res[i++] = obj[key];\n }\n return res;\n};\n\n/**\n * Tests whether every key/value pair in an object pass the test implemented\n * by the provided function\n *\n * @param {?Object.} obj Object to test.\n * @param {!function(K, V)} fn Function to call for each key and value.\n * @template K,V\n */\nexport const every = function(\n obj: Object,\n fn: (k: string, v?: V) => boolean\n): boolean {\n for (let key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n if (!fn(key, obj[key])) {\n return false;\n }\n }\n }\n return true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/obj.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * Evaluates a JSON string into a javascript object.\n *\n * @param {string} str A string containing JSON.\n * @return {*} The javascript object representing the specified JSON.\n */\nexport const jsonEval = function(str) {\n return JSON.parse(str);\n};\n\n/**\n * Returns JSON representing a javascript object.\n * @param {*} data Javascript object to be stringified.\n * @return {string} The JSON contents of the object.\n */\nexport const stringify = function(data) {\n return JSON.stringify(data);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/json.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CONSTANTS } from './constants';\n\n/**\n * Returns navigator.userAgent string or '' if it's not defined.\n * @return {string} user agent string\n */\nexport const getUA = function() {\n if (\n typeof navigator !== 'undefined' &&\n typeof navigator['userAgent'] === 'string'\n ) {\n return navigator['userAgent'];\n } else {\n return '';\n }\n};\n\n/**\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\n *\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap in the Ripple emulator) nor\n * Cordova `onDeviceReady`, which would normally wait for a callback.\n *\n * @return {boolean} isMobileCordova\n */\nexport const isMobileCordova = function() {\n return (\n typeof window !== 'undefined' &&\n !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&\n /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA())\n );\n};\n\n/**\n * Detect React Native.\n *\n * @return {boolean} True if ReactNative environment is detected.\n */\nexport const isReactNative = function() {\n return (\n typeof navigator === 'object' && navigator['product'] === 'ReactNative'\n );\n};\n\n/**\n * Detect Node.js.\n *\n * @return {boolean} True if Node.js environment is detected.\n */\nexport const isNodeSdk = function() {\n return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/environment.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.\n */\n\nexport const CONSTANTS = {\n /**\n * @define {boolean} Whether this is the client Node.js SDK.\n */\n NODE_CLIENT: false,\n /**\n * @define {boolean} Whether this is the Admin Node.js SDK.\n */\n NODE_ADMIN: false,\n\n /**\n * Firebase SDK Version\n */\n SDK_VERSION: '4.2.0'\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/constants.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { jsonEval, stringify } from '../../../utils/json';\n\n/**\n * Wraps a DOM Storage object and:\n * - automatically encode objects as JSON strings before storing them to allow us to store arbitrary types.\n * - prefixes names with \"firebase:\" to avoid collisions with app data.\n *\n * We automatically (see storage.js) create two such wrappers, one for sessionStorage,\n * and one for localStorage.\n *\n * @constructor\n */\nexport class DOMStorageWrapper {\n // Use a prefix to avoid collisions with other stuff saved by the app.\n private prefix_ = 'firebase:';\n\n /**\n * @param {Storage} domStorage_ The underlying storage object (e.g. localStorage or sessionStorage)\n */\n constructor(private domStorage_: Storage) {}\n\n /**\n * @param {string} key The key to save the value under\n * @param {?Object} value The value being stored, or null to remove the key.\n */\n set(key: string, value: any | null) {\n if (value == null) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n } else {\n this.domStorage_.setItem(this.prefixedName_(key), stringify(value));\n }\n }\n\n /**\n * @param {string} key\n * @return {*} The value that was stored under this key, or null\n */\n get(key: string): any {\n const storedVal = this.domStorage_.getItem(this.prefixedName_(key));\n if (storedVal == null) {\n return null;\n } else {\n return jsonEval(storedVal);\n }\n }\n\n /**\n * @param {string} key\n */\n remove(key: string) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n }\n\n isInMemoryStorage: boolean;\n\n /**\n * @param {string} name\n * @return {string}\n */\n prefixedName_(name: string): string {\n return this.prefix_ + name;\n }\n\n toString(): string {\n return this.domStorage_.toString();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/storage/DOMStorageWrapper.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { contains } from '../../../utils/obj';\n\n/**\n * An in-memory storage implementation that matches the API of DOMStorageWrapper\n * (TODO: create interface for both to implement).\n *\n * @constructor\n */\nexport class MemoryStorage {\n private cache_: { [k: string]: any } = {};\n\n set(key: string, value: any | null) {\n if (value == null) {\n delete this.cache_[key];\n } else {\n this.cache_[key] = value;\n }\n }\n\n get(key: string): any {\n if (contains(this.cache_, key)) {\n return this.cache_[key];\n }\n return null;\n }\n\n remove(key: string) {\n delete this.cache_[key];\n }\n\n isInMemoryStorage = true;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/storage/MemoryStorage.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { DOMStorageWrapper } from './DOMStorageWrapper';\nimport { MemoryStorage } from './MemoryStorage';\n\ndeclare const window: any;\n\n/**\n* Helper to create a DOMStorageWrapper or else fall back to MemoryStorage.\n* TODO: Once MemoryStorage and DOMStorageWrapper have a shared interface this method annotation should change\n* to reflect this type\n*\n* @param {string} domStorageName Name of the underlying storage object\n* (e.g. 'localStorage' or 'sessionStorage').\n* @return {?} Turning off type information until a common interface is defined.\n*/\nconst createStoragefor = function(\n domStorageName: string\n): DOMStorageWrapper | MemoryStorage {\n try {\n // NOTE: just accessing \"localStorage\" or \"window['localStorage']\" may throw a security exception,\n // so it must be inside the try/catch.\n if (\n typeof window !== 'undefined' &&\n typeof window[domStorageName] !== 'undefined'\n ) {\n // Need to test cache. Just because it's here doesn't mean it works\n const domStorage = window[domStorageName];\n domStorage.setItem('firebase:sentinel', 'cache');\n domStorage.removeItem('firebase:sentinel');\n return new DOMStorageWrapper(domStorage);\n }\n } catch (e) {}\n\n // Failed to create wrapper. Just return in-memory storage.\n // TODO: log?\n return new MemoryStorage();\n};\n\n/** A storage object that lasts across sessions */\nexport const PersistentStorage = createStoragefor('localStorage');\n\n/** A storage object that only lasts one session */\nexport const SessionStorage = createStoragefor('sessionStorage');\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/storage/storage.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nexport const PROTOCOL_VERSION = '5';\n\nexport const VERSION_PARAM = 'v';\n\nexport const TRANSPORT_SESSION_PARAM = 's';\n\nexport const REFERER_PARAM = 'r';\n\nexport const FORGE_REF = 'f';\n\nexport const FORGE_DOMAIN = 'firebaseio.com';\n\nexport const LAST_SESSION_PARAM = 'ls';\n\nexport const WEBSOCKET = 'websocket';\n\nexport const LONG_POLLING = 'long_polling';\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/Constants.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from './assert';\n\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\n// so it's been modified.\n\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\n// use 2 characters in Javascript. All 4-byte UTF-8 characters begin with a first\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\n// pair).\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\n\n/**\n * @param {string} str\n * @return {Array}\n */\nexport const stringToByteArray = function(str) {\n var out = [],\n p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n\n // Is this the lead surrogate in a surrogate pair?\n if (c >= 0xd800 && c <= 0xdbff) {\n var high = c - 0xd800; // the high 10 bits.\n i++;\n assert(i < str.length, 'Surrogate pair missing trail surrogate.');\n var low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\n c = 0x10000 + (high << 10) + low;\n }\n\n if (c < 128) {\n out[p++] = c;\n } else if (c < 2048) {\n out[p++] = (c >> 6) | 192;\n out[p++] = (c & 63) | 128;\n } else if (c < 65536) {\n out[p++] = (c >> 12) | 224;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n } else {\n out[p++] = (c >> 18) | 240;\n out[p++] = ((c >> 12) & 63) | 128;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n }\n return out;\n};\n\n/**\n * Calculate length without actually converting; useful for doing cheaper validation.\n * @param {string} str\n * @return {number}\n */\nexport const stringLength = function(str) {\n var p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c < 128) {\n p++;\n } else if (c < 2048) {\n p += 2;\n } else if (c >= 0xd800 && c <= 0xdbff) {\n // Lead surrogate of a surrogate pair. The pair together will take 4 bytes to represent.\n p += 4;\n i++; // skip trail surrogate.\n } else {\n p += 3;\n }\n }\n return p;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/utf8.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { deepCopy } from '../../../utils/deep_copy';\nimport { contains } from '../../../utils/obj';\n\n/**\n * Tracks a collection of stats.\n *\n * @constructor\n */\nexport class StatsCollection {\n private counters_: { [k: string]: number } = {};\n\n incrementCounter(name: string, amount: number = 1) {\n if (!contains(this.counters_, name)) this.counters_[name] = 0;\n\n this.counters_[name] += amount;\n }\n\n get() {\n return deepCopy(this.counters_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsCollection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { StatsCollection } from './StatsCollection';\nimport { RepoInfo } from '../RepoInfo';\n\nexport class StatsManager {\n private static collections_: { [k: string]: StatsCollection } = {};\n private static reporters_: { [k: string]: any } = {};\n\n static getCollection(repoInfo: RepoInfo): StatsCollection {\n const hashString = repoInfo.toString();\n\n if (!this.collections_[hashString]) {\n this.collections_[hashString] = new StatsCollection();\n }\n\n return this.collections_[hashString];\n }\n\n static getOrCreateReporter(\n repoInfo: RepoInfo,\n creatorFunction: () => T\n ): T {\n const hashString = repoInfo.toString();\n\n if (!this.reporters_[hashString]) {\n this.reporters_[hashString] = creatorFunction();\n }\n\n return this.reporters_[hashString];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsManager.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { RepoInfo } from '../core/RepoInfo';\n\ndeclare const MozWebSocket: any;\n\nimport firebase from '../../app';\nimport { assert } from '../../utils/assert';\nimport { logWrapper, splitStringBySize } from '../core/util/util';\nimport { StatsManager } from '../core/stats/StatsManager';\nimport {\n FORGE_DOMAIN,\n FORGE_REF,\n LAST_SESSION_PARAM,\n PROTOCOL_VERSION,\n REFERER_PARAM,\n TRANSPORT_SESSION_PARAM,\n VERSION_PARAM,\n WEBSOCKET\n} from './Constants';\nimport { CONSTANTS as ENV_CONSTANTS } from '../../utils/constants';\nimport { PersistentStorage } from '../core/storage/storage';\nimport { jsonEval, stringify } from '../../utils/json';\nimport { isNodeSdk } from '../../utils/environment';\nimport { Transport } from './Transport';\nimport { StatsCollection } from '../core/stats/StatsCollection';\n\nconst WEBSOCKET_MAX_FRAME_SIZE = 16384;\nconst WEBSOCKET_KEEPALIVE_INTERVAL = 45000;\n\nlet WebSocketImpl = null;\nif (typeof MozWebSocket !== 'undefined') {\n WebSocketImpl = MozWebSocket;\n} else if (typeof WebSocket !== 'undefined') {\n WebSocketImpl = WebSocket;\n}\n\nexport function setWebSocketImpl(impl) {\n WebSocketImpl = impl;\n}\n\n/**\n * Create a new websocket connection with the given callbacks.\n * @constructor\n * @implements {Transport}\n */\nexport class WebSocketConnection implements Transport {\n keepaliveTimer: number | null = null;\n frames: string[] | null = null;\n totalFrames = 0;\n bytesSent = 0;\n bytesReceived = 0;\n connURL: string;\n onDisconnect: (a?: boolean) => void;\n onMessage: (msg: Object) => void;\n mySock: any | null;\n private log_: (...a: any[]) => void;\n private stats_: StatsCollection;\n private everConnected_: boolean;\n private isClosed_: boolean;\n\n /**\n * @param {string} connId identifier for this transport\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n */\n constructor(\n public connId: string,\n repoInfo: RepoInfo,\n transportSessionId?: string,\n lastSessionId?: string\n ) {\n this.log_ = logWrapper(this.connId);\n this.stats_ = StatsManager.getCollection(repoInfo);\n this.connURL = WebSocketConnection.connectionURL_(\n repoInfo,\n transportSessionId,\n lastSessionId\n );\n }\n\n /**\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n * @return {string} connection url\n * @private\n */\n private static connectionURL_(\n repoInfo: RepoInfo,\n transportSessionId?: string,\n lastSessionId?: string\n ): string {\n const urlParams: { [k: string]: string } = {};\n urlParams[VERSION_PARAM] = PROTOCOL_VERSION;\n\n if (\n !isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(FORGE_DOMAIN) !== -1\n ) {\n urlParams[REFERER_PARAM] = FORGE_REF;\n }\n if (transportSessionId) {\n urlParams[TRANSPORT_SESSION_PARAM] = transportSessionId;\n }\n if (lastSessionId) {\n urlParams[LAST_SESSION_PARAM] = lastSessionId;\n }\n return repoInfo.connectionURL(WEBSOCKET, urlParams);\n }\n\n /**\n *\n * @param onMessage Callback when messages arrive\n * @param onDisconnect Callback with connection lost.\n */\n open(onMessage: (msg: Object) => void, onDisconnect: (a?: boolean) => void) {\n this.onDisconnect = onDisconnect;\n this.onMessage = onMessage;\n\n this.log_('Websocket connecting to ' + this.connURL);\n\n this.everConnected_ = false;\n // Assume failure until proven otherwise.\n PersistentStorage.set('previous_websocket_failure', true);\n\n try {\n if (isNodeSdk()) {\n const device = ENV_CONSTANTS.NODE_ADMIN ? 'AdminNode' : 'Node';\n // UA Format: Firebase////\n const options: { [k: string]: object } = {\n headers: {\n 'User-Agent': `Firebase/${PROTOCOL_VERSION}/${firebase.SDK_VERSION}/${process.platform}/${device}`\n }\n };\n\n // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.\n const env = process['env'];\n const proxy =\n this.connURL.indexOf('wss://') == 0\n ? env['HTTPS_PROXY'] || env['https_proxy']\n : env['HTTP_PROXY'] || env['http_proxy'];\n\n if (proxy) {\n options['proxy'] = { origin: proxy };\n }\n\n this.mySock = new WebSocketImpl(this.connURL, [], options);\n } else {\n this.mySock = new WebSocketImpl(this.connURL);\n }\n } catch (e) {\n this.log_('Error instantiating WebSocket.');\n const error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n return;\n }\n\n this.mySock.onopen = () => {\n this.log_('Websocket connected.');\n this.everConnected_ = true;\n };\n\n this.mySock.onclose = () => {\n this.log_('Websocket connection was disconnected.');\n this.mySock = null;\n this.onClosed_();\n };\n\n this.mySock.onmessage = (m: object) => {\n this.handleIncomingFrame(m);\n };\n\n this.mySock.onerror = (e: any) => {\n this.log_('WebSocket error. Closing connection.');\n const error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n };\n }\n\n /**\n * No-op for websockets, we don't need to do anything once the connection is confirmed as open\n */\n start() {}\n\n static forceDisallow_: Boolean;\n\n static forceDisallow() {\n WebSocketConnection.forceDisallow_ = true;\n }\n\n static isAvailable(): boolean {\n let isOldAndroid = false;\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n const oldAndroidRegex = /Android ([0-9]{0,}\\.[0-9]{0,})/;\n const oldAndroidMatch = navigator.userAgent.match(oldAndroidRegex);\n if (oldAndroidMatch && oldAndroidMatch.length > 1) {\n if (parseFloat(oldAndroidMatch[1]) < 4.4) {\n isOldAndroid = true;\n }\n }\n }\n\n return (\n !isOldAndroid &&\n WebSocketImpl !== null &&\n !WebSocketConnection.forceDisallow_\n );\n }\n\n /**\n * Number of response before we consider the connection \"healthy.\"\n * @type {number}\n */\n static responsesRequiredToBeHealthy = 2;\n\n /**\n * Time to wait for the connection te become healthy before giving up.\n * @type {number}\n */\n static healthyTimeout = 30000;\n\n /**\n * Returns true if we previously failed to connect with this transport.\n * @return {boolean}\n */\n static previouslyFailed(): boolean {\n // If our persistent storage is actually only in-memory storage,\n // we default to assuming that it previously failed to be safe.\n return (\n PersistentStorage.isInMemoryStorage ||\n PersistentStorage.get('previous_websocket_failure') === true\n );\n }\n\n markConnectionHealthy() {\n PersistentStorage.remove('previous_websocket_failure');\n }\n\n private appendFrame_(data: string) {\n this.frames.push(data);\n if (this.frames.length == this.totalFrames) {\n const fullMess = this.frames.join('');\n this.frames = null;\n const jsonMess = jsonEval(fullMess);\n\n //handle the message\n this.onMessage(jsonMess);\n }\n }\n\n /**\n * @param {number} frameCount The number of frames we are expecting from the server\n * @private\n */\n private handleNewFrameCount_(frameCount: number) {\n this.totalFrames = frameCount;\n this.frames = [];\n }\n\n /**\n * Attempts to parse a frame count out of some text. If it can't, assumes a value of 1\n * @param {!String} data\n * @return {?String} Any remaining data to be process, or null if there is none\n * @private\n */\n private extractFrameCount_(data: string): string | null {\n assert(this.frames === null, 'We already have a frame buffer');\n // TODO: The server is only supposed to send up to 9999 frames (i.e. length <= 4), but that isn't being enforced\n // currently. So allowing larger frame counts (length <= 6). See https://app.asana.com/0/search/8688598998380/8237608042508\n if (data.length <= 6) {\n const frameCount = Number(data);\n if (!isNaN(frameCount)) {\n this.handleNewFrameCount_(frameCount);\n return null;\n }\n }\n this.handleNewFrameCount_(1);\n return data;\n }\n\n /**\n * Process a websocket frame that has arrived from the server.\n * @param mess The frame data\n */\n handleIncomingFrame(mess: { [k: string]: any }) {\n if (this.mySock === null) return; // Chrome apparently delivers incoming packets even after we .close() the connection sometimes.\n const data = mess['data'] as string;\n this.bytesReceived += data.length;\n this.stats_.incrementCounter('bytes_received', data.length);\n\n this.resetKeepAlive();\n\n if (this.frames !== null) {\n // we're buffering\n this.appendFrame_(data);\n } else {\n // try to parse out a frame count, otherwise, assume 1 and process it\n const remainingData = this.extractFrameCount_(data);\n if (remainingData !== null) {\n this.appendFrame_(remainingData);\n }\n }\n }\n\n /**\n * Send a message to the server\n * @param {Object} data The JSON object to transmit\n */\n send(data: Object) {\n this.resetKeepAlive();\n\n const dataStr = stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n\n //We can only fit a certain amount in each websocket frame, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n\n const dataSegs = splitStringBySize(dataStr, WEBSOCKET_MAX_FRAME_SIZE);\n\n //Send the length header\n if (dataSegs.length > 1) {\n this.sendString_(String(dataSegs.length));\n }\n\n //Send the actual data in segments.\n for (let i = 0; i < dataSegs.length; i++) {\n this.sendString_(dataSegs[i]);\n }\n }\n\n private shutdown_() {\n this.isClosed_ = true;\n if (this.keepaliveTimer) {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = null;\n }\n\n if (this.mySock) {\n this.mySock.close();\n this.mySock = null;\n }\n }\n\n private onClosed_() {\n if (!this.isClosed_) {\n this.log_('WebSocket is closing itself');\n this.shutdown_();\n\n // since this is an internal close, trigger the close listener\n if (this.onDisconnect) {\n this.onDisconnect(this.everConnected_);\n this.onDisconnect = null;\n }\n }\n }\n\n /**\n * External-facing close handler.\n * Close the websocket and kill the connection.\n */\n close() {\n if (!this.isClosed_) {\n this.log_('WebSocket is being closed');\n this.shutdown_();\n }\n }\n\n /**\n * Kill the current keepalive timer and start a new one, to ensure that it always fires N seconds after\n * the last activity.\n */\n resetKeepAlive() {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = setInterval(() => {\n //If there has been no websocket activity for a while, send a no-op\n if (this.mySock) {\n this.sendString_('0');\n }\n this.resetKeepAlive();\n }, Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL)) as any;\n }\n\n /**\n * Send a string over the websocket.\n *\n * @param {string} str String to send.\n * @private\n */\n private sendString_(str: string) {\n // Firefox seems to sometimes throw exceptions (NS_ERROR_UNEXPECTED) from websocket .send()\n // calls for some unknown reason. We treat these as an error and disconnect.\n // See https://app.asana.com/0/58926111402292/68021340250410\n try {\n this.mySock.send(str);\n } catch (e) {\n this.log_(\n 'Exception thrown from WebSocket.send():',\n e.message || e.data,\n 'Closing connection.'\n );\n setTimeout(this.onClosed_.bind(this), 0);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/WebSocketConnection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../Path';\nimport { RepoInfo } from '../../RepoInfo';\nimport { warnIfPageIsSecure, fatal } from '../util';\n\n/**\n * @param {!string} pathString\n * @return {string}\n */\nfunction decodePath(pathString: string): string {\n let pathStringDecoded = '';\n const pieces = pathString.split('/');\n for (let i = 0; i < pieces.length; i++) {\n if (pieces[i].length > 0) {\n let piece = pieces[i];\n try {\n piece = decodeURIComponent(piece.replace(/\\+/g, ' '));\n } catch (e) {}\n pathStringDecoded += '/' + piece;\n }\n }\n return pathStringDecoded;\n}\n\n/**\n *\n * @param {!string} dataURL\n * @return {{repoInfo: !RepoInfo, path: !Path}}\n */\nexport const parseRepoInfo = function(\n dataURL: string\n): { repoInfo: RepoInfo; path: Path } {\n const parsedUrl = parseURL(dataURL),\n namespace = parsedUrl.subdomain;\n\n if (parsedUrl.domain === 'firebase') {\n fatal(\n parsedUrl.host +\n ' is no longer supported. ' +\n 'Please use .firebaseio.com instead'\n );\n }\n\n // Catch common error of uninitialized namespace value.\n if (!namespace || namespace == 'undefined') {\n fatal(\n 'Cannot parse Firebase url. Please use https://.firebaseio.com'\n );\n }\n\n if (!parsedUrl.secure) {\n warnIfPageIsSecure();\n }\n\n const webSocketOnly = parsedUrl.scheme === 'ws' || parsedUrl.scheme === 'wss';\n\n return {\n repoInfo: new RepoInfo(\n parsedUrl.host,\n parsedUrl.secure,\n namespace,\n webSocketOnly\n ),\n path: new Path(parsedUrl.pathString)\n };\n};\n\n/**\n *\n * @param {!string} dataURL\n * @return {{host: string, port: number, domain: string, subdomain: string, secure: boolean, scheme: string, pathString: string}}\n */\nexport const parseURL = function(\n dataURL: string\n): {\n host: string;\n port: number;\n domain: string;\n subdomain: string;\n secure: boolean;\n scheme: string;\n pathString: string;\n} {\n // Default to empty strings in the event of a malformed string.\n let host = '',\n domain = '',\n subdomain = '',\n pathString = '';\n\n // Always default to SSL, unless otherwise specified.\n let secure = true,\n scheme = 'https',\n port = 443;\n\n // Don't do any validation here. The caller is responsible for validating the result of parsing.\n if (typeof dataURL === 'string') {\n // Parse scheme.\n let colonInd = dataURL.indexOf('//');\n if (colonInd >= 0) {\n scheme = dataURL.substring(0, colonInd - 1);\n dataURL = dataURL.substring(colonInd + 2);\n }\n\n // Parse host and path.\n let slashInd = dataURL.indexOf('/');\n if (slashInd === -1) {\n slashInd = dataURL.length;\n }\n host = dataURL.substring(0, slashInd);\n pathString = decodePath(dataURL.substring(slashInd));\n\n const parts = host.split('.');\n if (parts.length === 3) {\n // Normalize namespaces to lowercase to share storage / connection.\n domain = parts[1];\n subdomain = parts[0].toLowerCase();\n } else if (parts.length === 2) {\n domain = parts[0];\n }\n\n // If we have a port, use scheme for determining if it's secure.\n colonInd = host.indexOf(':');\n if (colonInd >= 0) {\n secure = scheme === 'https' || scheme === 'wss';\n port = parseInt(host.substring(colonInd + 1), 10);\n }\n }\n\n return {\n host,\n port,\n domain,\n subdomain,\n secure,\n scheme,\n pathString\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/libs/parser.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * Check to make sure the appropriate number of arguments are provided for a public function.\n * Throws an error if it fails.\n *\n * @param {!string} fnName The function name\n * @param {!number} minCount The minimum number of arguments to allow for the function call\n * @param {!number} maxCount The maximum number of argument to allow for the function call\n * @param {!number} argCount The actual number of arguments provided.\n */\nexport const validateArgCount = function(fnName, minCount, maxCount, argCount) {\n var argError;\n if (argCount < minCount) {\n argError = 'at least ' + minCount;\n } else if (argCount > maxCount) {\n argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\n }\n if (argError) {\n var error =\n fnName +\n ' failed: Was called with ' +\n argCount +\n (argCount === 1 ? ' argument.' : ' arguments.') +\n ' Expects ' +\n argError +\n '.';\n throw new Error(error);\n }\n};\n\n/**\n * Generates a string to prefix an error message about failed argument validation\n *\n * @param {!string} fnName The function name\n * @param {!number} argumentNumber The index of the argument\n * @param {boolean} optional Whether or not the argument is optional\n * @return {!string} The prefix to add to the error thrown for validation.\n */\nexport function errorPrefix(fnName, argumentNumber, optional) {\n var argName = '';\n switch (argumentNumber) {\n case 1:\n argName = optional ? 'first' : 'First';\n break;\n case 2:\n argName = optional ? 'second' : 'Second';\n break;\n case 3:\n argName = optional ? 'third' : 'Third';\n break;\n case 4:\n argName = optional ? 'fourth' : 'Fourth';\n break;\n default:\n throw new Error(\n 'errorPrefix called with argumentNumber > 4. Need to update it?'\n );\n }\n\n var error = fnName + ' failed: ';\n\n error += argName + ' argument ';\n return error;\n}\n\n/**\n * @param {!string} fnName\n * @param {!number} argumentNumber\n * @param {!string} namespace\n * @param {boolean} optional\n */\nexport const validateNamespace = function(\n fnName,\n argumentNumber,\n namespace,\n optional\n) {\n if (optional && !namespace) return;\n if (typeof namespace !== 'string') {\n //TODO: I should do more validation here. We only allow certain chars in namespaces.\n throw new Error(\n errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid firebase namespace.'\n );\n }\n};\n\nexport const validateCallback = function(\n fnName,\n argumentNumber,\n callback,\n optional\n) {\n if (optional && !callback) return;\n if (typeof callback !== 'function')\n throw new Error(\n errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid function.'\n );\n};\n\nexport const validateContextObject = function(\n fnName,\n argumentNumber,\n context,\n optional\n) {\n if (optional && !context) return;\n if (typeof context !== 'object' || context === null)\n throw new Error(\n errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid context object.'\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/validation.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { nameCompare } from '../util/util';\nimport { NamedNode } from './Node';\n\nexport function NAME_ONLY_COMPARATOR(left: NamedNode, right: NamedNode) {\n return nameCompare(left.name, right.name);\n}\n\nexport function NAME_COMPARATOR(left: string, right: string) {\n return nameCompare(left, right);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/comparators.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ChildrenNode } from './ChildrenNode';\nimport { LeafNode } from './LeafNode';\nimport { NamedNode, Node } from './Node';\nimport { forEach, contains } from '../../../utils/obj';\nimport { assert } from '../../../utils/assert';\nimport { buildChildSet } from './childSet';\nimport { NAME_COMPARATOR, NAME_ONLY_COMPARATOR } from './comparators';\nimport { IndexMap } from './IndexMap';\nimport { PRIORITY_INDEX, setNodeFromJSON } from './indexes/PriorityIndex';\nimport { SortedMap } from '../util/SortedMap';\n\nconst USE_HINZE = true;\n\n/**\n * Constructs a snapshot node representing the passed JSON and returns it.\n * @param {*} json JSON to create a node for.\n * @param {?string|?number=} priority Optional priority to use. This will be ignored if the\n * passed JSON contains a .priority property.\n * @return {!Node}\n */\nexport function nodeFromJSON(\n json: any | null,\n priority: string | number | null = null\n): Node {\n if (json === null) {\n return ChildrenNode.EMPTY_NODE;\n }\n\n if (typeof json === 'object' && '.priority' in json) {\n priority = json['.priority'];\n }\n\n assert(\n priority === null ||\n typeof priority === 'string' ||\n typeof priority === 'number' ||\n (typeof priority === 'object' && '.sv' in (priority as object)),\n 'Invalid priority type found: ' + typeof priority\n );\n\n if (typeof json === 'object' && '.value' in json && json['.value'] !== null) {\n json = json['.value'];\n }\n\n // Valid leaf nodes include non-objects or server-value wrapper objects\n if (typeof json !== 'object' || '.sv' in json) {\n const jsonLeaf = json as string | number | boolean | object;\n return new LeafNode(jsonLeaf, nodeFromJSON(priority));\n }\n\n if (!(json instanceof Array) && USE_HINZE) {\n const children: NamedNode[] = [];\n let childrenHavePriority = false;\n const hinzeJsonObj: { [k: string]: any } = json as object;\n forEach(hinzeJsonObj, (key: string, child: any) => {\n if (typeof key !== 'string' || key.substring(0, 1) !== '.') {\n // Ignore metadata nodes\n const childNode = nodeFromJSON(hinzeJsonObj[key]);\n if (!childNode.isEmpty()) {\n childrenHavePriority =\n childrenHavePriority || !childNode.getPriority().isEmpty();\n children.push(new NamedNode(key, childNode));\n }\n }\n });\n\n if (children.length == 0) {\n return ChildrenNode.EMPTY_NODE;\n }\n\n const childSet = buildChildSet(\n children,\n NAME_ONLY_COMPARATOR,\n namedNode => namedNode.name,\n NAME_COMPARATOR\n ) as SortedMap;\n if (childrenHavePriority) {\n const sortedChildSet = buildChildSet(\n children,\n PRIORITY_INDEX.getCompare()\n );\n return new ChildrenNode(\n childSet,\n nodeFromJSON(priority),\n new IndexMap(\n { '.priority': sortedChildSet },\n { '.priority': PRIORITY_INDEX }\n )\n );\n } else {\n return new ChildrenNode(\n childSet,\n nodeFromJSON(priority),\n IndexMap.Default\n );\n }\n } else {\n let node: Node = ChildrenNode.EMPTY_NODE;\n const jsonObj = json as object;\n forEach(jsonObj, (key: string, childData: any) => {\n if (contains(jsonObj, key)) {\n if (key.substring(0, 1) !== '.') {\n // ignore metadata nodes.\n const childNode = nodeFromJSON(childData);\n if (childNode.isLeafNode() || !childNode.isEmpty())\n node = node.updateImmediateChild(key, childNode);\n }\n }\n });\n\n return node.updatePriority(nodeFromJSON(priority));\n }\n}\n\nsetNodeFromJSON(nodeFromJSON);\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/nodeFromJSON.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Index } from './Index';\nimport { Node, NamedNode } from '../Node';\nimport { nameCompare, MAX_NAME } from '../../util/util';\nimport { assert, assertionError } from '../../../../utils/assert';\nimport { ChildrenNode } from '../ChildrenNode';\n\nlet __EMPTY_NODE: ChildrenNode;\n\nexport class KeyIndex extends Index {\n static get __EMPTY_NODE() {\n return __EMPTY_NODE;\n }\n\n static set __EMPTY_NODE(val) {\n __EMPTY_NODE = val;\n }\n\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n return nameCompare(a.name, b.name);\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n // We could probably return true here (since every node has a key), but it's never called\n // so just leaving unimplemented for now.\n throw assertionError('KeyIndex.isDefinedOn not expected to be called.');\n }\n\n /**\n * @inheritDoc\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n return false; // The key for a node never changes.\n }\n\n /**\n * @inheritDoc\n */\n minPost() {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n // TODO: This should really be created once and cached in a static property, but\n // NamedNode isn't defined yet, so I can't use it in a static. Bleh.\n return new NamedNode(MAX_NAME, __EMPTY_NODE);\n }\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n makePost(indexValue: string, name: string): NamedNode {\n assert(\n typeof indexValue === 'string',\n 'KeyIndex indexValue must always be a string.'\n );\n // We just use empty node, but it'll never be compared, since our comparator only looks at name.\n return new NamedNode(indexValue, __EMPTY_NODE);\n }\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n toString(): string {\n return '.key';\n }\n}\n\nexport const KEY_INDEX = new KeyIndex();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/KeyIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { doubleToIEEE754String } from '../util/util';\nimport { contains } from '../../../utils/obj';\nimport { Node } from './Node';\n\nlet MAX_NODE: Node;\n\nexport function setMaxNode(val: Node) {\n MAX_NODE = val;\n}\n\n/**\n * @param {(!string|!number)} priority\n * @return {!string}\n */\nexport const priorityHashText = function(priority: string | number): string {\n if (typeof priority === 'number')\n return 'number:' + doubleToIEEE754String(priority);\n else return 'string:' + priority;\n};\n\n/**\n * Validates that a priority snapshot Node is valid.\n *\n * @param {!Node} priorityNode\n */\nexport const validatePriorityNode = function(priorityNode: Node) {\n if (priorityNode.isLeafNode()) {\n const val = priorityNode.val();\n assert(\n typeof val === 'string' ||\n typeof val === 'number' ||\n (typeof val === 'object' && contains(val, '.sv')),\n 'Priority must be a string or number.'\n );\n } else {\n assert(\n priorityNode === MAX_NODE || priorityNode.isEmpty(),\n 'priority of unexpected type.'\n );\n }\n // Don't call getPriority() on MAX_NODE to avoid hitting assertion.\n assert(\n priorityNode === MAX_NODE || priorityNode.getPriority().isEmpty(),\n \"Priority nodes can't have a priority of their own.\"\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/snap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { doubleToIEEE754String, sha1 } from '../util/util';\nimport { priorityHashText, validatePriorityNode } from './snap';\nimport { Node } from './Node';\nimport { Path } from '../util/Path';\nimport { Index } from './indexes/Index';\nimport { ChildrenNodeConstructor } from './ChildrenNode';\n\nlet __childrenNodeConstructor: ChildrenNodeConstructor;\n\n/**\n * LeafNode is a class for storing leaf nodes in a DataSnapshot. It\n * implements Node and stores the value of the node (a string,\n * number, or boolean) accessible via getValue().\n */\nexport class LeafNode implements Node {\n static set __childrenNodeConstructor(val: ChildrenNodeConstructor) {\n __childrenNodeConstructor = val;\n }\n\n static get __childrenNodeConstructor() {\n return __childrenNodeConstructor;\n }\n\n /**\n * The sort order for comparing leaf nodes of different types. If two leaf nodes have\n * the same type, the comparison falls back to their value\n * @type {Array.}\n * @const\n */\n static VALUE_TYPE_ORDER = ['object', 'boolean', 'number', 'string'];\n\n private lazyHash_: string | null = null;\n\n /**\n * @implements {Node}\n * @param {!(string|number|boolean|Object)} value_ The value to store in this leaf node.\n * The object type is possible in the event of a deferred value\n * @param {!Node=} priorityNode_ The priority of this node.\n */\n constructor(\n private readonly value_: string | number | boolean | object,\n private priorityNode_: Node = LeafNode.__childrenNodeConstructor.EMPTY_NODE\n ) {\n assert(\n this.value_ !== undefined && this.value_ !== null,\n \"LeafNode shouldn't be created with null/undefined value.\"\n );\n\n validatePriorityNode(this.priorityNode_);\n }\n\n /** @inheritDoc */\n isLeafNode(): boolean {\n return true;\n }\n\n /** @inheritDoc */\n getPriority(): Node {\n return this.priorityNode_;\n }\n\n /** @inheritDoc */\n updatePriority(newPriorityNode: Node): Node {\n return new LeafNode(this.value_, newPriorityNode);\n }\n\n /** @inheritDoc */\n getImmediateChild(childName: string): Node {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.priorityNode_;\n } else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n }\n\n /** @inheritDoc */\n getChild(path: Path): Node {\n if (path.isEmpty()) {\n return this;\n } else if (path.getFront() === '.priority') {\n return this.priorityNode_;\n } else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n }\n\n /**\n * @inheritDoc\n */\n hasChild(): boolean {\n return false;\n }\n\n /** @inheritDoc */\n getPredecessorChildName(childName: String, childNode: Node): null {\n return null;\n }\n\n /** @inheritDoc */\n updateImmediateChild(childName: string, newChildNode: Node): Node {\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n } else if (newChildNode.isEmpty() && childName !== '.priority') {\n return this;\n } else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE\n .updateImmediateChild(childName, newChildNode)\n .updatePriority(this.priorityNode_);\n }\n }\n\n /** @inheritDoc */\n updateChild(path: Path, newChildNode: Node): Node {\n const front = path.getFront();\n if (front === null) {\n return newChildNode;\n } else if (newChildNode.isEmpty() && front !== '.priority') {\n return this;\n } else {\n assert(\n front !== '.priority' || path.getLength() === 1,\n '.priority must be the last token in a path'\n );\n\n return this.updateImmediateChild(\n front,\n LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateChild(\n path.popFront(),\n newChildNode\n )\n );\n }\n }\n\n /** @inheritDoc */\n isEmpty(): boolean {\n return false;\n }\n\n /** @inheritDoc */\n numChildren(): number {\n return 0;\n }\n\n /** @inheritDoc */\n forEachChild(index: Index, action: (s: string, n: Node) => void): any {\n return false;\n }\n\n /**\n * @inheritDoc\n */\n val(exportFormat?: boolean): Object {\n if (exportFormat && !this.getPriority().isEmpty())\n return {\n '.value': this.getValue(),\n '.priority': this.getPriority().val()\n };\n else return this.getValue();\n }\n\n /** @inheritDoc */\n hash(): string {\n if (this.lazyHash_ === null) {\n let toHash = '';\n if (!this.priorityNode_.isEmpty())\n toHash +=\n 'priority:' +\n priorityHashText(this.priorityNode_.val() as number | string) +\n ':';\n\n const type = typeof this.value_;\n toHash += type + ':';\n if (type === 'number') {\n toHash += doubleToIEEE754String(this.value_ as number);\n } else {\n toHash += this.value_;\n }\n this.lazyHash_ = sha1(toHash);\n }\n return this.lazyHash_;\n }\n\n /**\n * Returns the value of the leaf node.\n * @return {Object|string|number|boolean} The value of the node.\n */\n getValue(): object | string | number | boolean {\n return this.value_;\n }\n\n /**\n * @inheritDoc\n */\n compareTo(other: Node): number {\n if (other === LeafNode.__childrenNodeConstructor.EMPTY_NODE) {\n return 1;\n } else if (other instanceof LeafNode.__childrenNodeConstructor) {\n return -1;\n } else {\n assert(other.isLeafNode(), 'Unknown node type');\n return this.compareToLeafNode_(other as LeafNode);\n }\n }\n\n /**\n * Comparison specifically for two leaf nodes\n * @param {!LeafNode} otherLeaf\n * @return {!number}\n * @private\n */\n private compareToLeafNode_(otherLeaf: LeafNode): number {\n const otherLeafType = typeof otherLeaf.value_;\n const thisLeafType = typeof this.value_;\n const otherIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(otherLeafType);\n const thisIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(thisLeafType);\n assert(otherIndex >= 0, 'Unknown leaf type: ' + otherLeafType);\n assert(thisIndex >= 0, 'Unknown leaf type: ' + thisLeafType);\n if (otherIndex === thisIndex) {\n // Same type, compare values\n if (thisLeafType === 'object') {\n // Deferred value nodes are all equal, but we should also never get to this point...\n return 0;\n } else {\n // Note that this works because true > false, all others are number or string comparisons\n if (this.value_ < otherLeaf.value_) {\n return -1;\n } else if (this.value_ === otherLeaf.value_) {\n return 0;\n } else {\n return 1;\n }\n }\n } else {\n return thisIndex - otherIndex;\n }\n }\n\n /**\n * @inheritDoc\n */\n withIndex(): Node {\n return this;\n }\n\n /**\n * @inheritDoc\n */\n isIndexed(): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n equals(other: Node): boolean {\n /**\n * @inheritDoc\n */\n if (other === this) {\n return true;\n } else if (other.isLeafNode()) {\n const otherLeaf = other as LeafNode;\n return (\n this.value_ === otherLeaf.value_ &&\n this.priorityNode_.equals(otherLeaf.priorityNode_)\n );\n } else {\n return false;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/LeafNode.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Index } from './Index';\nimport { nameCompare, MAX_NAME } from '../../util/util';\nimport { NamedNode, Node } from '../Node';\nimport { LeafNode } from '../LeafNode';\n\nlet nodeFromJSON: (a: any) => Node;\nlet MAX_NODE: Node;\n\nexport function setNodeFromJSON(val: (a: any) => Node) {\n nodeFromJSON = val;\n}\n\nexport function setMaxNode(val: Node) {\n MAX_NODE = val;\n}\n\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nexport class PriorityIndex extends Index {\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n const aPriority = a.node.getPriority();\n const bPriority = b.node.getPriority();\n const indexCmp = aPriority.compareTo(bPriority);\n if (indexCmp === 0) {\n return nameCompare(a.name, b.name);\n } else {\n return indexCmp;\n }\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n return !node.getPriority().isEmpty();\n }\n\n /**\n * @inheritDoc\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n return !oldNode.getPriority().equals(newNode.getPriority());\n }\n\n /**\n * @inheritDoc\n */\n minPost(): NamedNode {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n return new NamedNode(MAX_NAME, new LeafNode('[PRIORITY-POST]', MAX_NODE));\n }\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n makePost(indexValue: any, name: string): NamedNode {\n const priorityNode = nodeFromJSON(indexValue);\n return new NamedNode(name, new LeafNode('[PRIORITY-POST]', priorityNode));\n }\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n toString(): string {\n return '.priority';\n }\n}\n\nexport const PRIORITY_INDEX = new PriorityIndex();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/PriorityIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { buildChildSet } from './childSet';\nimport { contains, clone, map, safeGet } from '../../../utils/obj';\nimport { NamedNode, Node } from './Node';\nimport { PRIORITY_INDEX } from './indexes/PriorityIndex';\nimport { KEY_INDEX } from './indexes/KeyIndex';\nimport { SortedMap } from '../util/SortedMap';\nimport { Index } from './indexes/Index';\n\nlet _defaultIndexMap: IndexMap;\n\nconst fallbackObject = {};\n\n/**\n *\n * @param {Object.>} indexes\n * @param {Object.} indexSet\n * @constructor\n */\nexport class IndexMap {\n /**\n * The default IndexMap for nodes without a priority\n * @type {!IndexMap}\n * @const\n */\n static get Default(): IndexMap {\n assert(\n fallbackObject && PRIORITY_INDEX,\n 'ChildrenNode.ts has not been loaded'\n );\n _defaultIndexMap =\n _defaultIndexMap ||\n new IndexMap(\n { '.priority': fallbackObject },\n { '.priority': PRIORITY_INDEX }\n );\n return _defaultIndexMap;\n }\n\n constructor(\n private indexes_: {\n [k: string]: SortedMap | /*FallbackType*/ object;\n },\n private indexSet_: { [k: string]: Index }\n ) {}\n\n /**\n *\n * @param {!string} indexKey\n * @return {?SortedMap.}\n */\n get(indexKey: string): SortedMap | null {\n const sortedMap = safeGet(this.indexes_, indexKey);\n if (!sortedMap) throw new Error('No index defined for ' + indexKey);\n\n if (sortedMap === fallbackObject) {\n // The index exists, but it falls back to just name comparison. Return null so that the calling code uses the\n // regular child map\n return null;\n } else {\n return sortedMap;\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n hasIndex(indexDefinition: Index): boolean {\n return contains(this.indexSet_, indexDefinition.toString());\n }\n\n /**\n * @param {!Index} indexDefinition\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n addIndex(\n indexDefinition: Index,\n existingChildren: SortedMap\n ): IndexMap {\n assert(\n indexDefinition !== KEY_INDEX,\n \"KeyIndex always exists and isn't meant to be added to the IndexMap.\"\n );\n const childList = [];\n let sawIndexedValue = false;\n const iter = existingChildren.getIterator(NamedNode.Wrap);\n let next = iter.getNext();\n while (next) {\n sawIndexedValue =\n sawIndexedValue || indexDefinition.isDefinedOn(next.node);\n childList.push(next);\n next = iter.getNext();\n }\n let newIndex;\n if (sawIndexedValue) {\n newIndex = buildChildSet(childList, indexDefinition.getCompare());\n } else {\n newIndex = fallbackObject;\n }\n const indexName = indexDefinition.toString();\n const newIndexSet = clone(this.indexSet_);\n newIndexSet[indexName] = indexDefinition;\n const newIndexes = clone(this.indexes_);\n newIndexes[indexName] = newIndex;\n return new IndexMap(newIndexes, newIndexSet);\n }\n\n /**\n * Ensure that this node is properly tracked in any indexes that we're maintaining\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n addToIndexes(\n namedNode: NamedNode,\n existingChildren: SortedMap\n ): IndexMap {\n const newIndexes = map(\n this.indexes_,\n (indexedChildren: SortedMap, indexName: string) => {\n const index = safeGet(this.indexSet_, indexName);\n assert(index, 'Missing index implementation for ' + indexName);\n if (indexedChildren === fallbackObject) {\n // Check to see if we need to index everything\n if (index.isDefinedOn(namedNode.node)) {\n // We need to build this index\n const childList = [];\n const iter = existingChildren.getIterator(NamedNode.Wrap);\n let next = iter.getNext();\n while (next) {\n if (next.name != namedNode.name) {\n childList.push(next);\n }\n next = iter.getNext();\n }\n childList.push(namedNode);\n return buildChildSet(childList, index.getCompare());\n } else {\n // No change, this remains a fallback\n return fallbackObject;\n }\n } else {\n const existingSnap = existingChildren.get(namedNode.name);\n let newChildren = indexedChildren;\n if (existingSnap) {\n newChildren = newChildren.remove(\n new NamedNode(namedNode.name, existingSnap)\n );\n }\n return newChildren.insert(namedNode, namedNode.node);\n }\n }\n );\n return new IndexMap(newIndexes, this.indexSet_);\n }\n\n /**\n * Create a new IndexMap instance with the given value removed\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n removeFromIndexes(\n namedNode: NamedNode,\n existingChildren: SortedMap\n ): IndexMap {\n const newIndexes = map(this.indexes_, function(\n indexedChildren: SortedMap\n ) {\n if (indexedChildren === fallbackObject) {\n // This is the fallback. Just return it, nothing to do in this case\n return indexedChildren;\n } else {\n const existingSnap = existingChildren.get(namedNode.name);\n if (existingSnap) {\n return indexedChildren.remove(\n new NamedNode(namedNode.name, existingSnap)\n );\n } else {\n // No record of this child\n return indexedChildren;\n }\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/IndexMap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { sha1, MAX_NAME, MIN_NAME } from '../util/util';\nimport { SortedMap, SortedMapIterator } from '../util/SortedMap';\nimport { Node, NamedNode } from './Node';\nimport { validatePriorityNode, priorityHashText, setMaxNode } from './snap';\nimport {\n PRIORITY_INDEX,\n setMaxNode as setPriorityMaxNode\n} from './indexes/PriorityIndex';\nimport { KEY_INDEX, KeyIndex } from './indexes/KeyIndex';\nimport { IndexMap } from './IndexMap';\nimport { LeafNode } from './LeafNode';\nimport { NAME_COMPARATOR } from './comparators';\nimport { Index } from './indexes/Index';\nimport { Path } from '../util/Path';\n\nexport interface ChildrenNodeConstructor {\n new (\n children_: SortedMap,\n priorityNode_: Node | null,\n indexMap_: IndexMap\n ): ChildrenNode;\n EMPTY_NODE: ChildrenNode;\n}\n\n// TODO: For memory savings, don't store priorityNode_ if it's empty.\n\nlet EMPTY_NODE: ChildrenNode;\n\n/**\n * ChildrenNode is a class for storing internal nodes in a DataSnapshot\n * (i.e. nodes with children). It implements Node and stores the\n * list of children in the children property, sorted by child name.\n *\n * @constructor\n * @implements {Node}\n */\nexport class ChildrenNode implements Node {\n private lazyHash_: string | null = null;\n\n static get EMPTY_NODE(): ChildrenNode {\n return (\n EMPTY_NODE ||\n (EMPTY_NODE = new ChildrenNode(\n new SortedMap(NAME_COMPARATOR),\n null,\n IndexMap.Default\n ))\n );\n }\n\n /**\n *\n * @param {!SortedMap.} children_ List of children\n * of this node..\n * @param {?Node} priorityNode_ The priority of this node (as a snapshot node).\n * @param {!IndexMap} indexMap_\n */\n constructor(\n private readonly children_: SortedMap,\n private readonly priorityNode_: Node | null,\n private indexMap_: IndexMap\n ) {\n /**\n * Note: The only reason we allow null priority is for EMPTY_NODE, since we can't use\n * EMPTY_NODE as the priority of EMPTY_NODE. We might want to consider making EMPTY_NODE its own\n * class instead of an empty ChildrenNode.\n */\n if (this.priorityNode_) {\n validatePriorityNode(this.priorityNode_);\n }\n\n if (this.children_.isEmpty()) {\n assert(\n !this.priorityNode_ || this.priorityNode_.isEmpty(),\n 'An empty node cannot have a priority'\n );\n }\n }\n\n /** @inheritDoc */\n isLeafNode(): boolean {\n return false;\n }\n\n /** @inheritDoc */\n getPriority(): Node {\n return this.priorityNode_ || EMPTY_NODE;\n }\n\n /** @inheritDoc */\n updatePriority(newPriorityNode: Node): Node {\n if (this.children_.isEmpty()) {\n // Don't allow priorities on empty nodes\n return this;\n } else {\n return new ChildrenNode(this.children_, newPriorityNode, this.indexMap_);\n }\n }\n\n /** @inheritDoc */\n getImmediateChild(childName: string): Node {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.getPriority();\n } else {\n const child = this.children_.get(childName);\n return child === null ? EMPTY_NODE : child;\n }\n }\n\n /** @inheritDoc */\n getChild(path: Path): Node {\n const front = path.getFront();\n if (front === null) return this;\n\n return this.getImmediateChild(front).getChild(path.popFront());\n }\n\n /** @inheritDoc */\n hasChild(childName: string): boolean {\n return this.children_.get(childName) !== null;\n }\n\n /** @inheritDoc */\n updateImmediateChild(childName: string, newChildNode: Node): Node {\n assert(newChildNode, 'We should always be passing snapshot nodes');\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n } else {\n const namedNode = new NamedNode(childName, newChildNode);\n let newChildren, newIndexMap, newPriority;\n if (newChildNode.isEmpty()) {\n newChildren = this.children_.remove(childName);\n newIndexMap = this.indexMap_.removeFromIndexes(\n namedNode,\n this.children_\n );\n } else {\n newChildren = this.children_.insert(childName, newChildNode);\n newIndexMap = this.indexMap_.addToIndexes(namedNode, this.children_);\n }\n\n newPriority = newChildren.isEmpty() ? EMPTY_NODE : this.priorityNode_;\n return new ChildrenNode(newChildren, newPriority, newIndexMap);\n }\n }\n\n /** @inheritDoc */\n updateChild(path: Path, newChildNode: Node): Node {\n const front = path.getFront();\n if (front === null) {\n return newChildNode;\n } else {\n assert(\n path.getFront() !== '.priority' || path.getLength() === 1,\n '.priority must be the last token in a path'\n );\n const newImmediateChild = this.getImmediateChild(front).updateChild(\n path.popFront(),\n newChildNode\n );\n return this.updateImmediateChild(front, newImmediateChild);\n }\n }\n\n /** @inheritDoc */\n isEmpty(): boolean {\n return this.children_.isEmpty();\n }\n\n /** @inheritDoc */\n numChildren(): number {\n return this.children_.count();\n }\n\n /**\n * @private\n * @type {RegExp}\n */\n private static INTEGER_REGEXP_ = /^(0|[1-9]\\d*)$/;\n\n /** @inheritDoc */\n val(exportFormat?: boolean): object {\n if (this.isEmpty()) return null;\n\n const obj: { [k: string]: Object } = {};\n let numKeys = 0,\n maxKey = 0,\n allIntegerKeys = true;\n this.forEachChild(PRIORITY_INDEX, function(key: string, childNode: Node) {\n obj[key] = childNode.val(exportFormat);\n\n numKeys++;\n if (allIntegerKeys && ChildrenNode.INTEGER_REGEXP_.test(key)) {\n maxKey = Math.max(maxKey, Number(key));\n } else {\n allIntegerKeys = false;\n }\n });\n\n if (!exportFormat && allIntegerKeys && maxKey < 2 * numKeys) {\n // convert to array.\n const array: Object[] = [];\n for (let key in obj) array[(key as any) as number] = obj[key];\n\n return array;\n } else {\n if (exportFormat && !this.getPriority().isEmpty()) {\n obj['.priority'] = this.getPriority().val();\n }\n return obj;\n }\n }\n\n /** @inheritDoc */\n hash(): string {\n if (this.lazyHash_ === null) {\n let toHash = '';\n if (!this.getPriority().isEmpty())\n toHash +=\n 'priority:' +\n priorityHashText(this.getPriority().val() as string | number) +\n ':';\n\n this.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n const childHash = childNode.hash();\n if (childHash !== '') toHash += ':' + key + ':' + childHash;\n });\n\n this.lazyHash_ = toHash === '' ? '' : sha1(toHash);\n }\n return this.lazyHash_;\n }\n\n /** @inheritDoc */\n getPredecessorChildName(\n childName: string,\n childNode: Node,\n index: Index\n ): string {\n const idx = this.resolveIndex_(index);\n if (idx) {\n const predecessor = idx.getPredecessorKey(\n new NamedNode(childName, childNode)\n );\n return predecessor ? predecessor.name : null;\n } else {\n return this.children_.getPredecessorKey(childName);\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n getFirstChildName(indexDefinition: Index): string | null {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n const minKey = idx.minKey();\n return minKey && minKey.name;\n } else {\n return this.children_.minKey();\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n getFirstChild(indexDefinition: Index): NamedNode | null {\n const minKey = this.getFirstChildName(indexDefinition);\n if (minKey) {\n return new NamedNode(minKey, this.children_.get(minKey));\n } else {\n return null;\n }\n }\n\n /**\n * Given an index, return the key name of the largest value we have, according to that index\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n getLastChildName(indexDefinition: Index): string | null {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n const maxKey = idx.maxKey();\n return maxKey && maxKey.name;\n } else {\n return this.children_.maxKey();\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n getLastChild(indexDefinition: Index): NamedNode | null {\n const maxKey = this.getLastChildName(indexDefinition);\n if (maxKey) {\n return new NamedNode(maxKey, this.children_.get(maxKey));\n } else {\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n forEachChild(index: Index, action: (key: string, node: Node) => void): any {\n const idx = this.resolveIndex_(index);\n if (idx) {\n return idx.inorderTraversal(function(wrappedNode) {\n return action(wrappedNode.name, wrappedNode.node);\n });\n } else {\n return this.children_.inorderTraversal(action);\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {SortedMapIterator}\n */\n getIterator(\n indexDefinition: Index\n ): SortedMapIterator {\n return this.getIteratorFrom(indexDefinition.minPost(), indexDefinition);\n }\n\n /**\n *\n * @param {!NamedNode} startPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n getIteratorFrom(\n startPost: NamedNode,\n indexDefinition: Index\n ): SortedMapIterator {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getIteratorFrom(startPost, key => key);\n } else {\n const iterator = this.children_.getIteratorFrom(\n startPost.name,\n NamedNode.Wrap\n );\n let next = iterator.peek();\n while (next != null && indexDefinition.compare(next, startPost) < 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n }\n\n /**\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n getReverseIterator(\n indexDefinition: Index\n ): SortedMapIterator {\n return this.getReverseIteratorFrom(\n indexDefinition.maxPost(),\n indexDefinition\n );\n }\n\n /**\n * @param {!NamedNode} endPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n getReverseIteratorFrom(\n endPost: NamedNode,\n indexDefinition: Index\n ): SortedMapIterator {\n const idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getReverseIteratorFrom(endPost, function(key) {\n return key;\n });\n } else {\n const iterator = this.children_.getReverseIteratorFrom(\n endPost.name,\n NamedNode.Wrap\n );\n let next = iterator.peek();\n while (next != null && indexDefinition.compare(next, endPost) > 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n }\n\n /**\n * @inheritDoc\n */\n compareTo(other: ChildrenNode): number {\n if (this.isEmpty()) {\n if (other.isEmpty()) {\n return 0;\n } else {\n return -1;\n }\n } else if (other.isLeafNode() || other.isEmpty()) {\n return 1;\n } else if (other === MAX_NODE) {\n return -1;\n } else {\n // Must be another node with children.\n return 0;\n }\n }\n\n /**\n * @inheritDoc\n */\n withIndex(indexDefinition: Index): Node {\n if (\n indexDefinition === KEY_INDEX ||\n this.indexMap_.hasIndex(indexDefinition)\n ) {\n return this;\n } else {\n const newIndexMap = this.indexMap_.addIndex(\n indexDefinition,\n this.children_\n );\n return new ChildrenNode(this.children_, this.priorityNode_, newIndexMap);\n }\n }\n\n /**\n * @inheritDoc\n */\n isIndexed(index: Index): boolean {\n return index === KEY_INDEX || this.indexMap_.hasIndex(index);\n }\n\n /**\n * @inheritDoc\n */\n equals(other: Node): boolean {\n if (other === this) {\n return true;\n } else if (other.isLeafNode()) {\n return false;\n } else {\n const otherChildrenNode = other as ChildrenNode;\n if (!this.getPriority().equals(otherChildrenNode.getPriority())) {\n return false;\n } else if (\n this.children_.count() === otherChildrenNode.children_.count()\n ) {\n const thisIter = this.getIterator(PRIORITY_INDEX);\n const otherIter = otherChildrenNode.getIterator(PRIORITY_INDEX);\n let thisCurrent = thisIter.getNext();\n let otherCurrent = otherIter.getNext();\n while (thisCurrent && otherCurrent) {\n if (\n thisCurrent.name !== otherCurrent.name ||\n !thisCurrent.node.equals(otherCurrent.node)\n ) {\n return false;\n }\n thisCurrent = thisIter.getNext();\n otherCurrent = otherIter.getNext();\n }\n return thisCurrent === null && otherCurrent === null;\n } else {\n return false;\n }\n }\n }\n\n /**\n * Returns a SortedMap ordered by index, or null if the default (by-key) ordering can be used\n * instead.\n *\n * @private\n * @param {!Index} indexDefinition\n * @return {?SortedMap.}\n */\n private resolveIndex_(\n indexDefinition: Index\n ): SortedMap | null {\n if (indexDefinition === KEY_INDEX) {\n return null;\n } else {\n return this.indexMap_.get(indexDefinition.toString());\n }\n }\n}\n\n/**\n * @constructor\n * @extends {ChildrenNode}\n * @private\n */\nexport class MaxNode extends ChildrenNode {\n constructor() {\n super(\n new SortedMap(NAME_COMPARATOR),\n ChildrenNode.EMPTY_NODE,\n IndexMap.Default\n );\n }\n\n compareTo(other: Node): number {\n if (other === this) {\n return 0;\n } else {\n return 1;\n }\n }\n\n equals(other: Node): boolean {\n // Not that we every compare it, but MAX_NODE is only ever equal to itself\n return other === this;\n }\n\n getPriority(): MaxNode {\n return this;\n }\n\n getImmediateChild(childName: string): ChildrenNode {\n return ChildrenNode.EMPTY_NODE;\n }\n\n isEmpty(): boolean {\n return false;\n }\n}\n\n/**\n * Marker that will sort higher than any other snapshot.\n * @type {!MAX_NODE}\n * @const\n */\nexport const MAX_NODE = new MaxNode();\n\n/**\n * Document NamedNode extensions\n */\ndeclare module './Node' {\n interface NamedNode {\n MIN: NamedNode;\n MAX: NamedNode;\n }\n}\n\nObject.defineProperties(NamedNode, {\n MIN: {\n value: new NamedNode(MIN_NAME, ChildrenNode.EMPTY_NODE)\n },\n MAX: {\n value: new NamedNode(MAX_NAME, MAX_NODE)\n }\n});\n\n/**\n * Reference Extensions\n */\nKeyIndex.__EMPTY_NODE = ChildrenNode.EMPTY_NODE;\nLeafNode.__childrenNodeConstructor = ChildrenNode;\nsetMaxNode(MAX_NODE);\nsetPriorityMaxNode(MAX_NODE);\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/ChildrenNode.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { nameCompare } from './util';\nimport { stringLength } from '../../../utils/utf8';\n/**\n * An immutable object representing a parsed path. It's immutable so that you\n * can pass them around to other functions without worrying about them changing\n * it.\n */\n\nexport class Path {\n private pieces_: string[];\n private pieceNum_: number;\n\n /**\n * Singleton to represent an empty path\n *\n * @const\n */\n static get Empty() {\n return new Path('');\n }\n\n /**\n * @param {string|Array.} pathOrString Path string to parse,\n * or another path, or the raw tokens array\n * @param {number=} pieceNum\n */\n constructor(pathOrString: string | string[], pieceNum?: number) {\n if (pieceNum === void 0) {\n this.pieces_ = (pathOrString as string).split('/');\n\n // Remove empty pieces.\n let copyTo = 0;\n for (let i = 0; i < this.pieces_.length; i++) {\n if (this.pieces_[i].length > 0) {\n this.pieces_[copyTo] = this.pieces_[i];\n copyTo++;\n }\n }\n this.pieces_.length = copyTo;\n\n this.pieceNum_ = 0;\n } else {\n this.pieces_ = pathOrString as string[];\n this.pieceNum_ = pieceNum;\n }\n }\n\n getFront(): string | null {\n if (this.pieceNum_ >= this.pieces_.length) return null;\n\n return this.pieces_[this.pieceNum_];\n }\n\n /**\n * @return {number} The number of segments in this path\n */\n getLength(): number {\n return this.pieces_.length - this.pieceNum_;\n }\n\n /**\n * @return {!Path}\n */\n popFront(): Path {\n let pieceNum = this.pieceNum_;\n if (pieceNum < this.pieces_.length) {\n pieceNum++;\n }\n return new Path(this.pieces_, pieceNum);\n }\n\n /**\n * @return {?string}\n */\n getBack(): string | null {\n if (this.pieceNum_ < this.pieces_.length)\n return this.pieces_[this.pieces_.length - 1];\n\n return null;\n }\n\n toString(): string {\n let pathString = '';\n for (let i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '') pathString += '/' + this.pieces_[i];\n }\n\n return pathString || '/';\n }\n\n toUrlEncodedString(): string {\n let pathString = '';\n for (let i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + encodeURIComponent(String(this.pieces_[i]));\n }\n\n return pathString || '/';\n }\n\n /**\n * Shallow copy of the parts of the path.\n *\n * @param {number=} begin\n * @return {!Array}\n */\n slice(begin: number = 0): string[] {\n return this.pieces_.slice(this.pieceNum_ + begin);\n }\n\n /**\n * @return {?Path}\n */\n parent(): Path | null {\n if (this.pieceNum_ >= this.pieces_.length) return null;\n\n const pieces = [];\n for (let i = this.pieceNum_; i < this.pieces_.length - 1; i++)\n pieces.push(this.pieces_[i]);\n\n return new Path(pieces, 0);\n }\n\n /**\n * @param {string|!Path} childPathObj\n * @return {!Path}\n */\n child(childPathObj: string | Path): Path {\n const pieces = [];\n for (let i = this.pieceNum_; i < this.pieces_.length; i++)\n pieces.push(this.pieces_[i]);\n\n if (childPathObj instanceof Path) {\n for (\n let i = childPathObj.pieceNum_;\n i < childPathObj.pieces_.length;\n i++\n ) {\n pieces.push(childPathObj.pieces_[i]);\n }\n } else {\n const childPieces = childPathObj.split('/');\n for (let i = 0; i < childPieces.length; i++) {\n if (childPieces[i].length > 0) pieces.push(childPieces[i]);\n }\n }\n\n return new Path(pieces, 0);\n }\n\n /**\n * @return {boolean} True if there are no segments in this path\n */\n isEmpty(): boolean {\n return this.pieceNum_ >= this.pieces_.length;\n }\n\n /**\n * @param {!Path} outerPath\n * @param {!Path} innerPath\n * @return {!Path} The path from outerPath to innerPath\n */\n static relativePath(outerPath: Path, innerPath: Path): Path {\n const outer = outerPath.getFront(),\n inner = innerPath.getFront();\n if (outer === null) {\n return innerPath;\n } else if (outer === inner) {\n return Path.relativePath(outerPath.popFront(), innerPath.popFront());\n } else {\n throw new Error(\n 'INTERNAL ERROR: innerPath (' +\n innerPath +\n ') is not within ' +\n 'outerPath (' +\n outerPath +\n ')'\n );\n }\n }\n\n /**\n * @param {!Path} left\n * @param {!Path} right\n * @return {number} -1, 0, 1 if left is less, equal, or greater than the right.\n */\n static comparePaths(left: Path, right: Path): number {\n const leftKeys = left.slice();\n const rightKeys = right.slice();\n for (let i = 0; i < leftKeys.length && i < rightKeys.length; i++) {\n const cmp = nameCompare(leftKeys[i], rightKeys[i]);\n if (cmp !== 0) return cmp;\n }\n if (leftKeys.length === rightKeys.length) return 0;\n return leftKeys.length < rightKeys.length ? -1 : 1;\n }\n\n /**\n *\n * @param {Path} other\n * @return {boolean} true if paths are the same.\n */\n equals(other: Path): boolean {\n if (this.getLength() !== other.getLength()) {\n return false;\n }\n\n for (\n let i = this.pieceNum_, j = other.pieceNum_;\n i <= this.pieces_.length;\n i++, j++\n ) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n *\n * @param {!Path} other\n * @return {boolean} True if this path is a parent (or the same as) other\n */\n contains(other: Path): boolean {\n let i = this.pieceNum_;\n let j = other.pieceNum_;\n if (this.getLength() > other.getLength()) {\n return false;\n }\n while (i < this.pieces_.length) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n ++i;\n ++j;\n }\n return true;\n }\n} // end Path\n\n/**\n * Dynamic (mutable) path used to count path lengths.\n *\n * This class is used to efficiently check paths for valid\n * length (in UTF8 bytes) and depth (used in path validation).\n *\n * Throws Error exception if path is ever invalid.\n *\n * The definition of a path always begins with '/'.\n */\nexport class ValidationPath {\n /** @type {!Array} */\n private parts_: string[];\n /** @type {number} Initialize to number of '/' chars needed in path. */\n private byteLength_: number;\n\n /**\n * @param {!Path} path Initial Path.\n * @param {string} errorPrefix_ Prefix for any error messages.\n */\n constructor(path: Path, private errorPrefix_: string) {\n /** @type {!Array} */\n this.parts_ = path.slice();\n /** @type {number} Initialize to number of '/' chars needed in path. */\n this.byteLength_ = Math.max(1, this.parts_.length);\n\n for (let i = 0; i < this.parts_.length; i++) {\n this.byteLength_ += stringLength(this.parts_[i]);\n }\n this.checkValid_();\n }\n\n /** @const {number} Maximum key depth. */\n static get MAX_PATH_DEPTH() {\n return 32;\n }\n\n /** @const {number} Maximum number of (UTF8) bytes in a Firebase path. */\n static get MAX_PATH_LENGTH_BYTES() {\n return 768;\n }\n\n /** @param {string} child */\n push(child: string) {\n // Count the needed '/'\n if (this.parts_.length > 0) {\n this.byteLength_ += 1;\n }\n this.parts_.push(child);\n this.byteLength_ += stringLength(child);\n this.checkValid_();\n }\n\n pop() {\n const last = this.parts_.pop();\n this.byteLength_ -= stringLength(last);\n // Un-count the previous '/'\n if (this.parts_.length > 0) {\n this.byteLength_ -= 1;\n }\n }\n\n private checkValid_() {\n if (this.byteLength_ > ValidationPath.MAX_PATH_LENGTH_BYTES) {\n throw new Error(\n this.errorPrefix_ +\n 'has a key path longer than ' +\n ValidationPath.MAX_PATH_LENGTH_BYTES +\n ' bytes (' +\n this.byteLength_ +\n ').'\n );\n }\n if (this.parts_.length > ValidationPath.MAX_PATH_DEPTH) {\n throw new Error(\n this.errorPrefix_ +\n 'path specified exceeds the maximum depth that can be written (' +\n ValidationPath.MAX_PATH_DEPTH +\n ') or object contains a cycle ' +\n this.toErrorString()\n );\n }\n }\n\n /**\n * String for use in error messages - uses '.' notation for path.\n *\n * @return {string}\n */\n toErrorString(): string {\n if (this.parts_.length == 0) {\n return '';\n }\n return \"in property '\" + this.parts_.join('.') + \"'\";\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/Path.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { forEach } from '../../utils/obj';\nimport { PersistentStorage } from './storage/storage';\nimport { LONG_POLLING, WEBSOCKET } from '../realtime/Constants';\n\n/**\n * A class that holds metadata about a Repo object\n *\n * @constructor\n */\nexport class RepoInfo {\n host: string;\n domain: string;\n internalHost: string;\n\n /**\n * @param {string} host Hostname portion of the url for the repo\n * @param {boolean} secure Whether or not this repo is accessed over ssl\n * @param {string} namespace The namespace represented by the repo\n * @param {boolean} webSocketOnly Whether to prefer websockets over all other transports (used by Nest).\n * @param {string=} persistenceKey Override the default session persistence storage key\n */\n constructor(\n host: string,\n public secure: boolean,\n public namespace: string,\n public webSocketOnly: boolean,\n public persistenceKey: string = ''\n ) {\n this.host = host.toLowerCase();\n this.domain = this.host.substr(this.host.indexOf('.') + 1);\n this.internalHost = PersistentStorage.get('host:' + host) || this.host;\n }\n\n needsQueryParam(): boolean {\n return this.host !== this.internalHost;\n }\n\n isCacheableHost(): boolean {\n return this.internalHost.substr(0, 2) === 's-';\n }\n\n isDemoHost() {\n return this.domain === 'firebaseio-demo.com';\n }\n\n isCustomHost() {\n return (\n this.domain !== 'firebaseio.com' && this.domain !== 'firebaseio-demo.com'\n );\n }\n\n updateHost(newHost: string) {\n if (newHost !== this.internalHost) {\n this.internalHost = newHost;\n if (this.isCacheableHost()) {\n PersistentStorage.set('host:' + this.host, this.internalHost);\n }\n }\n }\n\n /**\n * Returns the websocket URL for this repo\n * @param {string} type of connection\n * @param {Object} params list\n * @return {string} The URL for this repo\n */\n connectionURL(type: string, params: { [k: string]: string }): string {\n assert(typeof type === 'string', 'typeof type must == string');\n assert(typeof params === 'object', 'typeof params must == object');\n\n let connURL: string;\n if (type === WEBSOCKET) {\n connURL =\n (this.secure ? 'wss://' : 'ws://') + this.internalHost + '/.ws?';\n } else if (type === LONG_POLLING) {\n connURL =\n (this.secure ? 'https://' : 'http://') + this.internalHost + '/.lp?';\n } else {\n throw new Error('Unknown connection type: ' + type);\n }\n if (this.needsQueryParam()) {\n params['ns'] = this.namespace;\n }\n\n const pairs: string[] = [];\n\n forEach(params, (key: string, value: string) => {\n pairs.push(key + '=' + value);\n });\n\n return connURL + pairs.join('&');\n }\n\n /** @return {string} */\n toString(): string {\n let str = this.toURLString();\n if (this.persistenceKey) {\n str += '<' + this.persistenceKey + '>';\n }\n return str;\n }\n\n /** @return {string} */\n toURLString(): string {\n return (this.secure ? 'https://' : 'http://') + this.host;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/RepoInfo.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path, ValidationPath } from './Path';\nimport { forEach, contains, safeGet } from '../../../utils/obj';\nimport { isInvalidJSONNumber } from './util';\nimport { errorPrefix as errorPrefixFxn } from '../../../utils/validation';\nimport { stringLength } from '../../../utils/utf8';\nimport { RepoInfo } from '../RepoInfo';\n\n/**\n * True for invalid Firebase keys\n * @type {RegExp}\n * @private\n */\nexport const INVALID_KEY_REGEX_ = /[\\[\\].#$\\/\\u0000-\\u001F\\u007F]/;\n\n/**\n * True for invalid Firebase paths.\n * Allows '/' in paths.\n * @type {RegExp}\n * @private\n */\nexport const INVALID_PATH_REGEX_ = /[\\[\\].#$\\u0000-\\u001F\\u007F]/;\n\n/**\n * Maximum number of characters to allow in leaf value\n * @type {number}\n * @private\n */\nexport const MAX_LEAF_SIZE_ = 10 * 1024 * 1024;\n\n/**\n * @param {*} key\n * @return {boolean}\n */\nexport const isValidKey = function(key: any): boolean {\n return (\n typeof key === 'string' && key.length !== 0 && !INVALID_KEY_REGEX_.test(key)\n );\n};\n\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexport const isValidPathString = function(pathString: string): boolean {\n return (\n typeof pathString === 'string' &&\n pathString.length !== 0 &&\n !INVALID_PATH_REGEX_.test(pathString)\n );\n};\n\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexport const isValidRootPathString = function(pathString: string): boolean {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n\n return isValidPathString(pathString);\n};\n\n/**\n * @param {*} priority\n * @return {boolean}\n */\nexport const isValidPriority = function(priority: any): boolean {\n return (\n priority === null ||\n typeof priority === 'string' ||\n (typeof priority === 'number' && !isInvalidJSONNumber(priority)) ||\n (priority && typeof priority === 'object' && contains(priority, '.sv'))\n );\n};\n\n/**\n * Pre-validate a datum passed as an argument to Firebase function.\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexport const validateFirebaseDataArg = function(\n fnName: string,\n argumentNumber: number,\n data: any,\n path: Path,\n optional: boolean\n) {\n if (optional && data === undefined) return;\n\n validateFirebaseData(\n errorPrefixFxn(fnName, argumentNumber, optional),\n data,\n path\n );\n};\n\n/**\n * Validate a data object client-side before sending to server.\n *\n * @param {string} errorPrefix\n * @param {*} data\n * @param {!Path|!ValidationPath} path_\n */\nexport const validateFirebaseData = function(\n errorPrefix: string,\n data: any,\n path_: Path | ValidationPath\n) {\n const path =\n path_ instanceof Path ? new ValidationPath(path_, errorPrefix) : path_;\n\n if (data === undefined) {\n throw new Error(errorPrefix + 'contains undefined ' + path.toErrorString());\n }\n if (typeof data === 'function') {\n throw new Error(\n errorPrefix +\n 'contains a function ' +\n path.toErrorString() +\n ' with contents = ' +\n data.toString()\n );\n }\n if (isInvalidJSONNumber(data)) {\n throw new Error(\n errorPrefix + 'contains ' + data.toString() + ' ' + path.toErrorString()\n );\n }\n\n // Check max leaf size, but try to avoid the utf8 conversion if we can.\n if (\n typeof data === 'string' &&\n data.length > MAX_LEAF_SIZE_ / 3 &&\n stringLength(data) > MAX_LEAF_SIZE_\n ) {\n throw new Error(\n errorPrefix +\n 'contains a string greater than ' +\n MAX_LEAF_SIZE_ +\n ' utf8 bytes ' +\n path.toErrorString() +\n \" ('\" +\n data.substring(0, 50) +\n \"...')\"\n );\n }\n\n // TODO = Perf = Consider combining the recursive validation of keys into NodeFromJSON\n // to save extra walking of large objects.\n if (data && typeof data === 'object') {\n let hasDotValue = false,\n hasActualChild = false;\n forEach(data, function(key: string, value: any) {\n if (key === '.value') {\n hasDotValue = true;\n } else if (key !== '.priority' && key !== '.sv') {\n hasActualChild = true;\n if (!isValidKey(key)) {\n throw new Error(\n errorPrefix +\n ' contains an invalid key (' +\n key +\n ') ' +\n path.toErrorString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"'\n );\n }\n }\n\n path.push(key);\n validateFirebaseData(errorPrefix, value, path);\n path.pop();\n });\n\n if (hasDotValue && hasActualChild) {\n throw new Error(\n errorPrefix +\n ' contains \".value\" child ' +\n path.toErrorString() +\n ' in addition to actual children.'\n );\n }\n }\n};\n\n/**\n * Pre-validate paths passed in the firebase function.\n *\n * @param {string} errorPrefix\n * @param {Array} mergePaths\n */\nexport const validateFirebaseMergePaths = function(\n errorPrefix: string,\n mergePaths: Path[]\n) {\n let i, curPath;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n const keys = curPath.slice();\n for (let j = 0; j < keys.length; j++) {\n if (keys[j] === '.priority' && j === keys.length - 1) {\n // .priority is OK\n } else if (!isValidKey(keys[j])) {\n throw new Error(\n errorPrefix +\n 'contains an invalid key (' +\n keys[j] +\n ') in path ' +\n curPath.toString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"'\n );\n }\n }\n }\n\n // Check that update keys are not descendants of each other.\n // We rely on the property that sorting guarantees that ancestors come\n // right before descendants.\n mergePaths.sort(Path.comparePaths);\n let prevPath: Path | null = null;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n if (prevPath !== null && prevPath.contains(curPath)) {\n throw new Error(\n errorPrefix +\n 'contains a path ' +\n prevPath.toString() +\n ' that is ancestor of another path ' +\n curPath.toString()\n );\n }\n prevPath = curPath;\n }\n};\n\n/**\n * pre-validate an object passed as an argument to firebase function (\n * must be an object - e.g. for firebase.update()).\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexport const validateFirebaseMergeDataArg = function(\n fnName: string,\n argumentNumber: number,\n data: any,\n path: Path,\n optional: boolean\n) {\n if (optional && data === undefined) return;\n\n const errorPrefix = errorPrefixFxn(fnName, argumentNumber, optional);\n\n if (!(data && typeof data === 'object') || Array.isArray(data)) {\n throw new Error(\n errorPrefix + ' must be an object containing the children to replace.'\n );\n }\n\n const mergePaths: Path[] = [];\n forEach(data, function(key: string, value: any) {\n const curPath = new Path(key);\n validateFirebaseData(errorPrefix, value, path.child(curPath));\n if (curPath.getBack() === '.priority') {\n if (!isValidPriority(value)) {\n throw new Error(\n errorPrefix +\n \"contains an invalid value for '\" +\n curPath.toString() +\n \"', which must be a valid \" +\n 'Firebase priority (a string, finite number, server value, or null).'\n );\n }\n }\n mergePaths.push(curPath);\n });\n validateFirebaseMergePaths(errorPrefix, mergePaths);\n};\n\nexport const validatePriority = function(\n fnName: string,\n argumentNumber: number,\n priority: any,\n optional: boolean\n) {\n if (optional && priority === undefined) return;\n if (isInvalidJSONNumber(priority))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'is ' +\n priority.toString() +\n ', but must be a valid Firebase priority (a string, finite number, ' +\n 'server value, or null).'\n );\n // Special case to allow importing data with a .sv.\n if (!isValidPriority(priority))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid Firebase priority ' +\n '(a string, finite number, server value, or null).'\n );\n};\n\nexport const validateEventType = function(\n fnName: string,\n argumentNumber: number,\n eventType: string,\n optional: boolean\n) {\n if (optional && eventType === undefined) return;\n\n switch (eventType) {\n case 'value':\n case 'child_added':\n case 'child_removed':\n case 'child_changed':\n case 'child_moved':\n break;\n default:\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid event type = \"value\", \"child_added\", \"child_removed\", ' +\n '\"child_changed\", or \"child_moved\".'\n );\n }\n};\n\nexport const validateKey = function(\n fnName: string,\n argumentNumber: number,\n key: string,\n optional: boolean\n) {\n if (optional && key === undefined) return;\n if (!isValidKey(key))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'was an invalid key = \"' +\n key +\n '\". Firebase keys must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\").'\n );\n};\n\nexport const validatePathString = function(\n fnName: string,\n argumentNumber: number,\n pathString: string,\n optional: boolean\n) {\n if (optional && pathString === undefined) return;\n\n if (!isValidPathString(pathString))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'was an invalid path = \"' +\n pathString +\n '\". Paths must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\"'\n );\n};\n\nexport const validateRootPathString = function(\n fnName: string,\n argumentNumber: number,\n pathString: string,\n optional: boolean\n) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n\n validatePathString(fnName, argumentNumber, pathString, optional);\n};\n\nexport const validateWritablePath = function(fnName: string, path: Path) {\n if (path.getFront() === '.info') {\n throw new Error(fnName + \" failed = Can't modify data under /.info/\");\n }\n};\n\nexport const validateUrl = function(\n fnName: string,\n argumentNumber: number,\n parsedUrl: { repoInfo: RepoInfo; path: Path }\n) {\n // TODO = Validate server better.\n const pathString = parsedUrl.path.toString();\n if (\n !(typeof parsedUrl.repoInfo.host === 'string') ||\n parsedUrl.repoInfo.host.length === 0 ||\n !isValidKey(parsedUrl.repoInfo.namespace) ||\n (pathString.length !== 0 && !isValidRootPathString(pathString))\n ) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, false) +\n 'must be a valid firebase URL and ' +\n 'the path can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\".'\n );\n }\n};\n\nexport const validateCredential = function(\n fnName: string,\n argumentNumber: number,\n cred: any,\n optional: boolean\n) {\n if (optional && cred === undefined) return;\n if (!(typeof cred === 'string'))\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid credential (a string).'\n );\n};\n\nexport const validateBoolean = function(\n fnName: string,\n argumentNumber: number,\n bool: any,\n optional: boolean\n) {\n if (optional && bool === undefined) return;\n if (typeof bool !== 'boolean')\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) + 'must be a boolean.'\n );\n};\n\nexport const validateString = function(\n fnName: string,\n argumentNumber: number,\n string: any,\n optional: boolean\n) {\n if (optional && string === undefined) return;\n if (!(typeof string === 'string')) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid string.'\n );\n }\n};\n\nexport const validateObject = function(\n fnName: string,\n argumentNumber: number,\n obj: any,\n optional: boolean\n) {\n if (optional && obj === undefined) return;\n if (!(obj && typeof obj === 'object') || obj === null) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must be a valid object.'\n );\n }\n};\n\nexport const validateObjectContainsKey = function(\n fnName: string,\n argumentNumber: number,\n obj: any,\n key: string,\n optional: boolean,\n opt_type?: string\n) {\n const objectContainsKey =\n obj && typeof obj === 'object' && contains(obj, key);\n\n if (!objectContainsKey) {\n if (optional) {\n return;\n } else {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\"'\n );\n }\n }\n\n if (opt_type) {\n const val = safeGet(obj, key);\n if (\n (opt_type === 'number' && !(typeof val === 'number')) ||\n (opt_type === 'string' && !(typeof val === 'string')) ||\n (opt_type === 'boolean' && !(typeof val === 'boolean')) ||\n (opt_type === 'function' && !(typeof val === 'function')) ||\n (opt_type === 'object' && !(typeof val === 'object') && val)\n ) {\n if (optional) {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'contains invalid value for key \"' +\n key +\n '\" (must be of type \"' +\n opt_type +\n '\")'\n );\n } else {\n throw new Error(\n errorPrefixFxn(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\" with type \"' +\n opt_type +\n '\"'\n );\n }\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/validation.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { validateArgCount, validateCallback } from '../../utils/validation';\nimport {\n validateWritablePath,\n validateFirebaseDataArg,\n validatePriority,\n validateFirebaseMergeDataArg\n} from '../core/util/validation';\nimport { warn } from '../core/util/util';\nimport { Deferred } from '../../utils/promise';\nimport { Repo } from '../core/Repo';\nimport { Path } from '../core/util/Path';\n\n/**\n * @constructor\n */\nexport class OnDisconnect {\n /**\n * @param {!Repo} repo_\n * @param {!Path} path_\n */\n constructor(private repo_: Repo, private path_: Path) {}\n\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n cancel(onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('OnDisconnect.cancel', 0, 1, arguments.length);\n validateCallback('OnDisconnect.cancel', 1, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectCancel(\n this.path_,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n remove(onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('OnDisconnect.remove', 0, 1, arguments.length);\n validateWritablePath('OnDisconnect.remove', this.path_);\n validateCallback('OnDisconnect.remove', 1, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectSet(\n this.path_,\n null,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*} value\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n set(value: any, onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('OnDisconnect.set', 1, 2, arguments.length);\n validateWritablePath('OnDisconnect.set', this.path_);\n validateFirebaseDataArg('OnDisconnect.set', 1, value, this.path_, false);\n validateCallback('OnDisconnect.set', 2, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectSet(\n this.path_,\n value,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*} value\n * @param {number|string|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n setWithPriority(\n value: any,\n priority: number | string | null,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('OnDisconnect.setWithPriority', 2, 3, arguments.length);\n validateWritablePath('OnDisconnect.setWithPriority', this.path_);\n validateFirebaseDataArg(\n 'OnDisconnect.setWithPriority',\n 1,\n value,\n this.path_,\n false\n );\n validatePriority('OnDisconnect.setWithPriority', 2, priority, false);\n validateCallback('OnDisconnect.setWithPriority', 3, onComplete, true);\n\n const deferred = new Deferred();\n this.repo_.onDisconnectSetWithPriority(\n this.path_,\n value,\n priority,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n update(\n objectToMerge: object,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('OnDisconnect.update', 1, 2, arguments.length);\n validateWritablePath('OnDisconnect.update', this.path_);\n if (Array.isArray(objectToMerge)) {\n const newObjectToMerge: { [k: string]: any } = {};\n for (let i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n warn(\n 'Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the ' +\n 'existing data, or an Object with integer keys if you really do want to only update some of the children.'\n );\n }\n validateFirebaseMergeDataArg(\n 'OnDisconnect.update',\n 1,\n objectToMerge,\n this.path_,\n false\n );\n validateCallback('OnDisconnect.update', 2, onComplete, true);\n const deferred = new Deferred();\n this.repo_.onDisconnectUpdate(\n this.path_,\n objectToMerge,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/onDisconnect.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { DataSnapshot } from './DataSnapshot';\nimport { validateArgCount } from '../../utils/validation';\n\nexport class TransactionResult {\n /**\n * A type for the resolve value of Firebase.transaction.\n * @constructor\n * @dict\n * @param {boolean} committed\n * @param {DataSnapshot} snapshot\n */\n constructor(public committed: boolean, public snapshot: DataSnapshot) {}\n\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n toJSON(): object {\n validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);\n return { committed: this.committed, snapshot: this.snapshot.toJSON() };\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/TransactionResult.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\n\n/**\n * Fancy ID generator that creates 20-character string identifiers with the\n * following properties:\n *\n * 1. They're based on timestamp so that they sort *after* any existing ids.\n * 2. They contain 72-bits of random data after the timestamp so that IDs won't\n * collide with other clients' IDs.\n * 3. They sort *lexicographically* (so the timestamp is converted to characters\n * that will sort properly).\n * 4. They're monotonically increasing. Even if you generate more than one in\n * the same timestamp, the latter ones will sort after the former ones. We do\n * this by using the previous random bits but \"incrementing\" them by 1 (only\n * in the case of a timestamp collision).\n */\nexport const nextPushId = (function() {\n // Modeled after base64 web-safe chars, but ordered by ASCII.\n const PUSH_CHARS =\n '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n\n // Timestamp of last push, used to prevent local collisions if you push twice\n // in one ms.\n let lastPushTime = 0;\n\n // We generate 72-bits of randomness which get turned into 12 characters and\n // appended to the timestamp to prevent collisions with other clients. We\n // store the last characters we generated because in the event of a collision,\n // we'll use those same characters except \"incremented\" by one.\n const lastRandChars: number[] = [];\n\n return function(now: number) {\n const duplicateTime = now === lastPushTime;\n lastPushTime = now;\n\n let i;\n const timeStampChars = new Array(8);\n for (i = 7; i >= 0; i--) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n // NOTE: Can't use << here because javascript will convert to int and lose\n // the upper bits.\n now = Math.floor(now / 64);\n }\n assert(now === 0, 'Cannot push at time == 0');\n\n let id = timeStampChars.join('');\n\n if (!duplicateTime) {\n for (i = 0; i < 12; i++) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n } else {\n // If the timestamp hasn't changed since last push, use the same random\n // number, except incremented by 1.\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i--) {\n lastRandChars[i] = 0;\n }\n lastRandChars[i]++;\n }\n for (i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n assert(id.length === 20, 'nextPushId: Length should be 20.');\n\n return id;\n };\n})();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/NextPushId.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../util/Path';\nimport { Index } from './indexes/Index';\n\n/**\n * Node is an interface defining the common functionality for nodes in\n * a DataSnapshot.\n *\n * @interface\n */\nexport interface Node {\n /**\n * Whether this node is a leaf node.\n * @return {boolean} Whether this is a leaf node.\n */\n isLeafNode(): boolean;\n\n /**\n * Gets the priority of the node.\n * @return {!Node} The priority of the node.\n */\n getPriority(): Node;\n\n /**\n * Returns a duplicate node with the new priority.\n * @param {!Node} newPriorityNode New priority to set for the node.\n * @return {!Node} Node with new priority.\n */\n updatePriority(newPriorityNode: Node): Node;\n\n /**\n * Returns the specified immediate child, or null if it doesn't exist.\n * @param {string} childName The name of the child to retrieve.\n * @return {!Node} The retrieved child, or an empty node.\n */\n getImmediateChild(childName: string): Node;\n\n /**\n * Returns a child by path, or null if it doesn't exist.\n * @param {!Path} path The path of the child to retrieve.\n * @return {!Node} The retrieved child or an empty node.\n */\n getChild(path: Path): Node;\n\n /**\n * Returns the name of the child immediately prior to the specified childNode, or null.\n * @param {!string} childName The name of the child to find the predecessor of.\n * @param {!Node} childNode The node to find the predecessor of.\n * @param {!Index} index The index to use to determine the predecessor\n * @return {?string} The name of the predecessor child, or null if childNode is the first child.\n */\n getPredecessorChildName(\n childName: String,\n childNode: Node,\n index: Index\n ): string | null;\n\n /**\n * Returns a duplicate node, with the specified immediate child updated.\n * Any value in the node will be removed.\n * @param {string} childName The name of the child to update.\n * @param {!Node} newChildNode The new child node\n * @return {!Node} The updated node.\n */\n updateImmediateChild(childName: string, newChildNode: Node): Node;\n\n /**\n * Returns a duplicate node, with the specified child updated. Any value will\n * be removed.\n * @param {!Path} path The path of the child to update.\n * @param {!Node} newChildNode The new child node, which may be an empty node\n * @return {!Node} The updated node.\n */\n updateChild(path: Path, newChildNode: Node): Node;\n\n /**\n * True if the immediate child specified exists\n * @param {!string} childName\n * @return {boolean}\n */\n hasChild(childName: string): boolean;\n\n /**\n * @return {boolean} True if this node has no value or children.\n */\n isEmpty(): boolean;\n\n /**\n * @return {number} The number of children of this node.\n */\n numChildren(): number;\n\n /**\n * Calls action for each child.\n * @param {!Index} index\n * @param {function(string, !Node)} action Action to be called for\n * each child. It's passed the child name and the child node.\n * @return {*} The first truthy value return by action, or the last falsey one\n */\n forEachChild(index: Index, action: (a: string, b: Node) => void): any;\n\n /**\n * @param {boolean=} exportFormat True for export format (also wire protocol format).\n * @return {*} Value of this node as JSON.\n */\n val(exportFormat?: boolean): Object;\n\n /**\n * @return {string} hash representing the node contents.\n */\n hash(): string;\n\n /**\n * @param {!Node} other Another node\n * @return {!number} -1 for less than, 0 for equal, 1 for greater than other\n */\n compareTo(other: Node): number;\n\n /**\n * @param {!Node} other\n * @return {boolean} Whether or not this snapshot equals other\n */\n equals(other: Node): boolean;\n\n /**\n * @param {!Index} indexDefinition\n * @return {!Node} This node, with the specified index now available\n */\n withIndex(indexDefinition: Index): Node;\n\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n isIndexed(indexDefinition: Index): boolean;\n}\n\n/**\n *\n * @param {!string} name\n * @param {!Node} node\n * @constructor\n * @struct\n */\nexport class NamedNode {\n constructor(public name: string, public node: Node) {}\n\n /**\n *\n * @param {!string} name\n * @param {!Node} node\n * @return {NamedNode}\n */\n static Wrap(name: string, node: Node) {\n return new NamedNode(name, node);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/Node.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Node, NamedNode } from '../Node';\nimport { MIN_NAME, MAX_NAME } from '../../util/util';\nimport { Comparator } from '../../util/SortedMap';\n\n/**\n *\n * @constructor\n */\nexport abstract class Index {\n /**\n * @param {!NamedNode} a\n * @param {!NamedNode} b\n * @return {number}\n */\n abstract compare(a: NamedNode, b: NamedNode): number;\n\n /**\n * @param {!Node} node\n * @return {boolean}\n */\n abstract isDefinedOn(node: Node): boolean;\n\n /**\n * @return {function(!NamedNode, !NamedNode):number} A standalone comparison function for\n * this index\n */\n getCompare(): Comparator {\n return this.compare.bind(this);\n }\n\n /**\n * Given a before and after value for a node, determine if the indexed value has changed. Even if they are different,\n * it's possible that the changes are isolated to parts of the snapshot that are not indexed.\n *\n * @param {!Node} oldNode\n * @param {!Node} newNode\n * @return {boolean} True if the portion of the snapshot being indexed changed between oldNode and newNode\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n const oldWrapped = new NamedNode(MIN_NAME, oldNode);\n const newWrapped = new NamedNode(MIN_NAME, newNode);\n return this.compare(oldWrapped, newWrapped) !== 0;\n }\n\n /**\n * @return {!NamedNode} a node wrapper that will sort equal to or less than\n * any other node wrapper, using this index\n */\n minPost(): NamedNode {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @return {!NamedNode} a node wrapper that will sort greater than or equal to\n * any other node wrapper, using this index\n */\n abstract maxPost(): NamedNode;\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n abstract makePost(indexValue: any, name: string): NamedNode;\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n abstract toString(): string;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/Index.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Implementation of an immutable SortedMap using a Left-leaning\n * Red-Black Tree, adapted from the implementation in Mugs\n * (http://mads379.github.com/mugs/) by Mads Hartmann Jensen\n * (mads379@gmail.com).\n *\n * Original paper on Left-leaning Red-Black Trees:\n * http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf\n *\n * Invariant 1: No red node has a red child\n * Invariant 2: Every leaf path has the same number of black nodes\n * Invariant 3: Only the left child can be red (left leaning)\n */\n\n// TODO: There are some improvements I'd like to make to improve memory / perf:\n// * Create two prototypes, LLRedNode and LLBlackNode, instead of storing a\n// color property in every node.\n// TODO: It would also be good (and possibly necessary) to create a base\n// interface for LLRBNode and LLRBEmptyNode.\n\nexport type Comparator = (key1: K, key2: K) => number;\n\n/**\n * An iterator over an LLRBNode.\n */\nexport class SortedMapIterator {\n /** @private\n * @type {Array.}\n */\n private nodeStack_: (LLRBNode | LLRBEmptyNode)[] = [];\n\n /**\n * @template K, V, T\n * @param {LLRBNode|LLRBEmptyNode} node Node to iterate.\n * @param {?K} startKey\n * @param {function(K, K): number} comparator\n * @param {boolean} isReverse_ Whether or not to iterate in reverse\n * @param {(function(K, V):T)=} resultGenerator_\n */\n constructor(\n node: LLRBNode | LLRBEmptyNode,\n startKey: K | null,\n comparator: Comparator,\n private isReverse_: boolean,\n private resultGenerator_: ((k: K, v: V) => T) | null = null\n ) {\n let cmp = 1;\n while (!node.isEmpty()) {\n node = node as LLRBNode;\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse_) cmp *= -1;\n\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse_) {\n node = node.left;\n } else {\n node = node.right;\n }\n } else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack, but stop iterating;\n this.nodeStack_.push(node);\n break;\n } else {\n // This node is greater than our start key, add it to the stack and move to the next one\n this.nodeStack_.push(node);\n if (this.isReverse_) {\n node = node.right;\n } else {\n node = node.left;\n }\n }\n }\n }\n\n getNext(): T {\n if (this.nodeStack_.length === 0) return null;\n\n let node = this.nodeStack_.pop();\n let result: T;\n if (this.resultGenerator_)\n result = this.resultGenerator_(node.key, node.value);\n else result = { key: node.key, value: node.value } as any;\n\n if (this.isReverse_) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.right;\n }\n } else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.left;\n }\n }\n\n return result;\n }\n\n hasNext(): boolean {\n return this.nodeStack_.length > 0;\n }\n\n peek(): T {\n if (this.nodeStack_.length === 0) return null;\n\n const node = this.nodeStack_[this.nodeStack_.length - 1];\n if (this.resultGenerator_) {\n return this.resultGenerator_(node.key, node.value);\n } else {\n return { key: node.key, value: node.value } as any;\n }\n }\n}\n\n/**\n * Represents a node in a Left-leaning Red-Black tree.\n */\nexport class LLRBNode {\n color: boolean;\n left: LLRBNode | LLRBEmptyNode;\n right: LLRBNode | LLRBEmptyNode;\n\n /**\n * @template K, V\n * @param {!K} key Key associated with this node.\n * @param {!V} value Value associated with this node.\n * @param {?boolean} color Whether this node is red.\n * @param {?(LLRBNode|LLRBEmptyNode)=} left Left child.\n * @param {?(LLRBNode|LLRBEmptyNode)=} right Right child.\n */\n constructor(\n public key: K,\n public value: V,\n color: boolean | null,\n left?: LLRBNode | LLRBEmptyNode | null,\n right?: LLRBNode | LLRBEmptyNode | null\n ) {\n this.color = color != null ? color : LLRBNode.RED;\n this.left =\n left != null ? left : SortedMap.EMPTY_NODE as LLRBEmptyNode;\n this.right =\n right != null ? right : SortedMap.EMPTY_NODE as LLRBEmptyNode;\n }\n\n static RED = true;\n static BLACK = false;\n\n /**\n * Returns a copy of the current node, optionally replacing pieces of it.\n *\n * @param {?K} key New key for the node, or null.\n * @param {?V} value New value for the node, or null.\n * @param {?boolean} color New color for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} left New left child for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} right New right child for the node, or null.\n * @return {!LLRBNode} The node copy.\n */\n copy(\n key: K | null,\n value: V | null,\n color: boolean | null,\n left: LLRBNode | LLRBEmptyNode | null,\n right: LLRBNode | LLRBEmptyNode | null\n ): LLRBNode {\n return new LLRBNode(\n key != null ? key : this.key,\n value != null ? value : this.value,\n color != null ? color : this.color,\n left != null ? left : this.left,\n right != null ? right : this.right\n );\n }\n\n /**\n * @return {number} The total number of nodes in the tree.\n */\n count(): number {\n return this.left.count() + 1 + this.right.count();\n }\n\n /**\n * @return {boolean} True if the tree is empty.\n */\n isEmpty(): boolean {\n return false;\n }\n\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n inorderTraversal(action: (k: K, v: V) => any): boolean {\n return (\n this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action)\n );\n }\n\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!Object, !Object)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} True if traversal was aborted.\n */\n reverseTraversal(action: (k: K, v: V) => void): boolean {\n return (\n this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action)\n );\n }\n\n /**\n * @return {!Object} The minimum node in the tree.\n * @private\n */\n private min_(): LLRBNode {\n if (this.left.isEmpty()) {\n return this;\n } else {\n return (this.left as LLRBNode).min_();\n }\n }\n\n /**\n * @return {!K} The maximum key in the tree.\n */\n minKey(): K {\n return this.min_().key;\n }\n\n /**\n * @return {!K} The maximum key in the tree.\n */\n maxKey(): K {\n if (this.right.isEmpty()) {\n return this.key;\n } else {\n return this.right.maxKey();\n }\n }\n\n /**\n *\n * @param {!Object} key Key to insert.\n * @param {!Object} value Value to insert.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with the key/value added.\n */\n insert(key: K, value: V, comparator: Comparator): LLRBNode {\n let cmp, n;\n n = this;\n cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n } else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n } else {\n n = n.copy(\n null,\n null,\n null,\n null,\n n.right.insert(key, value, comparator)\n );\n }\n return n.fixUp_();\n }\n\n /**\n * @private\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the minimum key removed.\n */\n private removeMin_(): LLRBNode | LLRBEmptyNode {\n if (this.left.isEmpty()) {\n return SortedMap.EMPTY_NODE as LLRBEmptyNode;\n }\n let n: LLRBNode = this;\n if (!n.left.isRed_() && !n.left.left.isRed_()) n = n.moveRedLeft_();\n n = n.copy(null, null, null, (n.left as LLRBNode).removeMin_(), null);\n return n.fixUp_();\n }\n\n /**\n * @param {!Object} key The key of the item to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the specified item removed.\n */\n remove(\n key: K,\n comparator: Comparator\n ): LLRBNode | LLRBEmptyNode {\n let n, smallest;\n n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed_() && !n.left.left.isRed_()) {\n n = n.moveRedLeft_();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n } else {\n if (n.left.isRed_()) n = n.rotateRight_();\n if (!n.right.isEmpty() && !n.right.isRed_() && !n.right.left.isRed_()) {\n n = n.moveRedRight_();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return SortedMap.EMPTY_NODE as LLRBEmptyNode;\n } else {\n smallest = (n.right as LLRBNode).min_();\n n = n.copy(\n smallest.key,\n smallest.value,\n null,\n null,\n (n.right as LLRBNode).removeMin_()\n );\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp_();\n }\n\n /**\n * @private\n * @return {boolean} Whether this is a RED node.\n */\n isRed_(): boolean {\n return this.color;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree after performing any needed rotations.\n */\n private fixUp_(): LLRBNode {\n let n = this as any;\n if (n.right.isRed_() && !n.left.isRed_()) n = n.rotateLeft_();\n if (n.left.isRed_() && n.left.left.isRed_()) n = n.rotateRight_();\n if (n.left.isRed_() && n.right.isRed_()) n = n.colorFlip_();\n return n;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedLeft.\n */\n private moveRedLeft_(): LLRBNode {\n let n = this.colorFlip_();\n if (n.right.left.isRed_()) {\n n = n.copy(\n null,\n null,\n null,\n null,\n (n.right as LLRBNode).rotateRight_()\n );\n n = n.rotateLeft_();\n n = n.colorFlip_();\n }\n return n;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedRight.\n */\n private moveRedRight_(): LLRBNode {\n let n = this.colorFlip_();\n if (n.left.left.isRed_()) {\n n = n.rotateRight_();\n n = n.colorFlip_();\n }\n return n;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateLeft.\n */\n private rotateLeft_(): LLRBNode {\n const nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null) as LLRBNode;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateRight.\n */\n private rotateRight_(): LLRBNode {\n const nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr) as LLRBNode;\n }\n\n /**\n * @private\n * @return {!LLRBNode} New tree, after colorFlip.\n */\n private colorFlip_(): LLRBNode {\n const left = this.left.copy(null, null, !this.left.color, null, null);\n const right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n }\n\n /**\n * For testing.\n *\n * @private\n * @return {boolean} True if all is well.\n */\n private checkMaxDepth_(): boolean {\n const blackDepth = this.check_();\n return Math.pow(2.0, blackDepth) <= this.count() + 1;\n }\n\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n check_(): number {\n let blackDepth;\n if (this.isRed_() && this.left.isRed_()) {\n throw new Error(\n 'Red node has red child(' + this.key + ',' + this.value + ')'\n );\n }\n if (this.right.isRed_()) {\n throw new Error(\n 'Right child of (' + this.key + ',' + this.value + ') is red'\n );\n }\n blackDepth = this.left.check_();\n if (blackDepth !== this.right.check_()) {\n throw new Error('Black depths differ');\n } else {\n return blackDepth + (this.isRed_() ? 0 : 1);\n }\n }\n}\n\n/**\n * Represents an empty node (a leaf node in the Red-Black Tree).\n */\nexport class LLRBEmptyNode {\n key: K;\n value: V;\n left: LLRBNode | LLRBEmptyNode;\n right: LLRBNode | LLRBEmptyNode;\n color: boolean;\n\n /**\n * Returns a copy of the current node.\n *\n * @return {!LLRBEmptyNode} The node copy.\n */\n copy(\n key: K | null,\n value: V | null,\n color: boolean | null,\n left: LLRBNode | LLRBEmptyNode | null,\n right: LLRBNode | LLRBEmptyNode | null\n ): LLRBEmptyNode {\n return this;\n }\n\n /**\n * Returns a copy of the tree, with the specified key/value added.\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with item added.\n */\n insert(key: K, value: V, comparator: Comparator): LLRBNode {\n return new LLRBNode(key, value, null);\n }\n\n /**\n * Returns a copy of the tree, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBEmptyNode} New tree, with item removed.\n */\n remove(key: K, comparator: Comparator): LLRBEmptyNode {\n return this;\n }\n\n /**\n * @return {number} The total number of nodes in the tree.\n */\n count(): number {\n return 0;\n }\n\n /**\n * @return {boolean} True if the tree is empty.\n */\n isEmpty(): boolean {\n return true;\n }\n\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n inorderTraversal(action: (k: K, v: V) => any): boolean {\n return false;\n }\n\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n reverseTraversal(action: (k: K, v: V) => void): boolean {\n return false;\n }\n\n /**\n * @return {null}\n */\n minKey(): null {\n return null;\n }\n\n /**\n * @return {null}\n */\n maxKey(): null {\n return null;\n }\n\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n check_(): number {\n return 0;\n }\n\n /**\n * @private\n * @return {boolean} Whether this node is red.\n */\n isRed_() {\n return false;\n }\n}\n\n/**\n * An immutable sorted map implementation, based on a Left-leaning Red-Black\n * tree.\n */\nexport class SortedMap {\n /**\n * Always use the same empty node, to reduce memory.\n * @const\n */\n static EMPTY_NODE = new LLRBEmptyNode();\n\n /**\n * @template K, V\n * @param {function(K, K):number} comparator_ Key comparator.\n * @param {LLRBNode=} root_ (Optional) Root node for the map.\n */\n constructor(\n private comparator_: Comparator,\n private root_:\n | LLRBNode\n | LLRBEmptyNode = SortedMap.EMPTY_NODE as LLRBEmptyNode\n ) {}\n\n /**\n * Returns a copy of the map, with the specified key/value added or replaced.\n * (TODO: We should perhaps rename this method to 'put')\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @return {!SortedMap.} New map, with item added.\n */\n insert(key: K, value: V): SortedMap {\n return new SortedMap(\n this.comparator_,\n this.root_\n .insert(key, value, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null)\n );\n }\n\n /**\n * Returns a copy of the map, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @return {!SortedMap.} New map, with item removed.\n */\n remove(key: K): SortedMap {\n return new SortedMap(\n this.comparator_,\n this.root_\n .remove(key, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null)\n );\n }\n\n /**\n * Returns the value of the node with the given key, or null.\n *\n * @param {!K} key The key to look up.\n * @return {?V} The value of the node with the given key, or null if the\n * key doesn't exist.\n */\n get(key: K): V | null {\n let cmp;\n let node = this.root_;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n return node.value;\n } else if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n }\n\n /**\n * Returns the key of the item *before* the specified key, or null if key is the first item.\n * @param {K} key The key to find the predecessor of\n * @return {?K} The predecessor key.\n */\n getPredecessorKey(key: K): K | null {\n let cmp,\n node = this.root_,\n rightParent = null;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty()) node = node.right;\n return node.key;\n } else if (rightParent) {\n return rightParent.key;\n } else {\n return null; // first item.\n }\n } else if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n\n throw new Error(\n 'Attempted to find predecessor key for a nonexistent key. What gives?'\n );\n }\n\n /**\n * @return {boolean} True if the map is empty.\n */\n isEmpty(): boolean {\n return this.root_.isEmpty();\n }\n\n /**\n * @return {number} The total number of nodes in the map.\n */\n count(): number {\n return this.root_.count();\n }\n\n /**\n * @return {?K} The minimum key in the map.\n */\n minKey(): K | null {\n return this.root_.minKey();\n }\n\n /**\n * @return {?K} The maximum key in the map.\n */\n maxKey(): K | null {\n return this.root_.maxKey();\n }\n\n /**\n * Traverses the map in key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!K, !V):*} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n inorderTraversal(action: (k: K, v: V) => any): boolean {\n return this.root_.inorderTraversal(action);\n }\n\n /**\n * Traverses the map in reverse key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!Object, !Object)} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} True if the traversal was aborted.\n */\n reverseTraversal(action: (k: K, v: V) => void): boolean {\n return this.root_.reverseTraversal(action);\n }\n\n /**\n * Returns an iterator over the SortedMap.\n * @template T\n * @param {(function(K, V):T)=} resultGenerator\n * @return {SortedMapIterator.} The iterator.\n */\n getIterator(\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n null,\n this.comparator_,\n false,\n resultGenerator\n );\n }\n\n getIteratorFrom(\n key: K,\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n key,\n this.comparator_,\n false,\n resultGenerator\n );\n }\n\n getReverseIteratorFrom(\n key: K,\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n key,\n this.comparator_,\n true,\n resultGenerator\n );\n }\n\n getReverseIterator(\n resultGenerator?: (k: K, v: V) => T\n ): SortedMapIterator {\n return new SortedMapIterator(\n this.root_,\n null,\n this.comparator_,\n true,\n resultGenerator\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/SortedMap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { LLRBNode } from '../util/SortedMap';\nimport { SortedMap } from '../util/SortedMap';\nimport { NamedNode } from './Node';\n\nconst LOG_2 = Math.log(2);\n\n/**\n * @constructor\n */\nclass Base12Num {\n count: number;\n private current_: number;\n private bits_: number;\n\n /**\n * @param {number} length\n */\n constructor(length: number) {\n const logBase2 = (num: number) =>\n parseInt((Math.log(num) / LOG_2) as any, 10);\n const bitMask = (bits: number) => parseInt(Array(bits + 1).join('1'), 2);\n this.count = logBase2(length + 1);\n this.current_ = this.count - 1;\n const mask = bitMask(this.count);\n this.bits_ = (length + 1) & mask;\n }\n\n /**\n * @return {boolean}\n */\n nextBitIsOne(): boolean {\n //noinspection JSBitwiseOperatorUsage\n const result = !(this.bits_ & (0x1 << this.current_));\n this.current_--;\n return result;\n }\n}\n\n/**\n * Takes a list of child nodes and constructs a SortedSet using the given comparison\n * function\n *\n * Uses the algorithm described in the paper linked here:\n * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.1458\n *\n * @template K, V\n * @param {Array.} childList Unsorted list of children\n * @param {function(!NamedNode, !NamedNode):number} cmp The comparison method to be used\n * @param {(function(NamedNode):K)=} keyFn An optional function to extract K from a node wrapper, if K's\n * type is not NamedNode\n * @param {(function(K, K):number)=} mapSortFn An optional override for comparator used by the generated sorted map\n * @return {SortedMap.}\n */\nexport const buildChildSet = function(\n childList: NamedNode[],\n cmp: (a: NamedNode, b: NamedNode) => number,\n keyFn?: (a: NamedNode) => K,\n mapSortFn?: (a: K, b: K) => number\n): SortedMap {\n childList.sort(cmp);\n\n const buildBalancedTree = function(\n low: number,\n high: number\n ): LLRBNode | null {\n const length = high - low;\n let namedNode: NamedNode;\n let key: K;\n if (length == 0) {\n return null;\n } else if (length == 1) {\n namedNode = childList[low];\n key = keyFn ? keyFn(namedNode) : (namedNode as any) as K;\n return new LLRBNode(\n key,\n (namedNode.node as any) as V,\n LLRBNode.BLACK,\n null,\n null\n );\n } else {\n const middle = parseInt((length / 2) as any, 10) + low;\n const left = buildBalancedTree(low, middle);\n const right = buildBalancedTree(middle + 1, high);\n namedNode = childList[middle];\n key = keyFn ? keyFn(namedNode) : (namedNode as any) as K;\n return new LLRBNode(\n key,\n (namedNode.node as any) as V,\n LLRBNode.BLACK,\n left,\n right\n );\n }\n };\n\n const buildFrom12Array = function(base12: Base12Num): LLRBNode {\n let node: LLRBNode = null;\n let root = null;\n let index = childList.length;\n\n const buildPennant = function(chunkSize: number, color: boolean) {\n const low = index - chunkSize;\n const high = index;\n index -= chunkSize;\n const childTree = buildBalancedTree(low + 1, high);\n const namedNode = childList[low];\n const key: K = keyFn ? keyFn(namedNode) : (namedNode as any) as K;\n attachPennant(\n new LLRBNode(key, (namedNode.node as any) as V, color, null, childTree)\n );\n };\n\n const attachPennant = function(pennant: LLRBNode) {\n if (node) {\n node.left = pennant;\n node = pennant;\n } else {\n root = pennant;\n node = pennant;\n }\n };\n\n for (let i = 0; i < base12.count; ++i) {\n const isOne = base12.nextBitIsOne();\n // The number of nodes taken in each slice is 2^(arr.length - (i + 1))\n const chunkSize = Math.pow(2, base12.count - (i + 1));\n if (isOne) {\n buildPennant(chunkSize, LLRBNode.BLACK);\n } else {\n // current == 2\n buildPennant(chunkSize, LLRBNode.BLACK);\n buildPennant(chunkSize, LLRBNode.RED);\n }\n }\n return root;\n };\n\n const base12 = new Base12Num(childList.length);\n const root = buildFrom12Array(base12);\n\n return new SortedMap(mapSortFn || (cmp as any), root);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/childSet.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Index } from './Index';\nimport { NamedNode, Node } from '../Node';\nimport { nameCompare } from '../../util/util';\nimport { nodeFromJSON } from '../nodeFromJSON';\n\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nexport class ValueIndex extends Index {\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n const indexCmp = a.node.compareTo(b.node);\n if (indexCmp === 0) {\n return nameCompare(a.name, b.name);\n } else {\n return indexCmp;\n }\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n indexedValueChanged(oldNode: Node, newNode: Node): boolean {\n return !oldNode.equals(newNode);\n }\n\n /**\n * @inheritDoc\n */\n minPost(): NamedNode {\n return (NamedNode as any).MIN;\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n return (NamedNode as any).MAX;\n }\n\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n makePost(indexValue: object, name: string): NamedNode {\n const valueNode = nodeFromJSON(indexValue);\n return new NamedNode(name, valueNode);\n }\n\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n toString(): string {\n return '.value';\n }\n}\n\nexport const VALUE_INDEX = new ValueIndex();\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/ValueIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { KEY_INDEX } from '../core/snap/indexes/KeyIndex';\nimport { PRIORITY_INDEX } from '../core/snap/indexes/PriorityIndex';\nimport { VALUE_INDEX } from '../core/snap/indexes/ValueIndex';\nimport { PathIndex } from '../core/snap/indexes/PathIndex';\nimport { MIN_NAME, MAX_NAME, ObjectToUniqueKey } from '../core/util/util';\nimport { Path } from '../core/util/Path';\nimport {\n isValidPriority,\n validateEventType,\n validatePathString,\n validateFirebaseDataArg,\n validateKey\n} from '../core/util/validation';\nimport {\n errorPrefix,\n validateArgCount,\n validateCallback,\n validateContextObject\n} from '../../utils/validation';\nimport {\n ValueEventRegistration,\n ChildEventRegistration,\n EventRegistration\n} from '../core/view/EventRegistration';\nimport { Deferred, attachDummyErrorHandler } from '../../utils/promise';\nimport { Repo } from '../core/Repo';\nimport { QueryParams } from '../core/view/QueryParams';\nimport { Reference } from './Reference';\nimport { DataSnapshot } from './DataSnapshot';\n\nlet __referenceConstructor: new (repo: Repo, path: Path) => Query;\n\nexport interface SnapshotCallback {\n (a: DataSnapshot, b?: string): any;\n}\n\n/**\n * A Query represents a filter to be applied to a firebase location. This object purely represents the\n * query expression (and exposes our public API to build the query). The actual query logic is in ViewBase.js.\n *\n * Since every Firebase reference is a query, Firebase inherits from this object.\n */\nexport class Query {\n static set __referenceConstructor(val) {\n __referenceConstructor = val;\n }\n\n static get __referenceConstructor() {\n assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n }\n\n constructor(\n public repo: Repo,\n public path: Path,\n private queryParams_: QueryParams,\n private orderByCalled_: boolean\n ) {}\n\n /**\n * Validates start/end values for queries.\n * @param {!QueryParams} params\n * @private\n */\n private static validateQueryEndpoints_(params: QueryParams) {\n let startNode = null;\n let endNode = null;\n if (params.hasStart()) {\n startNode = params.getIndexStartValue();\n }\n if (params.hasEnd()) {\n endNode = params.getIndexEndValue();\n }\n\n if (params.getIndex() === KEY_INDEX) {\n const tooManyArgsError =\n 'Query: When ordering by key, you may only pass one argument to ' +\n 'startAt(), endAt(), or equalTo().';\n const wrongArgTypeError =\n 'Query: When ordering by key, the argument passed to startAt(), endAt(),' +\n 'or equalTo() must be a string.';\n if (params.hasStart()) {\n const startName = params.getIndexStartName();\n if (startName != MIN_NAME) {\n throw new Error(tooManyArgsError);\n } else if (typeof startNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n if (params.hasEnd()) {\n const endName = params.getIndexEndName();\n if (endName != MAX_NAME) {\n throw new Error(tooManyArgsError);\n } else if (typeof endNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n } else if (params.getIndex() === PRIORITY_INDEX) {\n if (\n (startNode != null && !isValidPriority(startNode)) ||\n (endNode != null && !isValidPriority(endNode))\n ) {\n throw new Error(\n 'Query: When ordering by priority, the first argument passed to startAt(), ' +\n 'endAt(), or equalTo() must be a valid priority value (null, a number, or a string).'\n );\n }\n } else {\n assert(\n params.getIndex() instanceof PathIndex ||\n params.getIndex() === VALUE_INDEX,\n 'unknown index type.'\n );\n if (\n (startNode != null && typeof startNode === 'object') ||\n (endNode != null && typeof endNode === 'object')\n ) {\n throw new Error(\n 'Query: First argument passed to startAt(), endAt(), or equalTo() cannot be ' +\n 'an object.'\n );\n }\n }\n }\n\n /**\n * Validates that limit* has been called with the correct combination of parameters\n * @param {!QueryParams} params\n * @private\n */\n private static validateLimit_(params: QueryParams) {\n if (\n params.hasStart() &&\n params.hasEnd() &&\n params.hasLimit() &&\n !params.hasAnchoredLimit()\n ) {\n throw new Error(\n \"Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.\"\n );\n }\n }\n\n /**\n * Validates that no other order by call has been made\n * @param {!string} fnName\n * @private\n */\n private validateNoPreviousOrderByCall_(fnName: string) {\n if (this.orderByCalled_ === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n }\n\n /**\n * @return {!QueryParams}\n */\n getQueryParams(): QueryParams {\n return this.queryParams_;\n }\n\n /**\n * @return {!Reference}\n */\n getRef(): Reference {\n validateArgCount('Query.ref', 0, 0, arguments.length);\n // This is a slight hack. We cannot goog.require('fb.api.Firebase'), since Firebase requires fb.api.Query.\n // However, we will always export 'Firebase' to the global namespace, so it's guaranteed to exist by the time this\n // method gets called.\n return new Query.__referenceConstructor(this.repo, this.path) as Reference;\n }\n\n /**\n * @param {!string} eventType\n * @param {!function(DataSnapshot, string=)} callback\n * @param {(function(Error)|Object)=} cancelCallbackOrContext\n * @param {Object=} context\n * @return {!function(DataSnapshot, string=)}\n */\n on(\n eventType: string,\n callback: SnapshotCallback,\n cancelCallbackOrContext?: ((a: Error) => any) | Object,\n context?: Object\n ): SnapshotCallback {\n validateArgCount('Query.on', 2, 4, arguments.length);\n validateEventType('Query.on', 1, eventType, false);\n validateCallback('Query.on', 2, callback, false);\n\n const ret = Query.getCancelAndContextArgs_(\n 'Query.on',\n cancelCallbackOrContext,\n context\n );\n\n if (eventType === 'value') {\n this.onValueEvent(callback, ret.cancel, ret.context);\n } else {\n const callbacks: { [k: string]: typeof callback } = {};\n callbacks[eventType] = callback;\n this.onChildEvent(callbacks, ret.cancel, ret.context);\n }\n return callback;\n }\n\n /**\n * @param {!function(!DataSnapshot)} callback\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n protected onValueEvent(\n callback: (a: DataSnapshot) => void,\n cancelCallback: ((a: Error) => void) | null,\n context: Object | null\n ) {\n const container = new ValueEventRegistration(\n callback,\n cancelCallback || null,\n context || null\n );\n this.repo.addEventCallbackForQuery(this, container);\n }\n\n /**\n * @param {!Object.} callbacks\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n onChildEvent(\n callbacks: { [k: string]: SnapshotCallback },\n cancelCallback: ((a: Error) => any) | null,\n context: Object | null\n ) {\n const container = new ChildEventRegistration(\n callbacks,\n cancelCallback,\n context\n );\n this.repo.addEventCallbackForQuery(this, container);\n }\n\n /**\n * @param {string=} eventType\n * @param {(function(!DataSnapshot, ?string=))=} callback\n * @param {Object=} context\n */\n off(eventType?: string, callback?: SnapshotCallback, context?: Object) {\n validateArgCount('Query.off', 0, 3, arguments.length);\n validateEventType('Query.off', 1, eventType, true);\n validateCallback('Query.off', 2, callback, true);\n validateContextObject('Query.off', 3, context, true);\n\n let container: EventRegistration | null = null;\n let callbacks: { [k: string]: typeof callback } | null = null;\n if (eventType === 'value') {\n const valueCallback = callback || null;\n container = new ValueEventRegistration(\n valueCallback,\n null,\n context || null\n );\n } else if (eventType) {\n if (callback) {\n callbacks = {};\n callbacks[eventType] = callback;\n }\n container = new ChildEventRegistration(callbacks, null, context || null);\n }\n this.repo.removeEventCallbackForQuery(this, container);\n }\n\n /**\n * Attaches a listener, waits for the first event, and then removes the listener\n * @param {!string} eventType\n * @param {!function(!DataSnapshot, string=)} userCallback\n * @param cancelOrContext\n * @param context\n * @return {!firebase.Promise}\n */\n once(\n eventType: string,\n userCallback?: SnapshotCallback,\n cancelOrContext?: ((a: Error) => void) | Object,\n context?: Object\n ): Promise {\n validateArgCount('Query.once', 1, 4, arguments.length);\n validateEventType('Query.once', 1, eventType, false);\n validateCallback('Query.once', 2, userCallback, true);\n\n const ret = Query.getCancelAndContextArgs_(\n 'Query.once',\n cancelOrContext,\n context\n );\n\n // TODO: Implement this more efficiently (in particular, use 'get' wire protocol for 'value' event)\n // TODO: consider actually wiring the callbacks into the promise. We cannot do this without a breaking change\n // because the API currently expects callbacks will be called synchronously if the data is cached, but this is\n // against the Promise specification.\n let firstCall = true;\n const deferred = new Deferred();\n attachDummyErrorHandler(deferred.promise);\n\n const onceCallback = (snapshot: DataSnapshot) => {\n // NOTE: Even though we unsubscribe, we may get called multiple times if a single action (e.g. set() with JSON)\n // triggers multiple events (e.g. child_added or child_changed).\n if (firstCall) {\n firstCall = false;\n this.off(eventType, onceCallback);\n\n if (userCallback) {\n userCallback.bind(ret.context)(snapshot);\n }\n deferred.resolve(snapshot);\n }\n };\n\n this.on(\n eventType,\n onceCallback,\n /*cancel=*/ err => {\n this.off(eventType, onceCallback);\n\n if (ret.cancel) ret.cancel.bind(ret.context)(err);\n deferred.reject(err);\n }\n );\n return deferred.promise;\n }\n\n /**\n * Set a limit and anchor it to the start of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n limitToFirst(limit: number): Query {\n validateArgCount('Query.limitToFirst', 1, 1, arguments.length);\n if (\n typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0\n ) {\n throw new Error(\n 'Query.limitToFirst: First argument must be a positive integer.'\n );\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error(\n 'Query.limitToFirst: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).'\n );\n }\n\n return new Query(\n this.repo,\n this.path,\n this.queryParams_.limitToFirst(limit),\n this.orderByCalled_\n );\n }\n\n /**\n * Set a limit and anchor it to the end of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n limitToLast(limit: number): Query {\n validateArgCount('Query.limitToLast', 1, 1, arguments.length);\n if (\n typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0\n ) {\n throw new Error(\n 'Query.limitToLast: First argument must be a positive integer.'\n );\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error(\n 'Query.limitToLast: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).'\n );\n }\n\n return new Query(\n this.repo,\n this.path,\n this.queryParams_.limitToLast(limit),\n this.orderByCalled_\n );\n }\n\n /**\n * Given a child path, return a new query ordered by the specified grandchild path.\n * @param {!string} path\n * @return {!Query}\n */\n orderByChild(path: string): Query {\n validateArgCount('Query.orderByChild', 1, 1, arguments.length);\n if (path === '$key') {\n throw new Error(\n 'Query.orderByChild: \"$key\" is invalid. Use Query.orderByKey() instead.'\n );\n } else if (path === '$priority') {\n throw new Error(\n 'Query.orderByChild: \"$priority\" is invalid. Use Query.orderByPriority() instead.'\n );\n } else if (path === '$value') {\n throw new Error(\n 'Query.orderByChild: \"$value\" is invalid. Use Query.orderByValue() instead.'\n );\n }\n validatePathString('Query.orderByChild', 1, path, false);\n this.validateNoPreviousOrderByCall_('Query.orderByChild');\n const parsedPath = new Path(path);\n if (parsedPath.isEmpty()) {\n throw new Error(\n 'Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.'\n );\n }\n const index = new PathIndex(parsedPath);\n const newParams = this.queryParams_.orderBy(index);\n Query.validateQueryEndpoints_(newParams);\n\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * Return a new query ordered by the KeyIndex\n * @return {!Query}\n */\n orderByKey(): Query {\n validateArgCount('Query.orderByKey', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByKey');\n const newParams = this.queryParams_.orderBy(KEY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * Return a new query ordered by the PriorityIndex\n * @return {!Query}\n */\n orderByPriority(): Query {\n validateArgCount('Query.orderByPriority', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByPriority');\n const newParams = this.queryParams_.orderBy(PRIORITY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * Return a new query ordered by the ValueIndex\n * @return {!Query}\n */\n orderByValue(): Query {\n validateArgCount('Query.orderByValue', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByValue');\n const newParams = this.queryParams_.orderBy(VALUE_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n }\n\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n startAt(\n value: number | string | boolean | null = null,\n name?: string | null\n ): Query {\n validateArgCount('Query.startAt', 0, 2, arguments.length);\n validateFirebaseDataArg('Query.startAt', 1, value, this.path, true);\n validateKey('Query.startAt', 2, name, true);\n\n const newParams = this.queryParams_.startAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasStart()) {\n throw new Error(\n 'Query.startAt: Starting point was already set (by another call to startAt ' +\n 'or equalTo).'\n );\n }\n\n // Calling with no params tells us to start at the beginning.\n if (value === undefined) {\n value = null;\n name = null;\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n }\n\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n endAt(\n value: number | string | boolean | null = null,\n name?: string | null\n ): Query {\n validateArgCount('Query.endAt', 0, 2, arguments.length);\n validateFirebaseDataArg('Query.endAt', 1, value, this.path, true);\n validateKey('Query.endAt', 2, name, true);\n\n const newParams = this.queryParams_.endAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasEnd()) {\n throw new Error(\n 'Query.endAt: Ending point was already set (by another call to endAt or ' +\n 'equalTo).'\n );\n }\n\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n }\n\n /**\n * Load the selection of children with exactly the specified value, and, optionally,\n * the specified name.\n * @param {number|string|boolean|null} value\n * @param {string=} name\n * @return {!Query}\n */\n equalTo(value: number | string | boolean | null, name?: string) {\n validateArgCount('Query.equalTo', 1, 2, arguments.length);\n validateFirebaseDataArg('Query.equalTo', 1, value, this.path, false);\n validateKey('Query.equalTo', 2, name, true);\n if (this.queryParams_.hasStart()) {\n throw new Error(\n 'Query.equalTo: Starting point was already set (by another call to startAt or ' +\n 'equalTo).'\n );\n }\n if (this.queryParams_.hasEnd()) {\n throw new Error(\n 'Query.equalTo: Ending point was already set (by another call to endAt or ' +\n 'equalTo).'\n );\n }\n return this.startAt(value, name).endAt(value, name);\n }\n\n /**\n * @return {!string} URL for this location.\n */\n toString(): string {\n validateArgCount('Query.toString', 0, 0, arguments.length);\n\n return this.repo.toString() + this.path.toUrlEncodedString();\n }\n\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users.\n toJSON() {\n // An optional spacer argument is unnecessary for a string.\n validateArgCount('Query.toJSON', 0, 1, arguments.length);\n return this.toString();\n }\n\n /**\n * An object representation of the query parameters used by this Query.\n * @return {!Object}\n */\n queryObject(): Object {\n return this.queryParams_.getQueryObject();\n }\n\n /**\n * @return {!string}\n */\n queryIdentifier(): string {\n const obj = this.queryObject();\n const id = ObjectToUniqueKey(obj);\n return id === '{}' ? 'default' : id;\n }\n\n /**\n * Return true if this query and the provided query are equivalent; otherwise, return false.\n * @param {Query} other\n * @return {boolean}\n */\n isEqual(other: Query): boolean {\n validateArgCount('Query.isEqual', 1, 1, arguments.length);\n if (!(other instanceof Query)) {\n const error =\n 'Query.isEqual failed: First argument must be an instance of firebase.database.Query.';\n throw new Error(error);\n }\n\n const sameRepo = this.repo === other.repo;\n const samePath = this.path.equals(other.path);\n const sameQueryIdentifier =\n this.queryIdentifier() === other.queryIdentifier();\n\n return sameRepo && samePath && sameQueryIdentifier;\n }\n\n /**\n * Helper used by .on and .once to extract the context and or cancel arguments.\n * @param {!string} fnName The function name (on or once)\n * @param {(function(Error)|Object)=} cancelOrContext\n * @param {Object=} context\n * @return {{cancel: ?function(Error), context: ?Object}}\n * @private\n */\n private static getCancelAndContextArgs_(\n fnName: string,\n cancelOrContext?: ((a: Error) => void) | Object,\n context?: Object\n ): { cancel: ((a: Error) => void) | null; context: Object | null } {\n const ret: {\n cancel: ((a: Error) => void) | null;\n context: Object | null;\n } = { cancel: null, context: null };\n if (cancelOrContext && context) {\n ret.cancel = cancelOrContext as (a: Error) => void;\n validateCallback(fnName, 3, ret.cancel, true);\n\n ret.context = context;\n validateContextObject(fnName, 4, ret.context, true);\n } else if (cancelOrContext) {\n // we have either a cancel callback or a context.\n if (typeof cancelOrContext === 'object' && cancelOrContext !== null) {\n // it's a context!\n ret.context = cancelOrContext;\n } else if (typeof cancelOrContext === 'function') {\n ret.cancel = cancelOrContext;\n } else {\n throw new Error(\n errorPrefix(fnName, 3, true) +\n ' must either be a cancel callback or a context object.'\n );\n }\n }\n return ret;\n }\n\n get ref(): Reference {\n return this.getRef();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/Query.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from '../util/Path';\n\n/**\n *\n * @enum\n */\nexport enum OperationType {\n OVERWRITE,\n MERGE,\n ACK_USER_WRITE,\n LISTEN_COMPLETE\n}\n\n/**\n * @interface\n */\nexport interface Operation {\n /**\n * @type {!OperationSource}\n */\n source: OperationSource;\n\n /**\n * @type {!OperationType}\n */\n type: OperationType;\n\n /**\n * @type {!Path}\n */\n path: Path;\n\n /**\n * @param {string} childName\n * @return {?Operation}\n */\n operationForChild(childName: string): Operation | null;\n}\n\n/**\n * @param {boolean} fromUser\n * @param {boolean} fromServer\n * @param {?string} queryId\n * @param {boolean} tagged\n * @constructor\n */\nexport class OperationSource {\n constructor(\n public fromUser: boolean,\n public fromServer: boolean,\n public queryId: string | null,\n public tagged: boolean\n ) {\n assert(!tagged || fromServer, 'Tagged queries must be from server.');\n }\n /**\n * @const\n * @type {!OperationSource}\n */\n static User = new OperationSource(\n /*fromUser=*/ true,\n false,\n null,\n /*tagged=*/ false\n );\n\n /**\n * @const\n * @type {!OperationSource}\n */\n static Server = new OperationSource(\n false,\n /*fromServer=*/ true,\n null,\n /*tagged=*/ false\n );\n\n /**\n * @param {string} queryId\n * @return {!OperationSource}\n */\n static forServerTaggedQuery = function(queryId: string): OperationSource {\n return new OperationSource(\n false,\n /*fromServer=*/ true,\n queryId,\n /*tagged=*/ true\n );\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/Operation.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../../utils/assert';\nimport { nameCompare, MAX_NAME } from '../../util/util';\nimport { Index } from './Index';\nimport { ChildrenNode, MAX_NODE } from '../ChildrenNode';\nimport { NamedNode, Node } from '../Node';\nimport { nodeFromJSON } from '../nodeFromJSON';\nimport { Path } from '../../util/Path';\n\n/**\n * @param {!Path} indexPath\n * @constructor\n * @extends {Index}\n */\nexport class PathIndex extends Index {\n constructor(private indexPath_: Path) {\n super();\n\n assert(\n !indexPath_.isEmpty() && indexPath_.getFront() !== '.priority',\n \"Can't create PathIndex with empty path or .priority key\"\n );\n }\n\n /**\n * @param {!Node} snap\n * @return {!Node}\n * @protected\n */\n protected extractChild(snap: Node): Node {\n return snap.getChild(this.indexPath_);\n }\n\n /**\n * @inheritDoc\n */\n isDefinedOn(node: Node): boolean {\n return !node.getChild(this.indexPath_).isEmpty();\n }\n\n /**\n * @inheritDoc\n */\n compare(a: NamedNode, b: NamedNode): number {\n const aChild = this.extractChild(a.node);\n const bChild = this.extractChild(b.node);\n const indexCmp = aChild.compareTo(bChild);\n if (indexCmp === 0) {\n return nameCompare(a.name, b.name);\n } else {\n return indexCmp;\n }\n }\n\n /**\n * @inheritDoc\n */\n makePost(indexValue: object, name: string): NamedNode {\n const valueNode = nodeFromJSON(indexValue);\n const node = ChildrenNode.EMPTY_NODE.updateChild(\n this.indexPath_,\n valueNode\n );\n return new NamedNode(name, node);\n }\n\n /**\n * @inheritDoc\n */\n maxPost(): NamedNode {\n const node = ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, MAX_NODE);\n return new NamedNode(MAX_NAME, node);\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return this.indexPath_.slice().join('/');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/snap/indexes/PathIndex.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { validateArgCount, validateCallback } from '../../utils/validation';\nimport { validatePathString } from '../core/util/validation';\nimport { Path } from '../core/util/Path';\nimport { PRIORITY_INDEX } from '../core/snap/indexes/PriorityIndex';\nimport { Node } from '../core/snap/Node';\nimport { Reference } from './Reference';\nimport { Index } from '../core/snap/indexes/Index';\nimport { ChildrenNode } from '../core/snap/ChildrenNode';\n\n/**\n * Class representing a firebase data snapshot. It wraps a SnapshotNode and\n * surfaces the public methods (val, forEach, etc.) we want to expose.\n */\nexport class DataSnapshot {\n /**\n * @param {!Node} node_ A SnapshotNode to wrap.\n * @param {!Reference} ref_ The ref of the location this snapshot came from.\n * @param {!Index} index_ The iteration order for this snapshot\n */\n constructor(\n private readonly node_: Node,\n private readonly ref_: Reference,\n private readonly index_: Index\n ) {}\n\n /**\n * Retrieves the snapshot contents as JSON. Returns null if the snapshot is\n * empty.\n *\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n val(): any {\n validateArgCount('DataSnapshot.val', 0, 0, arguments.length);\n return this.node_.val();\n }\n\n /**\n * Returns the snapshot contents as JSON, including priorities of node. Suitable for exporting\n * the entire node contents.\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n exportVal(): any {\n validateArgCount('DataSnapshot.exportVal', 0, 0, arguments.length);\n return this.node_.val(true);\n }\n\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n toJSON(): any {\n // Optional spacer argument is unnecessary because we're depending on recursion rather than stringifying the content\n validateArgCount('DataSnapshot.toJSON', 0, 1, arguments.length);\n return this.exportVal();\n }\n\n /**\n * Returns whether the snapshot contains a non-null value.\n *\n * @return {boolean} Whether the snapshot contains a non-null value, or is empty.\n */\n exists(): boolean {\n validateArgCount('DataSnapshot.exists', 0, 0, arguments.length);\n return !this.node_.isEmpty();\n }\n\n /**\n * Returns a DataSnapshot of the specified child node's contents.\n *\n * @param {!string} childPathString Path to a child.\n * @return {!DataSnapshot} DataSnapshot for child node.\n */\n child(childPathString: string): DataSnapshot {\n validateArgCount('DataSnapshot.child', 0, 1, arguments.length);\n // Ensure the childPath is a string (can be a number)\n childPathString = String(childPathString);\n validatePathString('DataSnapshot.child', 1, childPathString, false);\n\n const childPath = new Path(childPathString);\n const childRef = this.ref_.child(childPath);\n return new DataSnapshot(\n this.node_.getChild(childPath),\n childRef,\n PRIORITY_INDEX\n );\n }\n\n /**\n * Returns whether the snapshot contains a child at the specified path.\n *\n * @param {!string} childPathString Path to a child.\n * @return {boolean} Whether the child exists.\n */\n hasChild(childPathString: string): boolean {\n validateArgCount('DataSnapshot.hasChild', 1, 1, arguments.length);\n validatePathString('DataSnapshot.hasChild', 1, childPathString, false);\n\n const childPath = new Path(childPathString);\n return !this.node_.getChild(childPath).isEmpty();\n }\n\n /**\n * Returns the priority of the object, or null if no priority was set.\n *\n * @return {string|number|null} The priority.\n */\n getPriority(): string | number | null {\n validateArgCount('DataSnapshot.getPriority', 0, 0, arguments.length);\n\n // typecast here because we never return deferred values or internal priorities (MAX_PRIORITY)\n return this.node_.getPriority().val() as string | number | null;\n }\n\n /**\n * Iterates through child nodes and calls the specified action for each one.\n *\n * @param {function(!DataSnapshot)} action Callback function to be called\n * for each child.\n * @return {boolean} True if forEach was canceled by action returning true for\n * one of the child nodes.\n */\n forEach(action: (d: DataSnapshot) => void): boolean {\n validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);\n validateCallback('DataSnapshot.forEach', 1, action, false);\n\n if (this.node_.isLeafNode()) return false;\n\n const childrenNode = this.node_ as ChildrenNode;\n // Sanitize the return value to a boolean. ChildrenNode.forEachChild has a weird return type...\n return !!childrenNode.forEachChild(this.index_, (key, node) => {\n return action(\n new DataSnapshot(node, this.ref_.child(key), PRIORITY_INDEX)\n );\n });\n }\n\n /**\n * Returns whether this DataSnapshot has children.\n * @return {boolean} True if the DataSnapshot contains 1 or more child nodes.\n */\n hasChildren(): boolean {\n validateArgCount('DataSnapshot.hasChildren', 0, 0, arguments.length);\n\n if (this.node_.isLeafNode()) return false;\n else return !this.node_.isEmpty();\n }\n\n get key() {\n return this.ref_.getKey();\n }\n\n /**\n * Returns the number of children for this DataSnapshot.\n * @return {number} The number of children that this DataSnapshot contains.\n */\n numChildren(): number {\n validateArgCount('DataSnapshot.numChildren', 0, 0, arguments.length);\n\n return this.node_.numChildren();\n }\n\n /**\n * @return {Reference} The Firebase reference for the location this snapshot's data came from.\n */\n getRef(): Reference {\n validateArgCount('DataSnapshot.ref', 0, 0, arguments.length);\n\n return this.ref_;\n }\n\n get ref() {\n return this.getRef();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/DataSnapshot.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { stringify } from '../../../utils/json';\nimport { Path } from '../util/Path';\nimport { EventRegistration } from './EventRegistration';\nimport { DataSnapshot } from '../../api/DataSnapshot';\n\n/**\n * Encapsulates the data needed to raise an event\n * @interface\n */\nexport interface Event {\n /**\n * @return {!Path}\n */\n getPath(): Path;\n\n /**\n * @return {!string}\n */\n getEventType(): string;\n\n /**\n * @return {!function()}\n */\n getEventRunner(): () => void;\n\n /**\n * @return {!string}\n */\n toString(): string;\n}\n\n/**\n * Encapsulates the data needed to raise an event\n * @implements {Event}\n */\nexport class DataEvent implements Event {\n /**\n * @param {!string} eventType One of: value, child_added, child_changed, child_moved, child_removed\n * @param {!EventRegistration} eventRegistration The function to call to with the event data. User provided\n * @param {!DataSnapshot} snapshot The data backing the event\n * @param {?string=} prevName Optional, the name of the previous child for child_* events.\n */\n constructor(\n public eventType:\n | 'value'\n | ' child_added'\n | ' child_changed'\n | ' child_moved'\n | ' child_removed',\n public eventRegistration: EventRegistration,\n public snapshot: DataSnapshot,\n public prevName?: string | null\n ) {}\n\n /**\n * @inheritDoc\n */\n getPath(): Path {\n const ref = this.snapshot.getRef();\n if (this.eventType === 'value') {\n return ref.path;\n } else {\n return ref.getParent().path;\n }\n }\n\n /**\n * @inheritDoc\n */\n getEventType(): string {\n return this.eventType;\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(): () => void {\n return this.eventRegistration.getEventRunner(this);\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return (\n this.getPath().toString() +\n ':' +\n this.eventType +\n ':' +\n stringify(this.snapshot.exportVal())\n );\n }\n}\n\nexport class CancelEvent implements Event {\n /**\n * @param {EventRegistration} eventRegistration\n * @param {Error} error\n * @param {!Path} path\n */\n constructor(\n public eventRegistration: EventRegistration,\n public error: Error,\n public path: Path\n ) {}\n\n /**\n * @inheritDoc\n */\n getPath(): Path {\n return this.path;\n }\n\n /**\n * @inheritDoc\n */\n getEventType(): string {\n return 'cancel';\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(): () => void {\n return this.eventRegistration.getEventRunner(this);\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return this.path.toString() + ':cancel';\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/Event.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { DataSnapshot } from '../../api/DataSnapshot';\nimport { DataEvent, CancelEvent, Event } from './Event';\nimport { contains, getCount, getAnyKey, every } from '../../../utils/obj';\nimport { assert } from '../../../utils/assert';\nimport { Path } from '../util/Path';\nimport { Change } from './Change';\nimport { Query } from '../../api/Query';\n\n/**\n * An EventRegistration is basically an event type ('value', 'child_added', etc.) and a callback\n * to be notified of that type of event.\n *\n * That said, it can also contain a cancel callback to be notified if the event is canceled. And\n * currently, this code is organized around the idea that you would register multiple child_ callbacks\n * together, as a single EventRegistration. Though currently we don't do that.\n */\nexport interface EventRegistration {\n /**\n * True if this container has a callback to trigger for this event type\n * @param {!string} eventType\n * @return {boolean}\n */\n respondsTo(eventType: string): boolean;\n\n /**\n * @param {!Change} change\n * @param {!Query} query\n * @return {!Event}\n */\n createEvent(change: Change, query: Query): Event;\n\n /**\n * Given event data, return a function to trigger the user's callback\n * @param {!Event} eventData\n * @return {function()}\n */\n getEventRunner(eventData: Event): () => void;\n\n /**\n * @param {!Error} error\n * @param {!Path} path\n * @return {?CancelEvent}\n */\n createCancelEvent(error: Error, path: Path): CancelEvent | null;\n\n /**\n * @param {!EventRegistration} other\n * @return {boolean}\n */\n matches(other: EventRegistration): boolean;\n\n /**\n * False basically means this is a \"dummy\" callback container being used as a sentinel\n * to remove all callback containers of a particular type. (e.g. if the user does\n * ref.off('value') without specifying a specific callback).\n *\n * (TODO: Rework this, since it's hacky)\n *\n * @return {boolean}\n */\n hasAnyCallback(): boolean;\n}\n\n/**\n * Represents registration for 'value' events.\n */\nexport class ValueEventRegistration implements EventRegistration {\n /**\n * @param {?function(!DataSnapshot)} callback_\n * @param {?function(Error)} cancelCallback_\n * @param {?Object} context_\n */\n constructor(\n private callback_: ((d: DataSnapshot) => void) | null,\n private cancelCallback_: ((e: Error) => void) | null,\n private context_: Object | null\n ) {}\n\n /**\n * @inheritDoc\n */\n respondsTo(eventType: string): boolean {\n return eventType === 'value';\n }\n\n /**\n * @inheritDoc\n */\n createEvent(change: Change, query: Query): DataEvent {\n const index = query.getQueryParams().getIndex();\n return new DataEvent(\n 'value',\n this,\n new DataSnapshot(change.snapshotNode, query.getRef(), index)\n );\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(eventData: CancelEvent | DataEvent): () => void {\n const ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n assert(\n this.cancelCallback_,\n 'Raising a cancel event on a listener with no cancel callback'\n );\n const cancelCB = this.cancelCallback_;\n return function() {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB.call(ctx, (eventData as CancelEvent).error);\n };\n } else {\n const cb = this.callback_;\n return function() {\n cb.call(ctx, (eventData as DataEvent).snapshot);\n };\n }\n }\n\n /**\n * @inheritDoc\n */\n createCancelEvent(error: Error, path: Path): CancelEvent | null {\n if (this.cancelCallback_) {\n return new CancelEvent(this, error, path);\n } else {\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n matches(other: EventRegistration): boolean {\n if (!(other instanceof ValueEventRegistration)) {\n return false;\n } else if (!other.callback_ || !this.callback_) {\n // If no callback specified, we consider it to match any callback.\n return true;\n } else {\n return (\n other.callback_ === this.callback_ && other.context_ === this.context_\n );\n }\n }\n\n /**\n * @inheritDoc\n */\n hasAnyCallback(): boolean {\n return this.callback_ !== null;\n }\n}\n\n/**\n * Represents the registration of 1 or more child_xxx events.\n *\n * Currently, it is always exactly 1 child_xxx event, but the idea is we might let you\n * register a group of callbacks together in the future.\n *\n * @constructor\n * @implements {EventRegistration}\n */\nexport class ChildEventRegistration implements EventRegistration {\n /**\n * @param {?Object.} callbacks_\n * @param {?function(Error)} cancelCallback_\n * @param {Object=} context_\n */\n constructor(\n private callbacks_:\n | ({ [k: string]: (d: DataSnapshot, s?: string | null) => void })\n | null,\n private cancelCallback_: ((e: Error) => void) | null,\n private context_?: Object\n ) {}\n\n /**\n * @inheritDoc\n */\n respondsTo(eventType: string): boolean {\n let eventToCheck =\n eventType === 'children_added' ? 'child_added' : eventType;\n eventToCheck =\n eventToCheck === 'children_removed' ? 'child_removed' : eventToCheck;\n return contains(this.callbacks_, eventToCheck);\n }\n\n /**\n * @inheritDoc\n */\n createCancelEvent(error: Error, path: Path): CancelEvent | null {\n if (this.cancelCallback_) {\n return new CancelEvent(this, error, path);\n } else {\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n createEvent(change: Change, query: Query): DataEvent {\n assert(change.childName != null, 'Child events should have a childName.');\n const ref = query.getRef().child /** @type {!string} */(change.childName);\n const index = query.getQueryParams().getIndex();\n return new DataEvent(\n change.type as any,\n this,\n new DataSnapshot(change.snapshotNode, ref, index as any),\n change.prevName\n );\n }\n\n /**\n * @inheritDoc\n */\n getEventRunner(eventData: CancelEvent | DataEvent): () => void {\n const ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n assert(\n this.cancelCallback_,\n 'Raising a cancel event on a listener with no cancel callback'\n );\n const cancelCB = this.cancelCallback_;\n return function() {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB.call(ctx, (eventData as CancelEvent).error);\n };\n } else {\n const cb = this.callbacks_[(eventData as DataEvent).eventType];\n return function() {\n cb.call(\n ctx,\n (eventData as DataEvent).snapshot,\n (eventData as DataEvent).prevName\n );\n };\n }\n }\n\n /**\n * @inheritDoc\n */\n matches(other: EventRegistration): boolean {\n if (other instanceof ChildEventRegistration) {\n if (!this.callbacks_ || !other.callbacks_) {\n return true;\n } else if (this.context_ === other.context_) {\n const otherCount = getCount(other.callbacks_);\n const thisCount = getCount(this.callbacks_);\n if (otherCount === thisCount) {\n // If count is 1, do an exact match on eventType, if either is defined but null, it's a match.\n // If event types don't match, not a match\n // If count is not 1, exact match across all\n\n if (otherCount === 1) {\n const otherKey /** @type {!string} */ = getAnyKey(other.callbacks_);\n const thisKey /** @type {!string} */ = getAnyKey(this.callbacks_);\n return (\n thisKey === otherKey &&\n (!other.callbacks_[otherKey] ||\n !this.callbacks_[thisKey] ||\n other.callbacks_[otherKey] === this.callbacks_[thisKey])\n );\n } else {\n // Exact match on each key.\n return every(\n this.callbacks_,\n (eventType, cb) => other.callbacks_[eventType] === cb\n );\n }\n }\n }\n }\n\n return false;\n }\n\n /**\n * @inheritDoc\n */\n hasAnyCallback(): boolean {\n return this.callbacks_ !== null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/EventRegistration.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { isEmpty, getCount, forEach, contains } from '../../../utils/obj';\n\n/**\n * Implements a set with a count of elements.\n *\n * @template K, V\n */\nexport class CountedSet {\n set: { [k: string]: V } = {};\n\n /**\n * @param {!K} item\n * @param {V} val\n */\n add(item: K, val: V) {\n this.set[item as any] = val !== null ? val : true as any;\n }\n\n /**\n * @param {!K} key\n * @return {boolean}\n */\n contains(key: K) {\n return contains(this.set, key);\n }\n\n /**\n * @param {!K} item\n * @return {V}\n */\n get(item: K): V | void {\n return this.contains(item) ? this.set[item as any] : undefined;\n }\n\n /**\n * @param {!K} item\n */\n remove(item: K) {\n delete this.set[item as any];\n }\n\n /**\n * Deletes everything in the set\n */\n clear() {\n this.set = {};\n }\n\n /**\n * True if there's nothing in the set\n * @return {boolean}\n */\n isEmpty(): boolean {\n return isEmpty(this.set);\n }\n\n /**\n * @return {number} The number of items in the set\n */\n count(): number {\n return getCount(this.set);\n }\n\n /**\n * Run a function on each k,v pair in the set\n * @param {function(K, V)} fn\n */\n each(fn: (k: K, v: V) => void) {\n forEach(this.set, (k: K, v: V) => fn(k, v));\n }\n\n /**\n * Mostly for debugging\n * @return {Array.} The keys present in this CountedSet\n */\n keys(): K[] {\n const keys: K[] = [];\n forEach(this.set, (k: K) => {\n keys.push(k);\n });\n return keys;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/CountedSet.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from './util/Path';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { CountedSet } from './util/CountedSet';\nimport { Node } from './snap/Node';\n\n/**\n * Helper class to store a sparse set of snapshots.\n *\n * @constructor\n */\nexport class SparseSnapshotTree {\n /**\n * @private\n * @type {Node}\n */\n private value_: Node | null = null;\n\n /**\n * @private\n * @type {CountedSet}\n */\n private children_: CountedSet | null = null;\n\n /**\n * Gets the node stored at the given path if one exists.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {?Node} The retrieved node, or null.\n */\n find(path: Path): Node | null {\n if (this.value_ != null) {\n return this.value_.getChild(path);\n } else if (!path.isEmpty() && this.children_ != null) {\n const childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n const childTree = this.children_.get(childKey) as SparseSnapshotTree;\n return childTree.find(path);\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n\n /**\n * Stores the given node at the specified path. If there is already a node\n * at a shallower path, it merges the new data into that snapshot node.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @param {!Node} data The new data, or null.\n */\n remember(path: Path, data: Node) {\n if (path.isEmpty()) {\n this.value_ = data;\n this.children_ = null;\n } else if (this.value_ !== null) {\n this.value_ = this.value_.updateChild(path, data);\n } else {\n if (this.children_ == null) {\n this.children_ = new CountedSet();\n }\n\n const childKey = path.getFront();\n if (!this.children_.contains(childKey)) {\n this.children_.add(childKey, new SparseSnapshotTree());\n }\n\n const child = this.children_.get(childKey) as SparseSnapshotTree;\n path = path.popFront();\n child.remember(path, data);\n }\n }\n\n /**\n * Purge the data at path from the cache.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {boolean} True if this node should now be removed.\n */\n forget(path: Path): boolean {\n if (path.isEmpty()) {\n this.value_ = null;\n this.children_ = null;\n return true;\n } else {\n if (this.value_ !== null) {\n if (this.value_.isLeafNode()) {\n // We're trying to forget a node that doesn't exist\n return false;\n } else {\n const value = this.value_;\n this.value_ = null;\n\n const self = this;\n value.forEachChild(PRIORITY_INDEX, function(key, tree) {\n self.remember(new Path(key), tree);\n });\n\n return this.forget(path);\n }\n } else if (this.children_ !== null) {\n const childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n const safeToRemove = (this.children_.get(\n childKey\n ) as SparseSnapshotTree).forget(path);\n if (safeToRemove) {\n this.children_.remove(childKey);\n }\n }\n\n if (this.children_.isEmpty()) {\n this.children_ = null;\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }\n }\n\n /**\n * Recursively iterates through all of the stored tree and calls the\n * callback on each one.\n *\n * @param {!Path} prefixPath Path to look up node for.\n * @param {!Function} func The function to invoke for each tree.\n */\n forEachTree(prefixPath: Path, func: (a: Path, b: Node) => any) {\n if (this.value_ !== null) {\n func(prefixPath, this.value_);\n } else {\n this.forEachChild((key, tree) => {\n const path = new Path(prefixPath.toString() + '/' + key);\n tree.forEachTree(path, func);\n });\n }\n }\n\n /**\n * Iterates through each immediate child and triggers the callback.\n *\n * @param {!Function} func The function to invoke for each child.\n */\n forEachChild(func: (a: string, b: SparseSnapshotTree) => void) {\n if (this.children_ !== null) {\n this.children_.each((key, tree) => {\n func(key, tree);\n });\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SparseSnapshotTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from './Path';\nimport { SparseSnapshotTree } from '../SparseSnapshotTree';\nimport { LeafNode } from '../snap/LeafNode';\nimport { nodeFromJSON } from '../snap/nodeFromJSON';\nimport { PRIORITY_INDEX } from '../snap/indexes/PriorityIndex';\nimport { Node } from '../snap/Node';\nimport { ChildrenNode } from '../snap/ChildrenNode';\n\n/**\n * Generate placeholders for deferred values.\n * @param {?Object} values\n * @return {!Object}\n */\nexport const generateWithValues = function(values: {\n [k: string]: any;\n} | null): { [k: string]: any } {\n values = values || {};\n values['timestamp'] = values['timestamp'] || new Date().getTime();\n return values;\n};\n\n/**\n * Value to use when firing local events. When writing server values, fire\n * local events with an approximate value, otherwise return value as-is.\n * @param {(Object|string|number|boolean)} value\n * @param {!Object} serverValues\n * @return {!(string|number|boolean)}\n */\nexport const resolveDeferredValue = function(\n value: { [k: string]: any } | string | number | boolean,\n serverValues: { [k: string]: any }\n): string | number | boolean {\n if (!value || typeof value !== 'object') {\n return value as string | number | boolean;\n } else {\n assert('.sv' in value, 'Unexpected leaf node or priority contents');\n return serverValues[value['.sv']];\n }\n};\n\n/**\n * Recursively replace all deferred values and priorities in the tree with the\n * specified generated replacement values.\n * @param {!SparseSnapshotTree} tree\n * @param {!Object} serverValues\n * @return {!SparseSnapshotTree}\n */\nexport const resolveDeferredValueTree = function(\n tree: SparseSnapshotTree,\n serverValues: Object\n): SparseSnapshotTree {\n const resolvedTree = new SparseSnapshotTree();\n tree.forEachTree(new Path(''), function(path, node) {\n resolvedTree.remember(\n path,\n resolveDeferredValueSnapshot(node, serverValues)\n );\n });\n return resolvedTree;\n};\n\n/**\n * Recursively replace all deferred values and priorities in the node with the\n * specified generated replacement values. If there are no server values in the node,\n * it'll be returned as-is.\n * @param {!Node} node\n * @param {!Object} serverValues\n * @return {!Node}\n */\nexport const resolveDeferredValueSnapshot = function(\n node: Node,\n serverValues: Object\n): Node {\n const rawPri = node.getPriority().val() as\n | object\n | boolean\n | null\n | number\n | string;\n const priority = resolveDeferredValue(rawPri, serverValues);\n let newNode: Node;\n\n if (node.isLeafNode()) {\n const leafNode = node as LeafNode;\n const value = resolveDeferredValue(leafNode.getValue(), serverValues);\n if (\n value !== leafNode.getValue() ||\n priority !== leafNode.getPriority().val()\n ) {\n return new LeafNode(value, nodeFromJSON(priority));\n } else {\n return node;\n }\n } else {\n const childrenNode = node as ChildrenNode;\n newNode = childrenNode;\n if (priority !== childrenNode.getPriority().val()) {\n newNode = newNode.updatePriority(new LeafNode(priority));\n }\n childrenNode.forEachChild(PRIORITY_INDEX, function(childName, childNode) {\n const newChildNode = resolveDeferredValueSnapshot(\n childNode,\n serverValues\n );\n if (newChildNode !== childNode) {\n newNode = newNode.updateImmediateChild(childName, newChildNode);\n }\n });\n return newNode;\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/ServerValues.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { SortedMap } from './SortedMap';\nimport { Path } from './Path';\nimport { stringCompare } from './util';\nimport { forEach } from '../../../utils/obj';\n\nlet emptyChildrenSingleton: SortedMap>;\n\n/**\n * Singleton empty children collection.\n *\n * @const\n * @type {!SortedMap.>}\n */\nconst EmptyChildren = (): SortedMap> => {\n if (!emptyChildrenSingleton) {\n emptyChildrenSingleton = new SortedMap>(\n stringCompare\n );\n }\n return emptyChildrenSingleton;\n};\n\n/**\n * A tree with immutable elements.\n */\nexport class ImmutableTree {\n static Empty = new ImmutableTree(null);\n\n /**\n * @template T\n * @param {!Object.} obj\n * @return {!ImmutableTree.}\n */\n static fromObject(obj: { [k: string]: T }): ImmutableTree {\n let tree: ImmutableTree = ImmutableTree.Empty;\n forEach(obj, (childPath: string, childSnap: T) => {\n tree = tree.set(new Path(childPath), childSnap);\n });\n return tree;\n }\n\n /**\n * @template T\n * @param {?T} value\n * @param {SortedMap.>=} children\n */\n constructor(\n public readonly value: T | null,\n public readonly children: SortedMap<\n string,\n ImmutableTree\n > = EmptyChildren()\n ) {}\n\n /**\n * True if the value is empty and there are no children\n * @return {boolean}\n */\n isEmpty(): boolean {\n return this.value === null && this.children.isEmpty();\n }\n\n /**\n * Given a path and predicate, return the first node and the path to that node\n * where the predicate returns true.\n *\n * TODO Do a perf test -- If we're creating a bunch of {path: value:} objects\n * on the way back out, it may be better to pass down a pathSoFar obj.\n *\n * @param {!Path} relativePath The remainder of the path\n * @param {function(T):boolean} predicate The predicate to satisfy to return a\n * node\n * @return {?{path:!Path, value:!T}}\n */\n findRootMostMatchingPathAndValue(\n relativePath: Path,\n predicate: (a: T) => boolean\n ): { path: Path; value: T } | null {\n if (this.value != null && predicate(this.value)) {\n return { path: Path.Empty, value: this.value };\n } else {\n if (relativePath.isEmpty()) {\n return null;\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front);\n if (child !== null) {\n const childExistingPathAndValue = child.findRootMostMatchingPathAndValue(\n relativePath.popFront(),\n predicate\n );\n if (childExistingPathAndValue != null) {\n const fullPath = new Path(front).child(\n childExistingPathAndValue.path\n );\n return { path: fullPath, value: childExistingPathAndValue.value };\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n }\n }\n\n /**\n * Find, if it exists, the shortest subpath of the given path that points a defined\n * value in the tree\n * @param {!Path} relativePath\n * @return {?{path: !Path, value: !T}}\n */\n findRootMostValueAndPath(\n relativePath: Path\n ): { path: Path; value: T } | null {\n return this.findRootMostMatchingPathAndValue(relativePath, () => true);\n }\n\n /**\n * @param {!Path} relativePath\n * @return {!ImmutableTree.} The subtree at the given path\n */\n subtree(relativePath: Path): ImmutableTree {\n if (relativePath.isEmpty()) {\n return this;\n } else {\n const front = relativePath.getFront();\n const childTree = this.children.get(front);\n if (childTree !== null) {\n return childTree.subtree(relativePath.popFront());\n } else {\n return ImmutableTree.Empty;\n }\n }\n }\n\n /**\n * Sets a value at the specified path.\n *\n * @param {!Path} relativePath Path to set value at.\n * @param {?T} toSet Value to set.\n * @return {!ImmutableTree.} Resulting tree.\n */\n set(relativePath: Path, toSet: T | null): ImmutableTree {\n if (relativePath.isEmpty()) {\n return new ImmutableTree(toSet, this.children);\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front) || ImmutableTree.Empty;\n const newChild = child.set(relativePath.popFront(), toSet);\n const newChildren = this.children.insert(front, newChild);\n return new ImmutableTree(this.value, newChildren);\n }\n }\n\n /**\n * Removes the value at the specified path.\n *\n * @param {!Path} relativePath Path to value to remove.\n * @return {!ImmutableTree.} Resulting tree.\n */\n remove(relativePath: Path): ImmutableTree {\n if (relativePath.isEmpty()) {\n if (this.children.isEmpty()) {\n return ImmutableTree.Empty;\n } else {\n return new ImmutableTree(null, this.children);\n }\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front);\n if (child) {\n const newChild = child.remove(relativePath.popFront());\n let newChildren;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n } else {\n newChildren = this.children.insert(front, newChild);\n }\n if (this.value === null && newChildren.isEmpty()) {\n return ImmutableTree.Empty;\n } else {\n return new ImmutableTree(this.value, newChildren);\n }\n } else {\n return this;\n }\n }\n }\n\n /**\n * Gets a value from the tree.\n *\n * @param {!Path} relativePath Path to get value for.\n * @return {?T} Value at path, or null.\n */\n get(relativePath: Path): T | null {\n if (relativePath.isEmpty()) {\n return this.value;\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front);\n if (child) {\n return child.get(relativePath.popFront());\n } else {\n return null;\n }\n }\n }\n\n /**\n * Replace the subtree at the specified path with the given new tree.\n *\n * @param {!Path} relativePath Path to replace subtree for.\n * @param {!ImmutableTree} newTree New tree.\n * @return {!ImmutableTree} Resulting tree.\n */\n setTree(relativePath: Path, newTree: ImmutableTree): ImmutableTree {\n if (relativePath.isEmpty()) {\n return newTree;\n } else {\n const front = relativePath.getFront();\n const child = this.children.get(front) || ImmutableTree.Empty;\n const newChild = child.setTree(relativePath.popFront(), newTree);\n let newChildren;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n } else {\n newChildren = this.children.insert(front, newChild);\n }\n return new ImmutableTree(this.value, newChildren);\n }\n }\n\n /**\n * Performs a depth first fold on this tree. Transforms a tree into a single\n * value, given a function that operates on the path to a node, an optional\n * current value, and a map of child names to folded subtrees\n * @template V\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n */\n fold(fn: (path: Path, value: T, children: { [k: string]: V }) => V): V {\n return this.fold_(Path.Empty, fn);\n }\n\n /**\n * Recursive helper for public-facing fold() method\n * @template V\n * @param {!Path} pathSoFar\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n * @private\n */\n private fold_(\n pathSoFar: Path,\n fn: (path: Path, value: T | null, children: { [k: string]: V }) => V\n ): V {\n const accum: { [k: string]: V } = {};\n this.children.inorderTraversal(function(\n childKey: string,\n childTree: ImmutableTree\n ) {\n accum[childKey] = childTree.fold_(pathSoFar.child(childKey), fn);\n });\n return fn(pathSoFar, this.value, accum);\n }\n\n /**\n * Find the first matching value on the given path. Return the result of applying f to it.\n * @template V\n * @param {!Path} path\n * @param {!function(!Path, !T):?V} f\n * @return {?V}\n */\n findOnPath(path: Path, f: (path: Path, value: T) => V | null): V | null {\n return this.findOnPath_(path, Path.Empty, f);\n }\n\n private findOnPath_(\n pathToFollow: Path,\n pathSoFar: Path,\n f: (path: Path, value: T) => V | null\n ): V | null {\n const result = this.value ? f(pathSoFar, this.value) : false;\n if (result) {\n return result;\n } else {\n if (pathToFollow.isEmpty()) {\n return null;\n } else {\n const front = pathToFollow.getFront()!;\n const nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.findOnPath_(\n pathToFollow.popFront(),\n pathSoFar.child(front),\n f\n );\n } else {\n return null;\n }\n }\n }\n }\n\n /**\n *\n * @param {!Path} path\n * @param {!function(!Path, !T)} f\n * @returns {!ImmutableTree.}\n */\n foreachOnPath(\n path: Path,\n f: (path: Path, value: T) => void\n ): ImmutableTree {\n return this.foreachOnPath_(path, Path.Empty, f);\n }\n\n private foreachOnPath_(\n pathToFollow: Path,\n currentRelativePath: Path,\n f: (path: Path, value: T) => void\n ): ImmutableTree {\n if (pathToFollow.isEmpty()) {\n return this;\n } else {\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n const front = pathToFollow.getFront();\n const nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.foreachOnPath_(\n pathToFollow.popFront(),\n currentRelativePath.child(front),\n f\n );\n } else {\n return ImmutableTree.Empty;\n }\n }\n }\n\n /**\n * Calls the given function for each node in the tree that has a value.\n *\n * @param {function(!Path, !T)} f A function to be called with\n * the path from the root of the tree to a node, and the value at that node.\n * Called in depth-first order.\n */\n foreach(f: (path: Path, value: T) => void) {\n this.foreach_(Path.Empty, f);\n }\n\n private foreach_(\n currentRelativePath: Path,\n f: (path: Path, value: T) => void\n ) {\n this.children.inorderTraversal(function(childName, childTree) {\n childTree.foreach_(currentRelativePath.child(childName), f);\n });\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n }\n\n /**\n *\n * @param {function(string, !T)} f\n */\n foreachChild(f: (name: string, value: T) => void) {\n this.children.inorderTraversal(\n (childName: string, childTree: ImmutableTree) => {\n if (childTree.value) {\n f(childName, childTree.value);\n }\n }\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/ImmutableTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CacheNode } from './view/CacheNode';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { assert } from '../../utils/assert';\nimport { isEmpty, forEach, findValue, safeGet } from '../../utils/obj';\nimport { ViewCache } from './view/ViewCache';\nimport { View } from './view/View';\nimport { Operation } from './operation/Operation';\nimport { WriteTreeRef } from './WriteTree';\nimport { Query } from '../api/Query';\nimport { EventRegistration } from './view/EventRegistration';\nimport { Node } from './snap/Node';\nimport { Path } from './util/Path';\nimport { Event } from './view/Event';\nimport { Reference, ReferenceConstructor } from '../api/Reference';\n\nlet __referenceConstructor: ReferenceConstructor;\n\n/**\n * SyncPoint represents a single location in a SyncTree with 1 or more event registrations, meaning we need to\n * maintain 1 or more Views at this location to cache server data and raise appropriate events for server changes\n * and user writes (set, transaction, update).\n *\n * It's responsible for:\n * - Maintaining the set of 1 or more views necessary at this location (a SyncPoint with 0 views should be removed).\n * - Proxying user / server operations to the views as appropriate (i.e. applyServerOverwrite,\n * applyUserOverwrite, etc.)\n */\nexport class SyncPoint {\n static set __referenceConstructor(val: ReferenceConstructor) {\n assert(\n !__referenceConstructor,\n '__referenceConstructor has already been defined'\n );\n __referenceConstructor = val;\n }\n\n static get __referenceConstructor() {\n assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n }\n\n /**\n * The Views being tracked at this location in the tree, stored as a map where the key is a\n * queryId and the value is the View for that query.\n *\n * NOTE: This list will be quite small (usually 1, but perhaps 2 or 3; any more is an odd use case).\n *\n * @type {!Object.}\n * @private\n */\n private views_: { [k: string]: View } = {};\n\n /**\n * @return {boolean}\n */\n isEmpty(): boolean {\n return isEmpty(this.views_);\n }\n\n /**\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} optCompleteServerCache\n * @return {!Array.}\n */\n applyOperation(\n operation: Operation,\n writesCache: WriteTreeRef,\n optCompleteServerCache: Node | null\n ): Event[] {\n const queryId = operation.source.queryId;\n if (queryId !== null) {\n const view = safeGet(this.views_, queryId);\n assert(view != null, 'SyncTree gave us an op for an invalid query.');\n return view.applyOperation(\n operation,\n writesCache,\n optCompleteServerCache\n );\n } else {\n let events: Event[] = [];\n\n forEach(this.views_, function(key: string, view: View) {\n events = events.concat(\n view.applyOperation(operation, writesCache, optCompleteServerCache)\n );\n });\n\n return events;\n }\n }\n\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache Complete server cache, if we have it.\n * @param {boolean} serverCacheComplete\n * @return {!Array.} Events to raise.\n */\n addEventRegistration(\n query: Query,\n eventRegistration: EventRegistration,\n writesCache: WriteTreeRef,\n serverCache: Node | null,\n serverCacheComplete: boolean\n ): Event[] {\n const queryId = query.queryIdentifier();\n let view = safeGet(this.views_, queryId);\n if (!view) {\n // TODO: make writesCache take flag for complete server node\n let eventCache = writesCache.calcCompleteEventCache(\n serverCacheComplete ? serverCache : null\n );\n let eventCacheComplete = false;\n if (eventCache) {\n eventCacheComplete = true;\n } else if (serverCache instanceof ChildrenNode) {\n eventCache = writesCache.calcCompleteEventChildren(serverCache);\n eventCacheComplete = false;\n } else {\n eventCache = ChildrenNode.EMPTY_NODE;\n eventCacheComplete = false;\n }\n const viewCache = new ViewCache(\n new CacheNode /** @type {!Node} */(\n eventCache,\n eventCacheComplete,\n false\n ),\n new CacheNode /** @type {!Node} */(\n serverCache,\n serverCacheComplete,\n false\n )\n );\n view = new View(query, viewCache);\n this.views_[queryId] = view;\n }\n\n // This is guaranteed to exist now, we just created anything that was missing\n view.addEventRegistration(eventRegistration);\n return view.getInitialEvents(eventRegistration);\n }\n\n /**\n * Remove event callback(s). Return cancelEvents if a cancelError is specified.\n *\n * If query is the default query, we'll check all views for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified view(s).\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {{removed:!Array., events:!Array.}} removed queries and any cancel events\n */\n removeEventRegistration(\n query: Query,\n eventRegistration: EventRegistration | null,\n cancelError?: Error\n ): { removed: Query[]; events: Event[] } {\n const queryId = query.queryIdentifier();\n const removed: Query[] = [];\n let cancelEvents: Event[] = [];\n const hadCompleteView = this.hasCompleteView();\n if (queryId === 'default') {\n // When you do ref.off(...), we search all views for the registration to remove.\n const self = this;\n forEach(this.views_, function(viewQueryId: string, view: View) {\n cancelEvents = cancelEvents.concat(\n view.removeEventRegistration(eventRegistration, cancelError)\n );\n if (view.isEmpty()) {\n delete self.views_[viewQueryId];\n\n // We'll deal with complete views later.\n if (!view.getQuery().getQueryParams().loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n });\n } else {\n // remove the callback from the specific view.\n const view = safeGet(this.views_, queryId);\n if (view) {\n cancelEvents = cancelEvents.concat(\n view.removeEventRegistration(eventRegistration, cancelError)\n );\n if (view.isEmpty()) {\n delete this.views_[queryId];\n\n // We'll deal with complete views later.\n if (!view.getQuery().getQueryParams().loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n }\n }\n\n if (hadCompleteView && !this.hasCompleteView()) {\n // We removed our last complete view.\n removed.push(\n new SyncPoint.__referenceConstructor(query.repo, query.path)\n );\n }\n\n return { removed: removed, events: cancelEvents };\n }\n\n /**\n * @return {!Array.}\n */\n getQueryViews(): View[] {\n const values = Object.keys(this.views_).map(key => this.views_[key]);\n return values.filter(function(view) {\n return !view.getQuery().getQueryParams().loadsAllData();\n });\n }\n\n /**\n *\n * @param {!Path} path The path to the desired complete snapshot\n * @return {?Node} A complete cache, if it exists\n */\n getCompleteServerCache(path: Path): Node | null {\n let serverCache: Node | null = null;\n forEach(this.views_, (key: string, view: View) => {\n serverCache = serverCache || view.getCompleteServerCache(path);\n });\n return serverCache;\n }\n\n /**\n * @param {!Query} query\n * @return {?View}\n */\n viewForQuery(query: Query): View | null {\n const params = query.getQueryParams();\n if (params.loadsAllData()) {\n return this.getCompleteView();\n } else {\n const queryId = query.queryIdentifier();\n return safeGet(this.views_, queryId);\n }\n }\n\n /**\n * @param {!Query} query\n * @return {boolean}\n */\n viewExistsForQuery(query: Query): boolean {\n return this.viewForQuery(query) != null;\n }\n\n /**\n * @return {boolean}\n */\n hasCompleteView(): boolean {\n return this.getCompleteView() != null;\n }\n\n /**\n * @return {?View}\n */\n getCompleteView(): View | null {\n const completeView = findValue(this.views_, (view: View) =>\n view.getQuery().getQueryParams().loadsAllData()\n );\n return completeView || null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SyncPoint.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from '../util/Path';\nimport { Operation, OperationSource, OperationType } from './Operation';\nimport { ImmutableTree } from '../util/ImmutableTree';\n\nexport class AckUserWrite implements Operation {\n /** @inheritDoc */\n type = OperationType.ACK_USER_WRITE;\n\n /** @inheritDoc */\n source = OperationSource.User;\n\n /**\n *\n * @param {!Path} path\n * @param {!ImmutableTree} affectedTree A tree containing true for each affected path. Affected paths can't overlap.\n * @param {!boolean} revert\n */\n constructor(\n /**@inheritDoc */ public path: Path,\n /**@inheritDoc */ public affectedTree: ImmutableTree,\n /**@inheritDoc */ public revert: boolean\n ) {}\n\n /**\n * @inheritDoc\n */\n operationForChild(childName: string): AckUserWrite {\n if (!this.path.isEmpty()) {\n assert(\n this.path.getFront() === childName,\n 'operationForChild called for unrelated child.'\n );\n return new AckUserWrite(\n this.path.popFront(),\n this.affectedTree,\n this.revert\n );\n } else if (this.affectedTree.value != null) {\n assert(\n this.affectedTree.children.isEmpty(),\n 'affectedTree should not have overlapping affected paths.'\n );\n // All child locations are affected as well; just return same operation.\n return this;\n } else {\n const childTree = this.affectedTree.subtree(new Path(childName));\n return new AckUserWrite(Path.Empty, childTree, this.revert);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/AckUserWrite.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../util/Path';\nimport { Operation, OperationSource, OperationType } from './Operation';\n\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @constructor\n * @implements {Operation}\n */\nexport class ListenComplete implements Operation {\n /** @inheritDoc */\n type = OperationType.LISTEN_COMPLETE;\n\n constructor(public source: OperationSource, public path: Path) {}\n\n operationForChild(childName: string): ListenComplete {\n if (this.path.isEmpty()) {\n return new ListenComplete(this.source, Path.Empty);\n } else {\n return new ListenComplete(this.source, this.path.popFront());\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/ListenComplete.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Operation, OperationSource, OperationType } from './Operation';\nimport { Path } from '../util/Path';\nimport { Node } from '../snap/Node';\n\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!Node} snap\n * @constructor\n * @implements {Operation}\n */\nexport class Overwrite implements Operation {\n /** @inheritDoc */\n type = OperationType.OVERWRITE;\n\n constructor(\n public source: OperationSource,\n public path: Path,\n public snap: Node\n ) {}\n\n operationForChild(childName: string): Overwrite {\n if (this.path.isEmpty()) {\n return new Overwrite(\n this.source,\n Path.Empty,\n this.snap.getImmediateChild(childName)\n );\n } else {\n return new Overwrite(this.source, this.path.popFront(), this.snap);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/Overwrite.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Operation, OperationSource, OperationType } from './Operation';\nimport { Overwrite } from './Overwrite';\nimport { Path } from '../util/Path';\nimport { assert } from '../../../utils/assert';\nimport { ImmutableTree } from '../util/ImmutableTree';\nimport { Node } from '../snap/Node';\n\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!ImmutableTree.} children\n * @constructor\n * @implements {Operation}\n */\nexport class Merge implements Operation {\n /** @inheritDoc */\n type = OperationType.MERGE;\n\n constructor(\n /**@inheritDoc */ public source: OperationSource,\n /**@inheritDoc */ public path: Path,\n /**@inheritDoc */ public children: ImmutableTree\n ) {}\n\n /**\n * @inheritDoc\n */\n operationForChild(childName: string): Operation {\n if (this.path.isEmpty()) {\n const childTree = this.children.subtree(new Path(childName));\n if (childTree.isEmpty()) {\n // This child is unaffected\n return null;\n } else if (childTree.value) {\n // We have a snapshot for the child in question. This becomes an overwrite of the child.\n return new Overwrite(this.source, Path.Empty, childTree.value);\n } else {\n // This is a merge at a deeper level\n return new Merge(this.source, Path.Empty, childTree);\n }\n } else {\n assert(\n this.path.getFront() === childName,\n \"Can't get a merge for a child not on the path of the operation\"\n );\n return new Merge(this.source, this.path.popFront(), this.children);\n }\n }\n\n /**\n * @inheritDoc\n */\n toString(): string {\n return (\n 'Operation(' +\n this.path +\n ': ' +\n this.source.toString() +\n ' merge: ' +\n this.children.toString() +\n ')'\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/operation/Merge.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Node } from '../snap/Node';\nimport { Path } from '../util/Path';\n\n/**\n * A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully\n * initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.\n * initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks\n * whether a node potentially had children removed due to a filter.\n */\nexport class CacheNode {\n /**\n * @param {!Node} node_\n * @param {boolean} fullyInitialized_\n * @param {boolean} filtered_\n */\n constructor(\n private node_: Node,\n private fullyInitialized_: boolean,\n private filtered_: boolean\n ) {}\n\n /**\n * Returns whether this node was fully initialized with either server data or a complete overwrite by the client\n * @return {boolean}\n */\n isFullyInitialized(): boolean {\n return this.fullyInitialized_;\n }\n\n /**\n * Returns whether this node is potentially missing children due to a filter applied to the node\n * @return {boolean}\n */\n isFiltered(): boolean {\n return this.filtered_;\n }\n\n /**\n * @param {!Path} path\n * @return {boolean}\n */\n isCompleteForPath(path: Path): boolean {\n if (path.isEmpty()) {\n return this.isFullyInitialized() && !this.filtered_;\n }\n\n const childKey = path.getFront();\n return this.isCompleteForChild(childKey);\n }\n\n /**\n * @param {!string} key\n * @return {boolean}\n */\n isCompleteForChild(key: string): boolean {\n return (\n (this.isFullyInitialized() && !this.filtered_) || this.node_.hasChild(key)\n );\n }\n\n /**\n * @return {!Node}\n */\n getNode(): Node {\n return this.node_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/CacheNode.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ChildrenNode } from '../snap/ChildrenNode';\nimport { CacheNode } from './CacheNode';\nimport { Node } from '../snap/Node';\n\n/**\n * Stores the data we have cached for a view.\n *\n * serverSnap is the cached server data, eventSnap is the cached event data (server data plus any local writes).\n *\n * @constructor\n */\nexport class ViewCache {\n /**\n *\n * @param {!CacheNode} eventCache_\n * @param {!CacheNode} serverCache_\n */\n constructor(\n private readonly eventCache_: CacheNode,\n private readonly serverCache_: CacheNode\n ) {}\n\n /**\n * @const\n * @type {ViewCache}\n */\n static Empty = new ViewCache(\n new CacheNode(\n ChildrenNode.EMPTY_NODE,\n /*fullyInitialized=*/ false,\n /*filtered=*/ false\n ),\n new CacheNode(\n ChildrenNode.EMPTY_NODE,\n /*fullyInitialized=*/ false,\n /*filtered=*/ false\n )\n );\n\n /**\n * @param {!Node} eventSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n updateEventSnap(\n eventSnap: Node,\n complete: boolean,\n filtered: boolean\n ): ViewCache {\n return new ViewCache(\n new CacheNode(eventSnap, complete, filtered),\n this.serverCache_\n );\n }\n\n /**\n * @param {!Node} serverSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n updateServerSnap(\n serverSnap: Node,\n complete: boolean,\n filtered: boolean\n ): ViewCache {\n return new ViewCache(\n this.eventCache_,\n new CacheNode(serverSnap, complete, filtered)\n );\n }\n\n /**\n * @return {!CacheNode}\n */\n getEventCache(): CacheNode {\n return this.eventCache_;\n }\n\n /**\n * @return {?Node}\n */\n getCompleteEventSnap(): Node | null {\n return this.eventCache_.isFullyInitialized()\n ? this.eventCache_.getNode()\n : null;\n }\n\n /**\n * @return {!CacheNode}\n */\n getServerCache(): CacheNode {\n return this.serverCache_;\n }\n\n /**\n * @return {?Node}\n */\n getCompleteServerSnap(): Node | null {\n return this.serverCache_.isFullyInitialized()\n ? this.serverCache_.getNode()\n : null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/ViewCache.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Node } from '../snap/Node';\n\n/**\n * @constructor\n * @struct\n * @param {!string} type The event type\n * @param {!Node} snapshotNode The data\n * @param {string=} childName The name for this child, if it's a child event\n * @param {Node=} oldSnap Used for intermediate processing of child changed events\n * @param {string=} prevName The name for the previous child, if applicable\n */\nexport class Change {\n constructor(\n public type: string,\n public snapshotNode: Node,\n public childName?: string,\n public oldSnap?: Node,\n public prevName?: string\n ) {}\n\n /**\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static valueChange(snapshot: Node): Change {\n return new Change(Change.VALUE, snapshot);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static childAddedChange(childKey: string, snapshot: Node): Change {\n return new Change(Change.CHILD_ADDED, snapshot, childKey);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static childRemovedChange(childKey: string, snapshot: Node): Change {\n return new Change(Change.CHILD_REMOVED, snapshot, childKey);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} newSnapshot\n * @param {!Node} oldSnapshot\n * @return {!Change}\n */\n static childChangedChange(\n childKey: string,\n newSnapshot: Node,\n oldSnapshot: Node\n ): Change {\n return new Change(Change.CHILD_CHANGED, newSnapshot, childKey, oldSnapshot);\n }\n\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n static childMovedChange(childKey: string, snapshot: Node): Change {\n return new Change(Change.CHILD_MOVED, snapshot, childKey);\n }\n\n //event types\n /** Event type for a child added */\n static CHILD_ADDED = 'child_added';\n\n /** Event type for a child removed */\n static CHILD_REMOVED = 'child_removed';\n\n /** Event type for a child changed */\n static CHILD_CHANGED = 'child_changed';\n\n /** Event type for a child moved */\n static CHILD_MOVED = 'child_moved';\n\n /** Event type for a value change */\n static VALUE = 'value';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/Change.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../../utils/assert';\nimport { Change } from '../Change';\nimport { ChildrenNode } from '../../snap/ChildrenNode';\nimport { PRIORITY_INDEX } from '../../snap/indexes/PriorityIndex';\nimport { NodeFilter } from './NodeFilter';\nimport { Index } from '../../snap/indexes/Index';\nimport { Path } from '../../util/Path';\nimport { CompleteChildSource } from '../CompleteChildSource';\nimport { ChildChangeAccumulator } from '../ChildChangeAccumulator';\nimport { Node } from '../../snap/Node';\n\n/**\n * Doesn't really filter nodes but applies an index to the node and keeps track of any changes\n *\n * @constructor\n * @implements {NodeFilter}\n * @param {!Index} index\n */\nexport class IndexedFilter implements NodeFilter {\n constructor(private readonly index_: Index) {}\n\n updateChild(\n snap: Node,\n key: string,\n newChild: Node,\n affectedPath: Path,\n source: CompleteChildSource,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n assert(\n snap.isIndexed(this.index_),\n 'A node must be indexed if only a child is updated'\n );\n const oldChild = snap.getImmediateChild(key);\n // Check if anything actually changed.\n if (\n oldChild.getChild(affectedPath).equals(newChild.getChild(affectedPath))\n ) {\n // There's an edge case where a child can enter or leave the view because affectedPath was set to null.\n // In this case, affectedPath will appear null in both the old and new snapshots. So we need\n // to avoid treating these cases as \"nothing changed.\"\n if (oldChild.isEmpty() == newChild.isEmpty()) {\n // Nothing changed.\n\n // This assert should be valid, but it's expensive (can dominate perf testing) so don't actually do it.\n //assert(oldChild.equals(newChild), 'Old and new snapshots should be equal.');\n return snap;\n }\n }\n\n if (optChangeAccumulator != null) {\n if (newChild.isEmpty()) {\n if (snap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(\n Change.childRemovedChange(key, oldChild)\n );\n } else {\n assert(\n snap.isLeafNode(),\n 'A child remove without an old child only makes sense on a leaf node'\n );\n }\n } else if (oldChild.isEmpty()) {\n optChangeAccumulator.trackChildChange(\n Change.childAddedChange(key, newChild)\n );\n } else {\n optChangeAccumulator.trackChildChange(\n Change.childChangedChange(key, newChild, oldChild)\n );\n }\n }\n if (snap.isLeafNode() && newChild.isEmpty()) {\n return snap;\n } else {\n // Make sure the node is indexed\n return snap.updateImmediateChild(key, newChild).withIndex(this.index_);\n }\n }\n\n /**\n * @inheritDoc\n */\n updateFullNode(\n oldSnap: Node,\n newSnap: Node,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (optChangeAccumulator != null) {\n if (!oldSnap.isLeafNode()) {\n oldSnap.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n if (!newSnap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(\n Change.childRemovedChange(key, childNode)\n );\n }\n });\n }\n if (!newSnap.isLeafNode()) {\n newSnap.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n if (oldSnap.hasChild(key)) {\n const oldChild = oldSnap.getImmediateChild(key);\n if (!oldChild.equals(childNode)) {\n optChangeAccumulator.trackChildChange(\n Change.childChangedChange(key, childNode, oldChild)\n );\n }\n } else {\n optChangeAccumulator.trackChildChange(\n Change.childAddedChange(key, childNode)\n );\n }\n });\n }\n }\n return newSnap.withIndex(this.index_);\n }\n\n /**\n * @inheritDoc\n */\n updatePriority(oldSnap: Node, newPriority: Node): Node {\n if (oldSnap.isEmpty()) {\n return ChildrenNode.EMPTY_NODE;\n } else {\n return oldSnap.updatePriority(newPriority);\n }\n }\n\n /**\n * @inheritDoc\n */\n filtersNodes(): boolean {\n return false;\n }\n\n /**\n * @inheritDoc\n */\n getIndexedFilter(): IndexedFilter {\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getIndex(): Index {\n return this.index_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/filter/IndexedFilter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { getValues, safeGet } from '../../../utils/obj';\nimport { Change } from './Change';\nimport { assert, assertionError } from '../../../utils/assert';\n\n/**\n * @constructor\n */\nexport class ChildChangeAccumulator {\n private changeMap_: { [k: string]: Change } = {};\n\n /**\n * @param {!Change} change\n */\n trackChildChange(change: Change) {\n const type = change.type;\n const childKey /** @type {!string} */ = change.childName;\n assert(\n type == Change.CHILD_ADDED ||\n type == Change.CHILD_CHANGED ||\n type == Change.CHILD_REMOVED,\n 'Only child changes supported for tracking'\n );\n assert(\n childKey !== '.priority',\n 'Only non-priority child changes can be tracked.'\n );\n const oldChange = safeGet(this.changeMap_, childKey) as Change;\n if (oldChange) {\n const oldType = oldChange.type;\n if (type == Change.CHILD_ADDED && oldType == Change.CHILD_REMOVED) {\n this.changeMap_[childKey] = Change.childChangedChange(\n childKey,\n change.snapshotNode,\n oldChange.snapshotNode\n );\n } else if (\n type == Change.CHILD_REMOVED &&\n oldType == Change.CHILD_ADDED\n ) {\n delete this.changeMap_[childKey];\n } else if (\n type == Change.CHILD_REMOVED &&\n oldType == Change.CHILD_CHANGED\n ) {\n this.changeMap_[childKey] = Change.childRemovedChange(\n childKey,\n oldChange.oldSnap\n );\n } else if (\n type == Change.CHILD_CHANGED &&\n oldType == Change.CHILD_ADDED\n ) {\n this.changeMap_[childKey] = Change.childAddedChange(\n childKey,\n change.snapshotNode\n );\n } else if (\n type == Change.CHILD_CHANGED &&\n oldType == Change.CHILD_CHANGED\n ) {\n this.changeMap_[childKey] = Change.childChangedChange(\n childKey,\n change.snapshotNode,\n oldChange.oldSnap\n );\n } else {\n throw assertionError(\n 'Illegal combination of changes: ' +\n change +\n ' occurred after ' +\n oldChange\n );\n }\n } else {\n this.changeMap_[childKey] = change;\n }\n }\n\n /**\n * @return {!Array.}\n */\n getChanges(): Change[] {\n return getValues(this.changeMap_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/ChildChangeAccumulator.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { CacheNode } from './CacheNode';\nimport { NamedNode, Node } from '../snap/Node';\nimport { Index } from '../snap/indexes/Index';\nimport { WriteTreeRef } from '../WriteTree';\nimport { ViewCache } from './ViewCache';\n\n/**\n * Since updates to filtered nodes might require nodes to be pulled in from \"outside\" the node, this interface\n * can help to get complete children that can be pulled in.\n * A class implementing this interface takes potentially multiple sources (e.g. user writes, server data from\n * other views etc.) to try it's best to get a complete child that might be useful in pulling into the view.\n *\n * @interface\n */\nexport interface CompleteChildSource {\n /**\n * @param {!string} childKey\n * @return {?Node}\n */\n getCompleteChild(childKey: string): Node | null;\n\n /**\n * @param {!Index} index\n * @param {!NamedNode} child\n * @param {boolean} reverse\n * @return {?NamedNode}\n */\n getChildAfterChild(\n index: Index,\n child: NamedNode,\n reverse: boolean\n ): NamedNode | null;\n}\n\n/**\n * An implementation of CompleteChildSource that never returns any additional children\n *\n * @private\n * @constructor\n * @implements CompleteChildSource\n */\nexport class NoCompleteChildSource_ implements CompleteChildSource {\n /**\n * @inheritDoc\n */\n getCompleteChild(childKey?: string): Node | null {\n return null;\n }\n\n /**\n * @inheritDoc\n */\n getChildAfterChild(\n index?: Index,\n child?: NamedNode,\n reverse?: boolean\n ): NamedNode | null {\n return null;\n }\n}\n\n/**\n * Singleton instance.\n * @const\n * @type {!CompleteChildSource}\n */\nexport const NO_COMPLETE_CHILD_SOURCE = new NoCompleteChildSource_();\n\n/**\n * An implementation of CompleteChildSource that uses a WriteTree in addition to any other server data or\n * old event caches available to calculate complete children.\n *\n *\n * @implements CompleteChildSource\n */\nexport class WriteTreeCompleteChildSource implements CompleteChildSource {\n /**\n * @param {!WriteTreeRef} writes_\n * @param {!ViewCache} viewCache_\n * @param {?Node} optCompleteServerCache_\n */\n constructor(\n private writes_: WriteTreeRef,\n private viewCache_: ViewCache,\n private optCompleteServerCache_: Node | null = null\n ) {}\n\n /**\n * @inheritDoc\n */\n getCompleteChild(childKey: string): Node | null {\n const node = this.viewCache_.getEventCache();\n if (node.isCompleteForChild(childKey)) {\n return node.getNode().getImmediateChild(childKey);\n } else {\n const serverNode =\n this.optCompleteServerCache_ != null\n ? new CacheNode(this.optCompleteServerCache_, true, false)\n : this.viewCache_.getServerCache();\n return this.writes_.calcCompleteChild(childKey, serverNode);\n }\n }\n\n /**\n * @inheritDoc\n */\n getChildAfterChild(\n index: Index,\n child: NamedNode,\n reverse: boolean\n ): NamedNode | null {\n const completeServerData =\n this.optCompleteServerCache_ != null\n ? this.optCompleteServerCache_\n : this.viewCache_.getCompleteServerSnap();\n const nodes = this.writes_.calcIndexedSlice(\n completeServerData,\n child,\n 1,\n reverse,\n index\n );\n if (nodes.length === 0) {\n return null;\n } else {\n return nodes[0];\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/CompleteChildSource.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Operation, OperationType } from '../operation/Operation';\nimport { assert, assertionError } from '../../../utils/assert';\nimport { ChildChangeAccumulator } from './ChildChangeAccumulator';\nimport { Change } from './Change';\nimport { ChildrenNode } from '../snap/ChildrenNode';\nimport { KEY_INDEX } from '../snap/indexes/KeyIndex';\nimport { ImmutableTree } from '../util/ImmutableTree';\nimport { Path } from '../util/Path';\nimport {\n WriteTreeCompleteChildSource,\n NO_COMPLETE_CHILD_SOURCE,\n CompleteChildSource\n} from './CompleteChildSource';\nimport { ViewCache } from './ViewCache';\nimport { NodeFilter } from './filter/NodeFilter';\nimport { WriteTreeRef } from '../WriteTree';\nimport { Overwrite } from '../operation/Overwrite';\nimport { Merge } from '../operation/Merge';\nimport { AckUserWrite } from '../operation/AckUserWrite';\nimport { Node } from '../snap/Node';\n\n/**\n * @constructor\n * @struct\n */\nexport class ProcessorResult {\n /**\n * @param {!ViewCache} viewCache\n * @param {!Array.} changes\n */\n constructor(\n public readonly viewCache: ViewCache,\n public readonly changes: Change[]\n ) {}\n}\n\n/**\n * @constructor\n */\nexport class ViewProcessor {\n /**\n * @param {!NodeFilter} filter_\n */\n constructor(private readonly filter_: NodeFilter) {}\n\n /**\n * @param {!ViewCache} viewCache\n */\n assertIndexed(viewCache: ViewCache) {\n assert(\n viewCache.getEventCache().getNode().isIndexed(this.filter_.getIndex()),\n 'Event snap not indexed'\n );\n assert(\n viewCache.getServerCache().getNode().isIndexed(this.filter_.getIndex()),\n 'Server snap not indexed'\n );\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @return {!ProcessorResult}\n */\n applyOperation(\n oldViewCache: ViewCache,\n operation: Operation,\n writesCache: WriteTreeRef,\n completeCache: Node | null\n ): ProcessorResult {\n const accumulator = new ChildChangeAccumulator();\n let newViewCache, filterServerNode;\n if (operation.type === OperationType.OVERWRITE) {\n const overwrite = operation as Overwrite;\n if (overwrite.source.fromUser) {\n newViewCache = this.applyUserOverwrite_(\n oldViewCache,\n overwrite.path,\n overwrite.snap,\n writesCache,\n completeCache,\n accumulator\n );\n } else {\n assert(overwrite.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered and the\n // update is not at the root in which case it is ok (and necessary) to mark the node unfiltered\n // again\n filterServerNode =\n overwrite.source.tagged ||\n (oldViewCache.getServerCache().isFiltered() &&\n !overwrite.path.isEmpty());\n newViewCache = this.applyServerOverwrite_(\n oldViewCache,\n overwrite.path,\n overwrite.snap,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n }\n } else if (operation.type === OperationType.MERGE) {\n const merge = operation as Merge;\n if (merge.source.fromUser) {\n newViewCache = this.applyUserMerge_(\n oldViewCache,\n merge.path,\n merge.children,\n writesCache,\n completeCache,\n accumulator\n );\n } else {\n assert(merge.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered\n filterServerNode =\n merge.source.tagged || oldViewCache.getServerCache().isFiltered();\n newViewCache = this.applyServerMerge_(\n oldViewCache,\n merge.path,\n merge.children,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n }\n } else if (operation.type === OperationType.ACK_USER_WRITE) {\n const ackUserWrite = operation as AckUserWrite;\n if (!ackUserWrite.revert) {\n newViewCache = this.ackUserWrite_(\n oldViewCache,\n ackUserWrite.path,\n ackUserWrite.affectedTree,\n writesCache,\n completeCache,\n accumulator\n );\n } else {\n newViewCache = this.revertUserWrite_(\n oldViewCache,\n ackUserWrite.path,\n writesCache,\n completeCache,\n accumulator\n );\n }\n } else if (operation.type === OperationType.LISTEN_COMPLETE) {\n newViewCache = this.listenComplete_(\n oldViewCache,\n operation.path,\n writesCache,\n accumulator\n );\n } else {\n throw assertionError('Unknown operation type: ' + operation.type);\n }\n const changes = accumulator.getChanges();\n ViewProcessor.maybeAddValueEvent_(oldViewCache, newViewCache, changes);\n return new ProcessorResult(newViewCache, changes);\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!ViewCache} newViewCache\n * @param {!Array.} accumulator\n * @private\n */\n private static maybeAddValueEvent_(\n oldViewCache: ViewCache,\n newViewCache: ViewCache,\n accumulator: Change[]\n ) {\n const eventSnap = newViewCache.getEventCache();\n if (eventSnap.isFullyInitialized()) {\n const isLeafOrEmpty =\n eventSnap.getNode().isLeafNode() || eventSnap.getNode().isEmpty();\n const oldCompleteSnap = oldViewCache.getCompleteEventSnap();\n if (\n accumulator.length > 0 ||\n !oldViewCache.getEventCache().isFullyInitialized() ||\n (isLeafOrEmpty &&\n !eventSnap.getNode().equals /** @type {!Node} */(oldCompleteSnap)) ||\n !eventSnap.getNode().getPriority().equals(oldCompleteSnap.getPriority())\n ) {\n accumulator.push(\n Change.valueChange(\n /** @type {!Node} */ newViewCache.getCompleteEventSnap()\n )\n );\n }\n }\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} changePath\n * @param {!WriteTreeRef} writesCache\n * @param {!CompleteChildSource} source\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private generateEventCacheAfterServerEvent_(\n viewCache: ViewCache,\n changePath: Path,\n writesCache: WriteTreeRef,\n source: CompleteChildSource,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldEventSnap = viewCache.getEventCache();\n if (writesCache.shadowingWrite(changePath) != null) {\n // we have a shadowing write, ignore changes\n return viewCache;\n } else {\n let newEventCache, serverNode;\n if (changePath.isEmpty()) {\n // TODO: figure out how this plays with \"sliding ack windows\"\n assert(\n viewCache.getServerCache().isFullyInitialized(),\n 'If change path is empty, we must have complete server data'\n );\n if (viewCache.getServerCache().isFiltered()) {\n // We need to special case this, because we need to only apply writes to complete children, or\n // we might end up raising events for incomplete children. If the server data is filtered deep\n // writes cannot be guaranteed to be complete\n const serverCache = viewCache.getCompleteServerSnap();\n const completeChildren =\n serverCache instanceof ChildrenNode\n ? serverCache\n : ChildrenNode.EMPTY_NODE;\n const completeEventChildren = writesCache.calcCompleteEventChildren(\n completeChildren\n );\n newEventCache = this.filter_.updateFullNode(\n viewCache.getEventCache().getNode(),\n completeEventChildren,\n accumulator\n );\n } else {\n const completeNode = writesCache.calcCompleteEventCache(\n viewCache.getCompleteServerSnap()\n );\n newEventCache = this.filter_.updateFullNode(\n viewCache.getEventCache().getNode(),\n completeNode,\n accumulator\n );\n }\n } else {\n const childKey = changePath.getFront();\n if (childKey == '.priority') {\n assert(\n changePath.getLength() == 1,\n \"Can't have a priority with additional path components\"\n );\n const oldEventNode = oldEventSnap.getNode();\n serverNode = viewCache.getServerCache().getNode();\n // we might have overwrites for this priority\n const updatedPriority = writesCache.calcEventCacheAfterServerOverwrite(\n changePath,\n oldEventNode,\n serverNode\n );\n if (updatedPriority != null) {\n newEventCache = this.filter_.updatePriority(\n oldEventNode,\n updatedPriority\n );\n } else {\n // priority didn't change, keep old node\n newEventCache = oldEventSnap.getNode();\n }\n } else {\n const childChangePath = changePath.popFront();\n // update child\n let newEventChild;\n if (oldEventSnap.isCompleteForChild(childKey)) {\n serverNode = viewCache.getServerCache().getNode();\n const eventChildUpdate = writesCache.calcEventCacheAfterServerOverwrite(\n changePath,\n oldEventSnap.getNode(),\n serverNode\n );\n if (eventChildUpdate != null) {\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey)\n .updateChild(childChangePath, eventChildUpdate);\n } else {\n // Nothing changed, just keep the old child\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey);\n }\n } else {\n newEventChild = writesCache.calcCompleteChild(\n childKey,\n viewCache.getServerCache()\n );\n }\n if (newEventChild != null) {\n newEventCache = this.filter_.updateChild(\n oldEventSnap.getNode(),\n childKey,\n newEventChild,\n childChangePath,\n source,\n accumulator\n );\n } else {\n // no complete child available or no change\n newEventCache = oldEventSnap.getNode();\n }\n }\n }\n return viewCache.updateEventSnap(\n newEventCache,\n oldEventSnap.isFullyInitialized() || changePath.isEmpty(),\n this.filter_.filtersNodes()\n );\n }\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n applyServerOverwrite_(\n oldViewCache: ViewCache,\n changePath: Path,\n changedSnap: Node,\n writesCache: WriteTreeRef,\n completeCache: Node | null,\n filterServerNode: boolean,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldServerSnap = oldViewCache.getServerCache();\n let newServerCache;\n const serverFilter = filterServerNode\n ? this.filter_\n : this.filter_.getIndexedFilter();\n if (changePath.isEmpty()) {\n newServerCache = serverFilter.updateFullNode(\n oldServerSnap.getNode(),\n changedSnap,\n null\n );\n } else if (serverFilter.filtersNodes() && !oldServerSnap.isFiltered()) {\n // we want to filter the server node, but we didn't filter the server node yet, so simulate a full update\n const newServerNode = oldServerSnap\n .getNode()\n .updateChild(changePath, changedSnap);\n newServerCache = serverFilter.updateFullNode(\n oldServerSnap.getNode(),\n newServerNode,\n null\n );\n } else {\n const childKey = changePath.getFront();\n if (\n !oldServerSnap.isCompleteForPath(changePath) &&\n changePath.getLength() > 1\n ) {\n // We don't update incomplete nodes with updates intended for other listeners\n return oldViewCache;\n }\n const childChangePath = changePath.popFront();\n const childNode = oldServerSnap.getNode().getImmediateChild(childKey);\n const newChildNode = childNode.updateChild(childChangePath, changedSnap);\n if (childKey == '.priority') {\n newServerCache = serverFilter.updatePriority(\n oldServerSnap.getNode(),\n newChildNode\n );\n } else {\n newServerCache = serverFilter.updateChild(\n oldServerSnap.getNode(),\n childKey,\n newChildNode,\n childChangePath,\n NO_COMPLETE_CHILD_SOURCE,\n null\n );\n }\n }\n const newViewCache = oldViewCache.updateServerSnap(\n newServerCache,\n oldServerSnap.isFullyInitialized() || changePath.isEmpty(),\n serverFilter.filtersNodes()\n );\n const source = new WriteTreeCompleteChildSource(\n writesCache,\n newViewCache,\n completeCache\n );\n return this.generateEventCacheAfterServerEvent_(\n newViewCache,\n changePath,\n writesCache,\n source,\n accumulator\n );\n }\n\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n applyUserOverwrite_(\n oldViewCache: ViewCache,\n changePath: Path,\n changedSnap: Node,\n writesCache: WriteTreeRef,\n completeCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldEventSnap = oldViewCache.getEventCache();\n let newViewCache, newEventCache;\n const source = new WriteTreeCompleteChildSource(\n writesCache,\n oldViewCache,\n completeCache\n );\n if (changePath.isEmpty()) {\n newEventCache = this.filter_.updateFullNode(\n oldViewCache.getEventCache().getNode(),\n changedSnap,\n accumulator\n );\n newViewCache = oldViewCache.updateEventSnap(\n newEventCache,\n true,\n this.filter_.filtersNodes()\n );\n } else {\n const childKey = changePath.getFront();\n if (childKey === '.priority') {\n newEventCache = this.filter_.updatePriority(\n oldViewCache.getEventCache().getNode(),\n changedSnap\n );\n newViewCache = oldViewCache.updateEventSnap(\n newEventCache,\n oldEventSnap.isFullyInitialized(),\n oldEventSnap.isFiltered()\n );\n } else {\n const childChangePath = changePath.popFront();\n const oldChild = oldEventSnap.getNode().getImmediateChild(childKey);\n let newChild;\n if (childChangePath.isEmpty()) {\n // Child overwrite, we can replace the child\n newChild = changedSnap;\n } else {\n const childNode = source.getCompleteChild(childKey);\n if (childNode != null) {\n if (\n childChangePath.getBack() === '.priority' &&\n childNode.getChild(childChangePath.parent()).isEmpty()\n ) {\n // This is a priority update on an empty node. If this node exists on the server, the\n // server will send down the priority in the update, so ignore for now\n newChild = childNode;\n } else {\n newChild = childNode.updateChild(childChangePath, changedSnap);\n }\n } else {\n // There is no complete child node available\n newChild = ChildrenNode.EMPTY_NODE;\n }\n }\n if (!oldChild.equals(newChild)) {\n const newEventSnap = this.filter_.updateChild(\n oldEventSnap.getNode(),\n childKey,\n newChild,\n childChangePath,\n source,\n accumulator\n );\n newViewCache = oldViewCache.updateEventSnap(\n newEventSnap,\n oldEventSnap.isFullyInitialized(),\n this.filter_.filtersNodes()\n );\n } else {\n newViewCache = oldViewCache;\n }\n }\n }\n return newViewCache;\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {string} childKey\n * @return {boolean}\n * @private\n */\n private static cacheHasChild_(\n viewCache: ViewCache,\n childKey: string\n ): boolean {\n return viewCache.getEventCache().isCompleteForChild(childKey);\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private applyUserMerge_(\n viewCache: ViewCache,\n path: Path,\n changedChildren: ImmutableTree,\n writesCache: WriteTreeRef,\n serverCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n let curViewCache = viewCache;\n changedChildren.foreach((relativePath, childNode) => {\n const writePath = path.child(relativePath);\n if (ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = this.applyUserOverwrite_(\n curViewCache,\n writePath,\n childNode,\n writesCache,\n serverCache,\n accumulator\n );\n }\n });\n\n changedChildren.foreach((relativePath, childNode) => {\n const writePath = path.child(relativePath);\n if (!ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = this.applyUserOverwrite_(\n curViewCache,\n writePath,\n childNode,\n writesCache,\n serverCache,\n accumulator\n );\n }\n });\n\n return curViewCache;\n }\n\n /**\n * @param {!Node} node\n * @param {ImmutableTree.} merge\n * @return {!Node}\n * @private\n */\n private applyMerge_(node: Node, merge: ImmutableTree): Node {\n merge.foreach(function(relativePath, childNode) {\n node = node.updateChild(relativePath, childNode);\n });\n return node;\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private applyServerMerge_(\n viewCache: ViewCache,\n path: Path,\n changedChildren: ImmutableTree,\n writesCache: WriteTreeRef,\n serverCache: Node | null,\n filterServerNode: boolean,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n // If we don't have a cache yet, this merge was intended for a previously listen in the same location. Ignore it and\n // wait for the complete data update coming soon.\n if (\n viewCache.getServerCache().getNode().isEmpty() &&\n !viewCache.getServerCache().isFullyInitialized()\n ) {\n return viewCache;\n }\n\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n let curViewCache = viewCache;\n let viewMergeTree;\n if (path.isEmpty()) {\n viewMergeTree = changedChildren;\n } else {\n viewMergeTree = ImmutableTree.Empty.setTree(path, changedChildren);\n }\n const serverNode = viewCache.getServerCache().getNode();\n viewMergeTree.children.inorderTraversal((childKey, childTree) => {\n if (serverNode.hasChild(childKey)) {\n const serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n const newChild = this.applyMerge_(serverChild, childTree);\n curViewCache = this.applyServerOverwrite_(\n curViewCache,\n new Path(childKey),\n newChild,\n writesCache,\n serverCache,\n filterServerNode,\n accumulator\n );\n }\n });\n viewMergeTree.children.inorderTraversal((childKey, childMergeTree) => {\n const isUnknownDeepMerge =\n !viewCache.getServerCache().isCompleteForChild(childKey) &&\n childMergeTree.value == null;\n if (!serverNode.hasChild(childKey) && !isUnknownDeepMerge) {\n const serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n const newChild = this.applyMerge_(serverChild, childMergeTree);\n curViewCache = this.applyServerOverwrite_(\n curViewCache,\n new Path(childKey),\n newChild,\n writesCache,\n serverCache,\n filterServerNode,\n accumulator\n );\n }\n });\n\n return curViewCache;\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} ackPath\n * @param {!ImmutableTree} affectedTree\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private ackUserWrite_(\n viewCache: ViewCache,\n ackPath: Path,\n affectedTree: ImmutableTree,\n writesCache: WriteTreeRef,\n completeCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n if (writesCache.shadowingWrite(ackPath) != null) {\n return viewCache;\n }\n\n // Only filter server node if it is currently filtered\n const filterServerNode = viewCache.getServerCache().isFiltered();\n\n // Essentially we'll just get our existing server cache for the affected paths and re-apply it as a server update\n // now that it won't be shadowed.\n const serverCache = viewCache.getServerCache();\n if (affectedTree.value != null) {\n // This is an overwrite.\n if (\n (ackPath.isEmpty() && serverCache.isFullyInitialized()) ||\n serverCache.isCompleteForPath(ackPath)\n ) {\n return this.applyServerOverwrite_(\n viewCache,\n ackPath,\n serverCache.getNode().getChild(ackPath),\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n } else if (ackPath.isEmpty()) {\n // This is a goofy edge case where we are acking data at this location but don't have full data. We\n // should just re-apply whatever we have in our cache as a merge.\n let changedChildren = ImmutableTree.Empty;\n serverCache.getNode().forEachChild(KEY_INDEX, function(name, node) {\n changedChildren = changedChildren.set(new Path(name), node);\n });\n return this.applyServerMerge_(\n viewCache,\n ackPath,\n changedChildren,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n } else {\n return viewCache;\n }\n } else {\n // This is a merge.\n let changedChildren = ImmutableTree.Empty;\n affectedTree.foreach(function(mergePath, value) {\n const serverCachePath = ackPath.child(mergePath);\n if (serverCache.isCompleteForPath(serverCachePath)) {\n changedChildren = changedChildren.set(\n mergePath,\n serverCache.getNode().getChild(serverCachePath)\n );\n }\n });\n return this.applyServerMerge_(\n viewCache,\n ackPath,\n changedChildren,\n writesCache,\n completeCache,\n filterServerNode,\n accumulator\n );\n }\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private listenComplete_(\n viewCache: ViewCache,\n path: Path,\n writesCache: WriteTreeRef,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n const oldServerNode = viewCache.getServerCache();\n const newViewCache = viewCache.updateServerSnap(\n oldServerNode.getNode(),\n oldServerNode.isFullyInitialized() || path.isEmpty(),\n oldServerNode.isFiltered()\n );\n return this.generateEventCacheAfterServerEvent_(\n newViewCache,\n path,\n writesCache,\n NO_COMPLETE_CHILD_SOURCE,\n accumulator\n );\n }\n\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n private revertUserWrite_(\n viewCache: ViewCache,\n path: Path,\n writesCache: WriteTreeRef,\n completeServerCache: Node | null,\n accumulator: ChildChangeAccumulator\n ): ViewCache {\n let complete;\n if (writesCache.shadowingWrite(path) != null) {\n return viewCache;\n } else {\n const source = new WriteTreeCompleteChildSource(\n writesCache,\n viewCache,\n completeServerCache\n );\n const oldEventCache = viewCache.getEventCache().getNode();\n let newEventCache;\n if (path.isEmpty() || path.getFront() === '.priority') {\n let newNode;\n if (viewCache.getServerCache().isFullyInitialized()) {\n newNode = writesCache.calcCompleteEventCache(\n viewCache.getCompleteServerSnap()\n );\n } else {\n const serverChildren = viewCache.getServerCache().getNode();\n assert(\n serverChildren instanceof ChildrenNode,\n 'serverChildren would be complete if leaf node'\n );\n newNode = writesCache.calcCompleteEventChildren(\n serverChildren as ChildrenNode\n );\n }\n newNode = newNode as Node;\n newEventCache = this.filter_.updateFullNode(\n oldEventCache,\n newNode,\n accumulator\n );\n } else {\n const childKey = path.getFront();\n let newChild = writesCache.calcCompleteChild(\n childKey,\n viewCache.getServerCache()\n );\n if (\n newChild == null &&\n viewCache.getServerCache().isCompleteForChild(childKey)\n ) {\n newChild = oldEventCache.getImmediateChild(childKey);\n }\n if (newChild != null) {\n newEventCache = this.filter_.updateChild(\n oldEventCache,\n childKey,\n newChild,\n path.popFront(),\n source,\n accumulator\n );\n } else if (viewCache.getEventCache().getNode().hasChild(childKey)) {\n // No complete child available, delete the existing one, if any\n newEventCache = this.filter_.updateChild(\n oldEventCache,\n childKey,\n ChildrenNode.EMPTY_NODE,\n path.popFront(),\n source,\n accumulator\n );\n } else {\n newEventCache = oldEventCache;\n }\n if (\n newEventCache.isEmpty() &&\n viewCache.getServerCache().isFullyInitialized()\n ) {\n // We might have reverted all child writes. Maybe the old event was a leaf node\n complete = writesCache.calcCompleteEventCache(\n viewCache.getCompleteServerSnap()\n );\n if (complete.isLeafNode()) {\n newEventCache = this.filter_.updateFullNode(\n newEventCache,\n complete,\n accumulator\n );\n }\n }\n }\n complete =\n viewCache.getServerCache().isFullyInitialized() ||\n writesCache.shadowingWrite(Path.Empty) != null;\n return viewCache.updateEventSnap(\n newEventCache,\n complete,\n this.filter_.filtersNodes()\n );\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/ViewProcessor.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { NamedNode, Node } from '../snap/Node';\nimport { Change } from './Change';\nimport { assertionError } from '../../../utils/assert';\nimport { Query } from '../../api/Query';\nimport { Index } from '../snap/indexes/Index';\nimport { EventRegistration } from './EventRegistration';\nimport { Event } from './Event';\n\n/**\n * An EventGenerator is used to convert \"raw\" changes (Change) as computed by the\n * CacheDiffer into actual events (Event) that can be raised. See generateEventsForChanges()\n * for details.\n *\n * @constructor\n */\nexport class EventGenerator {\n private index_: Index;\n\n /**\n *\n * @param {!Query} query_\n */\n constructor(private query_: Query) {\n /**\n * @private\n * @type {!Index}\n */\n this.index_ = this.query_.getQueryParams().getIndex();\n }\n\n /**\n * Given a set of raw changes (no moved events and prevName not specified yet), and a set of\n * EventRegistrations that should be notified of these changes, generate the actual events to be raised.\n *\n * Notes:\n * - child_moved events will be synthesized at this time for any child_changed events that affect\n * our index.\n * - prevName will be calculated based on the index ordering.\n *\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {!Array.} eventRegistrations\n * @return {!Array.}\n */\n generateEventsForChanges(\n changes: Change[],\n eventCache: Node,\n eventRegistrations: EventRegistration[]\n ): Event[] {\n const events: Event[] = [];\n const moves: Change[] = [];\n\n changes.forEach(change => {\n if (\n change.type === Change.CHILD_CHANGED &&\n this.index_.indexedValueChanged(\n change.oldSnap as Node,\n change.snapshotNode\n )\n ) {\n moves.push(\n Change.childMovedChange(\n change.childName as string,\n change.snapshotNode\n )\n );\n }\n });\n\n this.generateEventsForType_(\n events,\n Change.CHILD_REMOVED,\n changes,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.CHILD_ADDED,\n changes,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.CHILD_MOVED,\n moves,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.CHILD_CHANGED,\n changes,\n eventRegistrations,\n eventCache\n );\n this.generateEventsForType_(\n events,\n Change.VALUE,\n changes,\n eventRegistrations,\n eventCache\n );\n\n return events;\n }\n\n /**\n * Given changes of a single change type, generate the corresponding events.\n *\n * @param {!Array.} events\n * @param {!string} eventType\n * @param {!Array.} changes\n * @param {!Array.} registrations\n * @param {!Node} eventCache\n * @private\n */\n private generateEventsForType_(\n events: Event[],\n eventType: string,\n changes: Change[],\n registrations: EventRegistration[],\n eventCache: Node\n ) {\n const filteredChanges = changes.filter(change => change.type === eventType);\n\n filteredChanges.sort(this.compareChanges_.bind(this));\n filteredChanges.forEach(change => {\n const materializedChange = this.materializeSingleChange_(\n change,\n eventCache\n );\n registrations.forEach(registration => {\n if (registration.respondsTo(change.type)) {\n events.push(\n registration.createEvent(materializedChange, this.query_)\n );\n }\n });\n });\n }\n\n /**\n * @param {!Change} change\n * @param {!Node} eventCache\n * @return {!Change}\n * @private\n */\n private materializeSingleChange_(change: Change, eventCache: Node): Change {\n if (change.type === 'value' || change.type === 'child_removed') {\n return change;\n } else {\n change.prevName = eventCache.getPredecessorChildName(\n /** @type {!string} */\n change.childName,\n change.snapshotNode,\n this.index_\n );\n return change;\n }\n }\n\n /**\n * @param {!Change} a\n * @param {!Change} b\n * @return {number}\n * @private\n */\n private compareChanges_(a: Change, b: Change) {\n if (a.childName == null || b.childName == null) {\n throw assertionError('Should only compare child_ events.');\n }\n const aWrapped = new NamedNode(a.childName, a.snapshotNode);\n const bWrapped = new NamedNode(b.childName, b.snapshotNode);\n return this.index_.compare(aWrapped, bWrapped);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/EventGenerator.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { IndexedFilter } from './filter/IndexedFilter';\nimport { ViewProcessor } from './ViewProcessor';\nimport { ChildrenNode } from '../snap/ChildrenNode';\nimport { CacheNode } from './CacheNode';\nimport { ViewCache } from './ViewCache';\nimport { EventGenerator } from './EventGenerator';\nimport { assert } from '../../../utils/assert';\nimport { Operation, OperationType } from '../operation/Operation';\nimport { Change } from './Change';\nimport { PRIORITY_INDEX } from '../snap/indexes/PriorityIndex';\nimport { Query } from '../../api/Query';\nimport { EventRegistration } from './EventRegistration';\nimport { Node } from '../snap/Node';\nimport { Path } from '../util/Path';\nimport { WriteTreeRef } from '../WriteTree';\nimport { CancelEvent, Event } from './Event';\n\n/**\n * A view represents a specific location and query that has 1 or more event registrations.\n *\n * It does several things:\n * - Maintains the list of event registrations for this location/query.\n * - Maintains a cache of the data visible for this location/query.\n * - Applies new operations (via applyOperation), updates the cache, and based on the event\n * registrations returns the set of events to be raised.\n * @constructor\n */\nexport class View {\n private processor_: ViewProcessor;\n private viewCache_: ViewCache;\n private eventRegistrations_: EventRegistration[] = [];\n private eventGenerator_: EventGenerator;\n\n /**\n *\n * @param {!Query} query_\n * @param {!ViewCache} initialViewCache\n */\n constructor(private query_: Query, initialViewCache: ViewCache) {\n const params = this.query_.getQueryParams();\n\n const indexFilter = new IndexedFilter(params.getIndex());\n const filter = params.getNodeFilter();\n\n /**\n * @type {ViewProcessor}\n * @private\n */\n this.processor_ = new ViewProcessor(filter);\n\n const initialServerCache = initialViewCache.getServerCache();\n const initialEventCache = initialViewCache.getEventCache();\n\n // Don't filter server node with other filter than index, wait for tagged listen\n const serverSnap = indexFilter.updateFullNode(\n ChildrenNode.EMPTY_NODE,\n initialServerCache.getNode(),\n null\n );\n const eventSnap = filter.updateFullNode(\n ChildrenNode.EMPTY_NODE,\n initialEventCache.getNode(),\n null\n );\n const newServerCache = new CacheNode(\n serverSnap,\n initialServerCache.isFullyInitialized(),\n indexFilter.filtersNodes()\n );\n const newEventCache = new CacheNode(\n eventSnap,\n initialEventCache.isFullyInitialized(),\n filter.filtersNodes()\n );\n\n /**\n * @type {!ViewCache}\n * @private\n */\n this.viewCache_ = new ViewCache(newEventCache, newServerCache);\n\n /**\n * @type {!EventGenerator}\n * @private\n */\n this.eventGenerator_ = new EventGenerator(this.query_);\n }\n\n /**\n * @return {!Query}\n */\n getQuery(): Query {\n return this.query_;\n }\n\n /**\n * @return {?Node}\n */\n getServerCache(): Node | null {\n return this.viewCache_.getServerCache().getNode();\n }\n\n /**\n * @param {!Path} path\n * @return {?Node}\n */\n getCompleteServerCache(path: Path): Node | null {\n const cache = this.viewCache_.getCompleteServerSnap();\n if (cache) {\n // If this isn't a \"loadsAllData\" view, then cache isn't actually a complete cache and\n // we need to see if it contains the child we're interested in.\n if (\n this.query_.getQueryParams().loadsAllData() ||\n (!path.isEmpty() && !cache.getImmediateChild(path.getFront()).isEmpty())\n ) {\n return cache.getChild(path);\n }\n }\n return null;\n }\n\n /**\n * @return {boolean}\n */\n isEmpty(): boolean {\n return this.eventRegistrations_.length === 0;\n }\n\n /**\n * @param {!EventRegistration} eventRegistration\n */\n addEventRegistration(eventRegistration: EventRegistration) {\n this.eventRegistrations_.push(eventRegistration);\n }\n\n /**\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n removeEventRegistration(\n eventRegistration: EventRegistration | null,\n cancelError?: Error\n ): Event[] {\n const cancelEvents: CancelEvent[] = [];\n if (cancelError) {\n assert(\n eventRegistration == null,\n 'A cancel should cancel all event registrations.'\n );\n const path = this.query_.path;\n this.eventRegistrations_.forEach(function(registration) {\n cancelError /** @type {!Error} */ = cancelError;\n const maybeEvent = registration.createCancelEvent(cancelError, path);\n if (maybeEvent) {\n cancelEvents.push(maybeEvent);\n }\n });\n }\n\n if (eventRegistration) {\n let remaining = [];\n for (let i = 0; i < this.eventRegistrations_.length; ++i) {\n const existing = this.eventRegistrations_[i];\n if (!existing.matches(eventRegistration)) {\n remaining.push(existing);\n } else if (eventRegistration.hasAnyCallback()) {\n // We're removing just this one\n remaining = remaining.concat(this.eventRegistrations_.slice(i + 1));\n break;\n }\n }\n this.eventRegistrations_ = remaining;\n } else {\n this.eventRegistrations_ = [];\n }\n return cancelEvents;\n }\n\n /**\n * Applies the given Operation, updates our cache, and returns the appropriate events.\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @return {!Array.}\n */\n applyOperation(\n operation: Operation,\n writesCache: WriteTreeRef,\n completeServerCache: Node | null\n ): Event[] {\n if (\n operation.type === OperationType.MERGE &&\n operation.source.queryId !== null\n ) {\n assert(\n this.viewCache_.getCompleteServerSnap(),\n 'We should always have a full cache before handling merges'\n );\n assert(\n this.viewCache_.getCompleteEventSnap(),\n 'Missing event cache, even though we have a server cache'\n );\n }\n\n const oldViewCache = this.viewCache_;\n const result = this.processor_.applyOperation(\n oldViewCache,\n operation,\n writesCache,\n completeServerCache\n );\n this.processor_.assertIndexed(result.viewCache);\n\n assert(\n result.viewCache.getServerCache().isFullyInitialized() ||\n !oldViewCache.getServerCache().isFullyInitialized(),\n 'Once a server snap is complete, it should never go back'\n );\n\n this.viewCache_ = result.viewCache;\n\n return this.generateEventsForChanges_(\n result.changes,\n result.viewCache.getEventCache().getNode(),\n null\n );\n }\n\n /**\n * @param {!EventRegistration} registration\n * @return {!Array.}\n */\n getInitialEvents(registration: EventRegistration): Event[] {\n const eventSnap = this.viewCache_.getEventCache();\n const initialChanges: Change[] = [];\n if (!eventSnap.getNode().isLeafNode()) {\n const eventNode = eventSnap.getNode() as ChildrenNode;\n eventNode.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n initialChanges.push(Change.childAddedChange(key, childNode));\n });\n }\n if (eventSnap.isFullyInitialized()) {\n initialChanges.push(Change.valueChange(eventSnap.getNode()));\n }\n return this.generateEventsForChanges_(\n initialChanges,\n eventSnap.getNode(),\n registration\n );\n }\n\n /**\n * @private\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {EventRegistration=} eventRegistration\n * @return {!Array.}\n */\n generateEventsForChanges_(\n changes: Change[],\n eventCache: Node,\n eventRegistration?: EventRegistration\n ): Event[] {\n const registrations = eventRegistration\n ? [eventRegistration]\n : this.eventRegistrations_;\n return this.eventGenerator_.generateEventsForChanges(\n changes,\n eventCache,\n registrations\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/View.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ImmutableTree } from './util/ImmutableTree';\nimport { Path } from './util/Path';\nimport { forEach } from '../../utils/obj';\nimport { Node, NamedNode } from './snap/Node';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { assert } from '../../utils/assert';\nimport { ChildrenNode } from './snap/ChildrenNode';\n\n/**\n * This class holds a collection of writes that can be applied to nodes in unison. It abstracts away the logic with\n * dealing with priority writes and multiple nested writes. At any given path there is only allowed to be one write\n * modifying that path. Any write to an existing path or shadowing an existing path will modify that existing write\n * to reflect the write added.\n *\n * @constructor\n * @param {!ImmutableTree.} writeTree\n */\nexport class CompoundWrite {\n constructor(private writeTree_: ImmutableTree) {}\n /**\n * @type {!CompoundWrite}\n */\n static Empty = new CompoundWrite(new ImmutableTree(null));\n\n /**\n * @param {!Path} path\n * @param {!Node} node\n * @return {!CompoundWrite}\n */\n addWrite(path: Path, node: Node): CompoundWrite {\n if (path.isEmpty()) {\n return new CompoundWrite(new ImmutableTree(node));\n } else {\n const rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n const rootMostPath = rootmost.path;\n let value = rootmost.value;\n const relativePath = Path.relativePath(rootMostPath, path);\n value = value.updateChild(relativePath, node);\n return new CompoundWrite(this.writeTree_.set(rootMostPath, value));\n } else {\n const subtree = new ImmutableTree(node);\n const newWriteTree = this.writeTree_.setTree(path, subtree);\n return new CompoundWrite(newWriteTree);\n }\n }\n }\n\n /**\n * @param {!Path} path\n * @param {!Object.} updates\n * @return {!CompoundWrite}\n */\n addWrites(path: Path, updates: { [name: string]: Node }): CompoundWrite {\n let newWrite = this as CompoundWrite;\n forEach(updates, function(childKey: string, node: Node) {\n newWrite = newWrite.addWrite(path.child(childKey), node);\n });\n return newWrite;\n }\n\n /**\n * Will remove a write at the given path and deeper paths. This will not modify a write at a higher\n * location, which must be removed by calling this method with that path.\n *\n * @param {!Path} path The path at which a write and all deeper writes should be removed\n * @return {!CompoundWrite} The new CompoundWrite with the removed path\n */\n removeWrite(path: Path): CompoundWrite {\n if (path.isEmpty()) {\n return CompoundWrite.Empty;\n } else {\n const newWriteTree = this.writeTree_.setTree(path, ImmutableTree.Empty);\n return new CompoundWrite(newWriteTree);\n }\n }\n\n /**\n * Returns whether this CompoundWrite will fully overwrite a node at a given location and can therefore be\n * considered \"complete\".\n *\n * @param {!Path} path The path to check for\n * @return {boolean} Whether there is a complete write at that path\n */\n hasCompleteWrite(path: Path): boolean {\n return this.getCompleteNode(path) != null;\n }\n\n /**\n * Returns a node for a path if and only if the node is a \"complete\" overwrite at that path. This will not aggregate\n * writes from deeper paths, but will return child nodes from a more shallow path.\n *\n * @param {!Path} path The path to get a complete write\n * @return {?Node} The node if complete at that path, or null otherwise.\n */\n getCompleteNode(path: Path): Node | null {\n const rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n return this.writeTree_\n .get(rootmost.path)\n .getChild(Path.relativePath(rootmost.path, path));\n } else {\n return null;\n }\n }\n\n /**\n * Returns all children that are guaranteed to be a complete overwrite.\n *\n * @return {!Array.} A list of all complete children.\n */\n getCompleteChildren(): Array {\n const children: NamedNode[] = [];\n let node = this.writeTree_.value;\n if (node != null) {\n // If it's a leaf node, it has no children; so nothing to do.\n if (!node.isLeafNode()) {\n (node as ChildrenNode).forEachChild(PRIORITY_INDEX, function(\n childName,\n childNode\n ) {\n children.push(new NamedNode(childName, childNode));\n });\n }\n } else {\n this.writeTree_.children.inorderTraversal(function(childName, childTree) {\n if (childTree.value != null) {\n children.push(new NamedNode(childName, childTree.value));\n }\n });\n }\n return children;\n }\n\n /**\n * @param {!Path} path\n * @return {!CompoundWrite}\n */\n childCompoundWrite(path: Path): CompoundWrite {\n if (path.isEmpty()) {\n return this;\n } else {\n const shadowingNode = this.getCompleteNode(path);\n if (shadowingNode != null) {\n return new CompoundWrite(new ImmutableTree(shadowingNode));\n } else {\n return new CompoundWrite(this.writeTree_.subtree(path));\n }\n }\n }\n\n /**\n * Returns true if this CompoundWrite is empty and therefore does not modify any nodes.\n * @return {boolean} Whether this CompoundWrite is empty\n */\n isEmpty(): boolean {\n return this.writeTree_.isEmpty();\n }\n\n /**\n * Applies this CompoundWrite to a node. The node is returned with all writes from this CompoundWrite applied to the\n * node\n * @param {!Node} node The node to apply this CompoundWrite to\n * @return {!Node} The node with all writes applied\n */\n apply(node: Node): Node {\n return CompoundWrite.applySubtreeWrite_(Path.Empty, this.writeTree_, node);\n }\n\n /**\n * @param {!Path} relativePath\n * @param {!ImmutableTree.} writeTree\n * @param {!Node} node\n * @return {!Node}\n * @private\n */\n private static applySubtreeWrite_ = function(\n relativePath: Path,\n writeTree: ImmutableTree,\n node: Node\n ): Node {\n if (writeTree.value != null) {\n // Since there a write is always a leaf, we're done here\n return node.updateChild(relativePath, writeTree.value);\n } else {\n let priorityWrite = null;\n writeTree.children.inorderTraversal(function(childKey, childTree) {\n if (childKey === '.priority') {\n // Apply priorities at the end so we don't update priorities for either empty nodes or forget\n // to apply priorities to empty nodes that are later filled\n assert(\n childTree.value !== null,\n 'Priority writes must always be leaf nodes'\n );\n priorityWrite = childTree.value;\n } else {\n node = CompoundWrite.applySubtreeWrite_(\n relativePath.child(childKey),\n childTree,\n node\n );\n }\n });\n // If there was a priority write, we only apply it if the node is not empty\n if (!node.getChild(relativePath).isEmpty() && priorityWrite !== null) {\n node = node.updateChild(relativePath.child('.priority'), priorityWrite);\n }\n return node;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/CompoundWrite.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { findKey, forEach, safeGet } from '../../utils/obj';\nimport { assert, assertionError } from '../../utils/assert';\nimport { Path } from './util/Path';\nimport { CompoundWrite } from './CompoundWrite';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { NamedNode, Node } from './snap/Node';\nimport { CacheNode } from './view/CacheNode';\nimport { Index } from './snap/indexes/Index';\n\n/**\n * Defines a single user-initiated write operation. May be the result of a set(), transaction(), or update() call. In\n * the case of a set() or transaction, snap wil be non-null. In the case of an update(), children will be non-null.\n */\nexport interface WriteRecord {\n writeId: number;\n path: Path;\n snap?: Node | null;\n children?: { [k: string]: Node } | null;\n visible: boolean;\n}\n\n/**\n * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them\n * with underlying server data (to create \"event cache\" data). Pending writes are added with addOverwrite()\n * and addMerge(), and removed with removeWrite().\n *\n * @constructor\n */\nexport class WriteTree {\n /**\n * A tree tracking the result of applying all visible writes. This does not include transactions with\n * applyLocally=false or writes that are completely shadowed by other writes.\n *\n * @type {!CompoundWrite}\n * @private\n */\n private visibleWrites_: CompoundWrite = CompoundWrite.Empty;\n\n /**\n * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary\n * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also\n * used by transactions).\n *\n * @type {!Array.}\n * @private\n */\n private allWrites_: WriteRecord[] = [];\n\n private lastWriteId_ = -1;\n\n /**\n * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.\n *\n * @param {!Path} path\n * @return {!WriteTreeRef}\n */\n childWrites(path: Path): WriteTreeRef {\n return new WriteTreeRef(path, this);\n }\n\n /**\n * Record a new overwrite from user code.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} writeId\n * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches\n */\n addOverwrite(path: Path, snap: Node, writeId: number, visible?: boolean) {\n assert(\n writeId > this.lastWriteId_,\n 'Stacking an older write on top of newer ones'\n );\n if (visible === undefined) {\n visible = true;\n }\n this.allWrites_.push({\n path: path,\n snap: snap,\n writeId: writeId,\n visible: visible\n });\n\n if (visible) {\n this.visibleWrites_ = this.visibleWrites_.addWrite(path, snap);\n }\n this.lastWriteId_ = writeId;\n }\n\n /**\n * Record a new merge from user code.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n */\n addMerge(\n path: Path,\n changedChildren: { [k: string]: Node },\n writeId: number\n ) {\n assert(\n writeId > this.lastWriteId_,\n 'Stacking an older merge on top of newer ones'\n );\n this.allWrites_.push({\n path: path,\n children: changedChildren,\n writeId: writeId,\n visible: true\n });\n\n this.visibleWrites_ = this.visibleWrites_.addWrites(path, changedChildren);\n this.lastWriteId_ = writeId;\n }\n\n /**\n * @param {!number} writeId\n * @return {?WriteRecord}\n */\n getWrite(writeId: number): WriteRecord | null {\n for (let i = 0; i < this.allWrites_.length; i++) {\n const record = this.allWrites_[i];\n if (record.writeId === writeId) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates\n * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.\n *\n * @param {!number} writeId\n * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise\n * events as a result).\n */\n removeWrite(writeId: number): boolean {\n // Note: disabling this check. It could be a transaction that preempted another transaction, and thus was applied\n // out of order.\n //const validClear = revert || this.allWrites_.length === 0 || writeId <= this.allWrites_[0].writeId;\n //assert(validClear, \"Either we don't have this write, or it's the first one in the queue\");\n\n const idx = this.allWrites_.findIndex(function(s) {\n return s.writeId === writeId;\n });\n assert(idx >= 0, 'removeWrite called with nonexistent writeId.');\n const writeToRemove = this.allWrites_[idx];\n this.allWrites_.splice(idx, 1);\n\n let removedWriteWasVisible = writeToRemove.visible;\n let removedWriteOverlapsWithOtherWrites = false;\n\n let i = this.allWrites_.length - 1;\n\n while (removedWriteWasVisible && i >= 0) {\n const currentWrite = this.allWrites_[i];\n if (currentWrite.visible) {\n if (\n i >= idx &&\n this.recordContainsPath_(currentWrite, writeToRemove.path)\n ) {\n // The removed write was completely shadowed by a subsequent write.\n removedWriteWasVisible = false;\n } else if (writeToRemove.path.contains(currentWrite.path)) {\n // Either we're covering some writes or they're covering part of us (depending on which came first).\n removedWriteOverlapsWithOtherWrites = true;\n }\n }\n i--;\n }\n\n if (!removedWriteWasVisible) {\n return false;\n } else if (removedWriteOverlapsWithOtherWrites) {\n // There's some shadowing going on. Just rebuild the visible writes from scratch.\n this.resetTree_();\n return true;\n } else {\n // There's no shadowing. We can safely just remove the write(s) from visibleWrites.\n if (writeToRemove.snap) {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(\n writeToRemove.path\n );\n } else {\n const children = writeToRemove.children;\n forEach(children, (childName: string) => {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(\n writeToRemove.path.child(childName)\n );\n });\n }\n return true;\n }\n }\n\n /**\n * Return a complete snapshot for the given path if there's visible write data at that path, else null.\n * No server data is considered.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n getCompleteWriteData(path: Path): Node | null {\n return this.visibleWrites_.getCompleteNode(path);\n }\n\n /**\n * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden\n * writes), attempt to calculate a complete snapshot for the given path\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude An optional set to be excluded\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n calcCompleteEventCache(\n treePath: Path,\n completeServerCache: Node | null,\n writeIdsToExclude?: number[],\n includeHiddenWrites?: boolean\n ): Node | null {\n if (!writeIdsToExclude && !includeHiddenWrites) {\n const shadowingNode = this.visibleWrites_.getCompleteNode(treePath);\n if (shadowingNode != null) {\n return shadowingNode;\n } else {\n const subMerge = this.visibleWrites_.childCompoundWrite(treePath);\n if (subMerge.isEmpty()) {\n return completeServerCache;\n } else if (\n completeServerCache == null &&\n !subMerge.hasCompleteWrite(Path.Empty)\n ) {\n // We wouldn't have a complete snapshot, since there's no underlying data and no complete shadow\n return null;\n } else {\n const layeredCache = completeServerCache || ChildrenNode.EMPTY_NODE;\n return subMerge.apply(layeredCache);\n }\n }\n } else {\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n if (!includeHiddenWrites && merge.isEmpty()) {\n return completeServerCache;\n } else {\n // If the server cache is null, and we don't have a complete cache, we need to return null\n if (\n !includeHiddenWrites &&\n completeServerCache == null &&\n !merge.hasCompleteWrite(Path.Empty)\n ) {\n return null;\n } else {\n const filter = function(write: WriteRecord) {\n return (\n (write.visible || includeHiddenWrites) &&\n (!writeIdsToExclude ||\n !~writeIdsToExclude.indexOf(write.writeId)) &&\n (write.path.contains(treePath) || treePath.contains(write.path))\n );\n };\n const mergeAtPath = WriteTree.layerTree_(\n this.allWrites_,\n filter,\n treePath\n );\n const layeredCache = completeServerCache || ChildrenNode.EMPTY_NODE;\n return mergeAtPath.apply(layeredCache);\n }\n }\n }\n }\n\n /**\n * With optional, underlying server data, attempt to return a children node of children that we have complete data for.\n * Used when creating new views, to pre-fill their complete event children snapshot.\n *\n * @param {!Path} treePath\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n calcCompleteEventChildren(\n treePath: Path,\n completeServerChildren: ChildrenNode | null\n ) {\n let completeChildren = ChildrenNode.EMPTY_NODE as Node;\n const topLevelSet = this.visibleWrites_.getCompleteNode(treePath);\n if (topLevelSet) {\n if (!topLevelSet.isLeafNode()) {\n // we're shadowing everything. Return the children.\n topLevelSet.forEachChild(PRIORITY_INDEX, function(\n childName,\n childSnap\n ) {\n completeChildren = completeChildren.updateImmediateChild(\n childName,\n childSnap\n );\n });\n }\n return completeChildren;\n } else if (completeServerChildren) {\n // Layer any children we have on top of this\n // We know we don't have a top-level set, so just enumerate existing children\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n completeServerChildren.forEachChild(PRIORITY_INDEX, function(\n childName,\n childNode\n ) {\n const node = merge\n .childCompoundWrite(new Path(childName))\n .apply(childNode);\n completeChildren = completeChildren.updateImmediateChild(\n childName,\n node\n );\n });\n // Add any complete children we have from the set\n merge.getCompleteChildren().forEach(function(namedNode) {\n completeChildren = completeChildren.updateImmediateChild(\n namedNode.name,\n namedNode.node\n );\n });\n return completeChildren;\n } else {\n // We don't have anything to layer on top of. Layer on any children we have\n // Note that we can return an empty snap if we have a defined delete\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n merge.getCompleteChildren().forEach(function(namedNode) {\n completeChildren = completeChildren.updateImmediateChild(\n namedNode.name,\n namedNode.node\n );\n });\n return completeChildren;\n }\n }\n\n /**\n * Given that the underlying server data has updated, determine what, if anything, needs to be\n * applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events\n *\n * Either existingEventSnap or existingServerSnap must exist\n *\n * @param {!Path} treePath\n * @param {!Path} childPath\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n calcEventCacheAfterServerOverwrite(\n treePath: Path,\n childPath: Path,\n existingEventSnap: Node | null,\n existingServerSnap: Node | null\n ): Node | null {\n assert(\n existingEventSnap || existingServerSnap,\n 'Either existingEventSnap or existingServerSnap must exist'\n );\n const path = treePath.child(childPath);\n if (this.visibleWrites_.hasCompleteWrite(path)) {\n // At this point we can probably guarantee that we're in case 2, meaning no events\n // May need to check visibility while doing the findRootMostValueAndPath call\n return null;\n } else {\n // No complete shadowing. We're either partially shadowing or not shadowing at all.\n const childMerge = this.visibleWrites_.childCompoundWrite(path);\n if (childMerge.isEmpty()) {\n // We're not shadowing at all. Case 1\n return existingServerSnap.getChild(childPath);\n } else {\n // This could be more efficient if the serverNode + updates doesn't change the eventSnap\n // However this is tricky to find out, since user updates don't necessary change the server\n // snap, e.g. priority updates on empty nodes, or deep deletes. Another special case is if the server\n // adds nodes, but doesn't change any existing writes. It is therefore not enough to\n // only check if the updates change the serverNode.\n // Maybe check if the merge tree contains these special cases and only do a full overwrite in that case?\n return childMerge.apply(existingServerSnap.getChild(childPath));\n }\n }\n }\n\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!Path} treePath\n * @param {!string} childKey\n * @param {!CacheNode} existingServerSnap\n * @return {?Node}\n */\n calcCompleteChild(\n treePath: Path,\n childKey: string,\n existingServerSnap: CacheNode\n ): Node | null {\n const path = treePath.child(childKey);\n const shadowingNode = this.visibleWrites_.getCompleteNode(path);\n if (shadowingNode != null) {\n return shadowingNode;\n } else {\n if (existingServerSnap.isCompleteForChild(childKey)) {\n const childMerge = this.visibleWrites_.childCompoundWrite(path);\n return childMerge.apply(\n existingServerSnap.getNode().getImmediateChild(childKey)\n );\n } else {\n return null;\n }\n }\n }\n\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n shadowingWrite(path: Path): Node | null {\n return this.visibleWrites_.getCompleteNode(path);\n }\n\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window.\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n calcIndexedSlice(\n treePath: Path,\n completeServerData: Node | null,\n startPost: NamedNode,\n count: number,\n reverse: boolean,\n index: Index\n ): NamedNode[] {\n let toIterate: Node;\n const merge = this.visibleWrites_.childCompoundWrite(treePath);\n const shadowingNode = merge.getCompleteNode(Path.Empty);\n if (shadowingNode != null) {\n toIterate = shadowingNode;\n } else if (completeServerData != null) {\n toIterate = merge.apply(completeServerData);\n } else {\n // no children to iterate on\n return [];\n }\n toIterate = toIterate.withIndex(index);\n if (!toIterate.isEmpty() && !toIterate.isLeafNode()) {\n const nodes = [];\n const cmp = index.getCompare();\n const iter = reverse\n ? (toIterate as ChildrenNode).getReverseIteratorFrom(startPost, index)\n : (toIterate as ChildrenNode).getIteratorFrom(startPost, index);\n let next = iter.getNext();\n while (next && nodes.length < count) {\n if (cmp(next, startPost) !== 0) {\n nodes.push(next);\n }\n next = iter.getNext();\n }\n return nodes;\n } else {\n return [];\n }\n }\n\n /**\n * @param {!WriteRecord} writeRecord\n * @param {!Path} path\n * @return {boolean}\n * @private\n */\n private recordContainsPath_(writeRecord: WriteRecord, path: Path): boolean {\n if (writeRecord.snap) {\n return writeRecord.path.contains(path);\n } else {\n // findKey can return undefined, so use !! to coerce to boolean\n return !!findKey(writeRecord.children, function(\n childSnap: Node,\n childName: string\n ) {\n return writeRecord.path.child(childName).contains(path);\n });\n }\n }\n\n /**\n * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots\n * @private\n */\n private resetTree_() {\n this.visibleWrites_ = WriteTree.layerTree_(\n this.allWrites_,\n WriteTree.DefaultFilter_,\n Path.Empty\n );\n if (this.allWrites_.length > 0) {\n this.lastWriteId_ = this.allWrites_[this.allWrites_.length - 1].writeId;\n } else {\n this.lastWriteId_ = -1;\n }\n }\n\n /**\n * The default filter used when constructing the tree. Keep everything that's visible.\n *\n * @param {!WriteRecord} write\n * @return {boolean}\n * @private\n */\n private static DefaultFilter_(write: WriteRecord) {\n return write.visible;\n }\n\n /**\n * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of\n * event data at that path.\n *\n * @param {!Array.} writes\n * @param {!function(!WriteRecord):boolean} filter\n * @param {!Path} treeRoot\n * @return {!CompoundWrite}\n * @private\n */\n private static layerTree_(\n writes: WriteRecord[],\n filter: (w: WriteRecord) => boolean,\n treeRoot: Path\n ): CompoundWrite {\n let compoundWrite = CompoundWrite.Empty;\n for (let i = 0; i < writes.length; ++i) {\n const write = writes[i];\n // Theory, a later set will either:\n // a) abort a relevant transaction, so no need to worry about excluding it from calculating that transaction\n // b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction\n if (filter(write)) {\n const writePath = write.path;\n let relativePath;\n if (write.snap) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrite(relativePath, write.snap);\n } else if (writePath.contains(treeRoot)) {\n relativePath = Path.relativePath(writePath, treeRoot);\n compoundWrite = compoundWrite.addWrite(\n Path.Empty,\n write.snap.getChild(relativePath)\n );\n } else {\n // There is no overlap between root path and write path, ignore write\n }\n } else if (write.children) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrites(\n relativePath,\n write.children\n );\n } else if (writePath.contains(treeRoot)) {\n relativePath = Path.relativePath(writePath, treeRoot);\n if (relativePath.isEmpty()) {\n compoundWrite = compoundWrite.addWrites(\n Path.Empty,\n write.children\n );\n } else {\n const child = safeGet(write.children, relativePath.getFront());\n if (child) {\n // There exists a child in this node that matches the root path\n const deepNode = child.getChild(relativePath.popFront());\n compoundWrite = compoundWrite.addWrite(Path.Empty, deepNode);\n }\n }\n } else {\n // There is no overlap between root path and write path, ignore write\n }\n } else {\n throw assertionError('WriteRecord should have .snap or .children');\n }\n }\n }\n return compoundWrite;\n }\n}\n\n/**\n * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods\n * just proxy to the underlying WriteTree.\n *\n * @constructor\n */\nexport class WriteTreeRef {\n /**\n * The path to this particular write tree ref. Used for calling methods on writeTree_ while exposing a simpler\n * interface to callers.\n *\n * @type {!Path}\n * @private\n * @const\n */\n private readonly treePath_: Path;\n\n /**\n * * A reference to the actual tree of write data. All methods are pass-through to the tree, but with the appropriate\n * path prefixed.\n *\n * This lets us make cheap references to points in the tree for sync points without having to copy and maintain all of\n * the data.\n *\n * @type {!WriteTree}\n * @private\n * @const\n */\n private readonly writeTree_: WriteTree;\n\n /**\n * @param {!Path} path\n * @param {!WriteTree} writeTree\n */\n constructor(path: Path, writeTree: WriteTree) {\n this.treePath_ = path;\n this.writeTree_ = writeTree;\n }\n\n /**\n * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used\n * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node\n * can lead to a more expensive calculation.\n *\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude Optional writes to exclude.\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n calcCompleteEventCache(\n completeServerCache: Node | null,\n writeIdsToExclude?: number[],\n includeHiddenWrites?: boolean\n ): Node | null {\n return this.writeTree_.calcCompleteEventCache(\n this.treePath_,\n completeServerCache,\n writeIdsToExclude,\n includeHiddenWrites\n );\n }\n\n /**\n * If possible, returns a children node containing all of the complete children we have data for. The returned data is a\n * mix of the given server data and write data.\n *\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n calcCompleteEventChildren(completeServerChildren: ChildrenNode | null): ChildrenNode {\n return this.writeTree_.calcCompleteEventChildren(\n this.treePath_,\n completeServerChildren\n ) as ChildrenNode;\n }\n\n /**\n * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,\n * if anything, needs to be applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events should be raised\n *\n * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert\n *\n * @param {!Path} path\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n calcEventCacheAfterServerOverwrite(\n path: Path,\n existingEventSnap: Node | null,\n existingServerSnap: Node | null\n ): Node | null {\n return this.writeTree_.calcEventCacheAfterServerOverwrite(\n this.treePath_,\n path,\n existingEventSnap,\n existingServerSnap\n );\n }\n\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n shadowingWrite(path: Path): Node | null {\n return this.writeTree_.shadowingWrite(this.treePath_.child(path));\n }\n\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window\n *\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n calcIndexedSlice(\n completeServerData: Node | null,\n startPost: NamedNode,\n count: number,\n reverse: boolean,\n index: Index\n ): NamedNode[] {\n return this.writeTree_.calcIndexedSlice(\n this.treePath_,\n completeServerData,\n startPost,\n count,\n reverse,\n index\n );\n }\n\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!string} childKey\n * @param {!CacheNode} existingServerCache\n * @return {?Node}\n */\n calcCompleteChild(\n childKey: string,\n existingServerCache: CacheNode\n ): Node | null {\n return this.writeTree_.calcCompleteChild(\n this.treePath_,\n childKey,\n existingServerCache\n );\n }\n\n /**\n * Return a WriteTreeRef for a child.\n *\n * @param {string} childName\n * @return {!WriteTreeRef}\n */\n child(childName: string): WriteTreeRef {\n return new WriteTreeRef(this.treePath_.child(childName), this.writeTree_);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/WriteTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { errorForServerCode } from './util/util';\nimport { AckUserWrite } from './operation/AckUserWrite';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { forEach, safeGet } from '../../utils/obj';\nimport { ImmutableTree } from './util/ImmutableTree';\nimport { ListenComplete } from './operation/ListenComplete';\nimport { Merge } from './operation/Merge';\nimport { Operation, OperationSource } from './operation/Operation';\nimport { Overwrite } from './operation/Overwrite';\nimport { Path } from './util/Path';\nimport { SyncPoint } from './SyncPoint';\nimport { WriteTree, WriteTreeRef } from './WriteTree';\nimport { Query } from '../api/Query';\nimport { Node } from './snap/Node';\nimport { Event } from './view/Event';\nimport { EventRegistration } from './view/EventRegistration';\nimport { View } from './view/View';\n\n/**\n * @typedef {{\n * startListening: function(\n * !Query,\n * ?number,\n * function():string,\n * function(!string, *):!Array.\n * ):!Array.,\n *\n * stopListening: function(!Query, ?number)\n * }}\n */\nexport interface ListenProvider {\n startListening(\n query: Query,\n tag: number | null,\n hashFn: () => string,\n onComplete: (a: string, b?: any) => Event[]\n ): Event[];\n\n stopListening(a: Query, b: number | null): void;\n}\n\n/**\n * SyncTree is the central class for managing event callback registration, data caching, views\n * (query processing), and event generation. There are typically two SyncTree instances for\n * each Repo, one for the normal Firebase data, and one for the .info data.\n *\n * It has a number of responsibilities, including:\n * - Tracking all user event callbacks (registered via addEventRegistration() and removeEventRegistration()).\n * - Applying and caching data changes for user set(), transaction(), and update() calls\n * (applyUserOverwrite(), applyUserMerge()).\n * - Applying and caching data changes for server data changes (applyServerOverwrite(),\n * applyServerMerge()).\n * - Generating user-facing events for server and user changes (all of the apply* methods\n * return the set of events that need to be raised as a result).\n * - Maintaining the appropriate set of server listens to ensure we are always subscribed\n * to the correct set of paths and queries to satisfy the current set of user event\n * callbacks (listens are started/stopped using the provided listenProvider).\n *\n * NOTE: Although SyncTree tracks event callbacks and calculates events to raise, the actual\n * events are returned to the caller rather than raised synchronously.\n *\n * @constructor\n */\nexport class SyncTree {\n /**\n * Tree of SyncPoints. There's a SyncPoint at any location that has 1 or more views.\n * @type {!ImmutableTree.}\n * @private\n */\n private syncPointTree_: ImmutableTree = ImmutableTree.Empty;\n\n /**\n * A tree of all pending user writes (user-initiated set()'s, transaction()'s, update()'s, etc.).\n * @type {!WriteTree}\n * @private\n */\n private pendingWriteTree_ = new WriteTree();\n\n private tagToQueryMap_: { [k: string]: string } = {};\n private queryToTagMap_: { [k: string]: number } = {};\n\n /**\n * @param {!ListenProvider} listenProvider_ Used by SyncTree to start / stop listening\n * to server data.\n */\n constructor(private listenProvider_: ListenProvider) {}\n\n /**\n * Apply the data changes for a user-generated set() or transaction() call.\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @param {number} writeId\n * @param {boolean=} visible\n * @return {!Array.} Events to raise.\n */\n applyUserOverwrite(\n path: Path,\n newData: Node,\n writeId: number,\n visible?: boolean\n ): Event[] {\n // Record pending write.\n this.pendingWriteTree_.addOverwrite(path, newData, writeId, visible);\n\n if (!visible) {\n return [];\n } else {\n return this.applyOperationToSyncPoints_(\n new Overwrite(OperationSource.User, path, newData)\n );\n }\n }\n\n /**\n * Apply the data from a user-generated update() call\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n * @return {!Array.} Events to raise.\n */\n applyUserMerge(\n path: Path,\n changedChildren: { [k: string]: Node },\n writeId: number\n ): Event[] {\n // Record pending merge.\n this.pendingWriteTree_.addMerge(path, changedChildren, writeId);\n\n const changeTree = ImmutableTree.fromObject(changedChildren);\n\n return this.applyOperationToSyncPoints_(\n new Merge(OperationSource.User, path, changeTree)\n );\n }\n\n /**\n * Acknowledge a pending user write that was previously registered with applyUserOverwrite() or applyUserMerge().\n *\n * @param {!number} writeId\n * @param {boolean=} revert True if the given write failed and needs to be reverted\n * @return {!Array.} Events to raise.\n */\n ackUserWrite(writeId: number, revert: boolean = false) {\n const write = this.pendingWriteTree_.getWrite(writeId);\n const needToReevaluate = this.pendingWriteTree_.removeWrite(writeId);\n if (!needToReevaluate) {\n return [];\n } else {\n let affectedTree = ImmutableTree.Empty;\n if (write.snap != null) {\n // overwrite\n affectedTree = affectedTree.set(Path.Empty, true);\n } else {\n forEach(write.children, function(pathString: string, node: Node) {\n affectedTree = affectedTree.set(new Path(pathString), node);\n });\n }\n return this.applyOperationToSyncPoints_(\n new AckUserWrite(write.path, affectedTree, revert)\n );\n }\n }\n\n /**\n * Apply new server data for the specified path..\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @return {!Array.} Events to raise.\n */\n applyServerOverwrite(path: Path, newData: Node): Event[] {\n return this.applyOperationToSyncPoints_(\n new Overwrite(OperationSource.Server, path, newData)\n );\n }\n\n /**\n * Apply new server data to be merged in at the specified path.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @return {!Array.} Events to raise.\n */\n applyServerMerge(\n path: Path,\n changedChildren: { [k: string]: Node }\n ): Event[] {\n const changeTree = ImmutableTree.fromObject(changedChildren);\n\n return this.applyOperationToSyncPoints_(\n new Merge(OperationSource.Server, path, changeTree)\n );\n }\n\n /**\n * Apply a listen complete for a query\n *\n * @param {!Path} path\n * @return {!Array.} Events to raise.\n */\n applyListenComplete(path: Path): Event[] {\n return this.applyOperationToSyncPoints_(\n new ListenComplete(OperationSource.Server, path)\n );\n }\n\n /**\n * Apply new server data for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n applyTaggedQueryOverwrite(path: Path, snap: Node, tag: number): Event[] {\n const queryKey = this.queryKeyForTag_(tag);\n if (queryKey != null) {\n const r = SyncTree.parseQueryKey_(queryKey);\n const queryPath = r.path,\n queryId = r.queryId;\n const relativePath = Path.relativePath(queryPath, path);\n const op = new Overwrite(\n OperationSource.forServerTaggedQuery(queryId),\n relativePath,\n snap\n );\n return this.applyTaggedOperation_(queryPath, op);\n } else {\n // Query must have been removed already\n return [];\n }\n }\n\n /**\n * Apply server data to be merged in for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n applyTaggedQueryMerge(\n path: Path,\n changedChildren: { [k: string]: Node },\n tag: number\n ): Event[] {\n const queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n const r = SyncTree.parseQueryKey_(queryKey);\n const queryPath = r.path,\n queryId = r.queryId;\n const relativePath = Path.relativePath(queryPath, path);\n const changeTree = ImmutableTree.fromObject(changedChildren);\n const op = new Merge(\n OperationSource.forServerTaggedQuery(queryId),\n relativePath,\n changeTree\n );\n return this.applyTaggedOperation_(queryPath, op);\n } else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n }\n\n /**\n * Apply a listen complete for a tagged query\n *\n * @param {!Path} path\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n applyTaggedListenComplete(path: Path, tag: number): Event[] {\n const queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n const r = SyncTree.parseQueryKey_(queryKey);\n const queryPath = r.path,\n queryId = r.queryId;\n const relativePath = Path.relativePath(queryPath, path);\n const op = new ListenComplete(\n OperationSource.forServerTaggedQuery(queryId),\n relativePath\n );\n return this.applyTaggedOperation_(queryPath, op);\n } else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n }\n\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @return {!Array.} Events to raise.\n */\n addEventRegistration(\n query: Query,\n eventRegistration: EventRegistration\n ): Event[] {\n const path = query.path;\n\n let serverCache: Node | null = null;\n let foundAncestorDefaultView = false;\n // Any covering writes will necessarily be at the root, so really all we need to find is the server cache.\n // Consider optimizing this once there's a better understanding of what actual behavior will be.\n this.syncPointTree_.foreachOnPath(path, function(pathToSyncPoint, sp) {\n const relativePath = Path.relativePath(pathToSyncPoint, path);\n serverCache = serverCache || sp.getCompleteServerCache(relativePath);\n foundAncestorDefaultView =\n foundAncestorDefaultView || sp.hasCompleteView();\n });\n let syncPoint = this.syncPointTree_.get(path);\n if (!syncPoint) {\n syncPoint = new SyncPoint();\n this.syncPointTree_ = this.syncPointTree_.set(path, syncPoint);\n } else {\n foundAncestorDefaultView =\n foundAncestorDefaultView || syncPoint.hasCompleteView();\n serverCache = serverCache || syncPoint.getCompleteServerCache(Path.Empty);\n }\n\n let serverCacheComplete;\n if (serverCache != null) {\n serverCacheComplete = true;\n } else {\n serverCacheComplete = false;\n serverCache = ChildrenNode.EMPTY_NODE;\n const subtree = this.syncPointTree_.subtree(path);\n subtree.foreachChild(function(childName, childSyncPoint) {\n const completeCache = childSyncPoint.getCompleteServerCache(Path.Empty);\n if (completeCache) {\n serverCache = serverCache.updateImmediateChild(\n childName,\n completeCache\n );\n }\n });\n }\n\n const viewAlreadyExists = syncPoint.viewExistsForQuery(query);\n if (!viewAlreadyExists && !query.getQueryParams().loadsAllData()) {\n // We need to track a tag for this query\n const queryKey = SyncTree.makeQueryKey_(query);\n assert(\n !(queryKey in this.queryToTagMap_),\n 'View does not exist, but we have a tag'\n );\n const tag = SyncTree.getNextQueryTag_();\n this.queryToTagMap_[queryKey] = tag;\n // Coerce to string to avoid sparse arrays.\n this.tagToQueryMap_['_' + tag] = queryKey;\n }\n const writesCache = this.pendingWriteTree_.childWrites(path);\n let events = syncPoint.addEventRegistration(\n query,\n eventRegistration,\n writesCache,\n serverCache,\n serverCacheComplete\n );\n if (!viewAlreadyExists && !foundAncestorDefaultView) {\n const view /** @type !View */ = syncPoint.viewForQuery(query);\n events = events.concat(this.setupListener_(query, view));\n }\n return events;\n }\n\n /**\n * Remove event callback(s).\n *\n * If query is the default query, we'll check all queries for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified query/queries.\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, all callbacks are removed.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n removeEventRegistration(\n query: Query,\n eventRegistration: EventRegistration | null,\n cancelError?: Error\n ): Event[] {\n // Find the syncPoint first. Then deal with whether or not it has matching listeners\n const path = query.path;\n const maybeSyncPoint = this.syncPointTree_.get(path);\n let cancelEvents: Event[] = [];\n // A removal on a default query affects all queries at that location. A removal on an indexed query, even one without\n // other query constraints, does *not* affect all queries at that location. So this check must be for 'default', and\n // not loadsAllData().\n if (\n maybeSyncPoint &&\n (query.queryIdentifier() === 'default' ||\n maybeSyncPoint.viewExistsForQuery(query))\n ) {\n /**\n * @type {{removed: !Array., events: !Array.}}\n */\n const removedAndEvents = maybeSyncPoint.removeEventRegistration(\n query,\n eventRegistration,\n cancelError\n );\n if (maybeSyncPoint.isEmpty()) {\n this.syncPointTree_ = this.syncPointTree_.remove(path);\n }\n const removed = removedAndEvents.removed;\n cancelEvents = removedAndEvents.events;\n // We may have just removed one of many listeners and can short-circuit this whole process\n // We may also not have removed a default listener, in which case all of the descendant listeners should already be\n // properly set up.\n //\n // Since indexed queries can shadow if they don't have other query constraints, check for loadsAllData(), instead of\n // queryId === 'default'\n const removingDefault =\n -1 !==\n removed.findIndex(function(query) {\n return query.getQueryParams().loadsAllData();\n });\n const covered = this.syncPointTree_.findOnPath(path, function(\n relativePath,\n parentSyncPoint\n ) {\n return parentSyncPoint.hasCompleteView();\n });\n\n if (removingDefault && !covered) {\n const subtree = this.syncPointTree_.subtree(path);\n // There are potentially child listeners. Determine what if any listens we need to send before executing the\n // removal\n if (!subtree.isEmpty()) {\n // We need to fold over our subtree and collect the listeners to send\n const newViews = this.collectDistinctViewsForSubTree_(subtree);\n\n // Ok, we've collected all the listens we need. Set them up.\n for (let i = 0; i < newViews.length; ++i) {\n const view = newViews[i],\n newQuery = view.getQuery();\n const listener = this.createListenerForView_(view);\n this.listenProvider_.startListening(\n SyncTree.queryForListening_(newQuery),\n this.tagForQuery_(newQuery),\n listener.hashFn,\n listener.onComplete\n );\n }\n } else {\n // There's nothing below us, so nothing we need to start listening on\n }\n }\n // If we removed anything and we're not covered by a higher up listen, we need to stop listening on this query\n // The above block has us covered in terms of making sure we're set up on listens lower in the tree.\n // Also, note that if we have a cancelError, it's already been removed at the provider level.\n if (!covered && removed.length > 0 && !cancelError) {\n // If we removed a default, then we weren't listening on any of the other queries here. Just cancel the one\n // default. Otherwise, we need to iterate through and cancel each individual query\n if (removingDefault) {\n // We don't tag default listeners\n const defaultTag: number | null = null;\n this.listenProvider_.stopListening(\n SyncTree.queryForListening_(query),\n defaultTag\n );\n } else {\n removed.forEach((queryToRemove: Query) => {\n const tagToRemove = this.queryToTagMap_[\n SyncTree.makeQueryKey_(queryToRemove)\n ];\n this.listenProvider_.stopListening(\n SyncTree.queryForListening_(queryToRemove),\n tagToRemove\n );\n });\n }\n }\n // Now, clear all of the tags we're tracking for the removed listens\n this.removeTags_(removed);\n } else {\n // No-op, this listener must've been already removed\n }\n return cancelEvents;\n }\n\n /**\n * Returns a complete cache, if we have one, of the data at a particular path. The location must have a listener above\n * it, but as this is only used by transaction code, that should always be the case anyways.\n *\n * Note: this method will *include* hidden writes from transaction with applyLocally set to false.\n * @param {!Path} path The path to the data we want\n * @param {Array.=} writeIdsToExclude A specific set to be excluded\n * @return {?Node}\n */\n calcCompleteEventCache(\n path: Path,\n writeIdsToExclude?: number[]\n ): Node | null {\n const includeHiddenSets = true;\n const writeTree = this.pendingWriteTree_;\n const serverCache = this.syncPointTree_.findOnPath(path, function(\n pathSoFar,\n syncPoint\n ) {\n const relativePath = Path.relativePath(pathSoFar, path);\n const serverCache = syncPoint.getCompleteServerCache(relativePath);\n if (serverCache) {\n return serverCache;\n }\n });\n return writeTree.calcCompleteEventCache(\n path,\n serverCache,\n writeIdsToExclude,\n includeHiddenSets\n );\n }\n\n /**\n * This collapses multiple unfiltered views into a single view, since we only need a single\n * listener for them.\n *\n * @param {!ImmutableTree.} subtree\n * @return {!Array.}\n * @private\n */\n private collectDistinctViewsForSubTree_(\n subtree: ImmutableTree\n ): View[] {\n return subtree.fold<\n View[]\n >((relativePath, maybeChildSyncPoint, childMap) => {\n if (maybeChildSyncPoint && maybeChildSyncPoint.hasCompleteView()) {\n const completeView = maybeChildSyncPoint.getCompleteView();\n return [completeView];\n } else {\n // No complete view here, flatten any deeper listens into an array\n let views: View[] = [];\n if (maybeChildSyncPoint) {\n views = maybeChildSyncPoint.getQueryViews();\n }\n forEach(childMap, function(key: string, childViews: View[]) {\n views = views.concat(childViews);\n });\n return views;\n }\n });\n }\n\n /**\n * @param {!Array.} queries\n * @private\n */\n private removeTags_(queries: Query[]) {\n for (let j = 0; j < queries.length; ++j) {\n const removedQuery = queries[j];\n if (!removedQuery.getQueryParams().loadsAllData()) {\n // We should have a tag for this\n const removedQueryKey = SyncTree.makeQueryKey_(removedQuery);\n const removedQueryTag = this.queryToTagMap_[removedQueryKey];\n delete this.queryToTagMap_[removedQueryKey];\n delete this.tagToQueryMap_['_' + removedQueryTag];\n }\n }\n }\n\n /**\n * Normalizes a query to a query we send the server for listening\n * @param {!Query} query\n * @return {!Query} The normalized query\n * @private\n */\n private static queryForListening_(query: Query): Query {\n if (\n query.getQueryParams().loadsAllData() &&\n !query.getQueryParams().isDefault()\n ) {\n // We treat queries that load all data as default queries\n // Cast is necessary because ref() technically returns Firebase which is actually fb.api.Firebase which inherits\n // from Query\n return /** @type {!Query} */ query.getRef();\n } else {\n return query;\n }\n }\n\n /**\n * For a given new listen, manage the de-duplication of outstanding subscriptions.\n *\n * @param {!Query} query\n * @param {!View} view\n * @return {!Array.} This method can return events to support synchronous data sources\n * @private\n */\n private setupListener_(query: Query, view: View): Event[] {\n const path = query.path;\n const tag = this.tagForQuery_(query);\n const listener = this.createListenerForView_(view);\n\n const events = this.listenProvider_.startListening(\n SyncTree.queryForListening_(query),\n tag,\n listener.hashFn,\n listener.onComplete\n );\n\n const subtree = this.syncPointTree_.subtree(path);\n // The root of this subtree has our query. We're here because we definitely need to send a listen for that, but we\n // may need to shadow other listens as well.\n if (tag) {\n assert(\n !subtree.value.hasCompleteView(),\n \"If we're adding a query, it shouldn't be shadowed\"\n );\n } else {\n // Shadow everything at or below this location, this is a default listener.\n const queriesToStop = subtree.fold(function(\n relativePath,\n maybeChildSyncPoint,\n childMap\n ) {\n if (\n !relativePath.isEmpty() &&\n maybeChildSyncPoint &&\n maybeChildSyncPoint.hasCompleteView()\n ) {\n return [maybeChildSyncPoint.getCompleteView().getQuery()];\n } else {\n // No default listener here, flatten any deeper queries into an array\n let queries: Query[] = [];\n if (maybeChildSyncPoint) {\n queries = queries.concat(\n maybeChildSyncPoint.getQueryViews().map(view => view.getQuery())\n );\n }\n forEach(childMap, function(key: string, childQueries: Query[]) {\n queries = queries.concat(childQueries);\n });\n return queries;\n }\n });\n for (let i = 0; i < queriesToStop.length; ++i) {\n const queryToStop = queriesToStop[i];\n this.listenProvider_.stopListening(\n SyncTree.queryForListening_(queryToStop),\n this.tagForQuery_(queryToStop)\n );\n }\n }\n return events;\n }\n\n /**\n *\n * @param {!View} view\n * @return {{hashFn: function(), onComplete: function(!string, *)}}\n * @private\n */\n private createListenerForView_(\n view: View\n ): { hashFn(): string; onComplete(a: string, b?: any): Event[] } {\n const query = view.getQuery();\n const tag = this.tagForQuery_(query);\n\n return {\n hashFn: () => {\n const cache = view.getServerCache() || ChildrenNode.EMPTY_NODE;\n return cache.hash();\n },\n onComplete: (status: string): Event[] => {\n if (status === 'ok') {\n if (tag) {\n return this.applyTaggedListenComplete(query.path, tag);\n } else {\n return this.applyListenComplete(query.path);\n }\n } else {\n // If a listen failed, kill all of the listeners here, not just the one that triggered the error.\n // Note that this may need to be scoped to just this listener if we change permissions on filtered children\n const error = errorForServerCode(status, query);\n return this.removeEventRegistration(\n query,\n /*eventRegistration*/ null,\n error\n );\n }\n }\n };\n }\n\n /**\n * Given a query, computes a \"queryKey\" suitable for use in our queryToTagMap_.\n * @private\n * @param {!Query} query\n * @return {string}\n */\n private static makeQueryKey_(query: Query): string {\n return query.path.toString() + '$' + query.queryIdentifier();\n }\n\n /**\n * Given a queryKey (created by makeQueryKey), parse it back into a path and queryId.\n * @private\n * @param {!string} queryKey\n * @return {{queryId: !string, path: !Path}}\n */\n private static parseQueryKey_(\n queryKey: string\n ): { queryId: string; path: Path } {\n const splitIndex = queryKey.indexOf('$');\n assert(\n splitIndex !== -1 && splitIndex < queryKey.length - 1,\n 'Bad queryKey.'\n );\n return {\n queryId: queryKey.substr(splitIndex + 1),\n path: new Path(queryKey.substr(0, splitIndex))\n };\n }\n\n /**\n * Return the query associated with the given tag, if we have one\n * @param {!number} tag\n * @return {?string}\n * @private\n */\n private queryKeyForTag_(tag: number): string | null {\n return this.tagToQueryMap_['_' + tag];\n }\n\n /**\n * Return the tag associated with the given query.\n * @param {!Query} query\n * @return {?number}\n * @private\n */\n private tagForQuery_(query: Query): number | null {\n const queryKey = SyncTree.makeQueryKey_(query);\n return safeGet(this.queryToTagMap_, queryKey);\n }\n\n /**\n * Static tracker for next query tag.\n * @type {number}\n * @private\n */\n private static nextQueryTag_ = 1;\n\n /**\n * Static accessor for query tags.\n * @return {number}\n * @private\n */\n private static getNextQueryTag_(): number {\n return SyncTree.nextQueryTag_++;\n }\n\n /**\n * A helper method to apply tagged operations\n *\n * @param {!Path} queryPath\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n private applyTaggedOperation_(\n queryPath: Path,\n operation: Operation\n ): Event[] {\n const syncPoint = this.syncPointTree_.get(queryPath);\n assert(syncPoint, \"Missing sync point for query tag that we're tracking\");\n const writesCache = this.pendingWriteTree_.childWrites(queryPath);\n return syncPoint.applyOperation(\n operation,\n writesCache,\n /*serverCache=*/ null\n );\n }\n\n /**\n * A helper method that visits all descendant and ancestor SyncPoints, applying the operation.\n *\n * NOTES:\n * - Descendant SyncPoints will be visited first (since we raise events depth-first).\n\n * - We call applyOperation() on each SyncPoint passing three things:\n * 1. A version of the Operation that has been made relative to the SyncPoint location.\n * 2. A WriteTreeRef of any writes we have cached at the SyncPoint location.\n * 3. A snapshot Node with cached server data, if we have it.\n\n * - We concatenate all of the events returned by each SyncPoint and return the result.\n *\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n private applyOperationToSyncPoints_(operation: Operation): Event[] {\n return this.applyOperationHelper_(\n operation,\n this.syncPointTree_,\n /*serverCache=*/ null,\n this.pendingWriteTree_.childWrites(Path.Empty)\n );\n }\n\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n private applyOperationHelper_(\n operation: Operation,\n syncPointTree: ImmutableTree,\n serverCache: Node | null,\n writesCache: WriteTreeRef\n ): Event[] {\n if (operation.path.isEmpty()) {\n return this.applyOperationDescendantsHelper_(\n operation,\n syncPointTree,\n serverCache,\n writesCache\n );\n } else {\n const syncPoint = syncPointTree.get(Path.Empty);\n\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path.Empty);\n }\n\n let events: Event[] = [];\n const childName = operation.path.getFront();\n const childOperation = operation.operationForChild(childName);\n const childTree = syncPointTree.children.get(childName);\n if (childTree && childOperation) {\n const childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n const childWritesCache = writesCache.child(childName);\n events = events.concat(\n this.applyOperationHelper_(\n childOperation,\n childTree,\n childServerCache,\n childWritesCache\n )\n );\n }\n\n if (syncPoint) {\n events = events.concat(\n syncPoint.applyOperation(operation, writesCache, serverCache)\n );\n }\n\n return events;\n }\n }\n\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n private applyOperationDescendantsHelper_(\n operation: Operation,\n syncPointTree: ImmutableTree,\n serverCache: Node | null,\n writesCache: WriteTreeRef\n ): Event[] {\n const syncPoint = syncPointTree.get(Path.Empty);\n\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path.Empty);\n }\n\n let events: Event[] = [];\n syncPointTree.children.inorderTraversal((childName, childTree) => {\n const childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n const childWritesCache = writesCache.child(childName);\n const childOperation = operation.operationForChild(childName);\n if (childOperation) {\n events = events.concat(\n this.applyOperationDescendantsHelper_(\n childOperation,\n childTree,\n childServerCache,\n childWritesCache\n )\n );\n }\n });\n\n if (syncPoint) {\n events = events.concat(\n syncPoint.applyOperation(operation, writesCache, serverCache)\n );\n }\n\n return events;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SyncTree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { Path } from './util/Path';\nimport { Node } from './snap/Node';\n\n/**\n * Mutable object which basically just stores a reference to the \"latest\" immutable snapshot.\n *\n * @constructor\n */\nexport class SnapshotHolder {\n private rootNode_: Node = ChildrenNode.EMPTY_NODE;\n\n getNode(path: Path): Node {\n return this.rootNode_.getChild(path);\n }\n\n updateSnapshot(path: Path, newSnapshotNode: Node) {\n this.rootNode_ = this.rootNode_.updateChild(path, newSnapshotNode);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/SnapshotHolder.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { log, warn } from './util/util';\nimport { FirebaseApp, FirebaseAuthTokenData } from '../../app/firebase_app';\n\n/**\n * Abstraction around FirebaseApp's token fetching capabilities.\n */\nexport class AuthTokenProvider {\n /**\n * @param {!FirebaseApp} app_\n */\n constructor(private app_: FirebaseApp) {}\n\n /**\n * @param {boolean} forceRefresh\n * @return {!Promise}\n */\n getToken(forceRefresh: boolean): Promise {\n return this.app_['INTERNAL']['getToken'](forceRefresh).then(\n null,\n // .catch\n function(error) {\n // TODO: Need to figure out all the cases this is raised and whether\n // this makes sense.\n if (error && error.code === 'auth/token-not-initialized') {\n log('Got auth/token-not-initialized error. Treating as null token.');\n return null;\n } else {\n return Promise.reject(error);\n }\n }\n );\n }\n\n addTokenChangeListener(listener: (token: string | null) => void) {\n // TODO: We might want to wrap the listener and call it with no args to\n // avoid a leaky abstraction, but that makes removing the listener harder.\n this.app_['INTERNAL']['addAuthTokenListener'](listener);\n }\n\n removeTokenChangeListener(listener: (token: string | null) => void) {\n this.app_['INTERNAL']['removeAuthTokenListener'](listener);\n }\n\n notifyForInvalidToken() {\n let errorMessage =\n 'Provided authentication credentials for the app named \"' +\n this.app_.name +\n '\" are invalid. This usually indicates your app was not ' +\n 'initialized correctly. ';\n if ('credential' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"credential\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n } else if ('serviceAccount' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"serviceAccount\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n } else {\n errorMessage +=\n 'Make sure the \"apiKey\" and \"databaseURL\" properties provided to ' +\n 'initializeApp() match the values provided for your app at ' +\n 'https://console.firebase.google.com/.';\n }\n warn(errorMessage);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/AuthTokenProvider.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { clone, forEach } from '../../../utils/obj';\nimport { StatsCollection } from './StatsCollection';\n\n/**\n * Returns the delta from the previous call to get stats.\n *\n * @param collection_ The collection to \"listen\" to.\n * @constructor\n */\nexport class StatsListener {\n private last_: { [k: string]: number } | null = null;\n\n constructor(private collection_: StatsCollection) {}\n\n get(): { [k: string]: number } {\n const newStats = this.collection_.get();\n\n const delta: typeof newStats = clone(newStats);\n if (this.last_) {\n forEach(this.last_, (stat: string, value: number) => {\n delta[stat] = delta[stat] - value;\n });\n }\n this.last_ = newStats;\n\n return delta;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsListener.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { contains, forEach } from '../../../utils/obj';\nimport { setTimeoutNonBlocking } from '../util/util';\nimport { StatsListener } from './StatsListener';\nimport { StatsCollection } from './StatsCollection';\nimport { ServerActions } from '../ServerActions';\n\n// Assuming some apps may have a short amount of time on page, and a bulk of firebase operations probably\n// happen on page load, we try to report our first set of stats pretty quickly, but we wait at least 10\n// seconds to try to ensure the Firebase connection is established / settled.\nconst FIRST_STATS_MIN_TIME = 10 * 1000;\nconst FIRST_STATS_MAX_TIME = 30 * 1000;\n\n// We'll continue to report stats on average every 5 minutes.\nconst REPORT_STATS_INTERVAL = 5 * 60 * 1000;\n\n/**\n * @constructor\n */\nexport class StatsReporter {\n private statsListener_: StatsListener;\n private statsToReport_: { [k: string]: boolean } = {};\n\n /**\n * @param collection\n * @param server_\n */\n constructor(collection: StatsCollection, private server_: ServerActions) {\n this.statsListener_ = new StatsListener(collection);\n\n const timeout =\n FIRST_STATS_MIN_TIME +\n (FIRST_STATS_MAX_TIME - FIRST_STATS_MIN_TIME) * Math.random();\n setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(timeout));\n }\n\n includeStat(stat: string) {\n this.statsToReport_[stat] = true;\n }\n\n private reportStats_() {\n const stats = this.statsListener_.get();\n const reportedStats: typeof stats = {};\n let haveStatsToReport = false;\n\n forEach(stats, (stat: string, value: number) => {\n if (value > 0 && contains(this.statsToReport_, stat)) {\n reportedStats[stat] = value;\n haveStatsToReport = true;\n }\n });\n\n if (haveStatsToReport) {\n this.server_.reportStats(reportedStats);\n }\n\n // queue our next run.\n setTimeoutNonBlocking(\n this.reportStats_.bind(this),\n Math.floor(Math.random() * 2 * REPORT_STATS_INTERVAL)\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/stats/StatsReporter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Path } from '../util/Path';\nimport { log, logger, exceptionGuard } from '../util/util';\nimport { Event } from './Event';\n\n/**\n * The event queue serves a few purposes:\n * 1. It ensures we maintain event order in the face of event callbacks doing operations that result in more\n * events being queued.\n * 2. raiseQueuedEvents() handles being called reentrantly nicely. That is, if in the course of raising events,\n * raiseQueuedEvents() is called again, the \"inner\" call will pick up raising events where the \"outer\" call\n * left off, ensuring that the events are still raised synchronously and in order.\n * 3. You can use raiseEventsAtPath and raiseEventsForChangedPath to ensure only relevant previously-queued\n * events are raised synchronously.\n *\n * NOTE: This can all go away if/when we move to async events.\n *\n * @constructor\n */\nexport class EventQueue {\n /**\n * @private\n * @type {!Array.}\n */\n private eventLists_: EventList[] = [];\n\n /**\n * Tracks recursion depth of raiseQueuedEvents_, for debugging purposes.\n * @private\n * @type {!number}\n */\n private recursionDepth_ = 0;\n\n /**\n * @param {!Array.} eventDataList The new events to queue.\n */\n queueEvents(eventDataList: Event[]) {\n // We group events by path, storing them in a single EventList, to make it easier to skip over them quickly.\n let currList = null;\n for (let i = 0; i < eventDataList.length; i++) {\n const eventData = eventDataList[i];\n const eventPath = eventData.getPath();\n if (currList !== null && !eventPath.equals(currList.getPath())) {\n this.eventLists_.push(currList);\n currList = null;\n }\n\n if (currList === null) {\n currList = new EventList(eventPath);\n }\n\n currList.add(eventData);\n }\n if (currList) {\n this.eventLists_.push(currList);\n }\n }\n\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones)\n * for the specified path.\n *\n * It is assumed that the new events are all for the specified path.\n *\n * @param {!Path} path The path to raise events for.\n * @param {!Array.} eventDataList The new events to raise.\n */\n raiseEventsAtPath(path: Path, eventDataList: Event[]) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_((eventPath: Path) =>\n eventPath.equals(path)\n );\n }\n\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones) for\n * locations related to the specified change path (i.e. all ancestors and descendants).\n *\n * It is assumed that the new events are all related (ancestor or descendant) to the specified path.\n *\n * @param {!Path} changedPath The path to raise events for.\n * @param {!Array.} eventDataList The events to raise\n */\n raiseEventsForChangedPath(changedPath: Path, eventDataList: Event[]) {\n this.queueEvents(eventDataList);\n\n this.raiseQueuedEventsMatchingPredicate_((eventPath: Path) => {\n return eventPath.contains(changedPath) || changedPath.contains(eventPath);\n });\n }\n\n /**\n * @param {!function(!Path):boolean} predicate\n * @private\n */\n private raiseQueuedEventsMatchingPredicate_(\n predicate: (path: Path) => boolean\n ) {\n this.recursionDepth_++;\n\n let sentAll = true;\n for (let i = 0; i < this.eventLists_.length; i++) {\n const eventList = this.eventLists_[i];\n if (eventList) {\n const eventPath = eventList.getPath();\n if (predicate(eventPath)) {\n this.eventLists_[i].raise();\n this.eventLists_[i] = null;\n } else {\n sentAll = false;\n }\n }\n }\n\n if (sentAll) {\n this.eventLists_ = [];\n }\n\n this.recursionDepth_--;\n }\n}\n\n/**\n * @param {!Path} path\n * @constructor\n */\nexport class EventList {\n /**\n * @type {!Array.}\n * @private\n */\n private events_: Event[] = [];\n\n constructor(private readonly path_: Path) {}\n\n /**\n * @param {!Event} eventData\n */\n add(eventData: Event) {\n this.events_.push(eventData);\n }\n\n /**\n * Iterates through the list and raises each event\n */\n raise() {\n for (let i = 0; i < this.events_.length; i++) {\n const eventData = this.events_[i];\n if (eventData !== null) {\n this.events_[i] = null;\n const eventFn = eventData.getEventRunner();\n if (logger) {\n log('event: ' + eventData.toString());\n }\n exceptionGuard(eventFn);\n }\n }\n }\n\n /**\n * @return {!Path}\n */\n getPath(): Path {\n return this.path_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/EventQueue.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\n\n/**\n * Base class to be used if you want to emit events. Call the constructor with\n * the set of allowed event names.\n */\nexport abstract class EventEmitter {\n private listeners_: {\n [eventType: string]: Array<{\n callback(...args: any[]): void;\n context: any;\n }>;\n } = {};\n\n /**\n * @param {!Array.} allowedEvents_\n */\n constructor(private allowedEvents_: Array) {\n assert(\n Array.isArray(allowedEvents_) && allowedEvents_.length > 0,\n 'Requires a non-empty array'\n );\n }\n\n /**\n * To be overridden by derived classes in order to fire an initial event when\n * somebody subscribes for data.\n *\n * @param {!string} eventType\n * @return {Array.<*>} Array of parameters to trigger initial event with.\n */\n abstract getInitialEvent(eventType: string): any[];\n\n /**\n * To be called by derived classes to trigger events.\n * @param {!string} eventType\n * @param {...*} var_args\n */\n protected trigger(eventType: string, ...var_args: any[]) {\n if (Array.isArray(this.listeners_[eventType])) {\n // Clone the list, since callbacks could add/remove listeners.\n const listeners = [...this.listeners_[eventType]];\n\n for (let i = 0; i < listeners.length; i++) {\n listeners[i].callback.apply(listeners[i].context, var_args);\n }\n }\n }\n\n on(eventType: string, callback: (a: any) => void, context: any) {\n this.validateEventType_(eventType);\n this.listeners_[eventType] = this.listeners_[eventType] || [];\n this.listeners_[eventType].push({ callback, context });\n\n const eventData = this.getInitialEvent(eventType);\n if (eventData) {\n callback.apply(context, eventData);\n }\n }\n\n off(eventType: string, callback: (a: any) => void, context: any) {\n this.validateEventType_(eventType);\n const listeners = this.listeners_[eventType] || [];\n for (let i = 0; i < listeners.length; i++) {\n if (\n listeners[i].callback === callback &&\n (!context || context === listeners[i].context)\n ) {\n listeners.splice(i, 1);\n return;\n }\n }\n }\n\n private validateEventType_(eventType: string) {\n assert(\n this.allowedEvents_.find(function(et) {\n return et === eventType;\n }),\n 'Unknown event: ' + eventType\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/EventEmitter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { EventEmitter } from './EventEmitter';\nimport { assert } from '../../../utils/assert';\n\ndeclare const document: any;\n\n/**\n * @extends {EventEmitter}\n */\nexport class VisibilityMonitor extends EventEmitter {\n private visible_: boolean;\n\n static getInstance() {\n return new VisibilityMonitor();\n }\n\n constructor() {\n super(['visible']);\n let hidden: string;\n let visibilityChange: string;\n if (\n typeof document !== 'undefined' &&\n typeof document.addEventListener !== 'undefined'\n ) {\n if (typeof document['hidden'] !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n visibilityChange = 'visibilitychange';\n hidden = 'hidden';\n } else if (typeof document['mozHidden'] !== 'undefined') {\n visibilityChange = 'mozvisibilitychange';\n hidden = 'mozHidden';\n } else if (typeof document['msHidden'] !== 'undefined') {\n visibilityChange = 'msvisibilitychange';\n hidden = 'msHidden';\n } else if (typeof document['webkitHidden'] !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange';\n hidden = 'webkitHidden';\n }\n }\n\n // Initially, we always assume we are visible. This ensures that in browsers\n // without page visibility support or in cases where we are never visible\n // (e.g. chrome extension), we act as if we are visible, i.e. don't delay\n // reconnects\n this.visible_ = true;\n\n if (visibilityChange) {\n document.addEventListener(\n visibilityChange,\n () => {\n const visible = !document[hidden];\n if (visible !== this.visible_) {\n this.visible_ = visible;\n this.trigger('visible', visible);\n }\n },\n false\n );\n }\n }\n\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n getInitialEvent(eventType: string): boolean[] {\n assert(eventType === 'visible', 'Unknown event type: ' + eventType);\n return [this.visible_];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/VisibilityMonitor.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { EventEmitter } from './EventEmitter';\nimport { isMobileCordova } from '../../../utils/environment';\n\n/**\n * Monitors online state (as reported by window.online/offline events).\n *\n * The expectation is that this could have many false positives (thinks we are online\n * when we're not), but no false negatives. So we can safely use it to determine when\n * we definitely cannot reach the internet.\n *\n * @extends {EventEmitter}\n */\nexport class OnlineMonitor extends EventEmitter {\n private online_ = true;\n\n static getInstance() {\n return new OnlineMonitor();\n }\n\n constructor() {\n super(['online']);\n\n // We've had repeated complaints that Cordova apps can get stuck \"offline\", e.g.\n // https://forum.ionicframework.com/t/firebase-connection-is-lost-and-never-come-back/43810\n // It would seem that the 'online' event does not always fire consistently. So we disable it\n // for Cordova.\n if (\n typeof window !== 'undefined' &&\n typeof window.addEventListener !== 'undefined' &&\n !isMobileCordova()\n ) {\n window.addEventListener(\n 'online',\n () => {\n if (!this.online_) {\n this.online_ = true;\n this.trigger('online', true);\n }\n },\n false\n );\n\n window.addEventListener(\n 'offline',\n () => {\n if (this.online_) {\n this.online_ = false;\n this.trigger('online', false);\n }\n },\n false\n );\n }\n }\n\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n getInitialEvent(eventType: string): boolean[] {\n assert(eventType === 'online', 'Unknown event type: ' + eventType);\n return [this.online_];\n }\n\n /**\n * @return {boolean}\n */\n currentlyOnline(): boolean {\n return this.online_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/OnlineMonitor.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { base64Decode } from '../database/core/util/util';\nimport { jsonEval } from './json';\n\n/**\n * Decodes a Firebase auth. token into constituent parts.\n *\n * Notes:\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {{header: *, claims: *, data: *, signature: string}}\n */\nexport const decode = function(token) {\n var header = {},\n claims = {},\n data = {},\n signature = '';\n\n try {\n var parts = token.split('.');\n header = jsonEval(base64Decode(parts[0]) || '');\n claims = jsonEval(base64Decode(parts[1]) || '');\n signature = parts[2];\n data = claims['d'] || {};\n delete claims['d'];\n } catch (e) {}\n\n return {\n header: header,\n claims: claims,\n data: data,\n signature: signature\n };\n};\n\n/**\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {boolean}\n */\nexport const isValidTimestamp = function(token) {\n var claims = decode(token).claims,\n now = Math.floor(new Date().getTime() / 1000),\n validSince,\n validUntil;\n\n if (typeof claims === 'object') {\n if (claims.hasOwnProperty('nbf')) {\n validSince = claims['nbf'];\n } else if (claims.hasOwnProperty('iat')) {\n validSince = claims['iat'];\n }\n\n if (claims.hasOwnProperty('exp')) {\n validUntil = claims['exp'];\n } else {\n // token will expire after 24h by default\n validUntil = validSince + 86400;\n }\n }\n\n return (\n now && validSince && validUntil && now >= validSince && now <= validUntil\n );\n};\n\n/**\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\n *\n * Notes:\n * - May return null if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {?number}\n */\nexport const issuedAtTime = function(token) {\n var claims = decode(token).claims;\n if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\n return claims['iat'];\n }\n return null;\n};\n\n/**\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time and non-empty\n * signature.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {boolean}\n */\nexport const isValidFormat = function(token) {\n var decoded = decode(token),\n claims = decoded.claims;\n\n return (\n !!decoded.signature &&\n !!claims &&\n typeof claims === 'object' &&\n claims.hasOwnProperty('iat')\n );\n};\n\n/**\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\n *\n * Notes:\n * - May return a false negative if there's no native base64 decoding support.\n * - Doesn't check if the token is actually valid.\n *\n * @param {?string} token\n * @return {boolean}\n */\nexport const isAdmin = function(token) {\n var claims = decode(token).claims;\n return typeof claims === 'object' && claims['admin'] === true;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/jwt.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { exceptionGuard } from '../../core/util/util';\n\n/**\n * This class ensures the packets from the server arrive in order\n * This class takes data from the server and ensures it gets passed into the callbacks in order.\n * @constructor\n */\nexport class PacketReceiver {\n pendingResponses: any[] = [];\n currentResponseNum = 0;\n closeAfterResponse = -1;\n onClose: (() => void) | null = null;\n\n /**\n * @param onMessage_\n */\n constructor(private onMessage_: (a: Object) => void) {}\n\n closeAfter(responseNum: number, callback: () => void) {\n this.closeAfterResponse = responseNum;\n this.onClose = callback;\n if (this.closeAfterResponse < this.currentResponseNum) {\n this.onClose();\n this.onClose = null;\n }\n }\n\n /**\n * Each message from the server comes with a response number, and an array of data. The responseNumber\n * allows us to ensure that we process them in the right order, since we can't be guaranteed that all\n * browsers will respond in the same order as the requests we sent\n * @param {number} requestNum\n * @param {Array} data\n */\n handleResponse(requestNum: number, data: any[]) {\n this.pendingResponses[requestNum] = data;\n while (this.pendingResponses[this.currentResponseNum]) {\n const toProcess = this.pendingResponses[this.currentResponseNum];\n delete this.pendingResponses[this.currentResponseNum];\n for (let i = 0; i < toProcess.length; ++i) {\n if (toProcess[i]) {\n exceptionGuard(() => {\n this.onMessage_(toProcess[i]);\n });\n }\n }\n if (this.currentResponseNum === this.closeAfterResponse) {\n if (this.onClose) {\n this.onClose();\n this.onClose = null;\n }\n break;\n }\n this.currentResponseNum++;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/polling/PacketReceiver.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport {\n base64Encode,\n executeWhenDOMReady,\n isChromeExtensionContentScript,\n isWindowsStoreApp,\n log,\n logWrapper,\n LUIDGenerator,\n splitStringBySize\n} from '../core/util/util';\nimport { CountedSet } from '../core/util/CountedSet';\nimport { StatsManager } from '../core/stats/StatsManager';\nimport { PacketReceiver } from './polling/PacketReceiver';\nimport {\n FORGE_DOMAIN,\n FORGE_REF,\n LAST_SESSION_PARAM,\n LONG_POLLING,\n PROTOCOL_VERSION,\n REFERER_PARAM,\n TRANSPORT_SESSION_PARAM,\n VERSION_PARAM\n} from './Constants';\nimport { stringify } from '../../utils/json';\nimport { isNodeSdk } from '../../utils/environment';\nimport { Transport } from './Transport';\nimport { RepoInfo } from '../core/RepoInfo';\nimport { StatsCollection } from '../core/stats/StatsCollection';\n\n// URL query parameters associated with longpolling\nexport const FIREBASE_LONGPOLL_START_PARAM = 'start';\nexport const FIREBASE_LONGPOLL_CLOSE_COMMAND = 'close';\nexport const FIREBASE_LONGPOLL_COMMAND_CB_NAME = 'pLPCommand';\nexport const FIREBASE_LONGPOLL_DATA_CB_NAME = 'pRTLPCB';\nexport const FIREBASE_LONGPOLL_ID_PARAM = 'id';\nexport const FIREBASE_LONGPOLL_PW_PARAM = 'pw';\nexport const FIREBASE_LONGPOLL_SERIAL_PARAM = 'ser';\nexport const FIREBASE_LONGPOLL_CALLBACK_ID_PARAM = 'cb';\nexport const FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM = 'seg';\nexport const FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET = 'ts';\nexport const FIREBASE_LONGPOLL_DATA_PARAM = 'd';\nexport const FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM = 'disconn';\nexport const FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM = 'dframe';\n\n//Data size constants.\n//TODO: Perf: the maximum length actually differs from browser to browser.\n// We should check what browser we're on and set accordingly.\nconst MAX_URL_DATA_SIZE = 1870;\nconst SEG_HEADER_SIZE = 30; //ie: &seg=8299234&ts=982389123&d=\nconst MAX_PAYLOAD_SIZE = MAX_URL_DATA_SIZE - SEG_HEADER_SIZE;\n\n/**\n * Keepalive period\n * send a fresh request at minimum every 25 seconds. Opera has a maximum request\n * length of 30 seconds that we can't exceed.\n * @const\n * @type {number}\n */\nconst KEEPALIVE_REQUEST_INTERVAL = 25000;\n\n/**\n * How long to wait before aborting a long-polling connection attempt.\n * @const\n * @type {number}\n */\nconst LP_CONNECT_TIMEOUT = 30000;\n\n/**\n * This class manages a single long-polling connection.\n *\n * @constructor\n * @implements {Transport}\n */\nexport class BrowserPollConnection implements Transport {\n bytesSent = 0;\n bytesReceived = 0;\n urlFn: (params: object) => string;\n scriptTagHolder: FirebaseIFrameScriptHolder;\n myDisconnFrame: HTMLIFrameElement;\n curSegmentNum: number;\n myPacketOrderer: PacketReceiver;\n id: string;\n password: string;\n private log_: (...a: any[]) => void;\n private stats_: StatsCollection;\n private everConnected_ = false;\n private isClosed_: boolean;\n private connectTimeoutTimer_: number | null;\n private onDisconnect_: ((a?: boolean) => void) | null;\n\n /**\n * @param {string} connId An identifier for this connection, used for logging\n * @param {RepoInfo} repoInfo The info for the endpoint to send data to.\n * @param {string=} transportSessionId Optional transportSessionid if we are reconnecting for an existing\n * transport session\n * @param {string=} lastSessionId Optional lastSessionId if the PersistentConnection has already created a\n * connection previously\n */\n constructor(\n public connId: string,\n public repoInfo: RepoInfo,\n public transportSessionId?: string,\n public lastSessionId?: string\n ) {\n this.log_ = logWrapper(connId);\n this.stats_ = StatsManager.getCollection(repoInfo);\n this.urlFn = (params: { [k: string]: string }) =>\n repoInfo.connectionURL(LONG_POLLING, params);\n }\n\n /**\n *\n * @param {function(Object)} onMessage Callback when messages arrive\n * @param {function()} onDisconnect Callback with connection lost.\n */\n open(onMessage: (msg: Object) => void, onDisconnect: (a?: boolean) => void) {\n this.curSegmentNum = 0;\n this.onDisconnect_ = onDisconnect;\n this.myPacketOrderer = new PacketReceiver(onMessage);\n this.isClosed_ = false;\n\n this.connectTimeoutTimer_ = setTimeout(() => {\n this.log_('Timed out trying to connect.');\n // Make sure we clear the host cache\n this.onClosed_();\n this.connectTimeoutTimer_ = null;\n }, Math.floor(LP_CONNECT_TIMEOUT)) as any;\n\n // Ensure we delay the creation of the iframe until the DOM is loaded.\n executeWhenDOMReady(() => {\n if (this.isClosed_) return;\n\n //Set up a callback that gets triggered once a connection is set up.\n this.scriptTagHolder = new FirebaseIFrameScriptHolder(\n (...args) => {\n const [command, arg1, arg2, arg3, arg4] = args;\n this.incrementIncomingBytes_(args);\n if (!this.scriptTagHolder) return; // we closed the connection.\n\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n this.everConnected_ = true;\n if (command == FIREBASE_LONGPOLL_START_PARAM) {\n this.id = arg1;\n this.password = arg2;\n } else if (command === FIREBASE_LONGPOLL_CLOSE_COMMAND) {\n // Don't clear the host cache. We got a response from the server, so we know it's reachable\n if (arg1) {\n // We aren't expecting any more data (other than what the server's already in the process of sending us\n // through our already open polls), so don't send any more.\n this.scriptTagHolder.sendNewPolls = false;\n\n // arg1 in this case is the last response number sent by the server. We should try to receive\n // all of the responses up to this one before closing\n this.myPacketOrderer.closeAfter(arg1, () => {\n this.onClosed_();\n });\n } else {\n this.onClosed_();\n }\n } else {\n throw new Error('Unrecognized command received: ' + command);\n }\n },\n (...args) => {\n const [pN, data] = args;\n this.incrementIncomingBytes_(args);\n this.myPacketOrderer.handleResponse(pN, data);\n },\n () => {\n this.onClosed_();\n },\n this.urlFn\n );\n\n //Send the initial request to connect. The serial number is simply to keep the browser from pulling previous results\n //from cache.\n const urlParams: { [k: string]: string | number } = {};\n urlParams[FIREBASE_LONGPOLL_START_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_SERIAL_PARAM] = Math.floor(\n Math.random() * 100000000\n );\n if (this.scriptTagHolder.uniqueCallbackIdentifier)\n urlParams[\n FIREBASE_LONGPOLL_CALLBACK_ID_PARAM\n ] = this.scriptTagHolder.uniqueCallbackIdentifier;\n urlParams[VERSION_PARAM] = PROTOCOL_VERSION;\n if (this.transportSessionId) {\n urlParams[TRANSPORT_SESSION_PARAM] = this.transportSessionId;\n }\n if (this.lastSessionId) {\n urlParams[LAST_SESSION_PARAM] = this.lastSessionId;\n }\n if (\n !isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(FORGE_DOMAIN) !== -1\n ) {\n urlParams[REFERER_PARAM] = FORGE_REF;\n }\n const connectURL = this.urlFn(urlParams);\n this.log_('Connecting via long-poll to ' + connectURL);\n this.scriptTagHolder.addTag(connectURL, () => {\n /* do nothing */\n });\n });\n }\n\n /**\n * Call this when a handshake has completed successfully and we want to consider the connection established\n */\n start() {\n this.scriptTagHolder.startLongPoll(this.id, this.password);\n this.addDisconnectPingFrame(this.id, this.password);\n }\n\n private static forceAllow_: boolean;\n\n /**\n * Forces long polling to be considered as a potential transport\n */\n static forceAllow() {\n BrowserPollConnection.forceAllow_ = true;\n }\n\n private static forceDisallow_: boolean;\n\n /**\n * Forces longpolling to not be considered as a potential transport\n */\n static forceDisallow() {\n BrowserPollConnection.forceDisallow_ = true;\n }\n\n // Static method, use string literal so it can be accessed in a generic way\n static isAvailable() {\n // NOTE: In React-Native there's normally no 'document', but if you debug a React-Native app in\n // the Chrome debugger, 'document' is defined, but document.createElement is null (2015/06/08).\n return (\n BrowserPollConnection.forceAllow_ ||\n (!BrowserPollConnection.forceDisallow_ &&\n typeof document !== 'undefined' &&\n document.createElement != null &&\n !isChromeExtensionContentScript() &&\n !isWindowsStoreApp() &&\n !isNodeSdk())\n );\n }\n\n /**\n * No-op for polling\n */\n markConnectionHealthy() {}\n\n /**\n * Stops polling and cleans up the iframe\n * @private\n */\n private shutdown_() {\n this.isClosed_ = true;\n\n if (this.scriptTagHolder) {\n this.scriptTagHolder.close();\n this.scriptTagHolder = null;\n }\n\n //remove the disconnect frame, which will trigger an XHR call to the server to tell it we're leaving.\n if (this.myDisconnFrame) {\n document.body.removeChild(this.myDisconnFrame);\n this.myDisconnFrame = null;\n }\n\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n }\n\n /**\n * Triggered when this transport is closed\n * @private\n */\n private onClosed_() {\n if (!this.isClosed_) {\n this.log_('Longpoll is closing itself');\n this.shutdown_();\n\n if (this.onDisconnect_) {\n this.onDisconnect_(this.everConnected_);\n this.onDisconnect_ = null;\n }\n }\n }\n\n /**\n * External-facing close handler. RealTime has requested we shut down. Kill our connection and tell the server\n * that we've left.\n */\n close() {\n if (!this.isClosed_) {\n this.log_('Longpoll is being closed.');\n this.shutdown_();\n }\n }\n\n /**\n * Send the JSON object down to the server. It will need to be stringified, base64 encoded, and then\n * broken into chunks (since URLs have a small maximum length).\n * @param {!Object} data The JSON data to transmit.\n */\n send(data: Object) {\n const dataStr = stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n\n //first, lets get the base64-encoded data\n const base64data = base64Encode(dataStr);\n\n //We can only fit a certain amount in each URL, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n const dataSegs = splitStringBySize(base64data, MAX_PAYLOAD_SIZE);\n\n //Enqueue each segment for transmission. We assign each chunk a sequential ID and a total number\n //of segments so that we can reassemble the packet on the server.\n for (let i = 0; i < dataSegs.length; i++) {\n this.scriptTagHolder.enqueueSegment(\n this.curSegmentNum,\n dataSegs.length,\n dataSegs[i]\n );\n this.curSegmentNum++;\n }\n }\n\n /**\n * This is how we notify the server that we're leaving.\n * We aren't able to send requests with DHTML on a window close event, but we can\n * trigger XHR requests in some browsers (everything but Opera basically).\n * @param {!string} id\n * @param {!string} pw\n */\n addDisconnectPingFrame(id: string, pw: string) {\n if (isNodeSdk()) return;\n this.myDisconnFrame = document.createElement('iframe');\n const urlParams: { [k: string]: string } = {};\n urlParams[FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = id;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = pw;\n this.myDisconnFrame.src = this.urlFn(urlParams);\n this.myDisconnFrame.style.display = 'none';\n\n document.body.appendChild(this.myDisconnFrame);\n }\n\n /**\n * Used to track the bytes received by this client\n * @param {*} args\n * @private\n */\n private incrementIncomingBytes_(args: any) {\n // TODO: This is an annoying perf hit just to track the number of incoming bytes. Maybe it should be opt-in.\n const bytesReceived = stringify(args).length;\n this.bytesReceived += bytesReceived;\n this.stats_.incrementCounter('bytes_received', bytesReceived);\n }\n}\n\nexport interface IFrameElement extends HTMLIFrameElement {\n doc: Document;\n}\n\n/*********************************************************************************************\n * A wrapper around an iframe that is used as a long-polling script holder.\n * @constructor\n *********************************************************************************************/\nexport class FirebaseIFrameScriptHolder {\n //We maintain a count of all of the outstanding requests, because if we have too many active at once it can cause\n //problems in some browsers.\n /**\n * @type {CountedSet.}\n */\n outstandingRequests = new CountedSet();\n\n //A queue of the pending segments waiting for transmission to the server.\n pendingSegs: { seg: number; ts: number; d: any }[] = [];\n\n //A serial number. We use this for two things:\n // 1) A way to ensure the browser doesn't cache responses to polls\n // 2) A way to make the server aware when long-polls arrive in a different order than we started them. The\n // server needs to release both polls in this case or it will cause problems in Opera since Opera can only execute\n // JSONP code in the order it was added to the iframe.\n currentSerial = Math.floor(Math.random() * 100000000);\n\n // This gets set to false when we're \"closing down\" the connection (e.g. we're switching transports but there's still\n // incoming data from the server that we're waiting for).\n sendNewPolls = true;\n\n uniqueCallbackIdentifier: number;\n myIFrame: IFrameElement;\n alive: boolean;\n myID: string;\n myPW: string;\n commandCB: (command: string, ...args: any[]) => void;\n onMessageCB: (...args: any[]) => void;\n\n /**\n * @param commandCB - The callback to be called when control commands are recevied from the server.\n * @param onMessageCB - The callback to be triggered when responses arrive from the server.\n * @param onDisconnect - The callback to be triggered when this tag holder is closed\n * @param urlFn - A function that provides the URL of the endpoint to send data to.\n */\n constructor(\n commandCB: (command: string, ...args: any[]) => void,\n onMessageCB: (...args: any[]) => void,\n public onDisconnect: () => void,\n public urlFn: (a: object) => string\n ) {\n if (!isNodeSdk()) {\n //Each script holder registers a couple of uniquely named callbacks with the window. These are called from the\n //iframes where we put the long-polling script tags. We have two callbacks:\n // 1) Command Callback - Triggered for control issues, like starting a connection.\n // 2) Message Callback - Triggered when new data arrives.\n this.uniqueCallbackIdentifier = LUIDGenerator();\n (window as any)[\n FIREBASE_LONGPOLL_COMMAND_CB_NAME + this.uniqueCallbackIdentifier\n ] = commandCB;\n (window as any)[\n FIREBASE_LONGPOLL_DATA_CB_NAME + this.uniqueCallbackIdentifier\n ] = onMessageCB;\n\n //Create an iframe for us to add script tags to.\n this.myIFrame = FirebaseIFrameScriptHolder.createIFrame_();\n\n // Set the iframe's contents.\n let script = '';\n // if we set a javascript url, it's IE and we need to set the document domain. The javascript url is sufficient\n // for ie9, but ie8 needs to do it again in the document itself.\n if (\n this.myIFrame.src &&\n this.myIFrame.src.substr(0, 'javascript:'.length) === 'javascript:'\n ) {\n const currentDomain = document.domain;\n script = '';\n }\n const iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n } catch (e) {\n log('frame writing exception');\n if (e.stack) {\n log(e.stack);\n }\n log(e);\n }\n } else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n\n /**\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\n * actually use.\n * @private\n * @return {Element}\n */\n private static createIFrame_(): IFrameElement {\n const iframe = document.createElement('iframe') as IFrameElement;\n iframe.style.display = 'none';\n\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n const a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n log('No IE domain setting required');\n }\n } catch (e) {\n const domain = document.domain;\n iframe.src =\n \"javascript:void((function(){document.open();document.domain='\" +\n domain +\n \"';document.close();})())\";\n }\n } else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n (iframe as any).doc = iframe.contentDocument; // Firefox, Opera, Safari\n } else if (iframe.contentWindow) {\n (iframe as any).doc = iframe.contentWindow.document; // Internet Explorer\n } else if ((iframe as any).document) {\n (iframe as any).doc = (iframe as any).document; //others?\n }\n\n return iframe;\n }\n\n /**\n * Cancel all outstanding queries and remove the frame.\n */\n close() {\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(() => {\n if (this.myIFrame !== null) {\n document.body.removeChild(this.myIFrame);\n this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n\n if (isNodeSdk() && this.myID) {\n const urlParams: { [k: string]: string } = {};\n urlParams[FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n const theURL = this.urlFn(urlParams);\n (FirebaseIFrameScriptHolder as any).nodeRestRequest(theURL);\n }\n\n // Protect from being called recursively.\n const onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n }\n\n /**\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\n * @param {!string} id - The ID of this connection\n * @param {!string} pw - The password for this connection\n */\n startLongPoll(id: string, pw: string) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) {}\n }\n\n /**\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\n * too many outstanding requests and we are still alive.\n *\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\n * needed.\n */\n private newRequest_() {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (\n this.alive &&\n this.sendNewPolls &&\n this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)\n ) {\n //construct our url\n this.currentSerial++;\n const urlParams: { [k: string]: string | number } = {};\n urlParams[FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n let theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n let curDataString = '';\n let i = 0;\n\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n const nextSeg = this.pendingSegs[0];\n if (\n nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <=\n MAX_URL_DATA_SIZE\n ) {\n //great, the segment will fit. Lets append it.\n const theSeg = this.pendingSegs.shift();\n curDataString =\n curDataString +\n '&' +\n FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM +\n i +\n '=' +\n theSeg.seg +\n '&' +\n FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET +\n i +\n '=' +\n theSeg.ts +\n '&' +\n FIREBASE_LONGPOLL_DATA_PARAM +\n i +\n '=' +\n theSeg.d;\n i++;\n } else {\n break;\n }\n }\n\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Queue a packet for transmission to the server.\n * @param segnum - A sequential id for this packet segment used for reassembly\n * @param totalsegs - The total number of segments in this packet\n * @param data - The data for this segment.\n */\n enqueueSegment(segnum: number, totalsegs: number, data: any) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n }\n\n /**\n * Add a script tag for a regular long-poll request.\n * @param {!string} url - The URL of the script tag.\n * @param {!number} serial - The serial number of the request.\n * @private\n */\n private addLongPollTag_(url: string, serial: number) {\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n\n const doNewRequest = () => {\n this.outstandingRequests.remove(serial);\n this.newRequest_();\n };\n\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n const keepaliveTimeout = setTimeout(\n doNewRequest,\n Math.floor(KEEPALIVE_REQUEST_INTERVAL)\n );\n\n const readyStateCB = () => {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n\n this.addTag(url, readyStateCB);\n }\n\n /**\n * Add an arbitrary script tag to the iframe.\n * @param {!string} url - The URL for the script tag source.\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\n */\n addTag(url: string, loadCB: () => void) {\n if (isNodeSdk()) {\n (this as any).doNodeLongPoll(url, loadCB);\n } else {\n setTimeout(() => {\n try {\n // if we're already closed, don't add this poll\n if (!this.sendNewPolls) return;\n const newScript = this.myIFrame.doc.createElement('script');\n newScript.type = 'text/javascript';\n newScript.async = true;\n newScript.src = url;\n newScript.onload = (newScript as any).onreadystatechange = function() {\n const rstate = (newScript as any).readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript.onload = (newScript as any).onreadystatechange = null;\n if (newScript.parentNode) {\n newScript.parentNode.removeChild(newScript);\n }\n loadCB();\n }\n };\n newScript.onerror = () => {\n log('Long-poll script failed to load: ' + url);\n this.sendNewPolls = false;\n this.close();\n };\n this.myIFrame.doc.body.appendChild(newScript);\n } catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/BrowserPollConnection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { BrowserPollConnection } from './BrowserPollConnection';\nimport { WebSocketConnection } from './WebSocketConnection';\nimport { warn, each } from '../core/util/util';\nimport { TransportConstructor } from './Transport';\nimport { RepoInfo } from '../core/RepoInfo';\n\n/**\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\n * lifecycle.\n *\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\n * they are available.\n * @constructor\n */\nexport class TransportManager {\n private transports_: TransportConstructor[];\n\n /**\n * @const\n * @type {!Array.}\n */\n static get ALL_TRANSPORTS() {\n return [BrowserPollConnection, WebSocketConnection];\n }\n\n /**\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\n */\n constructor(repoInfo: RepoInfo) {\n this.initTransports_(repoInfo);\n }\n\n /**\n * @param {!RepoInfo} repoInfo\n * @private\n */\n private initTransports_(repoInfo: RepoInfo) {\n const isWebSocketsAvailable: boolean =\n WebSocketConnection && WebSocketConnection['isAvailable']();\n let isSkipPollConnection =\n isWebSocketsAvailable && !WebSocketConnection.previouslyFailed();\n\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable)\n warn(\n \"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\"\n );\n\n isSkipPollConnection = true;\n }\n\n if (isSkipPollConnection) {\n this.transports_ = [WebSocketConnection];\n } else {\n const transports = (this.transports_ = [] as TransportConstructor[]);\n each(\n TransportManager.ALL_TRANSPORTS,\n (i: number, transport: TransportConstructor) => {\n if (transport && transport['isAvailable']()) {\n transports.push(transport);\n }\n }\n );\n }\n }\n\n /**\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\n * initial transport to use\n */\n initialTransport(): TransportConstructor {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n } else {\n throw new Error('No transports available');\n }\n }\n\n /**\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\n * transport, or null\n */\n upgradeTransport(): TransportConstructor | null {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n } else {\n return null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/TransportManager.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport {\n error,\n logWrapper,\n requireKey,\n setTimeoutNonBlocking,\n warn\n} from '../core/util/util';\nimport { PersistentStorage } from '../core/storage/storage';\nimport { PROTOCOL_VERSION } from './Constants';\nimport { TransportManager } from './TransportManager';\nimport { RepoInfo } from '../core/RepoInfo';\nimport { Transport, TransportConstructor } from './Transport';\n\n// Abort upgrade attempt if it takes longer than 60s.\nconst UPGRADE_TIMEOUT = 60000;\n\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nconst DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nconst BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nconst BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\n\nconst enum RealtimeState {\n CONNECTING,\n CONNECTED,\n DISCONNECTED\n}\n\nconst MESSAGE_TYPE = 't';\nconst MESSAGE_DATA = 'd';\nconst CONTROL_SHUTDOWN = 's';\nconst CONTROL_RESET = 'r';\nconst CONTROL_ERROR = 'e';\nconst CONTROL_PONG = 'o';\nconst SWITCH_ACK = 'a';\nconst END_TRANSMISSION = 'n';\nconst PING = 'p';\n\nconst SERVER_HELLO = 'h';\n\n/**\n * Creates a new real-time connection to the server using whichever method works\n * best in the current browser.\n *\n * @constructor\n */\nexport class Connection {\n connectionCount = 0;\n pendingDataMessages: any[] = [];\n sessionId: string;\n\n private conn_: Transport;\n private healthyTimeout_: number;\n private isHealthy_: boolean;\n private log_: (...args: any[]) => void;\n private primaryResponsesRequired_: number;\n private rx_: Transport;\n private secondaryConn_: Transport;\n private secondaryResponsesRequired_: number;\n private state_ = RealtimeState.CONNECTING;\n private transportManager_: TransportManager;\n private tx_: Transport;\n\n /**\n * @param {!string} id - an id for this connection\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\n */\n constructor(\n public id: string,\n private repoInfo_: RepoInfo,\n private onMessage_: (a: Object) => void,\n private onReady_: (a: number, b: string) => void,\n private onDisconnect_: () => void,\n private onKill_: (a: string) => void,\n public lastSessionId?: string\n ) {\n this.log_ = logWrapper('c:' + this.id + ':');\n this.transportManager_ = new TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n\n /**\n * Starts a connection attempt\n * @private\n */\n private start_() {\n const conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(\n this.nextTransportId_(),\n this.repoInfo_,\n undefined,\n this.lastSessionId\n );\n\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n\n const onMessageReceived = this.connReceiver_(this.conn_);\n const onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n\n /*\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\n * still have the context of your originating frame.\n */\n setTimeout(() => {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n this.conn_ && this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n\n const healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = setTimeoutNonBlocking(() => {\n this.healthyTimeout_ = null;\n if (!this.isHealthy_) {\n if (\n this.conn_ &&\n this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE\n ) {\n this.log_(\n 'Connection exceeded healthy timeout but has received ' +\n this.conn_.bytesReceived +\n ' bytes. Marking connection healthy.'\n );\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n } else if (\n this.conn_ &&\n this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE\n ) {\n this.log_(\n 'Connection exceeded healthy timeout but has sent ' +\n this.conn_.bytesSent +\n ' bytes. Leaving connection alive.'\n );\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n } else {\n this.log_('Closing unhealthy connection after timeout.');\n this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms)) as any;\n }\n }\n\n /**\n * @return {!string}\n * @private\n */\n private nextTransportId_(): string {\n return 'c:' + this.id + ':' + this.connectionCount++;\n }\n\n private disconnReceiver_(conn) {\n return everConnected => {\n if (conn === this.conn_) {\n this.onConnectionLost_(everConnected);\n } else if (conn === this.secondaryConn_) {\n this.log_('Secondary connection lost.');\n this.onSecondaryConnectionLost_();\n } else {\n this.log_('closing an old connection');\n }\n };\n }\n\n private connReceiver_(conn: Transport) {\n return (message: object) => {\n if (this.state_ != RealtimeState.DISCONNECTED) {\n if (conn === this.rx_) {\n this.onPrimaryMessageReceived_(message);\n } else if (conn === this.secondaryConn_) {\n this.onSecondaryMessageReceived_(message);\n } else {\n this.log_('message on old connection');\n }\n }\n };\n }\n\n /**\n *\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\n */\n sendRequest(dataMsg: object) {\n // wrap in a data message envelope and send it on\n const msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n }\n\n tryCleanupConnection() {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_(\n 'cleaning up and promoting a connection: ' + this.secondaryConn_.connId\n );\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n }\n\n private onSecondaryControl_(controlData: { [k: string]: any }) {\n if (MESSAGE_TYPE in controlData) {\n const cmd = controlData[MESSAGE_TYPE] as string;\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n } else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (\n this.tx_ === this.secondaryConn_ ||\n this.rx_ === this.secondaryConn_\n ) {\n this.close();\n }\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n }\n\n private onSecondaryMessageReceived_(parsedData: object) {\n const layer: string = requireKey('t', parsedData);\n const data: any = requireKey('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n } else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n } else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n }\n\n private upgradeIfSecondaryHealthy_() {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n } else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n }\n\n private proceedWithUpgrade_() {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n\n this.tryCleanupConnection();\n }\n\n private onPrimaryMessageReceived_(parsedData: { [k: string]: any }) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n const layer: string = requireKey('t', parsedData);\n const data: any = requireKey('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n } else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n }\n\n private onDataMessage_(message: any) {\n this.onPrimaryResponse_();\n\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n }\n\n private onPrimaryResponse_() {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n }\n\n private onControl_(controlData: { [k: string]: any }) {\n const cmd: string = requireKey(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n const payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n } else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (let i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n } else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n } else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n } else if (cmd === CONTROL_ERROR) {\n error('Server Error: ' + payload);\n } else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n } else {\n error('Unknown control packet command: ' + cmd);\n }\n }\n }\n\n /**\n *\n * @param {Object} handshake The handshake data returned from the server\n * @private\n */\n private onHandshake_(handshake: {\n ts: number;\n v: string;\n h: string;\n s: string;\n }) {\n const timestamp = handshake.ts;\n const version = handshake.v;\n const host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == RealtimeState.CONNECTING) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (PROTOCOL_VERSION !== version) {\n warn('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n }\n\n private tryStartUpgrade_() {\n const conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n }\n\n private startUpgrade_(conn: TransportConstructor) {\n this.secondaryConn_ = new conn(\n this.nextTransportId_(),\n this.repoInfo_,\n this.sessionId\n );\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ =\n conn['responsesRequiredToBeHealthy'] || 0;\n\n const onMessage = this.connReceiver_(this.secondaryConn_);\n const onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n setTimeoutNonBlocking(() => {\n if (this.secondaryConn_) {\n this.log_('Timed out trying to upgrade.');\n this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n }\n\n private onReset_(host: string) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === RealtimeState.CONNECTED) {\n this.close();\n } else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n }\n\n private onConnectionEstablished_(conn: Transport, timestamp: number) {\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = RealtimeState.CONNECTED;\n\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n } else {\n setTimeoutNonBlocking(() => {\n this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n }\n\n private sendPingOnPrimaryIfNecessary_() {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === RealtimeState.CONNECTED) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n }\n\n private onSecondaryConnectionLost_() {\n const conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n }\n\n /**\n *\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\n * we should flush the host cache\n * @private\n */\n private onConnectionLost_(everConnected: boolean) {\n this.conn_ = null;\n\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === RealtimeState.CONNECTING) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n PersistentStorage.remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n } else if (this.state_ === RealtimeState.CONNECTED) {\n this.log_('Realtime connection lost.');\n }\n\n this.close();\n }\n\n /**\n *\n * @param {string} reason\n * @private\n */\n private onConnectionShutdown_(reason: string) {\n this.log_('Connection shutdown command received. Shutting down...');\n\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n\n this.close();\n }\n\n private sendData_(data: object) {\n if (this.state_ !== RealtimeState.CONNECTED) {\n throw 'Connection is not connected';\n } else {\n this.tx_.send(data);\n }\n }\n\n /**\n * Cleans up this connection, calling the appropriate callbacks\n */\n close() {\n if (this.state_ !== RealtimeState.DISCONNECTED) {\n this.log_('Closing realtime connection.');\n this.state_ = RealtimeState.DISCONNECTED;\n\n this.closeConnections_();\n\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n }\n\n /**\n *\n * @private\n */\n private closeConnections_() {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/realtime/Connection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { Query } from '../api/Query';\n\n/**\n * Interface defining the set of actions that can be performed against the Firebase server\n * (basically corresponds to our wire protocol).\n *\n * @interface\n */\nexport abstract class ServerActions {\n /**\n * @param {!Query} query\n * @param {function():string} currentHashFn\n * @param {?number} tag\n * @param {function(string, *)} onComplete\n */\n abstract listen(\n query: Query,\n currentHashFn: () => string,\n tag: number | null,\n onComplete: (a: string, b: any) => void\n ): void;\n\n /**\n * Remove a listen.\n *\n * @param {!Query} query\n * @param {?number} tag\n */\n abstract unlisten(query: Query, tag: number | null): void;\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n * @param {string=} hash\n */\n put(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void,\n hash?: string\n ) {}\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, ?string)} onComplete\n * @param {string=} hash\n */\n merge(\n pathString: string,\n data: any,\n onComplete: (a: string, b: string | null) => void,\n hash?: string\n ) {}\n\n /**\n * Refreshes the auth token for the current connection.\n * @param {string} token The authentication token\n */\n refreshAuthToken(token: string) {}\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n onDisconnectPut(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {}\n\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n onDisconnectMerge(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {}\n\n /**\n * @param {string} pathString\n * @param {function(string, string)=} onComplete\n */\n onDisconnectCancel(\n pathString: string,\n onComplete?: (a: string, b: string) => void\n ) {}\n\n /**\n * @param {Object.} stats\n */\n reportStats(stats: { [k: string]: any }) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/ServerActions.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport firebase from '../../app';\nimport { forEach, contains, isEmpty, getCount, safeGet } from '../../utils/obj';\nimport { stringify } from '../../utils/json';\nimport { assert } from '../../utils/assert';\nimport { error, log, logWrapper, warn, ObjectToUniqueKey } from './util/util';\nimport { Path } from './util/Path';\nimport { VisibilityMonitor } from './util/VisibilityMonitor';\nimport { OnlineMonitor } from './util/OnlineMonitor';\nimport { isAdmin, isValidFormat } from '../../utils/jwt';\nimport { Connection } from '../realtime/Connection';\nimport { CONSTANTS } from '../../utils/constants';\nimport {\n isMobileCordova,\n isReactNative,\n isNodeSdk\n} from '../../utils/environment';\nimport { ServerActions } from './ServerActions';\nimport { AuthTokenProvider } from './AuthTokenProvider';\nimport { RepoInfo } from './RepoInfo';\nimport { Query } from '../api/Query';\n\nconst RECONNECT_MIN_DELAY = 1000;\nconst RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nconst RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nconst RECONNECT_DELAY_MULTIPLIER = 1.3;\nconst RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nconst SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nconst INVALID_AUTH_TOKEN_THRESHOLD = 3;\n\ninterface ListenSpec {\n onComplete(s: string, p?: any): void;\n\n hashFn(): string;\n\n query: Query;\n tag: number | null;\n}\n\ninterface OnDisconnectRequest {\n pathString: string;\n action: string;\n data: any;\n onComplete?: (a: string, b: string) => void;\n}\n\ninterface OutstandingPut {\n action: string;\n request: Object;\n queued?: boolean;\n onComplete: (a: string, b?: string) => void;\n}\n\n/**\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\n *\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\n * in quotes to make sure the closure compiler does not minify them.\n */\nexport class PersistentConnection extends ServerActions {\n // Used for diagnostic logging.\n id = PersistentConnection.nextPersistentConnectionId_++;\n private log_ = logWrapper('p:' + this.id + ':');\n\n /** @private {Object} */\n private interruptReasons_: { [reason: string]: boolean } = {};\n private listens_: { [path: string]: { [queryId: string]: ListenSpec } } = {};\n private outstandingPuts_: OutstandingPut[] = [];\n private outstandingPutCount_ = 0;\n private onDisconnectRequestQueue_: OnDisconnectRequest[] = [];\n private connected_ = false;\n private reconnectDelay_ = RECONNECT_MIN_DELAY;\n private maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n private securityDebugCallback_: ((a: Object) => void) | null = null;\n lastSessionId: string | null = null;\n\n /** @private {number|null} */\n private establishConnectionTimer_: number | null = null;\n\n /** @private {boolean} */\n private visible_: boolean = false;\n\n // Before we get connected, we keep a queue of pending messages to send.\n private requestCBHash_: { [k: number]: (a: any) => void } = {};\n private requestNumber_ = 0;\n\n /** @private {?{\n * sendRequest(Object),\n * close()\n * }} */\n private realtime_: {\n sendRequest(a: Object): void;\n close(): void;\n } | null = null;\n\n /** @private {string|null} */\n private authToken_: string | null = null;\n private forceTokenRefresh_ = false;\n private invalidAuthTokenCount_ = 0;\n\n private firstConnection_ = true;\n private lastConnectionAttemptTime_: number | null = null;\n private lastConnectionEstablishedTime_: number | null = null;\n\n /**\n * @private\n */\n private static nextPersistentConnectionId_ = 0;\n\n /**\n * Counter for number of connections created. Mainly used for tagging in the logs\n * @type {number}\n * @private\n */\n private static nextConnectionId_ = 0;\n\n /**\n * @implements {ServerActions}\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param onConnectStatus_\n * @param onServerInfoUpdate_\n * @param authTokenProvider_\n * @param authOverride_\n */\n constructor(\n private repoInfo_: RepoInfo,\n private onDataUpdate_: (\n a: string,\n b: any,\n c: boolean,\n d: number | null\n ) => void,\n private onConnectStatus_: (a: boolean) => void,\n private onServerInfoUpdate_: (a: any) => void,\n private authTokenProvider_: AuthTokenProvider,\n private authOverride_?: Object | null\n ) {\n super();\n\n if (authOverride_ && !isNodeSdk()) {\n throw new Error(\n 'Auth override specified in options, but not supported on non Node.js platforms'\n );\n }\n this.scheduleConnect_(0);\n\n VisibilityMonitor.getInstance().on('visible', this.onVisible_, this);\n\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor.getInstance().on('online', this.onOnline_, this);\n }\n }\n\n /**\n * @param {!string} action\n * @param {*} body\n * @param {function(*)=} onResponse\n * @protected\n */\n protected sendRequest(\n action: string,\n body: any,\n onResponse?: (a: any) => void\n ) {\n const curReqNum = ++this.requestNumber_;\n\n const msg = { r: curReqNum, a: action, b: body };\n this.log_(stringify(msg));\n assert(\n this.connected_,\n \"sendRequest call when we're not connected not allowed.\"\n );\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n }\n\n /**\n * @inheritDoc\n */\n listen(\n query: Query,\n currentHashFn: () => string,\n tag: number | null,\n onComplete: (a: string, b: any) => void\n ) {\n const queryId = query.queryIdentifier();\n const pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n assert(\n query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(),\n 'listen() called for non-default but complete query'\n );\n assert(\n !this.listens_[pathString][queryId],\n 'listen() called twice for same path/queryId.'\n );\n const listenSpec: ListenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n }\n\n /**\n * @param {!{onComplete(),\n * hashFn():!string,\n * query: !Query,\n * tag: ?number}} listenSpec\n * @private\n */\n private sendListen_(listenSpec: ListenSpec) {\n const query = listenSpec.query;\n const pathString = query.path.toString();\n const queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n const req: { [k: string]: any } = { /*path*/ p: pathString };\n\n const action = 'q';\n\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n\n req[/*hash*/ 'h'] = listenSpec.hashFn();\n\n this.sendRequest(action, req, (message: { [k: string]: any }) => {\n const payload: any = message[/*data*/ 'd'];\n const status: string = message[/*status*/ 's'];\n\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n\n const currentListenSpec =\n this.listens_[pathString] && this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n this.log_('listen response', message);\n\n if (status !== 'ok') {\n this.removeListen_(pathString, queryId);\n }\n\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n }\n\n /**\n * @param {*} payload\n * @param {!Query} query\n * @private\n */\n private static warnOnListenWarnings_(payload: any, query: Query) {\n if (payload && typeof payload === 'object' && contains(payload, 'w')) {\n const warnings = safeGet(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n const indexSpec =\n '\".indexOn\": \"' + query.getQueryParams().getIndex().toString() + '\"';\n const indexPath = query.path.toString();\n warn(\n 'Using an unspecified index. Consider adding ' +\n indexSpec +\n ' at ' +\n indexPath +\n ' to your security rules for better performance'\n );\n }\n }\n }\n\n /**\n * @inheritDoc\n */\n refreshAuthToken(token: string) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n } else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, () => {});\n }\n }\n\n this.reduceReconnectDelayIfAdminCredential_(token);\n }\n\n /**\n * @param {!string} credential\n * @private\n */\n private reduceReconnectDelayIfAdminCredential_(credential: string) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n const isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || isAdmin(credential)) {\n this.log_(\n 'Admin auth credential detected. Reducing max reconnect time.'\n );\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n }\n\n /**\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\n * a auth revoked (the connection is closed).\n */\n tryAuth() {\n if (this.connected_ && this.authToken_) {\n const token = this.authToken_;\n const authMethod = isValidFormat(token) ? 'auth' : 'gauth';\n const requestData: { [k: string]: any } = { cred: token };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n } else if (typeof this.authOverride_ === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, (res: { [k: string]: any }) => {\n const status: string = res[/*status*/ 's'];\n const data: string = res[/*data*/ 'd'] || 'error';\n\n if (this.authToken_ === token) {\n if (status === 'ok') {\n this.invalidAuthTokenCount_ = 0;\n } else {\n // Triggers reconnect and force refresh for auth token\n this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n unlisten(query: Query, tag: number | null) {\n const pathString = query.path.toString();\n const queryId = query.queryIdentifier();\n\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n\n assert(\n query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(),\n 'unlisten() called for non-default but complete query'\n );\n const listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n }\n\n private sendUnlisten_(\n pathString: string,\n queryId: string,\n queryObj: Object,\n tag: number | null\n ) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n\n const req: { [k: string]: any } = { /*path*/ p: pathString };\n const action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n\n this.sendRequest(action, req);\n }\n\n /**\n * @inheritDoc\n */\n onDisconnectPut(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString,\n action: 'o',\n data,\n onComplete\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n onDisconnectMerge(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void\n ) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString,\n action: 'om',\n data,\n onComplete\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n onDisconnectCancel(\n pathString: string,\n onComplete?: (a: string, b: string) => void\n ) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n } else {\n this.onDisconnectRequestQueue_.push({\n pathString,\n action: 'oc',\n data: null,\n onComplete\n });\n }\n }\n\n private sendOnDisconnect_(\n action: string,\n pathString: string,\n data: any,\n onComplete: (a: string, b: string) => void\n ) {\n const request = { /*path*/ p: pathString, /*data*/ d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, (response: { [k: string]: any }) => {\n if (onComplete) {\n setTimeout(function() {\n onComplete(response[/*status*/ 's'], response[/* data */ 'd']);\n }, Math.floor(0));\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n put(\n pathString: string,\n data: any,\n onComplete?: (a: string, b: string) => void,\n hash?: string\n ) {\n this.putInternal('p', pathString, data, onComplete, hash);\n }\n\n /**\n * @inheritDoc\n */\n merge(\n pathString: string,\n data: any,\n onComplete: (a: string, b: string | null) => void,\n hash?: string\n ) {\n this.putInternal('m', pathString, data, onComplete, hash);\n }\n\n putInternal(\n action: string,\n pathString: string,\n data: any,\n onComplete: (a: string, b: string | null) => void,\n hash?: string\n ) {\n const request: { [k: string]: any } = {\n /*path*/ p: pathString,\n /*data*/ d: data\n };\n\n if (hash !== undefined) request[/*hash*/ 'h'] = hash;\n\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action,\n request,\n onComplete\n });\n\n this.outstandingPutCount_++;\n const index = this.outstandingPuts_.length - 1;\n\n if (this.connected_) {\n this.sendPut_(index);\n } else {\n this.log_('Buffering put: ' + pathString);\n }\n }\n\n private sendPut_(index: number) {\n const action = this.outstandingPuts_[index].action;\n const request = this.outstandingPuts_[index].request;\n const onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n\n this.sendRequest(action, request, (message: { [k: string]: any }) => {\n this.log_(action + ' response', message);\n\n delete this.outstandingPuts_[index];\n this.outstandingPutCount_--;\n\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0) {\n this.outstandingPuts_ = [];\n }\n\n if (onComplete)\n onComplete(message[/*status*/ 's'], message[/* data */ 'd']);\n });\n }\n\n /**\n * @inheritDoc\n */\n reportStats(stats: { [k: string]: any }) {\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n const request = { /*counters*/ c: stats };\n this.log_('reportStats', request);\n\n this.sendRequest(/*stats*/ 's', request, result => {\n const status = result[/*status*/ 's'];\n if (status !== 'ok') {\n const errorReason = result[/* data */ 'd'];\n this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n }\n\n /**\n * @param {*} message\n * @private\n */\n private onDataMessage_(message: { [k: string]: any }) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + stringify(message));\n const reqNum = message['r'];\n const onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message[/*body*/ 'b']);\n }\n } else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n } else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n }\n\n private onDataPush_(action: string, body: { [k: string]: any }) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd')\n this.onDataUpdate_(\n body[/*path*/ 'p'],\n body[/*data*/ 'd'],\n /*isMerge*/ false,\n body['t']\n );\n else if (action === 'm')\n this.onDataUpdate_(\n body[/*path*/ 'p'],\n body[/*data*/ 'd'],\n /*isMerge=*/ true,\n body['t']\n );\n else if (action === 'c')\n this.onListenRevoked_(body[/*path*/ 'p'], body[/*query*/ 'q']);\n else if (action === 'ac')\n this.onAuthRevoked_(\n body[/*status code*/ 's'],\n body[/* explanation */ 'd']\n );\n else if (action === 'sd') this.onSecurityDebugPacket_(body);\n else\n error(\n 'Unrecognized action received from server: ' +\n stringify(action) +\n '\\nAre you using the latest client?'\n );\n }\n\n private onReady_(timestamp: number, sessionId: string) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n }\n\n private scheduleConnect_(timeout: number) {\n assert(\n !this.realtime_,\n \"Scheduling a connect when we're already connected/ing?\"\n );\n\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n\n this.establishConnectionTimer_ = setTimeout(() => {\n this.establishConnectionTimer_ = null;\n this.establishConnection_();\n }, Math.floor(timeout)) as any;\n }\n\n /**\n * @param {boolean} visible\n * @private\n */\n private onVisible_(visible: boolean) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (\n visible &&\n !this.visible_ &&\n this.reconnectDelay_ === this.maxReconnectDelay_\n ) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n }\n\n private onOnline_(online: boolean) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n } else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n }\n\n private onRealtimeDisconnect_() {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n } else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n const timeSinceLastConnectSucceeded =\n new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT)\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n\n const timeSinceLastConnectAttempt =\n new Date().getTime() - this.lastConnectionAttemptTime_;\n let reconnectDelay = Math.max(\n 0,\n this.reconnectDelay_ - timeSinceLastConnectAttempt\n );\n reconnectDelay = Math.random() * reconnectDelay;\n\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(\n this.maxReconnectDelay_,\n this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER\n );\n }\n this.onConnectStatus_(false);\n }\n\n private establishConnection_() {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n const onDataMessage = this.onDataMessage_.bind(this);\n const onReady = this.onReady_.bind(this);\n const onDisconnect = this.onRealtimeDisconnect_.bind(this);\n const connId = this.id + ':' + PersistentConnection.nextConnectionId_++;\n const self = this;\n const lastSessionId = this.lastSessionId;\n let canceled = false;\n let connection: Connection | null = null;\n const closeFn = function() {\n if (connection) {\n connection.close();\n } else {\n canceled = true;\n onDisconnect();\n }\n };\n const sendRequestFn = function(msg: Object) {\n assert(\n connection,\n \"sendRequest call when we're not connected not allowed.\"\n );\n connection.sendRequest(msg);\n };\n\n this.realtime_ = {\n close: closeFn,\n sendRequest: sendRequestFn\n };\n\n const forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_\n .getToken(forceRefresh)\n .then(function(result) {\n if (!canceled) {\n log('getToken() completed. Creating connection.');\n self.authToken_ = result && result.accessToken;\n connection = new Connection(\n connId,\n self.repoInfo_,\n onDataMessage,\n onReady,\n onDisconnect,\n /* onKill= */ function(reason) {\n warn(reason + ' (' + self.repoInfo_.toString() + ')');\n self.interrupt(SERVER_KILL_INTERRUPT_REASON);\n },\n lastSessionId\n );\n } else {\n log('getToken() completed but was canceled');\n }\n })\n .then(null, function(error) {\n self.log_('Failed to get token: ' + error);\n if (!canceled) {\n if (CONSTANTS.NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n warn(error);\n }\n closeFn();\n }\n });\n }\n }\n\n /**\n * @param {string} reason\n */\n interrupt(reason: string) {\n log('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n } else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n }\n\n /**\n * @param {string} reason\n */\n resume(reason: string) {\n log('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (isEmpty(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n }\n\n private handleTimestamp_(timestamp: number) {\n const delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n }\n\n private cancelSentTransactions_() {\n for (let i = 0; i < this.outstandingPuts_.length; i++) {\n const put = this.outstandingPuts_[i];\n if (put && /*hash*/ 'h' in put.request && put.queued) {\n if (put.onComplete) put.onComplete('disconnect');\n\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0) this.outstandingPuts_ = [];\n }\n\n /**\n * @param {!string} pathString\n * @param {Array.<*>=} query\n * @private\n */\n private onListenRevoked_(pathString: string, query?: any[]) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n let queryId;\n if (!query) {\n queryId = 'default';\n } else {\n queryId = query.map(q => ObjectToUniqueKey(q)).join('$');\n }\n const listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete) listen.onComplete('permission_denied');\n }\n\n /**\n * @param {!string} pathString\n * @param {!string} queryId\n * @return {{queries:Array., onComplete:function(string)}}\n * @private\n */\n private removeListen_(pathString: string, queryId: string): ListenSpec {\n const normalizedPathString = new Path(pathString).toString(); // normalize path.\n let listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (getCount(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n } else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n }\n\n private onAuthRevoked_(statusCode: string, explanation: string) {\n log('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n }\n\n private onSecurityDebugPacket_(body: { [k: string]: any }) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n } else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n }\n\n private restoreState_() {\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n forEach(this.listens_, (pathString: string, queries: Object) => {\n forEach(queries, (key: string, listenSpec: ListenSpec) => {\n this.sendListen_(listenSpec);\n });\n });\n\n for (let i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i]) this.sendPut_(i);\n }\n\n while (this.onDisconnectRequestQueue_.length) {\n const request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(\n request.action,\n request.pathString,\n request.data,\n request.onComplete\n );\n }\n }\n\n /**\n * Sends client stats for first connection\n * @private\n */\n private sendConnectStats_() {\n const stats: { [k: string]: number } = {};\n\n let clientName = 'js';\n if (CONSTANTS.NODE_ADMIN) {\n clientName = 'admin_node';\n } else if (CONSTANTS.NODE_CLIENT) {\n clientName = 'node';\n }\n\n stats[\n 'sdk.' + clientName + '.' + firebase.SDK_VERSION.replace(/\\./g, '-')\n ] = 1;\n\n if (isMobileCordova()) {\n stats['framework.cordova'] = 1;\n } else if (isReactNative()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n }\n\n /**\n * @return {boolean}\n * @private\n */\n private shouldReconnect_(): boolean {\n const online = OnlineMonitor.getInstance().currentlyOnline();\n return isEmpty(this.interruptReasons_) && online;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/PersistentConnection.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { forEach } from './obj';\n\n/**\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a params\n * object (e.g. {arg: 'val', arg2: 'val2'})\n * Note: You must prepend it with ? when adding it to a URL.\n *\n * @param {!Object} querystringParams\n * @return {string}\n */\nexport const querystring = function(querystringParams) {\n var params = [];\n forEach(querystringParams, function(key, value) {\n if (Array.isArray(value)) {\n value.forEach(function(arrayVal) {\n params.push(\n encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal)\n );\n });\n } else {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n });\n return params.length ? '&' + params.join('&') : '';\n};\n\n/**\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object (e.g. {arg: 'val', arg2: 'val2'})\n *\n * @param {string} querystring\n * @return {!Object}\n */\nexport const querystringDecode = function(querystring) {\n var obj = {};\n var tokens = querystring.replace(/^\\?/, '').split('&');\n\n tokens.forEach(function(token) {\n if (token) {\n var key = token.split('=');\n obj[key[0]] = key[1];\n }\n });\n return obj;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/util.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { logWrapper, warn } from './util/util';\nimport { jsonEval } from '../../utils/json';\nimport { safeGet } from '../../utils/obj';\nimport { querystring } from '../../utils/util';\nimport { ServerActions } from './ServerActions';\nimport { RepoInfo } from './RepoInfo';\nimport { AuthTokenProvider } from './AuthTokenProvider';\nimport { Query } from '../api/Query';\n\n/**\n * An implementation of ServerActions that communicates with the server via REST requests.\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\n * persistent connection (using WebSockets or long-polling)\n */\nexport class ReadonlyRestClient extends ServerActions {\n reportStats(stats: { [k: string]: any }): void {\n throw new Error('Method not implemented.');\n }\n\n /** @private {function(...[*])} */\n private log_: (...args: any[]) => void = logWrapper('p:rest:');\n\n /**\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\n * that's been removed. :-/\n *\n * @private {!Object.}\n */\n private listens_: { [k: string]: Object } = {};\n\n /**\n * @param {!Query} query\n * @param {?number=} tag\n * @return {string}\n * @private\n */\n static getListenId_(query: Query, tag?: number | null): string {\n if (tag !== undefined) {\n return 'tag$' + tag;\n } else {\n assert(\n query.getQueryParams().isDefault(),\n \"should have a tag if it's not a default query.\"\n );\n return query.path.toString();\n }\n }\n\n /**\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param {AuthTokenProvider} authTokenProvider_\n * @implements {ServerActions}\n */\n constructor(\n private repoInfo_: RepoInfo,\n private onDataUpdate_: (\n a: string,\n b: any,\n c: boolean,\n d: number | null\n ) => void,\n private authTokenProvider_: AuthTokenProvider\n ) {\n super();\n }\n\n /** @inheritDoc */\n listen(\n query: Query,\n currentHashFn: () => string,\n tag: number | null,\n onComplete: (a: string, b: any) => void\n ) {\n const pathString = query.path.toString();\n this.log_(\n 'Listen called for ' + pathString + ' ' + query.queryIdentifier()\n );\n\n // Mark this listener so we can tell if it's removed.\n const listenId = ReadonlyRestClient.getListenId_(query, tag);\n const thisListen = {};\n this.listens_[listenId] = thisListen;\n\n const queryStringParamaters = query\n .getQueryParams()\n .toRestQueryStringParameters();\n\n this.restRequest_(\n pathString + '.json',\n queryStringParamaters,\n (error, result) => {\n let data = result;\n\n if (error === 404) {\n data = null;\n error = null;\n }\n\n if (error === null) {\n this.onDataUpdate_(pathString, data, /*isMerge=*/ false, tag);\n }\n\n if (safeGet(this.listens_, listenId) === thisListen) {\n let status;\n if (!error) {\n status = 'ok';\n } else if (error == 401) {\n status = 'permission_denied';\n } else {\n status = 'rest_error:' + error;\n }\n\n onComplete(status, null);\n }\n }\n );\n }\n\n /** @inheritDoc */\n unlisten(query: Query, tag: number | null) {\n const listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n }\n\n /** @inheritDoc */\n refreshAuthToken(token: string) {\n // no-op since we just always call getToken.\n }\n\n /**\n * Performs a REST request to the given path, with the provided query string parameters,\n * and any auth credentials we have.\n *\n * @param {!string} pathString\n * @param {!Object.} queryStringParameters\n * @param {?function(?number, *=)} callback\n * @private\n */\n private restRequest_(\n pathString: string,\n queryStringParameters: { [k: string]: any } = {},\n callback: ((a: number | null, b?: any) => void) | null\n ) {\n queryStringParameters['format'] = 'export';\n\n this.authTokenProvider_\n .getToken(/*forceRefresh=*/ false)\n .then(authTokenData => {\n const authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n\n const url =\n (this.repoInfo_.secure ? 'https://' : 'http://') +\n this.repoInfo_.host +\n pathString +\n '?' +\n querystring(queryStringParameters);\n\n this.log_('Sending REST request for ' + url);\n const xhr = new XMLHttpRequest();\n xhr.onreadystatechange = () => {\n if (callback && xhr.readyState === 4) {\n this.log_(\n 'REST Response for ' + url + ' received. status:',\n xhr.status,\n 'response:',\n xhr.responseText\n );\n let res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = jsonEval(xhr.responseText);\n } catch (e) {\n warn(\n 'Failed to parse JSON response for ' +\n url +\n ': ' +\n xhr.responseText\n );\n }\n callback(null, res);\n } else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n warn(\n 'Got unsuccessful REST response for ' +\n url +\n ' Status: ' +\n xhr.status\n );\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n\n xhr.open('GET', url, /*asynchronous=*/ true);\n xhr.send();\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/ReadonlyRestClient.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport {\n generateWithValues,\n resolveDeferredValueSnapshot,\n resolveDeferredValueTree\n} from './util/ServerValues';\nimport { nodeFromJSON } from './snap/nodeFromJSON';\nimport { Path } from './util/Path';\nimport { SparseSnapshotTree } from './SparseSnapshotTree';\nimport { SyncTree } from './SyncTree';\nimport { SnapshotHolder } from './SnapshotHolder';\nimport { stringify } from '../../utils/json';\nimport { beingCrawled, each, exceptionGuard, warn, log } from './util/util';\nimport { map, forEach, isEmpty } from '../../utils/obj';\nimport { AuthTokenProvider } from './AuthTokenProvider';\nimport { StatsManager } from './stats/StatsManager';\nimport { StatsReporter } from './stats/StatsReporter';\nimport { StatsListener } from './stats/StatsListener';\nimport { EventQueue } from './view/EventQueue';\nimport { PersistentConnection } from './PersistentConnection';\nimport { ReadonlyRestClient } from './ReadonlyRestClient';\nimport { FirebaseApp } from '../../app/firebase_app';\nimport { RepoInfo } from './RepoInfo';\nimport { Database } from '../api/Database';\nimport { ServerActions } from './ServerActions';\nimport { Query } from '../api/Query';\nimport { EventRegistration } from './view/EventRegistration';\nimport { StatsCollection } from './stats/StatsCollection';\nimport { Event } from './view/Event';\nimport { Node } from './snap/Node';\n\nconst INTERRUPT_REASON = 'repo_interrupt';\n\n/**\n * A connection to a single data repository.\n */\nexport class Repo {\n dataUpdateCount = 0;\n private infoSyncTree_: SyncTree;\n private serverSyncTree_: SyncTree;\n\n private stats_: StatsCollection;\n private statsListener_: StatsListener | null = null;\n private eventQueue_ = new EventQueue();\n private nextWriteId_ = 1;\n private server_: ServerActions;\n private statsReporter_: StatsReporter;\n private transactions_init_: () => void;\n private infoData_: SnapshotHolder;\n private abortTransactions_: (path: Path) => Path;\n private rerunTransactions_: (changedPath: Path) => Path;\n private interceptServerDataCallback_:\n | ((a: string, b: any) => void)\n | null = null;\n private __database: Database;\n\n // A list of data pieces and paths to be set when this client disconnects.\n private onDisconnect_ = new SparseSnapshotTree();\n\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @type {?PersistentConnection}\n */\n persistentConnection_: PersistentConnection | null = null;\n\n /**\n * @param {!RepoInfo} repoInfo_\n * @param {boolean} forceRestClient\n * @param {!FirebaseApp} app\n */\n constructor(\n private repoInfo_: RepoInfo,\n forceRestClient: boolean,\n public app: FirebaseApp\n ) {\n /** @type {!AuthTokenProvider} */\n const authTokenProvider = new AuthTokenProvider(app);\n\n this.stats_ = StatsManager.getCollection(repoInfo_);\n\n if (forceRestClient || beingCrawled()) {\n this.server_ = new ReadonlyRestClient(\n this.repoInfo_,\n this.onDataUpdate_.bind(this),\n authTokenProvider\n );\n\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n } else {\n const authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if (typeof authOverride !== 'object') {\n throw new Error(\n 'Only objects are supported for option databaseAuthVariableOverride'\n );\n }\n try {\n stringify(authOverride);\n } catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n\n this.persistentConnection_ = new PersistentConnection(\n this.repoInfo_,\n this.onDataUpdate_.bind(this),\n this.onConnectStatus_.bind(this),\n this.onServerInfoUpdate_.bind(this),\n authTokenProvider,\n authOverride\n );\n\n this.server_ = this.persistentConnection_;\n }\n\n authTokenProvider.addTokenChangeListener(token => {\n this.server_.refreshAuthToken(token);\n });\n\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = StatsManager.getOrCreateReporter(\n repoInfo_,\n () => new StatsReporter(this.stats_, this.server_)\n );\n\n this.transactions_init_();\n\n // Used for .info.\n this.infoData_ = new SnapshotHolder();\n this.infoSyncTree_ = new SyncTree({\n startListening: (query, tag, currentHashFn, onComplete) => {\n let infoEvents: Event[] = [];\n const node = this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = this.infoSyncTree_.applyServerOverwrite(\n query.path,\n node\n );\n setTimeout(() => {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: () => {}\n });\n this.updateInfo_('connected', false);\n\n this.serverSyncTree_ = new SyncTree({\n startListening: (query, tag, currentHashFn, onComplete) => {\n this.server_.listen(query, currentHashFn, tag, (status, data) => {\n const events = onComplete(status, data);\n this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: (query, tag) => {\n this.server_.unlisten(query, tag);\n }\n });\n }\n\n /**\n * @return {string} The URL corresponding to the root of this Firebase.\n */\n toString(): string {\n return (\n (this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host\n );\n }\n\n /**\n * @return {!string} The namespace represented by the repo.\n */\n name(): string {\n return this.repoInfo_.namespace;\n }\n\n /**\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\n */\n serverTime(): number {\n const offsetNode = this.infoData_.getNode(\n new Path('.info/serverTimeOffset')\n );\n const offset = (offsetNode.val() as number) || 0;\n return new Date().getTime() + offset;\n }\n\n /**\n * Generate ServerValues using some variables from the repo object.\n * @return {!Object}\n */\n generateServerValues(): Object {\n return generateWithValues({\n timestamp: this.serverTime()\n });\n }\n\n /**\n * Called by realtime when we get new messages from the server.\n *\n * @private\n * @param {string} pathString\n * @param {*} data\n * @param {boolean} isMerge\n * @param {?number} tag\n */\n private onDataUpdate_(\n pathString: string,\n data: any,\n isMerge: boolean,\n tag: number | null\n ) {\n // For testing.\n this.dataUpdateCount++;\n const path = new Path(pathString);\n data = this.interceptServerDataCallback_\n ? this.interceptServerDataCallback_(pathString, data)\n : data;\n let events = [];\n if (tag) {\n if (isMerge) {\n const taggedChildren = map(data as { [k: string]: any }, (raw: any) =>\n nodeFromJSON(raw)\n );\n events = this.serverSyncTree_.applyTaggedQueryMerge(\n path,\n taggedChildren,\n tag\n );\n } else {\n const taggedSnap = nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(\n path,\n taggedSnap,\n tag\n );\n }\n } else if (isMerge) {\n const changedChildren = map(data as { [k: string]: any }, (raw: any) =>\n nodeFromJSON(raw)\n );\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n } else {\n const snap = nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n let affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n }\n\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @param {?function(!string, *):*} callback\n * @private\n */\n interceptServerData_(callback: ((a: string, b: any) => any) | null) {\n this.interceptServerDataCallback_ = callback;\n }\n\n /**\n * @param {!boolean} connectStatus\n * @private\n */\n private onConnectStatus_(connectStatus: boolean) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n }\n\n /**\n * @param {!Object} updates\n * @private\n */\n private onServerInfoUpdate_(updates: Object) {\n each(updates, (value: any, key: string) => {\n this.updateInfo_(key, value);\n });\n }\n\n /**\n *\n * @param {!string} pathString\n * @param {*} value\n * @private\n */\n private updateInfo_(pathString: string, value: any) {\n const path = new Path('/.info/' + pathString);\n const newNode = nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n const events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n }\n\n /**\n * @return {!number}\n * @private\n */\n private getNextWriteId_(): number {\n return this.nextWriteId_++;\n }\n\n /**\n * @param {!Path} path\n * @param {*} newVal\n * @param {number|string|null} newPriority\n * @param {?function(?Error, *=)} onComplete\n */\n setWithPriority(\n path: Path,\n newVal: any,\n newPriority: number | string | null,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n const serverValues = this.generateServerValues();\n const newNodeUnresolved = nodeFromJSON(newVal, newPriority);\n const newNode = resolveDeferredValueSnapshot(\n newNodeUnresolved,\n serverValues\n );\n\n const writeId = this.getNextWriteId_();\n const events = this.serverSyncTree_.applyUserOverwrite(\n path,\n newNode,\n writeId,\n true\n );\n this.eventQueue_.queueEvents(events);\n this.server_.put(\n path.toString(),\n newNodeUnresolved.val(/*export=*/ true),\n (status, errorReason) => {\n const success = status === 'ok';\n if (!success) {\n warn('set at ' + path + ' failed: ' + status);\n }\n\n const clearEvents = this.serverSyncTree_.ackUserWrite(\n writeId,\n !success\n );\n this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n const affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n }\n\n /**\n * @param {!Path} path\n * @param {!Object} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n update(\n path: Path,\n childrenToMerge: { [k: string]: any },\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n\n // Start with our existing data and merge each child into it.\n let empty = true;\n const serverValues = this.generateServerValues();\n const changedChildren: { [k: string]: Node } = {};\n forEach(childrenToMerge, (changedKey: string, changedValue: any) => {\n empty = false;\n const newNodeUnresolved = nodeFromJSON(changedValue);\n changedChildren[changedKey] = resolveDeferredValueSnapshot(\n newNodeUnresolved,\n serverValues\n );\n });\n\n if (!empty) {\n const writeId = this.getNextWriteId_();\n const events = this.serverSyncTree_.applyUserMerge(\n path,\n changedChildren,\n writeId\n );\n this.eventQueue_.queueEvents(events);\n this.server_.merge(\n path.toString(),\n childrenToMerge,\n (status, errorReason) => {\n const success = status === 'ok';\n if (!success) {\n warn('update at ' + path + ' failed: ' + status);\n }\n\n const clearEvents = this.serverSyncTree_.ackUserWrite(\n writeId,\n !success\n );\n const affectedPath =\n clearEvents.length > 0 ? this.rerunTransactions_(path) : path;\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n\n forEach(childrenToMerge, (changedPath: string) => {\n const affectedPath = this.abortTransactions_(path.child(changedPath));\n this.rerunTransactions_(affectedPath);\n });\n\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n } else {\n log(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n }\n\n /**\n * Applies all of the changes stored up in the onDisconnect_ tree.\n * @private\n */\n private runOnDisconnectEvents_() {\n this.log_('onDisconnectEvents');\n\n const serverValues = this.generateServerValues();\n const resolvedOnDisconnectTree = resolveDeferredValueTree(\n this.onDisconnect_,\n serverValues\n );\n let events: Event[] = [];\n\n resolvedOnDisconnectTree.forEachTree(Path.Empty, (path, snap) => {\n events = events.concat(\n this.serverSyncTree_.applyServerOverwrite(path, snap)\n );\n const affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n });\n\n this.onDisconnect_ = new SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path.Empty, events);\n }\n\n /**\n * @param {!Path} path\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectCancel(\n path: Path,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n this.server_.onDisconnectCancel(path.toString(), (status, errorReason) => {\n if (status === 'ok') {\n this.onDisconnect_.forget(path);\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n }\n\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectSet(\n path: Path,\n value: any,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n const newNode = nodeFromJSON(value);\n this.server_.onDisconnectPut(\n path.toString(),\n newNode.val(/*export=*/ true),\n (status, errorReason) => {\n if (status === 'ok') {\n this.onDisconnect_.remember(path, newNode);\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n }\n\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {*} priority\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectSetWithPriority(\n path: Path,\n value: any,\n priority: any,\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n const newNode = nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(\n path.toString(),\n newNode.val(/*export=*/ true),\n (status, errorReason) => {\n if (status === 'ok') {\n this.onDisconnect_.remember(path, newNode);\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n }\n\n /**\n * @param {!Path} path\n * @param {*} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n onDisconnectUpdate(\n path: Path,\n childrenToMerge: { [k: string]: any },\n onComplete: ((status: Error | null, errorReason?: string) => void) | null\n ) {\n if (isEmpty(childrenToMerge)) {\n log(\n \"onDisconnect().update() called with empty data. Don't do anything.\"\n );\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n\n this.server_.onDisconnectMerge(\n path.toString(),\n childrenToMerge,\n (status, errorReason) => {\n if (status === 'ok') {\n forEach(childrenToMerge, (childName: string, childNode: any) => {\n const newChildNode = nodeFromJSON(childNode);\n this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n this.callOnCompleteCallback(onComplete, status, errorReason);\n }\n );\n }\n\n /**\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n */\n addEventCallbackForQuery(query: Query, eventRegistration: EventRegistration) {\n let events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(\n query,\n eventRegistration\n );\n } else {\n events = this.serverSyncTree_.addEventRegistration(\n query,\n eventRegistration\n );\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n }\n\n /**\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration\n */\n removeEventCallbackForQuery(\n query: Query,\n eventRegistration: EventRegistration\n ) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n let events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(\n query,\n eventRegistration\n );\n } else {\n events = this.serverSyncTree_.removeEventRegistration(\n query,\n eventRegistration\n );\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n }\n\n interrupt() {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n }\n\n resume() {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n }\n\n stats(showDelta: boolean = false) {\n if (typeof console === 'undefined') return;\n\n let stats: { [k: string]: any };\n if (showDelta) {\n if (!this.statsListener_)\n this.statsListener_ = new StatsListener(this.stats_);\n stats = this.statsListener_.get();\n } else {\n stats = this.stats_.get();\n }\n\n const longestName = Object.keys(stats).reduce(\n (previousValue, currentValue) =>\n Math.max(currentValue.length, previousValue),\n 0\n );\n\n forEach(stats, (stat: string, value: any) => {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (let i = stat.length; i < longestName + 2; i++) stat += ' ';\n console.log(stat + value);\n });\n }\n\n statsIncrementCounter(metric: string) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n }\n\n /**\n * @param {...*} var_args\n * @private\n */\n private log_(...var_args: any[]) {\n let prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n log(prefix, ...var_args);\n }\n\n /**\n * @param {?function(?Error, *=)} callback\n * @param {!string} status\n * @param {?string=} errorReason\n */\n callOnCompleteCallback(\n callback: ((status: Error | null, errorReason?: string) => void) | null,\n status: string,\n errorReason?: string | null\n ) {\n if (callback) {\n exceptionGuard(function() {\n if (status == 'ok') {\n callback(null);\n } else {\n const code = (status || 'error').toUpperCase();\n let message = code;\n if (errorReason) message += ': ' + errorReason;\n\n const error = new Error(message);\n (error as any).code = code;\n callback(error);\n }\n });\n }\n }\n\n get database(): Database {\n return this.__database || (this.__database = new Database(this));\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/Repo.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { IndexedFilter } from './IndexedFilter';\nimport { PRIORITY_INDEX } from '../../snap/indexes/PriorityIndex';\nimport { NamedNode, Node } from '../../../core/snap/Node';\nimport { ChildrenNode } from '../../snap/ChildrenNode';\nimport { NodeFilter } from './NodeFilter';\nimport { QueryParams } from '../QueryParams';\nimport { Index } from '../../snap/indexes/Index';\nimport { Path } from '../../util/Path';\nimport { CompleteChildSource } from '../CompleteChildSource';\nimport { ChildChangeAccumulator } from '../ChildChangeAccumulator';\n\n/**\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\n *\n * @constructor\n * @implements {NodeFilter}\n */\nexport class RangedFilter implements NodeFilter {\n /**\n * @type {!IndexedFilter}\n * @const\n * @private\n */\n private indexedFilter_: IndexedFilter;\n\n /**\n * @const\n * @type {!Index}\n * @private\n */\n private index_: Index;\n\n /**\n * @const\n * @type {!NamedNode}\n * @private\n */\n private startPost_: NamedNode;\n\n /**\n * @const\n * @type {!NamedNode}\n * @private\n */\n private endPost_: NamedNode;\n\n /**\n * @param {!QueryParams} params\n */\n constructor(params: QueryParams) {\n this.indexedFilter_ = new IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n\n /**\n * @return {!NamedNode}\n */\n getStartPost(): NamedNode {\n return this.startPost_;\n }\n\n /**\n * @return {!NamedNode}\n */\n getEndPost(): NamedNode {\n return this.endPost_;\n }\n\n /**\n * @param {!NamedNode} node\n * @return {boolean}\n */\n matches(node: NamedNode): boolean {\n return (\n this.index_.compare(this.getStartPost(), node) <= 0 &&\n this.index_.compare(node, this.getEndPost()) <= 0\n );\n }\n\n /**\n * @inheritDoc\n */\n updateChild(\n snap: Node,\n key: string,\n newChild: Node,\n affectedPath: Path,\n source: CompleteChildSource,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (!this.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(\n snap,\n key,\n newChild,\n affectedPath,\n source,\n optChangeAccumulator\n );\n }\n\n /**\n * @inheritDoc\n */\n updateFullNode(\n oldSnap: Node,\n newSnap: Node,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode.EMPTY_NODE;\n }\n let filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode.EMPTY_NODE);\n const self = this;\n newSnap.forEachChild(PRIORITY_INDEX, function(key, childNode) {\n if (!self.matches(new NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(\n oldSnap,\n filtered,\n optChangeAccumulator\n );\n }\n\n /**\n * @inheritDoc\n */\n updatePriority(oldSnap: Node, newPriority: Node): Node {\n // Don't support priorities on queries\n return oldSnap;\n }\n\n /**\n * @inheritDoc\n */\n filtersNodes(): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n getIndexedFilter(): IndexedFilter {\n return this.indexedFilter_;\n }\n\n /**\n * @inheritDoc\n */\n getIndex(): Index {\n return this.index_;\n }\n\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n private static getStartPost_(params: QueryParams): NamedNode {\n if (params.hasStart()) {\n const startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n } else {\n return params.getIndex().minPost();\n }\n }\n\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n private static getEndPost_(params: QueryParams): NamedNode {\n if (params.hasEnd()) {\n const endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n } else {\n return params.getIndex().maxPost();\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/filter/RangedFilter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { RangedFilter } from './RangedFilter';\nimport { ChildrenNode } from '../../snap/ChildrenNode';\nimport { Node, NamedNode } from '../../snap/Node';\nimport { assert } from '../../../../utils/assert';\nimport { Change } from '../Change';\nimport { NodeFilter } from './NodeFilter';\nimport { Index } from '../../snap/indexes/Index';\nimport { IndexedFilter } from './IndexedFilter';\nimport { QueryParams } from '../QueryParams';\nimport { Path } from '../../util/Path';\nimport { CompleteChildSource } from '../CompleteChildSource';\nimport { ChildChangeAccumulator } from '../ChildChangeAccumulator';\n\n/**\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\n *\n * @constructor\n * @implements {NodeFilter}\n */\nexport class LimitedFilter implements NodeFilter {\n /**\n * @const\n * @type {RangedFilter}\n * @private\n */\n private readonly rangedFilter_: RangedFilter;\n\n /**\n * @const\n * @type {!Index}\n * @private\n */\n private readonly index_: Index;\n\n /**\n * @const\n * @type {number}\n * @private\n */\n private readonly limit_: number;\n\n /**\n * @const\n * @type {boolean}\n * @private\n */\n private readonly reverse_: boolean;\n\n /**\n * @param {!QueryParams} params\n */\n constructor(params: QueryParams) {\n this.rangedFilter_ = new RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n\n /**\n * @inheritDoc\n */\n updateChild(\n snap: Node,\n key: string,\n newChild: Node,\n affectedPath: Path,\n source: CompleteChildSource,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n if (!this.rangedFilter_.matches(new NamedNode(key, newChild))) {\n newChild = ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n } else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_\n .getIndexedFilter()\n .updateChild(\n snap,\n key,\n newChild,\n affectedPath,\n source,\n optChangeAccumulator\n );\n } else {\n return this.fullLimitUpdateChild_(\n snap,\n key,\n newChild,\n source,\n optChangeAccumulator\n );\n }\n }\n\n /**\n * @inheritDoc\n */\n updateFullNode(\n oldSnap: Node,\n newSnap: Node,\n optChangeAccumulator: ChildChangeAccumulator | null\n ): Node {\n let filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n } else {\n if (\n this.limit_ * 2 < newSnap.numChildren() &&\n newSnap.isIndexed(this.index_)\n ) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n let iterator;\n if (this.reverse_) {\n iterator = (newSnap as ChildrenNode).getReverseIteratorFrom(\n this.rangedFilter_.getEndPost(),\n this.index_\n );\n } else {\n iterator = (newSnap as ChildrenNode).getIteratorFrom(\n this.rangedFilter_.getStartPost(),\n this.index_\n );\n }\n let count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n const next = iterator.getNext();\n let inRange;\n if (this.reverse_) {\n inRange =\n this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n } else {\n inRange =\n this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n } else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n } else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(\n ChildrenNode.EMPTY_NODE\n ) as ChildrenNode;\n let startPost;\n let endPost;\n let cmp;\n let iterator;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n const indexCompare = this.index_.getCompare();\n cmp = (a: NamedNode, b: NamedNode) => indexCompare(b, a);\n } else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n\n let count = 0;\n let foundStartPost = false;\n while (iterator.hasNext()) {\n let next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n let inRange =\n foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n } else {\n filtered = filtered.updateImmediateChild(\n next.name,\n ChildrenNode.EMPTY_NODE\n );\n }\n }\n }\n }\n return this.rangedFilter_\n .getIndexedFilter()\n .updateFullNode(oldSnap, filtered, optChangeAccumulator);\n }\n\n /**\n * @inheritDoc\n */\n updatePriority(oldSnap: Node, newPriority: Node): Node {\n // Don't support priorities on queries\n return oldSnap;\n }\n\n /**\n * @inheritDoc\n */\n filtersNodes(): boolean {\n return true;\n }\n\n /**\n * @inheritDoc\n */\n getIndexedFilter(): IndexedFilter {\n return this.rangedFilter_.getIndexedFilter();\n }\n\n /**\n * @inheritDoc\n */\n getIndex(): Index {\n return this.index_;\n }\n\n /**\n * @param {!Node} snap\n * @param {string} childKey\n * @param {!Node} childSnap\n * @param {!CompleteChildSource} source\n * @param {?ChildChangeAccumulator} changeAccumulator\n * @return {!Node}\n * @private\n */\n private fullLimitUpdateChild_(\n snap: Node,\n childKey: string,\n childSnap: Node,\n source: CompleteChildSource,\n changeAccumulator: ChildChangeAccumulator | null\n ): Node {\n // TODO: rename all cache stuff etc to general snap terminology\n let cmp;\n if (this.reverse_) {\n const indexCmp = this.index_.getCompare();\n cmp = (a: NamedNode, b: NamedNode) => indexCmp(b, a);\n } else {\n cmp = this.index_.getCompare();\n }\n const oldEventCache = snap as ChildrenNode;\n assert(oldEventCache.numChildren() == this.limit_, '');\n const newChildNamedNode = new NamedNode(childKey, childSnap);\n const windowBoundary = this.reverse_\n ? oldEventCache.getFirstChild(this.index_)\n : oldEventCache.getLastChild(this.index_) as NamedNode;\n const inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n const oldChildSnap = oldEventCache.getImmediateChild(childKey);\n let nextChild = source.getChildAfterChild(\n this.index_,\n windowBoundary,\n this.reverse_\n );\n while (\n nextChild != null &&\n (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))\n ) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(\n this.index_,\n nextChild,\n this.reverse_\n );\n }\n const compareNext =\n nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n const remainsInWindow =\n inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childChangedChange(childKey, childSnap, oldChildSnap)\n );\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n } else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childRemovedChange(childKey, oldChildSnap)\n );\n }\n const newEventCache = oldEventCache.updateImmediateChild(\n childKey,\n ChildrenNode.EMPTY_NODE\n );\n const nextChildInRange =\n nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childAddedChange(nextChild.name, nextChild.node)\n );\n }\n return newEventCache.updateImmediateChild(\n nextChild.name,\n nextChild.node\n );\n } else {\n return newEventCache;\n }\n }\n } else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n } else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(\n Change.childRemovedChange(windowBoundary.name, windowBoundary.node)\n );\n changeAccumulator.trackChildChange(\n Change.childAddedChange(childKey, childSnap)\n );\n }\n return oldEventCache\n .updateImmediateChild(childKey, childSnap)\n .updateImmediateChild(windowBoundary.name, ChildrenNode.EMPTY_NODE);\n } else {\n return snap;\n }\n } else {\n return snap;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/filter/LimitedFilter.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { MIN_NAME, MAX_NAME } from '../util/util';\nimport { KEY_INDEX } from '../snap/indexes/KeyIndex';\nimport { PRIORITY_INDEX } from '../snap/indexes/PriorityIndex';\nimport { VALUE_INDEX } from '../snap/indexes/ValueIndex';\nimport { PathIndex } from '../snap/indexes/PathIndex';\nimport { IndexedFilter } from './filter/IndexedFilter';\nimport { LimitedFilter } from './filter/LimitedFilter';\nimport { RangedFilter } from './filter/RangedFilter';\nimport { stringify } from '../../../utils/json';\nimport { NodeFilter } from './filter/NodeFilter';\nimport { Index } from '../snap/indexes/Index';\n\n/**\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\n * user-facing API level, so it is not done here.\n * @constructor\n */\nexport class QueryParams {\n private limitSet_ = false;\n private startSet_ = false;\n private startNameSet_ = false;\n private endSet_ = false;\n private endNameSet_ = false;\n\n private limit_ = 0;\n private viewFrom_ = '';\n private indexStartValue_: any | null = null;\n private indexStartName_ = '';\n private indexEndValue_: any | null = null;\n private indexEndName_ = '';\n\n private index_ = PRIORITY_INDEX;\n\n /**\n * Wire Protocol Constants\n * @const\n * @enum {string}\n * @private\n */\n private static readonly WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n\n /**\n * REST Query Constants\n * @const\n * @enum {string}\n * @private\n */\n private static readonly REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n\n /**\n * Default, empty query parameters\n * @type {!QueryParams}\n * @const\n */\n static readonly DEFAULT = new QueryParams();\n\n /**\n * @return {boolean}\n */\n hasStart(): boolean {\n return this.startSet_;\n }\n\n /**\n * @return {boolean} True if it would return from left.\n */\n isViewFromLeft(): boolean {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n } else {\n return (\n this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT\n );\n }\n }\n\n /**\n * Only valid to call if hasStart() returns true\n * @return {*}\n */\n getIndexStartValue(): any {\n assert(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n }\n\n /**\n * Only valid to call if hasStart() returns true.\n * Returns the starting key name for the range defined by these query parameters\n * @return {!string}\n */\n getIndexStartName(): string {\n assert(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n } else {\n return MIN_NAME;\n }\n }\n\n /**\n * @return {boolean}\n */\n hasEnd(): boolean {\n return this.endSet_;\n }\n\n /**\n * Only valid to call if hasEnd() returns true.\n * @return {*}\n */\n getIndexEndValue(): any {\n assert(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n }\n\n /**\n * Only valid to call if hasEnd() returns true.\n * Returns the end key name for the range defined by these query parameters\n * @return {!string}\n */\n getIndexEndName(): string {\n assert(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n } else {\n return MAX_NAME;\n }\n }\n\n /**\n * @return {boolean}\n */\n hasLimit(): boolean {\n return this.limitSet_;\n }\n\n /**\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\n */\n hasAnchoredLimit(): boolean {\n return this.limitSet_ && this.viewFrom_ !== '';\n }\n\n /**\n * Only valid to call if hasLimit() returns true\n * @return {!number}\n */\n getLimit(): number {\n assert(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n }\n\n /**\n * @return {!Index}\n */\n getIndex(): Index {\n return this.index_;\n }\n\n /**\n * @return {!QueryParams}\n * @private\n */\n private copy_(): QueryParams {\n const copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n }\n\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n limit(newLimit: number): QueryParams {\n const newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n }\n\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n limitToFirst(newLimit: number): QueryParams {\n const newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n }\n\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n limitToLast(newLimit: number): QueryParams {\n const newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n }\n\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n startAt(indexValue: any, key?: string | null): QueryParams {\n const newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n } else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n }\n\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n endAt(indexValue: any, key?: string | null): QueryParams {\n const newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n } else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n }\n\n /**\n * @param {!Index} index\n * @return {!QueryParams}\n */\n orderBy(index: Index): QueryParams {\n const newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n }\n\n /**\n * @return {!Object}\n */\n getQueryObject(): Object {\n const WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n const obj: { [k: string]: any } = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n let viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n } else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n }\n\n /**\n * @return {boolean}\n */\n loadsAllData(): boolean {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n }\n\n /**\n * @return {boolean}\n */\n isDefault(): boolean {\n return this.loadsAllData() && this.index_ == PRIORITY_INDEX;\n }\n\n /**\n * @return {!NodeFilter}\n */\n getNodeFilter(): NodeFilter {\n if (this.loadsAllData()) {\n return new IndexedFilter(this.getIndex());\n } else if (this.hasLimit()) {\n return new LimitedFilter(this);\n } else {\n return new RangedFilter(this);\n }\n }\n\n /**\n * Returns a set of REST query string parameters representing this query.\n *\n * @return {!Object.} query string parameters\n */\n toRestQueryStringParameters(): { [k: string]: any } {\n const REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n const qs: { [k: string]: string | number } = {};\n\n if (this.isDefault()) {\n return qs;\n }\n\n let orderBy;\n if (this.index_ === PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n } else if (this.index_ === VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n } else if (this.index_ === KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n } else {\n assert(this.index_ instanceof PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = stringify(orderBy);\n\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = stringify(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + stringify(this.indexStartName_);\n }\n }\n\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = stringify(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + stringify(this.indexEndName_);\n }\n }\n\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n } else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n\n return qs;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/view/QueryParams.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { OnDisconnect } from './onDisconnect';\nimport { TransactionResult } from './TransactionResult';\nimport { warn } from '../core/util/util';\nimport { nextPushId } from '../core/util/NextPushId';\nimport { Query } from './Query';\nimport { Repo } from '../core/Repo';\nimport { Path } from '../core/util/Path';\nimport { QueryParams } from '../core/view/QueryParams';\nimport {\n validateRootPathString,\n validatePathString,\n validateFirebaseMergeDataArg,\n validateBoolean,\n validatePriority,\n validateFirebaseDataArg,\n validateWritablePath\n} from '../core/util/validation';\nimport { validateArgCount, validateCallback } from '../../utils/validation';\nimport {\n Deferred,\n attachDummyErrorHandler,\n PromiseImpl\n} from '../../utils/promise';\nimport { SyncPoint } from '../core/SyncPoint';\nimport { Database } from './Database';\nimport { DataSnapshot } from './DataSnapshot';\n\nexport interface ReferenceConstructor {\n new (repo: Repo, path: Path): Reference;\n}\n\nexport class Reference extends Query {\n public then: (a?: any) => Promise;\n public catch: (a?: Error) => Promise;\n\n /**\n * Call options:\n * new Reference(Repo, Path) or\n * new Reference(url: string, string|RepoManager)\n *\n * Externally - this is the firebase.database.Reference type.\n *\n * @param {!Repo} repo\n * @param {(!Path)} path\n * @extends {Query}\n */\n constructor(repo: Repo, path: Path) {\n if (!(repo instanceof Repo)) {\n throw new Error(\n 'new Reference() no longer supported - use app.database().'\n );\n }\n\n // call Query's constructor, passing in the repo and path.\n super(repo, path, QueryParams.DEFAULT, false);\n }\n\n /** @return {?string} */\n getKey(): string | null {\n validateArgCount('Reference.key', 0, 0, arguments.length);\n\n if (this.path.isEmpty()) return null;\n else return this.path.getBack();\n }\n\n /**\n * @param {!(string|Path)} pathString\n * @return {!Reference}\n */\n child(pathString: string | Path): Reference {\n validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n } else if (!(pathString instanceof Path)) {\n if (this.path.getFront() === null)\n validateRootPathString('Reference.child', 1, pathString, false);\n else validatePathString('Reference.child', 1, pathString, false);\n }\n\n return new Reference(this.repo, this.path.child(pathString));\n }\n\n /** @return {?Reference} */\n getParent(): Reference | null {\n validateArgCount('Reference.parent', 0, 0, arguments.length);\n\n const parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n }\n\n /** @return {!Reference} */\n getRoot(): Reference {\n validateArgCount('Reference.root', 0, 0, arguments.length);\n\n let ref = this as any;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n }\n\n /** @return {!Database} */\n databaseProp(): Database {\n return this.repo.database;\n }\n\n /**\n * @param {*} newVal\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n set(newVal: any, onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('Reference.set', 1, 2, arguments.length);\n validateWritablePath('Reference.set', this.path);\n validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n validateCallback('Reference.set', 2, onComplete, true);\n\n const deferred = new Deferred();\n this.repo.setWithPriority(\n this.path,\n newVal,\n /*priority=*/ null,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n update(\n objectToMerge: Object,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('Reference.update', 1, 2, arguments.length);\n validateWritablePath('Reference.update', this.path);\n\n if (Array.isArray(objectToMerge)) {\n const newObjectToMerge: { [k: string]: any } = {};\n for (let i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n warn(\n 'Passing an Array to Firebase.update() is deprecated. ' +\n 'Use set() if you want to overwrite the existing data, or ' +\n 'an Object with integer keys if you really do want to ' +\n 'only update some of the children.'\n );\n }\n validateFirebaseMergeDataArg(\n 'Reference.update',\n 1,\n objectToMerge,\n this.path,\n false\n );\n validateCallback('Reference.update', 2, onComplete, true);\n const deferred = new Deferred();\n this.repo.update(\n this.path,\n objectToMerge,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*} newVal\n * @param {string|number|null} newPriority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n setWithPriority(\n newVal: any,\n newPriority: string | number | null,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validateWritablePath('Reference.setWithPriority', this.path);\n validateFirebaseDataArg(\n 'Reference.setWithPriority',\n 1,\n newVal,\n this.path,\n false\n );\n validatePriority('Reference.setWithPriority', 2, newPriority, false);\n validateCallback('Reference.setWithPriority', 3, onComplete, true);\n\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.setWithPriority failed: ' +\n this.getKey() +\n ' is a read-only object.';\n\n const deferred = new Deferred();\n this.repo.setWithPriority(\n this.path,\n newVal,\n newPriority,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n remove(onComplete?: (a: Error | null) => void): Promise {\n validateArgCount('Reference.remove', 0, 1, arguments.length);\n validateWritablePath('Reference.remove', this.path);\n validateCallback('Reference.remove', 1, onComplete, true);\n\n return this.set(null, onComplete);\n }\n\n /**\n * @param {function(*):*} transactionUpdate\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\n * @param {boolean=} applyLocally\n * @return {!Promise}\n */\n transaction(\n transactionUpdate: (a: any) => any,\n onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => void,\n applyLocally?: boolean\n ): Promise {\n validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validateWritablePath('Reference.transaction', this.path);\n validateCallback('Reference.transaction', 1, transactionUpdate, false);\n validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validateBoolean('Reference.transaction', 3, applyLocally, true);\n\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.transaction failed: ' +\n this.getKey() +\n ' is a read-only object.';\n\n if (applyLocally === undefined) applyLocally = true;\n\n const deferred = new Deferred();\n if (typeof onComplete === 'function') {\n attachDummyErrorHandler(deferred.promise);\n }\n\n const promiseComplete = function(\n error: Error,\n committed: boolean,\n snapshot: DataSnapshot\n ) {\n if (error) {\n deferred.reject(error);\n } else {\n deferred.resolve(new TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(\n this.path,\n transactionUpdate,\n promiseComplete,\n applyLocally\n );\n\n return deferred.promise;\n }\n\n /**\n * @param {string|number|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n setPriority(\n priority: string | number | null,\n onComplete?: (a: Error | null) => void\n ): Promise {\n validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validateWritablePath('Reference.setPriority', this.path);\n validatePriority('Reference.setPriority', 1, priority, false);\n validateCallback('Reference.setPriority', 2, onComplete, true);\n\n const deferred = new Deferred();\n this.repo.setWithPriority(\n this.path.child('.priority'),\n priority,\n null,\n deferred.wrapCallback(onComplete)\n );\n return deferred.promise;\n }\n\n /**\n * @param {*=} value\n * @param {function(?Error)=} onComplete\n * @return {!Reference}\n */\n push(value?: any, onComplete?: (a: Error | null) => void): Reference {\n validateArgCount('Reference.push', 0, 2, arguments.length);\n validateWritablePath('Reference.push', this.path);\n validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n validateCallback('Reference.push', 2, onComplete, true);\n\n const now = this.repo.serverTime();\n const name = nextPushId(now);\n\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n const thennablePushRef = this.child(name);\n const pushRef = this.child(name);\n\n let promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(() => pushRef);\n } else {\n promise = PromiseImpl.resolve(pushRef);\n }\n\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n\n if (typeof onComplete === 'function') {\n attachDummyErrorHandler(promise);\n }\n\n return thennablePushRef;\n }\n\n /**\n * @return {!OnDisconnect}\n */\n onDisconnect(): OnDisconnect {\n validateWritablePath('Reference.onDisconnect', this.path);\n return new OnDisconnect(this.repo, this.path);\n }\n\n get database(): Database {\n return this.databaseProp();\n }\n\n get key(): string | null {\n return this.getKey();\n }\n\n get parent(): Reference | null {\n return this.getParent();\n }\n\n get root(): Reference {\n return this.getRoot();\n }\n}\n\n/**\n * Define reference constructor in various modules\n *\n * We are doing this here to avoid several circular\n * dependency issues\n */\nQuery.__referenceConstructor = Reference;\nSyncPoint.__referenceConstructor = Reference;\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/Reference.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../utils/assert';\nimport { Reference } from '../api/Reference';\nimport { DataSnapshot } from '../api/DataSnapshot';\nimport { Path } from './util/Path';\nimport { Tree } from './util/Tree';\nimport { PRIORITY_INDEX } from './snap/indexes/PriorityIndex';\nimport { Node } from './snap/Node';\nimport { LUIDGenerator, warn, exceptionGuard } from './util/util';\nimport { resolveDeferredValueSnapshot } from './util/ServerValues';\nimport { isValidPriority, validateFirebaseData } from './util/validation';\nimport { contains, safeGet } from '../../utils/obj';\nimport { nodeFromJSON } from './snap/nodeFromJSON';\nimport { ChildrenNode } from './snap/ChildrenNode';\nimport { Repo } from './Repo';\nimport { Event } from './view/Event';\n\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n\n/**\n * @enum {number}\n */\nexport enum TransactionStatus {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n RUN,\n\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n SENT,\n\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n COMPLETED,\n\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n SENT_NEEDS_ABORT,\n\n // Temporary state used to mark transactions that need to be aborted.\n NEEDS_ABORT\n}\n\n/**\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\n * @type {number}\n * @const\n * @private\n */\n(Repo as any).MAX_TRANSACTION_RETRIES_ = 25;\n\n/**\n * @typedef {{\n * path: !Path,\n * update: function(*):*,\n * onComplete: ?function(?Error, boolean, ?DataSnapshot),\n * status: ?TransactionStatus,\n * order: !number,\n * applyLocally: boolean,\n * retryCount: !number,\n * unwatcher: function(),\n * abortReason: ?string,\n * currentWriteId: !number,\n * currentInputSnapshot: ?Node,\n * currentOutputSnapshotRaw: ?Node,\n * currentOutputSnapshotResolved: ?Node\n * }}\n */\ntype Transaction = {\n path: Path;\n update: (a: any) => any;\n onComplete: (a: Error | null, b: boolean, c: DataSnapshot | null) => void;\n status: TransactionStatus;\n order: number;\n applyLocally: boolean;\n retryCount: number;\n unwatcher: () => void;\n abortReason: string | null;\n currentWriteId: number;\n currentInputSnapshot: Node | null;\n currentOutputSnapshotRaw: Node | null;\n currentOutputSnapshotResolved: Node | null;\n};\n\n/**\n * Setup the transaction data structures\n * @private\n */\n(Repo.prototype as any).transactions_init_ = function() {\n /**\n * Stores queues of outstanding transactions for Firebase locations.\n *\n * @type {!Tree.>}\n * @private\n */\n this.transactionQueueTree_ = new Tree();\n};\n\ndeclare module './Repo' {\n interface Repo {\n startTransaction(\n path: Path,\n transactionUpdate: (a: any) => void,\n onComplete: ((a: Error, b: boolean, c: DataSnapshot) => void) | null,\n applyLocally: boolean\n ): void;\n }\n}\n\n/**\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\n *\n * @param {!Path} path Path at which to do transaction.\n * @param {function(*):*} transactionUpdate Update callback.\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\n */\nRepo.prototype.startTransaction = function(\n path: Path,\n transactionUpdate: (a: any) => any,\n onComplete: ((a: Error, b: boolean, c: DataSnapshot) => void) | null,\n applyLocally: boolean\n) {\n this.log_('transaction on ' + path);\n\n // Add a watch to make sure we get server updates.\n const valueCallback = function() {};\n const watchRef = new Reference(this, path);\n watchRef.on('value', valueCallback);\n const unwatcher = function() {\n watchRef.off('value', valueCallback);\n };\n\n // Initialize transaction.\n const transaction: Transaction = {\n path,\n update: transactionUpdate,\n onComplete,\n\n // One of TransactionStatus enums.\n status: null,\n\n // Used when combining transactions at different locations to figure out which one goes first.\n order: LUIDGenerator(),\n\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n\n // Function to call to clean up our .on() listener.\n unwatcher,\n\n // Stores why a transaction was aborted.\n abortReason: null,\n\n currentWriteId: null,\n\n currentInputSnapshot: null,\n\n currentOutputSnapshotRaw: null,\n\n currentOutputSnapshotResolved: null\n };\n\n // Run transaction initially.\n const currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n const newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n const snapshot = new DataSnapshot(\n transaction.currentInputSnapshot,\n new Reference(this, transaction.path),\n PRIORITY_INDEX\n );\n transaction.onComplete(null, false, snapshot);\n }\n } else {\n validateFirebaseData(\n 'transaction failed: Data returned ',\n newVal,\n transaction.path\n );\n\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n const queueNode = this.transactionQueueTree_.subTree(path);\n const nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n\n queueNode.setValue(nodeQueue);\n\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n let priorityForNode;\n if (\n typeof newVal === 'object' &&\n newVal !== null &&\n contains(newVal, '.priority')\n ) {\n priorityForNode = safeGet(newVal, '.priority');\n assert(\n isValidPriority(priorityForNode),\n 'Invalid priority returned by transaction. ' +\n 'Priority must be a valid string, finite number, server value, or null.'\n );\n } else {\n const currentNode =\n this.serverSyncTree_.calcCompleteEventCache(path) ||\n ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n\n const serverValues = this.generateServerValues();\n const newNodeUnresolved = nodeFromJSON(newVal, priorityForNode);\n const newNode = resolveDeferredValueSnapshot(\n newNodeUnresolved,\n serverValues\n );\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n\n const events = this.serverSyncTree_.applyUserOverwrite(\n path,\n newNode,\n transaction.currentWriteId,\n transaction.applyLocally\n );\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n\n this.sendReadyTransactions_();\n }\n};\n\n/**\n * @param {!Path} path\n * @param {Array.=} excludeSets A specific set to exclude\n * @return {Node}\n * @private\n */\n(Repo.prototype as any).getLatestState_ = function(\n path: Path,\n excludeSets?: number[]\n): Node {\n return (\n this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) ||\n ChildrenNode.EMPTY_NODE\n );\n};\n\n/**\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\n * complete.\n *\n * Externally it's called with no arguments, but it calls itself recursively with a particular\n * transactionQueueTree node to recurse through the tree.\n *\n * @param {Tree.>=} node transactionQueueTree node to start at.\n * @private\n */\n(Repo.prototype as any).sendReadyTransactions_ = function(\n node: Tree = this.transactionQueueTree_\n) {\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n\n if (node.getValue() !== null) {\n const queue = this.buildTransactionQueue_(node);\n assert(queue.length > 0, 'Sending zero length transaction queue');\n\n const allRun = queue.every(\n (transaction: Transaction) => transaction.status === TransactionStatus.RUN\n );\n\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n } else if (node.hasChildren()) {\n node.forEachChild(childNode => {\n this.sendReadyTransactions_(childNode);\n });\n }\n};\n\n/**\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\n *\n * @param {!Path} path The location of the queue.\n * @param {!Array.} queue Queue of transactions under the specified location.\n * @private\n */\n(Repo.prototype as any).sendTransactionQueue_ = function(\n path: Path,\n queue: Array\n) {\n // Mark transactions as sent and increment retry count!\n const setsToIgnore = queue.map(function(txn) {\n return txn.currentWriteId;\n });\n const latestState = this.getLatestState_(path, setsToIgnore);\n let snapToSend = latestState;\n const latestHash = latestState.hash();\n for (let i = 0; i < queue.length; i++) {\n const txn = queue[i];\n assert(\n txn.status === TransactionStatus.RUN,\n 'tryToSendTransactionQueue_: items in queue should all be run.'\n );\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n const relativePath = Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(\n relativePath /**@type {!Node} */,\n txn.currentOutputSnapshotRaw\n );\n }\n\n const dataToSend = snapToSend.val(true);\n const pathToSend = path;\n\n // Send the put.\n this.server_.put(\n pathToSend.toString(),\n dataToSend,\n (status: string) => {\n this.log_('transaction put response', {\n path: pathToSend.toString(),\n status\n });\n\n let events: Event[] = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n const callbacks = [];\n for (let i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId)\n );\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n const node = queue[i].currentOutputSnapshotResolved as Node;\n const ref = new Reference(this, queue[i].path);\n const snapshot = new DataSnapshot(node, ref, PRIORITY_INDEX);\n callbacks.push(\n queue[i].onComplete.bind(null, null, true, snapshot)\n );\n }\n queue[i].unwatcher();\n }\n\n // Now remove the completed transactions.\n this.pruneCompletedTransactionsBelowNode_(\n this.transactionQueueTree_.subTree(path)\n );\n // There may be pending transactions that we can now send.\n this.sendReadyTransactions_();\n\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n\n // Finally, trigger onComplete callbacks.\n for (let i = 0; i < callbacks.length; i++) {\n exceptionGuard(callbacks[i]);\n }\n } else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (let i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT)\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n else queue[i].status = TransactionStatus.RUN;\n }\n } else {\n warn(\n 'transaction at ' + pathToSend.toString() + ' failed: ' + status\n );\n for (let i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n\n this.rerunTransactions_(path);\n }\n },\n latestHash\n );\n};\n\n/**\n * Finds all transactions dependent on the data at changedPath and reruns them.\n *\n * Should be called any time cached data changes.\n *\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\n * be raised for.\n *\n * @param {!Path} changedPath The path in mergedData that changed.\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\n * @private\n */\n(Repo.prototype as any).rerunTransactions_ = function(changedPath: Path): Path {\n const rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n const path = rootMostTransactionNode.path();\n\n const queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n\n return path;\n};\n\n/**\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\n *\n * @param {Array.} queue The queue of transactions to run.\n * @param {!Path} path The path the queue is for.\n * @private\n */\n(Repo.prototype as any).rerunTransactionQueue_ = function(\n queue: Array,\n path: Path\n) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n const callbacks = [];\n let events: Event[] = [];\n // Ignore all of the sets we're going to re-run.\n const txnsToRerun = queue.filter(function(q) {\n return q.status === TransactionStatus.RUN;\n });\n const setsToIgnore = txnsToRerun.map(function(q) {\n return q.currentWriteId;\n });\n for (let i = 0; i < queue.length; i++) {\n const transaction = queue[i];\n const relativePath = Path.relativePath(path, transaction.path);\n let abortTransaction = false,\n abortReason;\n assert(\n relativePath !== null,\n 'rerunTransactionsUnderNode_: relativePath should not be null.'\n );\n\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true)\n );\n } else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= (Repo as any).MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true)\n );\n } else {\n // This code reruns a transaction\n const currentNode = this.getLatestState_(\n transaction.path,\n setsToIgnore\n );\n transaction.currentInputSnapshot = currentNode;\n const newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validateFirebaseData(\n 'transaction failed: Data returned ',\n newData,\n transaction.path\n );\n let newDataNode = nodeFromJSON(newData);\n const hasExplicitPriority =\n typeof newData === 'object' &&\n newData != null &&\n contains(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n\n const oldWriteId = transaction.currentWriteId;\n const serverValues = this.generateServerValues();\n const newNodeResolved = resolveDeferredValueSnapshot(\n newDataNode,\n serverValues\n );\n\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(\n this.serverSyncTree_.applyUserOverwrite(\n transaction.path,\n newNodeResolved,\n transaction.currentWriteId,\n transaction.applyLocally\n )\n );\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(oldWriteId, true)\n );\n } else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true)\n );\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function(unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n const ref = new Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n const lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n const snapshot = new DataSnapshot(lastInput, ref, PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n } else {\n callbacks.push(\n queue[i].onComplete.bind(null, new Error(abortReason), false, null)\n );\n }\n }\n }\n }\n\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n\n // Now fire callbacks, now that we're in a good, known state.\n for (let i = 0; i < callbacks.length; i++) {\n exceptionGuard(callbacks[i]);\n }\n\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n\n/**\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\n * the node for the given path if there are no pending transactions on any ancestor.\n *\n * @param {!Path} path The location to start at.\n * @return {!Tree.>} The rootmost node with a transaction.\n * @private\n */\n(Repo.prototype as any).getAncestorTransactionNode_ = function(\n path: Path\n): Tree {\n let front;\n\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n let transactionNode = this.transactionQueueTree_;\n while (\n (front = path.getFront()) !== null &&\n transactionNode.getValue() === null\n ) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n\n return transactionNode;\n};\n\n/**\n * Builds the queue of all transactions at or below the specified transactionNode.\n *\n * @param {!Tree.>} transactionNode\n * @return {Array.} The generated queue.\n * @private\n */\n(Repo.prototype as any).buildTransactionQueue_ = function(\n transactionNode: Tree\n): Array {\n // Walk any child transaction queues and aggregate them into a single queue.\n const transactionQueue: Transaction[] = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function(a, b) {\n return a.order - b.order;\n });\n\n return transactionQueue;\n};\n\n/**\n * @param {!Tree.>} node\n * @param {Array.} queue\n * @private\n */\n(Repo.prototype as any).aggregateTransactionQueuesForNode_ = function(\n node: Tree,\n queue: Array\n) {\n const nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (let i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n\n node.forEachChild(child => {\n this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n\n/**\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\n *\n * @param {!Tree.>} node\n * @private\n */\n(Repo.prototype as any).pruneCompletedTransactionsBelowNode_ = function(\n node: Tree\n) {\n const queue = node.getValue();\n if (queue) {\n let to = 0;\n for (let from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n\n node.forEachChild(childNode => {\n this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n\n/**\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\n * since we consider them incompatible with transactions.\n *\n * @param {!Path} path Path for which we want to abort related transactions.\n * @return {!Path}\n * @private\n */\n(Repo.prototype as any).abortTransactions_ = function(path: Path): Path {\n const affectedPath = this.getAncestorTransactionNode_(path).path();\n\n const transactionNode = this.transactionQueueTree_.subTree(path);\n\n transactionNode.forEachAncestor((node: Tree) => {\n this.abortTransactionsOnNode_(node);\n });\n\n this.abortTransactionsOnNode_(transactionNode);\n\n transactionNode.forEachDescendant((node: Tree) => {\n this.abortTransactionsOnNode_(node);\n });\n\n return affectedPath;\n};\n\n/**\n * Abort transactions stored in this transaction queue node.\n *\n * @param {!Tree.>} node Node to abort transactions for.\n * @private\n */\n(Repo.prototype as any).abortTransactionsOnNode_ = function(\n node: Tree\n) {\n const queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n const callbacks = [];\n\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n let events: Event[] = [];\n let lastSent = -1;\n for (let i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n } else if (queue[i].status === TransactionStatus.SENT) {\n assert(\n lastSent === i - 1,\n 'All SENT items should be at beginning of queue.'\n );\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n } else {\n assert(\n queue[i].status === TransactionStatus.RUN,\n 'Unexpected transaction status in abort'\n );\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(\n this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true)\n );\n if (queue[i].onComplete) {\n const snapshot: DataSnapshot | null = null;\n callbacks.push(\n queue[i].onComplete.bind(null, new Error('set'), false, snapshot)\n );\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n } else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (let i = 0; i < callbacks.length; i++) {\n exceptionGuard(callbacks[i]);\n }\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/Repo_transaction.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { assert } from '../../../utils/assert';\nimport { Path } from './Path';\nimport { forEach, contains, safeGet } from '../../../utils/obj';\n\n/**\n * Node in a Tree.\n */\nexport class TreeNode {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n children: { [name: string]: TreeNode } = {};\n childCount = 0;\n value: T | null = null;\n}\n\n/**\n * A light-weight tree, traversable by path. Nodes can have both values and children.\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\n * children.\n */\nexport class Tree {\n /**\n * @template T\n * @param {string=} name_ Optional name of the node.\n * @param {Tree=} parent_ Optional parent node.\n * @param {TreeNode=} node_ Optional node to wrap.\n */\n constructor(\n private name_: string = '',\n private parent_: Tree | null = null,\n private node_: TreeNode = new TreeNode()\n ) {}\n\n /**\n * Returns a sub-Tree for the given path.\n *\n * @param {!(string|Path)} pathObj Path to look up.\n * @return {!Tree.} Tree for path.\n */\n subTree(pathObj: string | Path): Tree {\n // TODO: Require pathObj to be Path?\n let path = pathObj instanceof Path ? pathObj : new Path(pathObj);\n let child = this as any,\n next;\n while ((next = path.getFront()) !== null) {\n const childNode = safeGet(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n\n return child;\n }\n\n /**\n * Returns the data associated with this tree node.\n *\n * @return {?T} The data or null if no data exists.\n */\n getValue(): T | null {\n return this.node_.value;\n }\n\n /**\n * Sets data to this tree node.\n *\n * @param {!T} value Value to set.\n */\n setValue(value: T) {\n assert(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n }\n\n /**\n * Clears the contents of the tree node (its value and all children).\n */\n clear() {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n }\n\n /**\n * @return {boolean} Whether the tree has any children.\n */\n hasChildren(): boolean {\n return this.node_.childCount > 0;\n }\n\n /**\n * @return {boolean} Whether the tree is empty (no value or children).\n */\n isEmpty(): boolean {\n return this.getValue() === null && !this.hasChildren();\n }\n\n /**\n * Calls action for each child of this tree node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n forEachChild(action: (tree: Tree) => void) {\n forEach(this.node_.children, (child: string, childTree: TreeNode) => {\n action(new Tree(child, this, childTree));\n });\n }\n\n /**\n * Does a depth-first traversal of this node's descendants, calling action for each one.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\n * false.\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\n * parent.\n */\n forEachDescendant(\n action: (tree: Tree) => void,\n includeSelf?: boolean,\n childrenFirst?: boolean\n ) {\n if (includeSelf && !childrenFirst) action(this);\n\n this.forEachChild(function(child) {\n child.forEachDescendant(action, /*includeSelf=*/ true, childrenFirst);\n });\n\n if (includeSelf && childrenFirst) action(this);\n }\n\n /**\n * Calls action on each ancestor node.\n *\n * @param {function(!Tree.)} action Action to be called on each parent; return\n * true to abort.\n * @param {boolean=} includeSelf Whether to call action on this node as well.\n * @return {boolean} true if the action callback returned true.\n */\n forEachAncestor(\n action: (tree: Tree) => void,\n includeSelf?: boolean\n ): boolean {\n let node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n }\n\n /**\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\n * is found, action is called on it and traversal does not continue inside the node.\n * Action is *not* called on this node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n forEachImmediateDescendantWithValue(action: (tree: Tree) => void) {\n this.forEachChild(function(child) {\n if (child.getValue() !== null) action(child);\n else child.forEachImmediateDescendantWithValue(action);\n });\n }\n\n /**\n * @return {!Path} The path of this tree node, as a Path.\n */\n path(): Path {\n return new Path(\n this.parent_ === null\n ? this.name_\n : this.parent_.path() + '/' + this.name_\n );\n }\n\n /**\n * @return {string} The name of the tree node.\n */\n name(): string {\n return this.name_;\n }\n\n /**\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\n */\n parent(): Tree | null {\n return this.parent_;\n }\n\n /**\n * Adds or removes this child from its parent based on whether it's empty or not.\n *\n * @private\n */\n private updateParents_() {\n if (this.parent_ !== null) this.parent_.updateChild_(this.name_, this);\n }\n\n /**\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\n *\n * @param {string} childName The name of the child to update.\n * @param {!Tree.} child The child to update.\n * @private\n */\n private updateChild_(childName: string, child: Tree) {\n const childEmpty = child.isEmpty();\n const childExists = contains(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n } else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/util/Tree.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { FirebaseApp } from '../../app/firebase_app';\nimport { safeGet } from '../../utils/obj';\nimport { Repo } from './Repo';\nimport { fatal } from './util/util';\nimport { parseRepoInfo } from './util/libs/parser';\nimport { validateUrl } from './util/validation';\nimport './Repo_transaction';\nimport { Database } from '../api/Database';\nimport { RepoInfo } from './RepoInfo';\n\n/** @const {string} */\nconst DATABASE_URL_OPTION = 'databaseURL';\n\nlet _staticInstance: RepoManager;\n\n/**\n * Creates and caches Repo instances.\n */\nexport class RepoManager {\n /**\n * @private {!Object.}\n */\n private repos_: {\n [name: string]: Repo;\n } = {};\n\n /**\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\n * @private {boolean}\n */\n private useRestClient_: boolean = false;\n\n static getInstance(): RepoManager {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n }\n\n // TODO(koss): Remove these functions unless used in tests?\n interrupt() {\n for (const repo in this.repos_) {\n this.repos_[repo].interrupt();\n }\n }\n\n resume() {\n for (const repo in this.repos_) {\n this.repos_[repo].resume();\n }\n }\n\n /**\n * This function should only ever be called to CREATE a new database instance.\n *\n * @param {!FirebaseApp} app\n * @return {!Database}\n */\n databaseFromApp(app: FirebaseApp): Database {\n const dbUrl: string = app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n fatal(\n \"Can't determine Firebase Database URL. Be sure to include \" +\n DATABASE_URL_OPTION +\n ' option when calling firebase.intializeApp().'\n );\n }\n\n const parsedUrl = parseRepoInfo(dbUrl);\n const repoInfo = parsedUrl.repoInfo;\n\n validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n fatal(\n 'Database URL must point to the root of a Firebase Database ' +\n '(not including a child path).'\n );\n }\n\n const repo = this.createRepo(repoInfo, app);\n\n return repo.database;\n }\n\n /**\n * Remove the repo and make sure it is disconnected.\n *\n * @param {!Repo} repo\n */\n deleteRepo(repo: Repo) {\n // This should never happen...\n if (safeGet(this.repos_, repo.app.name) !== repo) {\n fatal('Database ' + repo.app.name + ' has already been deleted.');\n }\n repo.interrupt();\n delete this.repos_[repo.app.name];\n }\n\n /**\n * Ensures a repo doesn't already exist and then creates one using the\n * provided app.\n *\n * @param {!RepoInfo} repoInfo The metadata about the Repo\n * @param {!FirebaseApp} app\n * @return {!Repo} The Repo object for the specified server / repoName.\n */\n createRepo(repoInfo: RepoInfo, app: FirebaseApp): Repo {\n let repo = safeGet(this.repos_, app.name);\n if (repo) {\n fatal('FIREBASE INTERNAL ERROR: Database initialized multiple times.');\n }\n repo = new Repo(repoInfo, this.useRestClient_, app);\n this.repos_[app.name] = repo;\n\n return repo;\n }\n\n /**\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\n * @param {boolean} forceRestClient\n */\n forceRestClient(forceRestClient: boolean) {\n this.useRestClient_ = forceRestClient;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/core/RepoManager.ts","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { fatal } from '../core/util/util';\nimport { parseRepoInfo } from '../core/util/libs/parser';\nimport { Path } from '../core/util/Path';\nimport { PromiseImpl } from '../../utils/promise';\nimport { Reference } from './Reference';\nimport { Repo } from '../core/Repo';\nimport { RepoManager } from '../core/RepoManager';\nimport { validateArgCount } from '../../utils/validation';\nimport { validateUrl } from '../core/util/validation';\nimport { FirebaseApp, FirebaseService } from '../../app/firebase_app';\nimport { RepoInfo } from '../core/RepoInfo';\n\n/**\n * Class representing a firebase database.\n * @implements {FirebaseService}\n */\nexport class Database implements FirebaseService {\n INTERNAL: DatabaseInternals;\n private root_: Reference;\n\n static readonly ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n\n /**\n * The constructor should not be called by users of our public API.\n * @param {!Repo} repo_\n */\n constructor(private repo_: Repo) {\n if (!(repo_ instanceof Repo)) {\n fatal(\n \"Don't call new Database() directly - please use firebase.database().\"\n );\n }\n\n /** @type {Reference} */\n this.root_ = new Reference(repo_, Path.Empty);\n\n this.INTERNAL = new DatabaseInternals(this);\n }\n\n get app(): FirebaseApp {\n return this.repo_.app;\n }\n\n /**\n * Returns a reference to the root or the path specified in opt_pathString.\n * @param {string=} pathString\n * @return {!Reference} Firebase reference.\n */\n ref(pathString?: string): Reference {\n this.checkDeleted_('ref');\n validateArgCount('database.ref', 0, 1, arguments.length);\n\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n }\n\n /**\n * Returns a reference to the root or the path specified in url.\n * We throw a exception if the url is not in the same domain as the\n * current repo.\n * @param {string} url\n * @return {!Reference} Firebase reference.\n */\n refFromURL(url: string): Reference {\n /** @const {string} */\n const apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n validateArgCount(apiName, 1, 1, arguments.length);\n const parsedURL = parseRepoInfo(url);\n validateUrl(apiName, 1, parsedURL);\n\n const repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== ((this.repo_ as any).repoInfo_ as RepoInfo).host) {\n fatal(\n apiName +\n ': Host name does not match the current database: ' +\n '(found ' +\n repoInfo.host +\n ' but expected ' +\n ((this.repo_ as any).repoInfo_ as RepoInfo).host +\n ')'\n );\n }\n\n return this.ref(parsedURL.path.toString());\n }\n\n /**\n * @param {string} apiName\n */\n private checkDeleted_(apiName: string) {\n if (this.repo_ === null) {\n fatal('Cannot call ' + apiName + ' on a deleted database.');\n }\n }\n\n // Make individual repo go offline.\n goOffline() {\n validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n }\n\n goOnline() {\n validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n }\n}\n\nexport class DatabaseInternals {\n /** @param {!Database} database */\n constructor(public database: Database) {}\n\n /** @return {Promise} */\n delete(): Promise {\n (this.database as any).checkDeleted_('delete');\n RepoManager.getInstance().deleteRepo((this.database as any).repo_ as Repo);\n\n (this.database as any).repo_ = null;\n (this.database as any).root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return PromiseImpl.resolve();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/Database.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { WebSocketConnection } from '../realtime/WebSocketConnection';\nimport { BrowserPollConnection } from '../realtime/BrowserPollConnection';\nimport { Reference } from './Reference';\n\n/**\n * INTERNAL methods for internal-use only (tests, etc.).\n *\n * Customers shouldn't use these or else should be aware that they could break at any time.\n *\n * @const\n */\n\nexport const forceLongPolling = function() {\n WebSocketConnection.forceDisallow();\n BrowserPollConnection.forceAllow();\n};\n\nexport const forceWebSockets = function() {\n BrowserPollConnection.forceDisallow();\n};\n\n/* Used by App Manager */\nexport const isWebSocketsAvailable = function(): boolean {\n return WebSocketConnection['isAvailable']();\n};\n\nexport const setSecurityDebugCallback = function(\n ref: Reference,\n callback: (a: Object) => void\n) {\n (ref.repo.persistentConnection_ as any).securityDebugCallback_ = callback;\n};\n\nexport const stats = function(ref: Reference, showDelta?: boolean) {\n ref.repo.stats(showDelta);\n};\n\nexport const statsIncrementCounter = function(ref: Reference, metric: string) {\n ref.repo.statsIncrementCounter(metric);\n};\n\nexport const dataUpdateCount = function(ref: Reference): number {\n return ref.repo.dataUpdateCount;\n};\n\nexport const interceptServerData = function(\n ref: Reference,\n callback: ((a: string, b: any) => void) | null\n) {\n return ref.repo.interceptServerData_(callback);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/internal.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport { RepoInfo } from '../core/RepoInfo';\nimport { PersistentConnection } from '../core/PersistentConnection';\nimport { RepoManager } from '../core/RepoManager';\nimport { Connection } from '../realtime/Connection';\nimport { Query } from './Query';\n\nexport const DataConnection = PersistentConnection;\n\n/**\n * @param {!string} pathString\n * @param {function(*)} onComplete\n */\n(PersistentConnection.prototype as any).simpleListen = function(\n pathString: string,\n onComplete: (a: any) => void\n) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n\n/**\n * @param {*} data\n * @param {function(*)} onEcho\n */\n(PersistentConnection.prototype as any).echo = function(\n data: any,\n onEcho: (a: any) => void\n) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n\n// RealTimeConnection properties that we use in tests.\nexport const RealTimeConnection = Connection;\n\n/**\n * @param {function(): string} newHash\n * @return {function()}\n */\nexport const hijackHash = function(newHash: () => string) {\n const oldPut = PersistentConnection.prototype.put;\n PersistentConnection.prototype.put = function(\n pathString,\n data,\n opt_onComplete,\n opt_hash\n ) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function() {\n PersistentConnection.prototype.put = oldPut;\n };\n};\n\n/**\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\n */\nexport const ConnectionTarget = RepoInfo;\n\n/**\n * @param {!Query} query\n * @return {!string}\n */\nexport const queryIdentifier = function(query: Query) {\n return query.queryIdentifier();\n};\n\n/**\n * @param {!Query} firebaseRef\n * @return {!Object}\n */\nexport const listens = function(firebaseRef: Query) {\n return (firebaseRef.repo.persistentConnection_ as any).listens_;\n};\n\n/**\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\n *\n * @param {boolean} forceRestClient\n */\nexport const forceRestClient = function(forceRestClient: boolean) {\n RepoManager.getInstance().forceRestClient(forceRestClient);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/database/api/test_access.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\nimport firebase from './app';\nimport { FirebaseApp, FirebaseNamespace } from './app/firebase_app';\nimport { Database } from './database/api/Database';\nimport { Query } from './database/api/Query';\nimport { Reference } from './database/api/Reference';\nimport { enableLogging } from './database/core/util/util';\nimport { RepoManager } from './database/core/RepoManager';\nimport * as INTERNAL from './database/api/internal';\nimport * as TEST_ACCESS from './database/api/test_access';\nimport { isNodeSdk } from './utils/environment';\n\nexport function registerDatabase(instance: FirebaseNamespace) {\n // Register the Database Service with the 'firebase' namespace.\n const namespace = instance.INTERNAL.registerService(\n 'database',\n app => RepoManager.getInstance().databaseFromApp(app),\n // firebase.database namespace properties\n {\n Reference,\n Query,\n Database,\n enableLogging,\n INTERNAL,\n ServerValue: Database.ServerValue,\n TEST_ACCESS\n }\n );\n\n if (isNodeSdk()) {\n module.exports = namespace;\n }\n}\n\n/**\n * Extensions to the FirebaseApp and FirebaseNamespaces interfaces\n */\ndeclare module './app/firebase_app' {\n interface FirebaseApp {\n database?(): Database;\n }\n}\n\ndeclare module './app/firebase_app' {\n interface FirebaseNamespace {\n database?: {\n (app?: FirebaseApp): Database;\n Database;\n enableLogging;\n INTERNAL;\n Query;\n Reference;\n ServerValue;\n };\n }\n}\n\nregisterDatabase(firebase);\n\n\n\n// WEBPACK FOOTER //\n// ./src/database.ts","module.exports = function(originalModule) {\r\n\tif(!originalModule.webpackPolyfill) {\r\n\t\tvar module = Object.create(originalModule);\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"exports\", {\r\n\t\t\tenumerable: true,\r\n\t\t});\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/harmony-module.js\n// module id = 26\n// module chunks = 0","try {\n webpackJsonpFirebase([2],{\n\n/***/ 24:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// CONCATENATED MODULE: ./src/messaging/models/errors.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\nvar CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\nvar ERROR_MAP = (_a = {}, _a[CODES.AVAILABLE_IN_WINDOW] = 'This method is available in a Window context.', _a[CODES.AVAILABLE_IN_SW] = 'This method is available in a service worker ' + 'context.', _a[CODES.SHOULD_BE_INHERITED] = 'This method should be overriden by ' + 'extended classes.', _a[CODES.BAD_SENDER_ID] = \"Please ensure that 'messagingSenderId' is set \" + 'correctly in the options passed into firebase.initializeApp().', _a[CODES.PERMISSION_DEFAULT] = 'The required permissions were not granted and ' + 'dismissed instead.', _a[CODES.PERMISSION_BLOCKED] = 'The required permissions were not granted and ' + 'blocked instead.', _a[CODES.UNSUPPORTED_BROWSER] = \"This browser doesn't support the API's \" + 'required to use the firebase SDK.', _a[CODES.NOTIFICATIONS_BLOCKED] = 'Notifications have been blocked.', _a[CODES.FAILED_DEFAULT_REGISTRATION] = 'We are unable to register the ' + 'default service worker. {$browserErrorMessage}', _a[CODES.SW_REGISTRATION_EXPECTED] = 'A service worker registration was the ' + 'expected input.', _a[CODES.GET_SUBSCRIPTION_FAILED] = 'There was an error when trying to get ' + 'any existing Push Subscriptions.', _a[CODES.INVALID_SAVED_TOKEN] = 'Unable to access details of the saved token.', _a[CODES.SW_REG_REDUNDANT] = 'The service worker being used for push was made ' + 'redundant.', _a[CODES.TOKEN_SUBSCRIBE_FAILED] = 'A problem occured while subscribing the ' + 'user to FCM: {$message}', _a[CODES.TOKEN_SUBSCRIBE_NO_TOKEN] = 'FCM returned no token when subscribing ' + 'the user to push.', _a[CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET] = 'FCM returned an invalid response ' + 'when getting an FCM token.', _a[CODES.USE_SW_BEFORE_GET_TOKEN] = 'You must call useServiceWorker() before ' + 'calling getToken() to ensure your service worker is used.', _a[CODES.INVALID_DELETE_TOKEN] = 'You must pass a valid token into ' + 'deleteToken(), i.e. the token from getToken().', _a[CODES.DELETE_TOKEN_NOT_FOUND] = 'The deletion attempt for token could not ' + 'be performed as the token was not found.', _a[CODES.DELETE_SCOPE_NOT_FOUND] = 'The deletion attempt for service worker ' + 'scope could not be performed as the scope was not found.', _a[CODES.BG_HANDLER_FUNCTION_EXPECTED] = 'The input to ' + 'setBackgroundMessageHandler() must be a function.', _a[CODES.NO_WINDOW_CLIENT_TO_MSG] = 'An attempt was made to message a ' + 'non-existant window client.', _a[CODES.UNABLE_TO_RESUBSCRIBE] = 'There was an error while re-subscribing ' + 'the FCM token for push messaging. Will have to resubscribe the ' + 'user on next visit. {$message}', _a[CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE] = 'Could not find an FCM token ' + 'and as a result, unable to resubscribe. Will have to resubscribe the ' + 'user on next visit.', _a[CODES.FAILED_TO_DELETE_TOKEN] = 'Unable to delete the currently saved token.', _a[CODES.NO_SW_IN_REG] = 'Even though the service worker registration was ' + 'successful, there was a problem accessing the service worker itself.', _a[CODES.INCORRECT_GCM_SENDER_ID] = \"Please change your web app manifest's \" + \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\", _a[CODES.BAD_SCOPE] = 'The service worker scope must be a string with at ' + 'least one character.', _a[CODES.BAD_VAPID_KEY] = 'The public VAPID key must be a string with at ' + 'least one character.', _a[CODES.BAD_SUBSCRIPTION] = 'The subscription must be a valid ' + 'PushSubscription.', _a[CODES.BAD_TOKEN] = 'The FCM Token used for storage / lookup was not ' + 'a valid token string.', _a[CODES.BAD_PUSH_SET] = 'The FCM push set used for storage / lookup was not ' + 'not a valid push set string.', _a[CODES.FAILED_DELETE_VAPID_KEY] = 'The VAPID key could not be deleted.', _a);\n/* harmony default export */ var errors_defaultExport = ({\n codes: CODES,\n map: ERROR_MAP\n});\nvar _a;\n// CONCATENATED MODULE: ./src/messaging/helpers/array-buffer-to-base64.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nfunction toBase64(arrayBuffer) {\n var uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\n/* harmony default export */ var array_buffer_to_base64_defaultExport = (function (arrayBuffer) {\n var base64String = toBase64(arrayBuffer);\n return base64String.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n});;\n// CONCATENATED MODULE: ./src/messaging/models/fcm-details.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\nvar FCM_APPLICATION_SERVER_KEY = [0x04, 0x33, 0x94, 0xf7, 0xdf, 0xa1, 0xeb, 0xb1, 0xdc, 0x03, 0xa2, 0x5e, 0x15, 0x71, 0xdb, 0x48, 0xd3, 0x2e, 0xed, 0xed, 0xb2, 0x34, 0xdb, 0xb7, 0x47, 0x3a, 0x0c, 0x8f, 0xc4, 0xcc, 0xe1, 0x6f, 0x3c, 0x8c, 0x84, 0xdf, 0xab, 0xb6, 0x66, 0x3e, 0xf2, 0x0c, 0xd4, 0x8b, 0xfe, 0xe3, 0xf9, 0x76, 0x2f, 0x14, 0x1c, 0x63, 0x08, 0x6a, 0x6f, 0x2d, 0xb1, 0x1a, 0x95, 0xb0, 0xce, 0x37, 0xc0, 0x9c, 0x6e];\nvar SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\n/* harmony default export */ var fcm_details_defaultExport = ({\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n});\n// CONCATENATED MODULE: ./src/messaging/models/token-manager.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__app_errors__ = __webpack_require__(10);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\nvar FCM_TOKEN_DETAILS_DB = 'fcm_token_details_db';\nvar FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nvar FCM_TOKEN_DETAILS_DB_VERSION = 1;\nvar token_manager_TokenManager = function () {\n function TokenManager() {\n this.errorFactory_ = new __WEBPACK_IMPORTED_MODULE_0__app_errors__[\"a\" /* ErrorFactory */]('messaging', 'Messaging', errors_defaultExport.map);\n this.openDbPromise_ = null;\n }\n /**\r\n * Get the indexedDB as a promsie.\r\n * @private\r\n * @return {Promise} The IndexedDB database\r\n */\n TokenManager.prototype.openDatabase_ = function () {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n this.openDbPromise_ = new Promise(function (resolve, reject) {\n var request = indexedDB.open(FCM_TOKEN_DETAILS_DB, FCM_TOKEN_DETAILS_DB_VERSION);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n request.onupgradeneeded = function (event) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n return this.openDbPromise_;\n };\n /**\r\n * Close the currently open database.\r\n * @return {Promise} Returns the result of the promise chain.\r\n */\n TokenManager.prototype.closeDatabase = function () {\n var _this = this;\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(function (db) {\n db.close();\n _this.openDbPromise_ = null;\n });\n }\n return Promise.resolve();\n };\n /**\r\n * Given a token, this method will look up the details in indexedDB.\r\n * @public\r\n * @param {string} fcmToken\r\n * @return {Promise} The details associated with that token.\r\n */\n TokenManager.prototype.getTokenDetailsFromToken = function (fcmToken) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var index = objectStore.index('fcmToken');\n var request = index.get(fcmToken);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getTokenDetailsFromSWScope_ = function (swScope) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = function (event) {\n reject(event.target.error);\n };\n scopeRequest.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getAllTokenDetailsForSenderId_ = function (senderId) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var senderIdTokens = [];\n var cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n } else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n };\n /**\r\n * Given a PushSubscription and messagingSenderId, get an FCM token.\r\n * @public\r\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\r\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\r\n * @param {string=} pushSet If defined this will swap the subscription for\r\n * matching FCM token.\r\n * @return {Promise} Returns the FCM token to be used in place\r\n * of the PushSubscription.\r\n */\n TokenManager.prototype.subscribeToFCM = function (senderId, subscription, pushSet) {\n var _this = this;\n var p256dh = array_buffer_to_base64_defaultExport(subscription['getKey']('p256dh'));\n var auth = array_buffer_to_base64_defaultExport(subscription['getKey']('auth'));\n var fcmSubscribeBody = \"authorized_entity=\" + senderId + \"&\" + (\"endpoint=\" + subscription.endpoint + \"&\") + (\"encryption_key=\" + p256dh + \"&\") + (\"encryption_auth=\" + auth);\n if (pushSet) {\n fcmSubscribeBody += \"&pushSet=\" + pushSet;\n }\n var headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n var subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n return fetch(fcm_details_defaultExport.ENDPOINT + '/fcm/connect/subscribe', subscribeOptions).then(function (response) {\n return response.json();\n }).then(function (response) {\n var fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n var message = fcmTokenResponse['error']['message'];\n throw _this.errorFactory_.create(errors_defaultExport.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n if (!fcmTokenResponse['token']) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.TOKEN_SUBSCRIBE_NO_TOKEN);\n }\n if (!fcmTokenResponse['pushSet']) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);\n }\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n };\n /**\r\n * Checks the that fields in the PushSubscription are equivalent to the\r\n * details stores in the masterTokenDetails.\r\n * @private\r\n * @param {PushSubscription} subscription The push subscription we expect\r\n * the master token to match.\r\n * @param {Object} masterTokenDetails The saved details we wish to compare\r\n * with the PushSubscription\r\n * @return {boolean} true if the subscription and token details are\r\n * equivalent.\r\n */\n TokenManager.prototype.isSameSubscription_ = function (subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return subscription.endpoint === masterTokenDetails['endpoint'] && array_buffer_to_base64_defaultExport(subscription['getKey']('auth')) === masterTokenDetails['auth'] && array_buffer_to_base64_defaultExport(subscription['getKey']('p256dh')) === masterTokenDetails['p256dh'];\n };\n /**\r\n * Save the details for the fcm token for re-use at a later date.\r\n * @private\r\n * @param {string} senderId The 'messagingSenderId' used for this project\r\n * @param {ServiceWorkerRegistration} swRegistration The service worker\r\n * used to subscribe the user for web push\r\n * @param {PushSubscription} subscription The push subscription passed to\r\n * FCM for the current token.\r\n * @param {string} fcmToken The FCM token currently used on this\r\n * device.\r\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\r\n * @return {Promise}\r\n */\n TokenManager.prototype.saveTokenDetails_ = function (senderId, swRegistration, subscription, fcmToken, fcmPushSet) {\n var details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: array_buffer_to_base64_defaultExport(subscription['getKey']('auth')),\n p256dh: array_buffer_to_base64_defaultExport(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.put(details);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve();\n };\n });\n });\n };\n /**\r\n * Returns the saved FCM Token if one is available and still valid,\r\n * otherwise `null` is returned.\r\n * @param {string} senderId This should be the sender ID associated with the\r\n * FCM Token being retrieved.\r\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\r\n * to subscribe the user to push.\r\n * @return {Promise | Promise} Returns the saved FCM Token if\r\n * avilable and valid.\r\n * @export\r\n */\n TokenManager.prototype.getSavedToken = function (senderId, swRegistration) {\n var _this = this;\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.SW_REGISTRATION_EXPECTED));\n }\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.BAD_SENDER_ID));\n }\n return this.getAllTokenDetailsForSenderId_(senderId).then(function (allTokenDetails) {\n if (allTokenDetails.length === 0) {\n return;\n }\n var index = allTokenDetails.findIndex(function (tokenDetails) {\n return swRegistration.scope === tokenDetails['swScope'] && senderId === tokenDetails['fcmSenderId'];\n });\n if (index === -1) {\n return;\n }\n return allTokenDetails[index];\n }).then(function (tokenDetails) {\n if (!tokenDetails) {\n return;\n }\n return swRegistration.pushManager.getSubscription().catch(function (err) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.GET_SUBSCRIPTION_FAILED);\n }).then(function (subscription) {\n if (subscription && _this.isSameSubscription_(subscription, tokenDetails)) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n };\n /**\r\n * Creates a new FCM token.\r\n */\n TokenManager.prototype.createToken = function (senderId, swRegistration) {\n var _this = this;\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.BAD_SENDER_ID));\n }\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.SW_REGISTRATION_EXPECTED));\n }\n // Check for existing subscription first\n var subscription;\n var fcmTokenDetails;\n return swRegistration.pushManager.getSubscription().then(function (subscription) {\n if (subscription) {\n return subscription;\n }\n return swRegistration.pushManager.subscribe(fcm_details_defaultExport.SUBSCRIPTION_OPTIONS);\n }).then(function (sub) {\n subscription = sub;\n return _this.subscribeToFCM(senderId, subscription);\n }).then(function (tokenDetails) {\n fcmTokenDetails = tokenDetails;\n return _this.saveTokenDetails_(senderId, swRegistration, subscription, fcmTokenDetails['token'], fcmTokenDetails['pushSet']);\n }).then(function () {\n return fcmTokenDetails['token'];\n });\n };\n /**\r\n * This method deletes details of the current FCM token.\r\n * It's returning a promise in case we need to move to an async\r\n * method for deleting at a later date.\r\n * @param {string} token Token to be deleted\r\n * @return {Promise} Resolves once the FCM token details have been\r\n * deleted and returns the deleted details.\r\n */\n TokenManager.prototype.deleteToken = function (token) {\n var _this = this;\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.INVALID_DELETE_TOKEN));\n }\n return this.getTokenDetailsFromToken(token).then(function (details) {\n if (!details) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.DELETE_TOKEN_NOT_FOUND);\n }\n return _this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.delete(details['swScope']);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n if (event.target.result === 0) {\n reject(_this.errorFactory_.create(errors_defaultExport.codes.FAILED_TO_DELETE_TOKEN));\n return;\n }\n resolve(details);\n };\n });\n });\n });\n };\n return TokenManager;\n}();\n/* harmony default export */ var token_manager_defaultExport = (token_manager_TokenManager);\n// CONCATENATED MODULE: ./src/messaging/models/notification-permission.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/* harmony default export */ var notification_permission_defaultExport = ({\n granted: 'granted',\n default: 'default',\n denied: 'denied'\n});\n// CONCATENATED MODULE: ./src/messaging/controllers/controller-interface.ts\n/* harmony import */ var controller_interface___WEBPACK_IMPORTED_MODULE_0__app_errors__ = __webpack_require__(10);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\nvar SENDER_ID_OPTION_NAME = 'messagingSenderId';\nvar controller_interface_ControllerInterface = function () {\n /**\r\n * An interface of the Messaging Service API\r\n * @param {!firebase.app.App} app\r\n */\n function ControllerInterface(app) {\n var _this = this;\n this.errorFactory_ = new controller_interface___WEBPACK_IMPORTED_MODULE_0__app_errors__[\"a\" /* ErrorFactory */]('messaging', 'Messaging', errors_defaultExport.map);\n if (!app.options[SENDER_ID_OPTION_NAME] || typeof app.options[SENDER_ID_OPTION_NAME] !== 'string') {\n throw this.errorFactory_.create(errors_defaultExport.codes.BAD_SENDER_ID);\n }\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n this.tokenManager_ = new token_manager_defaultExport();\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = function () {\n return _this.delete;\n };\n }\n /**\r\n * @export\r\n * @return {Promise | Promise} Returns a promise that\r\n * resolves to an FCM token.\r\n */\n ControllerInterface.prototype.getToken = function () {\n var _this = this;\n // Check with permissions\n var currentPermission = this.getNotificationPermission_();\n if (currentPermission !== notification_permission_defaultExport.granted) {\n if (currentPermission === notification_permission_defaultExport.denied) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.NOTIFICATIONS_BLOCKED));\n }\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n return this.getSWRegistration_().then(function (registration) {\n return _this.tokenManager_.getSavedToken(_this.messagingSenderId_, registration).then(function (token) {\n if (token) {\n return token;\n }\n return _this.tokenManager_.createToken(_this.messagingSenderId_, registration);\n });\n });\n };\n /**\r\n * This method deletes tokens that the token manager looks after and then\r\n * unregisters the push subscription if it exists.\r\n * @export\r\n * @param {string} token\r\n * @return {Promise}\r\n */\n ControllerInterface.prototype.deleteToken = function (token) {\n var _this = this;\n return this.tokenManager_.deleteToken(token).then(function () {\n return _this.getSWRegistration_().then(function (registration) {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n }).then(function (subscription) {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n };\n ControllerInterface.prototype.getSWRegistration_ = function () {\n throw this.errorFactory_.create(errors_defaultExport.codes.SHOULD_BE_INHERITED);\n };\n //\n // The following methods should only be available in the window.\n //\n ControllerInterface.prototype.requestPermission = function () {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n /**\r\n * @export\r\n * @param {!ServiceWorkerRegistration} registration\r\n */\n ControllerInterface.prototype.useServiceWorker = function (registration) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function(*)} nextOrObserver\r\n * @param {function(!Error)=} optError\r\n * @param {function()=} optCompleted\r\n * @return {!function()}\r\n */\n ControllerInterface.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\r\n * or a function triggered on token refresh.\r\n * @param {function(!Error)=} optError Optional A function\r\n * triggered on token refresh error.\r\n * @param {function()=} optCompleted Optional function triggered when the\r\n * observer is removed.\r\n * @return {!function()} The unsubscribe function for the observer.\r\n */\n ControllerInterface.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_WINDOW);\n };\n //\n // The following methods are used by the service worker only.\n //\n /**\r\n * @export\r\n * @param {function(Object)} callback\r\n */\n ControllerInterface.prototype.setBackgroundMessageHandler = function (callback) {\n throw this.errorFactory_.create(errors_defaultExport.codes.AVAILABLE_IN_SW);\n };\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n /**\r\n * This method is required to adhere to the Firebase interface.\r\n * It closes any currently open indexdb database connections.\r\n */\n ControllerInterface.prototype.delete = function () {\n this.tokenManager_.closeDatabase();\n };\n /**\r\n * Returns the current Notification Permission state.\r\n * @private\r\n * @return {string} The currenct permission state.\r\n */\n ControllerInterface.prototype.getNotificationPermission_ = function () {\n return Notification.permission;\n };\n /**\r\n * @protected\r\n * @returns {TokenManager}\r\n */\n ControllerInterface.prototype.getTokenManager = function () {\n return this.tokenManager_;\n };\n return ControllerInterface;\n}();\n/* harmony default export */ var controller_interface_defaultExport = (controller_interface_ControllerInterface);\n// CONCATENATED MODULE: ./src/messaging/models/worker-page-message.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\n\nvar PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nvar msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\nvar createNewMsg = function createNewMsg(msgType, msgData) {\n var message = (_a = {}, _a[PARAMS.TYPE_OF_MSG] = msgType, _a[PARAMS.DATA] = msgData, _a);\n return message;\n var _a;\n};\n/* harmony default export */ var worker_page_message_defaultExport = ({\n PARAMS: PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg: createNewMsg\n});\n// CONCATENATED MODULE: ./src/messaging/models/default-sw.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/* harmony default export */ var default_sw_defaultExport = ({\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n});\n// CONCATENATED MODULE: ./src/messaging/controllers/window-controller.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_subscribe__ = __webpack_require__(13);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\n\n\nvar window_controller_WindowController = function (_super) {\n __extends(WindowController, _super);\n /**\r\n * A service that provides a MessagingService instance.\r\n * @param {!firebase.app.App} app\r\n */\n function WindowController(app) {\n var _this = _super.call(this, app) || this;\n /**\r\n * @private\r\n * @type {ServiceWorkerRegistration}\r\n */\n _this.registrationToUse_;\n /**\r\n * @private\r\n * @type {Promise}\r\n */\n _this.manifestCheckPromise_;\n /**\r\n * @private\r\n * @type {firebase.Observer}\r\n */\n _this.messageObserver_ = null;\n /**\r\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\r\n * observer.\r\n */\n _this.onMessage_ = Object(__WEBPACK_IMPORTED_MODULE_5__app_subscribe__[\"a\" /* createSubscribe */])(function (observer) {\n _this.messageObserver_ = observer;\n });\n /**\r\n * @private\r\n * @type {firebase.Observer}\r\n */\n _this.tokenRefreshObserver_ = null;\n _this.onTokenRefresh_ = Object(__WEBPACK_IMPORTED_MODULE_5__app_subscribe__[\"a\" /* createSubscribe */])(function (observer) {\n _this.tokenRefreshObserver_ = observer;\n });\n _this.setupSWMessageListener_();\n return _this;\n }\n /**\r\n * This method returns an FCM token if it can be generated.\r\n * The return promise will reject if the browser doesn't support\r\n * FCM, if permission is denied for notifications or it's not\r\n * possible to generate a token.\r\n * @export\r\n * @return {Promise | Promise} Returns a promise the\r\n * resolves to an FCM token or null if permission isn't granted.\r\n */\n WindowController.prototype.getToken = function () {\n var _this = this;\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(this.errorFactory_.create(errors_defaultExport.codes.UNSUPPORTED_BROWSER));\n }\n return this.manifestCheck_().then(function () {\n return _super.prototype.getToken.call(_this);\n });\n };\n /**\r\n * The method checks that a manifest is defined and has the correct GCM\r\n * sender ID.\r\n * @private\r\n * @return {Promise} Returns a promise that resolves if the manifest matches\r\n * our required sender ID\r\n */\n WindowController.prototype.manifestCheck_ = function () {\n var _this = this;\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n var manifestTag = document.querySelector('link[rel=\"manifest\"]');\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n } else {\n this.manifestCheckPromise_ = fetch(manifestTag.href).then(function (response) {\n return response.json();\n }).catch(function () {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n }).then(function (manifestContent) {\n if (!manifestContent) {\n return;\n }\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw _this.errorFactory_.create(errors_defaultExport.codes.INCORRECT_GCM_SENDER_ID);\n }\n });\n }\n return this.manifestCheckPromise_;\n };\n /**\r\n * Request permission if it is not currently granted\r\n * @export\r\n * @returns {Promise} Resolves if the permission was granted, otherwise\r\n * rejects\r\n */\n WindowController.prototype.requestPermission = function () {\n var _this = this;\n if (Notification.permission === notification_permission_defaultExport.granted) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var managePermissionResult = function managePermissionResult(result) {\n if (result === notification_permission_defaultExport.granted) {\n return resolve();\n } else if (result === notification_permission_defaultExport.denied) {\n return reject(_this.errorFactory_.create(errors_defaultExport.codes.PERMISSION_BLOCKED));\n } else {\n return reject(_this.errorFactory_.create(errors_defaultExport.codes.PERMISSION_DEFAULT));\n }\n };\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n var permissionPromise = Notification.requestPermission(function (result) {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n managePermissionResult(result);\n });\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n };\n /**\r\n * This method allows a developer to override the default service worker and\r\n * instead use a custom service worker.\r\n * @export\r\n * @param {!ServiceWorkerRegistration} registration The service worker\r\n * registration that should be used to receive the push messages.\r\n */\n WindowController.prototype.useServiceWorker = function (registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(errors_defaultExport.codes.SW_REGISTRATION_EXPECTED);\n }\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(errors_defaultExport.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n this.registrationToUse_ = registration;\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\r\n * or a function triggered on message.\r\n * @param {function(!Error)=} optError Optional A function triggered on\r\n * message error.\r\n * @param {function()=} optCompleted Optional function triggered when the\r\n * observer is removed.\r\n * @return {!function()} The unsubscribe function for the observer.\r\n */\n WindowController.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n };\n /**\r\n * @export\r\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\r\n * or a function triggered on token refresh.\r\n * @param {function(!Error)=} optError Optional A function\r\n * triggered on token refresh error.\r\n * @param {function()=} optCompleted Optional function triggered when the\r\n * observer is removed.\r\n * @return {!function()} The unsubscribe function for the observer.\r\n */\n WindowController.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n };\n /**\r\n * Given a registration, wait for the service worker it relates to\r\n * become activer\r\n * @private\r\n * @param {ServiceWorkerRegistration} registration Registration to wait\r\n * for service worker to become active\r\n * @return {Promise} Wait for service worker\r\n * registration to become active\r\n */\n WindowController.prototype.waitForRegistrationToActivate_ = function (registration) {\n var _this = this;\n var serviceWorker = registration.installing || registration.waiting || registration.active;\n return new Promise(function (resolve, reject) {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(_this.errorFactory_.create(errors_defaultExport.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors_defaultExport.codes.SW_REG_REDUNDANT));\n return;\n }\n var stateChangeListener = function stateChangeListener() {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n } else if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors_defaultExport.codes.SW_REG_REDUNDANT));\n } else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n };\n /**\r\n * This will regiater the default service worker and return the registration\r\n * @private\r\n * @return {Promise} The service worker\r\n * registration to be used for the push service.\r\n */\n WindowController.prototype.getSWRegistration_ = function () {\n var _this = this;\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n return navigator.serviceWorker.register(default_sw_defaultExport.path, {\n scope: default_sw_defaultExport.scope\n }).catch(function (err) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.FAILED_DEFAULT_REGISTRATION, {\n browserErrorMessage: err.message\n });\n }).then(function (registration) {\n return _this.waitForRegistrationToActivate_(registration).then(function () {\n _this.registrationToUse_ = registration;\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n return registration;\n });\n });\n };\n /**\r\n * This method will set up a message listener to handle\r\n * events from the service worker that should trigger\r\n * events in the page.\r\n *\r\n * @private\r\n */\n WindowController.prototype.setupSWMessageListener_ = function () {\n var _this = this;\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('message', function (event) {\n if (!event.data || !event.data[worker_page_message_defaultExport.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n var workerPageMessage = event.data;\n switch (workerPageMessage[worker_page_message_defaultExport.PARAMS.TYPE_OF_MSG]) {\n case worker_page_message_defaultExport.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case worker_page_message_defaultExport.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n var pushMessage = workerPageMessage[worker_page_message_defaultExport.PARAMS.DATA];\n _this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n }, false);\n };\n /**\r\n * Checks to see if the required API's are valid or not.\r\n * @private\r\n * @return {boolean} Returns true if the desired APIs are available.\r\n */\n WindowController.prototype.isSupported_ = function () {\n return 'serviceWorker' in navigator && 'PushManager' in window && 'Notification' in window && 'fetch' in window && ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') && PushSubscription.prototype.hasOwnProperty('getKey');\n };\n return WindowController;\n}(controller_interface_defaultExport);\n/* harmony default export */ var window_controller_defaultExport = (window_controller_WindowController);\n// CONCATENATED MODULE: ./src/messaging/controllers/sw-controller.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar sw_controller___extends = this && this.__extends || function () {\n var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\n\n\n\nvar FCM_MSG = 'FCM_MSG';\nvar sw_controller_SWController = function (_super) {\n sw_controller___extends(SWController, _super);\n function SWController(app) {\n var _this = _super.call(this, app) || this;\n self.addEventListener('push', function (e) {\n return _this.onPush_(e);\n }, false);\n self.addEventListener('pushsubscriptionchange', function (e) {\n return _this.onSubChange_(e);\n }, false);\n self.addEventListener('notificationclick', function (e) {\n return _this.onNotificationClick_(e);\n }, false);\n /**\r\n * @private\r\n * @type {function(Object)|null}\r\n */\n _this.bgMessageHandler_ = null;\n return _this;\n }\n /**\r\n * A handler for push events that shows notifications based on the content of\r\n * the payload.\r\n *\r\n * The payload must be a JSON-encoded Object with a `notification` key. The\r\n * value of the `notification` property will be used as the NotificationOptions\r\n * object passed to showNotification. Additionally, the `title` property of the\r\n * notification object will be used as the title.\r\n *\r\n * If there is no notification data in the payload then no notification will be\r\n * shown.\r\n * @private\r\n */\n SWController.prototype.onPush_ = function (event) {\n var _this = this;\n var msgPayload;\n try {\n msgPayload = event.data.json();\n } catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n var handleMsgPromise = this.hasVisibleClients_().then(function (hasVisibleClients) {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || _this.bgMessageHandler_) {\n // Send to page\n return _this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n var notificationDetails = _this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n var notificationTitle = notificationDetails.title || '';\n return self.registration.showNotification(notificationTitle, notificationDetails);\n } else if (_this.bgMessageHandler_) {\n return _this.bgMessageHandler_(msgPayload);\n }\n });\n event.waitUntil(handleMsgPromise);\n };\n /**\r\n * @private\r\n */\n SWController.prototype.onSubChange_ = function (event) {\n var _this = this;\n var promiseChain = this.getToken().then(function (token) {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw _this.errorFactory_.create(errors_defaultExport.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);\n }\n var tokenDetails = null;\n var tokenManager = _this.getTokenManager();\n return tokenManager.getTokenDetailsFromToken(token).then(function (details) {\n tokenDetails = details;\n if (!tokenDetails) {\n throw _this.errorFactory_.create(errors_defaultExport.codes.INVALID_SAVED_TOKEN);\n }\n // Attempt to get a new subscription\n return self.registration.pushManager.subscribe(fcm_details_defaultExport.SUBSCRIPTION_OPTIONS);\n }).then(function (newSubscription) {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(tokenDetails.fcmSenderId, newSubscription, tokenDetails.fcmPushSet);\n }).catch(function (err) {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(function () {\n throw _this.errorFactory_.create(errors_defaultExport.codes.UNABLE_TO_RESUBSCRIBE, {\n message: err\n });\n });\n });\n });\n event.waitUntil(promiseChain);\n };\n /**\r\n * @private\r\n */\n SWController.prototype.onNotificationClick_ = function (event) {\n var _this = this;\n if (!(event.notification && event.notification.data && event.notification.data[FCM_MSG])) {\n // Not an FCM notification, do nothing.\n return;\n }\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n event.notification.close();\n var msgPayload = event.notification.data[FCM_MSG];\n var clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n var promiseChain = this.getWindowClient_(clickAction).then(function (windowClient) {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return self.clients.openWindow(clickAction);\n }\n return windowClient;\n }).then(function (windowClient) {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n // Delete notification data from payload before sending to the page.\n var notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n var internalMsg = worker_page_message_defaultExport.createNewMsg(worker_page_message_defaultExport.TYPES_OF_MSG.NOTIFICATION_CLICKED, msgPayload);\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return _this.attemptToMessageClient_(windowClient, internalMsg);\n });\n event.waitUntil(promiseChain);\n };\n /**\r\n * @private\r\n * @param {Object} msgPayload\r\n * @return {NotificationOptions|undefined}\r\n */\n SWController.prototype.getNotificationData_ = function (msgPayload) {\n if (!msgPayload) {\n return;\n }\n if (_typeof(msgPayload.notification) !== 'object') {\n return;\n }\n var notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = (_a = {}, _a[FCM_MSG] = msgPayload, _a);\n return notificationInformation;\n var _a;\n };\n /**\r\n * Calling setBackgroundMessageHandler will opt in to some specific\r\n * behaviours.\r\n * 1.) If a notification doesn't need to be shown due to a window already\r\n * being visible, then push messages will be sent to the page.\r\n * 2.) If a notification needs to be shown, and the message contains no\r\n * notification data this method will be called\r\n * and the promise it returns will be passed to event.waitUntil.\r\n * If you do not set this callback then all push messages will let and the\r\n * developer can handle them in a their own 'push' event callback\r\n * @export\r\n * @param {function(Object)} callback The callback to be called when a push\r\n * message is received and a notification must be shown. The callback will\r\n * be given the data from the push message.\r\n */\n SWController.prototype.setBackgroundMessageHandler = function (callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(errors_defaultExport.codes.BG_HANDLER_FUNCTION_EXPECTED);\n }\n this.bgMessageHandler_ = callback;\n };\n /**\r\n * @private\r\n * @param {string} url The URL to look for when focusing a client.\r\n * @return {Object} Returns an existing window client or a newly opened\r\n * WindowClient.\r\n */\n SWController.prototype.getWindowClient_ = function (url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n var parsedURL = new URL(url).href;\n return self.clients.matchAll({\n type: 'window',\n includeUncontrolled: true\n }).then(function (clientList) {\n var suitableClient = null;\n for (var i = 0; i < clientList.length; i++) {\n var parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n };\n /**\r\n * This message will attempt to send the message to a window client.\r\n * @private\r\n * @param {Object} client The WindowClient to send the message to.\r\n * @param {Object} message The message to send to the client.\r\n * @returns {Promise} Returns a promise that resolves after sending the\r\n * message. This does not guarantee that the message was successfully\r\n * received.\r\n */\n SWController.prototype.attemptToMessageClient_ = function (client, message) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!client) {\n return reject(_this.errorFactory_.create(errors_defaultExport.codes.NO_WINDOW_CLIENT_TO_MSG));\n }\n client.postMessage(message);\n resolve();\n });\n };\n /**\r\n * @private\r\n * @returns {Promise} If there is currently a visible WindowClient,\r\n * this method will resolve to true, otherwise false.\r\n */\n SWController.prototype.hasVisibleClients_ = function () {\n return self.clients.matchAll({\n type: 'window',\n includeUncontrolled: true\n }).then(function (clientList) {\n return clientList.some(function (client) {\n return client.visibilityState === 'visible';\n });\n });\n };\n /**\r\n * @private\r\n * @param {Object} msgPayload The data from the push event that should be sent\r\n * to all available pages.\r\n * @returns {Promise} Returns a promise that resolves once the message\r\n * has been sent to all WindowClients.\r\n */\n SWController.prototype.sendMessageToWindowClients_ = function (msgPayload) {\n var _this = this;\n return self.clients.matchAll({\n type: 'window',\n includeUncontrolled: true\n }).then(function (clientList) {\n var internalMsg = worker_page_message_defaultExport.createNewMsg(worker_page_message_defaultExport.TYPES_OF_MSG.PUSH_MSG_RECEIVED, msgPayload);\n return Promise.all(clientList.map(function (client) {\n return _this.attemptToMessageClient_(client, internalMsg);\n }));\n });\n };\n /**\r\n * This will register the default service worker and return the registration.\r\n * @private\r\n * @return {Promise} The service worker\r\n * registration to be used for the push service.\r\n */\n SWController.prototype.getSWRegistration_ = function () {\n return Promise.resolve(self.registration);\n };\n return SWController;\n}(controller_interface_defaultExport);\n/* harmony default export */ var sw_controller_defaultExport = (sw_controller_SWController);\n// CONCATENATED MODULE: ./src/messaging.ts\n/* harmony export (immutable) */ __webpack_exports__[\"registerMessaging\"] = registerMessaging;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app__ = __webpack_require__(5);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\nfunction registerMessaging(instance) {\n var messagingName = 'messaging';\n var factoryMethod = function factoryMethod(app) {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new sw_controller_defaultExport(app);\n }\n // Assume we are in the window context.\n return new window_controller_defaultExport(app);\n };\n var namespaceExports = {\n // no-inline\n Messaging: window_controller_defaultExport\n };\n instance.INTERNAL.registerService(messagingName, factoryMethod, namespaceExports);\n}\nregisterMessaging(__WEBPACK_IMPORTED_MODULE_2__app__[\"default\"]);\n\n/***/ })\n\n},[24]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-messaging.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-messaging.js","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nfunction toBase64(arrayBuffer) {\n const uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\n\nexport default arrayBuffer => {\n const base64String = toBase64(arrayBuffer);\n return base64String.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/helpers/array-buffer-to-base64.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport WindowController from './messaging/controllers/window-controller';\nimport SWController from './messaging/controllers/sw-controller';\nimport firebase from './app';\n\nexport function registerMessaging(instance) {\n const messagingName = 'messaging';\n const factoryMethod = app => {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new SWController(app);\n }\n\n // Assume we are in the window context.\n return new WindowController(app);\n };\n\n const namespaceExports = {\n // no-inline\n Messaging: WindowController\n };\n\n instance.INTERNAL.registerService(\n messagingName,\n factoryMethod,\n namespaceExports\n );\n}\n\nregisterMessaging(firebase);\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nconst CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\n\nconst ERROR_MAP = {\n [CODES.AVAILABLE_IN_WINDOW]: 'This method is available in a Window context.',\n [CODES.AVAILABLE_IN_SW]:\n 'This method is available in a service worker ' + 'context.',\n [CODES.SHOULD_BE_INHERITED]:\n 'This method should be overriden by ' + 'extended classes.',\n [CODES.BAD_SENDER_ID]:\n \"Please ensure that 'messagingSenderId' is set \" +\n 'correctly in the options passed into firebase.initializeApp().',\n [CODES.PERMISSION_DEFAULT]:\n 'The required permissions were not granted and ' + 'dismissed instead.',\n [CODES.PERMISSION_BLOCKED]:\n 'The required permissions were not granted and ' + 'blocked instead.',\n [CODES.UNSUPPORTED_BROWSER]:\n \"This browser doesn't support the API's \" +\n 'required to use the firebase SDK.',\n [CODES.NOTIFICATIONS_BLOCKED]: 'Notifications have been blocked.',\n [CODES.FAILED_DEFAULT_REGISTRATION]:\n 'We are unable to register the ' +\n 'default service worker. {$browserErrorMessage}',\n [CODES.SW_REGISTRATION_EXPECTED]:\n 'A service worker registration was the ' + 'expected input.',\n [CODES.GET_SUBSCRIPTION_FAILED]:\n 'There was an error when trying to get ' +\n 'any existing Push Subscriptions.',\n [CODES.INVALID_SAVED_TOKEN]: 'Unable to access details of the saved token.',\n [CODES.SW_REG_REDUNDANT]:\n 'The service worker being used for push was made ' + 'redundant.',\n [CODES.TOKEN_SUBSCRIBE_FAILED]:\n 'A problem occured while subscribing the ' + 'user to FCM: {$message}',\n [CODES.TOKEN_SUBSCRIBE_NO_TOKEN]:\n 'FCM returned no token when subscribing ' + 'the user to push.',\n [CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET]:\n 'FCM returned an invalid response ' + 'when getting an FCM token.',\n [CODES.USE_SW_BEFORE_GET_TOKEN]:\n 'You must call useServiceWorker() before ' +\n 'calling getToken() to ensure your service worker is used.',\n [CODES.INVALID_DELETE_TOKEN]:\n 'You must pass a valid token into ' +\n 'deleteToken(), i.e. the token from getToken().',\n [CODES.DELETE_TOKEN_NOT_FOUND]:\n 'The deletion attempt for token could not ' +\n 'be performed as the token was not found.',\n [CODES.DELETE_SCOPE_NOT_FOUND]:\n 'The deletion attempt for service worker ' +\n 'scope could not be performed as the scope was not found.',\n [CODES.BG_HANDLER_FUNCTION_EXPECTED]:\n 'The input to ' + 'setBackgroundMessageHandler() must be a function.',\n [CODES.NO_WINDOW_CLIENT_TO_MSG]:\n 'An attempt was made to message a ' + 'non-existant window client.',\n [CODES.UNABLE_TO_RESUBSCRIBE]:\n 'There was an error while re-subscribing ' +\n 'the FCM token for push messaging. Will have to resubscribe the ' +\n 'user on next visit. {$message}',\n [CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE]:\n 'Could not find an FCM token ' +\n 'and as a result, unable to resubscribe. Will have to resubscribe the ' +\n 'user on next visit.',\n [CODES.FAILED_TO_DELETE_TOKEN]: 'Unable to delete the currently saved token.',\n [CODES.NO_SW_IN_REG]:\n 'Even though the service worker registration was ' +\n 'successful, there was a problem accessing the service worker itself.',\n [CODES.INCORRECT_GCM_SENDER_ID]:\n \"Please change your web app manifest's \" +\n \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\",\n [CODES.BAD_SCOPE]:\n 'The service worker scope must be a string with at ' +\n 'least one character.',\n [CODES.BAD_VAPID_KEY]:\n 'The public VAPID key must be a string with at ' + 'least one character.',\n [CODES.BAD_SUBSCRIPTION]:\n 'The subscription must be a valid ' + 'PushSubscription.',\n [CODES.BAD_TOKEN]:\n 'The FCM Token used for storage / lookup was not ' +\n 'a valid token string.',\n [CODES.BAD_PUSH_SET]:\n 'The FCM push set used for storage / lookup was not ' +\n 'not a valid push set string.',\n [CODES.FAILED_DELETE_VAPID_KEY]: 'The VAPID key could not be deleted.'\n};\n\nexport default {\n codes: CODES,\n map: ERROR_MAP\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/errors.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nconst FCM_APPLICATION_SERVER_KEY = [\n 0x04,\n 0x33,\n 0x94,\n 0xf7,\n 0xdf,\n 0xa1,\n 0xeb,\n 0xb1,\n 0xdc,\n 0x03,\n 0xa2,\n 0x5e,\n 0x15,\n 0x71,\n 0xdb,\n 0x48,\n 0xd3,\n 0x2e,\n 0xed,\n 0xed,\n 0xb2,\n 0x34,\n 0xdb,\n 0xb7,\n 0x47,\n 0x3a,\n 0x0c,\n 0x8f,\n 0xc4,\n 0xcc,\n 0xe1,\n 0x6f,\n 0x3c,\n 0x8c,\n 0x84,\n 0xdf,\n 0xab,\n 0xb6,\n 0x66,\n 0x3e,\n 0xf2,\n 0x0c,\n 0xd4,\n 0x8b,\n 0xfe,\n 0xe3,\n 0xf9,\n 0x76,\n 0x2f,\n 0x14,\n 0x1c,\n 0x63,\n 0x08,\n 0x6a,\n 0x6f,\n 0x2d,\n 0xb1,\n 0x1a,\n 0x95,\n 0xb0,\n 0xce,\n 0x37,\n 0xc0,\n 0x9c,\n 0x6e\n];\n\nconst SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\n\nexport default {\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/fcm-details.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport { ErrorFactory } from '../../app/errors';\n\nimport Errors from './errors';\nimport arrayBufferToBase64 from '../helpers/array-buffer-to-base64';\nimport FCMDetails from './fcm-details';\n\nconst FCM_TOKEN_DETAILS_DB = 'fcm_token_details_db';\nconst FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nconst FCM_TOKEN_DETAILS_DB_VERSION = 1;\n\nexport default class TokenManager {\n private errorFactory_: ErrorFactory;\n private openDbPromise_: Promise;\n\n constructor() {\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n this.openDbPromise_ = null;\n }\n\n /**\n * Get the indexedDB as a promsie.\n * @private\n * @return {Promise} The IndexedDB database\n */\n openDatabase_() {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n\n this.openDbPromise_ = new Promise((resolve, reject) => {\n const request = indexedDB.open(\n FCM_TOKEN_DETAILS_DB,\n FCM_TOKEN_DETAILS_DB_VERSION\n );\n request.onerror = event => {\n reject((event.target).error);\n };\n request.onsuccess = event => {\n resolve((event.target).result);\n };\n request.onupgradeneeded = event => {\n var db = (event.target).result;\n\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n\n return this.openDbPromise_;\n }\n\n /**\n * Close the currently open database.\n * @return {Promise} Returns the result of the promise chain.\n */\n closeDatabase() {\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(db => {\n db.close();\n this.openDbPromise_ = null;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Given a token, this method will look up the details in indexedDB.\n * @public\n * @param {string} fcmToken\n * @return {Promise} The details associated with that token.\n */\n getTokenDetailsFromToken(fcmToken) {\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const index = objectStore.index('fcmToken');\n const request = index.get(fcmToken);\n request.onerror = function(event) {\n reject((event.target).error);\n };\n request.onsuccess = function(event) {\n resolve((event.target).result);\n };\n });\n });\n }\n\n getTokenDetailsFromSWScope_(swScope) {\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = event => {\n reject((event.target).error);\n };\n\n scopeRequest.onsuccess = event => {\n resolve((event.target).result);\n };\n });\n });\n }\n\n getAllTokenDetailsForSenderId_(senderId): Promise> {\n return this.openDatabase_().then(db => {\n return new Promise>((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n\n const senderIdTokens = [];\n\n const cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = event => {\n reject((event.target).error);\n };\n\n cursorRequest.onsuccess = event => {\n const cursor = (event.target).result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n } else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n }\n\n /**\n * Given a PushSubscription and messagingSenderId, get an FCM token.\n * @public\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\n * @param {string=} pushSet If defined this will swap the subscription for\n * matching FCM token.\n * @return {Promise} Returns the FCM token to be used in place\n * of the PushSubscription.\n */\n subscribeToFCM(senderId, subscription, pushSet?): Promise {\n const p256dh = arrayBufferToBase64(subscription['getKey']('p256dh'));\n const auth = arrayBufferToBase64(subscription['getKey']('auth'));\n\n let fcmSubscribeBody =\n `authorized_entity=${senderId}&` +\n `endpoint=${subscription.endpoint}&` +\n `encryption_key=${p256dh}&` +\n `encryption_auth=${auth}`;\n\n if (pushSet) {\n fcmSubscribeBody += `&pushSet=${pushSet}`;\n }\n\n const headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n\n const subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n\n return fetch(\n FCMDetails.ENDPOINT + '/fcm/connect/subscribe',\n subscribeOptions\n )\n .then(response => response.json())\n .then(response => {\n const fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n const message = fcmTokenResponse['error']['message'];\n throw this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n\n if (!fcmTokenResponse['token']) {\n throw this.errorFactory_.create(\n Errors.codes.TOKEN_SUBSCRIBE_NO_TOKEN\n );\n }\n\n if (!fcmTokenResponse['pushSet']) {\n throw this.errorFactory_.create(\n Errors.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET\n );\n }\n\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n }\n\n /**\n * Checks the that fields in the PushSubscription are equivalent to the\n * details stores in the masterTokenDetails.\n * @private\n * @param {PushSubscription} subscription The push subscription we expect\n * the master token to match.\n * @param {Object} masterTokenDetails The saved details we wish to compare\n * with the PushSubscription\n * @return {boolean} true if the subscription and token details are\n * equivalent.\n */\n isSameSubscription_(subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return (\n subscription.endpoint === masterTokenDetails['endpoint'] &&\n arrayBufferToBase64(subscription['getKey']('auth')) ===\n masterTokenDetails['auth'] &&\n arrayBufferToBase64(subscription['getKey']('p256dh')) ===\n masterTokenDetails['p256dh']\n );\n }\n\n /**\n * Save the details for the fcm token for re-use at a later date.\n * @private\n * @param {string} senderId The 'messagingSenderId' used for this project\n * @param {ServiceWorkerRegistration} swRegistration The service worker\n * used to subscribe the user for web push\n * @param {PushSubscription} subscription The push subscription passed to\n * FCM for the current token.\n * @param {string} fcmToken The FCM token currently used on this\n * device.\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\n * @return {Promise}\n */\n saveTokenDetails_(\n senderId,\n swRegistration,\n subscription,\n fcmToken,\n fcmPushSet\n ) {\n const details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: arrayBufferToBase64(subscription['getKey']('auth')),\n p256dh: arrayBufferToBase64(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const request = objectStore.put(details);\n request.onerror = event => {\n reject((event.target).error);\n };\n request.onsuccess = event => {\n resolve();\n };\n });\n });\n }\n\n /**\n * Returns the saved FCM Token if one is available and still valid,\n * otherwise `null` is returned.\n * @param {string} senderId This should be the sender ID associated with the\n * FCM Token being retrieved.\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\n * to subscribe the user to push.\n * @return {Promise | Promise} Returns the saved FCM Token if\n * avilable and valid.\n * @export\n */\n getSavedToken(senderId, swRegistration) {\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED)\n );\n }\n\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.BAD_SENDER_ID)\n );\n }\n\n return this.getAllTokenDetailsForSenderId_(senderId)\n .then(allTokenDetails => {\n if (allTokenDetails.length === 0) {\n return;\n }\n\n const index = allTokenDetails.findIndex(tokenDetails => {\n return (\n swRegistration.scope === tokenDetails['swScope'] &&\n senderId === tokenDetails['fcmSenderId']\n );\n });\n\n if (index === -1) {\n return;\n }\n\n return allTokenDetails[index];\n })\n .then(tokenDetails => {\n if (!tokenDetails) {\n return;\n }\n\n return swRegistration.pushManager\n .getSubscription()\n .catch(err => {\n throw this.errorFactory_.create(\n Errors.codes.GET_SUBSCRIPTION_FAILED\n );\n })\n .then(subscription => {\n if (\n subscription &&\n this.isSameSubscription_(subscription, tokenDetails)\n ) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n }\n\n /**\n * Creates a new FCM token.\n */\n createToken(senderId, swRegistration): Promise {\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.BAD_SENDER_ID)\n );\n }\n\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED)\n );\n }\n\n // Check for existing subscription first\n let subscription;\n let fcmTokenDetails;\n return swRegistration.pushManager\n .getSubscription()\n .then(subscription => {\n if (subscription) {\n return subscription;\n }\n\n return swRegistration.pushManager.subscribe(\n FCMDetails.SUBSCRIPTION_OPTIONS\n );\n })\n .then(sub => {\n subscription = sub;\n return this.subscribeToFCM(senderId, subscription);\n })\n .then(tokenDetails => {\n fcmTokenDetails = tokenDetails;\n return this.saveTokenDetails_(\n senderId,\n swRegistration,\n subscription,\n fcmTokenDetails['token'],\n fcmTokenDetails['pushSet']\n );\n })\n .then(() => fcmTokenDetails['token']);\n }\n\n /**\n * This method deletes details of the current FCM token.\n * It's returning a promise in case we need to move to an async\n * method for deleting at a later date.\n * @param {string} token Token to be deleted\n * @return {Promise} Resolves once the FCM token details have been\n * deleted and returns the deleted details.\n */\n deleteToken(token) {\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.INVALID_DELETE_TOKEN)\n );\n }\n\n return this.getTokenDetailsFromToken(token).then(details => {\n if (!details) {\n throw this.errorFactory_.create(Errors.codes.DELETE_TOKEN_NOT_FOUND);\n }\n\n return this.openDatabase_().then(db => {\n return new Promise((resolve, reject) => {\n const transaction = db.transaction(\n [FCM_TOKEN_OBJ_STORE],\n 'readwrite'\n );\n const objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n const request = objectStore.delete(details['swScope']);\n request.onerror = event => {\n reject((event.target).error);\n };\n request.onsuccess = event => {\n if ((event.target).result === 0) {\n reject(\n this.errorFactory_.create(Errors.codes.FAILED_TO_DELETE_TOKEN)\n );\n return;\n }\n\n resolve(details);\n };\n });\n });\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/token-manager.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport { ErrorFactory } from '../../app/errors';\nimport Errors from '../models/errors';\nimport TokenManager from '../models/token-manager';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\n\nconst SENDER_ID_OPTION_NAME = 'messagingSenderId';\n\nexport default class ControllerInterface {\n public app;\n public INTERNAL;\n protected errorFactory_;\n private messagingSenderId_: string;\n private tokenManager_: TokenManager;\n\n /**\n * An interface of the Messaging Service API\n * @param {!firebase.app.App} app\n */\n constructor(app) {\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n\n if (\n !app.options[SENDER_ID_OPTION_NAME] ||\n typeof app.options[SENDER_ID_OPTION_NAME] !== 'string'\n ) {\n throw this.errorFactory_.create(Errors.codes.BAD_SENDER_ID);\n }\n\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n\n this.tokenManager_ = new TokenManager();\n\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = () => this.delete;\n }\n\n /**\n * @export\n * @return {Promise | Promise} Returns a promise that\n * resolves to an FCM token.\n */\n getToken() {\n // Check with permissions\n const currentPermission = this.getNotificationPermission_();\n if (currentPermission !== NOTIFICATION_PERMISSION.granted) {\n if (currentPermission === NOTIFICATION_PERMISSION.denied) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.NOTIFICATIONS_BLOCKED)\n );\n }\n\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n\n return this.getSWRegistration_().then(registration => {\n return this.tokenManager_\n .getSavedToken(this.messagingSenderId_, registration)\n .then(token => {\n if (token) {\n return token;\n }\n\n return this.tokenManager_.createToken(\n this.messagingSenderId_,\n registration\n );\n });\n });\n }\n\n /**\n * This method deletes tokens that the token manager looks after and then\n * unregisters the push subscription if it exists.\n * @export\n * @param {string} token\n * @return {Promise}\n */\n deleteToken(token) {\n return this.tokenManager_.deleteToken(token).then(() => {\n return this.getSWRegistration_()\n .then(registration => {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n })\n .then(subscription => {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n }\n\n getSWRegistration_(): Promise {\n throw this.errorFactory_.create(Errors.codes.SHOULD_BE_INHERITED);\n }\n\n //\n // The following methods should only be available in the window.\n //\n\n requestPermission() {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n /**\n * @export\n * @param {!ServiceWorkerRegistration} registration\n */\n useServiceWorker(registration) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver\n * @param {function(!Error)=} optError\n * @param {function()=} optCompleted\n * @return {!function()}\n */\n onMessage(nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n onTokenRefresh(nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n }\n\n //\n // The following methods are used by the service worker only.\n //\n\n /**\n * @export\n * @param {function(Object)} callback\n */\n setBackgroundMessageHandler(callback) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_SW);\n }\n\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n\n /**\n * This method is required to adhere to the Firebase interface.\n * It closes any currently open indexdb database connections.\n */\n delete() {\n this.tokenManager_.closeDatabase();\n }\n\n /**\n * Returns the current Notification Permission state.\n * @private\n * @return {string} The currenct permission state.\n */\n getNotificationPermission_() {\n return (Notification as any).permission;\n }\n\n /**\n * @protected\n * @returns {TokenManager}\n */\n getTokenManager() {\n return this.tokenManager_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/controllers/controller-interface.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\nconst PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nconst msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\n\nconst createNewMsg = (msgType, msgData) => {\n const message = {\n [PARAMS.TYPE_OF_MSG]: msgType,\n [PARAMS.DATA]: msgData\n };\n return message;\n};\n\nexport default {\n PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/worker-page-message.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nexport default {\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/models/default-sw.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport DefaultSW from '../models/default-sw';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\nimport { createSubscribe } from '../../app/subscribe';\n\ndeclare const firebase: any;\n\nexport default class WindowController extends ControllerInterface {\n private registrationToUse_;\n private manifestCheckPromise_;\n private messageObserver_;\n private onMessage_;\n private tokenRefreshObserver_;\n private onTokenRefresh_;\n\n /**\n * A service that provides a MessagingService instance.\n * @param {!firebase.app.App} app\n */\n constructor(app) {\n super(app);\n\n /**\n * @private\n * @type {ServiceWorkerRegistration}\n */\n this.registrationToUse_;\n\n /**\n * @private\n * @type {Promise}\n */\n this.manifestCheckPromise_;\n\n /**\n * @private\n * @type {firebase.Observer}\n */\n this.messageObserver_ = null;\n /**\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\n * observer.\n */\n this.onMessage_ = createSubscribe(observer => {\n this.messageObserver_ = observer;\n });\n\n /**\n * @private\n * @type {firebase.Observer}\n */\n this.tokenRefreshObserver_ = null;\n this.onTokenRefresh_ = createSubscribe(observer => {\n this.tokenRefreshObserver_ = observer;\n });\n\n this.setupSWMessageListener_();\n }\n\n /**\n * This method returns an FCM token if it can be generated.\n * The return promise will reject if the browser doesn't support\n * FCM, if permission is denied for notifications or it's not\n * possible to generate a token.\n * @export\n * @return {Promise | Promise} Returns a promise the\n * resolves to an FCM token or null if permission isn't granted.\n */\n getToken() {\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(\n this.errorFactory_.create(Errors.codes.UNSUPPORTED_BROWSER)\n );\n }\n\n return this.manifestCheck_().then(() => {\n return super.getToken();\n });\n }\n\n /**\n * The method checks that a manifest is defined and has the correct GCM\n * sender ID.\n * @private\n * @return {Promise} Returns a promise that resolves if the manifest matches\n * our required sender ID\n */\n manifestCheck_() {\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n\n const manifestTag = document.querySelector(\n 'link[rel=\"manifest\"]'\n );\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n } else {\n this.manifestCheckPromise_ = fetch(manifestTag.href)\n .then(response => {\n return response.json();\n })\n .catch(() => {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n })\n .then(manifestContent => {\n if (!manifestContent) {\n return;\n }\n\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw this.errorFactory_.create(\n Errors.codes.INCORRECT_GCM_SENDER_ID\n );\n }\n });\n }\n\n return this.manifestCheckPromise_;\n }\n\n /**\n * Request permission if it is not currently granted\n * @export\n * @returns {Promise} Resolves if the permission was granted, otherwise\n * rejects\n */\n requestPermission() {\n if ((Notification as any).permission === NOTIFICATION_PERMISSION.granted) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n const managePermissionResult = result => {\n if (result === NOTIFICATION_PERMISSION.granted) {\n return resolve();\n } else if (result === NOTIFICATION_PERMISSION.denied) {\n return reject(\n this.errorFactory_.create(Errors.codes.PERMISSION_BLOCKED)\n );\n } else {\n return reject(\n this.errorFactory_.create(Errors.codes.PERMISSION_DEFAULT)\n );\n }\n };\n\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n const permissionPromise = Notification.requestPermission(result => {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n\n managePermissionResult(result);\n });\n\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n }\n\n /**\n * This method allows a developer to override the default service worker and\n * instead use a custom service worker.\n * @export\n * @param {!ServiceWorkerRegistration} registration The service worker\n * registration that should be used to receive the push messages.\n */\n useServiceWorker(registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED);\n }\n\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(Errors.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n\n this.registrationToUse_ = registration;\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\n * or a function triggered on message.\n * @param {function(!Error)=} optError Optional A function triggered on\n * message error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n onMessage(nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n }\n\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n onTokenRefresh(nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n }\n\n /**\n * Given a registration, wait for the service worker it relates to\n * become activer\n * @private\n * @param {ServiceWorkerRegistration} registration Registration to wait\n * for service worker to become active\n * @return {Promise} Wait for service worker\n * registration to become active\n */\n waitForRegistrationToActivate_(registration) {\n const serviceWorker =\n registration.installing || registration.waiting || registration.active;\n\n return new Promise((resolve, reject) => {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(this.errorFactory_.create(Errors.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n\n if (serviceWorker.state === 'redundant') {\n reject(this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n return;\n }\n\n let stateChangeListener = () => {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n } else if (serviceWorker.state === 'redundant') {\n reject(this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n } else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n }\n\n /**\n * This will regiater the default service worker and return the registration\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n getSWRegistration_() {\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n\n return navigator.serviceWorker\n .register(DefaultSW.path, {\n scope: DefaultSW.scope\n })\n .catch(err => {\n throw this.errorFactory_.create(\n Errors.codes.FAILED_DEFAULT_REGISTRATION,\n {\n browserErrorMessage: err.message\n }\n );\n })\n .then(registration => {\n return this.waitForRegistrationToActivate_(registration).then(() => {\n this.registrationToUse_ = registration;\n\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n\n return registration;\n });\n });\n }\n\n /**\n * This method will set up a message listener to handle\n * events from the service worker that should trigger\n * events in the page.\n *\n * @private\n */\n setupSWMessageListener_() {\n if (!('serviceWorker' in navigator)) {\n return;\n }\n\n navigator.serviceWorker.addEventListener(\n 'message',\n event => {\n if (!event.data || !event.data[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n\n const workerPageMessage = event.data;\n switch (workerPageMessage[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n case WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n const pushMessage =\n workerPageMessage[WorkerPageMessage.PARAMS.DATA];\n this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n },\n false\n );\n }\n\n /**\n * Checks to see if the required API's are valid or not.\n * @private\n * @return {boolean} Returns true if the desired APIs are available.\n */\n isSupported_() {\n return (\n 'serviceWorker' in navigator &&\n 'PushManager' in window &&\n 'Notification' in window &&\n 'fetch' in window &&\n ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') &&\n PushSubscription.prototype.hasOwnProperty('getKey')\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/controllers/window-controller.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n'use strict';\n\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport FCMDetails from '../models/fcm-details';\n\nconst FCM_MSG = 'FCM_MSG';\n\nexport default class SWController extends ControllerInterface {\n private bgMessageHandler_: (input: Object) => Promise;\n\n constructor(app) {\n super(app);\n\n self.addEventListener('push', e => this.onPush_(e), false);\n self.addEventListener(\n 'pushsubscriptionchange',\n e => this.onSubChange_(e),\n false\n );\n self.addEventListener(\n 'notificationclick',\n e => this.onNotificationClick_(e),\n false\n );\n\n /**\n * @private\n * @type {function(Object)|null}\n */\n this.bgMessageHandler_ = null;\n }\n\n /**\n * A handler for push events that shows notifications based on the content of\n * the payload.\n *\n * The payload must be a JSON-encoded Object with a `notification` key. The\n * value of the `notification` property will be used as the NotificationOptions\n * object passed to showNotification. Additionally, the `title` property of the\n * notification object will be used as the title.\n *\n * If there is no notification data in the payload then no notification will be\n * shown.\n * @private\n */\n onPush_(event) {\n let msgPayload;\n try {\n msgPayload = event.data.json();\n } catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n\n const handleMsgPromise = this.hasVisibleClients_().then(\n hasVisibleClients => {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || this.bgMessageHandler_) {\n // Send to page\n return this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n\n const notificationDetails = this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n const notificationTitle = notificationDetails.title || '';\n return (self as any).registration.showNotification(\n notificationTitle,\n notificationDetails\n );\n } else if (this.bgMessageHandler_) {\n return this.bgMessageHandler_(msgPayload);\n }\n }\n );\n\n event.waitUntil(handleMsgPromise);\n }\n\n /**\n * @private\n */\n onSubChange_(event) {\n const promiseChain = this.getToken().then(token => {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw this.errorFactory_.create(\n Errors.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE\n );\n }\n\n let tokenDetails = null;\n const tokenManager = this.getTokenManager();\n return tokenManager\n .getTokenDetailsFromToken(token)\n .then(details => {\n tokenDetails = details;\n if (!tokenDetails) {\n throw this.errorFactory_.create(Errors.codes.INVALID_SAVED_TOKEN);\n }\n\n // Attempt to get a new subscription\n return (self as any).registration.pushManager.subscribe(\n FCMDetails.SUBSCRIPTION_OPTIONS\n );\n })\n .then(newSubscription => {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(\n tokenDetails.fcmSenderId,\n newSubscription,\n tokenDetails.fcmPushSet\n );\n })\n .catch(err => {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(() => {\n throw this.errorFactory_.create(\n Errors.codes.UNABLE_TO_RESUBSCRIBE,\n {\n message: err\n }\n );\n });\n });\n });\n\n event.waitUntil(promiseChain);\n }\n\n /**\n * @private\n */\n onNotificationClick_(event) {\n if (\n !(\n event.notification &&\n event.notification.data &&\n event.notification.data[FCM_MSG]\n )\n ) {\n // Not an FCM notification, do nothing.\n return;\n }\n\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n\n event.notification.close();\n\n const msgPayload = event.notification.data[FCM_MSG];\n const clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n\n const promiseChain = this.getWindowClient_(clickAction)\n .then(windowClient => {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return (self as any).clients.openWindow(clickAction);\n }\n return windowClient;\n })\n .then(windowClient => {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n\n // Delete notification data from payload before sending to the page.\n const notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n\n const internalMsg = WorkerPageMessage.createNewMsg(\n WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED,\n msgPayload\n );\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return this.attemptToMessageClient_(windowClient, internalMsg);\n });\n\n event.waitUntil(promiseChain);\n }\n\n /**\n * @private\n * @param {Object} msgPayload\n * @return {NotificationOptions|undefined}\n */\n getNotificationData_(msgPayload) {\n if (!msgPayload) {\n return;\n }\n\n if (typeof msgPayload.notification !== 'object') {\n return;\n }\n\n const notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = {\n [FCM_MSG]: msgPayload\n };\n\n return notificationInformation;\n }\n\n /**\n * Calling setBackgroundMessageHandler will opt in to some specific\n * behaviours.\n * 1.) If a notification doesn't need to be shown due to a window already\n * being visible, then push messages will be sent to the page.\n * 2.) If a notification needs to be shown, and the message contains no\n * notification data this method will be called\n * and the promise it returns will be passed to event.waitUntil.\n * If you do not set this callback then all push messages will let and the\n * developer can handle them in a their own 'push' event callback\n * @export\n * @param {function(Object)} callback The callback to be called when a push\n * message is received and a notification must be shown. The callback will\n * be given the data from the push message.\n */\n setBackgroundMessageHandler(callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(\n Errors.codes.BG_HANDLER_FUNCTION_EXPECTED\n );\n }\n\n this.bgMessageHandler_ = callback;\n }\n\n /**\n * @private\n * @param {string} url The URL to look for when focusing a client.\n * @return {Object} Returns an existing window client or a newly opened\n * WindowClient.\n */\n getWindowClient_(url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n const parsedURL = new URL(url).href;\n\n return (self as any).clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(clientList => {\n let suitableClient = null;\n for (let i = 0; i < clientList.length; i++) {\n const parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n }\n\n /**\n * This message will attempt to send the message to a window client.\n * @private\n * @param {Object} client The WindowClient to send the message to.\n * @param {Object} message The message to send to the client.\n * @returns {Promise} Returns a promise that resolves after sending the\n * message. This does not guarantee that the message was successfully\n * received.\n */\n attemptToMessageClient_(client, message) {\n return new Promise((resolve, reject) => {\n if (!client) {\n return reject(\n this.errorFactory_.create(Errors.codes.NO_WINDOW_CLIENT_TO_MSG)\n );\n }\n\n client.postMessage(message);\n resolve();\n });\n }\n\n /**\n * @private\n * @returns {Promise} If there is currently a visible WindowClient,\n * this method will resolve to true, otherwise false.\n */\n hasVisibleClients_() {\n return (self as any).clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(clientList => {\n return clientList.some(client => client.visibilityState === 'visible');\n });\n }\n\n /**\n * @private\n * @param {Object} msgPayload The data from the push event that should be sent\n * to all available pages.\n * @returns {Promise} Returns a promise that resolves once the message\n * has been sent to all WindowClients.\n */\n sendMessageToWindowClients_(msgPayload) {\n return (self as any).clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(clientList => {\n const internalMsg = WorkerPageMessage.createNewMsg(\n WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED,\n msgPayload\n );\n\n return Promise.all(\n clientList.map(client => {\n return this.attemptToMessageClient_(client, internalMsg);\n })\n );\n });\n }\n\n /**\n * This will register the default service worker and return the registration.\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n getSWRegistration_() {\n return Promise.resolve((self as any).registration);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/messaging/controllers/sw-controller.ts","try {\n webpackJsonpFirebase([1],{\n\n/***/ 23:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// CONCATENATED MODULE: ./src/storage/implementation/constants.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Constants used in the Firebase Storage library.\r\n */\n/**\r\n * Domain and scheme for API calls.\r\n */\nvar domainBase = 'https://firebasestorage.googleapis.com';\n/**\r\n * Domain and scheme for object downloads.\r\n */\nvar downloadBase = 'https://firebasestorage.googleapis.com';\n/**\r\n * Base URL for non-upload calls to the API.\r\n */\nvar apiBaseUrl = '/v0';\n/**\r\n * Base URL for upload calls to the API.\r\n */\nvar apiUploadBaseUrl = '/v0';\nfunction setDomainBase(domainBase) {\n domainBase = domainBase;\n}\nvar configOption = 'storageBucket';\n/**\r\n * 1 minute\r\n */\nvar shortMaxOperationRetryTime = 1 * 60 * 1000;\n/**\r\n * 2 minutes\r\n */\nvar defaultMaxOperationRetryTime = 2 * 60 * 1000;\n/**\r\n * 10 minutes\r\n */\nvar defaultMaxUploadRetryTime = 10 * 60 * 100;\n/**\r\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\r\n * enough for us to use it directly.\r\n */\nvar minSafeInteger = -9007199254740991;\n// CONCATENATED MODULE: ./src/storage/implementation/error.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\nvar FirebaseStorageError = function () {\n function FirebaseStorageError(code, message) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n FirebaseStorageError.prototype.codeProp = function () {\n return this.code;\n };\n FirebaseStorageError.prototype.codeEquals = function (code) {\n return prependCode(code) === this.codeProp();\n };\n FirebaseStorageError.prototype.serverResponseProp = function () {\n return this.serverResponse_;\n };\n FirebaseStorageError.prototype.setServerResponseProp = function (serverResponse) {\n this.serverResponse_ = serverResponse;\n };\n Object.defineProperty(FirebaseStorageError.prototype, \"name\", {\n get: function get() {\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"code\", {\n get: function get() {\n return this.code_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"message\", {\n get: function get() {\n return this.message_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n get: function get() {\n return this.serverResponse_;\n },\n enumerable: true,\n configurable: true\n });\n return FirebaseStorageError;\n}();\n\nvar errors = {};\nvar Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\nfunction prependCode(code) {\n return 'storage/' + code;\n}\nfunction unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' + 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\nfunction objectNotFound(path) {\n return new FirebaseStorageError(Code.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nfunction bucketNotFound(bucket) {\n return new FirebaseStorageError(Code.BUCKET_NOT_FOUND, \"Bucket '\" + bucket + \"' does not exist.\");\n}\nfunction projectNotFound(project) {\n return new FirebaseStorageError(Code.PROJECT_NOT_FOUND, \"Project '\" + project + \"' does not exist.\");\n}\nfunction quotaExceeded(bucket) {\n return new FirebaseStorageError(Code.QUOTA_EXCEEDED, \"Quota for bucket '\" + bucket + \"' exceeded, please view quota on \" + 'https://firebase.google.com/pricing/.');\n}\nfunction unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' + 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\nfunction unauthorized(path) {\n return new FirebaseStorageError(Code.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nfunction retryLimitExceeded() {\n return new FirebaseStorageError(Code.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nfunction invalidChecksum(path, checksum, calculated) {\n return new FirebaseStorageError(Code.INVALID_CHECKSUM, \"Uploaded/downloaded object '\" + path + \"' has checksum '\" + checksum + \"' which does not match '\" + calculated + \"'. Please retry the upload/download.\");\n}\nfunction error_canceled() {\n return new FirebaseStorageError(Code.CANCELED, 'User canceled the upload/download.');\n}\nfunction invalidEventName(name) {\n return new FirebaseStorageError(Code.INVALID_EVENT_NAME, \"Invalid event name '\" + name + \"'.\");\n}\nfunction invalidUrl(url) {\n return new FirebaseStorageError(Code.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nfunction invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(Code.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nfunction noDefaultBucket() {\n return new FirebaseStorageError(Code.NO_DEFAULT_BUCKET, 'No default bucket ' + \"found. Did you set the '\" + configOption + \"' property when initializing the app?\");\n}\nfunction cannotSliceBlob() {\n return new FirebaseStorageError(Code.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nfunction serverFileWrongSize() {\n return new FirebaseStorageError(Code.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nfunction noDownloadURL() {\n return new FirebaseStorageError(Code.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nfunction invalidArgument(index, fnName, message) {\n return new FirebaseStorageError(Code.INVALID_ARGUMENT, 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message);\n}\nfunction invalidArgumentCount(argMin, argMax, fnName, real) {\n var countPart;\n var plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n } else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(Code.INVALID_ARGUMENT_COUNT, 'Invalid argument count in `' + fnName + '`: Expected ' + countPart + ' ' + plural + ', received ' + real + '.');\n}\nfunction appDeleted() {\n return new FirebaseStorageError(Code.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\r\n * @param name The name of the operation that was invalid.\r\n */\nfunction invalidRootOperation(name) {\n return new FirebaseStorageError(Code.INVALID_ROOT_OPERATION, \"The operation '\" + name + \"' cannot be performed on a root reference, create a non-root \" + \"reference using child, such as .child('file.png').\");\n}\n/**\r\n * @param format The format that was not valid.\r\n * @param message A message describing the format violation.\r\n */\nfunction invalidFormat(format, message) {\n return new FirebaseStorageError(Code.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\r\n * @param message A message describing the internal error.\r\n */\nfunction internalError(message) {\n throw new FirebaseStorageError(Code.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/string.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\nvar StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\nfunction formatValidator(stringFormat) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' + StringFormat.RAW + ', ' + StringFormat.BASE64 + ', ' + StringFormat.BASE64URL + ', ' + StringFormat.DATA_URL + '].';\n }\n}\n/**\r\n * @struct\r\n */\nvar StringData = function () {\n function StringData(data, opt_contentType) {\n this.data = data;\n this.contentType = opt_contentType || null;\n }\n return StringData;\n}();\n\nfunction dataFromString(format, string) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n // assert(false);\n throw unknown();\n}\nfunction utf8Bytes_(string) {\n var b = [];\n for (var i = 0; i < string.length; i++) {\n var c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n } else {\n if (c <= 2047) {\n b.push(192 | c >> 6, 128 | c & 63);\n } else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n var valid = i < string.length - 1 && (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n } else {\n var hi = c;\n var lo = string.charCodeAt(++i);\n c = 65536 | (hi & 1023) << 10 | lo & 1023;\n b.push(240 | c >> 18, 128 | c >> 12 & 63, 128 | c >> 6 & 63, 128 | c & 63);\n }\n } else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n } else {\n b.push(224 | c >> 12, 128 | c >> 6 & 63, 128 | c & 63);\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\nfunction percentEncodedBytes_(string) {\n var decoded;\n try {\n decoded = decodeURIComponent(string);\n } catch (e) {\n throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n return utf8Bytes_(decoded);\n}\nfunction base64Bytes_(format, string) {\n switch (format) {\n case StringFormat.BASE64:\n {\n var hasMinus = string.indexOf('-') !== -1;\n var hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64url encoded?\");\n }\n break;\n }\n case StringFormat.BASE64URL:\n {\n var hasPlus = string.indexOf('+') !== -1;\n var hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n var bytes;\n try {\n bytes = atob(string);\n } catch (e) {\n throw invalidFormat(format, 'Invalid character found');\n }\n var array = new Uint8Array(bytes.length);\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n/**\r\n * @struct\r\n */\nvar string_DataURLParts = function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n var middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64 ? middle.substring(0, middle.length - ';base64'.length) : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n return DataURLParts;\n}();\nfunction dataURLBytes_(string) {\n var parts = new string_DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n } else {\n return percentEncodedBytes_(parts.rest);\n }\n}\nfunction dataURLContentType_(string) {\n var parts = new string_DataURLParts(string);\n return parts.contentType;\n}\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n return s.substring(s.length - end.length) === end;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/taskenums.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\nvar TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\nvar InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\nvar TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\nfunction taskStateFromInternalTaskState(state) {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/object.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Contains methods for working with objects.\r\n */\nfunction contains(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction forEach(obj, f) {\n for (var key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\nfunction clone(obj) {\n if (obj == null) {\n return {};\n }\n var c = {};\n forEach(obj, function (key, val) {\n c[key] = val;\n });\n return c;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/promise_external.ts\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_promise__ = __webpack_require__(4);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Implements the promise abstraction interface for external\r\n * (public SDK) packaging, which just passes through to the firebase-app impl.\r\n */\n/**\r\n * @template T\r\n * @param {function((function(T): void),\r\n * (function(!Error): void))} resolver\r\n */\n\nfunction make(resolver) {\n return new __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */](resolver);\n}\n/**\r\n * @template T\r\n */\nfunction promise_external_resolve(value) {\n return __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].resolve(value);\n}\nfunction promise_external_reject(error) {\n return __WEBPACK_IMPORTED_MODULE_0__utils_promise__[\"b\" /* PromiseImpl */].reject(error);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/type.ts\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @return False if the object is undefined or null, true otherwise.\r\n */\nfunction isDef(p) {\n return p != null;\n}\nfunction isJustDef(p) {\n return p !== void 0;\n}\nfunction isFunction(p) {\n return typeof p === 'function';\n}\nfunction isObject(p) {\n return (typeof p === 'undefined' ? 'undefined' : _typeof(p)) === 'object';\n}\nfunction isNonNullObject(p) {\n return isObject(p) && p !== null;\n}\nfunction isNonArrayObject(p) {\n return isObject(p) && !Array.isArray(p);\n}\nfunction isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\nfunction isNumber(p) {\n return typeof p === 'number' || p instanceof Number;\n}\nfunction isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\nfunction isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n// CONCATENATED MODULE: ./src/storage/implementation/xhrio.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @enum{number}\r\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode || (ErrorCode = {}));\n// CONCATENATED MODULE: ./src/storage/implementation/xhrio_network.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n/**\r\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\r\n * doesn't work in React Native on Android.\r\n */\nvar xhrio_network_NetworkXhrIo = function () {\n function NetworkXhrIo() {\n var _this = this;\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = ErrorCode.NO_ERROR;\n this.sendPromise_ = make(function (resolve, reject) {\n _this.xhr_.addEventListener('abort', function (event) {\n _this.errorCode_ = ErrorCode.ABORT;\n resolve(_this);\n });\n _this.xhr_.addEventListener('error', function (event) {\n _this.errorCode_ = ErrorCode.NETWORK_ERROR;\n resolve(_this);\n });\n _this.xhr_.addEventListener('load', function (event) {\n resolve(_this);\n });\n });\n }\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.send = function (url, method, opt_body, opt_headers) {\n var _this = this;\n if (this.sent_) {\n throw internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (isDef(opt_headers)) {\n var headers = opt_headers;\n forEach(headers, function (key, val) {\n _this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (isDef(opt_body)) {\n this.xhr_.send(opt_body);\n } else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw internalError('cannot .getErrorCode() before sending');\n }\n return this.errorCode_;\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getStatus = function () {\n if (!this.sent_) {\n throw internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n } catch (e) {\n return -1;\n }\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw internalError('cannot .getResponseText() before sending');\n }\n return this.xhr_.responseText;\n };\n /**\r\n * Aborts the request.\r\n * @override\r\n */\n NetworkXhrIo.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.addUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\r\n * @override\r\n */\n NetworkXhrIo.prototype.removeUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n return NetworkXhrIo;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/xhriopool.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * Factory-like class for creating XhrIo instances.\r\n */\nvar xhriopool_XhrIoPool = function () {\n function XhrIoPool() {}\n XhrIoPool.prototype.createXhrIo = function () {\n return new xhrio_network_NetworkXhrIo();\n };\n return XhrIoPool;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/json.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * Returns the Object resulting from parsing the given JSON, or null if the\r\n * given string does not represent a JSON object.\r\n */\nfunction jsonObjectOrNull(s) {\n var obj;\n try {\n obj = JSON.parse(s);\n } catch (e) {\n return null;\n }\n if (isNonArrayObject(obj)) {\n return obj;\n } else {\n return null;\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/location.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Functionality related to the parsing/composition of bucket/\r\n * object location.\r\n */\n\n/**\r\n * @struct\r\n */\nvar location_Location = function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n Object.defineProperty(Location.prototype, \"path\", {\n get: function get() {\n return this.path_;\n },\n enumerable: true,\n configurable: true\n });\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n Location.makeFromBucketSpec = function (bucketString) {\n var bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n } catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n } else {\n throw invalidDefaultBucket(bucketString);\n }\n };\n Location.makeFromUrl = function (url) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n var gsPath = '(/(.*))?$';\n var path = '(/([^?#]*).*)?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = { bucket: 1, path: 3 };\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n var version = 'v[A-Za-z0-9_]+';\n var httpRegex = new RegExp('^https?://firebasestorage\\\\.googleapis\\\\.com/' + version + '/b/' + bucketDomain + '/o' + path, 'i');\n var httpIndices = { bucket: 1, path: 3 };\n var groups = [{ regex: gsRegex, indices: gsIndices, postModify: gsModify }, { regex: httpRegex, indices: httpIndices, postModify: httpModify }];\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw invalidUrl(url);\n }\n return location;\n };\n return Location;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/path.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Contains helper methods for manipulating paths.\r\n */\n/**\r\n * @return Null if the path is already at the root.\r\n */\nfunction parent(path) {\n if (path.length == 0) {\n return null;\n }\n var index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n var newPath = path.slice(0, index);\n return newPath;\n}\nfunction child(path, childPath) {\n var canonicalChildPath = childPath.split('/').filter(function (component) {\n return component.length > 0;\n }).join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n } else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\r\n * Returns the last component of a path.\r\n * '/foo/bar' -> 'bar'\r\n * '/foo/bar/baz/' -> 'baz/'\r\n * '/a' -> 'a'\r\n */\nfunction lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n } else {\n return path.slice(index + 1);\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/url.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Functions to create and manipulate URLs for the server API.\r\n */\n\n\nfunction makeNormalUrl(urlPart) {\n return domainBase + apiBaseUrl + urlPart;\n}\nfunction makeDownloadUrl(urlPart) {\n return downloadBase + apiBaseUrl + urlPart;\n}\nfunction makeUploadUrl(urlPart) {\n return domainBase + apiUploadBaseUrl + urlPart;\n}\nfunction makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n forEach(params, function (key, val) {\n var nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/metadata.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\nfunction noXform_(metadata, value) {\n return value;\n}\n/**\r\n * @struct\r\n */\nvar Mapping = function () {\n function Mapping(server, opt_local, opt_writable, opt_xform) {\n this.server = server;\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n return Mapping;\n}();\n\nvar mappings_ = null;\nfunction xformPath(fullPath) {\n var valid = isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n } else {\n fullPath = fullPath;\n return lastComponent(fullPath);\n }\n}\nfunction getMappings() {\n if (mappings_) {\n return mappings_;\n }\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n function mappingsXformPath(metadata, fullPath) {\n return xformPath(fullPath);\n }\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\r\n * Coerces the second param to a number, if it is defined.\r\n */\n function xformSize(metadata, size) {\n if (isDef(size)) {\n return +size;\n } else {\n return size;\n }\n }\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n /**\r\n * Transforms a comma-separated string of tokens into a list of download\r\n * URLs.\r\n */\n function xformTokens(metadata, tokens) {\n var valid = isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = makeDownloadUrl(urlPart);\n var queryString = makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(new Mapping('downloadTokens', 'downloadURLs', false, xformTokens));\n mappings_ = mappings;\n return mappings_;\n}\nfunction addRef(metadata, authWrapper) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new location_Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\nfunction fromResource(authWrapper, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\nfunction fromResourceString(authWrapper, resourceString, mappings) {\n var obj = jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n var resource = obj;\n return fromResource(authWrapper, resource, mappings);\n}\nfunction toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\nfunction metadataValidator(p) {\n var validType = p && isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (var key in p) {\n var val = p[key];\n if (key === 'customMetadata') {\n if (!isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n } else {\n if (isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/args.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n/**\r\n * @param name Name of the function.\r\n * @param specs Argument specs.\r\n * @param passed The actual arguments passed to the function.\r\n * @throws {fbs.Error} If the arguments are invalid.\r\n */\nfunction validate(name, specs, passed) {\n var minArgs = specs.length;\n var maxArgs = specs.length;\n for (var i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n var validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw invalidArgumentCount(minArgs, maxArgs, name, passed.length);\n }\n for (var i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n } catch (e) {\n if (e instanceof Error) {\n throw invalidArgument(i, name, e.message);\n } else {\n throw invalidArgument(i, name, e);\n }\n }\n }\n}\n/**\r\n * @struct\r\n */\nvar args_ArgSpec = function () {\n function ArgSpec(validator, opt_optional) {\n var self = this;\n this.validator = function (p) {\n if (self.optional && !isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n return ArgSpec;\n}();\n\nfunction and_(v1, v2) {\n return function (p) {\n v1(p);\n v2(p);\n };\n}\nfunction stringSpec(opt_validator, opt_optional) {\n function stringValidator(p) {\n if (!isString(p)) {\n throw 'Expected string.';\n }\n }\n var validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n } else {\n validator = stringValidator;\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction uploadDataSpec() {\n function validator(p) {\n var valid = p instanceof Uint8Array || p instanceof ArrayBuffer || isNativeBlobDefined() && p instanceof Blob;\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction metadataSpec(opt_optional) {\n return new args_ArgSpec(metadataValidator, opt_optional);\n}\nfunction nonNegativeNumberSpec() {\n function validator(p) {\n var valid = isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction looseObjectSpec(opt_validator, opt_optional) {\n function validator(p) {\n var isLooseObject = p === null || isDef(p) && p instanceof Object;\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction nullFunctionSpec(opt_optional) {\n function validator(p) {\n var valid = p === null || isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/fs.ts\n\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n } else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n } else {\n return undefined;\n }\n}\n/**\r\n * Concatenates one or more values together and converts them to a Blob.\r\n *\r\n * @param var_args The values that will make up the resulting blob.\r\n * @return The blob.\r\n */\nfunction getBlob() {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n for (var i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n } else {\n if (isNativeBlobDefined()) {\n return new Blob(var_args);\n } else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\r\n * Slices the blob. The returned blob contains data from the start byte\r\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\r\n *\r\n * @param blob The blob to be sliced.\r\n * @param start Index of the starting byte.\r\n * @param end Index of the ending byte.\r\n * @return The blob slice or null if not supported.\r\n */\nfunction sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n } else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n } else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/blob.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @file Provides a Blob-like wrapper for various binary types (including the\r\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\r\n * making uploads possible in environments without the native Blob type.\r\n */\n\n\n\n\n/**\r\n * @param opt_elideCopy If true, doesn't copy mutable input data\r\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\r\n * modified after this blob's construction.\r\n */\nvar blob_FbsBlob = function () {\n function FbsBlob(data, opt_elideCopy) {\n var size = 0;\n var blobType = '';\n if (isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n } else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n } else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n } else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data;\n } else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n } else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n FbsBlob.getBlob = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (isNativeBlobDefined()) {\n var blobby = var_args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n } else {\n return val;\n }\n });\n return new FbsBlob(getBlob.apply(null, blobby));\n } else {\n var uint8Arrays = var_args.map(function (val) {\n if (isString(val)) {\n return dataFromString(StringFormat.RAW, val).data;\n } else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n return FbsBlob;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/array.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * Returns true if the object is contained in the array (compared with ===).\r\n * @template T\r\n */\nfunction array_contains(array, elem) {\n return array.indexOf(elem) !== -1;\n}\n/**\r\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\r\n * @template T\r\n */\nfunction array_clone(arraylike) {\n return Array.prototype.slice.call(arraylike);\n}\n/**\r\n * Removes the given element from the given array, if it is contained.\r\n * Directly modifies the passed-in array.\r\n * @template T\r\n */\nfunction remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n// CONCATENATED MODULE: ./src/storage/implementation/requestinfo.ts\nvar RequestInfo = function () {\n function RequestInfo(url, method,\n /**\r\n * Returns the value with which to resolve the request's promise. Only called\r\n * if the request is successful. Throw from this function to reject the\r\n * returned Request's promise with the thrown error.\r\n * Note: The XhrIo passed to this function may be reused after this callback\r\n * returns. Do not keep a reference to it in any way.\r\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\r\n * Called with the current number of bytes uploaded and total size (-1 if not\r\n * computable) of the request body (i.e. used to report upload progress).\r\n */\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n return RequestInfo;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/requests.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n\n/**\r\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\r\n */\nfunction handlerCheck(cndn) {\n if (!cndn) {\n throw unknown();\n }\n}\nfunction metadataHandler(authWrapper, mappings) {\n function handler(xhr, text) {\n var metadata = fromResourceString(authWrapper, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n return handler;\n}\nfunction sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n if (xhr.getStatus() === 401) {\n newErr = unauthenticated();\n } else {\n if (xhr.getStatus() === 402) {\n newErr = quotaExceeded(location.bucket);\n } else {\n if (xhr.getStatus() === 403) {\n newErr = unauthorized(location.path);\n } else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction getMetadata(authWrapper, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'GET';\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction updateMetadata(authWrapper, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'PATCH';\n var body = toResourceString(metadata, mappings);\n var headers = { 'Content-Type': 'application/json; charset=utf-8' };\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction deleteObject(authWrapper, location) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'DELETE';\n var timeout = authWrapper.maxOperationRetryTime();\n function handler(xhr, text) {}\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction determineContentType_(metadata, blob) {\n return metadata && metadata['contentType'] || blob && blob.type() || 'application/octet-stream';\n}\nfunction metadataForUpload_(location, blob, opt_metadata) {\n var metadata = clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\nfunction multipartUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n function genBoundary() {\n var str = '';\n for (var i = 0; i < 2; i++) {\n str = str + Math.random().toString().slice(2);\n }\n return str;\n }\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var metadataString = toResourceString(metadata, mappings);\n var preBlobPart = '--' + boundary + '\\r\\n' + 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' + metadataString + '\\r\\n--' + boundary + '\\r\\n' + 'Content-Type: ' + metadata['contentType'] + '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = blob_FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw cannotSliceBlob();\n }\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @param current The number of bytes that have been uploaded so far.\r\n * @param total The total number of bytes in the upload.\r\n * @param opt_finalized True if the server has finished the upload.\r\n * @param opt_metadata The upload metadata, should\r\n * only be passed if opt_finalized is true.\r\n * @struct\r\n */\nvar ResumableUploadStatus = function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n return ResumableUploadStatus;\n}();\n\nfunction checkResumeHeader_(xhr, opt_allowed) {\n var status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n } catch (e) {\n handlerCheck(false);\n }\n var allowed = opt_allowed || ['active'];\n handlerCheck(array_contains(allowed, status));\n return status;\n}\nfunction createResumableUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = toResourceString(metadata, mappings);\n var timeout = authWrapper.maxUploadRetryTime();\n function handler(xhr, text) {\n checkResumeHeader_(xhr);\n var url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n } catch (e) {\n handlerCheck(false);\n }\n handlerCheck(isString(url));\n return url;\n }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n */\nfunction getResumableUploadStatus(authWrapper, location, url, blob) {\n var headers = { 'X-Goog-Upload-Command': 'query' };\n function handler(xhr, text) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n } catch (e) {\n handlerCheck(false);\n }\n var size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * Any uploads via the resumable upload API must transfer a number of bytes\r\n * that is a multiple of this number.\r\n */\nvar resumableUploadChunkSize = 256 * 1024;\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n * @param chunkSize Number of bytes to upload.\r\n * @param opt_status The previous status.\r\n * If not passed or null, we start from the beginning.\r\n * @throws fbs.Error If the upload is already complete, the passed in status\r\n * has a final size inconsistent with the blob, or the blob cannot be sliced\r\n * for upload.\r\n */\nfunction continueResumableUpload(location, authWrapper, url, blob, chunkSize, mappings, opt_status, opt_progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n } else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw serverFileWrongSize();\n }\n var bytesLeft = status.total - status.current;\n var bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n var startByte = status.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n var body = blob.slice(startByte, endByte);\n if (body === null) {\n throw cannotSliceBlob();\n }\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n } else {\n metadata = null;\n }\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n// CONCATENATED MODULE: ./src/storage/implementation/observer.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n/**\r\n * @struct\r\n */\nvar observer_Observer = function () {\n function Observer(nextOrObserver, opt_error, opt_complete) {\n var asFunctions = isFunction(nextOrObserver) || isDef(opt_error) || isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n } else {\n var observer = nextOrObserver;\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n return Observer;\n}();\n\n// CONCATENATED MODULE: ./src/storage/tasksnapshot.ts\nvar UploadTaskSnapshot = function () {\n function UploadTaskSnapshot(bytesTransferred, totalBytes, state, metadata, task, ref) {\n this.bytesTransferred = bytesTransferred;\n this.totalBytes = totalBytes;\n this.state = state;\n this.metadata = metadata;\n this.task = task;\n this.ref = ref;\n }\n Object.defineProperty(UploadTaskSnapshot.prototype, \"downloadURL\", {\n get: function get() {\n if (this.metadata !== null) {\n var urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n return UploadTaskSnapshot;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/async.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Method for invoking a callback asynchronously.\r\n */\n\n/**\r\n * Returns a function that invokes f with its arguments asynchronously as a\r\n * microtask, i.e. as soon as possible after the current script returns back\r\n * into browser code.\r\n */\nfunction async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promise_external_resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}\n// CONCATENATED MODULE: ./src/storage/task.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Defines types for interacting with blob transfer tasks.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\r\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\r\n * upload and manage callbacks for various events.\r\n */\nvar task_UploadTask = function () {\n /**\r\n * @param ref The firebaseStorage.Reference object this task came\r\n * from, untyped to avoid cyclic dependencies.\r\n * @param blob The blob to upload.\r\n */\n function UploadTask(ref, authWrapper, location, mappings, blob, metadata) {\n if (metadata === void 0) {\n metadata = null;\n }\n var _this = this;\n this.transferred_ = 0;\n this.needToFetchStatus_ = false;\n this.needToFetchMetadata_ = false;\n this.observers_ = [];\n this.error_ = null;\n this.uploadUrl_ = null;\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n this.resolve_ = null;\n this.reject_ = null;\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = function (error) {\n _this.request_ = null;\n _this.chunkMultiplier_ = 1;\n if (error.codeEquals(Code.CANCELED)) {\n _this.needToFetchStatus_ = true;\n _this.completeTransitions_();\n } else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = function (error) {\n _this.request_ = null;\n if (error.codeEquals(Code.CANCELED)) {\n _this.completeTransitions_();\n } else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = make(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n _this.start_();\n });\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, function () {});\n }\n UploadTask.prototype.makeProgressCallback_ = function () {\n var _this = this;\n var sizeBefore = this.transferred_;\n return function (loaded, total) {\n _this.updateProgress_(sizeBefore + loaded);\n };\n };\n UploadTask.prototype.shouldDoResumable_ = function (blob) {\n return blob.size() > 256 * 1024;\n };\n UploadTask.prototype.start_ = function () {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n } else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n } else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n } else {\n this.continueUpload_();\n }\n }\n }\n } else {\n this.oneShotUpload_();\n }\n };\n UploadTask.prototype.resolveToken_ = function (callback) {\n var _this = this;\n this.authWrapper_.getAuthToken().then(function (authToken) {\n switch (_this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n _this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n _this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n };\n // TODO(andysoto): assert false\n UploadTask.prototype.createResumable_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = createResumableUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var createRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = createRequest;\n createRequest.getPromise().then(function (url) {\n _this.request_ = null;\n _this.uploadUrl_ = url;\n _this.needToFetchStatus_ = false;\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.fetchStatus_ = function () {\n var _this = this;\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo = getResumableUploadStatus(_this.authWrapper_, _this.location_, url, _this.blob_);\n var statusRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this.request_ = null;\n _this.updateProgress_(status.current);\n _this.needToFetchStatus_ = false;\n if (status.finalized) {\n _this.needToFetchMetadata_ = true;\n }\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.continueUpload_ = function () {\n var _this = this;\n var chunkSize = resumableUploadChunkSize * this.chunkMultiplier_;\n var status = new ResumableUploadStatus(this.transferred_, this.blob_.size());\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo;\n try {\n requestInfo = continueResumableUpload(_this.location_, _this.authWrapper_, url, _this.blob_, chunkSize, _this.mappings_, status, _this.makeProgressCallback_());\n } catch (e) {\n _this.error_ = e;\n _this.transition_(InternalTaskState.ERROR);\n return;\n }\n var uploadRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = uploadRequest;\n uploadRequest.getPromise().then(function (newStatus) {\n _this.increaseMultiplier_();\n _this.request_ = null;\n _this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n _this.metadata_ = newStatus.metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n } else {\n _this.completeTransitions_();\n }\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.increaseMultiplier_ = function () {\n var currentSize = resumableUploadChunkSize * this.chunkMultiplier_;\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n };\n UploadTask.prototype.fetchMetadata_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = getMetadata(_this.authWrapper_, _this.location_, _this.mappings_);\n var metadataRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.metadataErrorHandler_);\n });\n };\n UploadTask.prototype.oneShotUpload_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = multipartUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var multipartRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.updateProgress_(_this.blob_.size());\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.updateProgress_ = function (transferred) {\n var old = this.transferred_;\n this.transferred_ = transferred;\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n };\n UploadTask.prototype.transition_ = function (state) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = error_canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n };\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n };\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n get: function get() {\n var externalState = taskStateFromInternalTaskState(this.state_);\n return new UploadTaskSnapshot(this.transferred_, this.blob_.size(), externalState, this.metadata_, this, this.ref_);\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Adds a callback for an event.\r\n * @param type The type of event to listen for.\r\n */\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n if (nextOrObserver === void 0) {\n nextOrObserver = undefined;\n }\n if (error === void 0) {\n error = undefined;\n }\n if (completed === void 0) {\n completed = undefined;\n }\n function typeValidator(_p) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw \"Expected one of the event types: [\" + TaskEvent.STATE_CHANGED + \"].\";\n }\n }\n var nextOrObserverMessage = 'Expected a function or an Object with one of ' + '`next`, `error`, `complete` properties.';\n var nextValidator = nullFunctionSpec(true).validator;\n var observerValidator = looseObjectSpec(null, true).validator;\n function nextOrObserverValidator(p) {\n try {\n nextValidator(p);\n return;\n } catch (e) {}\n try {\n observerValidator(p);\n var anyDefined = isJustDef(p['next']) || isJustDef(p['error']) || isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n } catch (e) {\n throw nextOrObserverMessage;\n }\n }\n var specs = [stringSpec(typeValidator), looseObjectSpec(nextOrObserverValidator, true), nullFunctionSpec(true), nullFunctionSpec(true)];\n validate('on', specs, arguments);\n var self = this;\n function makeBinder(specs) {\n function binder(nextOrObserver, error, opt_complete) {\n if (specs !== null) {\n validate('on', specs, arguments);\n }\n var observer = new observer_Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return function () {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n function binderNextOrObserverValidator(p) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n var binderSpecs = [looseObjectSpec(binderNextOrObserverValidator), nullFunctionSpec(true), nullFunctionSpec(true)];\n var typeOnly = !(isJustDef(nextOrObserver) || isJustDef(error) || isJustDef(completed));\n if (typeOnly) {\n return makeBinder(binderSpecs);\n } else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n };\n /**\r\n * This object behaves like a Promise, and resolves with its snapshot data\r\n * when the upload completes.\r\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\r\n * @param onRejected The rejection callback.\r\n */\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(onFulfilled, onRejected);\n };\n /**\r\n * Equivalent to calling `then(null, onRejected)`.\r\n */\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\r\n * Adds the given observer.\r\n */\n UploadTask.prototype.addObserver_ = function (observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n };\n /**\r\n * Removes the given observer.\r\n */\n UploadTask.prototype.removeObserver_ = function (observer) {\n remove(this.observers_, observer);\n };\n UploadTask.prototype.notifyObservers_ = function () {\n var _this = this;\n this.finishPromise_();\n var observers = array_clone(this.observers_);\n observers.forEach(function (observer) {\n _this.notifyObserver_(observer);\n });\n };\n UploadTask.prototype.finishPromise_ = function () {\n if (this.resolve_ !== null) {\n var triggered = true;\n switch (taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n async(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this.reject_;\n async(toCall.bind(null, this.error_))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n };\n UploadTask.prototype.notifyObserver_ = function (observer) {\n var externalState = taskStateFromInternalTaskState(this.state_);\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n async(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n async(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n async(observer.error.bind(observer, this.error_))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n async(observer.error.bind(observer, this.error_))();\n }\n }\n };\n /**\r\n * Resumes a paused task. Has no effect on a currently running or failed task.\r\n * @return True if the operation took effect, false if ignored.\r\n */\n UploadTask.prototype.resume = function () {\n validate('resume', [], arguments);\n var valid = this.state_ === InternalTaskState.PAUSED || this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n };\n /**\r\n * Pauses a currently running task. Has no effect on a paused or failed task.\r\n * @return True if the operation took effect, false if ignored.\r\n */\n UploadTask.prototype.pause = function () {\n validate('pause', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n };\n /**\r\n * Cancels a currently running or paused task. Has no effect on a complete or\r\n * failed task.\r\n * @return True if the operation took effect, false if ignored.\r\n */\n UploadTask.prototype.cancel = function () {\n validate('cancel', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING || this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n };\n return UploadTask;\n}();\n\n// CONCATENATED MODULE: ./src/storage/reference.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Defines the Firebase Storage Reference class.\r\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\r\n * Provides methods to interact with a bucket in the Firebase Storage service.\r\n * @param location An fbs.location, or the URL at\r\n * which to base this object, in one of the following forms:\r\n * gs:///\r\n * http[s]://firebasestorage.googleapis.com/\r\n * /b//o/\r\n * Any query or fragment strings will be ignored in the http[s]\r\n * format. If no value is passed, the storage object will use a URL based on\r\n * the project ID of the base firebase.App instance.\r\n */\nvar reference_Reference = function () {\n function Reference(authWrapper, location) {\n this.authWrapper = authWrapper;\n if (location instanceof location_Location) {\n this.location = location;\n } else {\n this.location = location_Location.makeFromUrl(location);\n }\n }\n /**\r\n * @return The URL for the bucket and path this object references,\r\n * in the form gs:///\r\n * @override\r\n */\n Reference.prototype.toString = function () {\n validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n };\n Reference.prototype.newRef = function (authWrapper, location) {\n return new Reference(authWrapper, location);\n };\n Reference.prototype.mappings = function () {\n return getMappings();\n };\n /**\r\n * @return A reference to the object obtained by\r\n * appending childPath, removing any duplicate, beginning, or trailing\r\n * slashes.\r\n */\n Reference.prototype.child = function (childPath) {\n validate('child', [stringSpec()], arguments);\n var newPath = child(this.location.path, childPath);\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n };\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\r\n * @return A reference to the parent of the\r\n * current object, or null if the current object is the root.\r\n */\n get: function get() {\n var newPath = parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\r\n * @return An reference to the root of this\r\n * object's bucket.\r\n */\n get: function get() {\n var location = new location_Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n get: function get() {\n return this.location.bucket;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n get: function get() {\n return this.location.path;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n get: function get() {\n return lastComponent(this.location.path);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n get: function get() {\n return this.authWrapper.service();\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Uploads a blob to this object's location.\r\n * @param data The blob to upload.\r\n * @return An UploadTask that lets you control and\r\n * observe the upload.\r\n */\n Reference.prototype.put = function (data, metadata) {\n if (metadata === void 0) {\n metadata = null;\n }\n validate('put', [uploadDataSpec(), metadataSpec(true)], arguments);\n this.throwIfRoot_('put');\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data), metadata);\n };\n /**\r\n * Uploads a string to this object's location.\r\n * @param string The string to upload.\r\n * @param opt_format The format of the string to upload.\r\n * @return An UploadTask that lets you control and\r\n * observe the upload.\r\n */\n Reference.prototype.putString = function (string, format, opt_metadata) {\n if (format === void 0) {\n format = StringFormat.RAW;\n }\n validate('putString', [stringSpec(), stringSpec(formatValidator, true), metadataSpec(true)], arguments);\n this.throwIfRoot_('putString');\n var data = dataFromString(format, string);\n var metadata = clone(opt_metadata);\n if (!isDef(metadata['contentType']) && isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data.data, true), metadata);\n };\n /**\r\n * Deletes the object at this location.\r\n * @return A promise that resolves if the deletion succeeds.\r\n */\n Reference.prototype.delete = function () {\n validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\r\n * A promise that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n */\n Reference.prototype.getMetadata = function () {\n validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = getMetadata(self.authWrapper, self.location, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\r\n * Updates the metadata for this object.\r\n * @param metadata The new metadata for the object.\r\n * Only values that have been explicitly set will be changed. Explicitly\r\n * setting a value to null will remove the metadata.\r\n * @return A promise that resolves\r\n * with the new metadata for this object.\r\n * @see firebaseStorage.Reference.prototype.getMetadata\r\n */\n Reference.prototype.updateMetadata = function (metadata) {\n validate('updateMetadata', [metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = updateMetadata(self.authWrapper, self.location, metadata, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\r\n * @return A promise that resolves with the download\r\n * URL for this object.\r\n */\n Reference.prototype.getDownloadURL = function () {\n validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function (metadata) {\n var url = metadata['downloadURLs'][0];\n if (isDef(url)) {\n return url;\n } else {\n throw noDownloadURL();\n }\n });\n };\n Reference.prototype.throwIfRoot_ = function (name) {\n if (this.location.path === '') {\n throw invalidRootOperation(name);\n }\n };\n return Reference;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/failrequest.ts\n\n/**\r\n * A request whose promise always fails.\r\n * @struct\r\n * @template T\r\n */\nvar failrequest_FailRequest = function () {\n function FailRequest(error) {\n this.promise_ = promise_external_reject(error);\n }\n /** @inheritDoc */\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n FailRequest.prototype.cancel = function (appDelete) {\n if (appDelete === void 0) {\n appDelete = false;\n }\n };\n return FailRequest;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/requestmap.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n/**\r\n * @struct\r\n */\nvar requestmap_RequestMap = function () {\n function RequestMap() {\n this.map_ = {};\n this.id_ = minSafeInteger;\n }\n /**\r\n * Registers the given request with this map.\r\n * The request is unregistered when it completes.\r\n * @param r The request to register.\r\n */\n RequestMap.prototype.addRequest = function (r) {\n var id = this.id_;\n this.id_++;\n this.map_[id] = r;\n var self = this;\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n };\n /**\r\n * Cancels all registered requests.\r\n */\n RequestMap.prototype.clear = function () {\n forEach(this.map_, function (key, val) {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n };\n return RequestMap;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/authwrapper.ts\n\n\n\n\n\n\n\n/**\r\n * @param app If null, getAuthToken always resolves with null.\r\n * @param service The storage service associated with this auth wrapper.\r\n * Untyped to avoid circular type dependencies.\r\n * @struct\r\n */\nvar authwrapper_AuthWrapper = function () {\n function AuthWrapper(app, maker, requestMaker, service, pool) {\n this.bucket_ = null;\n this.deleted_ = false;\n this.app_ = app;\n if (this.app_ !== null) {\n var options = this.app_.options;\n if (isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = defaultMaxUploadRetryTime;\n this.requestMap_ = new requestmap_RequestMap();\n }\n AuthWrapper.extractBucket_ = function (config) {\n var bucketString = config[configOption] || null;\n if (bucketString == null) {\n return null;\n }\n var loc = location_Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n };\n AuthWrapper.prototype.getAuthToken = function () {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (this.app_ !== null && isDef(this.app_.INTERNAL) && isDef(this.app_.INTERNAL.getToken)) {\n return this.app_.INTERNAL.getToken().then(function (response) {\n if (response !== null) {\n return response.accessToken;\n } else {\n return null;\n }\n }, function (_error) {\n return null;\n });\n } else {\n return promise_external_resolve(null);\n }\n };\n AuthWrapper.prototype.bucket = function () {\n if (this.deleted_) {\n throw appDeleted();\n } else {\n return this.bucket_;\n }\n };\n /**\r\n * The service associated with this auth wrapper. Untyped to avoid circular\r\n * type dependencies.\r\n */\n AuthWrapper.prototype.service = function () {\n return this.service_;\n };\n /**\r\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\r\n * at the given Location.\r\n * @param loc The Location.\r\n * @return Actually a firebaseStorage.Reference, typing not allowed\r\n * because of circular dependency problems.\r\n */\n AuthWrapper.prototype.makeStorageReference = function (loc) {\n return this.storageRefMaker_(this, loc);\n };\n AuthWrapper.prototype.makeRequest = function (requestInfo, authToken) {\n if (!this.deleted_) {\n var request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n } else {\n return new failrequest_FailRequest(appDeleted());\n }\n };\n /**\r\n * Stop running requests and prevent more from being created.\r\n */\n AuthWrapper.prototype.deleteApp = function () {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n };\n AuthWrapper.prototype.maxUploadRetryTime = function () {\n return this.maxUploadRetryTime_;\n };\n AuthWrapper.prototype.setMaxUploadRetryTime = function (time) {\n this.maxUploadRetryTime_ = time;\n };\n AuthWrapper.prototype.maxOperationRetryTime = function () {\n return this.maxOperationRetryTime_;\n };\n AuthWrapper.prototype.setMaxOperationRetryTime = function (time) {\n this.maxOperationRetryTime_ = time;\n };\n return AuthWrapper;\n}();\n\n// CONCATENATED MODULE: ./src/storage/implementation/backoff.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @param f May be invoked\r\n * before the function returns.\r\n * @param callback Get all the arguments passed to the function\r\n * passed to f, including the initial boolean.\r\n */\nfunction start(f, callback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n function canceled() {\n return cancelState === 2;\n }\n var triggeredCallback = false;\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n function handler(success) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n var mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n var waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n } else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n var stopped = false;\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n } else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\r\n * Stops the retry loop from repeating.\r\n * If the function is currently \"in between\" retries, it is invoked immediately\r\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\r\n * after the current invocation finishes iff the current invocation would have\r\n * triggered another retry.\r\n */\nfunction stop(id) {\n id(false);\n}\n// CONCATENATED MODULE: ./src/storage/implementation/request.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n/**\r\n * @fileoverview Defines methods used to actually send HTTP requests from\r\n * abstract representations.\r\n */\n\n\n\n\n\n\n\n\n/**\r\n * @struct\r\n * @template T\r\n */\nvar request_NetworkRequest = function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n this.pendingXhr_ = null;\n this.backoffId_ = null;\n this.resolve_ = null;\n this.reject_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n var self = this;\n this.promise_ = make(function (resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n /**\r\n * Actually starts the retry loop.\r\n */\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n var xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr.send(self.url_, self.method_, self.body_, self.headers_).then(function (xhr) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr;\n var hitServer = xhr.getErrorCode() === ErrorCode.NO_ERROR;\n var status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = xhr.getErrorCode() === ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n var successCode = array_contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n /**\r\n * @param requestWentThrough True if the request eventually went\r\n * through, false if it hit the retry limit or was canceled.\r\n */\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var xhr = status.xhr;\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(xhr, xhr.getResponseText());\n if (isJustDef(result)) {\n resolve(result);\n } else {\n resolve();\n }\n } catch (e) {\n reject(e);\n }\n } else {\n if (xhr !== null) {\n var err = unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n } else {\n reject(err);\n }\n } else {\n if (status.canceled) {\n var err = self.appDelete_ ? appDeleted() : error_canceled();\n reject(err);\n } else {\n var err = retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n } else {\n this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n };\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429];\n var isExtraRetryCode = array_contains(extraRetryCodes, status);\n var isRequestSpecificRetryCode = array_contains(this.additionalRetryCodes_, status);\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n return NetworkRequest;\n}();\n/**\r\n * A collection of information about the result of a network request.\r\n * @param opt_canceled Defaults to false.\r\n * @struct\r\n */\nvar RequestEndStatus = function () {\n function RequestEndStatus(wasSuccessCode, xhr, opt_canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.xhr = xhr;\n this.canceled = !!opt_canceled;\n }\n return RequestEndStatus;\n}();\n\nfunction addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\nfunction addVersionHeader_(headers) {\n var number = typeof firebase !== 'undefined' ? firebase.SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n/**\r\n * @template T\r\n */\nfunction makeRequest(requestInfo, authToken, pool) {\n var queryPart = makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new request_NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n// CONCATENATED MODULE: ./src/storage/service.ts\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n/**\r\n * A service that provides firebaseStorage.Reference instances.\r\n * @param opt_url gs:// url to a custom Storage Bucket\r\n *\r\n * @struct\r\n */\nvar service_Service = function () {\n function Service(app, pool, url) {\n this.bucket_ = null;\n function maker(authWrapper, loc) {\n return new reference_Reference(authWrapper, loc);\n }\n this.authWrapper_ = new authwrapper_AuthWrapper(app, maker, makeRequest, this, pool);\n this.app_ = app;\n if (url != null) {\n this.bucket_ = location_Location.makeFromBucketSpec(url);\n } else {\n var authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new location_Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new service_ServiceInternals(this);\n }\n /**\r\n * Returns a firebaseStorage.Reference for the given path in the default\r\n * bucket.\r\n */\n Service.prototype.ref = function (path) {\n function validator(path) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n validate('ref', [stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n var ref = new reference_Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n } else {\n return ref;\n }\n };\n /**\r\n * Returns a firebaseStorage.Reference object for the given absolute URL,\r\n * which must be a gs:// or http[s]:// URL.\r\n */\n Service.prototype.refFromURL = function (url) {\n function validator(p) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n location_Location.makeFromUrl(p);\n } catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n validate('refFromURL', [stringSpec(validator, false)], arguments);\n return new reference_Reference(this.authWrapper_, url);\n };\n Object.defineProperty(Service.prototype, \"maxUploadRetryTime\", {\n get: function get() {\n return this.authWrapper_.maxUploadRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxUploadRetryTime = function (time) {\n validate('setMaxUploadRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxUploadRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"maxOperationRetryTime\", {\n get: function get() {\n return this.authWrapper_.maxOperationRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxOperationRetryTime = function (time) {\n validate('setMaxOperationRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxOperationRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"app\", {\n get: function get() {\n return this.app_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Service.prototype, \"INTERNAL\", {\n get: function get() {\n return this.internals_;\n },\n enumerable: true,\n configurable: true\n });\n return Service;\n}();\n\n/**\r\n * @struct\r\n */\nvar service_ServiceInternals = function () {\n function ServiceInternals(service) {\n this.service_ = service;\n }\n /**\r\n * Called when the associated app is deleted.\r\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\r\n */\n ServiceInternals.prototype.delete = function () {\n this.service_.authWrapper_.deleteApp();\n return promise_external_resolve(undefined);\n };\n return ServiceInternals;\n}();\n\n// CONCATENATED MODULE: ./src/storage.ts\n/* harmony export (immutable) */ __webpack_exports__[\"registerStorage\"] = registerStorage;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app__ = __webpack_require__(5);\n/**\r\n* Copyright 2017 Google Inc.\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not use this file except in compliance with the License.\r\n* You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing, software\r\n* distributed under the License is distributed on an \"AS IS\" BASIS,\r\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n* See the License for the specific language governing permissions and\r\n* limitations under the License.\r\n*/\n\n\n\n\n\n\n\n/**\r\n * Type constant for Firebase Storage.\r\n */\nvar STORAGE_TYPE = 'storage';\nfunction factory(app, unused, opt_url) {\n return new service_Service(app, new xhriopool_XhrIoPool(), opt_url);\n}\nfunction registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: service_Service,\n Reference: reference_Reference\n };\n instance.INTERNAL.registerService(STORAGE_TYPE, factory, namespaceExports, undefined,\n // Allow multiple storage instances per app.\n true);\n}\nregisterStorage(__WEBPACK_IMPORTED_MODULE_5__app__[\"default\"]);\n\n/***/ })\n\n},[23]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-storage.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-storage.js","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { configOption } from './constants';\n\nexport class FirebaseStorageError implements Error {\n private code_: string;\n private message_: string;\n private serverResponse_: string | null;\n private name_: string;\n\n constructor(code: Code, message: string) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n\n codeProp(): string {\n return this.code;\n }\n\n codeEquals(code: Code): boolean {\n return prependCode(code) === this.codeProp();\n }\n\n serverResponseProp(): string | null {\n return this.serverResponse_;\n }\n\n setServerResponseProp(serverResponse: string | null) {\n this.serverResponse_ = serverResponse;\n }\n\n get name(): string {\n return this.name_;\n }\n\n get code(): string {\n return this.code_;\n }\n\n get message(): string {\n return this.message_;\n }\n\n get serverResponse(): null | string {\n return this.serverResponse_;\n }\n}\n\nexport const errors = {};\n\n/**\n * @enum {string}\n */\nexport type Code = string;\nexport const Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\n\nexport function prependCode(code: Code): string {\n return 'storage/' + code;\n}\n\nexport function unknown(): FirebaseStorageError {\n let message =\n 'An unknown error occurred, please check the error payload for ' +\n 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\n\nexport function objectNotFound(path: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.OBJECT_NOT_FOUND,\n \"Object '\" + path + \"' does not exist.\"\n );\n}\n\nexport function bucketNotFound(bucket: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.BUCKET_NOT_FOUND,\n \"Bucket '\" + bucket + \"' does not exist.\"\n );\n}\n\nexport function projectNotFound(project: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.PROJECT_NOT_FOUND,\n \"Project '\" + project + \"' does not exist.\"\n );\n}\n\nexport function quotaExceeded(bucket: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.QUOTA_EXCEEDED,\n \"Quota for bucket '\" +\n bucket +\n \"' exceeded, please view quota on \" +\n 'https://firebase.google.com/pricing/.'\n );\n}\n\nexport function unauthenticated(): FirebaseStorageError {\n let message =\n 'User is not authenticated, please authenticate using Firebase ' +\n 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\n\nexport function unauthorized(path: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.UNAUTHORIZED,\n \"User does not have permission to access '\" + path + \"'.\"\n );\n}\n\nexport function retryLimitExceeded(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.RETRY_LIMIT_EXCEEDED,\n 'Max retry time for operation exceeded, please try again.'\n );\n}\n\nexport function invalidChecksum(\n path: string,\n checksum: string,\n calculated: string\n): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_CHECKSUM,\n \"Uploaded/downloaded object '\" +\n path +\n \"' has checksum '\" +\n checksum +\n \"' which does not match '\" +\n calculated +\n \"'. Please retry the upload/download.\"\n );\n}\n\nexport function canceled(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.CANCELED,\n 'User canceled the upload/download.'\n );\n}\n\nexport function invalidEventName(name: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_EVENT_NAME,\n \"Invalid event name '\" + name + \"'.\"\n );\n}\n\nexport function invalidUrl(url: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_URL,\n \"Invalid URL '\" + url + \"'.\"\n );\n}\n\nexport function invalidDefaultBucket(bucket: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_DEFAULT_BUCKET,\n \"Invalid default bucket '\" + bucket + \"'.\"\n );\n}\n\nexport function noDefaultBucket(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.NO_DEFAULT_BUCKET,\n 'No default bucket ' +\n \"found. Did you set the '\" +\n configOption +\n \"' property when initializing the app?\"\n );\n}\n\nexport function cannotSliceBlob(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.CANNOT_SLICE_BLOB,\n 'Cannot slice blob for upload. Please retry the upload.'\n );\n}\n\nexport function serverFileWrongSize(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.SERVER_FILE_WRONG_SIZE,\n 'Server recorded incorrect upload file size, please retry the upload.'\n );\n}\n\nexport function noDownloadURL(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.NO_DOWNLOAD_URL,\n 'The given file does not have any download URLs.'\n );\n}\n\nexport function invalidArgument(\n index: number,\n fnName: string,\n message: string\n): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_ARGUMENT,\n 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message\n );\n}\n\nexport function invalidArgumentCount(\n argMin: number,\n argMax: number,\n fnName: string,\n real: number\n): FirebaseStorageError {\n let countPart;\n let plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n } else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(\n Code.INVALID_ARGUMENT_COUNT,\n 'Invalid argument count in `' +\n fnName +\n '`: Expected ' +\n countPart +\n ' ' +\n plural +\n ', received ' +\n real +\n '.'\n );\n}\n\nexport function appDeleted(): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.APP_DELETED,\n 'The Firebase app was deleted.'\n );\n}\n\n/**\n * @param name The name of the operation that was invalid.\n */\nexport function invalidRootOperation(name: string): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_ROOT_OPERATION,\n \"The operation '\" +\n name +\n \"' cannot be performed on a root reference, create a non-root \" +\n \"reference using child, such as .child('file.png').\"\n );\n}\n\n/**\n * @param format The format that was not valid.\n * @param message A message describing the format violation.\n */\nexport function invalidFormat(\n format: string,\n message: string\n): FirebaseStorageError {\n return new FirebaseStorageError(\n Code.INVALID_FORMAT,\n \"String does not match format '\" + format + \"': \" + message\n );\n}\n\n/**\n * @param message A message describing the internal error.\n */\nexport function internalError(message: string): FirebaseStorageError {\n throw new FirebaseStorageError(\n Code.INTERNAL_ERROR,\n 'Internal error: ' + message\n );\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/error.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as errorsExports from './error';\nimport { errors } from './error';\n\n/**\n * @enum {string}\n */\nexport type StringFormat = string;\nexport const StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\n\nexport function formatValidator(stringFormat: string) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' +\n StringFormat.RAW +\n ', ' +\n StringFormat.BASE64 +\n ', ' +\n StringFormat.BASE64URL +\n ', ' +\n StringFormat.DATA_URL +\n '].';\n }\n}\n\n/**\n * @struct\n */\nexport class StringData {\n contentType: string | null;\n\n constructor(public data: Uint8Array, opt_contentType?: string | null) {\n this.contentType = opt_contentType || null;\n }\n}\n\nexport function dataFromString(\n format: StringFormat,\n string: string\n): StringData {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n\n // assert(false);\n throw errorsExports.unknown();\n}\n\nexport function utf8Bytes_(string: string): Uint8Array {\n let b = [];\n for (let i = 0; i < string.length; i++) {\n let c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n } else {\n if (c <= 2047) {\n b.push(192 | (c >> 6), 128 | (c & 63));\n } else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n let valid =\n i < string.length - 1 &&\n (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n } else {\n let hi = c;\n let lo = string.charCodeAt(++i);\n c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\n b.push(\n 240 | (c >> 18),\n 128 | ((c >> 12) & 63),\n 128 | ((c >> 6) & 63),\n 128 | (c & 63)\n );\n }\n } else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n } else {\n b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\n\nexport function percentEncodedBytes_(string: string): Uint8Array {\n let decoded;\n try {\n decoded = decodeURIComponent(string);\n } catch (e) {\n throw errorsExports.invalidFormat(\n StringFormat.DATA_URL,\n 'Malformed data URL.'\n );\n }\n return utf8Bytes_(decoded);\n}\n\nexport function base64Bytes_(format: StringFormat, string: string): Uint8Array {\n switch (format) {\n case StringFormat.BASE64: {\n let hasMinus = string.indexOf('-') !== -1;\n let hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n let invalidChar = hasMinus ? '-' : '_';\n throw errorsExports.invalidFormat(\n format,\n \"Invalid character '\" +\n invalidChar +\n \"' found: is it base64url encoded?\"\n );\n }\n break;\n }\n case StringFormat.BASE64URL: {\n let hasPlus = string.indexOf('+') !== -1;\n let hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n let invalidChar = hasPlus ? '+' : '/';\n throw errorsExports.invalidFormat(\n format,\n \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\"\n );\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n let bytes;\n try {\n bytes = atob(string);\n } catch (e) {\n throw errorsExports.invalidFormat(format, 'Invalid character found');\n }\n let array = new Uint8Array(bytes.length);\n for (let i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n\n/**\n * @struct\n */\nclass DataURLParts {\n base64: boolean = false;\n contentType: string | null = null;\n rest: string;\n\n constructor(dataURL: string) {\n let matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw errorsExports.invalidFormat(\n StringFormat.DATA_URL,\n \"Must be formatted 'data:[][;base64],\"\n );\n }\n let middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64\n ? middle.substring(0, middle.length - ';base64'.length)\n : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n}\n\nexport function dataURLBytes_(string: string): Uint8Array {\n let parts = new DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n } else {\n return percentEncodedBytes_(parts.rest);\n }\n}\n\nexport function dataURLContentType_(string: string): string | null {\n let parts = new DataURLParts(string);\n return parts.contentType;\n}\n\nfunction endsWith(s: string, end: string): boolean {\n const longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n\n return s.substring(s.length - end.length) === end;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/string.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Enumerations used for upload tasks.\n */\n\n/**\n * Enum for task events.\n * @enum {string}\n */\nexport type TaskEvent = string;\nexport const TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\n\n/**\n * Internal enum for task state.\n * @enum {string}\n */\nexport type InternalTaskState = string;\nexport const InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\n\n/**\n * External (API-surfaced) enum for task state.\n * @enum {string}\n */\nexport type TaskState = string;\nexport const TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\n\nexport function taskStateFromInternalTaskState(\n state: InternalTaskState\n): TaskState {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/taskenums.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Contains methods for working with objects.\n */\nexport function contains(obj: Object, prop: string): boolean {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function forEach(\n obj: { [key: string]: T },\n f: (p1: string, p2: T) => void\n) {\n for (let key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\n\nexport function clone(obj?: { [key: string]: any } | null): T {\n if (obj == null) {\n return {} as T;\n }\n\n let c: { [name: string]: any } = {};\n forEach(obj, function(key, val) {\n c[key] = val;\n });\n return c as T;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/object.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Implements the promise abstraction interface for external\n * (public SDK) packaging, which just passes through to the firebase-app impl.\n */\n\n/**\n * @template T\n * @param {function((function(T): void),\n * (function(!Error): void))} resolver\n */\n\nimport { PromiseImpl } from '../../utils/promise';\n\nexport function make(\n resolver: (p1: (p1: T) => void, p2: (p1: Error) => void) => void\n): Promise {\n return new PromiseImpl(resolver);\n}\n\n/**\n * @template T\n */\nexport function resolve(value: T): Promise {\n return PromiseImpl.resolve(value) as Promise;\n}\n\nexport function reject(error: Error): Promise {\n return PromiseImpl.reject(error) as Promise;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/promise_external.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @return False if the object is undefined or null, true otherwise.\n */\nexport function isDef(p: any): boolean {\n return p != null;\n}\n\nexport function isJustDef(p: any): boolean {\n return p !== void 0;\n}\n\nexport function isFunction(p: any): boolean {\n return typeof p === 'function';\n}\n\nexport function isObject(p: any): boolean {\n return typeof p === 'object';\n}\n\nexport function isNonNullObject(p: any): boolean {\n return isObject(p) && p !== null;\n}\n\nexport function isNonArrayObject(p: any): boolean {\n return isObject(p) && !Array.isArray(p);\n}\n\nexport function isString(p: any): boolean {\n return typeof p === 'string' || p instanceof String;\n}\n\nexport function isNumber(p: any): boolean {\n return typeof p === 'number' || p instanceof Number;\n}\n\nexport function isNativeBlob(p: any): boolean {\n return isNativeBlobDefined() && p instanceof Blob;\n}\n\nexport function isNativeBlobDefined(): boolean {\n return typeof Blob !== 'undefined';\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/type.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as type from './type';\n\n/**\n * Returns the Object resulting from parsing the given JSON, or null if the\n * given string does not represent a JSON object.\n */\nexport function jsonObjectOrNull(s: string): { [name: string]: any } | null {\n let obj;\n try {\n obj = JSON.parse(s);\n } catch (e) {\n return null;\n }\n if (type.isNonArrayObject(obj)) {\n return obj;\n } else {\n return null;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/json.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Contains helper methods for manipulating paths.\n */\n\n/**\n * @return Null if the path is already at the root.\n */\nexport function parent(path: string): string | null {\n if (path.length == 0) {\n return null;\n }\n let index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n let newPath = path.slice(0, index);\n return newPath;\n}\n\nexport function child(path: string, childPath: string): string {\n let canonicalChildPath = childPath\n .split('/')\n .filter(function(component) {\n return component.length > 0;\n })\n .join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n } else {\n return path + '/' + canonicalChildPath;\n }\n}\n\n/**\n * Returns the last component of a path.\n * '/foo/bar' -> 'bar'\n * '/foo/bar/baz/' -> 'baz/'\n * '/a' -> 'a'\n */\nexport function lastComponent(path: string): string {\n let index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n } else {\n return path.slice(index + 1);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/path.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Functions to create and manipulate URLs for the server API.\n */\nimport * as constants from './constants';\nimport * as object from './object';\n\nexport function makeNormalUrl(urlPart: string): string {\n return constants.domainBase + constants.apiBaseUrl + urlPart;\n}\n\nexport function makeDownloadUrl(urlPart: string): string {\n return constants.downloadBase + constants.apiBaseUrl + urlPart;\n}\n\nexport function makeUploadUrl(urlPart: string): string {\n return constants.domainBase + constants.apiUploadBaseUrl + urlPart;\n}\n\nexport function makeQueryString(params: { [key: string]: string }): string {\n let encode = encodeURIComponent;\n let queryPart = '?';\n object.forEach(params, function(key, val) {\n let nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/url.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Documentation for the metadata format\n */\nimport { Metadata } from '../metadata';\n\nimport { AuthWrapper } from './authwrapper';\nimport * as json from './json';\nimport { Location } from './location';\nimport * as path from './path';\nimport * as type from './type';\nimport * as UrlUtils from './url';\n\nexport function noXform_(metadata: Metadata, value: any): any {\n return value;\n}\n\n/**\n * @struct\n */\nexport class Mapping {\n local: string;\n writable: boolean;\n xform: (p1: Metadata, p2: any) => any;\n\n constructor(\n public server: string,\n opt_local?: string | null,\n opt_writable?: boolean,\n opt_xform?: (p1: Metadata, p2: any) => any | null\n ) {\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n}\ntype Mappings = Mapping[];\n\nexport { Mappings };\n\nlet mappings_: Mappings | null = null;\n\nexport function xformPath(fullPath: any): string {\n let valid = type.isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n } else {\n fullPath = fullPath as string;\n return path.lastComponent(fullPath);\n }\n}\n\nexport function getMappings(): Mappings {\n if (mappings_) {\n return mappings_;\n }\n let mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n\n function mappingsXformPath(metadata: Metadata, fullPath: any): string {\n return xformPath(fullPath);\n }\n let nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n\n /**\n * Coerces the second param to a number, if it is defined.\n */\n function xformSize(metadata: Metadata, size: any): number | null | undefined {\n if (type.isDef(size)) {\n return +(size as number);\n } else {\n return size;\n }\n }\n let sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n\n /**\n * Transforms a comma-separated string of tokens into a list of download\n * URLs.\n */\n function xformTokens(metadata: Metadata, tokens: any): string[] {\n let valid = type.isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n let encode = encodeURIComponent;\n let tokensList = tokens.split(',');\n let urls = tokensList.map(function(token: string) {\n let bucket: string = metadata['bucket'] as string;\n let path: string = metadata['fullPath'] as string;\n let urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n let base = UrlUtils.makeDownloadUrl(urlPart);\n let queryString = UrlUtils.makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(\n new Mapping('downloadTokens', 'downloadURLs', false, xformTokens)\n );\n mappings_ = mappings;\n return mappings_;\n}\n\nexport function addRef(metadata: Metadata, authWrapper: AuthWrapper) {\n function generateRef() {\n let bucket: string = metadata['bucket'] as string;\n let path: string = metadata['fullPath'] as string;\n let loc = new Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\n\nexport function fromResource(\n authWrapper: AuthWrapper,\n resource: { [name: string]: any },\n mappings: Mappings\n): Metadata {\n let metadata: Metadata = {} as Metadata;\n metadata['type'] = 'file';\n let len = mappings.length;\n for (let i = 0; i < len; i++) {\n let mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\n\nexport function fromResourceString(\n authWrapper: AuthWrapper,\n resourceString: string,\n mappings: Mappings\n): Metadata | null {\n let obj = json.jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n let resource = obj as Metadata;\n return fromResource(authWrapper, resource, mappings);\n}\n\nexport function toResourceString(\n metadata: Metadata,\n mappings: Mappings\n): string {\n let resource: {\n [prop: string]: any;\n } = {};\n let len = mappings.length;\n for (let i = 0; i < len; i++) {\n let mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\n\nexport function metadataValidator(p: any) {\n let validType = p && type.isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (let key in p) {\n let val = p[key];\n if (key === 'customMetadata') {\n if (!type.isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n } else {\n if (type.isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/metadata.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as errorsExports from './error';\nimport { errors } from './error';\nimport * as MetadataUtils from './metadata';\nimport * as type from './type';\n\n/**\n * @param name Name of the function.\n * @param specs Argument specs.\n * @param passed The actual arguments passed to the function.\n * @throws {fbs.Error} If the arguments are invalid.\n */\nexport function validate(name: string, specs: ArgSpec[], passed: IArguments) {\n let minArgs = specs.length;\n let maxArgs = specs.length;\n for (let i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n let validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw errorsExports.invalidArgumentCount(\n minArgs,\n maxArgs,\n name,\n passed.length\n );\n }\n for (let i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n } catch (e) {\n if (e instanceof Error) {\n throw errorsExports.invalidArgument(i, name, e.message);\n } else {\n throw errorsExports.invalidArgument(i, name, e);\n }\n }\n }\n}\n\n/**\n * @struct\n */\nexport class ArgSpec {\n validator: (p1: any) => void;\n optional: boolean;\n\n constructor(validator: (p1: any) => void, opt_optional?: boolean) {\n let self = this;\n this.validator = function(p: any) {\n if (self.optional && !type.isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n}\n\nexport function and_(v1: (p1: any) => void, v2: Function): (p1: any) => void {\n return function(p) {\n v1(p);\n v2(p);\n };\n}\n\nexport function stringSpec(\n opt_validator?: (p1: any) => void | null,\n opt_optional?: boolean\n): ArgSpec {\n function stringValidator(p: any) {\n if (!type.isString(p)) {\n throw 'Expected string.';\n }\n }\n let validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n } else {\n validator = stringValidator;\n }\n return new ArgSpec(validator, opt_optional);\n}\n\nexport function uploadDataSpec(): ArgSpec {\n function validator(p: any) {\n let valid =\n p instanceof Uint8Array ||\n p instanceof ArrayBuffer ||\n (type.isNativeBlobDefined() && p instanceof Blob);\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new ArgSpec(validator);\n}\n\nexport function metadataSpec(opt_optional?: boolean): ArgSpec {\n return new ArgSpec(MetadataUtils.metadataValidator, opt_optional);\n}\n\nexport function nonNegativeNumberSpec(): ArgSpec {\n function validator(p: any) {\n let valid = type.isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new ArgSpec(validator);\n}\n\nexport function looseObjectSpec(\n opt_validator?: ((p1: any) => void) | null,\n opt_optional?: boolean\n): ArgSpec {\n function validator(p: any) {\n let isLooseObject = p === null || (type.isDef(p) && p instanceof Object);\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\n\nexport function nullFunctionSpec(opt_optional?: boolean): ArgSpec {\n function validator(p: any) {\n let valid = p === null || type.isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/args.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @fileoverview Some methods copied from goog.fs.\n * We don't include goog.fs because it pulls in a bunch of Deferred code that\n * bloats the size of the released binary.\n */\nimport * as array from './array';\nimport * as type from './type';\n\ndeclare var IBlobBuilder;\ndeclare var BlobBuilder;\ndeclare var WebKitBlobBuilder;\n\nfunction getBlobBuilder(): (typeof IBlobBuilder) | undefined {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n } else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n } else {\n return undefined;\n }\n}\n\n/**\n * Concatenates one or more values together and converts them to a Blob.\n *\n * @param var_args The values that will make up the resulting blob.\n * @return The blob.\n */\nexport function getBlob(...var_args: (string | Blob | ArrayBuffer)[]): Blob {\n let BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n let bb = new BlobBuilder();\n for (let i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n } else {\n if (type.isNativeBlobDefined()) {\n return new Blob(var_args);\n } else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n\n/**\n * Slices the blob. The returned blob contains data from the start byte\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\n *\n * @param blob The blob to be sliced.\n * @param start Index of the starting byte.\n * @param end Index of the ending byte.\n * @return The blob slice or null if not supported.\n */\nexport function sliceBlob(blob: Blob, start: number, end: number): Blob | null {\n if ((blob as any).webkitSlice) {\n return (blob as any).webkitSlice(start, end);\n } else if ((blob as any).mozSlice) {\n return (blob as any).mozSlice(start, end);\n } else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/fs.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * Returns true if the object is contained in the array (compared with ===).\n * @template T\n */\nexport function contains(array: T[], elem: T): boolean {\n return array.indexOf(elem) !== -1;\n}\n\n/**\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\n * @template T\n */\nexport function clone(arraylike: T[]): T[] {\n return Array.prototype.slice.call(arraylike);\n}\n\n/**\n * Removes the given element from the given array, if it is contained.\n * Directly modifies the passed-in array.\n * @template T\n */\nexport function remove(array: T[], elem: T) {\n const i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/array.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Defines methods for interacting with the network.\n */\n\nimport { Metadata } from '../metadata';\n\nimport * as array from './array';\nimport { AuthWrapper } from './authwrapper';\nimport { FbsBlob } from './blob';\nimport * as errorsExports from './error';\nimport { FirebaseStorageError } from './error';\nimport { errors } from './error';\nimport { Location } from './location';\nimport * as MetadataUtils from './metadata';\nimport * as object from './object';\nimport { RequestInfo } from './requestinfo';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nimport { XhrIo } from './xhrio';\n\n/**\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\n */\nexport function handlerCheck(cndn: boolean) {\n if (!cndn) {\n throw errorsExports.unknown();\n }\n}\n\nexport function metadataHandler(\n authWrapper: AuthWrapper,\n mappings: MetadataUtils.Mappings\n): (p1: XhrIo, p2: string) => Metadata {\n function handler(xhr: XhrIo, text: string): Metadata {\n let metadata = MetadataUtils.fromResourceString(\n authWrapper,\n text,\n mappings\n );\n handlerCheck(metadata !== null);\n return metadata as Metadata;\n }\n return handler;\n}\n\nexport function sharedErrorHandler(\n location: Location\n): (p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError {\n function errorHandler(\n xhr: XhrIo,\n err: FirebaseStorageError\n ): FirebaseStorageError {\n let newErr;\n if (xhr.getStatus() === 401) {\n newErr = errorsExports.unauthenticated();\n } else {\n if (xhr.getStatus() === 402) {\n newErr = errorsExports.quotaExceeded(location.bucket);\n } else {\n if (xhr.getStatus() === 403) {\n newErr = errorsExports.unauthorized(location.path);\n } else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\n\nexport function objectErrorHandler(\n location: Location\n): (p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError {\n let shared = sharedErrorHandler(location);\n\n function errorHandler(\n xhr: XhrIo,\n err: FirebaseStorageError\n ): FirebaseStorageError {\n let newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = errorsExports.objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\n\nexport function getMetadata(\n authWrapper: AuthWrapper,\n location: Location,\n mappings: MetadataUtils.Mappings\n): RequestInfo {\n let urlPart = location.fullServerUrl();\n let url = UrlUtils.makeNormalUrl(urlPart);\n let method = 'GET';\n let timeout = authWrapper.maxOperationRetryTime();\n let requestInfo = new RequestInfo(\n url,\n method,\n metadataHandler(authWrapper, mappings),\n timeout\n );\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nexport function updateMetadata(\n authWrapper: AuthWrapper,\n location: Location,\n metadata: Metadata,\n mappings: MetadataUtils.Mappings\n): RequestInfo {\n let urlPart = location.fullServerUrl();\n let url = UrlUtils.makeNormalUrl(urlPart);\n let method = 'PATCH';\n let body = MetadataUtils.toResourceString(metadata, mappings);\n let headers = { 'Content-Type': 'application/json; charset=utf-8' };\n let timeout = authWrapper.maxOperationRetryTime();\n let requestInfo = new RequestInfo(\n url,\n method,\n metadataHandler(authWrapper, mappings),\n timeout\n );\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nexport function deleteObject(\n authWrapper: AuthWrapper,\n location: Location\n): RequestInfo {\n let urlPart = location.fullServerUrl();\n let url = UrlUtils.makeNormalUrl(urlPart);\n let method = 'DELETE';\n let timeout = authWrapper.maxOperationRetryTime();\n\n function handler(xhr: XhrIo, text: string) {}\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nexport function determineContentType_(\n metadata: Metadata | null,\n blob: FbsBlob | null\n): string {\n return (\n (metadata && metadata['contentType']) ||\n (blob && blob.type()) ||\n 'application/octet-stream'\n );\n}\n\nexport function metadataForUpload_(\n location: Location,\n blob: FbsBlob,\n opt_metadata?: Metadata | null\n): Metadata {\n let metadata = object.clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\n\nexport function multipartUpload(\n authWrapper: AuthWrapper,\n location: Location,\n mappings: MetadataUtils.Mappings,\n blob: FbsBlob,\n opt_metadata?: Metadata | null\n): RequestInfo {\n let urlPart = location.bucketOnlyServerUrl();\n let headers: { [prop: string]: string } = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n\n function genBoundary() {\n let str = '';\n for (let i = 0; i < 2; i++) {\n str = str + Math.random().toString().slice(2);\n }\n return str;\n }\n let boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n let metadata = metadataForUpload_(location, blob, opt_metadata);\n let metadataString = MetadataUtils.toResourceString(metadata, mappings);\n let preBlobPart =\n '--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\n metadataString +\n '\\r\\n--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: ' +\n metadata['contentType'] +\n '\\r\\n\\r\\n';\n let postBlobPart = '\\r\\n--' + boundary + '--';\n let body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n let urlParams = { name: metadata['fullPath'] };\n let url = UrlUtils.makeUploadUrl(urlPart);\n let method = 'POST';\n let timeout = authWrapper.maxUploadRetryTime();\n let requestInfo = new RequestInfo(\n url,\n method,\n metadataHandler(authWrapper, mappings),\n timeout\n );\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n/**\n * @param current The number of bytes that have been uploaded so far.\n * @param total The total number of bytes in the upload.\n * @param opt_finalized True if the server has finished the upload.\n * @param opt_metadata The upload metadata, should\n * only be passed if opt_finalized is true.\n * @struct\n */\nexport class ResumableUploadStatus {\n finalized: boolean;\n metadata: Metadata | null;\n\n constructor(\n public current: number,\n public total: number,\n finalized?: boolean,\n metadata?: Metadata | null\n ) {\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n}\n\nexport function checkResumeHeader_(xhr: XhrIo, opt_allowed?: string[]): string {\n let status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n } catch (e) {\n handlerCheck(false);\n }\n let allowed = opt_allowed || ['active'];\n handlerCheck(array.contains(allowed, status));\n return status as string;\n}\n\nexport function createResumableUpload(\n authWrapper: AuthWrapper,\n location: Location,\n mappings: MetadataUtils.Mappings,\n blob: FbsBlob,\n opt_metadata?: Metadata | null\n): RequestInfo {\n let urlPart = location.bucketOnlyServerUrl();\n let metadata = metadataForUpload_(location, blob, opt_metadata);\n let urlParams = { name: metadata['fullPath'] };\n let url = UrlUtils.makeUploadUrl(urlPart);\n let method = 'POST';\n let headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n let body = MetadataUtils.toResourceString(metadata, mappings);\n let timeout = authWrapper.maxUploadRetryTime();\n\n function handler(xhr: XhrIo, text: string): string {\n checkResumeHeader_(xhr);\n let url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n } catch (e) {\n handlerCheck(false);\n }\n handlerCheck(type.isString(url));\n return url as string;\n }\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n */\nexport function getResumableUploadStatus(\n authWrapper: AuthWrapper,\n location: Location,\n url: string,\n blob: FbsBlob\n): RequestInfo {\n let headers = { 'X-Goog-Upload-Command': 'query' };\n\n function handler(xhr: XhrIo, text: string): ResumableUploadStatus {\n let status = checkResumeHeader_(xhr, ['active', 'final']);\n let sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n } catch (e) {\n handlerCheck(false);\n }\n let size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n let method = 'POST';\n let timeout = authWrapper.maxUploadRetryTime();\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n/**\n * Any uploads via the resumable upload API must transfer a number of bytes\n * that is a multiple of this number.\n */\nexport const resumableUploadChunkSize: number = 256 * 1024;\n\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n * @param chunkSize Number of bytes to upload.\n * @param opt_status The previous status.\n * If not passed or null, we start from the beginning.\n * @throws fbs.Error If the upload is already complete, the passed in status\n * has a final size inconsistent with the blob, or the blob cannot be sliced\n * for upload.\n */\nexport function continueResumableUpload(\n location: Location,\n authWrapper: AuthWrapper,\n url: string,\n blob: FbsBlob,\n chunkSize: number,\n mappings: MetadataUtils.Mappings,\n opt_status?: ResumableUploadStatus | null,\n opt_progressCallback?: ((p1: number, p2: number) => void) | null\n): RequestInfo {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n let status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n } else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw errorsExports.serverFileWrongSize();\n }\n let bytesLeft = status.total - status.current;\n let bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n let startByte = status.current;\n let endByte = startByte + bytesToUpload;\n let uploadCommand =\n bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n let headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n let body = blob.slice(startByte, endByte);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n\n function handler(xhr: XhrIo, text: string): ResumableUploadStatus {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n let uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n let newCurrent = status.current + bytesToUpload;\n let size = blob.size();\n let metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n } else {\n metadata = null;\n }\n return new ResumableUploadStatus(\n newCurrent,\n size,\n uploadStatus === 'final',\n metadata\n );\n }\n let method = 'POST';\n let timeout = authWrapper.maxUploadRetryTime();\n let requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/requests.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Method for invoking a callback asynchronously.\n */\nimport * as promiseimpl from './promise_external';\n\n/**\n * Returns a function that invokes f with its arguments asynchronously as a\n * microtask, i.e. as soon as possible after the current script returns back\n * into browser code.\n */\nexport function async(f: Function): Function {\n return function(...argsToForward: any[]) {\n promiseimpl.resolve(true).then(function() {\n f.apply(null, argsToForward);\n });\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/async.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Provides a method for running a function with exponential\n * backoff.\n */\ntype id = (p1: boolean) => void;\n\nexport { id };\n\n/**\n * @param f May be invoked\n * before the function returns.\n * @param callback Get all the arguments passed to the function\n * passed to f, including the initial boolean.\n */\nexport function start(\n f: (\n p1: (success: boolean, ...rest: any[]) => void,\n canceled: boolean\n ) => void,\n callback: Function,\n timeout: number\n): id {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n let waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n let timeoutId: any = null;\n let hitTimeout = false;\n let cancelState = 0;\n\n function canceled() {\n return cancelState === 2;\n }\n let triggeredCallback = false;\n\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n\n function callWithDelay(millis: number): void {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n\n function handler(success: boolean, ...var_args: any[]): void {\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n let mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n let waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n } else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n let stopped = false;\n\n function stop(wasTimeout: boolean): void {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n } else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function() {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n\n/**\n * Stops the retry loop from repeating.\n * If the function is currently \"in between\" retries, it is invoked immediately\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\n * after the current invocation finishes iff the current invocation would have\n * triggered another retry.\n */\nexport function stop(id: id) {\n id(false);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/backoff.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Defines methods used to actually send HTTP requests from\n * abstract representations.\n */\nimport * as array from './array';\nimport * as backoff from './backoff';\nimport * as errorsExports from './error';\nimport { FirebaseStorageError } from './error';\nimport { errors } from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport { RequestInfo } from './requestinfo';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nimport * as XhrIoExports from './xhrio';\nimport { Headers, XhrIo } from './xhrio';\nimport { XhrIoPool } from './xhriopool';\nimport { FirebaseNamespace } from '../../app/firebase_app';\n\ndeclare var firebase: FirebaseNamespace;\n\n/**\n * @template T\n */\nexport interface Request {\n getPromise(): Promise;\n\n /**\n * Cancels the request. IMPORTANT: the promise may still be resolved with an\n * appropriate value (if the request is finished before you call this method,\n * but the promise has not yet been resolved), so don't just assume it will be\n * rejected if you call this function.\n * @param appDelete True if the cancelation came from the app being deleted.\n */\n cancel(appDelete?: boolean): void;\n}\n\n/**\n * @struct\n * @template T\n */\nclass NetworkRequest implements Request {\n private url_: string;\n private method_: string;\n private headers_: Headers;\n private body_: string | Blob | Uint8Array | null;\n private successCodes_: number[];\n private additionalRetryCodes_: number[];\n private pendingXhr_: XhrIo | null = null;\n private backoffId_: backoff.id | null = null;\n private resolve_: Function | null = null;\n private reject_: Function | null = null;\n private canceled_: boolean = false;\n private appDelete_: boolean = false;\n private callback_: (p1: XhrIo, p2: string) => T;\n private errorCallback_:\n | ((p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError)\n | null;\n private progressCallback_: ((p1: number, p2: number) => void) | null;\n private timeout_: number;\n private pool_: XhrIoPool;\n promise_: Promise;\n\n constructor(\n url: string,\n method: string,\n headers: Headers,\n body: string | Blob | Uint8Array | null,\n successCodes: number[],\n additionalRetryCodes: number[],\n callback: (p1: XhrIo, p2: string) => T,\n errorCallback:\n | ((p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError)\n | null,\n timeout: number,\n progressCallback: ((p1: number, p2: number) => void) | null,\n pool: XhrIoPool\n ) {\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n let self = this;\n this.promise_ = promiseimpl.make(function(resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n\n /**\n * Actually starts the retry loop.\n */\n private start_() {\n let self = this;\n\n function doTheRequest(\n backoffCallback: (p1: boolean, ...p2: any[]) => void,\n canceled: boolean\n ) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n let xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n\n function progressListener(progressEvent: ProgressEvent) {\n let loaded = progressEvent.loaded;\n let total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr\n .send(self.url_, self.method_, self.body_, self.headers_)\n .then(function(xhr: XhrIo) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr as XhrIo;\n let hitServer =\n xhr.getErrorCode() === XhrIoExports.ErrorCode.NO_ERROR;\n let status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n let wasCanceled =\n xhr.getErrorCode() === XhrIoExports.ErrorCode.ABORT;\n backoffCallback(\n false,\n new RequestEndStatus(false, null, wasCanceled)\n );\n return;\n }\n let successCode = array.contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n\n /**\n * @param requestWentThrough True if the request eventually went\n * through, false if it hit the retry limit or was canceled.\n */\n function backoffDone(\n requestWentThrough: boolean,\n status: RequestEndStatus\n ) {\n let resolve = self.resolve_ as Function;\n let reject = self.reject_ as Function;\n let xhr = status.xhr as XhrIo;\n if (status.wasSuccessCode) {\n try {\n let result = self.callback_(xhr, xhr.getResponseText());\n if (type.isJustDef(result)) {\n resolve(result);\n } else {\n resolve();\n }\n } catch (e) {\n reject(e);\n }\n } else {\n if (xhr !== null) {\n let err = errorsExports.unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n } else {\n reject(err);\n }\n } else {\n if (status.canceled) {\n let err = self.appDelete_\n ? errorsExports.appDeleted()\n : errorsExports.canceled();\n reject(err);\n } else {\n let err = errorsExports.retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n } else {\n this.backoffId_ = backoff.start(doTheRequest, backoffDone, this.timeout_);\n }\n }\n\n /** @inheritDoc */\n getPromise() {\n return this.promise_;\n }\n\n /** @inheritDoc */\n cancel(appDelete?: boolean) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n backoff.stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n }\n\n private isRetryStatusCode_(status: number): boolean {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n let isFiveHundredCode = status >= 500 && status < 600;\n let extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429\n ];\n let isExtraRetryCode = array.contains(extraRetryCodes, status);\n let isRequestSpecificRetryCode = array.contains(\n this.additionalRetryCodes_,\n status\n );\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n }\n}\n\n/**\n * A collection of information about the result of a network request.\n * @param opt_canceled Defaults to false.\n * @struct\n */\nexport class RequestEndStatus {\n /**\n * True if the request was canceled.\n */\n canceled: boolean;\n\n constructor(\n public wasSuccessCode: boolean,\n public xhr: XhrIo | null,\n opt_canceled?: boolean\n ) {\n this.canceled = !!opt_canceled;\n }\n}\n\nexport function addAuthHeader_(headers: Headers, authToken: string | null) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\n\nexport function addVersionHeader_(headers: Headers) {\n let number =\n typeof firebase !== 'undefined' ? firebase.SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n\n/**\n * @template T\n */\nexport function makeRequest(\n requestInfo: RequestInfo,\n authToken: string | null,\n pool: XhrIoPool\n): Request {\n let queryPart = UrlUtils.makeQueryString(requestInfo.urlParams);\n let url = requestInfo.url + queryPart;\n let headers = object.clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new NetworkRequest(\n url,\n requestInfo.method,\n headers,\n requestInfo.body,\n requestInfo.successCodes,\n requestInfo.additionalRetryCodes,\n requestInfo.handler,\n requestInfo.errorHandler,\n requestInfo.timeout,\n requestInfo.progressCallback,\n pool\n );\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/request.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { StringFormat } from './storage/implementation/string';\nimport { TaskEvent } from './storage/implementation/taskenums';\nimport { TaskState } from './storage/implementation/taskenums';\nimport { XhrIoPool } from './storage/implementation/xhriopool';\nimport { Reference } from './storage/reference';\nimport { Service } from './storage/service';\nimport firebase from './app';\nimport { FirebaseApp, FirebaseServiceFactory } from './app/firebase_app';\n/**\n * Type constant for Firebase Storage.\n */\nconst STORAGE_TYPE = 'storage';\n\nfunction factory(app: FirebaseApp, unused: any, opt_url?: string): Service {\n return new Service(app, new XhrIoPool(), opt_url);\n}\n\nexport function registerStorage(instance) {\n let namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: Service,\n Reference: Reference\n };\n instance.INTERNAL.registerService(\n STORAGE_TYPE,\n factory as FirebaseServiceFactory,\n namespaceExports,\n undefined,\n // Allow multiple storage instances per app.\n true\n );\n}\n\nregisterStorage(firebase);\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @fileoverview Constants used in the Firebase Storage library.\n */\n\n/**\n * Domain and scheme for API calls.\n */\nexport const domainBase: string = 'https://firebasestorage.googleapis.com';\n\n/**\n * Domain and scheme for object downloads.\n */\nexport const downloadBase: string = 'https://firebasestorage.googleapis.com';\n\n/**\n * Base URL for non-upload calls to the API.\n */\nexport const apiBaseUrl: string = '/v0';\n\n/**\n * Base URL for upload calls to the API.\n */\nexport const apiUploadBaseUrl: string = '/v0';\n\nexport function setDomainBase(domainBase: string) {\n domainBase = domainBase;\n}\n\nexport const configOption: string = 'storageBucket';\n\n/**\n * 1 minute\n */\nexport const shortMaxOperationRetryTime: number = 1 * 60 * 1000;\n\n/**\n * 2 minutes\n */\nexport const defaultMaxOperationRetryTime: number = 2 * 60 * 1000;\n\n/**\n * 10 minutes\n */\nexport const defaultMaxUploadRetryTime: number = 10 * 60 * 100;\n\n/**\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\n * enough for us to use it directly.\n */\nexport const minSafeInteger: number = -9007199254740991;\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/constants.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview A lightweight wrapper around XMLHttpRequest with a\n * goog.net.XhrIo-like interface.\n */\n\nexport type Headers = { [name: string]: string | number };\n\nexport interface XhrIo {\n send(\n url: string,\n method: string,\n opt_body?: ArrayBufferView | Blob | string | null,\n opt_headers?: Headers\n ): Promise;\n\n getErrorCode(): ErrorCode;\n\n getStatus(): number;\n\n getResponseText(): string;\n\n /**\n * Abort the request.\n */\n abort(): void;\n\n getResponseHeader(header: string): string | null;\n\n addUploadProgressListener(listener: (p1: Event) => void): void;\n\n removeUploadProgressListener(listener: (p1: Event) => void): void;\n}\n\n/**\n * @enum{number}\n */\nexport enum ErrorCode {\n NO_ERROR = 0,\n NETWORK_ERROR = 1,\n ABORT = 2\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/xhrio.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as errorsExports from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport * as type from './type';\nimport * as XhrIoExports from './xhrio';\nimport { Headers, XhrIo } from './xhrio';\n\n/**\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\n * doesn't work in React Native on Android.\n */\nexport class NetworkXhrIo implements XhrIo {\n private xhr_: XMLHttpRequest;\n private errorCode_: XhrIoExports.ErrorCode;\n private sendPromise_: Promise;\n private sent_: boolean = false;\n\n constructor() {\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = XhrIoExports.ErrorCode.NO_ERROR;\n this.sendPromise_ = promiseimpl.make((resolve, reject) => {\n this.xhr_.addEventListener('abort', event => {\n this.errorCode_ = XhrIoExports.ErrorCode.ABORT;\n resolve(this);\n });\n this.xhr_.addEventListener('error', event => {\n this.errorCode_ = XhrIoExports.ErrorCode.NETWORK_ERROR;\n resolve(this);\n });\n this.xhr_.addEventListener('load', event => {\n resolve(this);\n });\n });\n }\n\n /**\n * @override\n */\n send(\n url: string,\n method: string,\n opt_body?: ArrayBufferView | Blob | string | null,\n opt_headers?: Headers\n ): Promise {\n if (this.sent_) {\n throw errorsExports.internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (type.isDef(opt_headers)) {\n const headers = opt_headers as Headers;\n object.forEach(headers, (key, val) => {\n this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (type.isDef(opt_body)) {\n this.xhr_.send(opt_body);\n } else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n }\n\n /**\n * @override\n */\n getErrorCode(): XhrIoExports.ErrorCode {\n if (!this.sent_) {\n throw errorsExports.internalError(\n 'cannot .getErrorCode() before sending'\n );\n }\n return this.errorCode_;\n }\n\n /**\n * @override\n */\n getStatus(): number {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n } catch (e) {\n return -1;\n }\n }\n\n /**\n * @override\n */\n getResponseText(): string {\n if (!this.sent_) {\n throw errorsExports.internalError(\n 'cannot .getResponseText() before sending'\n );\n }\n return this.xhr_.responseText;\n }\n\n /**\n * Aborts the request.\n * @override\n */\n abort() {\n this.xhr_.abort();\n }\n\n /**\n * @override\n */\n getResponseHeader(header: string): string | null {\n return this.xhr_.getResponseHeader(header);\n }\n\n /**\n * @override\n */\n addUploadProgressListener(listener: (p1: Event) => void) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n }\n\n /**\n * @override\n */\n removeUploadProgressListener(listener: (p1: Event) => void) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/xhrio_network.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Replacement for goog.net.XhrIoPool that works with fbs.XhrIo.\n */\nimport { XhrIo } from './xhrio';\nimport { NetworkXhrIo } from './xhrio_network';\n\n/**\n * Factory-like class for creating XhrIo instances.\n */\nexport class XhrIoPool {\n createXhrIo(): XhrIo {\n return new NetworkXhrIo();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/xhriopool.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Functionality related to the parsing/composition of bucket/\n * object location.\n */\nimport * as errorsExports from './error';\nimport { errors } from './error';\n\n/**\n * @struct\n */\nexport class Location {\n private path_: string;\n\n constructor(public readonly bucket: string, path: string) {\n this.path_ = path;\n }\n\n get path(): string {\n return this.path_;\n }\n\n fullServerUrl(): string {\n let encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n }\n\n bucketOnlyServerUrl(): string {\n let encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n }\n\n static makeFromBucketSpec(bucketString: string): Location {\n let bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n } catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n } else {\n throw errorsExports.invalidDefaultBucket(bucketString);\n }\n }\n\n static makeFromUrl(url: string): Location {\n let location = null;\n let bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n\n function gsModify(loc: Location) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n let gsPath = '(/(.*))?$';\n let path = '(/([^?#]*).*)?$';\n let gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n let gsIndices = { bucket: 1, path: 3 };\n\n function httpModify(loc: Location) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n let version = 'v[A-Za-z0-9_]+';\n let httpRegex = new RegExp(\n '^https?://firebasestorage\\\\.googleapis\\\\.com/' +\n version +\n '/b/' +\n bucketDomain +\n '/o' +\n path,\n 'i'\n );\n let httpIndices = { bucket: 1, path: 3 };\n let groups = [\n { regex: gsRegex, indices: gsIndices, postModify: gsModify },\n { regex: httpRegex, indices: httpIndices, postModify: httpModify }\n ];\n for (let i = 0; i < groups.length; i++) {\n let group = groups[i];\n let captures = group.regex.exec(url);\n if (captures) {\n let bucketValue = captures[group.indices.bucket];\n let pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw errorsExports.invalidUrl(url);\n }\n return location;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/location.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @file Provides a Blob-like wrapper for various binary types (including the\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\n * making uploads possible in environments without the native Blob type.\n */\nimport * as fs from './fs';\nimport * as string from './string';\nimport { StringFormat } from './string';\nimport * as type from './type';\n\n/**\n * @param opt_elideCopy If true, doesn't copy mutable input data\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\n * modified after this blob's construction.\n */\nexport class FbsBlob {\n private data_: Blob | Uint8Array;\n private size_: number;\n private type_: string;\n\n constructor(data: Blob | Uint8Array | ArrayBuffer, opt_elideCopy?: boolean) {\n let size: number = 0;\n let blobType: string = '';\n if (type.isNativeBlob(data)) {\n this.data_ = data as Blob;\n size = (data as Blob).size;\n blobType = (data as Blob).type;\n } else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n } else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n } else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data as Uint8Array;\n } else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data as Uint8Array);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n\n size(): number {\n return this.size_;\n }\n\n type(): string {\n return this.type_;\n }\n\n slice(startByte: number, endByte: number): FbsBlob | null {\n if (type.isNativeBlob(this.data_)) {\n let realBlob = this.data_ as Blob;\n let sliced = fs.sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n } else {\n let slice = new Uint8Array(\n (this.data_ as Uint8Array).buffer,\n startByte,\n endByte - startByte\n );\n return new FbsBlob(slice, true);\n }\n }\n\n static getBlob(...var_args: (string | FbsBlob)[]): FbsBlob | null {\n if (type.isNativeBlobDefined()) {\n var blobby: (Blob | Uint8Array | string)[] = var_args.map(function(\n val: string | FbsBlob\n ): Blob | Uint8Array | string {\n if (val instanceof FbsBlob) {\n return val.data_;\n } else {\n return val;\n }\n });\n return new FbsBlob(fs.getBlob.apply(null, blobby));\n } else {\n let uint8Arrays: Uint8Array[] = var_args.map(function(\n val: string | FbsBlob\n ): Uint8Array {\n if (type.isString(val)) {\n return string.dataFromString(StringFormat.RAW, val as string).data;\n } else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return (val as FbsBlob).data_ as Uint8Array;\n }\n });\n let finalLength = 0;\n uint8Arrays.forEach(function(array: Uint8Array): void {\n finalLength += array.byteLength;\n });\n let merged = new Uint8Array(finalLength);\n let index = 0;\n uint8Arrays.forEach(function(array: Uint8Array) {\n for (let i = 0; i < array.length; i++) {\n merged[index++] = array[i];\n }\n });\n return new FbsBlob(merged, true);\n }\n }\n\n uploadData(): Blob | Uint8Array {\n return this.data_;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/blob.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { FirebaseStorageError } from './error';\nimport { Headers, XhrIo } from './xhrio';\n\nexport type UrlParams = { [name: string]: string };\n\nexport class RequestInfo {\n urlParams: UrlParams = {};\n headers: Headers = {};\n body: Blob | string | Uint8Array | null = null;\n\n errorHandler:\n | ((p1: XhrIo, p2: FirebaseStorageError) => FirebaseStorageError)\n | null = null;\n\n /**\n * Called with the current number of bytes uploaded and total size (-1 if not\n * computable) of the request body (i.e. used to report upload progress).\n */\n progressCallback: ((p1: number, p2: number) => void) | null = null;\n successCodes: number[] = [200];\n additionalRetryCodes: number[] = [];\n\n constructor(\n public url: string,\n public method: string,\n /**\n * Returns the value with which to resolve the request's promise. Only called\n * if the request is successful. Throw from this function to reject the\n * returned Request's promise with the thrown error.\n * Note: The XhrIo passed to this function may be reused after this callback\n * returns. Do not keep a reference to it in any way.\n */\n public handler: (p1: XhrIo, p2: string) => T,\n public timeout: number\n ) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/requestinfo.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as type from './type';\n\ntype NextFn = (value: T) => void;\ntype ErrorFn = (error: Error) => void;\ntype CompleteFn = () => void;\ntype Unsubscribe = () => void;\n\ntype Subscribe = (\n next: NextFn | { [name: string]: string | null },\n error?: ErrorFn,\n complete?: CompleteFn\n) => Unsubscribe;\n\nexport { NextFn, ErrorFn, CompleteFn, Unsubscribe, Subscribe };\n\n/**\n * @struct\n */\nexport class Observer {\n next: NextFn | null;\n error: ErrorFn | null;\n complete: CompleteFn | null;\n\n constructor(\n nextOrObserver: NextFn | { [name: string]: string | null } | null,\n opt_error?: ErrorFn | null,\n opt_complete?: CompleteFn | null\n ) {\n let asFunctions =\n type.isFunction(nextOrObserver) ||\n type.isDef(opt_error) ||\n type.isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver as NextFn | null;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n } else {\n const observer = nextOrObserver as {\n next?: NextFn | null;\n error?: ErrorFn | null;\n complete?: CompleteFn | null;\n };\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/observer.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { TaskState } from './implementation/taskenums';\nimport * as type from './implementation/type';\nimport { Metadata } from './metadata';\nimport { Reference } from './reference';\nimport { UploadTask } from './task';\n\nexport class UploadTaskSnapshot {\n constructor(\n readonly bytesTransferred: number,\n readonly totalBytes: number,\n readonly state: TaskState,\n readonly metadata: Metadata | null,\n readonly task: UploadTask,\n readonly ref: Reference\n ) {}\n\n get downloadURL(): string | null {\n if (this.metadata !== null) {\n let urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/tasksnapshot.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n/**\n * @fileoverview Defines types for interacting with blob transfer tasks.\n */\n\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { FbsBlob } from './implementation/blob';\nimport { FirebaseStorageError } from './implementation/error';\nimport { InternalTaskState } from './implementation/taskenums';\nimport { Metadata } from './metadata';\nimport {\n NextFn,\n ErrorFn,\n CompleteFn,\n Unsubscribe,\n Observer\n} from './implementation/observer';\nimport { Request } from './implementation/request';\nimport * as RequestExports from './implementation/request';\nimport { Subscribe } from './implementation/observer';\nimport { TaskEvent, TaskState } from './implementation/taskenums';\nimport { UploadTaskSnapshot } from './tasksnapshot';\nimport * as fbsArgs from './implementation/args';\nimport { ArgSpec } from './implementation/args';\nimport * as fbsArray from './implementation/array';\nimport { async as fbsAsync } from './implementation/async';\nimport { errors as fbsErrors } from './implementation/error';\nimport * as errors from './implementation/error';\nimport { Location } from './implementation/location';\nimport * as fbsMetadata from './implementation/metadata';\nimport * as fbsPromiseimpl from './implementation/promise_external';\nimport { RequestInfo } from './implementation/requestinfo';\nimport * as fbsRequests from './implementation/requests';\nimport * as fbsTaskEnums from './implementation/taskenums';\nimport * as typeUtils from './implementation/type';\nimport { Reference } from './reference';\n\n/**\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\n * upload and manage callbacks for various events.\n */\nexport class UploadTask {\n private ref_: Reference;\n private authWrapper_: AuthWrapper;\n private location_: Location;\n private blob_: FbsBlob;\n private metadata_: Metadata | null;\n private mappings_: fbsMetadata.Mappings;\n private transferred_: number = 0;\n private needToFetchStatus_: boolean = false;\n private needToFetchMetadata_: boolean = false;\n private observers_: Observer[] = [];\n private resumable_: boolean;\n private state_: InternalTaskState;\n private error_: Error | null = null;\n private uploadUrl_: string | null = null;\n private request_: Request | null = null;\n private chunkMultiplier_: number = 1;\n private errorHandler_: (p1: FirebaseStorageError) => void;\n private metadataErrorHandler_: (p1: FirebaseStorageError) => void;\n private resolve_: ((p1: UploadTaskSnapshot) => void) | null = null;\n private reject_: ((p1: Error) => void) | null = null;\n private promise_: Promise;\n\n /**\n * @param ref The firebaseStorage.Reference object this task came\n * from, untyped to avoid cyclic dependencies.\n * @param blob The blob to upload.\n */\n constructor(\n ref: Reference,\n authWrapper: AuthWrapper,\n location: Location,\n mappings: fbsMetadata.Mappings,\n blob: FbsBlob,\n metadata: Metadata | null = null\n ) {\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = error => {\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n if (error.codeEquals(errors.Code.CANCELED)) {\n this.needToFetchStatus_ = true;\n this.completeTransitions_();\n } else {\n this.error_ = error;\n this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = error => {\n this.request_ = null;\n if (error.codeEquals(errors.Code.CANCELED)) {\n this.completeTransitions_();\n } else {\n this.error_ = error;\n this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = fbsPromiseimpl.make((resolve, reject) => {\n this.resolve_ = resolve;\n this.reject_ = reject;\n this.start_();\n });\n\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, () => {});\n }\n\n private makeProgressCallback_(): (p1: number, p2: number) => void {\n const sizeBefore = this.transferred_;\n return (loaded, total) => {\n this.updateProgress_(sizeBefore + loaded);\n };\n }\n\n private shouldDoResumable_(blob: FbsBlob): boolean {\n return blob.size() > 256 * 1024;\n }\n\n private start_() {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n } else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n } else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n } else {\n this.continueUpload_();\n }\n }\n }\n } else {\n this.oneShotUpload_();\n }\n }\n\n private resolveToken_(callback: (p1: string | null) => void) {\n this.authWrapper_.getAuthToken().then(authToken => {\n switch (this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n }\n\n // TODO(andysoto): assert false\n\n private createResumable_() {\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.createResumableUpload(\n this.authWrapper_,\n this.location_,\n this.mappings_,\n this.blob_,\n this.metadata_\n );\n const createRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = createRequest;\n createRequest.getPromise().then((url: string) => {\n this.request_ = null;\n this.uploadUrl_ = url;\n this.needToFetchStatus_ = false;\n this.completeTransitions_();\n }, this.errorHandler_);\n });\n }\n\n private fetchStatus_() {\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n const url = this.uploadUrl_ as string;\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.getResumableUploadStatus(\n this.authWrapper_,\n this.location_,\n url,\n this.blob_\n );\n const statusRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = statusRequest;\n statusRequest.getPromise().then(status => {\n status = status as fbsRequests.ResumableUploadStatus;\n this.request_ = null;\n this.updateProgress_(status.current);\n this.needToFetchStatus_ = false;\n if (status.finalized) {\n this.needToFetchMetadata_ = true;\n }\n this.completeTransitions_();\n }, this.errorHandler_);\n });\n }\n\n private continueUpload_() {\n const chunkSize =\n fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n const status = new fbsRequests.ResumableUploadStatus(\n this.transferred_,\n this.blob_.size()\n );\n\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n const url = this.uploadUrl_ as string;\n this.resolveToken_(authToken => {\n let requestInfo;\n try {\n requestInfo = fbsRequests.continueResumableUpload(\n this.location_,\n this.authWrapper_,\n url,\n this.blob_,\n chunkSize,\n this.mappings_,\n status,\n this.makeProgressCallback_()\n );\n } catch (e) {\n this.error_ = e;\n this.transition_(InternalTaskState.ERROR);\n return;\n }\n const uploadRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = uploadRequest;\n uploadRequest\n .getPromise()\n .then((newStatus: fbsRequests.ResumableUploadStatus) => {\n this.increaseMultiplier_();\n this.request_ = null;\n this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n this.metadata_ = newStatus.metadata;\n this.transition_(InternalTaskState.SUCCESS);\n } else {\n this.completeTransitions_();\n }\n }, this.errorHandler_);\n });\n }\n\n private increaseMultiplier_() {\n const currentSize =\n fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n }\n\n private fetchMetadata_() {\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.getMetadata(\n this.authWrapper_,\n this.location_,\n this.mappings_\n );\n const metadataRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = metadataRequest;\n metadataRequest.getPromise().then(metadata => {\n this.request_ = null;\n this.metadata_ = metadata;\n this.transition_(InternalTaskState.SUCCESS);\n }, this.metadataErrorHandler_);\n });\n }\n\n private oneShotUpload_() {\n this.resolveToken_(authToken => {\n const requestInfo = fbsRequests.multipartUpload(\n this.authWrapper_,\n this.location_,\n this.mappings_,\n this.blob_,\n this.metadata_\n );\n const multipartRequest = this.authWrapper_.makeRequest(\n requestInfo,\n authToken\n );\n this.request_ = multipartRequest;\n multipartRequest.getPromise().then(metadata => {\n this.request_ = null;\n this.metadata_ = metadata;\n this.updateProgress_(this.blob_.size());\n this.transition_(InternalTaskState.SUCCESS);\n }, this.errorHandler_);\n });\n }\n\n private updateProgress_(transferred: number) {\n const old = this.transferred_;\n this.transferred_ = transferred;\n\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n }\n\n private transition_(state: InternalTaskState) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n const wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = errors.canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n }\n\n private completeTransitions_() {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n }\n\n get snapshot(): UploadTaskSnapshot {\n const externalState = fbsTaskEnums.taskStateFromInternalTaskState(\n this.state_\n );\n return new UploadTaskSnapshot(\n this.transferred_,\n this.blob_.size(),\n externalState,\n this.metadata_,\n this,\n this.ref_\n );\n }\n\n /**\n * Adds a callback for an event.\n * @param type The type of event to listen for.\n */\n on(\n type: TaskEvent,\n nextOrObserver = undefined,\n error = undefined,\n completed = undefined\n ): Unsubscribe | Subscribe {\n function typeValidator(_p: any) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw `Expected one of the event types: [${TaskEvent.STATE_CHANGED}].`;\n }\n }\n const nextOrObserverMessage =\n 'Expected a function or an Object with one of ' +\n '`next`, `error`, `complete` properties.';\n const nextValidator = fbsArgs.nullFunctionSpec(true).validator;\n const observerValidator = fbsArgs.looseObjectSpec(null, true).validator;\n\n function nextOrObserverValidator(p: any) {\n try {\n nextValidator(p);\n return;\n } catch (e) {}\n try {\n observerValidator(p);\n const anyDefined =\n typeUtils.isJustDef(p['next']) ||\n typeUtils.isJustDef(p['error']) ||\n typeUtils.isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n } catch (e) {\n throw nextOrObserverMessage;\n }\n }\n const specs = [\n fbsArgs.stringSpec(typeValidator),\n fbsArgs.looseObjectSpec(nextOrObserverValidator, true),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n fbsArgs.validate('on', specs, arguments);\n const self = this;\n\n function makeBinder(\n specs: ArgSpec[] | null\n ): Subscribe {\n function binder(\n nextOrObserver:\n | NextFn\n | { [name: string]: string | null }\n | null,\n error?: ErrorFn | null,\n opt_complete?: CompleteFn | null\n ) {\n if (specs !== null) {\n fbsArgs.validate('on', specs, arguments);\n }\n const observer = new Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return () => {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n\n function binderNextOrObserverValidator(p: any) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n const binderSpecs = [\n fbsArgs.looseObjectSpec(binderNextOrObserverValidator),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n const typeOnly = !(\n typeUtils.isJustDef(nextOrObserver) ||\n typeUtils.isJustDef(error) ||\n typeUtils.isJustDef(completed)\n );\n if (typeOnly) {\n return makeBinder(binderSpecs);\n } else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n }\n\n /**\n * This object behaves like a Promise, and resolves with its snapshot data\n * when the upload completes.\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\n * @param onRejected The rejection callback.\n */\n then(\n onFulfilled?: ((value: UploadTaskSnapshot) => U | PromiseLike) | null,\n onRejected?: ((error: any) => U | PromiseLike) | null\n ): Promise {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(\n onFulfilled as (value: UploadTaskSnapshot) => U | PromiseLike,\n onRejected as ((error: any) => PromiseLike) | null\n );\n }\n\n /**\n * Equivalent to calling `then(null, onRejected)`.\n */\n catch(onRejected: (p1: Error) => T | PromiseLike): Promise {\n return this.then(null, onRejected);\n }\n\n /**\n * Adds the given observer.\n */\n private addObserver_(observer: Observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n }\n\n /**\n * Removes the given observer.\n */\n private removeObserver_(observer: Observer) {\n fbsArray.remove(this.observers_, observer);\n }\n\n private notifyObservers_() {\n this.finishPromise_();\n const observers = fbsArray.clone(this.observers_);\n observers.forEach(observer => {\n this.notifyObserver_(observer);\n });\n }\n\n private finishPromise_() {\n if (this.resolve_ !== null) {\n let triggered = true;\n switch (fbsTaskEnums.taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n fbsAsync(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n const toCall = this.reject_ as ((p1: Error) => void);\n fbsAsync(toCall.bind(null, this.error_ as Error))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n }\n\n private notifyObserver_(observer: Observer) {\n const externalState = fbsTaskEnums.taskStateFromInternalTaskState(\n this.state_\n );\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n fbsAsync(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n fbsAsync(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_ as Error))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_ as Error))();\n }\n }\n }\n\n /**\n * Resumes a paused task. Has no effect on a currently running or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n resume(): boolean {\n fbsArgs.validate('resume', [], arguments);\n const valid =\n this.state_ === InternalTaskState.PAUSED ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n }\n\n /**\n * Pauses a currently running task. Has no effect on a paused or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n pause(): boolean {\n fbsArgs.validate('pause', [], arguments);\n const valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n }\n\n /**\n * Cancels a currently running or paused task. Has no effect on a complete or\n * failed task.\n * @return True if the operation took effect, false if ignored.\n */\n cancel(): boolean {\n fbsArgs.validate('cancel', [], arguments);\n const valid =\n this.state_ === InternalTaskState.RUNNING ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/task.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/**\n * @fileoverview Defines the Firebase Storage Reference class.\n */\nimport * as args from './implementation/args';\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { FbsBlob } from './implementation/blob';\nimport * as errorsExports from './implementation/error';\nimport { errors } from './implementation/error';\nimport { Location } from './implementation/location';\nimport * as metadata from './implementation/metadata';\nimport * as object from './implementation/object';\nimport * as path from './implementation/path';\nimport * as requests from './implementation/requests';\nimport * as fbsString from './implementation/string';\nimport { StringFormat } from './implementation/string';\nimport * as type from './implementation/type';\nimport { Metadata } from './metadata';\nimport { Service } from './service';\nimport { UploadTask } from './task';\n\n/**\n * Provides methods to interact with a bucket in the Firebase Storage service.\n * @param location An fbs.location, or the URL at\n * which to base this object, in one of the following forms:\n * gs:///\n * http[s]://firebasestorage.googleapis.com/\n * /b//o/\n * Any query or fragment strings will be ignored in the http[s]\n * format. If no value is passed, the storage object will use a URL based on\n * the project ID of the base firebase.App instance.\n */\nexport class Reference {\n protected location: Location;\n\n constructor(protected authWrapper: AuthWrapper, location: string | Location) {\n if (location instanceof Location) {\n this.location = location;\n } else {\n this.location = Location.makeFromUrl(location);\n }\n }\n\n /**\n * @return The URL for the bucket and path this object references,\n * in the form gs:///\n * @override\n */\n toString(): string {\n args.validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n }\n\n protected newRef(authWrapper: AuthWrapper, location: Location): Reference {\n return new Reference(authWrapper, location);\n }\n\n protected mappings(): metadata.Mappings {\n return metadata.getMappings();\n }\n\n /**\n * @return A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n child(childPath: string): Reference {\n args.validate('child', [args.stringSpec()], arguments);\n let newPath = path.child(this.location.path, childPath);\n let location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n }\n\n /**\n * @return A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get parent(): Reference | null {\n let newPath = path.parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n let location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n }\n\n /**\n * @return An reference to the root of this\n * object's bucket.\n */\n get root(): Reference {\n let location = new Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n }\n\n get bucket(): string {\n return this.location.bucket;\n }\n\n get fullPath(): string {\n return this.location.path;\n }\n\n get name(): string {\n return path.lastComponent(this.location.path);\n }\n\n get storage(): Service {\n return this.authWrapper.service();\n }\n\n /**\n * Uploads a blob to this object's location.\n * @param data The blob to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n put(\n data: Blob | Uint8Array | ArrayBuffer,\n metadata: Metadata | null = null\n ): UploadTask {\n args.validate(\n 'put',\n [args.uploadDataSpec(), args.metadataSpec(true)],\n arguments\n );\n this.throwIfRoot_('put');\n return new UploadTask(\n this,\n this.authWrapper,\n this.location,\n this.mappings(),\n new FbsBlob(data),\n metadata\n );\n }\n\n /**\n * Uploads a string to this object's location.\n * @param string The string to upload.\n * @param opt_format The format of the string to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n putString(\n string: string,\n format: StringFormat = StringFormat.RAW,\n opt_metadata?: Metadata\n ): UploadTask {\n args.validate(\n 'putString',\n [\n args.stringSpec(),\n args.stringSpec(fbsString.formatValidator, true),\n args.metadataSpec(true)\n ],\n arguments\n );\n this.throwIfRoot_('putString');\n let data = fbsString.dataFromString(format, string);\n let metadata = object.clone(opt_metadata);\n if (!type.isDef(metadata['contentType']) && type.isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new UploadTask(\n this,\n this.authWrapper,\n this.location,\n this.mappings(),\n new FbsBlob(data.data, true),\n metadata\n );\n }\n\n /**\n * Deletes the object at this location.\n * @return A promise that resolves if the deletion succeeds.\n */\n delete(): Promise {\n args.validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n let self = this;\n return this.authWrapper.getAuthToken().then(function(authToken) {\n let requestInfo = requests.deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n }\n\n /**\n * A promise that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retreived, the promise is\n * rejected.\n */\n getMetadata(): Promise {\n args.validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n let self = this;\n return this.authWrapper.getAuthToken().then(function(authToken) {\n let requestInfo = requests.getMetadata(\n self.authWrapper,\n self.location,\n self.mappings()\n );\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n }\n\n /**\n * Updates the metadata for this object.\n * @param metadata The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @return A promise that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n updateMetadata(metadata: Metadata): Promise {\n args.validate('updateMetadata', [args.metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n let self = this;\n return this.authWrapper.getAuthToken().then(function(authToken) {\n let requestInfo = requests.updateMetadata(\n self.authWrapper,\n self.location,\n metadata,\n self.mappings()\n );\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n }\n\n /**\n * @return A promise that resolves with the download\n * URL for this object.\n */\n getDownloadURL(): Promise {\n args.validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function(metadata) {\n let url = (metadata['downloadURLs'] as string[])[0];\n if (type.isDef(url)) {\n return url;\n } else {\n throw errorsExports.noDownloadURL();\n }\n });\n }\n\n private throwIfRoot_(name: string) {\n if (this.location.path === '') {\n throw errorsExports.invalidRootOperation(name);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/reference.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { FirebaseStorageError } from './error';\nimport * as promiseimpl from './promise_external';\nimport * as RequestExports from './request';\nimport { Request } from './request';\n\n/**\n * A request whose promise always fails.\n * @struct\n * @template T\n */\nexport class FailRequest implements Request {\n promise_: Promise;\n\n constructor(error: FirebaseStorageError) {\n this.promise_ = promiseimpl.reject(error);\n }\n\n /** @inheritDoc */\n getPromise() {\n return this.promise_;\n }\n\n /** @inheritDoc */\n cancel(appDelete = false) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/failrequest.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as object from './object';\nimport * as RequestExports from './request';\nimport { Request } from './request';\nimport * as constants from './constants';\n\n/**\n * @struct\n */\nexport class RequestMap {\n private map_: { [key: number]: Request } = {};\n private id_: number;\n\n constructor() {\n this.id_ = constants.minSafeInteger;\n }\n\n /**\n * Registers the given request with this map.\n * The request is unregistered when it completes.\n * @param r The request to register.\n */\n addRequest(r: Request) {\n let id = this.id_;\n this.id_++;\n this.map_[id] = r;\n let self = this;\n\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n }\n\n /**\n * Cancels all registered requests.\n */\n clear() {\n object.forEach(this.map_, (key: string, val: Request) => {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/requestmap.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport { Reference } from '../reference';\nimport { Service } from '../service';\nimport * as constants from './constants';\nimport * as errorsExports from './error';\nimport { errors } from './error';\nimport { FailRequest } from './failrequest';\nimport { Location } from './location';\nimport * as promiseimpl from './promise_external';\nimport { Request } from './request';\nimport { RequestInfo } from './requestinfo';\nimport { requestMaker } from './requestmaker';\nimport { RequestMap } from './requestmap';\nimport * as type from './type';\nimport { XhrIoPool } from './xhriopool';\nimport { FirebaseApp, FirebaseAuthTokenData } from '../../app/firebase_app';\n\n/**\n * @param app If null, getAuthToken always resolves with null.\n * @param service The storage service associated with this auth wrapper.\n * Untyped to avoid circular type dependencies.\n * @struct\n */\nexport class AuthWrapper {\n private app_: FirebaseApp | null;\n private bucket_: string | null = null;\n\n /**\n maker\n */\n private storageRefMaker_: (p1: AuthWrapper, p2: Location) => Reference;\n private requestMaker_: requestMaker;\n private pool_: XhrIoPool;\n private service_: Service;\n private maxOperationRetryTime_: number;\n private maxUploadRetryTime_: number;\n private requestMap_: RequestMap;\n private deleted_: boolean = false;\n\n constructor(\n app: FirebaseApp | null,\n maker: (p1: AuthWrapper, p2: Location) => Reference,\n requestMaker: requestMaker,\n service: Service,\n pool: XhrIoPool\n ) {\n this.app_ = app;\n if (this.app_ !== null) {\n let options = this.app_.options;\n if (type.isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = constants.defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = constants.defaultMaxUploadRetryTime;\n this.requestMap_ = new RequestMap();\n }\n\n private static extractBucket_(config: {\n [prop: string]: any;\n }): string | null {\n let bucketString = config[constants.configOption] || null;\n if (bucketString == null) {\n return null;\n }\n let loc: Location = Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n }\n\n getAuthToken(): Promise {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (\n this.app_ !== null &&\n type.isDef(this.app_.INTERNAL) &&\n type.isDef(this.app_.INTERNAL.getToken)\n ) {\n return this.app_.INTERNAL.getToken().then(\n function(response: FirebaseAuthTokenData | null): string | null {\n if (response !== null) {\n return response.accessToken;\n } else {\n return null;\n }\n },\n function(_error) {\n return null;\n }\n );\n } else {\n return promiseimpl.resolve(null) as Promise;\n }\n }\n\n bucket(): string | null {\n if (this.deleted_) {\n throw errorsExports.appDeleted();\n } else {\n return this.bucket_;\n }\n }\n\n /**\n * The service associated with this auth wrapper. Untyped to avoid circular\n * type dependencies.\n */\n service(): Service {\n return this.service_;\n }\n\n /**\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\n * at the given Location.\n * @param loc The Location.\n * @return Actually a firebaseStorage.Reference, typing not allowed\n * because of circular dependency problems.\n */\n makeStorageReference(loc: Location): Reference {\n return this.storageRefMaker_(this, loc);\n }\n\n makeRequest(\n requestInfo: RequestInfo,\n authToken: string | null\n ): Request {\n if (!this.deleted_) {\n let request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n } else {\n return new FailRequest(errorsExports.appDeleted());\n }\n }\n\n /**\n * Stop running requests and prevent more from being created.\n */\n deleteApp() {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n }\n\n maxUploadRetryTime(): number {\n return this.maxUploadRetryTime_;\n }\n\n setMaxUploadRetryTime(time: number) {\n this.maxUploadRetryTime_ = time;\n }\n\n maxOperationRetryTime(): number {\n return this.maxOperationRetryTime_;\n }\n\n setMaxOperationRetryTime(time: number) {\n this.maxOperationRetryTime_ = time;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/implementation/authwrapper.ts","/**\n* Copyright 2017 Google Inc.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\nimport * as args from './implementation/args';\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { Location } from './implementation/location';\nimport * as fbsPromiseImpl from './implementation/promise_external';\nimport * as RequestExports from './implementation/request';\nimport { Request } from './implementation/request';\nimport { XhrIoPool } from './implementation/xhriopool';\nimport { Reference } from './reference';\nimport { FirebaseApp } from '../app/firebase_app';\n\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n *\n * @struct\n */\nexport class Service {\n authWrapper_: AuthWrapper;\n private app_: FirebaseApp;\n private bucket_: Location | null = null;\n private internals_: ServiceInternals;\n\n constructor(app: FirebaseApp, pool: XhrIoPool, url?: string) {\n function maker(authWrapper: AuthWrapper, loc: Location) {\n return new Reference(authWrapper, loc);\n }\n this.authWrapper_ = new AuthWrapper(\n app,\n maker,\n RequestExports.makeRequest,\n this,\n pool\n );\n this.app_ = app;\n if (url != null) {\n this.bucket_ = Location.makeFromBucketSpec(url);\n } else {\n const authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new ServiceInternals(this);\n }\n\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n ref(path?: string): Reference {\n function validator(path: string) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n args.validate('ref', [args.stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n\n let ref = new Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n } else {\n return ref;\n }\n }\n\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n refFromURL(url: string): Reference {\n function validator(p: string) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n Location.makeFromUrl(p);\n } catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n args.validate('refFromURL', [args.stringSpec(validator, false)], arguments);\n return new Reference(this.authWrapper_, url);\n }\n\n get maxUploadRetryTime(): number {\n return this.authWrapper_.maxUploadRetryTime();\n }\n\n setMaxUploadRetryTime(time: number) {\n args.validate(\n 'setMaxUploadRetryTime',\n [args.nonNegativeNumberSpec()],\n arguments\n );\n this.authWrapper_.setMaxUploadRetryTime(time);\n }\n\n get maxOperationRetryTime(): number {\n return this.authWrapper_.maxOperationRetryTime();\n }\n\n setMaxOperationRetryTime(time: number) {\n args.validate(\n 'setMaxOperationRetryTime',\n [args.nonNegativeNumberSpec()],\n arguments\n );\n this.authWrapper_.setMaxOperationRetryTime(time);\n }\n\n get app(): FirebaseApp {\n return this.app_;\n }\n\n get INTERNAL(): ServiceInternals {\n return this.internals_;\n }\n}\n\n/**\n * @struct\n */\nexport class ServiceInternals {\n service_: Service;\n\n constructor(service: Service) {\n this.service_ = service;\n }\n\n /**\n * Called when the associated app is deleted.\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\n */\n delete(): Promise {\n this.service_.authWrapper_.deleteApp();\n return fbsPromiseImpl.resolve(undefined);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/storage/service.ts"]} \ No newline at end of file +{"version":3,"sources":["webpack:///firebase-app.js","webpack:/webpack/bootstrap 6be335cb5a7765bfd560","webpack:///util/dist/cjs/index.js","webpack:///app/dist/esm/src/firebaseApp.js","webpack:///app/dist/esm/index.js","webpack:///(webpack)/buildin/global.js","webpack:///util/dist/cjs/src/constants.js","webpack:///Users/jshcrowthe/Repos/firebase-js-sdk/node_modules/process/browser.js","webpack:///util/dist/cjs/src/assert.js","webpack:///util/dist/cjs/src/crypt.js","webpack:///util/dist/cjs/src/json.js","webpack:///util/dist/cjs/src/obj.js","webpack:///app/index.js","webpack:///polyfill/dist/esm/index.js","webpack:///polyfill/dist/esm/src/polyfills/promise.js","webpack:///Users/jshcrowthe/Repos/firebase-js-sdk/node_modules/promise-polyfill/promise.js","webpack:///Users/jshcrowthe/Repos/firebase-js-sdk/node_modules/node-libs-browser/node_modules/timers-browserify/main.js","webpack:///Users/jshcrowthe/Repos/firebase-js-sdk/node_modules/setimmediate/setImmediate.js","webpack:///polyfill/dist/esm/src/shims/find.js","webpack:///polyfill/dist/esm/src/shims/findIndex.js","webpack:///util/dist/cjs/src/deepCopy.js","webpack:///util/dist/cjs/src/deferred.js","webpack:///util/dist/cjs/src/environment.js","webpack:///util/dist/cjs/src/errors.js","webpack:///util/dist/cjs/src/jwt.js","webpack:///util/dist/cjs/src/query.js","webpack:///util/dist/cjs/src/sha1.js","webpack:///util/dist/cjs/src/hash.js","webpack:///util/dist/cjs/src/subscribe.js","webpack:///util/dist/cjs/src/validation.js","webpack:///util/dist/cjs/src/utf8.js","webpack:///firebase-auth.js","webpack:///auth/index.js","webpack:///auth/dist/auth.js","webpack:///firebase-database.js","webpack:///database/dist/cjs/src/core/util/util.js","webpack:///database/dist/cjs/src/core/util/Path.js","webpack:///database/dist/cjs/src/core/snap/indexes/PriorityIndex.js","webpack:///database/dist/cjs/src/core/snap/ChildrenNode.js","webpack:///database/dist/cjs/src/core/snap/Node.js","webpack:///database/dist/cjs/src/core/util/validation.js","webpack:///database/dist/cjs/src/core/operation/Operation.js","webpack:///database/dist/cjs/src/core/view/Change.js","webpack:///database/dist/cjs/src/core/snap/indexes/KeyIndex.js","webpack:///database/dist/cjs/src/core/snap/nodeFromJSON.js","webpack:///database/dist/cjs/src/core/storage/storage.js","webpack:///database/dist/cjs/src/realtime/Constants.js","webpack:///database/dist/cjs/src/core/snap/indexes/Index.js","webpack:///database/dist/cjs/src/core/snap/LeafNode.js","webpack:///database/dist/cjs/src/core/util/SortedMap.js","webpack:///database/dist/cjs/src/core/Repo.js","webpack:///database/dist/cjs/src/core/view/CacheNode.js","webpack:///database/dist/cjs/src/api/Reference.js","webpack:///database/dist/cjs/src/api/DataSnapshot.js","webpack:///database/dist/cjs/src/core/util/ImmutableTree.js","webpack:///database/dist/cjs/src/core/view/filter/IndexedFilter.js","webpack:///database/dist/cjs/src/core/stats/StatsManager.js","webpack:///database/dist/cjs/src/core/RepoManager.js","webpack:///database/dist/cjs/src/api/Database.js","webpack:///database/dist/cjs/src/core/util/libs/parser.js","webpack:///database/dist/cjs/src/core/RepoInfo.js","webpack:///database/dist/cjs/src/api/onDisconnect.js","webpack:///database/dist/cjs/src/api/Query.js","webpack:///database/dist/cjs/src/core/snap/snap.js","webpack:///database/dist/cjs/src/core/snap/indexes/ValueIndex.js","webpack:///database/dist/cjs/src/core/snap/IndexMap.js","webpack:///database/dist/cjs/src/core/snap/childSet.js","webpack:///database/dist/cjs/src/core/snap/comparators.js","webpack:///database/dist/cjs/src/core/snap/indexes/PathIndex.js","webpack:///database/dist/cjs/src/core/util/ServerValues.js","webpack:///database/dist/cjs/src/core/SparseSnapshotTree.js","webpack:///database/dist/cjs/src/core/util/CountedSet.js","webpack:///database/dist/cjs/src/core/operation/Overwrite.js","webpack:///database/dist/cjs/src/core/SyncPoint.js","webpack:///database/dist/cjs/src/core/view/ViewCache.js","webpack:///database/dist/cjs/src/core/stats/StatsListener.js","webpack:///database/dist/cjs/src/core/PersistentConnection.js","webpack:///database/dist/cjs/src/core/util/EventEmitter.js","webpack:///database/dist/cjs/src/realtime/Connection.js","webpack:///database/dist/cjs/src/realtime/BrowserPollConnection.js","webpack:///database/dist/cjs/src/realtime/WebSocketConnection.js","webpack:///database/dist/cjs/src/core/ServerActions.js","webpack:///database/dist/cjs/src/core/view/filter/RangedFilter.js","webpack:///database/index.js","webpack:///database/dist/cjs/index.js","webpack:///database/dist/cjs/src/core/storage/DOMStorageWrapper.js","webpack:///database/dist/cjs/src/core/storage/MemoryStorage.js","webpack:///database/dist/cjs/src/api/TransactionResult.js","webpack:///database/dist/cjs/src/core/util/NextPushId.js","webpack:///database/dist/cjs/src/core/view/EventRegistration.js","webpack:///database/dist/cjs/src/core/view/Event.js","webpack:///database/dist/cjs/src/core/SyncTree.js","webpack:///database/dist/cjs/src/core/operation/AckUserWrite.js","webpack:///database/dist/cjs/src/core/operation/ListenComplete.js","webpack:///database/dist/cjs/src/core/operation/Merge.js","webpack:///database/dist/cjs/src/core/view/View.js","webpack:///database/dist/cjs/src/core/view/ViewProcessor.js","webpack:///database/dist/cjs/src/core/view/ChildChangeAccumulator.js","webpack:///database/dist/cjs/src/core/view/CompleteChildSource.js","webpack:///database/dist/cjs/src/core/view/EventGenerator.js","webpack:///database/dist/cjs/src/core/WriteTree.js","webpack:///database/dist/cjs/src/core/CompoundWrite.js","webpack:///database/dist/cjs/src/core/SnapshotHolder.js","webpack:///database/dist/cjs/src/core/AuthTokenProvider.js","webpack:///database/dist/cjs/src/core/stats/StatsCollection.js","webpack:///database/dist/cjs/src/core/stats/StatsReporter.js","webpack:///database/dist/cjs/src/core/view/EventQueue.js","webpack:///database/dist/cjs/src/core/util/VisibilityMonitor.js","webpack:///database/dist/cjs/src/core/util/OnlineMonitor.js","webpack:///database/dist/cjs/src/realtime/TransportManager.js","webpack:///database/dist/cjs/src/realtime/polling/PacketReceiver.js","webpack:///database/dist/cjs/src/core/ReadonlyRestClient.js","webpack:///database/dist/cjs/src/core/view/QueryParams.js","webpack:///database/dist/cjs/src/core/view/filter/LimitedFilter.js","webpack:///database/dist/cjs/src/core/Repo_transaction.js","webpack:///database/dist/cjs/src/core/util/Tree.js","webpack:///database/dist/cjs/src/api/internal.js","webpack:///database/dist/cjs/src/api/test_access.js","webpack:///firebase-messaging.js","webpack:///messaging/index.js","webpack:///messaging/dist/esm/src/helpers/array-buffer-to-base64.js","webpack:///messaging/dist/esm/index.js","webpack:///messaging/dist/esm/src/models/errors.js","webpack:///messaging/dist/esm/src/models/fcm-details.js","webpack:///messaging/dist/esm/src/models/token-manager.js","webpack:///messaging/dist/esm/src/controllers/controller-interface.js","webpack:///messaging/dist/esm/src/models/worker-page-message.js","webpack:///messaging/dist/esm/src/models/default-sw.js","webpack:///messaging/dist/esm/src/controllers/window-controller.js","webpack:///messaging/dist/esm/src/controllers/sw-controller.js","webpack:///firebase-storage.js","webpack:///storage/index.js","webpack:///storage/dist/esm/src/implementation/error.js","webpack:///storage/dist/esm/src/implementation/string.js","webpack:///storage/dist/esm/src/implementation/taskenums.js","webpack:///storage/dist/esm/src/implementation/object.js","webpack:///storage/dist/esm/src/implementation/promise_external.js","webpack:///storage/dist/esm/src/implementation/type.js","webpack:///storage/dist/esm/src/implementation/json.js","webpack:///storage/dist/esm/src/implementation/path.js","webpack:///storage/dist/esm/src/implementation/url.js","webpack:///storage/dist/esm/src/implementation/metadata.js","webpack:///storage/dist/esm/src/implementation/args.js","webpack:///storage/dist/esm/src/implementation/fs.js","webpack:///storage/dist/esm/src/implementation/array.js","webpack:///storage/dist/esm/src/implementation/requests.js","webpack:///storage/dist/esm/src/implementation/async.js","webpack:///storage/dist/esm/src/implementation/backoff.js","webpack:///storage/dist/esm/src/implementation/request.js","webpack:///storage/dist/esm/index.js","webpack:///storage/dist/esm/src/implementation/xhrio.js","webpack:///storage/dist/esm/src/implementation/constants.js","webpack:///storage/dist/esm/src/implementation/xhrio_network.js","webpack:///storage/dist/esm/src/implementation/xhriopool.js","webpack:///storage/dist/esm/src/implementation/location.js","webpack:///storage/dist/esm/src/implementation/blob.js","webpack:///storage/dist/esm/src/implementation/requestinfo.js","webpack:///storage/dist/esm/src/implementation/observer.js","webpack:///storage/dist/esm/src/tasksnapshot.js","webpack:///storage/dist/esm/src/task.js","webpack:///storage/dist/esm/src/reference.js","webpack:///storage/dist/esm/src/implementation/failrequest.js","webpack:///storage/dist/esm/src/implementation/requestmap.js","webpack:///storage/dist/esm/src/implementation/authwrapper.js","webpack:///storage/dist/esm/src/service.js"],"names":["firebase","window","self","modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","parentJsonpFunction","chunkIds","moreModules","executeModules","chunkId","result","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","shift","s","5","e","onScriptComplete","script","onerror","onload","clearTimeout","timeout","chunk","Error","undefined","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","createElement","type","charset","async","nc","setAttribute","src","p","setTimeout","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error","__export","value","__webpack_exports__","createFirebaseNamespace","removeApp","callAppHooks","apps_","app","DEFAULT_ENTRY_NAME","contains","initializeApp","options","firebaseApp_FirebaseAppImpl","namespace","getApps","keys","map","registerService","createService","serviceProperties","appHook","allowMultipleInstances","factories","appHooks","forEach","serviceNamespace","appArg","cjs","args","_i","arguments","this","_getService","bind","apply","extendNamespace","props","eventName","serviceName","factoryName","useAsService","useService","apps","SDK_VERSION","INTERNAL","createSubscribe","ErrorFactory","deepExtend","code","appErrors","create","obj","key","tokenListeners","FirebaseAppImpl","firebase_","isDeleted_","services_","name_","options_","getUid","getToken","addAuthTokenListener","callback","removeAuthTokenListener","filter","listener","checkDestroyed_","delete","_this","then","services","serviceKey","instanceKey","all","service","instanceIdentifier","instanceSpecifier","extendApp","log","errors","no-app","bad-app-name","duplicate-app","app-deleted","duplicate-service","sa-not-supported","invalid-app-argument","g","Function","eval","CONSTANTS","NODE_CLIENT","NODE_ADMIN","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","len","run","Item","array","noop","process","nextTick","Array","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","constants_1","assert","assertion","message","assertionError","stringToByteArray","str","output","charCodeAt","byteArrayToString","bytes","String","fromCharCode","slice","base64","y","b","_","ENCODED_VALS_BASE","ENCODED_VALS","ENCODED_VALS_WEBSAFE","HAS_NATIVE_SUPPORT","atob","encodeByteArray","input","opt_webSafe","isArray","init_","byteToCharMap","byteToCharMapWebSafe_","byteToCharMap_","byte1","haveByte2","byte2","haveByte3","byte3","outByte1","outByte2","outByte3","outByte4","join","encodeString","btoa","decodeString","decodeStringToByteArray","charToByteMap","charToByteMapWebSafe_","charToByteMap_","charAt","haveByte4","byte4","O","base64Encode","utf8Bytes","base64Decode","jsonEval","JSON","parse","stringify","data","safeGet","fn","extend","objTo","objFrom","clone","isNonNullObject","isEmpty","getCount","rv","f","opt_obj","res","findKey","opt_this","findValue","getAnyKey","getValues","every","default","__WEBPACK_IMPORTED_MODULE_0__src_polyfills_promise__","__WEBPACK_IMPORTED_MODULE_1__src_shims_find__","__WEBPACK_IMPORTED_MODULE_2__src_shims_findIndex__","global","__global","setImmediate","root","thisArg","TypeError","_state","_handled","_value","_deferreds","doResolve","handle","deferred","_immediateFn","cb","onFulfilled","onRejected","ret","newValue","finale","_unhandledRejectionFn","Handler","done","reason","ex","setTimeoutFunc","prom","arr","val","remaining","constructor","race","values","warn","_setImmediateFn","_setUnhandledRejectionFn","Timeout","id","clearFn","_id","_clearFn","setInterval","clearInterval","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","task","tasksByHandle","nextHandle","registerImmediate","runIfPresent","currentlyRunningATask","doc","attachTo","getPrototypeOf","toString","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","messagePrefix","Math","random","onGlobalMessage","event","source","indexOf","addEventListener","attachEvent","MessageChannel","channel","port1","port2","html","documentElement","onreadystatechange","removeChild","find","predicate","k","kValue","findIndex","deepCopy","target","Date","dateValue","getTime","prop","patchProperty","Deferred","wrapCallback","catch","getUA","navigator","isMobileCordova","test","isReactNative","isNodeSdk","patchCapture","captureFake","captureStackTrace","ERROR_NAME","FirebaseError","err_1","stack","pattern","template","fullCode","replace","match","crypt_1","json_1","decode","token","header","claims","signature","parts","split","isValidTimestamp","validSince","validUntil","now","floor","issuedAtTime","isValidFormat","decoded","isAdmin","obj_1","querystring","querystringParams","params","arrayVal","encodeURIComponent","querystringDecode","__extends","extendStatics","setPrototypeOf","__proto__","__","hash_1","Sha1","_super","chain_","buf_","W_","pad_","inbuf_","total_","blockSize","reset","compress_","buf","opt_offset","W","t","a","update","opt_length","lengthMinusBlock","inbuf","digest","totalBits","j","Hash","executor","onNoObservers","proxy","ObserverProxy","subscribe","onError","implementsAnyMethods","methods","methods_1","method","observers","unsubscribes","observerCount","finalized","next","forEachObserver","observer","complete","nextOrObserver","unsub","unsubscribeOne","finalError","sendOne","errorPrefix","fnName","argumentNumber","optional","argName","validateNamespace","validateCallback","validateContextObject","context","validateArgCount","minCount","maxCount","argCount","argError","assert_1","out","high","stringLength","webpackJsonpFirebase","76","77","ba","ca","da","splice","propertyIsEnumerable","ea","fa","ha","q","ka","la","unshift","r","ma","ib","Nc","u","oa","qa","ra","sa","ta","ua","va","wa","xa","v","ya","za","Aa","Ca","Fa","Ga","Ha","Ba","Ia","Ja","Ka","La","x","Ma","Pa","Qa","Ra","Sa","Ta","Ua","Wa","Va","Xa","Ya","Za","eb","documentMode","jb","pa","fb","max","exec","parseInt","mb","$goog_Thenable","nb","ob","pb","sb","tb","qb","vb","xb","style","display","contentWindow","open","write","location","protocol","host","origin","parentNode","yb","zb","Ab","Bb","rb","set","Cb","Window","wb","z","Db","h","Eb","Fb","Gb","Hb","Ib","Kb","Jb","A","B","Lb","Mb","Nb","Ob","Qb","Rb","Sb","Tb","Ub","Vb","Pb","D","wc","xc","Wb","Xb","Yb","Zb","ac","bc","cc","dc","ec","fc","gc","hc","ic","jc","kc","lc","mc","pc","ja","oc","qc","rc","tc","uc","vc","getElementById","cssText","className","htmlFor","yc","lastIndexOf","zc","$b","Ac","createTextNode","nodeType","w","Bc","Cc","Dc","Ec","Number","Boolean","Fc","valueOf","isFinite","isNaN","Hc","Gc","substr","Ic","Jc","Kc","ia","Lc","C","Qc","relatedTarget","button","screenY","screenX","clientY","clientX","metaKey","shiftKey","altKey","ctrlKey","pointerId","pointerType","changedTouches","srcElement","nodeName","fromElement","toElement","pageX","pageY","Rc","defaultPrevented","Uc","capture","Tc","Vc","Wc","Xc","Yc","Zc","cd","dd","ed","Sc","fd","gd","hd","$c","Pc","jd","bd","kd","ld","E","md","removeEventListener","detachEvent","ad","nd","od","keyCode","returnValue","pd","handleEvent","F","G","qd","rd","sd","td","vd","wd","Ad","Dd","Cd","Bd","yd","Ed","S","P","Fd","Gd","H","zd","Hd","Da","Kd","Ld","Jd","Md","Id","Nd","Qd","Rd","Pd","Sd","Td","Ud","Vd","Ea","Wd","Xd","Od","Yd","Zd","$d","Uint8Array","Int32Array","ae","be","ge","ub","sc","yj","he","ie","je","ke","le","me","substring","decodeURIComponent","pe","qe","re","se","te","ne","ue","Ae","ve","Be","I","Ce","De","Ee","decodeURI","encodeURI","Fe","Ge","He","Ie","Je","Ke","Le","Me","toLowerCase","Ne","Oe","Qe","Re","XMLHttpRequest","ActiveXObject","Se","headers","Te","N","Ye","toUpperCase","Pe","J","Ze","$e","FormData","Xe","setRequestHeader","responseType","withCredentials","af","bf","ontimeout","send","abort","cf","df","ef","aa","ff","gf","We","statusText","xd","readyState","status","hf","responseText","kf","lf","mf","nf","of","Oc","pf","attributes","qf","tagName","rf","sf","XDomainRequest","responseXML","onprogress","tf","uf","kb","vf","href","wf","xf","yf","zf","Af","Bf","Cf","Df","screen","availHeight","availWidth","width","height","top","left","resizable","statusbar","toolbar","Ef","scrollbars","standalone","noreferrer","createEvent","initMouseEvent","dispatchEvent","bb","opener","focus","Ff","closed","Hf","If","Jf","Kf","Lf","K","Mf","Of","Nf","sort","userAgent","L","Pf","localStorage","Qf","setItem","removeItem","indexedDB","Rf","Sf","Tf","Uf","Vf","Wf","Xf","Yf","___jsl","CP","Zf","onLine","connection","$f","ag","visibilityState","bg","cg","toUTCString","M","eg","gg","hg","ig","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","zg","Ag","Bg","Cg","Dg","Eg","Fg","continueUrl","canHandleCodeInApp","androidPackageName","androidMinimumVersion","androidInstallApp","iOSBundleId","Gg","sub","na","provider_id","sign_in_provider","Hg","iss","aud","exp","Lg","Kg","Na","Mg","Ng","Og","Pg","Qg","Rg","Sg","Tg","Ug","isNewUser","rawUserInfo","providerId","profile","login","screenName","Vg","Wg","idToken","accessToken","oauthToken","oauthTokenSecret","Yg","id_token","access_token","secret","oauth_token_secret","postBody","requestUri","ah","isOAuthProvider","Jg","bh","ch","credential","dh","eh","fh","gh","hh","Ig","ih","jh","mh","nh","Oa","Y","oh","temporaryProof","phoneNumber","sessionInfo","rh","auth","th","uh","oauthAccessToken","oauthIdToken","vh","wh","xh","eventId","urlResponse","sessionId","yh","zh","Ah","email","Bh","Ch","node","secureTokenEndpoint","secureTokenTimeout","Dh","secureTokenHeaders","Eh","firebaseEndpoint","firebaseTimeout","Fh","firebaseHeaders","Gh","Ih","Jh","Kh","Hh","Lh","gapi","client","request","Nh","Mh","Oh","grant_type","refresh_token","Ph","Qh","Rh","jf","Sh","Th","Q","Uh","identifier","continueUri","allProviders","Vh","Wh","authorizedDomains","Xh","Yh","sh","di","fi","gi","deleteProvider","hi","ii","needConfirmation","errorMessage","Xg","returnIdpCredential","ji","Zg","ki","$g","autoCreate","li","mi","oobCode","T","returnSecureToken","endpoint","ga","keyInvalid","ipRefererBlocked","INVALID_CUSTOM_TOKEN","CREDENTIAL_MISMATCH","MISSING_CUSTOM_TOKEN","INVALID_IDENTIFIER","MISSING_CONTINUE_URI","INVALID_EMAIL","INVALID_PASSWORD","USER_DISABLED","MISSING_PASSWORD","EMAIL_EXISTS","PASSWORD_LOGIN_DISABLED","INVALID_IDP_RESPONSE","FEDERATED_USER_ID_ALREADY_LINKED","INVALID_MESSAGE_PAYLOAD","INVALID_RECIPIENT_EMAIL","INVALID_SENDER","EMAIL_NOT_FOUND","EXPIRED_OOB_CODE","INVALID_OOB_CODE","MISSING_OOB_CODE","CREDENTIAL_TOO_OLD_LOGIN_AGAIN","INVALID_ID_TOKEN","TOKEN_EXPIRED","USER_NOT_FOUND","CORS_UNSUPPORTED","DYNAMIC_LINK_NOT_ACTIVATED","INVALID_APP_ID","TOO_MANY_ATTEMPTS_TRY_LATER","WEAK_PASSWORD","OPERATION_NOT_ALLOWED","USER_CANCELLED","CAPTCHA_CHECK_FAILED","INVALID_APP_CREDENTIAL","INVALID_CODE","INVALID_PHONE_NUMBER","INVALID_SESSION_INFO","INVALID_TEMPORARY_PROOF","MISSING_APP_CREDENTIAL","MISSING_CODE","MISSING_PHONE_NUMBER","MISSING_SESSION_INFO","QUOTA_EXCEEDED","SESSION_EXPIRED","INVALID_CONTINUE_URI","MISSING_ANDROID_PACKAGE_NAME","MISSING_IOS_BUNDLE_ID","UNAUTHORIZED_DOMAIN","INVALID_OAUTH_CLIENT_ID","INVALID_CERT_HASH","wi","vi","ab","yi","zi","Ai","where","body","url","messageHandlersFilter","position","dontclear","restyle","setHideOnLeave","Bi","ping","Ci","Di","register","Gi","Fi","Ei","Hi","Ii","Ji","Ki","Li","Gf","RegExp","Mi","Ni","Pi","Qi","authEvent","Oi","webStorageSupport","Ri","reactNative","AsyncStorage","Si","Ti","Vi","errorCode","onupgradeneeded","createObjectStore","keyPath","onsuccess","Wi","Xi","objectStore","Yi","transaction","Zi","$i","cancel","aj","bj","cj","dj","ej","sessionStorage","fj","Browser","gj","Node","hj","ReactNative","ij","lj","kj","mj","jj","Ui","oj","nj","pj","qj","rj","X","sj","getItem","tj","uj","vj","wj","xj","oldValue","zj","Bj","Aj","Cj","Dj","Ej","Fj","Gj","fe","Ij","ibi","apn","appDisplayName","Kj","Hj","Lj","Jj","handleOpenURL","Mj","Oj","Nj","Pj","Qj","Rj","Sj","Tj","unknown","signInViaRedirect","linkViaRedirect","reauthViaRedirect","signInViaPopup","linkViaPopup","reauthViaPopup","Uj","xi","Vj","Wj","Xj","Yj","bk","dk","ck","ek","fk","gk","hk","user","ik","ak","jk","kk","lk","mk","ok","nk","pk","qk","rk","refreshToken","sk","expiresIn","tk","expires_in","expirationTime","uk","lastSignInTime","creationTime","vk","wk","uid","displayName","photoURL","xk","yk","apiKey","appName","authDomain","zk","Ak","Bk","U","R","Ck","V","Dk","Ek","Fk","Gk","start","Hk","Ik","Jk","Kk","emailVerified","isAnonymous","metadata","createdAt","lastLoginAt","providerData","Lk","Mk","Nk","Ok","Pk","Qk","Rk","Sk","Tk","Uk","si","Vk","providerUserInfo","rawId","photoUrl","Xk","Wk","additionalUserInfo","operationType","Yk","reload","Zk","$k","al","Z","bl","cl","dl","el","stsTokenManager","redirectEventId","fl","gl","hl","il","jl","ll","ml","nl","kl","ol","pl","ql","rl","sl","tl","ul","vl","logFramework","wl","xl","yl","$","zl","Al","Bl","Cl","Dl","currentUser","Fl","_lat","El","Gl","Hl","Il","Jl","Kl","Ll","Element","Ml","Nl","App","Ol","Pl","Ql","verify","Rl","theme","Sl","Tl","hasChildNodes","Ul","Vl","Wl","Xl","Yl","am","cm","grecaptcha","Infinity","Zl","render","bm","$l","dm","em","fm","gm","trim","some","$a","db","gb","hb","parseFloat","lb","compatMode","cellpadding","cellspacing","colspan","frameborder","maxlength","nonce","role","rowspan","usemap","valign","\"","\\","/","\b","\f","\n","\r","\t","\u000b","Mc","freeze","2","3","4","preventDefault","ud","timeStamp","msWriteProfilerMark","clear","ce","de","ee","we","xe","ye","ze","Ue","Ve","getResponse","response","mozResponseArrayBuffer","getResponseHeader","contentType","getAllResponseHeaders","dg","fg","abcd","toJSON","argument-error","app-not-authorized","app-not-installed","captcha-check-failed","code-expired","cordova-not-ready","cors-unsupported","credential-already-in-use","custom-token-mismatch","requires-recent-login","dynamic-link-not-activated","email-already-in-use","expired-action-code","cancelled-popup-request","internal-error","invalid-app-credential","invalid-app-id","invalid-user-token","invalid-auth-event","invalid-verification-code","invalid-continue-uri","invalid-cordova-configuration","invalid-custom-token","invalid-email","invalid-api-key","invalid-cert-hash","invalid-credential","invalid-persistence-type","invalid-message-payload","invalid-oauth-provider","invalid-oauth-client-id","unauthorized-domain","invalid-action-code","wrong-password","invalid-phone-number","invalid-recipient-email","invalid-sender","invalid-verification-id","missing-android-pkg-name","auth-domain-config-required","missing-app-credential","missing-verification-code","missing-continue-uri","missing-iframe-start","missing-ios-bundle-id","missing-phone-number","missing-verification-id","account-exists-with-different-credential","network-request-failed","no-auth-event","no-such-provider","operation-not-allowed","operation-not-supported-in-this-environment","popup-blocked","popup-closed-by-user","provider-already-linked","quota-exceeded","redirect-cancelled-by-user","redirect-operation-pending","user-token-expired","too-many-requests","unauthorized-continue-uri","unsupported-persistence-type","user-cancelled","user-not-found","user-disabled","user-mismatch","user-signed-out","weak-password","web-storage-unsupported","kh","password","lh","PROVIDER_ID","ph","operation","qh","verificationId","verificationCode","recaptchaToken","Content-Type","setApiKey","setToken","path","authType","Zh","$h","ai","deleteAttribute","requestType","bi","ci","ei","ni","newPassword","oi","pi","qi","ri","ti","recaptchaSiteKey","ui","put","add","getAll","openCursor","NONE","unsubscribe","Zj","confirm","users","localId","passwordHash","languages","language","userLanguage","execute","firstChild","Persistence","LOCAL","SESSION","Auth","User","util_1","util_2","util_3","util_4","util_5","util_6","storage_1","util_7","LUIDGenerator","sha1","sha1Bytes","buildLogMessage_","var_args","logger","firstLog_","enableLogging","logger_","persistent","SessionStorage","remove","logWrapper","prefix","fatal","warnIfPageIsSecure","warnAboutUnsupportedMethod","methodName","isInvalidJSONNumber","POSITIVE_INFINITY","NEGATIVE_INFINITY","executeWhenDOMReady","called_1","wrappedFn_1","MIN_NAME","MAX_NAME","nameCompare","aAsInt","tryParseInt","bAsInt","stringCompare","requireKey","ObjectToUniqueKey","splitStringBySize","segsize","dataSegs","each","bindCallback","doubleToIEEE754String","ln","bits","abs","pow","min","LN2","round","reverse","hexByteString","hexByte","isChromeExtensionContentScript","isWindowsStoreApp","Windows","UI","errorForServerCode","query","INTEGER_REGEXP_","intVal","exceptionGuard","callUserCallback","beingCrawled","search","exportPropGetter","fnGet","setTimeoutNonBlocking","time","Path","pathOrString","pieceNum","pieces_","copyTo","pieceNum_","getFront","getLength","popFront","getBack","pathString","toUrlEncodedString","begin","parent","pieces","child","childPathObj","childPieces","relativePath","outerPath","innerPath","outer","inner","comparePaths","right","leftKeys","rightKeys","cmp","equals","other","ValidationPath","errorPrefix_","parts_","byteLength_","checkValid_","pop","last","MAX_PATH_LENGTH_BYTES","MAX_PATH_DEPTH","toErrorString","setNodeFromJSON","nodeFromJSON","setMaxNode","MAX_NODE","Index_1","Node_1","LeafNode_1","PriorityIndex","compare","aPriority","getPriority","bPriority","indexCmp","compareTo","isDefinedOn","indexedValueChanged","oldNode","newNode","minPost","NamedNode","MIN","maxPost","LeafNode","makePost","indexValue","priorityNode","Index","PRIORITY_INDEX","EMPTY_NODE","SortedMap_1","snap_1","PriorityIndex_1","KeyIndex_1","IndexMap_1","comparators_1","ChildrenNode","children_","priorityNode_","indexMap_","lazyHash_","validatePriorityNode","SortedMap","NAME_COMPARATOR","IndexMap","Default","isLeafNode","updatePriority","newPriorityNode","getImmediateChild","childName","getChild","front","hasChild","updateImmediateChild","newChildNode","namedNode","newChildren","newIndexMap","newPriority","removeFromIndexes","insert","addToIndexes","updateChild","newImmediateChild","numChildren","count","exportFormat","numKeys","maxKey","allIntegerKeys","forEachChild","childNode","hash","toHash_1","priorityHashText","childHash","getPredecessorChildName","index","idx","resolveIndex_","predecessor","getPredecessorKey","getFirstChildName","indexDefinition","minKey","getFirstChild","getLastChildName","getLastChild","action","inorderTraversal","wrappedNode","getIterator","getIteratorFrom","startPost","iterator","Wrap","peek","getNext","getReverseIterator","getReverseIteratorFrom","endPost","withIndex","KEY_INDEX","hasIndex","addIndex","isIndexed","otherChildrenNode","thisIter","otherIter","thisCurrent","otherCurrent","MaxNode","defineProperties","MAX","KeyIndex","__EMPTY_NODE","__childrenNodeConstructor","Path_1","INVALID_KEY_REGEX_","INVALID_PATH_REGEX_","MAX_LEAF_SIZE_","isValidKey","isValidPathString","isValidRootPathString","isValidPriority","priority","validateFirebaseDataArg","validateFirebaseData","path_","hasDotValue_1","hasActualChild_1","validateFirebaseMergePaths","mergePaths","curPath","prevPath","validateFirebaseMergeDataArg","validatePriority","validateEventType","eventType","validateKey","validatePathString","validateRootPathString","validateWritablePath","validateUrl","parsedUrl","repoInfo","validateCredential","cred","validateBoolean","bool","validateString","string","validateObject","validateObjectContainsKey","opt_type","OperationType","OperationSource","fromUser","fromServer","queryId","tagged","Server","forServerTaggedQuery","Change","snapshotNode","oldSnap","prevName","valueChange","snapshot","VALUE","childAddedChange","childKey","CHILD_ADDED","childRemovedChange","CHILD_REMOVED","childChangedChange","newSnapshot","oldSnapshot","CHILD_CHANGED","childMovedChange","CHILD_MOVED","json","ChildrenNode_1","jsonLeaf","USE_HINZE","node_1","jsonObj_1","childData","children_1","childrenHavePriority_1","hinzeJsonObj_1","childSet","childSet_1","buildChildSet","NAME_ONLY_COMPARATOR","sortedChildSet","getCompare",".priority","DOMStorageWrapper_1","MemoryStorage_1","createStoragefor","domStorageName","domStorage","DOMStorageWrapper","MemoryStorage","PersistentStorage","PROTOCOL_VERSION","VERSION_PARAM","TRANSPORT_SESSION_PARAM","REFERER_PARAM","FORGE_REF","FORGE_DOMAIN","LAST_SESSION_PARAM","WEBSOCKET","LONG_POLLING","oldWrapped","newWrapped","value_",".value","getValue","toHash","compareToLeafNode_","otherLeaf","otherLeafType","thisLeafType","otherIndex","VALUE_TYPE_ORDER","thisIndex","SortedMapIterator","startKey","comparator","isReverse_","resultGenerator_","nodeStack_","hasNext","LLRBNode","color","RED","copy","reverseTraversal","min_","fixUp_","removeMin_","isRed_","moveRedLeft_","smallest","rotateRight_","moveRedRight_","rotateLeft_","colorFlip_","nr","checkMaxDepth_","blackDepth","check_","BLACK","LLRBEmptyNode","comparator_","root_","rightParent","resultGenerator","ServerValues_1","nodeFromJSON_1","SparseSnapshotTree_1","SyncTree_1","SnapshotHolder_1","AuthTokenProvider_1","StatsManager_1","StatsReporter_1","StatsListener_1","EventQueue_1","PersistentConnection_1","ReadonlyRestClient_1","Database_1","Repo","repoInfo_","forceRestClient","dataUpdateCount","statsListener_","eventQueue_","EventQueue","nextWriteId_","interceptServerDataCallback_","onDisconnect_","SparseSnapshotTree","persistentConnection_","authTokenProvider","AuthTokenProvider","stats_","StatsManager","getCollection","server_","ReadonlyRestClient","onDataUpdate_","onConnectStatus_","authOverride","PersistentConnection","onServerInfoUpdate_","addTokenChangeListener","refreshAuthToken","statsReporter_","getOrCreateReporter","StatsReporter","transactions_init_","infoData_","SnapshotHolder","infoSyncTree_","SyncTree","startListening","tag","currentHashFn","onComplete","infoEvents","getNode","applyServerOverwrite","stopListening","updateInfo_","serverSyncTree_","listen","events","raiseEventsForChangedPath","unlisten","secure","serverTime","offsetNode","offset","generateServerValues","generateWithValues","timestamp","isMerge","taggedChildren","raw","applyTaggedQueryMerge","taggedSnap","applyTaggedQueryOverwrite","changedChildren","applyServerMerge","snap","affectedPath","rerunTransactions_","interceptServerData_","connectStatus","runOnDisconnectEvents_","updates","updateSnapshot","getNextWriteId_","setWithPriority","newVal","log_","serverValues","newNodeUnresolved","resolveDeferredValueSnapshot","writeId","applyUserOverwrite","queueEvents","errorReason","success","clearEvents","ackUserWrite","callOnCompleteCallback","abortTransactions_","childrenToMerge","empty","changedKey","changedValue","writeId_1","applyUserMerge","merge","changedPath","resolvedOnDisconnectTree","resolveDeferredValueTree","forEachTree","Empty","onDisconnectCancel","forget","onDisconnectSet","onDisconnectPut","remember","onDisconnectSetWithPriority","onDisconnectUpdate","onDisconnectMerge","addEventCallbackForQuery","eventRegistration","addEventRegistration","raiseEventsAtPath","removeEventCallbackForQuery","removeEventRegistration","interrupt","resume","stats","showDelta","StatsListener","longestName","reduce","previousValue","currentValue","stat","statsIncrementCounter","metric","incrementCounter","includeStat","__database","Database","CacheNode","node_","fullyInitialized_","filtered_","isFullyInitialized","isFiltered","isCompleteForPath","isCompleteForChild","onDisconnect_1","TransactionResult_1","NextPushId_1","Query_1","Repo_1","QueryParams_1","validation_1","SyncPoint_1","Reference","repo","QueryParams","DEFAULT","getKey","getParent","parentPath","getRoot","databaseProp","database","objectToMerge","newObjectToMerge","transactionUpdate","applyLocally","promiseComplete","committed","TransactionResult","startTransaction","setPriority","nextPushId","thennablePushRef","pushRef","onDisconnect","OnDisconnect","Query","__referenceConstructor","SyncPoint","DataSnapshot","ref_","index_","exportVal","exists","childPathString","childPath","childRef","hasChildren","getRef","emptyChildrenSingleton","EmptyChildren","ImmutableTree","children","fromObject","tree","childSnap","findRootMostMatchingPathAndValue","childExistingPathAndValue","findRootMostValueAndPath","subtree","childTree","toSet","newChild","setTree","newTree","fold","fold_","pathSoFar","accum","findOnPath","findOnPath_","pathToFollow","nextChild","foreachOnPath","foreachOnPath_","currentRelativePath","foreach","foreach_","foreachChild","Change_1","IndexedFilter","optChangeAccumulator","oldChild","trackChildChange","updateFullNode","newSnap","filtersNodes","getIndexedFilter","getIndex","StatsCollection_1","hashString","collections_","StatsCollection","creatorFunction","reporters_","parser_1","_staticInstance","RepoManager","repos_","useRestClient_","getInstance","dbUrl","databaseFromApp","parseRepoInfo","createRepo","deleteRepo","appRepos","toURLString","Reference_1","RepoManager_1","repo_","DatabaseInternals","checkDeleted_","refFromURL","apiName","parsedURL","goOffline","goOnline","ServerValue","TIMESTAMP",".sv","decodePath","pathStringDecoded","piece","RepoInfo_1","dataURL","parseURL","subdomain","domain","webSocketOnly","scheme","RepoInfo","port","colonInd","slashInd","Constants_1","persistenceKey","internalHost","needsQueryParam","isCacheableHost","isDemoHost","isCustomHost","updateHost","newHost","connectionURL","connURL","pairs","ValueIndex_1","PathIndex_1","EventRegistration_1","queryParams_","orderByCalled_","validateQueryEndpoints_","startNode","endNode","hasStart","getIndexStartValue","hasEnd","getIndexEndValue","tooManyArgsError","wrongArgTypeError","getIndexStartName","getIndexEndName","PathIndex","VALUE_INDEX","validateLimit_","hasLimit","hasAnchoredLimit","validateNoPreviousOrderByCall_","getQueryParams","cancelCallbackOrContext","getCancelAndContextArgs_","onValueEvent","callbacks","onChildEvent","cancelCallback","container","ValueEventRegistration","ChildEventRegistration","valueCallback","userCallback","cancelOrContext","firstCall","onceCallback","limitToFirst","limit","limitToLast","orderByChild","parsedPath","newParams","orderBy","orderByKey","orderByPriority","orderByValue","startAt","endAt","equalTo","queryObject","getQueryObject","queryIdentifier","isEqual","sameRepo","samePath","sameQueryIdentifier","ValueIndex","valueNode","_defaultIndexMap","fallbackObject","indexes_","indexSet_","indexKey","sortedMap","existingChildren","childList","sawIndexedValue","iter","newIndex","indexName","newIndexSet","newIndexes","indexedChildren","existingSnap","SortedMap_2","LOG_2","Base12Num","num","current_","mask","bits_","nextBitIsOne","keyFn","mapSortFn","buildBalancedTree","low","middle","base12","buildPennant","chunkSize","attachPennant","pennant","isOne","indexPath_","extractChild","aChild","bChild","resolveDeferredValue","resolvedTree","rawPri","leafNode","childrenNode","CountedSet_1","CountedSet","self_1","prefixPath","func","Operation_1","Overwrite","OVERWRITE","operationForChild","CacheNode_1","ViewCache_1","View_1","views_","applyOperation","writesCache","optCompleteServerCache","view","events_1","serverCache","serverCacheComplete","eventCache","calcCompleteEventCache","eventCacheComplete","calcCompleteEventChildren","viewCache","ViewCache","View","getInitialEvents","cancelError","removed","cancelEvents","hadCompleteView","hasCompleteView","viewQueryId","getQuery","loadsAllData","getQueryViews","getCompleteServerCache","viewForQuery","getCompleteView","viewExistsForQuery","eventCache_","serverCache_","updateEventSnap","eventSnap","filtered","updateServerSnap","serverSnap","getEventCache","getCompleteEventSnap","getServerCache","getCompleteServerSnap","collection_","last_","newStats","delta","app_1","VisibilityMonitor_1","OnlineMonitor_1","Connection_1","ServerActions_1","RECONNECT_MIN_DELAY","RECONNECT_MAX_DELAY_DEFAULT","authTokenProvider_","authOverride_","nextPersistentConnectionId_","interruptReasons_","listens_","outstandingPuts_","outstandingPutCount_","onDisconnectRequestQueue_","connected_","reconnectDelay_","maxReconnectDelay_","securityDebugCallback_","lastSessionId","establishConnectionTimer_","visible_","requestCBHash_","requestNumber_","realtime_","authToken_","forceTokenRefresh_","invalidAuthTokenCount_","firstConnection_","lastConnectionAttemptTime_","lastConnectionEstablishedTime_","scheduleConnect_","VisibilityMonitor","onVisible_","OnlineMonitor","onOnline_","sendRequest","onResponse","curReqNum","msg","isDefault","listenSpec","hashFn","sendListen_","req","payload","warnOnListenWarnings_","removeListen_","warnings","indexSpec","indexPath","tryAuth","reduceReconnectDelayIfAdminCredential_","token_1","authMethod","requestData","onAuthRevoked_","sendUnlisten_","queryObj","sendOnDisconnect_","putInternal","sendPut_","queued","reportStats","onDataMessage_","reqNum","onDataPush_","onListenRevoked_","onSecurityDebugPacket_","onReady_","handleTimestamp_","sendConnectStats_","restoreState_","establishConnection_","visible","online","onRealtimeDisconnect_","cancelSentTransactions_","shouldReconnect_","timeSinceLastConnectSucceeded","timeSinceLastConnectAttempt","reconnectDelay","onDataMessage_1","onReady_1","connId_1","nextConnectionId_","lastSessionId_1","canceled_1","connection_1","closeFn_1","sendRequestFn","forceRefresh","Connection","serverTimeOffset","normalizedPathString","statusCode","explanation","notifyForInvalidToken","queries","clientName","currentlyOnline","ServerActions","EventEmitter","allowedEvents_","listeners_","trigger","validateEventType_","eventData","getInitialEvent","et","TransportManager_1","onMessage_","onKill_","connectionCount","pendingDataMessages","state_","transportManager_","TransportManager","start_","conn","initialTransport","conn_","nextTransportId_","primaryResponsesRequired_","onMessageReceived","connReceiver_","onConnectionLost","disconnReceiver_","tx_","rx_","secondaryConn_","isHealthy_","healthyTimeout_ms","healthyTimeout_","bytesReceived","markConnectionHealthy","bytesSent","everConnected","onConnectionLost_","onSecondaryConnectionLost_","onPrimaryMessageReceived_","onSecondaryMessageReceived_","dataMsg","sendData_","tryCleanupConnection","connId","onSecondaryControl_","controlData","cmd","upgradeIfSecondaryHealthy_","secondaryResponsesRequired_","parsedData","layer","proceedWithUpgrade_","onControl_","onPrimaryResponse_","onHandshake_","onConnectionShutdown_","onReset_","sendPingOnPrimaryIfNecessary_","handshake","ts","onConnectionEstablished_","tryStartUpgrade_","upgradeTransport","startUpgrade_","onMessage","closeConnections_","PacketReceiver_1","FIREBASE_LONGPOLL_START_PARAM","FIREBASE_LONGPOLL_CLOSE_COMMAND","FIREBASE_LONGPOLL_COMMAND_CB_NAME","FIREBASE_LONGPOLL_DATA_CB_NAME","FIREBASE_LONGPOLL_ID_PARAM","FIREBASE_LONGPOLL_PW_PARAM","FIREBASE_LONGPOLL_SERIAL_PARAM","FIREBASE_LONGPOLL_CALLBACK_ID_PARAM","FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM","FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET","FIREBASE_LONGPOLL_DATA_PARAM","FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM","FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM","BrowserPollConnection","transportSessionId","everConnected_","urlFn","curSegmentNum","myPacketOrderer","PacketReceiver","isClosed_","connectTimeoutTimer_","onClosed_","scriptTagHolder","FirebaseIFrameScriptHolder","command","arg1","arg2","incrementIncomingBytes_","sendNewPolls","closeAfter","pN","handleResponse","urlParams","uniqueCallbackIdentifier","connectURL","addTag","startLongPoll","addDisconnectPingFrame","forceAllow","forceAllow_","forceDisallow","forceDisallow_","isAvailable","shutdown_","myDisconnFrame","dataStr","base64data","MAX_URL_DATA_SIZE","enqueueSegment","pw","commandCB","onMessageCB","outstandingRequests","pendingSegs","currentSerial","myIFrame","createIFrame_","iframeContents","iframe","contentDocument","alive","innerHTML","myID","myPW","theURL","nodeRestRequest","newRequest_","curDataString","theSeg","seg","addLongPollTag_","segnum","totalsegs","serial","doNewRequest","keepaliveTimeout","readyStateCB","loadCB","doNodeLongPoll","newScript_1","rstate","setWebSocketImpl","impl","WebSocketImpl","MozWebSocket","WebSocket","WebSocketConnection","keepaliveTimer","frames","totalFrames","connectionURL_","device","User-Agent","platform","mySock","onopen","onclose","handleIncomingFrame","isOldAndroid","oldAndroidRegex","oldAndroidMatch","previouslyFailed","isInMemoryStorage","appendFrame_","fullMess","jsonMess","handleNewFrameCount_","frameCount","extractFrameCount_","mess","resetKeepAlive","remainingData","sendString_","responsesRequiredToBeHealthy","healthyTimeout","IndexedFilter_1","RangedFilter","indexedFilter_","startPost_","getStartPost_","endPost_","getEndPost_","getStartPost","getEndPost","matches","startName","endName","registerDatabase","instance","unused","TEST_ACCESS","DataSnapshot_1","domStorage_","prefix_","prefixedName_","storedVal","cache_","PUSH_CHARS","lastPushTime","lastRandChars","duplicateTime","timeStampChars","Event_1","callback_","cancelCallback_","context_","respondsTo","change","DataEvent","getEventRunner","ctx","getEventType","cancelCB_1","cb_1","createCancelEvent","CancelEvent","hasAnyCallback","callbacks_","eventToCheck","cancelCB_2","cb_2","otherCount","otherKey","thisKey","getPath","AckUserWrite_1","ImmutableTree_1","ListenComplete_1","Merge_1","Overwrite_1","WriteTree_1","listenProvider_","syncPointTree_","pendingWriteTree_","WriteTree","tagToQueryMap_","queryToTagMap_","newData","addOverwrite","applyOperationToSyncPoints_","addMerge","changeTree","Merge","revert","getWrite","removeWrite","affectedTree_1","AckUserWrite","applyListenComplete","ListenComplete","queryKey","queryKeyForTag_","parseQueryKey_","queryPath","op","applyTaggedOperation_","applyTaggedListenComplete","foundAncestorDefaultView","pathToSyncPoint","sp","syncPoint","childSyncPoint","completeCache","viewAlreadyExists","makeQueryKey_","getNextQueryTag_","childWrites","setupListener_","maybeSyncPoint","removedAndEvents","removingDefault","covered","parentSyncPoint","newViews","collectDistinctViewsForSubTree_","newQuery","createListenerForView_","queryForListening_","tagForQuery_","queryToRemove","tagToRemove","removeTags_","writeIdsToExclude","writeTree","maybeChildSyncPoint","childMap","views_1","childViews","removedQuery","removedQueryKey","removedQueryTag","queriesToStop","queries_1","childQueries","queryToStop","splitIndex","nextQueryTag_","applyOperationHelper_","syncPointTree","applyOperationDescendantsHelper_","childOperation","childServerCache","childWritesCache","affectedTree","ACK_USER_WRITE","LISTEN_COMPLETE","MERGE","ViewProcessor_1","EventGenerator_1","query_","initialViewCache","eventRegistrations_","indexFilter","getNodeFilter","processor_","ViewProcessor","initialServerCache","initialEventCache","newServerCache","newEventCache","viewCache_","eventGenerator_","EventGenerator","cache","path_1","registration","maybeEvent","existing","completeServerCache","oldViewCache","assertIndexed","generateEventsForChanges_","changes","initialChanges","registrations","generateEventsForChanges","ChildChangeAccumulator_1","CompleteChildSource_1","ProcessorResult","filter_","newViewCache","filterServerNode","accumulator","ChildChangeAccumulator","overwrite","applyUserOverwrite_","applyServerOverwrite_","applyUserMerge_","applyServerMerge_","revertUserWrite_","ackUserWrite_","listenComplete_","getChanges","maybeAddValueEvent_","isLeafOrEmpty","oldCompleteSnap","generateEventCacheAfterServerEvent_","changePath","oldEventSnap","shadowingWrite","serverNode","completeChildren","completeEventChildren","completeNode","oldEventNode","updatedPriority","calcEventCacheAfterServerOverwrite","childChangePath","newEventChild","eventChildUpdate","calcCompleteChild","changedSnap","oldServerSnap","serverFilter","newServerNode","NO_COMPLETE_CHILD_SOURCE","WriteTreeCompleteChildSource","getCompleteChild","newEventSnap","cacheHasChild_","curViewCache","writePath","applyMerge_","viewMergeTree","serverChild","childMergeTree","isUnknownDeepMerge","ackPath","changedChildren_1","changedChildren_2","mergePath","serverCachePath","oldServerNode","oldEventCache","serverChildren","changeMap_","oldChange","oldType","NoCompleteChildSource_","getChildAfterChild","writes_","optCompleteServerCache_","completeServerData","nodes","calcIndexedSlice","eventRegistrations","moves","generateEventsForType_","filteredChanges","compareChanges_","materializedChange","materializeSingleChange_","aWrapped","bWrapped","CompoundWrite_1","visibleWrites_","CompoundWrite","allWrites_","lastWriteId_","WriteTreeRef","addWrite","addWrites","record","writeToRemove","removedWriteWasVisible","removedWriteOverlapsWithOtherWrites","currentWrite","recordContainsPath_","resetTree_","getCompleteWriteData","getCompleteNode","treePath","includeHiddenWrites","childCompoundWrite","hasCompleteWrite","mergeAtPath","layerTree_","layeredCache","shadowingNode","subMerge","completeServerChildren","topLevelSet","merge_1","getCompleteChildren","existingEventSnap","existingServerSnap","childMerge","toIterate","writeRecord","DefaultFilter_","writes","treeRoot","compoundWrite","deepNode","treePath_","writeTree_","existingServerCache","rootmost","rootMostPath","newWrite","applySubtreeWrite_","priorityWrite_1","rootNode_","newSnapshotNode","app_","removeTokenChangeListener","counters_","amount","FIRST_STATS_MIN_TIME","FIRST_STATS_MAX_TIME","collection","statsToReport_","reportStats_","reportedStats","haveStatsToReport","eventLists_","recursionDepth_","eventDataList","currList","eventPath","EventList","raiseQueuedEventsMatchingPredicate_","sentAll","eventList","raise","events_","eventFn","EventEmitter_1","hidden","visibilityChange","online_","BrowserPollConnection_1","WebSocketConnection_1","initTransports_","isWebSocketsAvailable","isSkipPollConnection","transports_","transports_1","ALL_TRANSPORTS","transport","pendingResponses","currentResponseNum","closeAfterResponse","onClose","responseNum","requestNum","this_1","toProcess","getListenId_","listenId","thisListen","queryStringParamaters","toRestQueryStringParameters","restRequest_","status_1","queryStringParameters","authTokenData","authToken","xhr","LimitedFilter_1","RangedFilter_1","limitSet_","startSet_","startNameSet_","endSet_","endNameSet_","limit_","viewFrom_","indexStartValue_","indexStartName_","indexEndValue_","indexEndName_","isViewFromLeft","WIRE_PROTOCOL_CONSTANTS_","VIEW_FROM_LEFT","getLimit","copy_","newLimit","VIEW_FROM_RIGHT","WIRE_PROTOCOL_CONSTANTS","INDEX_START_VALUE","INDEX_START_NAME","INDEX_END_VALUE","INDEX_END_NAME","LIMIT","viewFrom","VIEW_FROM","INDEX","LimitedFilter","REST_CONSTANTS","REST_QUERY_CONSTANTS_","qs","ORDER_BY","START_AT","END_AT","LIMIT_TO_FIRST","LIMIT_TO_LAST","rangedFilter_","reverse_","fullLimitUpdateChild_","inRange","indexCompare_1","foundStartPost","changeAccumulator","indexCmp_1","newChildNamedNode","windowBoundary","oldChildSnap","compareNext","TransactionStatus","Tree_1","MAX_TRANSACTION_RETRIES_","transactionQueueTree_","Tree","watchRef","unwatcher","order","retryCount","abortReason","currentWriteId","currentInputSnapshot","currentOutputSnapshotRaw","currentOutputSnapshotResolved","currentState","getLatestState_","RUN","queueNode","subTree","nodeQueue","setValue","priorityForNode","sendReadyTransactions_","excludeSets","pruneCompletedTransactionsBelowNode_","buildTransactionQueue_","sendTransactionQueue_","setsToIgnore","txn","latestState","snapToSend","latestHash","SENT","dataToSend","pathToSend","COMPLETED","SENT_NEEDS_ABORT","NEEDS_ABORT","rootMostTransactionNode","getAncestorTransactionNode_","rerunTransactionQueue_","txnsToRerun","abortTransaction","currentNode","newDataNode","hasExplicitPriority","oldWriteId","newNodeResolved","lastInput","transactionNode","transactionQueue","aggregateTransactionQueuesForNode_","to","from","forEachAncestor","abortTransactionsOnNode_","forEachDescendant","lastSent","TreeNode","childCount","parent_","pathObj","updateParents_","includeSelf","childrenFirst","forEachImmediateDescendantWithValue","updateChild_","childEmpty","childExists","forceLongPolling","forceWebSockets","setSecurityDebugCallback","interceptServerData","DataConnection","simpleListen","echo","onEcho","RealTimeConnection","hijackHash","newHash","oldPut","opt_onComplete","opt_hash","ConnectionTarget","listens","firebaseRef","116","117","toBase64","arrayBuffer","uint8Version","registerMessaging","factoryMethod","sw_controller","window_controller","namespaceExports","Messaging","_a","CODES","AVAILABLE_IN_WINDOW","AVAILABLE_IN_SW","SHOULD_BE_INHERITED","BAD_SENDER_ID","INCORRECT_GCM_SENDER_ID","PERMISSION_DEFAULT","PERMISSION_BLOCKED","UNSUPPORTED_BROWSER","NOTIFICATIONS_BLOCKED","FAILED_DEFAULT_REGISTRATION","SW_REGISTRATION_EXPECTED","GET_SUBSCRIPTION_FAILED","INVALID_SAVED_TOKEN","SW_REG_REDUNDANT","TOKEN_SUBSCRIBE_FAILED","TOKEN_SUBSCRIBE_NO_TOKEN","TOKEN_SUBSCRIBE_NO_PUSH_SET","USE_SW_BEFORE_GET_TOKEN","INVALID_DELETE_TOKEN","DELETE_TOKEN_NOT_FOUND","DELETE_SCOPE_NOT_FOUND","BG_HANDLER_FUNCTION_EXPECTED","NO_WINDOW_CLIENT_TO_MSG","UNABLE_TO_RESUBSCRIBE","NO_FCM_TOKEN_FOR_RESUBSCRIBE","FAILED_TO_DELETE_TOKEN","NO_SW_IN_REG","BAD_SCOPE","BAD_VAPID_KEY","BAD_SUBSCRIPTION","BAD_TOKEN","BAD_PUSH_SET","FAILED_DELETE_VAPID_KEY","ERROR_MAP","codes","array_buffer_to_base64","FCM_APPLICATION_SERVER_KEY","SUBSCRIPTION_DETAILS","userVisibleOnly","applicationServerKey","fcm_details","ENDPOINT","APPLICATION_SERVER_KEY","SUBSCRIPTION_OPTIONS","FCM_TOKEN_OBJ_STORE","token_manager_TokenManager","TokenManager","errorFactory_","openDbPromise_","openDatabase_","DB_NAME","createIndex","unique","closeDatabase","getTokenDetailsFromToken","fcmToken","getTokenDetailsFromSWScope_","swScope","scopeRequest","getAllTokenDetailsForSenderId_","senderId","senderIdTokens","cursorRequest","cursor","continue","subscribeToFCM","subscription","pushSet","p256dh","fcmSubscribeBody","Headers","append","subscribeOptions","fetch","fcmTokenResponse","isSameSubscription_","masterTokenDetails","saveTokenDetails_","swRegistration","fcmPushSet","details","scope","fcmSenderId","getSavedToken","ServiceWorkerRegistration","allTokenDetails","tokenDetails","pushManager","getSubscription","createToken","fcmTokenDetails","deleteToken","token_manager","SENDER_ID_OPTION_NAME","controller_interface_ControllerInterface","ControllerInterface","messagingSenderId_","tokenManager_","currentPermission","getNotificationPermission_","notification_permission","getSWRegistration_","requestPermission","useServiceWorker","optError","optCompleted","onTokenRefresh","setBackgroundMessageHandler","Notification","permission","getTokenManager","controller_interface","PARAMS","TYPE_OF_MSG","DATA","msgType","PUSH_MSG_RECEIVED","NOTIFICATION_CLICKED","createNewMsg","msgData","worker_page_message","TYPES_OF_MSG","default_sw","window_controller_WindowController","WindowController","registrationToUse_","manifestCheckPromise_","messageObserver_","tokenRefreshObserver_","onTokenRefresh_","setupSWMessageListener_","isSupported_","manifestCheck_","manifestTag","querySelector","manifestContent","managePermissionResult","permissionPromise","waitForRegistrationToActivate_","serviceWorker","installing","waiting","state","stateChangeListener","browserErrorMessage","workerPageMessage","pushMessage","PushSubscription","sw_controller___extends","sw_controller_SWController","SWController","onPush_","onSubChange_","onNotificationClick_","bgMessageHandler_","msgPayload","handleMsgPromise","hasVisibleClients_","hasVisibleClients","notification","sendMessageToWindowClients_","notificationDetails","getNotificationData_","notificationTitle","showNotification","waitUntil","promiseChain","tokenManager","newSubscription","stopImmediatePropagation","clickAction","getWindowClient_","windowClient","clients","openWindow","internalMsg","attemptToMessageClient_","notificationInformation","assign","URL","matchAll","includeUncontrolled","clientList","suitableClient","esm","118","119","prependCode","FirebaseStorageError","Code","UNKNOWN","objectNotFound","OBJECT_NOT_FOUND","quotaExceeded","bucket","unauthenticated","UNAUTHENTICATED","unauthorized","UNAUTHORIZED","retryLimitExceeded","RETRY_LIMIT_EXCEEDED","error_canceled","CANCELED","invalidUrl","INVALID_URL","invalidDefaultBucket","INVALID_DEFAULT_BUCKET","cannotSliceBlob","CANNOT_SLICE_BLOB","serverFileWrongSize","SERVER_FILE_WRONG_SIZE","noDownloadURL","NO_DOWNLOAD_URL","invalidArgument","INVALID_ARGUMENT","invalidArgumentCount","argMin","argMax","real","countPart","plural","INVALID_ARGUMENT_COUNT","appDeleted","APP_DELETED","invalidRootOperation","INVALID_ROOT_OPERATION","invalidFormat","format","INVALID_FORMAT","internalError","INTERNAL_ERROR","formatValidator","stringFormat","StringFormat","RAW","BASE64","BASE64URL","DATA_URL","dataFromString","StringData","utf8Bytes_","base64Bytes_","dataURLBytes_","dataURLContentType_","valid","lo","percentEncodedBytes_","hasMinus","hasUnder","invalidChar","hasPlus","hasSlash","string_DataURLParts","rest","endsWith","end","taskStateFromInternalTaskState","InternalTaskState","RUNNING","PAUSING","CANCELING","TaskState","PAUSED","SUCCESS","ERROR","make","resolver","promise_external_resolve","promise_external_reject","isDef","isJustDef","isFunction","isObject","isNonArrayObject","isString","isNumber","isNativeBlob","isNativeBlobDefined","Blob","jsonObjectOrNull","path_parent","canonicalChildPath","component","lastComponent","makeNormalUrl","urlPart","domainBase","apiBaseUrl","makeDownloadUrl","downloadBase","makeUploadUrl","apiUploadBaseUrl","makeQueryString","encode","queryPart","nextPart","noXform_","xformPath","fullPath","getMappings","mappingsXformPath","xformSize","size","xformTokens","tokens","alt","mappings_","mappings","Mapping","nameMapping","xform","sizeMapping","addRef","authWrapper","generateRef","loc","location_Location","makeStorageReference","fromResource","resource","mapping","local","server","fromResourceString","resourceString","toResourceString","writable","metadataValidator","validate","specs","passed","minArgs","maxArgs","validator","and_","v1","v2","stringSpec","opt_validator","opt_optional","stringValidator","args_ArgSpec","uploadDataSpec","ArrayBuffer","metadataSpec","nonNegativeNumberSpec","looseObjectSpec","nullFunctionSpec","getBlobBuilder","BlobBuilder","WebKitBlobBuilder","getBlob","sliceBlob","blob","webkitSlice","mozSlice","array_contains","elem","array_clone","arraylike","handlerCheck","cndn","metadataHandler","handler","text","sharedErrorHandler","errorHandler","newErr","getStatus","setServerResponseProp","serverResponseProp","objectErrorHandler","shared","getMetadata","fullServerUrl","maxOperationRetryTime","requestInfo","RequestInfo","updateMetadata","deleteObject","successCodes","determineContentType_","metadataForUpload_","opt_metadata","multipartUpload","bucketOnlyServerUrl","X-Goog-Upload-Protocol","boundary","metadataString","preBlobPart","postBlobPart","blob_FbsBlob","maxUploadRetryTime","uploadData","checkResumeHeader_","opt_allowed","createResumableUpload","X-Goog-Upload-Command","X-Goog-Upload-Header-Content-Length","X-Goog-Upload-Header-Content-Type","getResumableUploadStatus","sizeString","ResumableUploadStatus","continueResumableUpload","opt_status","opt_progressCallback","uploadStatus","newCurrent","current","bytesToUpload","total","bytesLeft","startByte","endByte","uploadCommand","X-Goog-Upload-Offset","progressCallback","async_async","argsToForward","canceled","cancelState","triggerCallback","triggeredCallback","callWithDelay","millis","timeoutId","hitTimeout","waitSeconds","waitMillis","stop","wasTimeout","stopped","addAuthHeader_","addVersionHeader_","number","makeRequest","pool","request_NetworkRequest","additionalRetryCodes","factory","opt_url","service_Service","xhriopool_XhrIoPool","registerStorage","TaskEvent","Storage","reference_Reference","STORAGE_TYPE","ErrorCode","defaultMaxOperationRetryTime","defaultMaxUploadRetryTime","minSafeInteger","code_","message_","serverResponse_","codeProp","codeEquals","serverResponse","BUCKET_NOT_FOUND","PROJECT_NOT_FOUND","INVALID_CHECKSUM","INVALID_EVENT_NAME","NO_DEFAULT_BUCKET","opt_contentType","DataURLParts","STATE_CHANGED","xhrio_network_NetworkXhrIo","NetworkXhrIo","sent_","xhr_","errorCode_","NO_ERROR","sendPromise_","ABORT","NETWORK_ERROR","opt_body","opt_headers","getErrorCode","getResponseText","addUploadProgressListener","upload","removeUploadProgressListener","XhrIoPool","createXhrIo","Location","makeFromBucketSpec","bucketString","bucketLocation","makeFromUrl","gsModify","httpModify","gsRegex","gsIndices","httpRegex","httpIndices","groups","regex","indices","postModify","group","captures","bucketValue","pathValue","opt_local","opt_writable","opt_xform","ArgSpec","FbsBlob","opt_elideCopy","blobType","data_","byteLength","size_","type_","realBlob","sliced","buffer","blobby","uint8Arrays","finalLength_1","merged_1","index_1","observer_Observer","Observer","opt_error","opt_complete","UploadTaskSnapshot","bytesTransferred","totalBytes","urls","task_UploadTask","UploadTask","transferred_","needToFetchStatus_","needToFetchMetadata_","observers_","error_","uploadUrl_","request_","chunkMultiplier_","resolve_","reject_","authWrapper_","location_","blob_","metadata_","resumable_","shouldDoResumable_","errorHandler_","completeTransitions_","transition_","metadataErrorHandler_","promise_","makeProgressCallback_","sizeBefore","loaded","updateProgress_","createResumable_","fetchStatus_","fetchMetadata_","continueUpload_","oneShotUpload_","resolveToken_","getAuthToken","createRequest","getPromise","statusRequest","uploadRequest","newStatus","increaseMultiplier_","metadataRequest","multipartRequest","transferred","old","notifyObservers_","wasPaused","externalState","completed","typeValidator","_p","nextOrObserverValidator","nextValidator","observerValidator","nextOrObserverMessage","makeBinder","binder","addObserver_","removeObserver_","binderNextOrObserverValidator","binderSpecs","notifyObserver_","finishPromise_","triggered","pause","newRef","newPath","throwIfRoot_","putString","getDownloadURL","failrequest_FailRequest","FailRequest","appDelete","requestmap_RequestMap","RequestMap","map_","id_","addRequest","unmap","authwrapper_AuthWrapper","AuthWrapper","maker","requestMaker","bucket_","deleted_","extractBucket_","storageRefMaker_","requestMaker_","pool_","service_","maxOperationRetryTime_","maxUploadRetryTime_","requestMap_","config","_error","deleteApp","setMaxUploadRetryTime","setMaxOperationRetryTime","NetworkRequest","errorCallback","pendingXhr_","backoffId_","canceled_","appDelete_","url_","method_","headers_","body_","successCodes_","additionalRetryCodes_","errorCallback_","progressCallback_","timeout_","doTheRequest","backoffCallback","progressListener","progressEvent","lengthComputable","RequestEndStatus","hitServer","isRetryStatusCode_","wasCanceled","successCode","backoffDone","requestWentThrough","wasSuccessCode","isFiveHundredCode","extraRetryCodes","isExtraRetryCode","isRequestSpecificRetryCode","opt_canceled","Service","authWrapperBucket","internals_","service_ServiceInternals","ServiceInternals"],"mappings":";;;;;AAKA,GAAIA,UAAW,WACL,GAAIC,OAA2B,KAAXA,EAAyBC,KAAOD,CACtD,OAAgB,UAAUE,GCgClC,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EA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3pD,OAAAwC,eAAAkwH,EAAAzyH,UAAA,OACA0C,IAAA,WACA,MAAAwC,MAAAu3F,IAEAh6F,YAAA,EACAD,cAAA,IAEAzC,OAAAwC,eAAAkwH,EAAAzyH,UAAA,YACA0C,IAAA,WACA,MAAAwC,MAAAytH,IAEAlwH,YAAA,EACAD,cAAA,IAEAiwH,KAMAG,GAAA,WACA,QAAAC,GAAA/qH,GACA5C,KAAA6qH,GAAAjoH,EAUA,MAJA+qH,GAAA7yH,UAAAuH,OAAA,WAEA,MADArC,MAAA6qH,GAAA5E,EAAAkF,YACArW,MAAAl5G,KAEA+xH,If7IAxvH,GAAA,gBAAA2hH,EAyBA,IAAAI,IAAA,SAiBAJ,IAAAnQ,GAAA,YnBmoHG,MACO,MAAM3xG,GACN,KAAUrC,OACR","file":"firebase.js","sourcesContent":["/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\nvar firebase = (function() {\n var window = typeof window === 'undefined' ? self : window;\n return /******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonpFirebase\"];\n/******/ \twindow[\"webpackJsonpFirebase\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId]) {\n/******/ \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n/******/ \t\t\t}\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n/******/ \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n/******/ \t\twhile(resolves.length) {\n/******/ \t\t\tresolves.shift()();\n/******/ \t\t}\n/******/ \t\tif(executeModules) {\n/******/ \t\t\tfor(i=0; i < executeModules.length; i++) {\n/******/ \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\treturn result;\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// objects to store loaded and loading chunks\n/******/ \tvar installedChunks = {\n/******/ \t\t5: 0\n/******/ \t};\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/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\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.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId) {\n/******/ \t\tvar installedChunkData = installedChunks[chunkId];\n/******/ \t\tif(installedChunkData === 0) {\n/******/ \t\t\treturn new Promise(function(resolve) { resolve(); });\n/******/ \t\t}\n/******/\n/******/ \t\t// a Promise means \"currently loading\".\n/******/ \t\tif(installedChunkData) {\n/******/ \t\t\treturn installedChunkData[2];\n/******/ \t\t}\n/******/\n/******/ \t\t// setup Promise in chunk cache\n/******/ \t\tvar promise = new Promise(function(resolve, reject) {\n/******/ \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n/******/ \t\t});\n/******/ \t\tinstalledChunkData[2] = promise;\n/******/\n/******/ \t\t// start chunk loading\n/******/ \t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\tvar script = document.createElement('script');\n/******/ \t\tscript.type = 'text/javascript';\n/******/ \t\tscript.charset = 'utf-8';\n/******/ \t\tscript.async = true;\n/******/ \t\tscript.timeout = 120000;\n/******/\n/******/ \t\tif (__webpack_require__.nc) {\n/******/ \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n/******/ \t\t}\n/******/ \t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".js\";\n/******/ \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n/******/ \t\tscript.onerror = script.onload = onScriptComplete;\n/******/ \t\tfunction onScriptComplete() {\n/******/ \t\t\t// avoid mem leaks in IE.\n/******/ \t\t\tscript.onerror = script.onload = null;\n/******/ \t\t\tclearTimeout(timeout);\n/******/ \t\t\tvar chunk = installedChunks[chunkId];\n/******/ \t\t\tif(chunk !== 0) {\n/******/ \t\t\t\tif(chunk) {\n/******/ \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n/******/ \t\t\t\t}\n/******/ \t\t\t\tinstalledChunks[chunkId] = undefined;\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\thead.appendChild(script);\n/******/\n/******/ \t\treturn promise;\n/******/ \t};\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// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// on error function for async loading\n/******/ \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 57);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(28));\n__export(__webpack_require__(29));\n__export(__webpack_require__(20));\n__export(__webpack_require__(65));\n__export(__webpack_require__(66));\n__export(__webpack_require__(67));\n__export(__webpack_require__(68));\n__export(__webpack_require__(30));\n__export(__webpack_require__(69));\n__export(__webpack_require__(31));\n__export(__webpack_require__(70));\n__export(__webpack_require__(71));\n__export(__webpack_require__(73));\n__export(__webpack_require__(74));\n__export(__webpack_require__(75));\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ../util/dist/cjs/index.js\nvar cjs = __webpack_require__(0);\nvar cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);\n\n// CONCATENATED MODULE: ../app/dist/esm/src/firebaseApp.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar contains = function (obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\n// An array to capture listeners before the true auth functions\n// exist\nvar tokenListeners = [];\n/**\n * Global context object for a collection of services using\n * a shared authentication state.\n */\nvar firebaseApp_FirebaseAppImpl = /** @class */ (function () {\n function FirebaseAppImpl(options, name, firebase_) {\n this.firebase_ = firebase_;\n this.isDeleted_ = false;\n this.services_ = {};\n this.name_ = name;\n this.options_ = Object(cjs[\"deepCopy\"])(options);\n this.INTERNAL = {\n getUid: function () { return null; },\n getToken: function () { return Promise.resolve(null); },\n addAuthTokenListener: function (callback) {\n tokenListeners.push(callback);\n // Make sure callback is called, asynchronously, in the absence of the auth module\n setTimeout(function () { return callback(null); }, 0);\n },\n removeAuthTokenListener: function (callback) {\n tokenListeners = tokenListeners.filter(function (listener) { return listener !== callback; });\n }\n };\n }\n Object.defineProperty(FirebaseAppImpl.prototype, \"name\", {\n get: function () {\n this.checkDestroyed_();\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"options\", {\n get: function () {\n this.checkDestroyed_();\n return this.options_;\n },\n enumerable: true,\n configurable: true\n });\n FirebaseAppImpl.prototype.delete = function () {\n var _this = this;\n return new Promise(function (resolve) {\n _this.checkDestroyed_();\n resolve();\n })\n .then(function () {\n _this.firebase_.INTERNAL.removeApp(_this.name_);\n var services = [];\n Object.keys(_this.services_).forEach(function (serviceKey) {\n Object.keys(_this.services_[serviceKey]).forEach(function (instanceKey) {\n services.push(_this.services_[serviceKey][instanceKey]);\n });\n });\n return Promise.all(services.map(function (service) {\n return service.INTERNAL.delete();\n }));\n })\n .then(function () {\n _this.isDeleted_ = true;\n _this.services_ = {};\n });\n };\n /**\n * Return a service instance associated with this app (creating it\n * on demand), identified by the passed instanceIdentifier.\n *\n * NOTE: Currently storage is the only one that is leveraging this\n * functionality. They invoke it by calling:\n *\n * ```javascript\n * firebase.app().storage('STORAGE BUCKET ID')\n * ```\n *\n * The service name is passed to this already\n * @internal\n */\n FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) {\n if (instanceIdentifier === void 0) { instanceIdentifier = DEFAULT_ENTRY_NAME; }\n this.checkDestroyed_();\n if (!this.services_[name]) {\n this.services_[name] = {};\n }\n if (!this.services_[name][instanceIdentifier]) {\n /**\n * If a custom instance has been defined (i.e. not '[DEFAULT]')\n * then we will pass that instance on, otherwise we pass `null`\n */\n var instanceSpecifier = instanceIdentifier !== DEFAULT_ENTRY_NAME\n ? instanceIdentifier\n : undefined;\n var service = this.firebase_.INTERNAL.factories[name](this, this.extendApp.bind(this), instanceSpecifier);\n this.services_[name][instanceIdentifier] = service;\n }\n return this.services_[name][instanceIdentifier];\n };\n /**\n * Callback function used to extend an App instance at the time\n * of service instance creation.\n */\n FirebaseAppImpl.prototype.extendApp = function (props) {\n var _this = this;\n // Copy the object onto the FirebaseAppImpl prototype\n Object(cjs[\"deepExtend\"])(this, props);\n /**\n * If the app has overwritten the addAuthTokenListener stub, forward\n * the active token listeners on to the true fxn.\n *\n * TODO: This function is required due to our current module\n * structure. Once we are able to rely strictly upon a single module\n * implementation, this code should be refactored and Auth should\n * provide these stubs and the upgrade logic\n */\n if (props.INTERNAL && props.INTERNAL.addAuthTokenListener) {\n tokenListeners.forEach(function (listener) {\n _this.INTERNAL.addAuthTokenListener(listener);\n });\n tokenListeners = [];\n }\n };\n /**\n * This function will throw an Error if the App has already been deleted -\n * use before performing API actions on the App.\n */\n FirebaseAppImpl.prototype.checkDestroyed_ = function () {\n if (this.isDeleted_) {\n error('app-deleted', { name: this.name_ });\n }\n };\n return FirebaseAppImpl;\n}());\n// Prevent dead-code elimination of these methods w/o invalid property\n// copying.\n(firebaseApp_FirebaseAppImpl.prototype.name && firebaseApp_FirebaseAppImpl.prototype.options) ||\n firebaseApp_FirebaseAppImpl.prototype.delete ||\n console.log('dc');\n/**\n * Return a firebase namespace object.\n *\n * In production, this will be called exactly once and the result\n * assigned to the 'firebase' global. It may be called multiple times\n * in unit tests.\n */\nfunction createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: cjs[\"createSubscribe\"],\n ErrorFactory: cjs[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: cjs[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(cjs[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(cjs[\"patchProperty\"])(app, 'App', firebaseApp_FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new firebaseApp_FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(cjs[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n firebaseApp_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(cjs[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}\nfunction error(code, args) {\n throw appErrors.create(code, args);\n}\n// TypeScript does not support non-string indexes!\n// let errors: {[code: AppError: string} = {\nvar errors = {\n 'no-app': \"No Firebase App '{$name}' has been created - \" +\n 'call Firebase App.initializeApp()',\n 'bad-app-name': \"Illegal App name: '{$name}\",\n 'duplicate-app': \"Firebase App named '{$name}' already exists\",\n 'app-deleted': \"Firebase App named '{$name}' already deleted\",\n 'duplicate-service': \"Firebase service named '{$name}' already registered\",\n 'sa-not-supported': 'Initializing the Firebase SDK with a service ' +\n 'account is only allowed in a Node.js environment. On client ' +\n 'devices, you should instead initialize the SDK with an api key and ' +\n 'auth domain',\n 'invalid-app-argument': 'firebase.{$name}() takes either no argument or a ' +\n 'Firebase App instance.'\n};\nvar appErrors = new cjs[\"ErrorFactory\"]('app', 'Firebase', errors);\n\n\n//# sourceMappingURL=firebaseApp.js.map\n\n// CONCATENATED MODULE: ../app/dist/esm/index.js\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"firebase\", function() { return firebase; });\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar firebase = createFirebaseNamespace();\n/* harmony default export */ var esm = __webpack_exports__[\"default\"] = (firebase);\n\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n/* 7 */,\n/* 8 */,\n/* 9 */,\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */,\n/* 19 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.\n */\nexports.CONSTANTS = {\n /**\n * @define {boolean} Whether this is the client Node.js SDK.\n */\n NODE_CLIENT: false,\n /**\n * @define {boolean} Whether this is the Admin Node.js SDK.\n */\n NODE_ADMIN: false,\n /**\n * Firebase SDK Version\n */\n SDK_VERSION: '${JSCORE_VERSION}'\n};\n\n//# sourceMappingURL=constants.js.map\n\n\n/***/ }),\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */,\n/* 26 */,\n/* 27 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar constants_1 = __webpack_require__(20);\n/**\n * Throws an error if the provided assertion is falsy\n * @param {*} assertion The assertion to be tested for falsiness\n * @param {!string} message The message to display if the check fails\n */\nexports.assert = function (assertion, message) {\n if (!assertion) {\n throw exports.assertionError(message);\n }\n};\n/**\n * Returns an Error object suitable for throwing.\n * @param {string} message\n * @return {!Error}\n */\nexports.assertionError = function (message) {\n return new Error('Firebase Database (' +\n constants_1.CONSTANTS.SDK_VERSION +\n ') INTERNAL ASSERT FAILED: ' +\n message);\n};\n\n//# sourceMappingURL=assert.js.map\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar stringToByteArray = function (str) {\n var output = [], p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n while (c > 255) {\n output[p++] = c & 255;\n c >>= 8;\n }\n output[p++] = c;\n }\n return output;\n};\n/**\n * Turns an array of numbers into the string given by the concatenation of the\n * characters to which the numbers correspond.\n * @param {Array} bytes Array of numbers representing characters.\n * @return {string} Stringification of the array.\n */\nvar byteArrayToString = function (bytes) {\n var CHUNK_SIZE = 8192;\n // Special-case the simple case for speed's sake.\n if (bytes.length < CHUNK_SIZE) {\n return String.fromCharCode.apply(null, bytes);\n }\n // The remaining logic splits conversion by chunks since\n // Function#apply() has a maximum parameter count.\n // See discussion: http://goo.gl/LrWmZ9\n var str = '';\n for (var i = 0; i < bytes.length; i += CHUNK_SIZE) {\n var chunk = bytes.slice(i, i + CHUNK_SIZE);\n str += String.fromCharCode.apply(null, chunk);\n }\n return str;\n};\n// Static lookup maps, lazily populated by init_()\nexports.base64 = {\n /**\n * Maps bytes to characters.\n * @type {Object}\n * @private\n */\n byteToCharMap_: null,\n /**\n * Maps characters to bytes.\n * @type {Object}\n * @private\n */\n charToByteMap_: null,\n /**\n * Maps bytes to websafe characters.\n * @type {Object}\n * @private\n */\n byteToCharMapWebSafe_: null,\n /**\n * Maps websafe characters to bytes.\n * @type {Object}\n * @private\n */\n charToByteMapWebSafe_: null,\n /**\n * Our default alphabet, shared between\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\n * @type {string}\n */\n ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\n /**\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\n * @type {string}\n */\n get ENCODED_VALS() {\n return this.ENCODED_VALS_BASE + '+/=';\n },\n /**\n * Our websafe alphabet.\n * @type {string}\n */\n get ENCODED_VALS_WEBSAFE() {\n return this.ENCODED_VALS_BASE + '-_.';\n },\n /**\n * Whether this browser supports the atob and btoa functions. This extension\n * started at Mozilla but is now implemented by many browsers. We use the\n * ASSUME_* variables to avoid pulling in the full useragent detection library\n * but still allowing the standard per-browser compilations.\n *\n * @type {boolean}\n */\n HAS_NATIVE_SUPPORT: typeof atob === 'function',\n /**\n * Base64-encode an array of bytes.\n *\n * @param {Array|Uint8Array} input An array of bytes (numbers with\n * value in [0, 255]) to encode.\n * @param {boolean=} opt_webSafe Boolean indicating we should use the\n * alternative alphabet.\n * @return {string} The base64 encoded string.\n */\n encodeByteArray: function (input, opt_webSafe) {\n if (!Array.isArray(input)) {\n throw Error('encodeByteArray takes an array as a parameter');\n }\n this.init_();\n var byteToCharMap = opt_webSafe\n ? this.byteToCharMapWebSafe_\n : this.byteToCharMap_;\n var output = [];\n for (var i = 0; i < input.length; i += 3) {\n var byte1 = input[i];\n var haveByte2 = i + 1 < input.length;\n var byte2 = haveByte2 ? input[i + 1] : 0;\n var haveByte3 = i + 2 < input.length;\n var byte3 = haveByte3 ? input[i + 2] : 0;\n var outByte1 = byte1 >> 2;\n var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\n var outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\n var outByte4 = byte3 & 0x3f;\n if (!haveByte3) {\n outByte4 = 64;\n if (!haveByte2) {\n outByte3 = 64;\n }\n }\n output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\n }\n return output.join('');\n },\n /**\n * Base64-encode a string.\n *\n * @param {string} input A string to encode.\n * @param {boolean=} opt_webSafe If true, we should use the\n * alternative alphabet.\n * @return {string} The base64 encoded string.\n */\n encodeString: function (input, opt_webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !opt_webSafe) {\n return btoa(input);\n }\n return this.encodeByteArray(stringToByteArray(input), opt_webSafe);\n },\n /**\n * Base64-decode a string.\n *\n * @param {string} input to decode.\n * @param {boolean=} opt_webSafe True if we should use the\n * alternative alphabet.\n * @return {string} string representing the decoded value.\n */\n decodeString: function (input, opt_webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !opt_webSafe) {\n return atob(input);\n }\n return byteArrayToString(this.decodeStringToByteArray(input, opt_webSafe));\n },\n /**\n * Base64-decode a string.\n *\n * In base-64 decoding, groups of four characters are converted into three\n * bytes. If the encoder did not apply padding, the input length may not\n * be a multiple of 4.\n *\n * In this case, the last group will have fewer than 4 characters, and\n * padding will be inferred. If the group has one or two characters, it decodes\n * to one byte. If the group has three characters, it decodes to two bytes.\n *\n * @param {string} input Input to decode.\n * @param {boolean=} opt_webSafe True if we should use the web-safe alphabet.\n * @return {!Array} bytes representing the decoded value.\n */\n decodeStringToByteArray: function (input, opt_webSafe) {\n this.init_();\n var charToByteMap = opt_webSafe\n ? this.charToByteMapWebSafe_\n : this.charToByteMap_;\n var output = [];\n for (var i = 0; i < input.length;) {\n var byte1 = charToByteMap[input.charAt(i++)];\n var haveByte2 = i < input.length;\n var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\n ++i;\n var haveByte3 = i < input.length;\n var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n var haveByte4 = i < input.length;\n var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\n throw Error();\n }\n var outByte1 = (byte1 << 2) | (byte2 >> 4);\n output.push(outByte1);\n if (byte3 != 64) {\n var outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\n output.push(outByte2);\n if (byte4 != 64) {\n var outByte3 = ((byte3 << 6) & 0xc0) | byte4;\n output.push(outByte3);\n }\n }\n }\n return output;\n },\n /**\n * Lazy static initialization function. Called before\n * accessing any of the static map variables.\n * @private\n */\n init_: function () {\n if (!this.byteToCharMap_) {\n this.byteToCharMap_ = {};\n this.charToByteMap_ = {};\n this.byteToCharMapWebSafe_ = {};\n this.charToByteMapWebSafe_ = {};\n // We want quick mappings back and forth, so we precompute two maps.\n for (var i = 0; i < this.ENCODED_VALS.length; i++) {\n this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\n this.charToByteMap_[this.byteToCharMap_[i]] = i;\n this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\n this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\n // Be forgiving when decoding and correctly decode both encodings.\n if (i >= this.ENCODED_VALS_BASE.length) {\n this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\n this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\n }\n }\n }\n }\n};\n/**\n * URL-safe base64 encoding\n * @param {!string} str\n * @return {!string}\n */\nexports.base64Encode = function (str) {\n var utf8Bytes = stringToByteArray(str);\n return exports.base64.encodeByteArray(utf8Bytes, true);\n};\n/**\n * URL-safe base64 decoding\n *\n * NOTE: DO NOT use the global atob() function - it does NOT support the\n * base64Url variant encoding.\n *\n * @param {string} str To be decoded\n * @return {?string} Decoded result, if possible\n */\nexports.base64Decode = function (str) {\n try {\n return exports.base64.decodeString(str, true);\n }\n catch (e) {\n console.error('base64Decode failed: ', e);\n }\n return null;\n};\n\n//# sourceMappingURL=crypt.js.map\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Evaluates a JSON string into a javascript object.\n *\n * @param {string} str A string containing JSON.\n * @return {*} The javascript object representing the specified JSON.\n */\nfunction jsonEval(str) {\n return JSON.parse(str);\n}\nexports.jsonEval = jsonEval;\n/**\n * Returns JSON representing a javascript object.\n * @param {*} data Javascript object to be stringified.\n * @return {string} The JSON contents of the object.\n */\nfunction stringify(data) {\n return JSON.stringify(data);\n}\nexports.stringify = stringify;\n\n//# sourceMappingURL=json.js.map\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// See http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/\nexports.contains = function (obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\nexports.safeGet = function (obj, key) {\n if (Object.prototype.hasOwnProperty.call(obj, key))\n return obj[key];\n // else return undefined.\n};\n/**\n * Enumerates the keys/values in an object, excluding keys defined on the prototype.\n *\n * @param {?Object.} obj Object to enumerate.\n * @param {!function(K, V)} fn Function to call for each key and value.\n * @template K,V\n */\nexports.forEach = function (obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn(key, obj[key]);\n }\n }\n};\n/**\n * Copies all the (own) properties from one object to another.\n * @param {!Object} objTo\n * @param {!Object} objFrom\n * @return {!Object} objTo\n */\nexports.extend = function (objTo, objFrom) {\n exports.forEach(objFrom, function (key, value) {\n objTo[key] = value;\n });\n return objTo;\n};\n/**\n * Returns a clone of the specified object.\n * @param {!Object} obj\n * @return {!Object} cloned obj.\n */\nexports.clone = function (obj) {\n return exports.extend({}, obj);\n};\n/**\n * Returns true if obj has typeof \"object\" and is not null. Unlike goog.isObject(), does not return true\n * for functions.\n *\n * @param obj {*} A potential object.\n * @returns {boolean} True if it's an object.\n */\nexports.isNonNullObject = function (obj) {\n return typeof obj === 'object' && obj !== null;\n};\nexports.isEmpty = function (obj) {\n for (var key in obj) {\n return false;\n }\n return true;\n};\nexports.getCount = function (obj) {\n var rv = 0;\n for (var key in obj) {\n rv++;\n }\n return rv;\n};\nexports.map = function (obj, f, opt_obj) {\n var res = {};\n for (var key in obj) {\n res[key] = f.call(opt_obj, obj[key], key, obj);\n }\n return res;\n};\nexports.findKey = function (obj, fn, opt_this) {\n for (var key in obj) {\n if (fn.call(opt_this, obj[key], key, obj)) {\n return key;\n }\n }\n return undefined;\n};\nexports.findValue = function (obj, fn, opt_this) {\n var key = exports.findKey(obj, fn, opt_this);\n return key && obj[key];\n};\nexports.getAnyKey = function (obj) {\n for (var key in obj) {\n return key;\n }\n};\nexports.getValues = function (obj) {\n var res = [];\n var i = 0;\n for (var key in obj) {\n res[i++] = obj[key];\n }\n return res;\n};\n/**\n * Tests whether every key/value pair in an object pass the test implemented\n * by the provided function\n *\n * @param {?Object.} obj Object to test.\n * @param {!function(K, V)} fn Function to call for each key and value.\n * @template K,V\n */\nexports.every = function (obj, fn) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n if (!fn(key, obj[key])) {\n return false;\n }\n }\n }\n return true;\n};\n\n//# sourceMappingURL=obj.js.map\n\n\n/***/ }),\n/* 32 */,\n/* 33 */,\n/* 34 */,\n/* 35 */,\n/* 36 */,\n/* 37 */,\n/* 38 */,\n/* 39 */,\n/* 40 */,\n/* 41 */,\n/* 42 */,\n/* 43 */,\n/* 44 */,\n/* 45 */,\n/* 46 */,\n/* 47 */,\n/* 48 */,\n/* 49 */,\n/* 50 */,\n/* 51 */,\n/* 52 */,\n/* 53 */,\n/* 54 */,\n/* 55 */,\n/* 56 */,\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n__webpack_require__(58);\nmodule.exports = __webpack_require__(6).default;\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_polyfills_promise__ = __webpack_require__(59);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_polyfills_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__src_polyfills_promise__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_shims_find__ = __webpack_require__(63);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_shims_find___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__src_shims_find__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_shims_findIndex__ = __webpack_require__(64);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_shims_findIndex___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__src_shims_findIndex__);\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __global = (function () {\n if (typeof global !== 'undefined') {\n return global;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n throw new Error('unable to locate global object');\n})();\n// Polyfill Promise\nif (typeof Promise === 'undefined') {\n // HACK: TS throws an error if I attempt to use 'dot-notation'\n __global['Promise'] = Promise = __webpack_require__(60);\n}\n\n//# sourceMappingURL=promise.js.map\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(19)))\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(setImmediate) {(function (root) {\n\n // Store setTimeout reference so promise-polyfill will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var setTimeoutFunc = setTimeout;\n\n function noop() {}\n \n // Polyfill for Function.prototype.bind\n function bind(fn, thisArg) {\n return function () {\n fn.apply(thisArg, arguments);\n };\n }\n\n function Promise(fn) {\n if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n\n doResolve(fn, this);\n }\n\n function handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function () {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n }\n\n function resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\n if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n }\n\n function reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n }\n\n function finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n }\n\n function Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n }\n\n /**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\n function doResolve(fn, self) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n resolve(self, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n });\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n }\n\n Promise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n };\n\n Promise.prototype.then = function (onFulfilled, onRejected) {\n var prom = new (this.constructor)(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n };\n\n Promise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(val, function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n };\n\n Promise.resolve = function (value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function (resolve) {\n resolve(value);\n });\n };\n\n Promise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n };\n\n Promise.race = function (values) {\n return new Promise(function (resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n };\n\n // Use polyfill for setImmediate for performance gains\n Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\n function (fn) {\n setTimeoutFunc(fn, 0);\n };\n\n Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n };\n\n /**\n * Set the immediate function to execute callbacks\n * @param fn {function} Function to execute\n * @deprecated\n */\n Promise._setImmediateFn = function _setImmediateFn(fn) {\n Promise._immediateFn = fn;\n };\n\n /**\n * Change the function to execute on unhandled rejection\n * @param {function} fn Function to execute on unhandled rejection\n * @deprecated\n */\n Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n Promise._unhandledRejectionFn = fn;\n };\n \n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Promise;\n } else if (!root.Promise) {\n root.Promise = Promise;\n }\n\n})(this);\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(61).setImmediate))\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(62);\nexports.setImmediate = setImmediate;\nexports.clearImmediate = clearImmediate;\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a ';\n }\n var iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n }\n catch (e) {\n util_1.log('frame writing exception');\n if (e.stack) {\n util_1.log(e.stack);\n }\n util_1.log(e);\n }\n }\n else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n /**\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\n * actually use.\n * @private\n * @return {Element}\n */\n FirebaseIFrameScriptHolder.createIFrame_ = function () {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n var a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n util_1.log('No IE domain setting required');\n }\n }\n catch (e) {\n var domain = document.domain;\n iframe.src =\n \"javascript:void((function(){document.open();document.domain='\" +\n domain +\n \"';document.close();})())\";\n }\n }\n else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n iframe.doc = iframe.contentDocument; // Firefox, Opera, Safari\n }\n else if (iframe.contentWindow) {\n iframe.doc = iframe.contentWindow.document; // Internet Explorer\n }\n else if (iframe.document) {\n iframe.doc = iframe.document; //others?\n }\n return iframe;\n };\n /**\n * Cancel all outstanding queries and remove the frame.\n */\n FirebaseIFrameScriptHolder.prototype.close = function () {\n var _this = this;\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(function () {\n if (_this.myIFrame !== null) {\n document.body.removeChild(_this.myIFrame);\n _this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n if (util_3.isNodeSdk() && this.myID) {\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n var theURL = this.urlFn(urlParams);\n FirebaseIFrameScriptHolder.nodeRestRequest(theURL);\n }\n // Protect from being called recursively.\n var onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n };\n /**\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\n * @param {!string} id - The ID of this connection\n * @param {!string} pw - The password for this connection\n */\n FirebaseIFrameScriptHolder.prototype.startLongPoll = function (id, pw) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) { }\n };\n /**\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\n * too many outstanding requests and we are still alive.\n *\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\n * needed.\n */\n FirebaseIFrameScriptHolder.prototype.newRequest_ = function () {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (this.alive &&\n this.sendNewPolls &&\n this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)) {\n //construct our url\n this.currentSerial++;\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n var theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n var curDataString = '';\n var i = 0;\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n var nextSeg = this.pendingSegs[0];\n if (nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <=\n MAX_URL_DATA_SIZE) {\n //great, the segment will fit. Lets append it.\n var theSeg = this.pendingSegs.shift();\n curDataString =\n curDataString +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM +\n i +\n '=' +\n theSeg.seg +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET +\n i +\n '=' +\n theSeg.ts +\n '&' +\n exports.FIREBASE_LONGPOLL_DATA_PARAM +\n i +\n '=' +\n theSeg.d;\n i++;\n }\n else {\n break;\n }\n }\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * Queue a packet for transmission to the server.\n * @param segnum - A sequential id for this packet segment used for reassembly\n * @param totalsegs - The total number of segments in this packet\n * @param data - The data for this segment.\n */\n FirebaseIFrameScriptHolder.prototype.enqueueSegment = function (segnum, totalsegs, data) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n };\n /**\n * Add a script tag for a regular long-poll request.\n * @param {!string} url - The URL of the script tag.\n * @param {!number} serial - The serial number of the request.\n * @private\n */\n FirebaseIFrameScriptHolder.prototype.addLongPollTag_ = function (url, serial) {\n var _this = this;\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n var doNewRequest = function () {\n _this.outstandingRequests.remove(serial);\n _this.newRequest_();\n };\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n var keepaliveTimeout = setTimeout(doNewRequest, Math.floor(KEEPALIVE_REQUEST_INTERVAL));\n var readyStateCB = function () {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n this.addTag(url, readyStateCB);\n };\n /**\n * Add an arbitrary script tag to the iframe.\n * @param {!string} url - The URL for the script tag source.\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\n */\n FirebaseIFrameScriptHolder.prototype.addTag = function (url, loadCB) {\n var _this = this;\n if (util_3.isNodeSdk()) {\n this.doNodeLongPoll(url, loadCB);\n }\n else {\n setTimeout(function () {\n try {\n // if we're already closed, don't add this poll\n if (!_this.sendNewPolls)\n return;\n var newScript_1 = _this.myIFrame.doc.createElement('script');\n newScript_1.type = 'text/javascript';\n newScript_1.async = true;\n newScript_1.src = url;\n newScript_1.onload = newScript_1.onreadystatechange = function () {\n var rstate = newScript_1.readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript_1.onload = newScript_1.onreadystatechange = null;\n if (newScript_1.parentNode) {\n newScript_1.parentNode.removeChild(newScript_1);\n }\n loadCB();\n }\n };\n newScript_1.onerror = function () {\n util_1.log('Long-poll script failed to load: ' + url);\n _this.sendNewPolls = false;\n _this.close();\n };\n _this.myIFrame.doc.body.appendChild(newScript_1);\n }\n catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n };\n return FirebaseIFrameScriptHolder;\n}());\nexports.FirebaseIFrameScriptHolder = FirebaseIFrameScriptHolder;\n\n//# sourceMappingURL=BrowserPollConnection.js.map\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = __webpack_require__(6);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar StatsManager_1 = __webpack_require__(25);\nvar Constants_1 = __webpack_require__(13);\nvar util_3 = __webpack_require__(0);\nvar storage_1 = __webpack_require__(12);\nvar util_4 = __webpack_require__(0);\nvar util_5 = __webpack_require__(0);\nvar WEBSOCKET_MAX_FRAME_SIZE = 16384;\nvar WEBSOCKET_KEEPALIVE_INTERVAL = 45000;\nvar WebSocketImpl = null;\nif (typeof MozWebSocket !== 'undefined') {\n WebSocketImpl = MozWebSocket;\n}\nelse if (typeof WebSocket !== 'undefined') {\n WebSocketImpl = WebSocket;\n}\nfunction setWebSocketImpl(impl) {\n WebSocketImpl = impl;\n}\nexports.setWebSocketImpl = setWebSocketImpl;\n/**\n * Create a new websocket connection with the given callbacks.\n * @constructor\n * @implements {Transport}\n */\nvar WebSocketConnection = /** @class */ (function () {\n /**\n * @param {string} connId identifier for this transport\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n */\n function WebSocketConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.keepaliveTimer = null;\n this.frames = null;\n this.totalFrames = 0;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.log_ = util_2.logWrapper(this.connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.connURL = WebSocketConnection.connectionURL_(repoInfo, transportSessionId, lastSessionId);\n }\n /**\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n * @return {string} connection url\n * @private\n */\n WebSocketConnection.connectionURL_ = function (repoInfo, transportSessionId, lastSessionId) {\n var urlParams = {};\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (!util_5.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n if (transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = transportSessionId;\n }\n if (lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = lastSessionId;\n }\n return repoInfo.connectionURL(Constants_1.WEBSOCKET, urlParams);\n };\n /**\n *\n * @param onMessage Callback when messages arrive\n * @param onDisconnect Callback with connection lost.\n */\n WebSocketConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.onDisconnect = onDisconnect;\n this.onMessage = onMessage;\n this.log_('Websocket connecting to ' + this.connURL);\n this.everConnected_ = false;\n // Assume failure until proven otherwise.\n storage_1.PersistentStorage.set('previous_websocket_failure', true);\n try {\n if (util_5.isNodeSdk()) {\n var device = util_3.CONSTANTS.NODE_ADMIN ? 'AdminNode' : 'Node';\n // UA Format: Firebase////\n var options = {\n headers: {\n 'User-Agent': \"Firebase/\" + Constants_1.PROTOCOL_VERSION + \"/\" + app_1.default.SDK_VERSION + \"/\" + process.platform + \"/\" + device\n }\n };\n // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.\n var env = process['env'];\n var proxy = this.connURL.indexOf('wss://') == 0\n ? env['HTTPS_PROXY'] || env['https_proxy']\n : env['HTTP_PROXY'] || env['http_proxy'];\n if (proxy) {\n options['proxy'] = { origin: proxy };\n }\n this.mySock = new WebSocketImpl(this.connURL, [], options);\n }\n else {\n this.mySock = new WebSocketImpl(this.connURL);\n }\n }\n catch (e) {\n this.log_('Error instantiating WebSocket.');\n var error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n return;\n }\n this.mySock.onopen = function () {\n _this.log_('Websocket connected.');\n _this.everConnected_ = true;\n };\n this.mySock.onclose = function () {\n _this.log_('Websocket connection was disconnected.');\n _this.mySock = null;\n _this.onClosed_();\n };\n this.mySock.onmessage = function (m) {\n _this.handleIncomingFrame(m);\n };\n this.mySock.onerror = function (e) {\n _this.log_('WebSocket error. Closing connection.');\n var error = e.message || e.data;\n if (error) {\n _this.log_(error);\n }\n _this.onClosed_();\n };\n };\n /**\n * No-op for websockets, we don't need to do anything once the connection is confirmed as open\n */\n WebSocketConnection.prototype.start = function () { };\n WebSocketConnection.forceDisallow = function () {\n WebSocketConnection.forceDisallow_ = true;\n };\n WebSocketConnection.isAvailable = function () {\n var isOldAndroid = false;\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n var oldAndroidRegex = /Android ([0-9]{0,}\\.[0-9]{0,})/;\n var oldAndroidMatch = navigator.userAgent.match(oldAndroidRegex);\n if (oldAndroidMatch && oldAndroidMatch.length > 1) {\n if (parseFloat(oldAndroidMatch[1]) < 4.4) {\n isOldAndroid = true;\n }\n }\n }\n return (!isOldAndroid &&\n WebSocketImpl !== null &&\n !WebSocketConnection.forceDisallow_);\n };\n /**\n * Returns true if we previously failed to connect with this transport.\n * @return {boolean}\n */\n WebSocketConnection.previouslyFailed = function () {\n // If our persistent storage is actually only in-memory storage,\n // we default to assuming that it previously failed to be safe.\n return (storage_1.PersistentStorage.isInMemoryStorage ||\n storage_1.PersistentStorage.get('previous_websocket_failure') === true);\n };\n WebSocketConnection.prototype.markConnectionHealthy = function () {\n storage_1.PersistentStorage.remove('previous_websocket_failure');\n };\n WebSocketConnection.prototype.appendFrame_ = function (data) {\n this.frames.push(data);\n if (this.frames.length == this.totalFrames) {\n var fullMess = this.frames.join('');\n this.frames = null;\n var jsonMess = util_4.jsonEval(fullMess);\n //handle the message\n this.onMessage(jsonMess);\n }\n };\n /**\n * @param {number} frameCount The number of frames we are expecting from the server\n * @private\n */\n WebSocketConnection.prototype.handleNewFrameCount_ = function (frameCount) {\n this.totalFrames = frameCount;\n this.frames = [];\n };\n /**\n * Attempts to parse a frame count out of some text. If it can't, assumes a value of 1\n * @param {!String} data\n * @return {?String} Any remaining data to be process, or null if there is none\n * @private\n */\n WebSocketConnection.prototype.extractFrameCount_ = function (data) {\n util_1.assert(this.frames === null, 'We already have a frame buffer');\n // TODO: The server is only supposed to send up to 9999 frames (i.e. length <= 4), but that isn't being enforced\n // currently. So allowing larger frame counts (length <= 6). See https://app.asana.com/0/search/8688598998380/8237608042508\n if (data.length <= 6) {\n var frameCount = Number(data);\n if (!isNaN(frameCount)) {\n this.handleNewFrameCount_(frameCount);\n return null;\n }\n }\n this.handleNewFrameCount_(1);\n return data;\n };\n /**\n * Process a websocket frame that has arrived from the server.\n * @param mess The frame data\n */\n WebSocketConnection.prototype.handleIncomingFrame = function (mess) {\n if (this.mySock === null)\n return; // Chrome apparently delivers incoming packets even after we .close() the connection sometimes.\n var data = mess['data'];\n this.bytesReceived += data.length;\n this.stats_.incrementCounter('bytes_received', data.length);\n this.resetKeepAlive();\n if (this.frames !== null) {\n // we're buffering\n this.appendFrame_(data);\n }\n else {\n // try to parse out a frame count, otherwise, assume 1 and process it\n var remainingData = this.extractFrameCount_(data);\n if (remainingData !== null) {\n this.appendFrame_(remainingData);\n }\n }\n };\n /**\n * Send a message to the server\n * @param {Object} data The JSON object to transmit\n */\n WebSocketConnection.prototype.send = function (data) {\n this.resetKeepAlive();\n var dataStr = util_4.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //We can only fit a certain amount in each websocket frame, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_2.splitStringBySize(dataStr, WEBSOCKET_MAX_FRAME_SIZE);\n //Send the length header\n if (dataSegs.length > 1) {\n this.sendString_(String(dataSegs.length));\n }\n //Send the actual data in segments.\n for (var i = 0; i < dataSegs.length; i++) {\n this.sendString_(dataSegs[i]);\n }\n };\n WebSocketConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.keepaliveTimer) {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = null;\n }\n if (this.mySock) {\n this.mySock.close();\n this.mySock = null;\n }\n };\n WebSocketConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is closing itself');\n this.shutdown_();\n // since this is an internal close, trigger the close listener\n if (this.onDisconnect) {\n this.onDisconnect(this.everConnected_);\n this.onDisconnect = null;\n }\n }\n };\n /**\n * External-facing close handler.\n * Close the websocket and kill the connection.\n */\n WebSocketConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is being closed');\n this.shutdown_();\n }\n };\n /**\n * Kill the current keepalive timer and start a new one, to ensure that it always fires N seconds after\n * the last activity.\n */\n WebSocketConnection.prototype.resetKeepAlive = function () {\n var _this = this;\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = setInterval(function () {\n //If there has been no websocket activity for a while, send a no-op\n if (_this.mySock) {\n _this.sendString_('0');\n }\n _this.resetKeepAlive();\n }, Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL));\n };\n /**\n * Send a string over the websocket.\n *\n * @param {string} str String to send.\n * @private\n */\n WebSocketConnection.prototype.sendString_ = function (str) {\n // Firefox seems to sometimes throw exceptions (NS_ERROR_UNEXPECTED) from websocket .send()\n // calls for some unknown reason. We treat these as an error and disconnect.\n // See https://app.asana.com/0/58926111402292/68021340250410\n try {\n this.mySock.send(str);\n }\n catch (e) {\n this.log_('Exception thrown from WebSocket.send():', e.message || e.data, 'Closing connection.');\n setTimeout(this.onClosed_.bind(this), 0);\n }\n };\n /**\n * Number of response before we consider the connection \"healthy.\"\n * @type {number}\n */\n WebSocketConnection.responsesRequiredToBeHealthy = 2;\n /**\n * Time to wait for the connection te become healthy before giving up.\n * @type {number}\n */\n WebSocketConnection.healthyTimeout = 30000;\n return WebSocketConnection;\n}());\nexports.WebSocketConnection = WebSocketConnection;\n\n//# sourceMappingURL=WebSocketConnection.js.map\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27)))\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Interface defining the set of actions that can be performed against the Firebase server\n * (basically corresponds to our wire protocol).\n *\n * @interface\n */\nvar ServerActions = /** @class */ (function () {\n function ServerActions() {\n }\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.put = function (pathString, data, onComplete, hash) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, ?string)} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.merge = function (pathString, data, onComplete, hash) { };\n /**\n * Refreshes the auth token for the current connection.\n * @param {string} token The authentication token\n */\n ServerActions.prototype.refreshAuthToken = function (token) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectPut = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectMerge = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectCancel = function (pathString, onComplete) { };\n /**\n * @param {Object.} stats\n */\n ServerActions.prototype.reportStats = function (stats) { };\n return ServerActions;\n}());\nexports.ServerActions = ServerActions;\n\n//# sourceMappingURL=ServerActions.js.map\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = __webpack_require__(24);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar Node_1 = __webpack_require__(5);\nvar ChildrenNode_1 = __webpack_require__(4);\n/**\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar RangedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function RangedFilter(params) {\n this.indexedFilter_ = new IndexedFilter_1.IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getStartPost = function () {\n return this.startPost_;\n };\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getEndPost = function () {\n return this.endPost_;\n };\n /**\n * @param {!NamedNode} node\n * @return {boolean}\n */\n RangedFilter.prototype.matches = function (node) {\n return (this.index_.compare(this.getStartPost(), node) <= 0 &&\n this.index_.compare(node, this.getEndPost()) <= 0);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var self = this;\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!self.matches(new Node_1.NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndexedFilter = function () {\n return this.indexedFilter_;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getStartPost_ = function (params) {\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n }\n else {\n return params.getIndex().minPost();\n }\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getEndPost_ = function (params) {\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n }\n else {\n return params.getIndex().maxPost();\n }\n };\n return RangedFilter;\n}());\nexports.RangedFilter = RangedFilter;\n\n//# sourceMappingURL=RangedFilter.js.map\n\n\n/***/ }),\n/* 57 */,\n/* 58 */,\n/* 59 */,\n/* 60 */,\n/* 61 */,\n/* 62 */,\n/* 63 */,\n/* 64 */,\n/* 65 */,\n/* 66 */,\n/* 67 */,\n/* 68 */,\n/* 69 */,\n/* 70 */,\n/* 71 */,\n/* 72 */,\n/* 73 */,\n/* 74 */,\n/* 75 */,\n/* 76 */,\n/* 77 */,\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = __webpack_require__(79);\n\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = __webpack_require__(6);\nvar Database_1 = __webpack_require__(32);\nexports.Database = Database_1.Database;\nvar Query_1 = __webpack_require__(36);\nexports.Query = Query_1.Query;\nvar Reference_1 = __webpack_require__(21);\nexports.Reference = Reference_1.Reference;\nvar util_1 = __webpack_require__(1);\nexports.enableLogging = util_1.enableLogging;\nvar RepoManager_1 = __webpack_require__(26);\nvar INTERNAL = __webpack_require__(111);\nvar TEST_ACCESS = __webpack_require__(112);\nvar util_2 = __webpack_require__(0);\nvar ServerValue = Database_1.Database.ServerValue;\nexports.ServerValue = ServerValue;\nfunction registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app, unused, url) { return RepoManager_1.RepoManager.getInstance().databaseFromApp(app, url); }, \n // firebase.database namespace properties\n {\n Reference: Reference_1.Reference,\n Query: Query_1.Query,\n Database: Database_1.Database,\n enableLogging: util_1.enableLogging,\n INTERNAL: INTERNAL,\n ServerValue: ServerValue,\n TEST_ACCESS: TEST_ACCESS\n }, null, true);\n if (util_2.isNodeSdk()) {\n module.exports = namespace;\n }\n}\nexports.registerDatabase = registerDatabase;\nregisterDatabase(app_1.default);\nvar DataSnapshot_1 = __webpack_require__(22);\nexports.DataSnapshot = DataSnapshot_1.DataSnapshot;\nvar onDisconnect_1 = __webpack_require__(35);\nexports.OnDisconnect = onDisconnect_1.OnDisconnect;\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Wraps a DOM Storage object and:\n * - automatically encode objects as JSON strings before storing them to allow us to store arbitrary types.\n * - prefixes names with \"firebase:\" to avoid collisions with app data.\n *\n * We automatically (see storage.js) create two such wrappers, one for sessionStorage,\n * and one for localStorage.\n *\n * @constructor\n */\nvar DOMStorageWrapper = /** @class */ (function () {\n /**\n * @param {Storage} domStorage_ The underlying storage object (e.g. localStorage or sessionStorage)\n */\n function DOMStorageWrapper(domStorage_) {\n this.domStorage_ = domStorage_;\n // Use a prefix to avoid collisions with other stuff saved by the app.\n this.prefix_ = 'firebase:';\n }\n /**\n * @param {string} key The key to save the value under\n * @param {?Object} value The value being stored, or null to remove the key.\n */\n DOMStorageWrapper.prototype.set = function (key, value) {\n if (value == null) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n }\n else {\n this.domStorage_.setItem(this.prefixedName_(key), util_1.stringify(value));\n }\n };\n /**\n * @param {string} key\n * @return {*} The value that was stored under this key, or null\n */\n DOMStorageWrapper.prototype.get = function (key) {\n var storedVal = this.domStorage_.getItem(this.prefixedName_(key));\n if (storedVal == null) {\n return null;\n }\n else {\n return util_1.jsonEval(storedVal);\n }\n };\n /**\n * @param {string} key\n */\n DOMStorageWrapper.prototype.remove = function (key) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n };\n /**\n * @param {string} name\n * @return {string}\n */\n DOMStorageWrapper.prototype.prefixedName_ = function (name) {\n return this.prefix_ + name;\n };\n DOMStorageWrapper.prototype.toString = function () {\n return this.domStorage_.toString();\n };\n return DOMStorageWrapper;\n}());\nexports.DOMStorageWrapper = DOMStorageWrapper;\n\n//# sourceMappingURL=DOMStorageWrapper.js.map\n\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * An in-memory storage implementation that matches the API of DOMStorageWrapper\n * (TODO: create interface for both to implement).\n *\n * @constructor\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n this.cache_ = {};\n this.isInMemoryStorage = true;\n }\n MemoryStorage.prototype.set = function (key, value) {\n if (value == null) {\n delete this.cache_[key];\n }\n else {\n this.cache_[key] = value;\n }\n };\n MemoryStorage.prototype.get = function (key) {\n if (util_1.contains(this.cache_, key)) {\n return this.cache_[key];\n }\n return null;\n };\n MemoryStorage.prototype.remove = function (key) {\n delete this.cache_[key];\n };\n return MemoryStorage;\n}());\nexports.MemoryStorage = MemoryStorage;\n\n//# sourceMappingURL=MemoryStorage.js.map\n\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar TransactionResult = /** @class */ (function () {\n /**\n * A type for the resolve value of Firebase.transaction.\n * @constructor\n * @dict\n * @param {boolean} committed\n * @param {DataSnapshot} snapshot\n */\n function TransactionResult(committed, snapshot) {\n this.committed = committed;\n this.snapshot = snapshot;\n }\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n TransactionResult.prototype.toJSON = function () {\n util_1.validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);\n return { committed: this.committed, snapshot: this.snapshot.toJSON() };\n };\n return TransactionResult;\n}());\nexports.TransactionResult = TransactionResult;\n\n//# sourceMappingURL=TransactionResult.js.map\n\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Fancy ID generator that creates 20-character string identifiers with the\n * following properties:\n *\n * 1. They're based on timestamp so that they sort *after* any existing ids.\n * 2. They contain 72-bits of random data after the timestamp so that IDs won't\n * collide with other clients' IDs.\n * 3. They sort *lexicographically* (so the timestamp is converted to characters\n * that will sort properly).\n * 4. They're monotonically increasing. Even if you generate more than one in\n * the same timestamp, the latter ones will sort after the former ones. We do\n * this by using the previous random bits but \"incrementing\" them by 1 (only\n * in the case of a timestamp collision).\n */\nexports.nextPushId = (function () {\n // Modeled after base64 web-safe chars, but ordered by ASCII.\n var PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n // Timestamp of last push, used to prevent local collisions if you push twice\n // in one ms.\n var lastPushTime = 0;\n // We generate 72-bits of randomness which get turned into 12 characters and\n // appended to the timestamp to prevent collisions with other clients. We\n // store the last characters we generated because in the event of a collision,\n // we'll use those same characters except \"incremented\" by one.\n var lastRandChars = [];\n return function (now) {\n var duplicateTime = now === lastPushTime;\n lastPushTime = now;\n var i;\n var timeStampChars = new Array(8);\n for (i = 7; i >= 0; i--) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n // NOTE: Can't use << here because javascript will convert to int and lose\n // the upper bits.\n now = Math.floor(now / 64);\n }\n util_1.assert(now === 0, 'Cannot push at time == 0');\n var id = timeStampChars.join('');\n if (!duplicateTime) {\n for (i = 0; i < 12; i++) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n }\n else {\n // If the timestamp hasn't changed since last push, use the same random\n // number, except incremented by 1.\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i--) {\n lastRandChars[i] = 0;\n }\n lastRandChars[i]++;\n }\n for (i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n util_1.assert(id.length === 20, 'nextPushId: Length should be 20.');\n return id;\n };\n})();\n\n//# sourceMappingURL=NextPushId.js.map\n\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DataSnapshot_1 = __webpack_require__(22);\nvar Event_1 = __webpack_require__(85);\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\n/**\n * Represents registration for 'value' events.\n */\nvar ValueEventRegistration = /** @class */ (function () {\n /**\n * @param {?function(!DataSnapshot)} callback_\n * @param {?function(Error)} cancelCallback_\n * @param {?Object} context_\n */\n function ValueEventRegistration(callback_, cancelCallback_, context_) {\n this.callback_ = callback_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.respondsTo = function (eventType) {\n return eventType === 'value';\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createEvent = function (change, query) {\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent('value', this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, query.getRef(), index));\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_1 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_1.call(ctx, eventData.error);\n };\n }\n else {\n var cb_1 = this.callback_;\n return function () {\n cb_1.call(ctx, eventData.snapshot);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.matches = function (other) {\n if (!(other instanceof ValueEventRegistration)) {\n return false;\n }\n else if (!other.callback_ || !this.callback_) {\n // If no callback specified, we consider it to match any callback.\n return true;\n }\n else {\n return (other.callback_ === this.callback_ && other.context_ === this.context_);\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.hasAnyCallback = function () {\n return this.callback_ !== null;\n };\n return ValueEventRegistration;\n}());\nexports.ValueEventRegistration = ValueEventRegistration;\n/**\n * Represents the registration of 1 or more child_xxx events.\n *\n * Currently, it is always exactly 1 child_xxx event, but the idea is we might let you\n * register a group of callbacks together in the future.\n *\n * @constructor\n * @implements {EventRegistration}\n */\nvar ChildEventRegistration = /** @class */ (function () {\n /**\n * @param {?Object.} callbacks_\n * @param {?function(Error)} cancelCallback_\n * @param {Object=} context_\n */\n function ChildEventRegistration(callbacks_, cancelCallback_, context_) {\n this.callbacks_ = callbacks_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.respondsTo = function (eventType) {\n var eventToCheck = eventType === 'children_added' ? 'child_added' : eventType;\n eventToCheck =\n eventToCheck === 'children_removed' ? 'child_removed' : eventToCheck;\n return util_1.contains(this.callbacks_, eventToCheck);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createEvent = function (change, query) {\n util_2.assert(change.childName != null, 'Child events should have a childName.');\n var ref = query.getRef().child(/** @type {!string} */ (change.childName));\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent(change.type, this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, ref, index), change.prevName);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_2 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_2.call(ctx, eventData.error);\n };\n }\n else {\n var cb_2 = this.callbacks_[eventData.eventType];\n return function () {\n cb_2.call(ctx, eventData.snapshot, eventData.prevName);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.matches = function (other) {\n if (other instanceof ChildEventRegistration) {\n if (!this.callbacks_ || !other.callbacks_) {\n return true;\n }\n else if (this.context_ === other.context_) {\n var otherCount = util_1.getCount(other.callbacks_);\n var thisCount = util_1.getCount(this.callbacks_);\n if (otherCount === thisCount) {\n // If count is 1, do an exact match on eventType, if either is defined but null, it's a match.\n // If event types don't match, not a match\n // If count is not 1, exact match across all\n if (otherCount === 1) {\n var otherKey /** @type {!string} */ = util_1.getAnyKey(other.callbacks_);\n var thisKey /** @type {!string} */ = util_1.getAnyKey(this.callbacks_);\n return (thisKey === otherKey &&\n (!other.callbacks_[otherKey] ||\n !this.callbacks_[thisKey] ||\n other.callbacks_[otherKey] === this.callbacks_[thisKey]));\n }\n else {\n // Exact match on each key.\n return util_1.every(this.callbacks_, function (eventType, cb) { return other.callbacks_[eventType] === cb; });\n }\n }\n }\n }\n return false;\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.hasAnyCallback = function () {\n return this.callbacks_ !== null;\n };\n return ChildEventRegistration;\n}());\nexports.ChildEventRegistration = ChildEventRegistration;\n\n//# sourceMappingURL=EventRegistration.js.map\n\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\n/**\n * Encapsulates the data needed to raise an event\n * @implements {Event}\n */\nvar DataEvent = /** @class */ (function () {\n /**\n * @param {!string} eventType One of: value, child_added, child_changed, child_moved, child_removed\n * @param {!EventRegistration} eventRegistration The function to call to with the event data. User provided\n * @param {!DataSnapshot} snapshot The data backing the event\n * @param {?string=} prevName Optional, the name of the previous child for child_* events.\n */\n function DataEvent(eventType, eventRegistration, snapshot, prevName) {\n this.eventType = eventType;\n this.eventRegistration = eventRegistration;\n this.snapshot = snapshot;\n this.prevName = prevName;\n }\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getPath = function () {\n var ref = this.snapshot.getRef();\n if (this.eventType === 'value') {\n return ref.path;\n }\n else {\n return ref.getParent().path;\n }\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventType = function () {\n return this.eventType;\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.toString = function () {\n return (this.getPath().toString() +\n ':' +\n this.eventType +\n ':' +\n util_1.stringify(this.snapshot.exportVal()));\n };\n return DataEvent;\n}());\nexports.DataEvent = DataEvent;\nvar CancelEvent = /** @class */ (function () {\n /**\n * @param {EventRegistration} eventRegistration\n * @param {Error} error\n * @param {!Path} path\n */\n function CancelEvent(eventRegistration, error, path) {\n this.eventRegistration = eventRegistration;\n this.error = error;\n this.path = path;\n }\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getPath = function () {\n return this.path;\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventType = function () {\n return 'cancel';\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.toString = function () {\n return this.path.toString() + ':cancel';\n };\n return CancelEvent;\n}());\nexports.CancelEvent = CancelEvent;\n\n//# sourceMappingURL=Event.js.map\n\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar AckUserWrite_1 = __webpack_require__(87);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar util_3 = __webpack_require__(0);\nvar ImmutableTree_1 = __webpack_require__(23);\nvar ListenComplete_1 = __webpack_require__(88);\nvar Merge_1 = __webpack_require__(89);\nvar Operation_1 = __webpack_require__(8);\nvar Overwrite_1 = __webpack_require__(46);\nvar Path_1 = __webpack_require__(2);\nvar SyncPoint_1 = __webpack_require__(47);\nvar WriteTree_1 = __webpack_require__(95);\n/**\n * SyncTree is the central class for managing event callback registration, data caching, views\n * (query processing), and event generation. There are typically two SyncTree instances for\n * each Repo, one for the normal Firebase data, and one for the .info data.\n *\n * It has a number of responsibilities, including:\n * - Tracking all user event callbacks (registered via addEventRegistration() and removeEventRegistration()).\n * - Applying and caching data changes for user set(), transaction(), and update() calls\n * (applyUserOverwrite(), applyUserMerge()).\n * - Applying and caching data changes for server data changes (applyServerOverwrite(),\n * applyServerMerge()).\n * - Generating user-facing events for server and user changes (all of the apply* methods\n * return the set of events that need to be raised as a result).\n * - Maintaining the appropriate set of server listens to ensure we are always subscribed\n * to the correct set of paths and queries to satisfy the current set of user event\n * callbacks (listens are started/stopped using the provided listenProvider).\n *\n * NOTE: Although SyncTree tracks event callbacks and calculates events to raise, the actual\n * events are returned to the caller rather than raised synchronously.\n *\n * @constructor\n */\nvar SyncTree = /** @class */ (function () {\n /**\n * @param {!ListenProvider} listenProvider_ Used by SyncTree to start / stop listening\n * to server data.\n */\n function SyncTree(listenProvider_) {\n this.listenProvider_ = listenProvider_;\n /**\n * Tree of SyncPoints. There's a SyncPoint at any location that has 1 or more views.\n * @type {!ImmutableTree.}\n * @private\n */\n this.syncPointTree_ = ImmutableTree_1.ImmutableTree.Empty;\n /**\n * A tree of all pending user writes (user-initiated set()'s, transaction()'s, update()'s, etc.).\n * @type {!WriteTree}\n * @private\n */\n this.pendingWriteTree_ = new WriteTree_1.WriteTree();\n this.tagToQueryMap_ = {};\n this.queryToTagMap_ = {};\n }\n /**\n * Apply the data changes for a user-generated set() or transaction() call.\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @param {number} writeId\n * @param {boolean=} visible\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserOverwrite = function (path, newData, writeId, visible) {\n // Record pending write.\n this.pendingWriteTree_.addOverwrite(path, newData, writeId, visible);\n if (!visible) {\n return [];\n }\n else {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.User, path, newData));\n }\n };\n /**\n * Apply the data from a user-generated update() call\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserMerge = function (path, changedChildren, writeId) {\n // Record pending merge.\n this.pendingWriteTree_.addMerge(path, changedChildren, writeId);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.User, path, changeTree));\n };\n /**\n * Acknowledge a pending user write that was previously registered with applyUserOverwrite() or applyUserMerge().\n *\n * @param {!number} writeId\n * @param {boolean=} revert True if the given write failed and needs to be reverted\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.ackUserWrite = function (writeId, revert) {\n if (revert === void 0) { revert = false; }\n var write = this.pendingWriteTree_.getWrite(writeId);\n var needToReevaluate = this.pendingWriteTree_.removeWrite(writeId);\n if (!needToReevaluate) {\n return [];\n }\n else {\n var affectedTree_1 = ImmutableTree_1.ImmutableTree.Empty;\n if (write.snap != null) {\n // overwrite\n affectedTree_1 = affectedTree_1.set(Path_1.Path.Empty, true);\n }\n else {\n util_3.forEach(write.children, function (pathString, node) {\n affectedTree_1 = affectedTree_1.set(new Path_1.Path(pathString), node);\n });\n }\n return this.applyOperationToSyncPoints_(new AckUserWrite_1.AckUserWrite(write.path, affectedTree_1, revert));\n }\n };\n /**\n * Apply new server data for the specified path..\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerOverwrite = function (path, newData) {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.Server, path, newData));\n };\n /**\n * Apply new server data to be merged in at the specified path.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerMerge = function (path, changedChildren) {\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.Server, path, changeTree));\n };\n /**\n * Apply a listen complete for a query\n *\n * @param {!Path} path\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyListenComplete = function (path) {\n return this.applyOperationToSyncPoints_(new ListenComplete_1.ListenComplete(Operation_1.OperationSource.Server, path));\n };\n /**\n * Apply new server data for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryOverwrite = function (path, snap, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey != null) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new Overwrite_1.Overwrite(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, snap);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // Query must have been removed already\n return [];\n }\n };\n /**\n * Apply server data to be merged in for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryMerge = function (path, changedChildren, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n var op = new Merge_1.Merge(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, changeTree);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Apply a listen complete for a tagged query\n *\n * @param {!Path} path\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedListenComplete = function (path, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new ListenComplete_1.ListenComplete(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.addEventRegistration = function (query, eventRegistration) {\n var path = query.path;\n var serverCache = null;\n var foundAncestorDefaultView = false;\n // Any covering writes will necessarily be at the root, so really all we need to find is the server cache.\n // Consider optimizing this once there's a better understanding of what actual behavior will be.\n this.syncPointTree_.foreachOnPath(path, function (pathToSyncPoint, sp) {\n var relativePath = Path_1.Path.relativePath(pathToSyncPoint, path);\n serverCache = serverCache || sp.getCompleteServerCache(relativePath);\n foundAncestorDefaultView =\n foundAncestorDefaultView || sp.hasCompleteView();\n });\n var syncPoint = this.syncPointTree_.get(path);\n if (!syncPoint) {\n syncPoint = new SyncPoint_1.SyncPoint();\n this.syncPointTree_ = this.syncPointTree_.set(path, syncPoint);\n }\n else {\n foundAncestorDefaultView =\n foundAncestorDefaultView || syncPoint.hasCompleteView();\n serverCache = serverCache || syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var serverCacheComplete;\n if (serverCache != null) {\n serverCacheComplete = true;\n }\n else {\n serverCacheComplete = false;\n serverCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var subtree = this.syncPointTree_.subtree(path);\n subtree.foreachChild(function (childName, childSyncPoint) {\n var completeCache = childSyncPoint.getCompleteServerCache(Path_1.Path.Empty);\n if (completeCache) {\n serverCache = serverCache.updateImmediateChild(childName, completeCache);\n }\n });\n }\n var viewAlreadyExists = syncPoint.viewExistsForQuery(query);\n if (!viewAlreadyExists && !query.getQueryParams().loadsAllData()) {\n // We need to track a tag for this query\n var queryKey = SyncTree.makeQueryKey_(query);\n util_1.assert(!(queryKey in this.queryToTagMap_), 'View does not exist, but we have a tag');\n var tag = SyncTree.getNextQueryTag_();\n this.queryToTagMap_[queryKey] = tag;\n // Coerce to string to avoid sparse arrays.\n this.tagToQueryMap_['_' + tag] = queryKey;\n }\n var writesCache = this.pendingWriteTree_.childWrites(path);\n var events = syncPoint.addEventRegistration(query, eventRegistration, writesCache, serverCache, serverCacheComplete);\n if (!viewAlreadyExists && !foundAncestorDefaultView) {\n var view /** @type !View */ = syncPoint.viewForQuery(query);\n events = events.concat(this.setupListener_(query, view));\n }\n return events;\n };\n /**\n * Remove event callback(s).\n *\n * If query is the default query, we'll check all queries for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified query/queries.\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, all callbacks are removed.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n SyncTree.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var _this = this;\n // Find the syncPoint first. Then deal with whether or not it has matching listeners\n var path = query.path;\n var maybeSyncPoint = this.syncPointTree_.get(path);\n var cancelEvents = [];\n // A removal on a default query affects all queries at that location. A removal on an indexed query, even one without\n // other query constraints, does *not* affect all queries at that location. So this check must be for 'default', and\n // not loadsAllData().\n if (maybeSyncPoint &&\n (query.queryIdentifier() === 'default' ||\n maybeSyncPoint.viewExistsForQuery(query))) {\n /**\n * @type {{removed: !Array., events: !Array.}}\n */\n var removedAndEvents = maybeSyncPoint.removeEventRegistration(query, eventRegistration, cancelError);\n if (maybeSyncPoint.isEmpty()) {\n this.syncPointTree_ = this.syncPointTree_.remove(path);\n }\n var removed = removedAndEvents.removed;\n cancelEvents = removedAndEvents.events;\n // We may have just removed one of many listeners and can short-circuit this whole process\n // We may also not have removed a default listener, in which case all of the descendant listeners should already be\n // properly set up.\n //\n // Since indexed queries can shadow if they don't have other query constraints, check for loadsAllData(), instead of\n // queryId === 'default'\n var removingDefault = -1 !==\n removed.findIndex(function (query) {\n return query.getQueryParams().loadsAllData();\n });\n var covered = this.syncPointTree_.findOnPath(path, function (relativePath, parentSyncPoint) {\n return parentSyncPoint.hasCompleteView();\n });\n if (removingDefault && !covered) {\n var subtree = this.syncPointTree_.subtree(path);\n // There are potentially child listeners. Determine what if any listens we need to send before executing the\n // removal\n if (!subtree.isEmpty()) {\n // We need to fold over our subtree and collect the listeners to send\n var newViews = this.collectDistinctViewsForSubTree_(subtree);\n // Ok, we've collected all the listens we need. Set them up.\n for (var i = 0; i < newViews.length; ++i) {\n var view = newViews[i], newQuery = view.getQuery();\n var listener = this.createListenerForView_(view);\n this.listenProvider_.startListening(SyncTree.queryForListening_(newQuery), this.tagForQuery_(newQuery), listener.hashFn, listener.onComplete);\n }\n }\n else {\n // There's nothing below us, so nothing we need to start listening on\n }\n }\n // If we removed anything and we're not covered by a higher up listen, we need to stop listening on this query\n // The above block has us covered in terms of making sure we're set up on listens lower in the tree.\n // Also, note that if we have a cancelError, it's already been removed at the provider level.\n if (!covered && removed.length > 0 && !cancelError) {\n // If we removed a default, then we weren't listening on any of the other queries here. Just cancel the one\n // default. Otherwise, we need to iterate through and cancel each individual query\n if (removingDefault) {\n // We don't tag default listeners\n var defaultTag = null;\n this.listenProvider_.stopListening(SyncTree.queryForListening_(query), defaultTag);\n }\n else {\n removed.forEach(function (queryToRemove) {\n var tagToRemove = _this.queryToTagMap_[SyncTree.makeQueryKey_(queryToRemove)];\n _this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToRemove), tagToRemove);\n });\n }\n }\n // Now, clear all of the tags we're tracking for the removed listens\n this.removeTags_(removed);\n }\n else {\n // No-op, this listener must've been already removed\n }\n return cancelEvents;\n };\n /**\n * Returns a complete cache, if we have one, of the data at a particular path. The location must have a listener above\n * it, but as this is only used by transaction code, that should always be the case anyways.\n *\n * Note: this method will *include* hidden writes from transaction with applyLocally set to false.\n * @param {!Path} path The path to the data we want\n * @param {Array.=} writeIdsToExclude A specific set to be excluded\n * @return {?Node}\n */\n SyncTree.prototype.calcCompleteEventCache = function (path, writeIdsToExclude) {\n var includeHiddenSets = true;\n var writeTree = this.pendingWriteTree_;\n var serverCache = this.syncPointTree_.findOnPath(path, function (pathSoFar, syncPoint) {\n var relativePath = Path_1.Path.relativePath(pathSoFar, path);\n var serverCache = syncPoint.getCompleteServerCache(relativePath);\n if (serverCache) {\n return serverCache;\n }\n });\n return writeTree.calcCompleteEventCache(path, serverCache, writeIdsToExclude, includeHiddenSets);\n };\n /**\n * This collapses multiple unfiltered views into a single view, since we only need a single\n * listener for them.\n *\n * @param {!ImmutableTree.} subtree\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.collectDistinctViewsForSubTree_ = function (subtree) {\n return subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (maybeChildSyncPoint && maybeChildSyncPoint.hasCompleteView()) {\n var completeView = maybeChildSyncPoint.getCompleteView();\n return [completeView];\n }\n else {\n // No complete view here, flatten any deeper listens into an array\n var views_1 = [];\n if (maybeChildSyncPoint) {\n views_1 = maybeChildSyncPoint.getQueryViews();\n }\n util_3.forEach(childMap, function (key, childViews) {\n views_1 = views_1.concat(childViews);\n });\n return views_1;\n }\n });\n };\n /**\n * @param {!Array.} queries\n * @private\n */\n SyncTree.prototype.removeTags_ = function (queries) {\n for (var j = 0; j < queries.length; ++j) {\n var removedQuery = queries[j];\n if (!removedQuery.getQueryParams().loadsAllData()) {\n // We should have a tag for this\n var removedQueryKey = SyncTree.makeQueryKey_(removedQuery);\n var removedQueryTag = this.queryToTagMap_[removedQueryKey];\n delete this.queryToTagMap_[removedQueryKey];\n delete this.tagToQueryMap_['_' + removedQueryTag];\n }\n }\n };\n /**\n * Normalizes a query to a query we send the server for listening\n * @param {!Query} query\n * @return {!Query} The normalized query\n * @private\n */\n SyncTree.queryForListening_ = function (query) {\n if (query.getQueryParams().loadsAllData() &&\n !query.getQueryParams().isDefault()) {\n // We treat queries that load all data as default queries\n // Cast is necessary because ref() technically returns Firebase which is actually fb.api.Firebase which inherits\n // from Query\n return /** @type {!Query} */ query.getRef();\n }\n else {\n return query;\n }\n };\n /**\n * For a given new listen, manage the de-duplication of outstanding subscriptions.\n *\n * @param {!Query} query\n * @param {!View} view\n * @return {!Array.} This method can return events to support synchronous data sources\n * @private\n */\n SyncTree.prototype.setupListener_ = function (query, view) {\n var path = query.path;\n var tag = this.tagForQuery_(query);\n var listener = this.createListenerForView_(view);\n var events = this.listenProvider_.startListening(SyncTree.queryForListening_(query), tag, listener.hashFn, listener.onComplete);\n var subtree = this.syncPointTree_.subtree(path);\n // The root of this subtree has our query. We're here because we definitely need to send a listen for that, but we\n // may need to shadow other listens as well.\n if (tag) {\n util_1.assert(!subtree.value.hasCompleteView(), \"If we're adding a query, it shouldn't be shadowed\");\n }\n else {\n // Shadow everything at or below this location, this is a default listener.\n var queriesToStop = subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (!relativePath.isEmpty() &&\n maybeChildSyncPoint &&\n maybeChildSyncPoint.hasCompleteView()) {\n return [maybeChildSyncPoint.getCompleteView().getQuery()];\n }\n else {\n // No default listener here, flatten any deeper queries into an array\n var queries_1 = [];\n if (maybeChildSyncPoint) {\n queries_1 = queries_1.concat(maybeChildSyncPoint.getQueryViews().map(function (view) { return view.getQuery(); }));\n }\n util_3.forEach(childMap, function (key, childQueries) {\n queries_1 = queries_1.concat(childQueries);\n });\n return queries_1;\n }\n });\n for (var i = 0; i < queriesToStop.length; ++i) {\n var queryToStop = queriesToStop[i];\n this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToStop), this.tagForQuery_(queryToStop));\n }\n }\n return events;\n };\n /**\n *\n * @param {!View} view\n * @return {{hashFn: function(), onComplete: function(!string, *)}}\n * @private\n */\n SyncTree.prototype.createListenerForView_ = function (view) {\n var _this = this;\n var query = view.getQuery();\n var tag = this.tagForQuery_(query);\n return {\n hashFn: function () {\n var cache = view.getServerCache() || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return cache.hash();\n },\n onComplete: function (status) {\n if (status === 'ok') {\n if (tag) {\n return _this.applyTaggedListenComplete(query.path, tag);\n }\n else {\n return _this.applyListenComplete(query.path);\n }\n }\n else {\n // If a listen failed, kill all of the listeners here, not just the one that triggered the error.\n // Note that this may need to be scoped to just this listener if we change permissions on filtered children\n var error = util_2.errorForServerCode(status, query);\n return _this.removeEventRegistration(query, \n /*eventRegistration*/ null, error);\n }\n }\n };\n };\n /**\n * Given a query, computes a \"queryKey\" suitable for use in our queryToTagMap_.\n * @private\n * @param {!Query} query\n * @return {string}\n */\n SyncTree.makeQueryKey_ = function (query) {\n return query.path.toString() + '$' + query.queryIdentifier();\n };\n /**\n * Given a queryKey (created by makeQueryKey), parse it back into a path and queryId.\n * @private\n * @param {!string} queryKey\n * @return {{queryId: !string, path: !Path}}\n */\n SyncTree.parseQueryKey_ = function (queryKey) {\n var splitIndex = queryKey.indexOf('$');\n util_1.assert(splitIndex !== -1 && splitIndex < queryKey.length - 1, 'Bad queryKey.');\n return {\n queryId: queryKey.substr(splitIndex + 1),\n path: new Path_1.Path(queryKey.substr(0, splitIndex))\n };\n };\n /**\n * Return the query associated with the given tag, if we have one\n * @param {!number} tag\n * @return {?string}\n * @private\n */\n SyncTree.prototype.queryKeyForTag_ = function (tag) {\n return this.tagToQueryMap_['_' + tag];\n };\n /**\n * Return the tag associated with the given query.\n * @param {!Query} query\n * @return {?number}\n * @private\n */\n SyncTree.prototype.tagForQuery_ = function (query) {\n var queryKey = SyncTree.makeQueryKey_(query);\n return util_3.safeGet(this.queryToTagMap_, queryKey);\n };\n /**\n * Static accessor for query tags.\n * @return {number}\n * @private\n */\n SyncTree.getNextQueryTag_ = function () {\n return SyncTree.nextQueryTag_++;\n };\n /**\n * A helper method to apply tagged operations\n *\n * @param {!Path} queryPath\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyTaggedOperation_ = function (queryPath, operation) {\n var syncPoint = this.syncPointTree_.get(queryPath);\n util_1.assert(syncPoint, \"Missing sync point for query tag that we're tracking\");\n var writesCache = this.pendingWriteTree_.childWrites(queryPath);\n return syncPoint.applyOperation(operation, writesCache, \n /*serverCache=*/ null);\n };\n /**\n * A helper method that visits all descendant and ancestor SyncPoints, applying the operation.\n *\n * NOTES:\n * - Descendant SyncPoints will be visited first (since we raise events depth-first).\n \n * - We call applyOperation() on each SyncPoint passing three things:\n * 1. A version of the Operation that has been made relative to the SyncPoint location.\n * 2. A WriteTreeRef of any writes we have cached at the SyncPoint location.\n * 3. A snapshot Node with cached server data, if we have it.\n \n * - We concatenate all of the events returned by each SyncPoint and return the result.\n *\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyOperationToSyncPoints_ = function (operation) {\n return this.applyOperationHelper_(operation, this.syncPointTree_, \n /*serverCache=*/ null, this.pendingWriteTree_.childWrites(Path_1.Path.Empty));\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n if (operation.path.isEmpty()) {\n return this.applyOperationDescendantsHelper_(operation, syncPointTree, serverCache, writesCache);\n }\n else {\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n var childName = operation.path.getFront();\n var childOperation = operation.operationForChild(childName);\n var childTree = syncPointTree.children.get(childName);\n if (childTree && childOperation) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n events = events.concat(this.applyOperationHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n }\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationDescendantsHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n var _this = this;\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n syncPointTree.children.inorderTraversal(function (childName, childTree) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n var childOperation = operation.operationForChild(childName);\n if (childOperation) {\n events = events.concat(_this.applyOperationDescendantsHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n });\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n };\n /**\n * Static tracker for next query tag.\n * @type {number}\n * @private\n */\n SyncTree.nextQueryTag_ = 1;\n return SyncTree;\n}());\nexports.SyncTree = SyncTree;\n\n//# sourceMappingURL=SyncTree.js.map\n\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar Operation_1 = __webpack_require__(8);\nvar AckUserWrite = /** @class */ (function () {\n /**\n *\n * @param {!Path} path\n * @param {!ImmutableTree} affectedTree A tree containing true for each affected path. Affected paths can't overlap.\n * @param {!boolean} revert\n */\n function AckUserWrite(\n /**@inheritDoc */ path, \n /**@inheritDoc */ affectedTree, \n /**@inheritDoc */ revert) {\n this.path = path;\n this.affectedTree = affectedTree;\n this.revert = revert;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.ACK_USER_WRITE;\n /** @inheritDoc */\n this.source = Operation_1.OperationSource.User;\n }\n /**\n * @inheritDoc\n */\n AckUserWrite.prototype.operationForChild = function (childName) {\n if (!this.path.isEmpty()) {\n util_1.assert(this.path.getFront() === childName, 'operationForChild called for unrelated child.');\n return new AckUserWrite(this.path.popFront(), this.affectedTree, this.revert);\n }\n else if (this.affectedTree.value != null) {\n util_1.assert(this.affectedTree.children.isEmpty(), 'affectedTree should not have overlapping affected paths.');\n // All child locations are affected as well; just return same operation.\n return this;\n }\n else {\n var childTree = this.affectedTree.subtree(new Path_1.Path(childName));\n return new AckUserWrite(Path_1.Path.Empty, childTree, this.revert);\n }\n };\n return AckUserWrite;\n}());\nexports.AckUserWrite = AckUserWrite;\n\n//# sourceMappingURL=AckUserWrite.js.map\n\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = __webpack_require__(2);\nvar Operation_1 = __webpack_require__(8);\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @constructor\n * @implements {Operation}\n */\nvar ListenComplete = /** @class */ (function () {\n function ListenComplete(source, path) {\n this.source = source;\n this.path = path;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.LISTEN_COMPLETE;\n }\n ListenComplete.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new ListenComplete(this.source, Path_1.Path.Empty);\n }\n else {\n return new ListenComplete(this.source, this.path.popFront());\n }\n };\n return ListenComplete;\n}());\nexports.ListenComplete = ListenComplete;\n\n//# sourceMappingURL=ListenComplete.js.map\n\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = __webpack_require__(8);\nvar Overwrite_1 = __webpack_require__(46);\nvar Path_1 = __webpack_require__(2);\nvar util_1 = __webpack_require__(0);\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!ImmutableTree.} children\n * @constructor\n * @implements {Operation}\n */\nvar Merge = /** @class */ (function () {\n function Merge(\n /**@inheritDoc */ source, \n /**@inheritDoc */ path, \n /**@inheritDoc */ children) {\n this.source = source;\n this.path = path;\n this.children = children;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.MERGE;\n }\n /**\n * @inheritDoc\n */\n Merge.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n var childTree = this.children.subtree(new Path_1.Path(childName));\n if (childTree.isEmpty()) {\n // This child is unaffected\n return null;\n }\n else if (childTree.value) {\n // We have a snapshot for the child in question. This becomes an overwrite of the child.\n return new Overwrite_1.Overwrite(this.source, Path_1.Path.Empty, childTree.value);\n }\n else {\n // This is a merge at a deeper level\n return new Merge(this.source, Path_1.Path.Empty, childTree);\n }\n }\n else {\n util_1.assert(this.path.getFront() === childName, \"Can't get a merge for a child not on the path of the operation\");\n return new Merge(this.source, this.path.popFront(), this.children);\n }\n };\n /**\n * @inheritDoc\n */\n Merge.prototype.toString = function () {\n return ('Operation(' +\n this.path +\n ': ' +\n this.source.toString() +\n ' merge: ' +\n this.children.toString() +\n ')');\n };\n return Merge;\n}());\nexports.Merge = Merge;\n\n//# sourceMappingURL=Merge.js.map\n\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = __webpack_require__(24);\nvar ViewProcessor_1 = __webpack_require__(91);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar CacheNode_1 = __webpack_require__(18);\nvar ViewCache_1 = __webpack_require__(48);\nvar EventGenerator_1 = __webpack_require__(94);\nvar util_1 = __webpack_require__(0);\nvar Operation_1 = __webpack_require__(8);\nvar Change_1 = __webpack_require__(9);\nvar PriorityIndex_1 = __webpack_require__(3);\n/**\n * A view represents a specific location and query that has 1 or more event registrations.\n *\n * It does several things:\n * - Maintains the list of event registrations for this location/query.\n * - Maintains a cache of the data visible for this location/query.\n * - Applies new operations (via applyOperation), updates the cache, and based on the event\n * registrations returns the set of events to be raised.\n * @constructor\n */\nvar View = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n * @param {!ViewCache} initialViewCache\n */\n function View(query_, initialViewCache) {\n this.query_ = query_;\n this.eventRegistrations_ = [];\n var params = this.query_.getQueryParams();\n var indexFilter = new IndexedFilter_1.IndexedFilter(params.getIndex());\n var filter = params.getNodeFilter();\n /**\n * @type {ViewProcessor}\n * @private\n */\n this.processor_ = new ViewProcessor_1.ViewProcessor(filter);\n var initialServerCache = initialViewCache.getServerCache();\n var initialEventCache = initialViewCache.getEventCache();\n // Don't filter server node with other filter than index, wait for tagged listen\n var serverSnap = indexFilter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialServerCache.getNode(), null);\n var eventSnap = filter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialEventCache.getNode(), null);\n var newServerCache = new CacheNode_1.CacheNode(serverSnap, initialServerCache.isFullyInitialized(), indexFilter.filtersNodes());\n var newEventCache = new CacheNode_1.CacheNode(eventSnap, initialEventCache.isFullyInitialized(), filter.filtersNodes());\n /**\n * @type {!ViewCache}\n * @private\n */\n this.viewCache_ = new ViewCache_1.ViewCache(newEventCache, newServerCache);\n /**\n * @type {!EventGenerator}\n * @private\n */\n this.eventGenerator_ = new EventGenerator_1.EventGenerator(this.query_);\n }\n /**\n * @return {!Query}\n */\n View.prototype.getQuery = function () {\n return this.query_;\n };\n /**\n * @return {?Node}\n */\n View.prototype.getServerCache = function () {\n return this.viewCache_.getServerCache().getNode();\n };\n /**\n * @param {!Path} path\n * @return {?Node}\n */\n View.prototype.getCompleteServerCache = function (path) {\n var cache = this.viewCache_.getCompleteServerSnap();\n if (cache) {\n // If this isn't a \"loadsAllData\" view, then cache isn't actually a complete cache and\n // we need to see if it contains the child we're interested in.\n if (this.query_.getQueryParams().loadsAllData() ||\n (!path.isEmpty() && !cache.getImmediateChild(path.getFront()).isEmpty())) {\n return cache.getChild(path);\n }\n }\n return null;\n };\n /**\n * @return {boolean}\n */\n View.prototype.isEmpty = function () {\n return this.eventRegistrations_.length === 0;\n };\n /**\n * @param {!EventRegistration} eventRegistration\n */\n View.prototype.addEventRegistration = function (eventRegistration) {\n this.eventRegistrations_.push(eventRegistration);\n };\n /**\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n View.prototype.removeEventRegistration = function (eventRegistration, cancelError) {\n var cancelEvents = [];\n if (cancelError) {\n util_1.assert(eventRegistration == null, 'A cancel should cancel all event registrations.');\n var path_1 = this.query_.path;\n this.eventRegistrations_.forEach(function (registration) {\n cancelError /** @type {!Error} */ = cancelError;\n var maybeEvent = registration.createCancelEvent(cancelError, path_1);\n if (maybeEvent) {\n cancelEvents.push(maybeEvent);\n }\n });\n }\n if (eventRegistration) {\n var remaining = [];\n for (var i = 0; i < this.eventRegistrations_.length; ++i) {\n var existing = this.eventRegistrations_[i];\n if (!existing.matches(eventRegistration)) {\n remaining.push(existing);\n }\n else if (eventRegistration.hasAnyCallback()) {\n // We're removing just this one\n remaining = remaining.concat(this.eventRegistrations_.slice(i + 1));\n break;\n }\n }\n this.eventRegistrations_ = remaining;\n }\n else {\n this.eventRegistrations_ = [];\n }\n return cancelEvents;\n };\n /**\n * Applies the given Operation, updates our cache, and returns the appropriate events.\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @return {!Array.}\n */\n View.prototype.applyOperation = function (operation, writesCache, completeServerCache) {\n if (operation.type === Operation_1.OperationType.MERGE &&\n operation.source.queryId !== null) {\n util_1.assert(this.viewCache_.getCompleteServerSnap(), 'We should always have a full cache before handling merges');\n util_1.assert(this.viewCache_.getCompleteEventSnap(), 'Missing event cache, even though we have a server cache');\n }\n var oldViewCache = this.viewCache_;\n var result = this.processor_.applyOperation(oldViewCache, operation, writesCache, completeServerCache);\n this.processor_.assertIndexed(result.viewCache);\n util_1.assert(result.viewCache.getServerCache().isFullyInitialized() ||\n !oldViewCache.getServerCache().isFullyInitialized(), 'Once a server snap is complete, it should never go back');\n this.viewCache_ = result.viewCache;\n return this.generateEventsForChanges_(result.changes, result.viewCache.getEventCache().getNode(), null);\n };\n /**\n * @param {!EventRegistration} registration\n * @return {!Array.}\n */\n View.prototype.getInitialEvents = function (registration) {\n var eventSnap = this.viewCache_.getEventCache();\n var initialChanges = [];\n if (!eventSnap.getNode().isLeafNode()) {\n var eventNode = eventSnap.getNode();\n eventNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n initialChanges.push(Change_1.Change.childAddedChange(key, childNode));\n });\n }\n if (eventSnap.isFullyInitialized()) {\n initialChanges.push(Change_1.Change.valueChange(eventSnap.getNode()));\n }\n return this.generateEventsForChanges_(initialChanges, eventSnap.getNode(), registration);\n };\n /**\n * @private\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {EventRegistration=} eventRegistration\n * @return {!Array.}\n */\n View.prototype.generateEventsForChanges_ = function (changes, eventCache, eventRegistration) {\n var registrations = eventRegistration\n ? [eventRegistration]\n : this.eventRegistrations_;\n return this.eventGenerator_.generateEventsForChanges(changes, eventCache, registrations);\n };\n return View;\n}());\nexports.View = View;\n\n//# sourceMappingURL=View.js.map\n\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = __webpack_require__(8);\nvar util_1 = __webpack_require__(0);\nvar ChildChangeAccumulator_1 = __webpack_require__(92);\nvar Change_1 = __webpack_require__(9);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar KeyIndex_1 = __webpack_require__(10);\nvar ImmutableTree_1 = __webpack_require__(23);\nvar Path_1 = __webpack_require__(2);\nvar CompleteChildSource_1 = __webpack_require__(93);\n/**\n * @constructor\n * @struct\n */\nvar ProcessorResult = /** @class */ (function () {\n /**\n * @param {!ViewCache} viewCache\n * @param {!Array.} changes\n */\n function ProcessorResult(viewCache, changes) {\n this.viewCache = viewCache;\n this.changes = changes;\n }\n return ProcessorResult;\n}());\nexports.ProcessorResult = ProcessorResult;\n/**\n * @constructor\n */\nvar ViewProcessor = /** @class */ (function () {\n /**\n * @param {!NodeFilter} filter_\n */\n function ViewProcessor(filter_) {\n this.filter_ = filter_;\n }\n /**\n * @param {!ViewCache} viewCache\n */\n ViewProcessor.prototype.assertIndexed = function (viewCache) {\n util_1.assert(viewCache\n .getEventCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Event snap not indexed');\n util_1.assert(viewCache\n .getServerCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Server snap not indexed');\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @return {!ProcessorResult}\n */\n ViewProcessor.prototype.applyOperation = function (oldViewCache, operation, writesCache, completeCache) {\n var accumulator = new ChildChangeAccumulator_1.ChildChangeAccumulator();\n var newViewCache, filterServerNode;\n if (operation.type === Operation_1.OperationType.OVERWRITE) {\n var overwrite = operation;\n if (overwrite.source.fromUser) {\n newViewCache = this.applyUserOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(overwrite.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered and the\n // update is not at the root in which case it is ok (and necessary) to mark the node unfiltered\n // again\n filterServerNode =\n overwrite.source.tagged ||\n (oldViewCache.getServerCache().isFiltered() &&\n !overwrite.path.isEmpty());\n newViewCache = this.applyServerOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.MERGE) {\n var merge = operation;\n if (merge.source.fromUser) {\n newViewCache = this.applyUserMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(merge.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered\n filterServerNode =\n merge.source.tagged || oldViewCache.getServerCache().isFiltered();\n newViewCache = this.applyServerMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.ACK_USER_WRITE) {\n var ackUserWrite = operation;\n if (!ackUserWrite.revert) {\n newViewCache = this.ackUserWrite_(oldViewCache, ackUserWrite.path, ackUserWrite.affectedTree, writesCache, completeCache, accumulator);\n }\n else {\n newViewCache = this.revertUserWrite_(oldViewCache, ackUserWrite.path, writesCache, completeCache, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.LISTEN_COMPLETE) {\n newViewCache = this.listenComplete_(oldViewCache, operation.path, writesCache, accumulator);\n }\n else {\n throw util_1.assertionError('Unknown operation type: ' + operation.type);\n }\n var changes = accumulator.getChanges();\n ViewProcessor.maybeAddValueEvent_(oldViewCache, newViewCache, changes);\n return new ProcessorResult(newViewCache, changes);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!ViewCache} newViewCache\n * @param {!Array.} accumulator\n * @private\n */\n ViewProcessor.maybeAddValueEvent_ = function (oldViewCache, newViewCache, accumulator) {\n var eventSnap = newViewCache.getEventCache();\n if (eventSnap.isFullyInitialized()) {\n var isLeafOrEmpty = eventSnap.getNode().isLeafNode() || eventSnap.getNode().isEmpty();\n var oldCompleteSnap = oldViewCache.getCompleteEventSnap();\n if (accumulator.length > 0 ||\n !oldViewCache.getEventCache().isFullyInitialized() ||\n (isLeafOrEmpty &&\n !eventSnap\n .getNode()\n .equals(/** @type {!Node} */ (oldCompleteSnap))) ||\n !eventSnap\n .getNode()\n .getPriority()\n .equals(oldCompleteSnap.getPriority())) {\n accumulator.push(Change_1.Change.valueChange(\n /** @type {!Node} */ newViewCache.getCompleteEventSnap()));\n }\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} changePath\n * @param {!WriteTreeRef} writesCache\n * @param {!CompleteChildSource} source\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.generateEventCacheAfterServerEvent_ = function (viewCache, changePath, writesCache, source, accumulator) {\n var oldEventSnap = viewCache.getEventCache();\n if (writesCache.shadowingWrite(changePath) != null) {\n // we have a shadowing write, ignore changes\n return viewCache;\n }\n else {\n var newEventCache = void 0, serverNode = void 0;\n if (changePath.isEmpty()) {\n // TODO: figure out how this plays with \"sliding ack windows\"\n util_1.assert(viewCache.getServerCache().isFullyInitialized(), 'If change path is empty, we must have complete server data');\n if (viewCache.getServerCache().isFiltered()) {\n // We need to special case this, because we need to only apply writes to complete children, or\n // we might end up raising events for incomplete children. If the server data is filtered deep\n // writes cannot be guaranteed to be complete\n var serverCache = viewCache.getCompleteServerSnap();\n var completeChildren = serverCache instanceof ChildrenNode_1.ChildrenNode\n ? serverCache\n : ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var completeEventChildren = writesCache.calcCompleteEventChildren(completeChildren);\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeEventChildren, accumulator);\n }\n else {\n var completeNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeNode, accumulator);\n }\n }\n else {\n var childKey = changePath.getFront();\n if (childKey == '.priority') {\n util_1.assert(changePath.getLength() == 1, \"Can't have a priority with additional path components\");\n var oldEventNode = oldEventSnap.getNode();\n serverNode = viewCache.getServerCache().getNode();\n // we might have overwrites for this priority\n var updatedPriority = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventNode, serverNode);\n if (updatedPriority != null) {\n newEventCache = this.filter_.updatePriority(oldEventNode, updatedPriority);\n }\n else {\n // priority didn't change, keep old node\n newEventCache = oldEventSnap.getNode();\n }\n }\n else {\n var childChangePath = changePath.popFront();\n // update child\n var newEventChild = void 0;\n if (oldEventSnap.isCompleteForChild(childKey)) {\n serverNode = viewCache.getServerCache().getNode();\n var eventChildUpdate = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventSnap.getNode(), serverNode);\n if (eventChildUpdate != null) {\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey)\n .updateChild(childChangePath, eventChildUpdate);\n }\n else {\n // Nothing changed, just keep the old child\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey);\n }\n }\n else {\n newEventChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n }\n if (newEventChild != null) {\n newEventCache = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newEventChild, childChangePath, source, accumulator);\n }\n else {\n // no complete child available or no change\n newEventCache = oldEventSnap.getNode();\n }\n }\n }\n return viewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized() || changePath.isEmpty(), this.filter_.filtersNodes());\n }\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, filterServerNode, accumulator) {\n var oldServerSnap = oldViewCache.getServerCache();\n var newServerCache;\n var serverFilter = filterServerNode\n ? this.filter_\n : this.filter_.getIndexedFilter();\n if (changePath.isEmpty()) {\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), changedSnap, null);\n }\n else if (serverFilter.filtersNodes() && !oldServerSnap.isFiltered()) {\n // we want to filter the server node, but we didn't filter the server node yet, so simulate a full update\n var newServerNode = oldServerSnap\n .getNode()\n .updateChild(changePath, changedSnap);\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), newServerNode, null);\n }\n else {\n var childKey = changePath.getFront();\n if (!oldServerSnap.isCompleteForPath(changePath) &&\n changePath.getLength() > 1) {\n // We don't update incomplete nodes with updates intended for other listeners\n return oldViewCache;\n }\n var childChangePath = changePath.popFront();\n var childNode = oldServerSnap.getNode().getImmediateChild(childKey);\n var newChildNode = childNode.updateChild(childChangePath, changedSnap);\n if (childKey == '.priority') {\n newServerCache = serverFilter.updatePriority(oldServerSnap.getNode(), newChildNode);\n }\n else {\n newServerCache = serverFilter.updateChild(oldServerSnap.getNode(), childKey, newChildNode, childChangePath, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, null);\n }\n }\n var newViewCache = oldViewCache.updateServerSnap(newServerCache, oldServerSnap.isFullyInitialized() || changePath.isEmpty(), serverFilter.filtersNodes());\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, newViewCache, completeCache);\n return this.generateEventCacheAfterServerEvent_(newViewCache, changePath, writesCache, source, accumulator);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, accumulator) {\n var oldEventSnap = oldViewCache.getEventCache();\n var newViewCache, newEventCache;\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, oldViewCache, completeCache);\n if (changePath.isEmpty()) {\n newEventCache = this.filter_.updateFullNode(oldViewCache.getEventCache().getNode(), changedSnap, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, true, this.filter_.filtersNodes());\n }\n else {\n var childKey = changePath.getFront();\n if (childKey === '.priority') {\n newEventCache = this.filter_.updatePriority(oldViewCache.getEventCache().getNode(), changedSnap);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized(), oldEventSnap.isFiltered());\n }\n else {\n var childChangePath = changePath.popFront();\n var oldChild = oldEventSnap.getNode().getImmediateChild(childKey);\n var newChild = void 0;\n if (childChangePath.isEmpty()) {\n // Child overwrite, we can replace the child\n newChild = changedSnap;\n }\n else {\n var childNode = source.getCompleteChild(childKey);\n if (childNode != null) {\n if (childChangePath.getBack() === '.priority' &&\n childNode.getChild(childChangePath.parent()).isEmpty()) {\n // This is a priority update on an empty node. If this node exists on the server, the\n // server will send down the priority in the update, so ignore for now\n newChild = childNode;\n }\n else {\n newChild = childNode.updateChild(childChangePath, changedSnap);\n }\n }\n else {\n // There is no complete child node available\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n }\n if (!oldChild.equals(newChild)) {\n var newEventSnap = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newChild, childChangePath, source, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventSnap, oldEventSnap.isFullyInitialized(), this.filter_.filtersNodes());\n }\n else {\n newViewCache = oldViewCache;\n }\n }\n }\n return newViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {string} childKey\n * @return {boolean}\n * @private\n */\n ViewProcessor.cacheHasChild_ = function (viewCache, childKey) {\n return viewCache.getEventCache().isCompleteForChild(childKey);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, accumulator) {\n var _this = this;\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (!ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!Node} node\n * @param {ImmutableTree.} merge\n * @return {!Node}\n * @private\n */\n ViewProcessor.prototype.applyMerge_ = function (node, merge) {\n merge.foreach(function (relativePath, childNode) {\n node = node.updateChild(relativePath, childNode);\n });\n return node;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, filterServerNode, accumulator) {\n var _this = this;\n // If we don't have a cache yet, this merge was intended for a previously listen in the same location. Ignore it and\n // wait for the complete data update coming soon.\n if (viewCache\n .getServerCache()\n .getNode()\n .isEmpty() &&\n !viewCache.getServerCache().isFullyInitialized()) {\n return viewCache;\n }\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n var viewMergeTree;\n if (path.isEmpty()) {\n viewMergeTree = changedChildren;\n }\n else {\n viewMergeTree = ImmutableTree_1.ImmutableTree.Empty.setTree(path, changedChildren);\n }\n var serverNode = viewCache.getServerCache().getNode();\n viewMergeTree.children.inorderTraversal(function (childKey, childTree) {\n if (serverNode.hasChild(childKey)) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n viewMergeTree.children.inorderTraversal(function (childKey, childMergeTree) {\n var isUnknownDeepMerge = !viewCache.getServerCache().isCompleteForChild(childKey) &&\n childMergeTree.value == null;\n if (!serverNode.hasChild(childKey) && !isUnknownDeepMerge) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childMergeTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} ackPath\n * @param {!ImmutableTree} affectedTree\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.ackUserWrite_ = function (viewCache, ackPath, affectedTree, writesCache, completeCache, accumulator) {\n if (writesCache.shadowingWrite(ackPath) != null) {\n return viewCache;\n }\n // Only filter server node if it is currently filtered\n var filterServerNode = viewCache.getServerCache().isFiltered();\n // Essentially we'll just get our existing server cache for the affected paths and re-apply it as a server update\n // now that it won't be shadowed.\n var serverCache = viewCache.getServerCache();\n if (affectedTree.value != null) {\n // This is an overwrite.\n if ((ackPath.isEmpty() && serverCache.isFullyInitialized()) ||\n serverCache.isCompleteForPath(ackPath)) {\n return this.applyServerOverwrite_(viewCache, ackPath, serverCache.getNode().getChild(ackPath), writesCache, completeCache, filterServerNode, accumulator);\n }\n else if (ackPath.isEmpty()) {\n // This is a goofy edge case where we are acking data at this location but don't have full data. We\n // should just re-apply whatever we have in our cache as a merge.\n var changedChildren_1 = ImmutableTree_1.ImmutableTree.Empty;\n serverCache.getNode().forEachChild(KeyIndex_1.KEY_INDEX, function (name, node) {\n changedChildren_1 = changedChildren_1.set(new Path_1.Path(name), node);\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_1, writesCache, completeCache, filterServerNode, accumulator);\n }\n else {\n return viewCache;\n }\n }\n else {\n // This is a merge.\n var changedChildren_2 = ImmutableTree_1.ImmutableTree.Empty;\n affectedTree.foreach(function (mergePath, value) {\n var serverCachePath = ackPath.child(mergePath);\n if (serverCache.isCompleteForPath(serverCachePath)) {\n changedChildren_2 = changedChildren_2.set(mergePath, serverCache.getNode().getChild(serverCachePath));\n }\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_2, writesCache, completeCache, filterServerNode, accumulator);\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.listenComplete_ = function (viewCache, path, writesCache, accumulator) {\n var oldServerNode = viewCache.getServerCache();\n var newViewCache = viewCache.updateServerSnap(oldServerNode.getNode(), oldServerNode.isFullyInitialized() || path.isEmpty(), oldServerNode.isFiltered());\n return this.generateEventCacheAfterServerEvent_(newViewCache, path, writesCache, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, accumulator);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.revertUserWrite_ = function (viewCache, path, writesCache, completeServerCache, accumulator) {\n var complete;\n if (writesCache.shadowingWrite(path) != null) {\n return viewCache;\n }\n else {\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, viewCache, completeServerCache);\n var oldEventCache = viewCache.getEventCache().getNode();\n var newEventCache = void 0;\n if (path.isEmpty() || path.getFront() === '.priority') {\n var newNode = void 0;\n if (viewCache.getServerCache().isFullyInitialized()) {\n newNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n }\n else {\n var serverChildren = viewCache.getServerCache().getNode();\n util_1.assert(serverChildren instanceof ChildrenNode_1.ChildrenNode, 'serverChildren would be complete if leaf node');\n newNode = writesCache.calcCompleteEventChildren(serverChildren);\n }\n newNode = newNode;\n newEventCache = this.filter_.updateFullNode(oldEventCache, newNode, accumulator);\n }\n else {\n var childKey = path.getFront();\n var newChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n if (newChild == null &&\n viewCache.getServerCache().isCompleteForChild(childKey)) {\n newChild = oldEventCache.getImmediateChild(childKey);\n }\n if (newChild != null) {\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, newChild, path.popFront(), source, accumulator);\n }\n else if (viewCache\n .getEventCache()\n .getNode()\n .hasChild(childKey)) {\n // No complete child available, delete the existing one, if any\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE, path.popFront(), source, accumulator);\n }\n else {\n newEventCache = oldEventCache;\n }\n if (newEventCache.isEmpty() &&\n viewCache.getServerCache().isFullyInitialized()) {\n // We might have reverted all child writes. Maybe the old event was a leaf node\n complete = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n if (complete.isLeafNode()) {\n newEventCache = this.filter_.updateFullNode(newEventCache, complete, accumulator);\n }\n }\n }\n complete =\n viewCache.getServerCache().isFullyInitialized() ||\n writesCache.shadowingWrite(Path_1.Path.Empty) != null;\n return viewCache.updateEventSnap(newEventCache, complete, this.filter_.filtersNodes());\n }\n };\n return ViewProcessor;\n}());\nexports.ViewProcessor = ViewProcessor;\n\n//# sourceMappingURL=ViewProcessor.js.map\n\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Change_1 = __webpack_require__(9);\nvar util_2 = __webpack_require__(0);\n/**\n * @constructor\n */\nvar ChildChangeAccumulator = /** @class */ (function () {\n function ChildChangeAccumulator() {\n this.changeMap_ = {};\n }\n /**\n * @param {!Change} change\n */\n ChildChangeAccumulator.prototype.trackChildChange = function (change) {\n var type = change.type;\n var childKey /** @type {!string} */ = change.childName;\n util_2.assert(type == Change_1.Change.CHILD_ADDED ||\n type == Change_1.Change.CHILD_CHANGED ||\n type == Change_1.Change.CHILD_REMOVED, 'Only child changes supported for tracking');\n util_2.assert(childKey !== '.priority', 'Only non-priority child changes can be tracked.');\n var oldChange = util_1.safeGet(this.changeMap_, childKey);\n if (oldChange) {\n var oldType = oldChange.type;\n if (type == Change_1.Change.CHILD_ADDED && oldType == Change_1.Change.CHILD_REMOVED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n delete this.changeMap_[childKey];\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childRemovedChange(childKey, oldChange.oldSnap);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n this.changeMap_[childKey] = Change_1.Change.childAddedChange(childKey, change.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.oldSnap);\n }\n else {\n throw util_2.assertionError('Illegal combination of changes: ' +\n change +\n ' occurred after ' +\n oldChange);\n }\n }\n else {\n this.changeMap_[childKey] = change;\n }\n };\n /**\n * @return {!Array.}\n */\n ChildChangeAccumulator.prototype.getChanges = function () {\n return util_1.getValues(this.changeMap_);\n };\n return ChildChangeAccumulator;\n}());\nexports.ChildChangeAccumulator = ChildChangeAccumulator;\n\n//# sourceMappingURL=ChildChangeAccumulator.js.map\n\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = __webpack_require__(18);\n/**\n * An implementation of CompleteChildSource that never returns any additional children\n *\n * @private\n * @constructor\n * @implements CompleteChildSource\n */\nvar NoCompleteChildSource_ = /** @class */ (function () {\n function NoCompleteChildSource_() {\n }\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getCompleteChild = function (childKey) {\n return null;\n };\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getChildAfterChild = function (index, child, reverse) {\n return null;\n };\n return NoCompleteChildSource_;\n}());\nexports.NoCompleteChildSource_ = NoCompleteChildSource_;\n/**\n * Singleton instance.\n * @const\n * @type {!CompleteChildSource}\n */\nexports.NO_COMPLETE_CHILD_SOURCE = new NoCompleteChildSource_();\n/**\n * An implementation of CompleteChildSource that uses a WriteTree in addition to any other server data or\n * old event caches available to calculate complete children.\n *\n *\n * @implements CompleteChildSource\n */\nvar WriteTreeCompleteChildSource = /** @class */ (function () {\n /**\n * @param {!WriteTreeRef} writes_\n * @param {!ViewCache} viewCache_\n * @param {?Node} optCompleteServerCache_\n */\n function WriteTreeCompleteChildSource(writes_, viewCache_, optCompleteServerCache_) {\n if (optCompleteServerCache_ === void 0) { optCompleteServerCache_ = null; }\n this.writes_ = writes_;\n this.viewCache_ = viewCache_;\n this.optCompleteServerCache_ = optCompleteServerCache_;\n }\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getCompleteChild = function (childKey) {\n var node = this.viewCache_.getEventCache();\n if (node.isCompleteForChild(childKey)) {\n return node.getNode().getImmediateChild(childKey);\n }\n else {\n var serverNode = this.optCompleteServerCache_ != null\n ? new CacheNode_1.CacheNode(this.optCompleteServerCache_, true, false)\n : this.viewCache_.getServerCache();\n return this.writes_.calcCompleteChild(childKey, serverNode);\n }\n };\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getChildAfterChild = function (index, child, reverse) {\n var completeServerData = this.optCompleteServerCache_ != null\n ? this.optCompleteServerCache_\n : this.viewCache_.getCompleteServerSnap();\n var nodes = this.writes_.calcIndexedSlice(completeServerData, child, 1, reverse, index);\n if (nodes.length === 0) {\n return null;\n }\n else {\n return nodes[0];\n }\n };\n return WriteTreeCompleteChildSource;\n}());\nexports.WriteTreeCompleteChildSource = WriteTreeCompleteChildSource;\n\n//# sourceMappingURL=CompleteChildSource.js.map\n\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = __webpack_require__(5);\nvar Change_1 = __webpack_require__(9);\nvar util_1 = __webpack_require__(0);\n/**\n * An EventGenerator is used to convert \"raw\" changes (Change) as computed by the\n * CacheDiffer into actual events (Event) that can be raised. See generateEventsForChanges()\n * for details.\n *\n * @constructor\n */\nvar EventGenerator = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n */\n function EventGenerator(query_) {\n this.query_ = query_;\n /**\n * @private\n * @type {!Index}\n */\n this.index_ = this.query_.getQueryParams().getIndex();\n }\n /**\n * Given a set of raw changes (no moved events and prevName not specified yet), and a set of\n * EventRegistrations that should be notified of these changes, generate the actual events to be raised.\n *\n * Notes:\n * - child_moved events will be synthesized at this time for any child_changed events that affect\n * our index.\n * - prevName will be calculated based on the index ordering.\n *\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {!Array.} eventRegistrations\n * @return {!Array.}\n */\n EventGenerator.prototype.generateEventsForChanges = function (changes, eventCache, eventRegistrations) {\n var _this = this;\n var events = [];\n var moves = [];\n changes.forEach(function (change) {\n if (change.type === Change_1.Change.CHILD_CHANGED &&\n _this.index_.indexedValueChanged(change.oldSnap, change.snapshotNode)) {\n moves.push(Change_1.Change.childMovedChange(change.childName, change.snapshotNode));\n }\n });\n this.generateEventsForType_(events, Change_1.Change.CHILD_REMOVED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_ADDED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_MOVED, moves, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_CHANGED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.VALUE, changes, eventRegistrations, eventCache);\n return events;\n };\n /**\n * Given changes of a single change type, generate the corresponding events.\n *\n * @param {!Array.} events\n * @param {!string} eventType\n * @param {!Array.} changes\n * @param {!Array.} registrations\n * @param {!Node} eventCache\n * @private\n */\n EventGenerator.prototype.generateEventsForType_ = function (events, eventType, changes, registrations, eventCache) {\n var _this = this;\n var filteredChanges = changes.filter(function (change) { return change.type === eventType; });\n filteredChanges.sort(this.compareChanges_.bind(this));\n filteredChanges.forEach(function (change) {\n var materializedChange = _this.materializeSingleChange_(change, eventCache);\n registrations.forEach(function (registration) {\n if (registration.respondsTo(change.type)) {\n events.push(registration.createEvent(materializedChange, _this.query_));\n }\n });\n });\n };\n /**\n * @param {!Change} change\n * @param {!Node} eventCache\n * @return {!Change}\n * @private\n */\n EventGenerator.prototype.materializeSingleChange_ = function (change, eventCache) {\n if (change.type === 'value' || change.type === 'child_removed') {\n return change;\n }\n else {\n change.prevName = eventCache.getPredecessorChildName(\n /** @type {!string} */\n change.childName, change.snapshotNode, this.index_);\n return change;\n }\n };\n /**\n * @param {!Change} a\n * @param {!Change} b\n * @return {number}\n * @private\n */\n EventGenerator.prototype.compareChanges_ = function (a, b) {\n if (a.childName == null || b.childName == null) {\n throw util_1.assertionError('Should only compare child_ events.');\n }\n var aWrapped = new Node_1.NamedNode(a.childName, a.snapshotNode);\n var bWrapped = new Node_1.NamedNode(b.childName, b.snapshotNode);\n return this.index_.compare(aWrapped, bWrapped);\n };\n return EventGenerator;\n}());\nexports.EventGenerator = EventGenerator;\n\n//# sourceMappingURL=EventGenerator.js.map\n\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar CompoundWrite_1 = __webpack_require__(96);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar ChildrenNode_1 = __webpack_require__(4);\n/**\n * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them\n * with underlying server data (to create \"event cache\" data). Pending writes are added with addOverwrite()\n * and addMerge(), and removed with removeWrite().\n *\n * @constructor\n */\nvar WriteTree = /** @class */ (function () {\n function WriteTree() {\n /**\n * A tree tracking the result of applying all visible writes. This does not include transactions with\n * applyLocally=false or writes that are completely shadowed by other writes.\n *\n * @type {!CompoundWrite}\n * @private\n */\n this.visibleWrites_ = CompoundWrite_1.CompoundWrite.Empty;\n /**\n * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary\n * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also\n * used by transactions).\n *\n * @type {!Array.}\n * @private\n */\n this.allWrites_ = [];\n this.lastWriteId_ = -1;\n }\n /**\n * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.\n *\n * @param {!Path} path\n * @return {!WriteTreeRef}\n */\n WriteTree.prototype.childWrites = function (path) {\n return new WriteTreeRef(path, this);\n };\n /**\n * Record a new overwrite from user code.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} writeId\n * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches\n */\n WriteTree.prototype.addOverwrite = function (path, snap, writeId, visible) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older write on top of newer ones');\n if (visible === undefined) {\n visible = true;\n }\n this.allWrites_.push({\n path: path,\n snap: snap,\n writeId: writeId,\n visible: visible\n });\n if (visible) {\n this.visibleWrites_ = this.visibleWrites_.addWrite(path, snap);\n }\n this.lastWriteId_ = writeId;\n };\n /**\n * Record a new merge from user code.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n */\n WriteTree.prototype.addMerge = function (path, changedChildren, writeId) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older merge on top of newer ones');\n this.allWrites_.push({\n path: path,\n children: changedChildren,\n writeId: writeId,\n visible: true\n });\n this.visibleWrites_ = this.visibleWrites_.addWrites(path, changedChildren);\n this.lastWriteId_ = writeId;\n };\n /**\n * @param {!number} writeId\n * @return {?WriteRecord}\n */\n WriteTree.prototype.getWrite = function (writeId) {\n for (var i = 0; i < this.allWrites_.length; i++) {\n var record = this.allWrites_[i];\n if (record.writeId === writeId) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates\n * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.\n *\n * @param {!number} writeId\n * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise\n * events as a result).\n */\n WriteTree.prototype.removeWrite = function (writeId) {\n // Note: disabling this check. It could be a transaction that preempted another transaction, and thus was applied\n // out of order.\n //const validClear = revert || this.allWrites_.length === 0 || writeId <= this.allWrites_[0].writeId;\n //assert(validClear, \"Either we don't have this write, or it's the first one in the queue\");\n var _this = this;\n var idx = this.allWrites_.findIndex(function (s) {\n return s.writeId === writeId;\n });\n util_2.assert(idx >= 0, 'removeWrite called with nonexistent writeId.');\n var writeToRemove = this.allWrites_[idx];\n this.allWrites_.splice(idx, 1);\n var removedWriteWasVisible = writeToRemove.visible;\n var removedWriteOverlapsWithOtherWrites = false;\n var i = this.allWrites_.length - 1;\n while (removedWriteWasVisible && i >= 0) {\n var currentWrite = this.allWrites_[i];\n if (currentWrite.visible) {\n if (i >= idx &&\n this.recordContainsPath_(currentWrite, writeToRemove.path)) {\n // The removed write was completely shadowed by a subsequent write.\n removedWriteWasVisible = false;\n }\n else if (writeToRemove.path.contains(currentWrite.path)) {\n // Either we're covering some writes or they're covering part of us (depending on which came first).\n removedWriteOverlapsWithOtherWrites = true;\n }\n }\n i--;\n }\n if (!removedWriteWasVisible) {\n return false;\n }\n else if (removedWriteOverlapsWithOtherWrites) {\n // There's some shadowing going on. Just rebuild the visible writes from scratch.\n this.resetTree_();\n return true;\n }\n else {\n // There's no shadowing. We can safely just remove the write(s) from visibleWrites.\n if (writeToRemove.snap) {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(writeToRemove.path);\n }\n else {\n var children = writeToRemove.children;\n util_1.forEach(children, function (childName) {\n _this.visibleWrites_ = _this.visibleWrites_.removeWrite(writeToRemove.path.child(childName));\n });\n }\n return true;\n }\n };\n /**\n * Return a complete snapshot for the given path if there's visible write data at that path, else null.\n * No server data is considered.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.getCompleteWriteData = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden\n * writes), attempt to calculate a complete snapshot for the given path\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude An optional set to be excluded\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteEventCache = function (treePath, completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n if (!writeIdsToExclude && !includeHiddenWrites) {\n var shadowingNode = this.visibleWrites_.getCompleteNode(treePath);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n var subMerge = this.visibleWrites_.childCompoundWrite(treePath);\n if (subMerge.isEmpty()) {\n return completeServerCache;\n }\n else if (completeServerCache == null &&\n !subMerge.hasCompleteWrite(Path_1.Path.Empty)) {\n // We wouldn't have a complete snapshot, since there's no underlying data and no complete shadow\n return null;\n }\n else {\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return subMerge.apply(layeredCache);\n }\n }\n }\n else {\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n if (!includeHiddenWrites && merge.isEmpty()) {\n return completeServerCache;\n }\n else {\n // If the server cache is null, and we don't have a complete cache, we need to return null\n if (!includeHiddenWrites &&\n completeServerCache == null &&\n !merge.hasCompleteWrite(Path_1.Path.Empty)) {\n return null;\n }\n else {\n var filter = function (write) {\n return ((write.visible || includeHiddenWrites) &&\n (!writeIdsToExclude ||\n !~writeIdsToExclude.indexOf(write.writeId)) &&\n (write.path.contains(treePath) || treePath.contains(write.path)));\n };\n var mergeAtPath = WriteTree.layerTree_(this.allWrites_, filter, treePath);\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return mergeAtPath.apply(layeredCache);\n }\n }\n }\n };\n /**\n * With optional, underlying server data, attempt to return a children node of children that we have complete data for.\n * Used when creating new views, to pre-fill their complete event children snapshot.\n *\n * @param {!Path} treePath\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTree.prototype.calcCompleteEventChildren = function (treePath, completeServerChildren) {\n var completeChildren = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var topLevelSet = this.visibleWrites_.getCompleteNode(treePath);\n if (topLevelSet) {\n if (!topLevelSet.isLeafNode()) {\n // we're shadowing everything. Return the children.\n topLevelSet.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childSnap) {\n completeChildren = completeChildren.updateImmediateChild(childName, childSnap);\n });\n }\n return completeChildren;\n }\n else if (completeServerChildren) {\n // Layer any children we have on top of this\n // We know we don't have a top-level set, so just enumerate existing children\n var merge_1 = this.visibleWrites_.childCompoundWrite(treePath);\n completeServerChildren.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var node = merge_1\n .childCompoundWrite(new Path_1.Path(childName))\n .apply(childNode);\n completeChildren = completeChildren.updateImmediateChild(childName, node);\n });\n // Add any complete children we have from the set\n merge_1.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n else {\n // We don't have anything to layer on top of. Layer on any children we have\n // Note that we can return an empty snap if we have a defined delete\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n merge.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n };\n /**\n * Given that the underlying server data has updated, determine what, if anything, needs to be\n * applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events\n *\n * Either existingEventSnap or existingServerSnap must exist\n *\n * @param {!Path} treePath\n * @param {!Path} childPath\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcEventCacheAfterServerOverwrite = function (treePath, childPath, existingEventSnap, existingServerSnap) {\n util_2.assert(existingEventSnap || existingServerSnap, 'Either existingEventSnap or existingServerSnap must exist');\n var path = treePath.child(childPath);\n if (this.visibleWrites_.hasCompleteWrite(path)) {\n // At this point we can probably guarantee that we're in case 2, meaning no events\n // May need to check visibility while doing the findRootMostValueAndPath call\n return null;\n }\n else {\n // No complete shadowing. We're either partially shadowing or not shadowing at all.\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n if (childMerge.isEmpty()) {\n // We're not shadowing at all. Case 1\n return existingServerSnap.getChild(childPath);\n }\n else {\n // This could be more efficient if the serverNode + updates doesn't change the eventSnap\n // However this is tricky to find out, since user updates don't necessary change the server\n // snap, e.g. priority updates on empty nodes, or deep deletes. Another special case is if the server\n // adds nodes, but doesn't change any existing writes. It is therefore not enough to\n // only check if the updates change the serverNode.\n // Maybe check if the merge tree contains these special cases and only do a full overwrite in that case?\n return childMerge.apply(existingServerSnap.getChild(childPath));\n }\n }\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!Path} treePath\n * @param {!string} childKey\n * @param {!CacheNode} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteChild = function (treePath, childKey, existingServerSnap) {\n var path = treePath.child(childKey);\n var shadowingNode = this.visibleWrites_.getCompleteNode(path);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n if (existingServerSnap.isCompleteForChild(childKey)) {\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n return childMerge.apply(existingServerSnap.getNode().getImmediateChild(childKey));\n }\n else {\n return null;\n }\n }\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.shadowingWrite = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window.\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTree.prototype.calcIndexedSlice = function (treePath, completeServerData, startPost, count, reverse, index) {\n var toIterate;\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n var shadowingNode = merge.getCompleteNode(Path_1.Path.Empty);\n if (shadowingNode != null) {\n toIterate = shadowingNode;\n }\n else if (completeServerData != null) {\n toIterate = merge.apply(completeServerData);\n }\n else {\n // no children to iterate on\n return [];\n }\n toIterate = toIterate.withIndex(index);\n if (!toIterate.isEmpty() && !toIterate.isLeafNode()) {\n var nodes = [];\n var cmp = index.getCompare();\n var iter = reverse\n ? toIterate.getReverseIteratorFrom(startPost, index)\n : toIterate.getIteratorFrom(startPost, index);\n var next = iter.getNext();\n while (next && nodes.length < count) {\n if (cmp(next, startPost) !== 0) {\n nodes.push(next);\n }\n next = iter.getNext();\n }\n return nodes;\n }\n else {\n return [];\n }\n };\n /**\n * @param {!WriteRecord} writeRecord\n * @param {!Path} path\n * @return {boolean}\n * @private\n */\n WriteTree.prototype.recordContainsPath_ = function (writeRecord, path) {\n if (writeRecord.snap) {\n return writeRecord.path.contains(path);\n }\n else {\n // findKey can return undefined, so use !! to coerce to boolean\n return !!util_1.findKey(writeRecord.children, function (childSnap, childName) {\n return writeRecord.path.child(childName).contains(path);\n });\n }\n };\n /**\n * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots\n * @private\n */\n WriteTree.prototype.resetTree_ = function () {\n this.visibleWrites_ = WriteTree.layerTree_(this.allWrites_, WriteTree.DefaultFilter_, Path_1.Path.Empty);\n if (this.allWrites_.length > 0) {\n this.lastWriteId_ = this.allWrites_[this.allWrites_.length - 1].writeId;\n }\n else {\n this.lastWriteId_ = -1;\n }\n };\n /**\n * The default filter used when constructing the tree. Keep everything that's visible.\n *\n * @param {!WriteRecord} write\n * @return {boolean}\n * @private\n */\n WriteTree.DefaultFilter_ = function (write) {\n return write.visible;\n };\n /**\n * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of\n * event data at that path.\n *\n * @param {!Array.} writes\n * @param {!function(!WriteRecord):boolean} filter\n * @param {!Path} treeRoot\n * @return {!CompoundWrite}\n * @private\n */\n WriteTree.layerTree_ = function (writes, filter, treeRoot) {\n var compoundWrite = CompoundWrite_1.CompoundWrite.Empty;\n for (var i = 0; i < writes.length; ++i) {\n var write = writes[i];\n // Theory, a later set will either:\n // a) abort a relevant transaction, so no need to worry about excluding it from calculating that transaction\n // b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction\n if (filter(write)) {\n var writePath = write.path;\n var relativePath = void 0;\n if (write.snap) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrite(relativePath, write.snap);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, write.snap.getChild(relativePath));\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else if (write.children) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrites(relativePath, write.children);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n if (relativePath.isEmpty()) {\n compoundWrite = compoundWrite.addWrites(Path_1.Path.Empty, write.children);\n }\n else {\n var child = util_1.safeGet(write.children, relativePath.getFront());\n if (child) {\n // There exists a child in this node that matches the root path\n var deepNode = child.getChild(relativePath.popFront());\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, deepNode);\n }\n }\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else {\n throw util_2.assertionError('WriteRecord should have .snap or .children');\n }\n }\n }\n return compoundWrite;\n };\n return WriteTree;\n}());\nexports.WriteTree = WriteTree;\n/**\n * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods\n * just proxy to the underlying WriteTree.\n *\n * @constructor\n */\nvar WriteTreeRef = /** @class */ (function () {\n /**\n * @param {!Path} path\n * @param {!WriteTree} writeTree\n */\n function WriteTreeRef(path, writeTree) {\n this.treePath_ = path;\n this.writeTree_ = writeTree;\n }\n /**\n * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used\n * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node\n * can lead to a more expensive calculation.\n *\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude Optional writes to exclude.\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteEventCache = function (completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n return this.writeTree_.calcCompleteEventCache(this.treePath_, completeServerCache, writeIdsToExclude, includeHiddenWrites);\n };\n /**\n * If possible, returns a children node containing all of the complete children we have data for. The returned data is a\n * mix of the given server data and write data.\n *\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTreeRef.prototype.calcCompleteEventChildren = function (completeServerChildren) {\n return this.writeTree_.calcCompleteEventChildren(this.treePath_, completeServerChildren);\n };\n /**\n * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,\n * if anything, needs to be applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events should be raised\n *\n * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert\n *\n * @param {!Path} path\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcEventCacheAfterServerOverwrite = function (path, existingEventSnap, existingServerSnap) {\n return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_, path, existingEventSnap, existingServerSnap);\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTreeRef.prototype.shadowingWrite = function (path) {\n return this.writeTree_.shadowingWrite(this.treePath_.child(path));\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window\n *\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTreeRef.prototype.calcIndexedSlice = function (completeServerData, startPost, count, reverse, index) {\n return this.writeTree_.calcIndexedSlice(this.treePath_, completeServerData, startPost, count, reverse, index);\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!string} childKey\n * @param {!CacheNode} existingServerCache\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteChild = function (childKey, existingServerCache) {\n return this.writeTree_.calcCompleteChild(this.treePath_, childKey, existingServerCache);\n };\n /**\n * Return a WriteTreeRef for a child.\n *\n * @param {string} childName\n * @return {!WriteTreeRef}\n */\n WriteTreeRef.prototype.child = function (childName) {\n return new WriteTreeRef(this.treePath_.child(childName), this.writeTree_);\n };\n return WriteTreeRef;\n}());\nexports.WriteTreeRef = WriteTreeRef;\n\n//# sourceMappingURL=WriteTree.js.map\n\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ImmutableTree_1 = __webpack_require__(23);\nvar Path_1 = __webpack_require__(2);\nvar util_1 = __webpack_require__(0);\nvar Node_1 = __webpack_require__(5);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar util_2 = __webpack_require__(0);\n/**\n * This class holds a collection of writes that can be applied to nodes in unison. It abstracts away the logic with\n * dealing with priority writes and multiple nested writes. At any given path there is only allowed to be one write\n * modifying that path. Any write to an existing path or shadowing an existing path will modify that existing write\n * to reflect the write added.\n *\n * @constructor\n * @param {!ImmutableTree.} writeTree\n */\nvar CompoundWrite = /** @class */ (function () {\n function CompoundWrite(writeTree_) {\n this.writeTree_ = writeTree_;\n }\n /**\n * @param {!Path} path\n * @param {!Node} node\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrite = function (path, node) {\n if (path.isEmpty()) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(node));\n }\n else {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n var rootMostPath = rootmost.path;\n var value = rootmost.value;\n var relativePath = Path_1.Path.relativePath(rootMostPath, path);\n value = value.updateChild(relativePath, node);\n return new CompoundWrite(this.writeTree_.set(rootMostPath, value));\n }\n else {\n var subtree = new ImmutableTree_1.ImmutableTree(node);\n var newWriteTree = this.writeTree_.setTree(path, subtree);\n return new CompoundWrite(newWriteTree);\n }\n }\n };\n /**\n * @param {!Path} path\n * @param {!Object.} updates\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrites = function (path, updates) {\n var newWrite = this;\n util_1.forEach(updates, function (childKey, node) {\n newWrite = newWrite.addWrite(path.child(childKey), node);\n });\n return newWrite;\n };\n /**\n * Will remove a write at the given path and deeper paths. This will not modify a write at a higher\n * location, which must be removed by calling this method with that path.\n *\n * @param {!Path} path The path at which a write and all deeper writes should be removed\n * @return {!CompoundWrite} The new CompoundWrite with the removed path\n */\n CompoundWrite.prototype.removeWrite = function (path) {\n if (path.isEmpty()) {\n return CompoundWrite.Empty;\n }\n else {\n var newWriteTree = this.writeTree_.setTree(path, ImmutableTree_1.ImmutableTree.Empty);\n return new CompoundWrite(newWriteTree);\n }\n };\n /**\n * Returns whether this CompoundWrite will fully overwrite a node at a given location and can therefore be\n * considered \"complete\".\n *\n * @param {!Path} path The path to check for\n * @return {boolean} Whether there is a complete write at that path\n */\n CompoundWrite.prototype.hasCompleteWrite = function (path) {\n return this.getCompleteNode(path) != null;\n };\n /**\n * Returns a node for a path if and only if the node is a \"complete\" overwrite at that path. This will not aggregate\n * writes from deeper paths, but will return child nodes from a more shallow path.\n *\n * @param {!Path} path The path to get a complete write\n * @return {?Node} The node if complete at that path, or null otherwise.\n */\n CompoundWrite.prototype.getCompleteNode = function (path) {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n return this.writeTree_\n .get(rootmost.path)\n .getChild(Path_1.Path.relativePath(rootmost.path, path));\n }\n else {\n return null;\n }\n };\n /**\n * Returns all children that are guaranteed to be a complete overwrite.\n *\n * @return {!Array.} A list of all complete children.\n */\n CompoundWrite.prototype.getCompleteChildren = function () {\n var children = [];\n var node = this.writeTree_.value;\n if (node != null) {\n // If it's a leaf node, it has no children; so nothing to do.\n if (!node.isLeafNode()) {\n node.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n children.push(new Node_1.NamedNode(childName, childNode));\n });\n }\n }\n else {\n this.writeTree_.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value != null) {\n children.push(new Node_1.NamedNode(childName, childTree.value));\n }\n });\n }\n return children;\n };\n /**\n * @param {!Path} path\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.childCompoundWrite = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else {\n var shadowingNode = this.getCompleteNode(path);\n if (shadowingNode != null) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(shadowingNode));\n }\n else {\n return new CompoundWrite(this.writeTree_.subtree(path));\n }\n }\n };\n /**\n * Returns true if this CompoundWrite is empty and therefore does not modify any nodes.\n * @return {boolean} Whether this CompoundWrite is empty\n */\n CompoundWrite.prototype.isEmpty = function () {\n return this.writeTree_.isEmpty();\n };\n /**\n * Applies this CompoundWrite to a node. The node is returned with all writes from this CompoundWrite applied to the\n * node\n * @param {!Node} node The node to apply this CompoundWrite to\n * @return {!Node} The node with all writes applied\n */\n CompoundWrite.prototype.apply = function (node) {\n return CompoundWrite.applySubtreeWrite_(Path_1.Path.Empty, this.writeTree_, node);\n };\n /**\n * @type {!CompoundWrite}\n */\n CompoundWrite.Empty = new CompoundWrite(new ImmutableTree_1.ImmutableTree(null));\n /**\n * @param {!Path} relativePath\n * @param {!ImmutableTree.} writeTree\n * @param {!Node} node\n * @return {!Node}\n * @private\n */\n CompoundWrite.applySubtreeWrite_ = function (relativePath, writeTree, node) {\n if (writeTree.value != null) {\n // Since there a write is always a leaf, we're done here\n return node.updateChild(relativePath, writeTree.value);\n }\n else {\n var priorityWrite_1 = null;\n writeTree.children.inorderTraversal(function (childKey, childTree) {\n if (childKey === '.priority') {\n // Apply priorities at the end so we don't update priorities for either empty nodes or forget\n // to apply priorities to empty nodes that are later filled\n util_2.assert(childTree.value !== null, 'Priority writes must always be leaf nodes');\n priorityWrite_1 = childTree.value;\n }\n else {\n node = CompoundWrite.applySubtreeWrite_(relativePath.child(childKey), childTree, node);\n }\n });\n // If there was a priority write, we only apply it if the node is not empty\n if (!node.getChild(relativePath).isEmpty() && priorityWrite_1 !== null) {\n node = node.updateChild(relativePath.child('.priority'), priorityWrite_1);\n }\n return node;\n }\n };\n return CompoundWrite;\n}());\nexports.CompoundWrite = CompoundWrite;\n\n//# sourceMappingURL=CompoundWrite.js.map\n\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = __webpack_require__(4);\n/**\n * Mutable object which basically just stores a reference to the \"latest\" immutable snapshot.\n *\n * @constructor\n */\nvar SnapshotHolder = /** @class */ (function () {\n function SnapshotHolder() {\n this.rootNode_ = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n SnapshotHolder.prototype.getNode = function (path) {\n return this.rootNode_.getChild(path);\n };\n SnapshotHolder.prototype.updateSnapshot = function (path, newSnapshotNode) {\n this.rootNode_ = this.rootNode_.updateChild(path, newSnapshotNode);\n };\n return SnapshotHolder;\n}());\nexports.SnapshotHolder = SnapshotHolder;\n\n//# sourceMappingURL=SnapshotHolder.js.map\n\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\n/**\n * Abstraction around FirebaseApp's token fetching capabilities.\n */\nvar AuthTokenProvider = /** @class */ (function () {\n /**\n * @param {!FirebaseApp} app_\n */\n function AuthTokenProvider(app_) {\n this.app_ = app_;\n }\n /**\n * @param {boolean} forceRefresh\n * @return {!Promise}\n */\n AuthTokenProvider.prototype.getToken = function (forceRefresh) {\n return this.app_['INTERNAL']['getToken'](forceRefresh).then(null, \n // .catch\n function (error) {\n // TODO: Need to figure out all the cases this is raised and whether\n // this makes sense.\n if (error && error.code === 'auth/token-not-initialized') {\n util_1.log('Got auth/token-not-initialized error. Treating as null token.');\n return null;\n }\n else {\n return Promise.reject(error);\n }\n });\n };\n AuthTokenProvider.prototype.addTokenChangeListener = function (listener) {\n // TODO: We might want to wrap the listener and call it with no args to\n // avoid a leaky abstraction, but that makes removing the listener harder.\n this.app_['INTERNAL']['addAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.removeTokenChangeListener = function (listener) {\n this.app_['INTERNAL']['removeAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.notifyForInvalidToken = function () {\n var errorMessage = 'Provided authentication credentials for the app named \"' +\n this.app_.name +\n '\" are invalid. This usually indicates your app was not ' +\n 'initialized correctly. ';\n if ('credential' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"credential\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else if ('serviceAccount' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"serviceAccount\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else {\n errorMessage +=\n 'Make sure the \"apiKey\" and \"databaseURL\" properties provided to ' +\n 'initializeApp() match the values provided for your app at ' +\n 'https://console.firebase.google.com/.';\n }\n util_1.warn(errorMessage);\n };\n return AuthTokenProvider;\n}());\nexports.AuthTokenProvider = AuthTokenProvider;\n\n//# sourceMappingURL=AuthTokenProvider.js.map\n\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(0);\n/**\n * Tracks a collection of stats.\n *\n * @constructor\n */\nvar StatsCollection = /** @class */ (function () {\n function StatsCollection() {\n this.counters_ = {};\n }\n StatsCollection.prototype.incrementCounter = function (name, amount) {\n if (amount === void 0) { amount = 1; }\n if (!util_2.contains(this.counters_, name))\n this.counters_[name] = 0;\n this.counters_[name] += amount;\n };\n StatsCollection.prototype.get = function () {\n return util_1.deepCopy(this.counters_);\n };\n return StatsCollection;\n}());\nexports.StatsCollection = StatsCollection;\n\n//# sourceMappingURL=StatsCollection.js.map\n\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar StatsListener_1 = __webpack_require__(49);\n// Assuming some apps may have a short amount of time on page, and a bulk of firebase operations probably\n// happen on page load, we try to report our first set of stats pretty quickly, but we wait at least 10\n// seconds to try to ensure the Firebase connection is established / settled.\nvar FIRST_STATS_MIN_TIME = 10 * 1000;\nvar FIRST_STATS_MAX_TIME = 30 * 1000;\n// We'll continue to report stats on average every 5 minutes.\nvar REPORT_STATS_INTERVAL = 5 * 60 * 1000;\n/**\n * @constructor\n */\nvar StatsReporter = /** @class */ (function () {\n /**\n * @param collection\n * @param server_\n */\n function StatsReporter(collection, server_) {\n this.server_ = server_;\n this.statsToReport_ = {};\n this.statsListener_ = new StatsListener_1.StatsListener(collection);\n var timeout = FIRST_STATS_MIN_TIME +\n (FIRST_STATS_MAX_TIME - FIRST_STATS_MIN_TIME) * Math.random();\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(timeout));\n }\n StatsReporter.prototype.includeStat = function (stat) {\n this.statsToReport_[stat] = true;\n };\n StatsReporter.prototype.reportStats_ = function () {\n var _this = this;\n var stats = this.statsListener_.get();\n var reportedStats = {};\n var haveStatsToReport = false;\n util_1.forEach(stats, function (stat, value) {\n if (value > 0 && util_1.contains(_this.statsToReport_, stat)) {\n reportedStats[stat] = value;\n haveStatsToReport = true;\n }\n });\n if (haveStatsToReport) {\n this.server_.reportStats(reportedStats);\n }\n // queue our next run.\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(Math.random() * 2 * REPORT_STATS_INTERVAL));\n };\n return StatsReporter;\n}());\nexports.StatsReporter = StatsReporter;\n\n//# sourceMappingURL=StatsReporter.js.map\n\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\n/**\n * The event queue serves a few purposes:\n * 1. It ensures we maintain event order in the face of event callbacks doing operations that result in more\n * events being queued.\n * 2. raiseQueuedEvents() handles being called reentrantly nicely. That is, if in the course of raising events,\n * raiseQueuedEvents() is called again, the \"inner\" call will pick up raising events where the \"outer\" call\n * left off, ensuring that the events are still raised synchronously and in order.\n * 3. You can use raiseEventsAtPath and raiseEventsForChangedPath to ensure only relevant previously-queued\n * events are raised synchronously.\n *\n * NOTE: This can all go away if/when we move to async events.\n *\n * @constructor\n */\nvar EventQueue = /** @class */ (function () {\n function EventQueue() {\n /**\n * @private\n * @type {!Array.}\n */\n this.eventLists_ = [];\n /**\n * Tracks recursion depth of raiseQueuedEvents_, for debugging purposes.\n * @private\n * @type {!number}\n */\n this.recursionDepth_ = 0;\n }\n /**\n * @param {!Array.} eventDataList The new events to queue.\n */\n EventQueue.prototype.queueEvents = function (eventDataList) {\n // We group events by path, storing them in a single EventList, to make it easier to skip over them quickly.\n var currList = null;\n for (var i = 0; i < eventDataList.length; i++) {\n var eventData = eventDataList[i];\n var eventPath = eventData.getPath();\n if (currList !== null && !eventPath.equals(currList.getPath())) {\n this.eventLists_.push(currList);\n currList = null;\n }\n if (currList === null) {\n currList = new EventList(eventPath);\n }\n currList.add(eventData);\n }\n if (currList) {\n this.eventLists_.push(currList);\n }\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones)\n * for the specified path.\n *\n * It is assumed that the new events are all for the specified path.\n *\n * @param {!Path} path The path to raise events for.\n * @param {!Array.} eventDataList The new events to raise.\n */\n EventQueue.prototype.raiseEventsAtPath = function (path, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.equals(path);\n });\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones) for\n * locations related to the specified change path (i.e. all ancestors and descendants).\n *\n * It is assumed that the new events are all related (ancestor or descendant) to the specified path.\n *\n * @param {!Path} changedPath The path to raise events for.\n * @param {!Array.} eventDataList The events to raise\n */\n EventQueue.prototype.raiseEventsForChangedPath = function (changedPath, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.contains(changedPath) || changedPath.contains(eventPath);\n });\n };\n /**\n * @param {!function(!Path):boolean} predicate\n * @private\n */\n EventQueue.prototype.raiseQueuedEventsMatchingPredicate_ = function (predicate) {\n this.recursionDepth_++;\n var sentAll = true;\n for (var i = 0; i < this.eventLists_.length; i++) {\n var eventList = this.eventLists_[i];\n if (eventList) {\n var eventPath = eventList.getPath();\n if (predicate(eventPath)) {\n this.eventLists_[i].raise();\n this.eventLists_[i] = null;\n }\n else {\n sentAll = false;\n }\n }\n }\n if (sentAll) {\n this.eventLists_ = [];\n }\n this.recursionDepth_--;\n };\n return EventQueue;\n}());\nexports.EventQueue = EventQueue;\n/**\n * @param {!Path} path\n * @constructor\n */\nvar EventList = /** @class */ (function () {\n function EventList(path_) {\n this.path_ = path_;\n /**\n * @type {!Array.}\n * @private\n */\n this.events_ = [];\n }\n /**\n * @param {!Event} eventData\n */\n EventList.prototype.add = function (eventData) {\n this.events_.push(eventData);\n };\n /**\n * Iterates through the list and raises each event\n */\n EventList.prototype.raise = function () {\n for (var i = 0; i < this.events_.length; i++) {\n var eventData = this.events_[i];\n if (eventData !== null) {\n this.events_[i] = null;\n var eventFn = eventData.getEventRunner();\n if (util_1.logger) {\n util_1.log('event: ' + eventData.toString());\n }\n util_1.exceptionGuard(eventFn);\n }\n }\n };\n /**\n * @return {!Path}\n */\n EventList.prototype.getPath = function () {\n return this.path_;\n };\n return EventList;\n}());\nexports.EventList = EventList;\n\n//# sourceMappingURL=EventQueue.js.map\n\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EventEmitter_1 = __webpack_require__(51);\nvar util_1 = __webpack_require__(0);\n/**\n * @extends {EventEmitter}\n */\nvar VisibilityMonitor = /** @class */ (function (_super) {\n __extends(VisibilityMonitor, _super);\n function VisibilityMonitor() {\n var _this = _super.call(this, ['visible']) || this;\n var hidden;\n var visibilityChange;\n if (typeof document !== 'undefined' &&\n typeof document.addEventListener !== 'undefined') {\n if (typeof document['hidden'] !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n visibilityChange = 'visibilitychange';\n hidden = 'hidden';\n }\n else if (typeof document['mozHidden'] !== 'undefined') {\n visibilityChange = 'mozvisibilitychange';\n hidden = 'mozHidden';\n }\n else if (typeof document['msHidden'] !== 'undefined') {\n visibilityChange = 'msvisibilitychange';\n hidden = 'msHidden';\n }\n else if (typeof document['webkitHidden'] !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange';\n hidden = 'webkitHidden';\n }\n }\n // Initially, we always assume we are visible. This ensures that in browsers\n // without page visibility support or in cases where we are never visible\n // (e.g. chrome extension), we act as if we are visible, i.e. don't delay\n // reconnects\n _this.visible_ = true;\n if (visibilityChange) {\n document.addEventListener(visibilityChange, function () {\n var visible = !document[hidden];\n if (visible !== _this.visible_) {\n _this.visible_ = visible;\n _this.trigger('visible', visible);\n }\n }, false);\n }\n return _this;\n }\n VisibilityMonitor.getInstance = function () {\n return new VisibilityMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n VisibilityMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'visible', 'Unknown event type: ' + eventType);\n return [this.visible_];\n };\n return VisibilityMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.VisibilityMonitor = VisibilityMonitor;\n\n//# sourceMappingURL=VisibilityMonitor.js.map\n\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar EventEmitter_1 = __webpack_require__(51);\nvar util_2 = __webpack_require__(0);\n/**\n * Monitors online state (as reported by window.online/offline events).\n *\n * The expectation is that this could have many false positives (thinks we are online\n * when we're not), but no false negatives. So we can safely use it to determine when\n * we definitely cannot reach the internet.\n *\n * @extends {EventEmitter}\n */\nvar OnlineMonitor = /** @class */ (function (_super) {\n __extends(OnlineMonitor, _super);\n function OnlineMonitor() {\n var _this = _super.call(this, ['online']) || this;\n _this.online_ = true;\n // We've had repeated complaints that Cordova apps can get stuck \"offline\", e.g.\n // https://forum.ionicframework.com/t/firebase-connection-is-lost-and-never-come-back/43810\n // It would seem that the 'online' event does not always fire consistently. So we disable it\n // for Cordova.\n if (typeof window !== 'undefined' &&\n typeof window.addEventListener !== 'undefined' &&\n !util_2.isMobileCordova()) {\n window.addEventListener('online', function () {\n if (!_this.online_) {\n _this.online_ = true;\n _this.trigger('online', true);\n }\n }, false);\n window.addEventListener('offline', function () {\n if (_this.online_) {\n _this.online_ = false;\n _this.trigger('online', false);\n }\n }, false);\n }\n return _this;\n }\n OnlineMonitor.getInstance = function () {\n return new OnlineMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n OnlineMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'online', 'Unknown event type: ' + eventType);\n return [this.online_];\n };\n /**\n * @return {boolean}\n */\n OnlineMonitor.prototype.currentlyOnline = function () {\n return this.online_;\n };\n return OnlineMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.OnlineMonitor = OnlineMonitor;\n\n//# sourceMappingURL=OnlineMonitor.js.map\n\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BrowserPollConnection_1 = __webpack_require__(53);\nvar WebSocketConnection_1 = __webpack_require__(54);\nvar util_1 = __webpack_require__(1);\n/**\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\n * lifecycle.\n *\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\n * they are available.\n * @constructor\n */\nvar TransportManager = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\n */\n function TransportManager(repoInfo) {\n this.initTransports_(repoInfo);\n }\n Object.defineProperty(TransportManager, \"ALL_TRANSPORTS\", {\n /**\n * @const\n * @type {!Array.}\n */\n get: function () {\n return [BrowserPollConnection_1.BrowserPollConnection, WebSocketConnection_1.WebSocketConnection];\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {!RepoInfo} repoInfo\n * @private\n */\n TransportManager.prototype.initTransports_ = function (repoInfo) {\n var isWebSocketsAvailable = WebSocketConnection_1.WebSocketConnection && WebSocketConnection_1.WebSocketConnection['isAvailable']();\n var isSkipPollConnection = isWebSocketsAvailable && !WebSocketConnection_1.WebSocketConnection.previouslyFailed();\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable)\n util_1.warn(\"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\");\n isSkipPollConnection = true;\n }\n if (isSkipPollConnection) {\n this.transports_ = [WebSocketConnection_1.WebSocketConnection];\n }\n else {\n var transports_1 = (this.transports_ = []);\n util_1.each(TransportManager.ALL_TRANSPORTS, function (i, transport) {\n if (transport && transport['isAvailable']()) {\n transports_1.push(transport);\n }\n });\n }\n };\n /**\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\n * initial transport to use\n */\n TransportManager.prototype.initialTransport = function () {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n }\n else {\n throw new Error('No transports available');\n }\n };\n /**\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\n * transport, or null\n */\n TransportManager.prototype.upgradeTransport = function () {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n }\n else {\n return null;\n }\n };\n return TransportManager;\n}());\nexports.TransportManager = TransportManager;\n\n//# sourceMappingURL=TransportManager.js.map\n\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(1);\n/**\n * This class ensures the packets from the server arrive in order\n * This class takes data from the server and ensures it gets passed into the callbacks in order.\n * @constructor\n */\nvar PacketReceiver = /** @class */ (function () {\n /**\n * @param onMessage_\n */\n function PacketReceiver(onMessage_) {\n this.onMessage_ = onMessage_;\n this.pendingResponses = [];\n this.currentResponseNum = 0;\n this.closeAfterResponse = -1;\n this.onClose = null;\n }\n PacketReceiver.prototype.closeAfter = function (responseNum, callback) {\n this.closeAfterResponse = responseNum;\n this.onClose = callback;\n if (this.closeAfterResponse < this.currentResponseNum) {\n this.onClose();\n this.onClose = null;\n }\n };\n /**\n * Each message from the server comes with a response number, and an array of data. The responseNumber\n * allows us to ensure that we process them in the right order, since we can't be guaranteed that all\n * browsers will respond in the same order as the requests we sent\n * @param {number} requestNum\n * @param {Array} data\n */\n PacketReceiver.prototype.handleResponse = function (requestNum, data) {\n var _this = this;\n this.pendingResponses[requestNum] = data;\n var _loop_1 = function () {\n var toProcess = this_1.pendingResponses[this_1.currentResponseNum];\n delete this_1.pendingResponses[this_1.currentResponseNum];\n var _loop_2 = function (i) {\n if (toProcess[i]) {\n util_1.exceptionGuard(function () {\n _this.onMessage_(toProcess[i]);\n });\n }\n };\n for (var i = 0; i < toProcess.length; ++i) {\n _loop_2(i);\n }\n if (this_1.currentResponseNum === this_1.closeAfterResponse) {\n if (this_1.onClose) {\n this_1.onClose();\n this_1.onClose = null;\n }\n return \"break\";\n }\n this_1.currentResponseNum++;\n };\n var this_1 = this;\n while (this.pendingResponses[this.currentResponseNum]) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n };\n return PacketReceiver;\n}());\nexports.PacketReceiver = PacketReceiver;\n\n//# sourceMappingURL=PacketReceiver.js.map\n\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar util_3 = __webpack_require__(0);\nvar util_4 = __webpack_require__(0);\nvar util_5 = __webpack_require__(0);\nvar ServerActions_1 = __webpack_require__(55);\n/**\n * An implementation of ServerActions that communicates with the server via REST requests.\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\n * persistent connection (using WebSockets or long-polling)\n */\nvar ReadonlyRestClient = /** @class */ (function (_super) {\n __extends(ReadonlyRestClient, _super);\n /**\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param {AuthTokenProvider} authTokenProvider_\n * @implements {ServerActions}\n */\n function ReadonlyRestClient(repoInfo_, onDataUpdate_, authTokenProvider_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n /** @private {function(...[*])} */\n _this.log_ = util_2.logWrapper('p:rest:');\n /**\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\n * that's been removed. :-/\n *\n * @private {!Object.}\n */\n _this.listens_ = {};\n return _this;\n }\n ReadonlyRestClient.prototype.reportStats = function (stats) {\n throw new Error('Method not implemented.');\n };\n /**\n * @param {!Query} query\n * @param {?number=} tag\n * @return {string}\n * @private\n */\n ReadonlyRestClient.getListenId_ = function (query, tag) {\n if (tag !== undefined) {\n return 'tag$' + tag;\n }\n else {\n util_1.assert(query.getQueryParams().isDefault(), \"should have a tag if it's not a default query.\");\n return query.path.toString();\n }\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var _this = this;\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + query.queryIdentifier());\n // Mark this listener so we can tell if it's removed.\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n var thisListen = {};\n this.listens_[listenId] = thisListen;\n var queryStringParamaters = query\n .getQueryParams()\n .toRestQueryStringParameters();\n this.restRequest_(pathString + '.json', queryStringParamaters, function (error, result) {\n var data = result;\n if (error === 404) {\n data = null;\n error = null;\n }\n if (error === null) {\n _this.onDataUpdate_(pathString, data, /*isMerge=*/ false, tag);\n }\n if (util_4.safeGet(_this.listens_, listenId) === thisListen) {\n var status_1;\n if (!error) {\n status_1 = 'ok';\n }\n else if (error == 401) {\n status_1 = 'permission_denied';\n }\n else {\n status_1 = 'rest_error:' + error;\n }\n onComplete(status_1, null);\n }\n });\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.unlisten = function (query, tag) {\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.refreshAuthToken = function (token) {\n // no-op since we just always call getToken.\n };\n /**\n * Performs a REST request to the given path, with the provided query string parameters,\n * and any auth credentials we have.\n *\n * @param {!string} pathString\n * @param {!Object.} queryStringParameters\n * @param {?function(?number, *=)} callback\n * @private\n */\n ReadonlyRestClient.prototype.restRequest_ = function (pathString, queryStringParameters, callback) {\n var _this = this;\n if (queryStringParameters === void 0) { queryStringParameters = {}; }\n queryStringParameters['format'] = 'export';\n this.authTokenProvider_\n .getToken(/*forceRefresh=*/ false)\n .then(function (authTokenData) {\n var authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n var url = (_this.repoInfo_.secure ? 'https://' : 'http://') +\n _this.repoInfo_.host +\n pathString +\n '?' +\n util_5.querystring(queryStringParameters);\n _this.log_('Sending REST request for ' + url);\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (callback && xhr.readyState === 4) {\n _this.log_('REST Response for ' + url + ' received. status:', xhr.status, 'response:', xhr.responseText);\n var res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = util_3.jsonEval(xhr.responseText);\n }\n catch (e) {\n util_2.warn('Failed to parse JSON response for ' +\n url +\n ': ' +\n xhr.responseText);\n }\n callback(null, res);\n }\n else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n util_2.warn('Got unsuccessful REST response for ' +\n url +\n ' Status: ' +\n xhr.status);\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n xhr.open('GET', url, /*asynchronous=*/ true);\n xhr.send();\n });\n };\n return ReadonlyRestClient;\n}(ServerActions_1.ServerActions));\nexports.ReadonlyRestClient = ReadonlyRestClient;\n\n//# sourceMappingURL=ReadonlyRestClient.js.map\n\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar util_2 = __webpack_require__(1);\nvar KeyIndex_1 = __webpack_require__(10);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar ValueIndex_1 = __webpack_require__(38);\nvar PathIndex_1 = __webpack_require__(42);\nvar IndexedFilter_1 = __webpack_require__(24);\nvar LimitedFilter_1 = __webpack_require__(108);\nvar RangedFilter_1 = __webpack_require__(56);\nvar util_3 = __webpack_require__(0);\n/**\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\n * user-facing API level, so it is not done here.\n * @constructor\n */\nvar QueryParams = /** @class */ (function () {\n function QueryParams() {\n this.limitSet_ = false;\n this.startSet_ = false;\n this.startNameSet_ = false;\n this.endSet_ = false;\n this.endNameSet_ = false;\n this.limit_ = 0;\n this.viewFrom_ = '';\n this.indexStartValue_ = null;\n this.indexStartName_ = '';\n this.indexEndValue_ = null;\n this.indexEndName_ = '';\n this.index_ = PriorityIndex_1.PRIORITY_INDEX;\n }\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasStart = function () {\n return this.startSet_;\n };\n /**\n * @return {boolean} True if it would return from left.\n */\n QueryParams.prototype.isViewFromLeft = function () {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n }\n else {\n return (this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT);\n }\n };\n /**\n * Only valid to call if hasStart() returns true\n * @return {*}\n */\n QueryParams.prototype.getIndexStartValue = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n };\n /**\n * Only valid to call if hasStart() returns true.\n * Returns the starting key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexStartName = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n }\n else {\n return util_2.MIN_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasEnd = function () {\n return this.endSet_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * @return {*}\n */\n QueryParams.prototype.getIndexEndValue = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * Returns the end key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexEndName = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n }\n else {\n return util_2.MAX_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasLimit = function () {\n return this.limitSet_;\n };\n /**\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\n */\n QueryParams.prototype.hasAnchoredLimit = function () {\n return this.limitSet_ && this.viewFrom_ !== '';\n };\n /**\n * Only valid to call if hasLimit() returns true\n * @return {!number}\n */\n QueryParams.prototype.getLimit = function () {\n util_1.assert(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n };\n /**\n * @return {!Index}\n */\n QueryParams.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @return {!QueryParams}\n * @private\n */\n QueryParams.prototype.copy_ = function () {\n var copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limit = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToFirst = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToLast = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.startAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n }\n else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.endAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n }\n else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n };\n /**\n * @param {!Index} index\n * @return {!QueryParams}\n */\n QueryParams.prototype.orderBy = function (index) {\n var newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n };\n /**\n * @return {!Object}\n */\n QueryParams.prototype.getQueryObject = function () {\n var WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n var obj = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n var viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n }\n else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PriorityIndex_1.PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.loadsAllData = function () {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.isDefault = function () {\n return this.loadsAllData() && this.index_ == PriorityIndex_1.PRIORITY_INDEX;\n };\n /**\n * @return {!NodeFilter}\n */\n QueryParams.prototype.getNodeFilter = function () {\n if (this.loadsAllData()) {\n return new IndexedFilter_1.IndexedFilter(this.getIndex());\n }\n else if (this.hasLimit()) {\n return new LimitedFilter_1.LimitedFilter(this);\n }\n else {\n return new RangedFilter_1.RangedFilter(this);\n }\n };\n /**\n * Returns a set of REST query string parameters representing this query.\n *\n * @return {!Object.} query string parameters\n */\n QueryParams.prototype.toRestQueryStringParameters = function () {\n var REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n var qs = {};\n if (this.isDefault()) {\n return qs;\n }\n var orderBy;\n if (this.index_ === PriorityIndex_1.PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n }\n else if (this.index_ === ValueIndex_1.VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n }\n else if (this.index_ === KeyIndex_1.KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n }\n else {\n util_1.assert(this.index_ instanceof PathIndex_1.PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = util_3.stringify(orderBy);\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = util_3.stringify(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + util_3.stringify(this.indexStartName_);\n }\n }\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = util_3.stringify(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + util_3.stringify(this.indexEndName_);\n }\n }\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n }\n else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n return qs;\n };\n /**\n * Wire Protocol Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n /**\n * REST Query Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n /**\n * Default, empty query parameters\n * @type {!QueryParams}\n * @const\n */\n QueryParams.DEFAULT = new QueryParams();\n return QueryParams;\n}());\nexports.QueryParams = QueryParams;\n\n//# sourceMappingURL=QueryParams.js.map\n\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RangedFilter_1 = __webpack_require__(56);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar Node_1 = __webpack_require__(5);\nvar util_1 = __webpack_require__(0);\nvar Change_1 = __webpack_require__(9);\n/**\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar LimitedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function LimitedFilter(params) {\n this.rangedFilter_ = new RangedFilter_1.RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.rangedFilter_.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n }\n else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_\n .getIndexedFilter()\n .updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n }\n else {\n return this.fullLimitUpdateChild_(snap, key, newChild, source, optChangeAccumulator);\n }\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n var filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n }\n else {\n if (this.limit_ * 2 < newSnap.numChildren() &&\n newSnap.isIndexed(this.index_)) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n var iterator = void 0;\n if (this.reverse_) {\n iterator = newSnap.getReverseIteratorFrom(this.rangedFilter_.getEndPost(), this.index_);\n }\n else {\n iterator = newSnap.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_);\n }\n var count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n var next = iterator.getNext();\n var inRange = void 0;\n if (this.reverse_) {\n inRange =\n this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n }\n else {\n inRange =\n this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n }\n else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n }\n else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var startPost = void 0;\n var endPost = void 0;\n var cmp = void 0;\n var iterator = void 0;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n var indexCompare_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCompare_1(b, a); };\n }\n else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n var count = 0;\n var foundStartPost = false;\n while (iterator.hasNext()) {\n var next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n var inRange = foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n }\n else {\n filtered = filtered.updateImmediateChild(next.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n }\n }\n }\n return this.rangedFilter_\n .getIndexedFilter()\n .updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndexedFilter = function () {\n return this.rangedFilter_.getIndexedFilter();\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!Node} snap\n * @param {string} childKey\n * @param {!Node} childSnap\n * @param {!CompleteChildSource} source\n * @param {?ChildChangeAccumulator} changeAccumulator\n * @return {!Node}\n * @private\n */\n LimitedFilter.prototype.fullLimitUpdateChild_ = function (snap, childKey, childSnap, source, changeAccumulator) {\n // TODO: rename all cache stuff etc to general snap terminology\n var cmp;\n if (this.reverse_) {\n var indexCmp_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCmp_1(b, a); };\n }\n else {\n cmp = this.index_.getCompare();\n }\n var oldEventCache = snap;\n util_1.assert(oldEventCache.numChildren() == this.limit_, '');\n var newChildNamedNode = new Node_1.NamedNode(childKey, childSnap);\n var windowBoundary = this.reverse_\n ? oldEventCache.getFirstChild(this.index_)\n : oldEventCache.getLastChild(this.index_);\n var inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n var oldChildSnap = oldEventCache.getImmediateChild(childKey);\n var nextChild = source.getChildAfterChild(this.index_, windowBoundary, this.reverse_);\n while (nextChild != null &&\n (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(this.index_, nextChild, this.reverse_);\n }\n var compareNext = nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n var remainsInWindow = inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childChangedChange(childKey, childSnap, oldChildSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n }\n else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(childKey, oldChildSnap));\n }\n var newEventCache = oldEventCache.updateImmediateChild(childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var nextChildInRange = nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(nextChild.name, nextChild.node));\n }\n return newEventCache.updateImmediateChild(nextChild.name, nextChild.node);\n }\n else {\n return newEventCache;\n }\n }\n }\n else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n }\n else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(windowBoundary.name, windowBoundary.node));\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(childKey, childSnap));\n }\n return oldEventCache\n .updateImmediateChild(childKey, childSnap)\n .updateImmediateChild(windowBoundary.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n else {\n return snap;\n }\n }\n else {\n return snap;\n }\n };\n return LimitedFilter;\n}());\nexports.LimitedFilter = LimitedFilter;\n\n//# sourceMappingURL=LimitedFilter.js.map\n\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Reference_1 = __webpack_require__(21);\nvar DataSnapshot_1 = __webpack_require__(22);\nvar Path_1 = __webpack_require__(2);\nvar Tree_1 = __webpack_require__(110);\nvar PriorityIndex_1 = __webpack_require__(3);\nvar util_2 = __webpack_require__(1);\nvar ServerValues_1 = __webpack_require__(43);\nvar validation_1 = __webpack_require__(7);\nvar util_3 = __webpack_require__(0);\nvar nodeFromJSON_1 = __webpack_require__(11);\nvar ChildrenNode_1 = __webpack_require__(4);\nvar Repo_1 = __webpack_require__(17);\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n/**\n * @enum {number}\n */\nvar TransactionStatus;\n(function (TransactionStatus) {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n TransactionStatus[TransactionStatus[\"RUN\"] = 0] = \"RUN\";\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n TransactionStatus[TransactionStatus[\"SENT\"] = 1] = \"SENT\";\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n TransactionStatus[TransactionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n TransactionStatus[TransactionStatus[\"SENT_NEEDS_ABORT\"] = 3] = \"SENT_NEEDS_ABORT\";\n // Temporary state used to mark transactions that need to be aborted.\n TransactionStatus[TransactionStatus[\"NEEDS_ABORT\"] = 4] = \"NEEDS_ABORT\";\n})(TransactionStatus = exports.TransactionStatus || (exports.TransactionStatus = {}));\n/**\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\n * @type {number}\n * @const\n * @private\n */\nRepo_1.Repo.MAX_TRANSACTION_RETRIES_ = 25;\n/**\n * Setup the transaction data structures\n * @private\n */\nRepo_1.Repo.prototype.transactions_init_ = function () {\n /**\n * Stores queues of outstanding transactions for Firebase locations.\n *\n * @type {!Tree.>}\n * @private\n */\n this.transactionQueueTree_ = new Tree_1.Tree();\n};\n/**\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\n *\n * @param {!Path} path Path at which to do transaction.\n * @param {function(*):*} transactionUpdate Update callback.\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\n */\nRepo_1.Repo.prototype.startTransaction = function (path, transactionUpdate, onComplete, applyLocally) {\n this.log_('transaction on ' + path);\n // Add a watch to make sure we get server updates.\n var valueCallback = function () { };\n var watchRef = new Reference_1.Reference(this, path);\n watchRef.on('value', valueCallback);\n var unwatcher = function () {\n watchRef.off('value', valueCallback);\n };\n // Initialize transaction.\n var transaction = {\n path: path,\n update: transactionUpdate,\n onComplete: onComplete,\n // One of TransactionStatus enums.\n status: null,\n // Used when combining transactions at different locations to figure out which one goes first.\n order: util_2.LUIDGenerator(),\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n // Function to call to clean up our .on() listener.\n unwatcher: unwatcher,\n // Stores why a transaction was aborted.\n abortReason: null,\n currentWriteId: null,\n currentInputSnapshot: null,\n currentOutputSnapshotRaw: null,\n currentOutputSnapshotResolved: null\n };\n // Run transaction initially.\n var currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n var newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n var snapshot = new DataSnapshot_1.DataSnapshot(transaction.currentInputSnapshot, new Reference_1.Reference(this, transaction.path), PriorityIndex_1.PRIORITY_INDEX);\n transaction.onComplete(null, false, snapshot);\n }\n }\n else {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newVal, transaction.path);\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n var queueNode = this.transactionQueueTree_.subTree(path);\n var nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n queueNode.setValue(nodeQueue);\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n var priorityForNode = void 0;\n if (typeof newVal === 'object' &&\n newVal !== null &&\n util_3.contains(newVal, '.priority')) {\n priorityForNode = util_3.safeGet(newVal, '.priority');\n util_1.assert(validation_1.isValidPriority(priorityForNode), 'Invalid priority returned by transaction. ' +\n 'Priority must be a valid string, finite number, server value, or null.');\n }\n else {\n var currentNode = this.serverSyncTree_.calcCompleteEventCache(path) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, priorityForNode);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, transaction.currentWriteId, transaction.applyLocally);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n this.sendReadyTransactions_();\n }\n};\n/**\n * @param {!Path} path\n * @param {Array.=} excludeSets A specific set to exclude\n * @return {Node}\n * @private\n */\nRepo_1.Repo.prototype.getLatestState_ = function (path, excludeSets) {\n return (this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n};\n/**\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\n * complete.\n *\n * Externally it's called with no arguments, but it calls itself recursively with a particular\n * transactionQueueTree node to recurse through the tree.\n *\n * @param {Tree.>=} node transactionQueueTree node to start at.\n * @private\n */\nRepo_1.Repo.prototype.sendReadyTransactions_ = function (node) {\n var _this = this;\n if (node === void 0) { node = this.transactionQueueTree_; }\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n if (node.getValue() !== null) {\n var queue = this.buildTransactionQueue_(node);\n util_1.assert(queue.length > 0, 'Sending zero length transaction queue');\n var allRun = queue.every(function (transaction) { return transaction.status === TransactionStatus.RUN; });\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n }\n else if (node.hasChildren()) {\n node.forEachChild(function (childNode) {\n _this.sendReadyTransactions_(childNode);\n });\n }\n};\n/**\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\n *\n * @param {!Path} path The location of the queue.\n * @param {!Array.} queue Queue of transactions under the specified location.\n * @private\n */\nRepo_1.Repo.prototype.sendTransactionQueue_ = function (path, queue) {\n var _this = this;\n // Mark transactions as sent and increment retry count!\n var setsToIgnore = queue.map(function (txn) {\n return txn.currentWriteId;\n });\n var latestState = this.getLatestState_(path, setsToIgnore);\n var snapToSend = latestState;\n var latestHash = latestState.hash();\n for (var i = 0; i < queue.length; i++) {\n var txn = queue[i];\n util_1.assert(txn.status === TransactionStatus.RUN, 'tryToSendTransactionQueue_: items in queue should all be run.');\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n var relativePath = Path_1.Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(relativePath /**@type {!Node} */, txn.currentOutputSnapshotRaw);\n }\n var dataToSend = snapToSend.val(true);\n var pathToSend = path;\n // Send the put.\n this.server_.put(pathToSend.toString(), dataToSend, function (status) {\n _this.log_('transaction put response', {\n path: pathToSend.toString(),\n status: status\n });\n var events = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(_this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId));\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n var node = queue[i].currentOutputSnapshotResolved;\n var ref = new Reference_1.Reference(_this, queue[i].path);\n var snapshot = new DataSnapshot_1.DataSnapshot(node, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, true, snapshot));\n }\n queue[i].unwatcher();\n }\n // Now remove the completed transactions.\n _this.pruneCompletedTransactionsBelowNode_(_this.transactionQueueTree_.subTree(path));\n // There may be pending transactions that we can now send.\n _this.sendReadyTransactions_();\n _this.eventQueue_.raiseEventsForChangedPath(path, events);\n // Finally, trigger onComplete callbacks.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT)\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n else\n queue[i].status = TransactionStatus.RUN;\n }\n }\n else {\n util_2.warn('transaction at ' + pathToSend.toString() + ' failed: ' + status);\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n _this.rerunTransactions_(path);\n }\n }, latestHash);\n};\n/**\n * Finds all transactions dependent on the data at changedPath and reruns them.\n *\n * Should be called any time cached data changes.\n *\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\n * be raised for.\n *\n * @param {!Path} changedPath The path in mergedData that changed.\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactions_ = function (changedPath) {\n var rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n var path = rootMostTransactionNode.path();\n var queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n return path;\n};\n/**\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\n *\n * @param {Array.} queue The queue of transactions to run.\n * @param {!Path} path The path the queue is for.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactionQueue_ = function (queue, path) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n var events = [];\n // Ignore all of the sets we're going to re-run.\n var txnsToRerun = queue.filter(function (q) {\n return q.status === TransactionStatus.RUN;\n });\n var setsToIgnore = txnsToRerun.map(function (q) {\n return q.currentWriteId;\n });\n for (var i = 0; i < queue.length; i++) {\n var transaction = queue[i];\n var relativePath = Path_1.Path.relativePath(path, transaction.path);\n var abortTransaction = false, abortReason = void 0;\n util_1.assert(relativePath !== null, 'rerunTransactionsUnderNode_: relativePath should not be null.');\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= Repo_1.Repo.MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else {\n // This code reruns a transaction\n var currentNode = this.getLatestState_(transaction.path, setsToIgnore);\n transaction.currentInputSnapshot = currentNode;\n var newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newData, transaction.path);\n var newDataNode = nodeFromJSON_1.nodeFromJSON(newData);\n var hasExplicitPriority = typeof newData === 'object' &&\n newData != null &&\n util_3.contains(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n var oldWriteId = transaction.currentWriteId;\n var serverValues = this.generateServerValues();\n var newNodeResolved = ServerValues_1.resolveDeferredValueSnapshot(newDataNode, serverValues);\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(this.serverSyncTree_.applyUserOverwrite(transaction.path, newNodeResolved, transaction.currentWriteId, transaction.applyLocally));\n events = events.concat(this.serverSyncTree_.ackUserWrite(oldWriteId, true));\n }\n else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function (unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n var ref = new Reference_1.Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n var lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n var snapshot = new DataSnapshot_1.DataSnapshot(lastInput, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n }\n else {\n callbacks.push(queue[i].onComplete.bind(null, new Error(abortReason), false, null));\n }\n }\n }\n }\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n // Now fire callbacks, now that we're in a good, known state.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n/**\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\n * the node for the given path if there are no pending transactions on any ancestor.\n *\n * @param {!Path} path The location to start at.\n * @return {!Tree.>} The rootmost node with a transaction.\n * @private\n */\nRepo_1.Repo.prototype.getAncestorTransactionNode_ = function (path) {\n var front;\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n var transactionNode = this.transactionQueueTree_;\n while ((front = path.getFront()) !== null &&\n transactionNode.getValue() === null) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n return transactionNode;\n};\n/**\n * Builds the queue of all transactions at or below the specified transactionNode.\n *\n * @param {!Tree.>} transactionNode\n * @return {Array.} The generated queue.\n * @private\n */\nRepo_1.Repo.prototype.buildTransactionQueue_ = function (transactionNode) {\n // Walk any child transaction queues and aggregate them into a single queue.\n var transactionQueue = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function (a, b) {\n return a.order - b.order;\n });\n return transactionQueue;\n};\n/**\n * @param {!Tree.>} node\n * @param {Array.} queue\n * @private\n */\nRepo_1.Repo.prototype.aggregateTransactionQueuesForNode_ = function (node, queue) {\n var _this = this;\n var nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (var i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n node.forEachChild(function (child) {\n _this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n/**\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\n *\n * @param {!Tree.>} node\n * @private\n */\nRepo_1.Repo.prototype.pruneCompletedTransactionsBelowNode_ = function (node) {\n var _this = this;\n var queue = node.getValue();\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n node.forEachChild(function (childNode) {\n _this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n/**\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\n * since we consider them incompatible with transactions.\n *\n * @param {!Path} path Path for which we want to abort related transactions.\n * @return {!Path}\n * @private\n */\nRepo_1.Repo.prototype.abortTransactions_ = function (path) {\n var _this = this;\n var affectedPath = this.getAncestorTransactionNode_(path).path();\n var transactionNode = this.transactionQueueTree_.subTree(path);\n transactionNode.forEachAncestor(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n this.abortTransactionsOnNode_(transactionNode);\n transactionNode.forEachDescendant(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n return affectedPath;\n};\n/**\n * Abort transactions stored in this transaction queue node.\n *\n * @param {!Tree.>} node Node to abort transactions for.\n * @private\n */\nRepo_1.Repo.prototype.abortTransactionsOnNode_ = function (node) {\n var queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n var events = [];\n var lastSent = -1;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n }\n else if (queue[i].status === TransactionStatus.SENT) {\n util_1.assert(lastSent === i - 1, 'All SENT items should be at beginning of queue.');\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n }\n else {\n util_1.assert(queue[i].status === TransactionStatus.RUN, 'Unexpected transaction status in abort');\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true));\n if (queue[i].onComplete) {\n var snapshot = null;\n callbacks.push(queue[i].onComplete.bind(null, new Error('set'), false, snapshot));\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n }\n else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n};\n\n//# sourceMappingURL=Repo_transaction.js.map\n\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar Path_1 = __webpack_require__(2);\nvar util_2 = __webpack_require__(0);\n/**\n * Node in a Tree.\n */\nvar TreeNode = /** @class */ (function () {\n function TreeNode() {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n this.children = {};\n this.childCount = 0;\n this.value = null;\n }\n return TreeNode;\n}());\nexports.TreeNode = TreeNode;\n/**\n * A light-weight tree, traversable by path. Nodes can have both values and children.\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\n * children.\n */\nvar Tree = /** @class */ (function () {\n /**\n * @template T\n * @param {string=} name_ Optional name of the node.\n * @param {Tree=} parent_ Optional parent node.\n * @param {TreeNode=} node_ Optional node to wrap.\n */\n function Tree(name_, parent_, node_) {\n if (name_ === void 0) { name_ = ''; }\n if (parent_ === void 0) { parent_ = null; }\n if (node_ === void 0) { node_ = new TreeNode(); }\n this.name_ = name_;\n this.parent_ = parent_;\n this.node_ = node_;\n }\n /**\n * Returns a sub-Tree for the given path.\n *\n * @param {!(string|Path)} pathObj Path to look up.\n * @return {!Tree.} Tree for path.\n */\n Tree.prototype.subTree = function (pathObj) {\n // TODO: Require pathObj to be Path?\n var path = pathObj instanceof Path_1.Path ? pathObj : new Path_1.Path(pathObj);\n var child = this, next;\n while ((next = path.getFront()) !== null) {\n var childNode = util_2.safeGet(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n return child;\n };\n /**\n * Returns the data associated with this tree node.\n *\n * @return {?T} The data or null if no data exists.\n */\n Tree.prototype.getValue = function () {\n return this.node_.value;\n };\n /**\n * Sets data to this tree node.\n *\n * @param {!T} value Value to set.\n */\n Tree.prototype.setValue = function (value) {\n util_1.assert(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n };\n /**\n * Clears the contents of the tree node (its value and all children).\n */\n Tree.prototype.clear = function () {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n };\n /**\n * @return {boolean} Whether the tree has any children.\n */\n Tree.prototype.hasChildren = function () {\n return this.node_.childCount > 0;\n };\n /**\n * @return {boolean} Whether the tree is empty (no value or children).\n */\n Tree.prototype.isEmpty = function () {\n return this.getValue() === null && !this.hasChildren();\n };\n /**\n * Calls action for each child of this tree node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachChild = function (action) {\n var _this = this;\n util_2.forEach(this.node_.children, function (child, childTree) {\n action(new Tree(child, _this, childTree));\n });\n };\n /**\n * Does a depth-first traversal of this node's descendants, calling action for each one.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\n * false.\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\n * parent.\n */\n Tree.prototype.forEachDescendant = function (action, includeSelf, childrenFirst) {\n if (includeSelf && !childrenFirst)\n action(this);\n this.forEachChild(function (child) {\n child.forEachDescendant(action, /*includeSelf=*/ true, childrenFirst);\n });\n if (includeSelf && childrenFirst)\n action(this);\n };\n /**\n * Calls action on each ancestor node.\n *\n * @param {function(!Tree.)} action Action to be called on each parent; return\n * true to abort.\n * @param {boolean=} includeSelf Whether to call action on this node as well.\n * @return {boolean} true if the action callback returned true.\n */\n Tree.prototype.forEachAncestor = function (action, includeSelf) {\n var node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n };\n /**\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\n * is found, action is called on it and traversal does not continue inside the node.\n * Action is *not* called on this node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachImmediateDescendantWithValue = function (action) {\n this.forEachChild(function (child) {\n if (child.getValue() !== null)\n action(child);\n else\n child.forEachImmediateDescendantWithValue(action);\n });\n };\n /**\n * @return {!Path} The path of this tree node, as a Path.\n */\n Tree.prototype.path = function () {\n return new Path_1.Path(this.parent_ === null\n ? this.name_\n : this.parent_.path() + '/' + this.name_);\n };\n /**\n * @return {string} The name of the tree node.\n */\n Tree.prototype.name = function () {\n return this.name_;\n };\n /**\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\n */\n Tree.prototype.parent = function () {\n return this.parent_;\n };\n /**\n * Adds or removes this child from its parent based on whether it's empty or not.\n *\n * @private\n */\n Tree.prototype.updateParents_ = function () {\n if (this.parent_ !== null)\n this.parent_.updateChild_(this.name_, this);\n };\n /**\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\n *\n * @param {string} childName The name of the child to update.\n * @param {!Tree.} child The child to update.\n * @private\n */\n Tree.prototype.updateChild_ = function (childName, child) {\n var childEmpty = child.isEmpty();\n var childExists = util_2.contains(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n }\n else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n };\n return Tree;\n}());\nexports.Tree = Tree;\n\n//# sourceMappingURL=Tree.js.map\n\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar WebSocketConnection_1 = __webpack_require__(54);\nvar BrowserPollConnection_1 = __webpack_require__(53);\n/**\n * INTERNAL methods for internal-use only (tests, etc.).\n *\n * Customers shouldn't use these or else should be aware that they could break at any time.\n *\n * @const\n */\nexports.forceLongPolling = function () {\n WebSocketConnection_1.WebSocketConnection.forceDisallow();\n BrowserPollConnection_1.BrowserPollConnection.forceAllow();\n};\nexports.forceWebSockets = function () {\n BrowserPollConnection_1.BrowserPollConnection.forceDisallow();\n};\n/* Used by App Manager */\nexports.isWebSocketsAvailable = function () {\n return WebSocketConnection_1.WebSocketConnection['isAvailable']();\n};\nexports.setSecurityDebugCallback = function (ref, callback) {\n ref.repo.persistentConnection_.securityDebugCallback_ = callback;\n};\nexports.stats = function (ref, showDelta) {\n ref.repo.stats(showDelta);\n};\nexports.statsIncrementCounter = function (ref, metric) {\n ref.repo.statsIncrementCounter(metric);\n};\nexports.dataUpdateCount = function (ref) {\n return ref.repo.dataUpdateCount;\n};\nexports.interceptServerData = function (ref, callback) {\n return ref.repo.interceptServerData_(callback);\n};\n\n//# sourceMappingURL=internal.js.map\n\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RepoInfo_1 = __webpack_require__(34);\nvar PersistentConnection_1 = __webpack_require__(50);\nvar RepoManager_1 = __webpack_require__(26);\nvar Connection_1 = __webpack_require__(52);\nexports.DataConnection = PersistentConnection_1.PersistentConnection;\n/**\n * @param {!string} pathString\n * @param {function(*)} onComplete\n */\nPersistentConnection_1.PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n/**\n * @param {*} data\n * @param {function(*)} onEcho\n */\nPersistentConnection_1.PersistentConnection.prototype.echo = function (data, onEcho) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n// RealTimeConnection properties that we use in tests.\nexports.RealTimeConnection = Connection_1.Connection;\n/**\n * @param {function(): string} newHash\n * @return {function()}\n */\nexports.hijackHash = function (newHash) {\n var oldPut = PersistentConnection_1.PersistentConnection.prototype.put;\n PersistentConnection_1.PersistentConnection.prototype.put = function (pathString, data, opt_onComplete, opt_hash) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function () {\n PersistentConnection_1.PersistentConnection.prototype.put = oldPut;\n };\n};\n/**\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\n */\nexports.ConnectionTarget = RepoInfo_1.RepoInfo;\n/**\n * @param {!Query} query\n * @return {!string}\n */\nexports.queryIdentifier = function (query) {\n return query.queryIdentifier();\n};\n/**\n * @param {!Query} firebaseRef\n * @return {!Object}\n */\nexports.listens = function (firebaseRef) {\n return firebaseRef.repo.persistentConnection_.listens_;\n};\n/**\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\n *\n * @param {boolean} forceRestClient\n */\nexports.forceRestClient = function (forceRestClient) {\n RepoManager_1.RepoManager.getInstance().forceRestClient(forceRestClient);\n};\n\n//# sourceMappingURL=test_access.js.map\n\n\n/***/ })\n],[78]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-database.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-database.js","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"@firebase/util\");\nvar util_5 = require(\"@firebase/util\");\nvar util_6 = require(\"@firebase/util\");\nvar storage_1 = require(\"../storage/storage\");\nvar util_7 = require(\"@firebase/util\");\n/**\n * Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).\n * @type {function(): number} Generated ID.\n */\nexports.LUIDGenerator = (function () {\n var id = 1;\n return function () {\n return id++;\n };\n})();\n/**\n * Sha1 hash of the input string\n * @param {!string} str The string to hash\n * @return {!string} The resulting hash\n */\nexports.sha1 = function (str) {\n var utf8Bytes = util_5.stringToByteArray(str);\n var sha1 = new util_4.Sha1();\n sha1.update(utf8Bytes);\n var sha1Bytes = sha1.digest();\n return util_3.base64.encodeByteArray(sha1Bytes);\n};\n/**\n * @param {...*} var_args\n * @return {string}\n * @private\n */\nvar buildLogMessage_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var message = '';\n for (var i = 0; i < var_args.length; i++) {\n if (Array.isArray(var_args[i]) ||\n (var_args[i] &&\n typeof var_args[i] === 'object' &&\n typeof var_args[i].length === 'number')) {\n message += buildLogMessage_.apply(null, var_args[i]);\n }\n else if (typeof var_args[i] === 'object') {\n message += util_6.stringify(var_args[i]);\n }\n else {\n message += var_args[i];\n }\n message += ' ';\n }\n return message;\n};\n/**\n * Use this for all debug messages in Firebase.\n * @type {?function(string)}\n */\nexports.logger = null;\n/**\n * Flag to check for log availability on first log message\n * @type {boolean}\n * @private\n */\nvar firstLog_ = true;\n/**\n * The implementation of Firebase.enableLogging (defined here to break dependencies)\n * @param {boolean|?function(string)} logger_ A flag to turn on logging, or a custom logger\n * @param {boolean=} persistent Whether or not to persist logging settings across refreshes\n */\nexports.enableLogging = function (logger_, persistent) {\n util_1.assert(!persistent || (logger_ === true || logger_ === false), \"Can't turn on custom loggers persistently.\");\n if (logger_ === true) {\n if (typeof console !== 'undefined') {\n if (typeof console.log === 'function') {\n exports.logger = console.log.bind(console);\n }\n else if (typeof console.log === 'object') {\n // IE does this.\n exports.logger = function (message) {\n console.log(message);\n };\n }\n }\n if (persistent)\n storage_1.SessionStorage.set('logging_enabled', true);\n }\n else if (typeof logger_ === 'function') {\n exports.logger = logger_;\n }\n else {\n exports.logger = null;\n storage_1.SessionStorage.remove('logging_enabled');\n }\n};\n/**\n *\n * @param {...(string|Arguments)} var_args\n */\nexports.log = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (firstLog_ === true) {\n firstLog_ = false;\n if (exports.logger === null && storage_1.SessionStorage.get('logging_enabled') === true)\n exports.enableLogging(true);\n }\n if (exports.logger) {\n var message = buildLogMessage_.apply(null, var_args);\n exports.logger(message);\n }\n};\n/**\n * @param {!string} prefix\n * @return {function(...[*])}\n */\nexports.logWrapper = function (prefix) {\n return function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n exports.log.apply(void 0, [prefix].concat(var_args));\n };\n};\n/**\n * @param {...string} var_args\n */\nexports.error = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n var message = 'FIREBASE INTERNAL ERROR: ' + buildLogMessage_.apply(void 0, var_args);\n if (typeof console.error !== 'undefined') {\n console.error(message);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * @param {...string} var_args\n */\nexports.fatal = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var message = buildLogMessage_.apply(void 0, var_args);\n throw new Error('FIREBASE FATAL ERROR: ' + message);\n};\n/**\n * @param {...*} var_args\n */\nexports.warn = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n var message = 'FIREBASE WARNING: ' + buildLogMessage_.apply(void 0, var_args);\n if (typeof console.warn !== 'undefined') {\n console.warn(message);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * Logs a warning if the containing page uses https. Called when a call to new Firebase\n * does not use https.\n */\nexports.warnIfPageIsSecure = function () {\n // Be very careful accessing browser globals. Who knows what may or may not exist.\n if (typeof window !== 'undefined' &&\n window.location &&\n window.location.protocol &&\n window.location.protocol.indexOf('https:') !== -1) {\n exports.warn('Insecure Firebase access from a secure page. ' +\n 'Please use https in calls to new Firebase().');\n }\n};\n/**\n * @param {!String} methodName\n */\nexports.warnAboutUnsupportedMethod = function (methodName) {\n exports.warn(methodName +\n ' is unsupported and will likely change soon. ' +\n 'Please do not use.');\n};\n/**\n * Returns true if data is NaN, or +/- Infinity.\n * @param {*} data\n * @return {boolean}\n */\nexports.isInvalidJSONNumber = function (data) {\n return (typeof data === 'number' &&\n (data != data || // NaN\n data == Number.POSITIVE_INFINITY ||\n data == Number.NEGATIVE_INFINITY));\n};\n/**\n * @param {function()} fn\n */\nexports.executeWhenDOMReady = function (fn) {\n if (util_7.isNodeSdk() || document.readyState === 'complete') {\n fn();\n }\n else {\n // Modeled after jQuery. Try DOMContentLoaded and onreadystatechange (which\n // fire before onload), but fall back to onload.\n var called_1 = false;\n var wrappedFn_1 = function () {\n if (!document.body) {\n setTimeout(wrappedFn_1, Math.floor(10));\n return;\n }\n if (!called_1) {\n called_1 = true;\n fn();\n }\n };\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', wrappedFn_1, false);\n // fallback to onload.\n window.addEventListener('load', wrappedFn_1, false);\n }\n else if (document.attachEvent) {\n // IE.\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'complete')\n wrappedFn_1();\n });\n // fallback to onload.\n window.attachEvent('onload', wrappedFn_1);\n // jQuery has an extra hack for IE that we could employ (based on\n // http://javascript.nwbox.com/IEContentLoaded/) But it looks really old.\n // I'm hoping we don't need it.\n }\n }\n};\n/**\n * Minimum key name. Invalid for actual data, used as a marker to sort before any valid names\n * @type {!string}\n */\nexports.MIN_NAME = '[MIN_NAME]';\n/**\n * Maximum key name. Invalid for actual data, used as a marker to sort above any valid names\n * @type {!string}\n */\nexports.MAX_NAME = '[MAX_NAME]';\n/**\n * Compares valid Firebase key names, plus min and max name\n * @param {!string} a\n * @param {!string} b\n * @return {!number}\n */\nexports.nameCompare = function (a, b) {\n if (a === b) {\n return 0;\n }\n else if (a === exports.MIN_NAME || b === exports.MAX_NAME) {\n return -1;\n }\n else if (b === exports.MIN_NAME || a === exports.MAX_NAME) {\n return 1;\n }\n else {\n var aAsInt = exports.tryParseInt(a), bAsInt = exports.tryParseInt(b);\n if (aAsInt !== null) {\n if (bAsInt !== null) {\n return aAsInt - bAsInt == 0 ? a.length - b.length : aAsInt - bAsInt;\n }\n else {\n return -1;\n }\n }\n else if (bAsInt !== null) {\n return 1;\n }\n else {\n return a < b ? -1 : 1;\n }\n }\n};\n/**\n * @param {!string} a\n * @param {!string} b\n * @return {!number} comparison result.\n */\nexports.stringCompare = function (a, b) {\n if (a === b) {\n return 0;\n }\n else if (a < b) {\n return -1;\n }\n else {\n return 1;\n }\n};\n/**\n * @param {string} key\n * @param {Object} obj\n * @return {*}\n */\nexports.requireKey = function (key, obj) {\n if (obj && key in obj) {\n return obj[key];\n }\n else {\n throw new Error('Missing required key (' + key + ') in object: ' + util_6.stringify(obj));\n }\n};\n/**\n * @param {*} obj\n * @return {string}\n */\nexports.ObjectToUniqueKey = function (obj) {\n if (typeof obj !== 'object' || obj === null)\n return util_6.stringify(obj);\n var keys = [];\n for (var k in obj) {\n keys.push(k);\n }\n // Export as json, but with the keys sorted.\n keys.sort();\n var key = '{';\n for (var i = 0; i < keys.length; i++) {\n if (i !== 0)\n key += ',';\n key += util_6.stringify(keys[i]);\n key += ':';\n key += exports.ObjectToUniqueKey(obj[keys[i]]);\n }\n key += '}';\n return key;\n};\n/**\n * Splits a string into a number of smaller segments of maximum size\n * @param {!string} str The string\n * @param {!number} segsize The maximum number of chars in the string.\n * @return {Array.} The string, split into appropriately-sized chunks\n */\nexports.splitStringBySize = function (str, segsize) {\n var len = str.length;\n if (len <= segsize) {\n return [str];\n }\n var dataSegs = [];\n for (var c = 0; c < len; c += segsize) {\n if (c + segsize > len) {\n dataSegs.push(str.substring(c, len));\n }\n else {\n dataSegs.push(str.substring(c, c + segsize));\n }\n }\n return dataSegs;\n};\n/**\n * Apply a function to each (key, value) pair in an object or\n * apply a function to each (index, value) pair in an array\n * @param {!(Object|Array)} obj The object or array to iterate over\n * @param {function(?, ?)} fn The function to apply\n */\nexports.each = function (obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; ++i) {\n fn(i, obj[i]);\n }\n }\n else {\n /**\n * in the conversion of code we removed the goog.object.forEach\n * function which did a value,key callback. We standardized on\n * a single impl that does a key, value callback. So we invert\n * to not have to touch the `each` code points\n */\n util_2.forEach(obj, function (key, val) { return fn(val, key); });\n }\n};\n/**\n * Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.\n * @param {function(*)} callback Callback function.\n * @param {?Object=} context Optional context to bind to.\n * @return {function(*)}\n */\nexports.bindCallback = function (callback, context) {\n return context ? callback.bind(context) : callback;\n};\n/**\n * Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)\n * I made one modification at the end and removed the NaN / Infinity\n * handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.\n * @param {!number} v A double\n * @return {string}\n */\nexports.doubleToIEEE754String = function (v) {\n util_1.assert(!exports.isInvalidJSONNumber(v), 'Invalid JSON number'); // MJL\n var ebits = 11, fbits = 52;\n var bias = (1 << (ebits - 1)) - 1, s, e, f, ln, i, bits, str;\n // Compute sign, exponent, fraction\n // Skip NaN / Infinity handling --MJL.\n if (v === 0) {\n e = 0;\n f = 0;\n s = 1 / v === -Infinity ? 1 : 0;\n }\n else {\n s = v < 0;\n v = Math.abs(v);\n if (v >= Math.pow(2, 1 - bias)) {\n // Normalized\n ln = Math.min(Math.floor(Math.log(v) / Math.LN2), bias);\n e = ln + bias;\n f = Math.round(v * Math.pow(2, fbits - ln) - Math.pow(2, fbits));\n }\n else {\n // Denormalized\n e = 0;\n f = Math.round(v / Math.pow(2, 1 - bias - fbits));\n }\n }\n // Pack sign, exponent, fraction\n bits = [];\n for (i = fbits; i; i -= 1) {\n bits.push(f % 2 ? 1 : 0);\n f = Math.floor(f / 2);\n }\n for (i = ebits; i; i -= 1) {\n bits.push(e % 2 ? 1 : 0);\n e = Math.floor(e / 2);\n }\n bits.push(s ? 1 : 0);\n bits.reverse();\n str = bits.join('');\n // Return the data as a hex string. --MJL\n var hexByteString = '';\n for (i = 0; i < 64; i += 8) {\n var hexByte = parseInt(str.substr(i, 8), 2).toString(16);\n if (hexByte.length === 1)\n hexByte = '0' + hexByte;\n hexByteString = hexByteString + hexByte;\n }\n return hexByteString.toLowerCase();\n};\n/**\n * Used to detect if we're in a Chrome content script (which executes in an\n * isolated environment where long-polling doesn't work).\n * @return {boolean}\n */\nexports.isChromeExtensionContentScript = function () {\n return !!(typeof window === 'object' &&\n window['chrome'] &&\n window['chrome']['extension'] &&\n !/^chrome/.test(window.location.href));\n};\n/**\n * Used to detect if we're in a Windows 8 Store app.\n * @return {boolean}\n */\nexports.isWindowsStoreApp = function () {\n // Check for the presence of a couple WinRT globals\n return typeof Windows === 'object' && typeof Windows.UI === 'object';\n};\n/**\n * Converts a server error code to a Javascript Error\n * @param {!string} code\n * @param {!Query} query\n * @return {Error}\n */\nexports.errorForServerCode = function (code, query) {\n var reason = 'Unknown Error';\n if (code === 'too_big') {\n reason =\n 'The data requested exceeds the maximum size ' +\n 'that can be accessed with a single request.';\n }\n else if (code == 'permission_denied') {\n reason = \"Client doesn't have permission to access the desired data.\";\n }\n else if (code == 'unavailable') {\n reason = 'The service is unavailable';\n }\n var error = new Error(code + ' at ' + query.path.toString() + ': ' + reason);\n error.code = code.toUpperCase();\n return error;\n};\n/**\n * Used to test for integer-looking strings\n * @type {RegExp}\n * @private\n */\nexports.INTEGER_REGEXP_ = new RegExp('^-?\\\\d{1,10}$');\n/**\n * If the string contains a 32-bit integer, return it. Else return null.\n * @param {!string} str\n * @return {?number}\n */\nexports.tryParseInt = function (str) {\n if (exports.INTEGER_REGEXP_.test(str)) {\n var intVal = Number(str);\n if (intVal >= -2147483648 && intVal <= 2147483647) {\n return intVal;\n }\n }\n return null;\n};\n/**\n * Helper to run some code but catch any exceptions and re-throw them later.\n * Useful for preventing user callbacks from breaking internal code.\n *\n * Re-throwing the exception from a setTimeout is a little evil, but it's very\n * convenient (we don't have to try to figure out when is a safe point to\n * re-throw it), and the behavior seems reasonable:\n *\n * * If you aren't pausing on exceptions, you get an error in the console with\n * the correct stack trace.\n * * If you're pausing on all exceptions, the debugger will pause on your\n * exception and then again when we rethrow it.\n * * If you're only pausing on uncaught exceptions, the debugger will only pause\n * on us re-throwing it.\n *\n * @param {!function()} fn The code to guard.\n */\nexports.exceptionGuard = function (fn) {\n try {\n fn();\n }\n catch (e) {\n // Re-throw exception when it's safe.\n setTimeout(function () {\n // It used to be that \"throw e\" would result in a good console error with\n // relevant context, but as of Chrome 39, you just get the firebase.js\n // file/line number where we re-throw it, which is useless. So we log\n // e.stack explicitly.\n var stack = e.stack || '';\n exports.warn('Exception was thrown by user callback.', stack);\n throw e;\n }, Math.floor(0));\n }\n};\n/**\n * Helper function to safely call opt_callback with the specified arguments. It:\n * 1. Turns into a no-op if opt_callback is null or undefined.\n * 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.\n *\n * @param {?Function=} callback Optional onComplete callback.\n * @param {...*} var_args Arbitrary args to be passed to opt_onComplete\n */\nexports.callUserCallback = function (callback) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (typeof callback === 'function') {\n exports.exceptionGuard(function () {\n callback.apply(void 0, var_args);\n });\n }\n};\n/**\n * @return {boolean} true if we think we're currently being crawled.\n */\nexports.beingCrawled = function () {\n var userAgent = (typeof window === 'object' &&\n window['navigator'] &&\n window['navigator']['userAgent']) ||\n '';\n // For now we whitelist the most popular crawlers. We should refine this to be the set of crawlers we\n // believe to support JavaScript/AJAX rendering.\n // NOTE: Google Webmaster Tools doesn't really belong, but their \"This is how a visitor to your website\n // would have seen the page\" is flaky if we don't treat it as a crawler.\n return (userAgent.search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i) >= 0);\n};\n/**\n * Export a property of an object using a getter function.\n *\n * @param {!Object} object\n * @param {string} name\n * @param {!function(): *} fnGet\n */\nexports.exportPropGetter = function (object, name, fnGet) {\n Object.defineProperty(object, name, { get: fnGet });\n};\n/**\n * Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.\n *\n * It is removed with clearTimeout() as normal.\n *\n * @param {Function} fn Function to run.\n * @param {number} time Milliseconds to wait before running.\n * @return {number|Object} The setTimeout() return value.\n */\nexports.setTimeoutNonBlocking = function (fn, time) {\n var timeout = setTimeout(fn, time);\n if (typeof timeout === 'object' && timeout['unref']) {\n timeout['unref']();\n }\n return timeout;\n};\n\n//# sourceMappingURL=util.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/util.js\n// module id = 1\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * An immutable object representing a parsed path. It's immutable so that you\n * can pass them around to other functions without worrying about them changing\n * it.\n */\nvar Path = /** @class */ (function () {\n /**\n * @param {string|Array.} pathOrString Path string to parse,\n * or another path, or the raw tokens array\n * @param {number=} pieceNum\n */\n function Path(pathOrString, pieceNum) {\n if (pieceNum === void 0) {\n this.pieces_ = pathOrString.split('/');\n // Remove empty pieces.\n var copyTo = 0;\n for (var i = 0; i < this.pieces_.length; i++) {\n if (this.pieces_[i].length > 0) {\n this.pieces_[copyTo] = this.pieces_[i];\n copyTo++;\n }\n }\n this.pieces_.length = copyTo;\n this.pieceNum_ = 0;\n }\n else {\n this.pieces_ = pathOrString;\n this.pieceNum_ = pieceNum;\n }\n }\n Object.defineProperty(Path, \"Empty\", {\n /**\n * Singleton to represent an empty path\n *\n * @const\n */\n get: function () {\n return new Path('');\n },\n enumerable: true,\n configurable: true\n });\n Path.prototype.getFront = function () {\n if (this.pieceNum_ >= this.pieces_.length)\n return null;\n return this.pieces_[this.pieceNum_];\n };\n /**\n * @return {number} The number of segments in this path\n */\n Path.prototype.getLength = function () {\n return this.pieces_.length - this.pieceNum_;\n };\n /**\n * @return {!Path}\n */\n Path.prototype.popFront = function () {\n var pieceNum = this.pieceNum_;\n if (pieceNum < this.pieces_.length) {\n pieceNum++;\n }\n return new Path(this.pieces_, pieceNum);\n };\n /**\n * @return {?string}\n */\n Path.prototype.getBack = function () {\n if (this.pieceNum_ < this.pieces_.length)\n return this.pieces_[this.pieces_.length - 1];\n return null;\n };\n Path.prototype.toString = function () {\n var pathString = '';\n for (var i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + this.pieces_[i];\n }\n return pathString || '/';\n };\n Path.prototype.toUrlEncodedString = function () {\n var pathString = '';\n for (var i = this.pieceNum_; i < this.pieces_.length; i++) {\n if (this.pieces_[i] !== '')\n pathString += '/' + encodeURIComponent(String(this.pieces_[i]));\n }\n return pathString || '/';\n };\n /**\n * Shallow copy of the parts of the path.\n *\n * @param {number=} begin\n * @return {!Array}\n */\n Path.prototype.slice = function (begin) {\n if (begin === void 0) { begin = 0; }\n return this.pieces_.slice(this.pieceNum_ + begin);\n };\n /**\n * @return {?Path}\n */\n Path.prototype.parent = function () {\n if (this.pieceNum_ >= this.pieces_.length)\n return null;\n var pieces = [];\n for (var i = this.pieceNum_; i < this.pieces_.length - 1; i++)\n pieces.push(this.pieces_[i]);\n return new Path(pieces, 0);\n };\n /**\n * @param {string|!Path} childPathObj\n * @return {!Path}\n */\n Path.prototype.child = function (childPathObj) {\n var pieces = [];\n for (var i = this.pieceNum_; i < this.pieces_.length; i++)\n pieces.push(this.pieces_[i]);\n if (childPathObj instanceof Path) {\n for (var i = childPathObj.pieceNum_; i < childPathObj.pieces_.length; i++) {\n pieces.push(childPathObj.pieces_[i]);\n }\n }\n else {\n var childPieces = childPathObj.split('/');\n for (var i = 0; i < childPieces.length; i++) {\n if (childPieces[i].length > 0)\n pieces.push(childPieces[i]);\n }\n }\n return new Path(pieces, 0);\n };\n /**\n * @return {boolean} True if there are no segments in this path\n */\n Path.prototype.isEmpty = function () {\n return this.pieceNum_ >= this.pieces_.length;\n };\n /**\n * @param {!Path} outerPath\n * @param {!Path} innerPath\n * @return {!Path} The path from outerPath to innerPath\n */\n Path.relativePath = function (outerPath, innerPath) {\n var outer = outerPath.getFront(), inner = innerPath.getFront();\n if (outer === null) {\n return innerPath;\n }\n else if (outer === inner) {\n return Path.relativePath(outerPath.popFront(), innerPath.popFront());\n }\n else {\n throw new Error('INTERNAL ERROR: innerPath (' +\n innerPath +\n ') is not within ' +\n 'outerPath (' +\n outerPath +\n ')');\n }\n };\n /**\n * @param {!Path} left\n * @param {!Path} right\n * @return {number} -1, 0, 1 if left is less, equal, or greater than the right.\n */\n Path.comparePaths = function (left, right) {\n var leftKeys = left.slice();\n var rightKeys = right.slice();\n for (var i = 0; i < leftKeys.length && i < rightKeys.length; i++) {\n var cmp = util_1.nameCompare(leftKeys[i], rightKeys[i]);\n if (cmp !== 0)\n return cmp;\n }\n if (leftKeys.length === rightKeys.length)\n return 0;\n return leftKeys.length < rightKeys.length ? -1 : 1;\n };\n /**\n *\n * @param {Path} other\n * @return {boolean} true if paths are the same.\n */\n Path.prototype.equals = function (other) {\n if (this.getLength() !== other.getLength()) {\n return false;\n }\n for (var i = this.pieceNum_, j = other.pieceNum_; i <= this.pieces_.length; i++, j++) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n }\n return true;\n };\n /**\n *\n * @param {!Path} other\n * @return {boolean} True if this path is a parent (or the same as) other\n */\n Path.prototype.contains = function (other) {\n var i = this.pieceNum_;\n var j = other.pieceNum_;\n if (this.getLength() > other.getLength()) {\n return false;\n }\n while (i < this.pieces_.length) {\n if (this.pieces_[i] !== other.pieces_[j]) {\n return false;\n }\n ++i;\n ++j;\n }\n return true;\n };\n return Path;\n}()); // end Path\nexports.Path = Path;\n/**\n * Dynamic (mutable) path used to count path lengths.\n *\n * This class is used to efficiently check paths for valid\n * length (in UTF8 bytes) and depth (used in path validation).\n *\n * Throws Error exception if path is ever invalid.\n *\n * The definition of a path always begins with '/'.\n */\nvar ValidationPath = /** @class */ (function () {\n /**\n * @param {!Path} path Initial Path.\n * @param {string} errorPrefix_ Prefix for any error messages.\n */\n function ValidationPath(path, errorPrefix_) {\n this.errorPrefix_ = errorPrefix_;\n /** @type {!Array} */\n this.parts_ = path.slice();\n /** @type {number} Initialize to number of '/' chars needed in path. */\n this.byteLength_ = Math.max(1, this.parts_.length);\n for (var i = 0; i < this.parts_.length; i++) {\n this.byteLength_ += util_2.stringLength(this.parts_[i]);\n }\n this.checkValid_();\n }\n Object.defineProperty(ValidationPath, \"MAX_PATH_DEPTH\", {\n /** @const {number} Maximum key depth. */\n get: function () {\n return 32;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValidationPath, \"MAX_PATH_LENGTH_BYTES\", {\n /** @const {number} Maximum number of (UTF8) bytes in a Firebase path. */\n get: function () {\n return 768;\n },\n enumerable: true,\n configurable: true\n });\n /** @param {string} child */\n ValidationPath.prototype.push = function (child) {\n // Count the needed '/'\n if (this.parts_.length > 0) {\n this.byteLength_ += 1;\n }\n this.parts_.push(child);\n this.byteLength_ += util_2.stringLength(child);\n this.checkValid_();\n };\n ValidationPath.prototype.pop = function () {\n var last = this.parts_.pop();\n this.byteLength_ -= util_2.stringLength(last);\n // Un-count the previous '/'\n if (this.parts_.length > 0) {\n this.byteLength_ -= 1;\n }\n };\n ValidationPath.prototype.checkValid_ = function () {\n if (this.byteLength_ > ValidationPath.MAX_PATH_LENGTH_BYTES) {\n throw new Error(this.errorPrefix_ +\n 'has a key path longer than ' +\n ValidationPath.MAX_PATH_LENGTH_BYTES +\n ' bytes (' +\n this.byteLength_ +\n ').');\n }\n if (this.parts_.length > ValidationPath.MAX_PATH_DEPTH) {\n throw new Error(this.errorPrefix_ +\n 'path specified exceeds the maximum depth that can be written (' +\n ValidationPath.MAX_PATH_DEPTH +\n ') or object contains a cycle ' +\n this.toErrorString());\n }\n };\n /**\n * String for use in error messages - uses '.' notation for path.\n *\n * @return {string}\n */\n ValidationPath.prototype.toErrorString = function () {\n if (this.parts_.length == 0) {\n return '';\n }\n return \"in property '\" + this.parts_.join('.') + \"'\";\n };\n return ValidationPath;\n}());\nexports.ValidationPath = ValidationPath;\n\n//# sourceMappingURL=Path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/Path.js\n// module id = 2\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = require(\"./Index\");\nvar util_1 = require(\"../../util/util\");\nvar Node_1 = require(\"../Node\");\nvar LeafNode_1 = require(\"../LeafNode\");\nvar nodeFromJSON;\nvar MAX_NODE;\nfunction setNodeFromJSON(val) {\n nodeFromJSON = val;\n}\nexports.setNodeFromJSON = setNodeFromJSON;\nfunction setMaxNode(val) {\n MAX_NODE = val;\n}\nexports.setMaxNode = setMaxNode;\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nvar PriorityIndex = /** @class */ (function (_super) {\n __extends(PriorityIndex, _super);\n function PriorityIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.compare = function (a, b) {\n var aPriority = a.node.getPriority();\n var bPriority = b.node.getPriority();\n var indexCmp = aPriority.compareTo(bPriority);\n if (indexCmp === 0) {\n return util_1.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.isDefinedOn = function (node) {\n return !node.getPriority().isEmpty();\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return !oldNode.getPriority().equals(newNode.getPriority());\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n PriorityIndex.prototype.maxPost = function () {\n return new Node_1.NamedNode(util_1.MAX_NAME, new LeafNode_1.LeafNode('[PRIORITY-POST]', MAX_NODE));\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n PriorityIndex.prototype.makePost = function (indexValue, name) {\n var priorityNode = nodeFromJSON(indexValue);\n return new Node_1.NamedNode(name, new LeafNode_1.LeafNode('[PRIORITY-POST]', priorityNode));\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n PriorityIndex.prototype.toString = function () {\n return '.priority';\n };\n return PriorityIndex;\n}(Index_1.Index));\nexports.PriorityIndex = PriorityIndex;\nexports.PRIORITY_INDEX = new PriorityIndex();\n\n//# sourceMappingURL=PriorityIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/PriorityIndex.js\n// module id = 3\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar SortedMap_1 = require(\"../util/SortedMap\");\nvar Node_1 = require(\"./Node\");\nvar snap_1 = require(\"./snap\");\nvar PriorityIndex_1 = require(\"./indexes/PriorityIndex\");\nvar KeyIndex_1 = require(\"./indexes/KeyIndex\");\nvar IndexMap_1 = require(\"./IndexMap\");\nvar LeafNode_1 = require(\"./LeafNode\");\nvar comparators_1 = require(\"./comparators\");\n// TODO: For memory savings, don't store priorityNode_ if it's empty.\nvar EMPTY_NODE;\n/**\n * ChildrenNode is a class for storing internal nodes in a DataSnapshot\n * (i.e. nodes with children). It implements Node and stores the\n * list of children in the children property, sorted by child name.\n *\n * @constructor\n * @implements {Node}\n */\nvar ChildrenNode = /** @class */ (function () {\n /**\n *\n * @param {!SortedMap.} children_ List of children\n * of this node..\n * @param {?Node} priorityNode_ The priority of this node (as a snapshot node).\n * @param {!IndexMap} indexMap_\n */\n function ChildrenNode(children_, priorityNode_, indexMap_) {\n this.children_ = children_;\n this.priorityNode_ = priorityNode_;\n this.indexMap_ = indexMap_;\n this.lazyHash_ = null;\n /**\n * Note: The only reason we allow null priority is for EMPTY_NODE, since we can't use\n * EMPTY_NODE as the priority of EMPTY_NODE. We might want to consider making EMPTY_NODE its own\n * class instead of an empty ChildrenNode.\n */\n if (this.priorityNode_) {\n snap_1.validatePriorityNode(this.priorityNode_);\n }\n if (this.children_.isEmpty()) {\n util_1.assert(!this.priorityNode_ || this.priorityNode_.isEmpty(), 'An empty node cannot have a priority');\n }\n }\n Object.defineProperty(ChildrenNode, \"EMPTY_NODE\", {\n get: function () {\n return (EMPTY_NODE ||\n (EMPTY_NODE = new ChildrenNode(new SortedMap_1.SortedMap(comparators_1.NAME_COMPARATOR), null, IndexMap_1.IndexMap.Default)));\n },\n enumerable: true,\n configurable: true\n });\n /** @inheritDoc */\n ChildrenNode.prototype.isLeafNode = function () {\n return false;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getPriority = function () {\n return this.priorityNode_ || EMPTY_NODE;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updatePriority = function (newPriorityNode) {\n if (this.children_.isEmpty()) {\n // Don't allow priorities on empty nodes\n return this;\n }\n else {\n return new ChildrenNode(this.children_, newPriorityNode, this.indexMap_);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getImmediateChild = function (childName) {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.getPriority();\n }\n else {\n var child = this.children_.get(childName);\n return child === null ? EMPTY_NODE : child;\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getChild = function (path) {\n var front = path.getFront();\n if (front === null)\n return this;\n return this.getImmediateChild(front).getChild(path.popFront());\n };\n /** @inheritDoc */\n ChildrenNode.prototype.hasChild = function (childName) {\n return this.children_.get(childName) !== null;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updateImmediateChild = function (childName, newChildNode) {\n util_1.assert(newChildNode, 'We should always be passing snapshot nodes');\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n }\n else {\n var namedNode = new Node_1.NamedNode(childName, newChildNode);\n var newChildren = void 0, newIndexMap = void 0, newPriority = void 0;\n if (newChildNode.isEmpty()) {\n newChildren = this.children_.remove(childName);\n newIndexMap = this.indexMap_.removeFromIndexes(namedNode, this.children_);\n }\n else {\n newChildren = this.children_.insert(childName, newChildNode);\n newIndexMap = this.indexMap_.addToIndexes(namedNode, this.children_);\n }\n newPriority = newChildren.isEmpty() ? EMPTY_NODE : this.priorityNode_;\n return new ChildrenNode(newChildren, newPriority, newIndexMap);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.updateChild = function (path, newChildNode) {\n var front = path.getFront();\n if (front === null) {\n return newChildNode;\n }\n else {\n util_1.assert(path.getFront() !== '.priority' || path.getLength() === 1, '.priority must be the last token in a path');\n var newImmediateChild = this.getImmediateChild(front).updateChild(path.popFront(), newChildNode);\n return this.updateImmediateChild(front, newImmediateChild);\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.isEmpty = function () {\n return this.children_.isEmpty();\n };\n /** @inheritDoc */\n ChildrenNode.prototype.numChildren = function () {\n return this.children_.count();\n };\n /** @inheritDoc */\n ChildrenNode.prototype.val = function (exportFormat) {\n if (this.isEmpty())\n return null;\n var obj = {};\n var numKeys = 0, maxKey = 0, allIntegerKeys = true;\n this.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n obj[key] = childNode.val(exportFormat);\n numKeys++;\n if (allIntegerKeys && ChildrenNode.INTEGER_REGEXP_.test(key)) {\n maxKey = Math.max(maxKey, Number(key));\n }\n else {\n allIntegerKeys = false;\n }\n });\n if (!exportFormat && allIntegerKeys && maxKey < 2 * numKeys) {\n // convert to array.\n var array = [];\n for (var key in obj)\n array[key] = obj[key];\n return array;\n }\n else {\n if (exportFormat && !this.getPriority().isEmpty()) {\n obj['.priority'] = this.getPriority().val();\n }\n return obj;\n }\n };\n /** @inheritDoc */\n ChildrenNode.prototype.hash = function () {\n if (this.lazyHash_ === null) {\n var toHash_1 = '';\n if (!this.getPriority().isEmpty())\n toHash_1 +=\n 'priority:' +\n snap_1.priorityHashText(this.getPriority().val()) +\n ':';\n this.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n var childHash = childNode.hash();\n if (childHash !== '')\n toHash_1 += ':' + key + ':' + childHash;\n });\n this.lazyHash_ = toHash_1 === '' ? '' : util_2.sha1(toHash_1);\n }\n return this.lazyHash_;\n };\n /** @inheritDoc */\n ChildrenNode.prototype.getPredecessorChildName = function (childName, childNode, index) {\n var idx = this.resolveIndex_(index);\n if (idx) {\n var predecessor = idx.getPredecessorKey(new Node_1.NamedNode(childName, childNode));\n return predecessor ? predecessor.name : null;\n }\n else {\n return this.children_.getPredecessorKey(childName);\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n ChildrenNode.prototype.getFirstChildName = function (indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n var minKey = idx.minKey();\n return minKey && minKey.name;\n }\n else {\n return this.children_.minKey();\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n ChildrenNode.prototype.getFirstChild = function (indexDefinition) {\n var minKey = this.getFirstChildName(indexDefinition);\n if (minKey) {\n return new Node_1.NamedNode(minKey, this.children_.get(minKey));\n }\n else {\n return null;\n }\n };\n /**\n * Given an index, return the key name of the largest value we have, according to that index\n * @param {!Index} indexDefinition\n * @return {?string}\n */\n ChildrenNode.prototype.getLastChildName = function (indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n var maxKey = idx.maxKey();\n return maxKey && maxKey.name;\n }\n else {\n return this.children_.maxKey();\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {?NamedNode}\n */\n ChildrenNode.prototype.getLastChild = function (indexDefinition) {\n var maxKey = this.getLastChildName(indexDefinition);\n if (maxKey) {\n return new Node_1.NamedNode(maxKey, this.children_.get(maxKey));\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.forEachChild = function (index, action) {\n var idx = this.resolveIndex_(index);\n if (idx) {\n return idx.inorderTraversal(function (wrappedNode) {\n return action(wrappedNode.name, wrappedNode.node);\n });\n }\n else {\n return this.children_.inorderTraversal(action);\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {SortedMapIterator}\n */\n ChildrenNode.prototype.getIterator = function (indexDefinition) {\n return this.getIteratorFrom(indexDefinition.minPost(), indexDefinition);\n };\n /**\n *\n * @param {!NamedNode} startPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getIteratorFrom = function (startPost, indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getIteratorFrom(startPost, function (key) { return key; });\n }\n else {\n var iterator = this.children_.getIteratorFrom(startPost.name, Node_1.NamedNode.Wrap);\n var next = iterator.peek();\n while (next != null && indexDefinition.compare(next, startPost) < 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getReverseIterator = function (indexDefinition) {\n return this.getReverseIteratorFrom(indexDefinition.maxPost(), indexDefinition);\n };\n /**\n * @param {!NamedNode} endPost\n * @param {!Index} indexDefinition\n * @return {!SortedMapIterator}\n */\n ChildrenNode.prototype.getReverseIteratorFrom = function (endPost, indexDefinition) {\n var idx = this.resolveIndex_(indexDefinition);\n if (idx) {\n return idx.getReverseIteratorFrom(endPost, function (key) {\n return key;\n });\n }\n else {\n var iterator = this.children_.getReverseIteratorFrom(endPost.name, Node_1.NamedNode.Wrap);\n var next = iterator.peek();\n while (next != null && indexDefinition.compare(next, endPost) > 0) {\n iterator.getNext();\n next = iterator.peek();\n }\n return iterator;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.compareTo = function (other) {\n if (this.isEmpty()) {\n if (other.isEmpty()) {\n return 0;\n }\n else {\n return -1;\n }\n }\n else if (other.isLeafNode() || other.isEmpty()) {\n return 1;\n }\n else if (other === exports.MAX_NODE) {\n return -1;\n }\n else {\n // Must be another node with children.\n return 0;\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.withIndex = function (indexDefinition) {\n if (indexDefinition === KeyIndex_1.KEY_INDEX ||\n this.indexMap_.hasIndex(indexDefinition)) {\n return this;\n }\n else {\n var newIndexMap = this.indexMap_.addIndex(indexDefinition, this.children_);\n return new ChildrenNode(this.children_, this.priorityNode_, newIndexMap);\n }\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.isIndexed = function (index) {\n return index === KeyIndex_1.KEY_INDEX || this.indexMap_.hasIndex(index);\n };\n /**\n * @inheritDoc\n */\n ChildrenNode.prototype.equals = function (other) {\n if (other === this) {\n return true;\n }\n else if (other.isLeafNode()) {\n return false;\n }\n else {\n var otherChildrenNode = other;\n if (!this.getPriority().equals(otherChildrenNode.getPriority())) {\n return false;\n }\n else if (this.children_.count() === otherChildrenNode.children_.count()) {\n var thisIter = this.getIterator(PriorityIndex_1.PRIORITY_INDEX);\n var otherIter = otherChildrenNode.getIterator(PriorityIndex_1.PRIORITY_INDEX);\n var thisCurrent = thisIter.getNext();\n var otherCurrent = otherIter.getNext();\n while (thisCurrent && otherCurrent) {\n if (thisCurrent.name !== otherCurrent.name ||\n !thisCurrent.node.equals(otherCurrent.node)) {\n return false;\n }\n thisCurrent = thisIter.getNext();\n otherCurrent = otherIter.getNext();\n }\n return thisCurrent === null && otherCurrent === null;\n }\n else {\n return false;\n }\n }\n };\n /**\n * Returns a SortedMap ordered by index, or null if the default (by-key) ordering can be used\n * instead.\n *\n * @private\n * @param {!Index} indexDefinition\n * @return {?SortedMap.}\n */\n ChildrenNode.prototype.resolveIndex_ = function (indexDefinition) {\n if (indexDefinition === KeyIndex_1.KEY_INDEX) {\n return null;\n }\n else {\n return this.indexMap_.get(indexDefinition.toString());\n }\n };\n /**\n * @private\n * @type {RegExp}\n */\n ChildrenNode.INTEGER_REGEXP_ = /^(0|[1-9]\\d*)$/;\n return ChildrenNode;\n}());\nexports.ChildrenNode = ChildrenNode;\n/**\n * @constructor\n * @extends {ChildrenNode}\n * @private\n */\nvar MaxNode = /** @class */ (function (_super) {\n __extends(MaxNode, _super);\n function MaxNode() {\n return _super.call(this, new SortedMap_1.SortedMap(comparators_1.NAME_COMPARATOR), ChildrenNode.EMPTY_NODE, IndexMap_1.IndexMap.Default) || this;\n }\n MaxNode.prototype.compareTo = function (other) {\n if (other === this) {\n return 0;\n }\n else {\n return 1;\n }\n };\n MaxNode.prototype.equals = function (other) {\n // Not that we every compare it, but MAX_NODE is only ever equal to itself\n return other === this;\n };\n MaxNode.prototype.getPriority = function () {\n return this;\n };\n MaxNode.prototype.getImmediateChild = function (childName) {\n return ChildrenNode.EMPTY_NODE;\n };\n MaxNode.prototype.isEmpty = function () {\n return false;\n };\n return MaxNode;\n}(ChildrenNode));\nexports.MaxNode = MaxNode;\n/**\n * Marker that will sort higher than any other snapshot.\n * @type {!MAX_NODE}\n * @const\n */\nexports.MAX_NODE = new MaxNode();\nObject.defineProperties(Node_1.NamedNode, {\n MIN: {\n value: new Node_1.NamedNode(util_2.MIN_NAME, ChildrenNode.EMPTY_NODE)\n },\n MAX: {\n value: new Node_1.NamedNode(util_2.MAX_NAME, exports.MAX_NODE)\n }\n});\n/**\n * Reference Extensions\n */\nKeyIndex_1.KeyIndex.__EMPTY_NODE = ChildrenNode.EMPTY_NODE;\nLeafNode_1.LeafNode.__childrenNodeConstructor = ChildrenNode;\nsnap_1.setMaxNode(exports.MAX_NODE);\nPriorityIndex_1.setMaxNode(exports.MAX_NODE);\n\n//# sourceMappingURL=ChildrenNode.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/ChildrenNode.js\n// module id = 4\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n *\n * @param {!string} name\n * @param {!Node} node\n * @constructor\n * @struct\n */\nvar NamedNode = /** @class */ (function () {\n function NamedNode(name, node) {\n this.name = name;\n this.node = node;\n }\n /**\n *\n * @param {!string} name\n * @param {!Node} node\n * @return {NamedNode}\n */\n NamedNode.Wrap = function (name, node) {\n return new NamedNode(name, node);\n };\n return NamedNode;\n}());\nexports.NamedNode = NamedNode;\n\n//# sourceMappingURL=Node.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/Node.js\n// module id = 5\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"./Path\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"@firebase/util\");\n/**\n * True for invalid Firebase keys\n * @type {RegExp}\n * @private\n */\nexports.INVALID_KEY_REGEX_ = /[\\[\\].#$\\/\\u0000-\\u001F\\u007F]/;\n/**\n * True for invalid Firebase paths.\n * Allows '/' in paths.\n * @type {RegExp}\n * @private\n */\nexports.INVALID_PATH_REGEX_ = /[\\[\\].#$\\u0000-\\u001F\\u007F]/;\n/**\n * Maximum number of characters to allow in leaf value\n * @type {number}\n * @private\n */\nexports.MAX_LEAF_SIZE_ = 10 * 1024 * 1024;\n/**\n * @param {*} key\n * @return {boolean}\n */\nexports.isValidKey = function (key) {\n return (typeof key === 'string' && key.length !== 0 && !exports.INVALID_KEY_REGEX_.test(key));\n};\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexports.isValidPathString = function (pathString) {\n return (typeof pathString === 'string' &&\n pathString.length !== 0 &&\n !exports.INVALID_PATH_REGEX_.test(pathString));\n};\n/**\n * @param {string} pathString\n * @return {boolean}\n */\nexports.isValidRootPathString = function (pathString) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n return exports.isValidPathString(pathString);\n};\n/**\n * @param {*} priority\n * @return {boolean}\n */\nexports.isValidPriority = function (priority) {\n return (priority === null ||\n typeof priority === 'string' ||\n (typeof priority === 'number' && !util_2.isInvalidJSONNumber(priority)) ||\n (priority && typeof priority === 'object' && util_1.contains(priority, '.sv')));\n};\n/**\n * Pre-validate a datum passed as an argument to Firebase function.\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexports.validateFirebaseDataArg = function (fnName, argumentNumber, data, path, optional) {\n if (optional && data === undefined)\n return;\n exports.validateFirebaseData(util_3.errorPrefix(fnName, argumentNumber, optional), data, path);\n};\n/**\n * Validate a data object client-side before sending to server.\n *\n * @param {string} errorPrefix\n * @param {*} data\n * @param {!Path|!ValidationPath} path_\n */\nexports.validateFirebaseData = function (errorPrefix, data, path_) {\n var path = path_ instanceof Path_1.Path ? new Path_1.ValidationPath(path_, errorPrefix) : path_;\n if (data === undefined) {\n throw new Error(errorPrefix + 'contains undefined ' + path.toErrorString());\n }\n if (typeof data === 'function') {\n throw new Error(errorPrefix +\n 'contains a function ' +\n path.toErrorString() +\n ' with contents = ' +\n data.toString());\n }\n if (util_2.isInvalidJSONNumber(data)) {\n throw new Error(errorPrefix + 'contains ' + data.toString() + ' ' + path.toErrorString());\n }\n // Check max leaf size, but try to avoid the utf8 conversion if we can.\n if (typeof data === 'string' &&\n data.length > exports.MAX_LEAF_SIZE_ / 3 &&\n util_4.stringLength(data) > exports.MAX_LEAF_SIZE_) {\n throw new Error(errorPrefix +\n 'contains a string greater than ' +\n exports.MAX_LEAF_SIZE_ +\n ' utf8 bytes ' +\n path.toErrorString() +\n \" ('\" +\n data.substring(0, 50) +\n \"...')\");\n }\n // TODO = Perf = Consider combining the recursive validation of keys into NodeFromJSON\n // to save extra walking of large objects.\n if (data && typeof data === 'object') {\n var hasDotValue_1 = false, hasActualChild_1 = false;\n util_1.forEach(data, function (key, value) {\n if (key === '.value') {\n hasDotValue_1 = true;\n }\n else if (key !== '.priority' && key !== '.sv') {\n hasActualChild_1 = true;\n if (!exports.isValidKey(key)) {\n throw new Error(errorPrefix +\n ' contains an invalid key (' +\n key +\n ') ' +\n path.toErrorString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"');\n }\n }\n path.push(key);\n exports.validateFirebaseData(errorPrefix, value, path);\n path.pop();\n });\n if (hasDotValue_1 && hasActualChild_1) {\n throw new Error(errorPrefix +\n ' contains \".value\" child ' +\n path.toErrorString() +\n ' in addition to actual children.');\n }\n }\n};\n/**\n * Pre-validate paths passed in the firebase function.\n *\n * @param {string} errorPrefix\n * @param {Array} mergePaths\n */\nexports.validateFirebaseMergePaths = function (errorPrefix, mergePaths) {\n var i, curPath;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n var keys = curPath.slice();\n for (var j = 0; j < keys.length; j++) {\n if (keys[j] === '.priority' && j === keys.length - 1) {\n // .priority is OK\n }\n else if (!exports.isValidKey(keys[j])) {\n throw new Error(errorPrefix +\n 'contains an invalid key (' +\n keys[j] +\n ') in path ' +\n curPath.toString() +\n '. Keys must be non-empty strings ' +\n 'and can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\"');\n }\n }\n }\n // Check that update keys are not descendants of each other.\n // We rely on the property that sorting guarantees that ancestors come\n // right before descendants.\n mergePaths.sort(Path_1.Path.comparePaths);\n var prevPath = null;\n for (i = 0; i < mergePaths.length; i++) {\n curPath = mergePaths[i];\n if (prevPath !== null && prevPath.contains(curPath)) {\n throw new Error(errorPrefix +\n 'contains a path ' +\n prevPath.toString() +\n ' that is ancestor of another path ' +\n curPath.toString());\n }\n prevPath = curPath;\n }\n};\n/**\n * pre-validate an object passed as an argument to firebase function (\n * must be an object - e.g. for firebase.update()).\n *\n * @param {string} fnName\n * @param {number} argumentNumber\n * @param {*} data\n * @param {!Path} path\n * @param {boolean} optional\n */\nexports.validateFirebaseMergeDataArg = function (fnName, argumentNumber, data, path, optional) {\n if (optional && data === undefined)\n return;\n var errorPrefix = util_3.errorPrefix(fnName, argumentNumber, optional);\n if (!(data && typeof data === 'object') || Array.isArray(data)) {\n throw new Error(errorPrefix + ' must be an object containing the children to replace.');\n }\n var mergePaths = [];\n util_1.forEach(data, function (key, value) {\n var curPath = new Path_1.Path(key);\n exports.validateFirebaseData(errorPrefix, value, path.child(curPath));\n if (curPath.getBack() === '.priority') {\n if (!exports.isValidPriority(value)) {\n throw new Error(errorPrefix +\n \"contains an invalid value for '\" +\n curPath.toString() +\n \"', which must be a valid \" +\n 'Firebase priority (a string, finite number, server value, or null).');\n }\n }\n mergePaths.push(curPath);\n });\n exports.validateFirebaseMergePaths(errorPrefix, mergePaths);\n};\nexports.validatePriority = function (fnName, argumentNumber, priority, optional) {\n if (optional && priority === undefined)\n return;\n if (util_2.isInvalidJSONNumber(priority))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'is ' +\n priority.toString() +\n ', but must be a valid Firebase priority (a string, finite number, ' +\n 'server value, or null).');\n // Special case to allow importing data with a .sv.\n if (!exports.isValidPriority(priority))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid Firebase priority ' +\n '(a string, finite number, server value, or null).');\n};\nexports.validateEventType = function (fnName, argumentNumber, eventType, optional) {\n if (optional && eventType === undefined)\n return;\n switch (eventType) {\n case 'value':\n case 'child_added':\n case 'child_removed':\n case 'child_changed':\n case 'child_moved':\n break;\n default:\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid event type = \"value\", \"child_added\", \"child_removed\", ' +\n '\"child_changed\", or \"child_moved\".');\n }\n};\nexports.validateKey = function (fnName, argumentNumber, key, optional) {\n if (optional && key === undefined)\n return;\n if (!exports.isValidKey(key))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'was an invalid key = \"' +\n key +\n '\". Firebase keys must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"/\", \"[\", or \"]\").');\n};\nexports.validatePathString = function (fnName, argumentNumber, pathString, optional) {\n if (optional && pathString === undefined)\n return;\n if (!exports.isValidPathString(pathString))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'was an invalid path = \"' +\n pathString +\n '\". Paths must be non-empty strings and ' +\n 'can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\"');\n};\nexports.validateRootPathString = function (fnName, argumentNumber, pathString, optional) {\n if (pathString) {\n // Allow '/.info/' at the beginning.\n pathString = pathString.replace(/^\\/*\\.info(\\/|$)/, '/');\n }\n exports.validatePathString(fnName, argumentNumber, pathString, optional);\n};\nexports.validateWritablePath = function (fnName, path) {\n if (path.getFront() === '.info') {\n throw new Error(fnName + \" failed = Can't modify data under /.info/\");\n }\n};\nexports.validateUrl = function (fnName, argumentNumber, parsedUrl) {\n // TODO = Validate server better.\n var pathString = parsedUrl.path.toString();\n if (!(typeof parsedUrl.repoInfo.host === 'string') ||\n parsedUrl.repoInfo.host.length === 0 ||\n !exports.isValidKey(parsedUrl.repoInfo.namespace) ||\n (pathString.length !== 0 && !exports.isValidRootPathString(pathString))) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, false) +\n 'must be a valid firebase URL and ' +\n 'the path can\\'t contain \".\", \"#\", \"$\", \"[\", or \"]\".');\n }\n};\nexports.validateCredential = function (fnName, argumentNumber, cred, optional) {\n if (optional && cred === undefined)\n return;\n if (!(typeof cred === 'string'))\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid credential (a string).');\n};\nexports.validateBoolean = function (fnName, argumentNumber, bool, optional) {\n if (optional && bool === undefined)\n return;\n if (typeof bool !== 'boolean')\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) + 'must be a boolean.');\n};\nexports.validateString = function (fnName, argumentNumber, string, optional) {\n if (optional && string === undefined)\n return;\n if (!(typeof string === 'string')) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid string.');\n }\n};\nexports.validateObject = function (fnName, argumentNumber, obj, optional) {\n if (optional && obj === undefined)\n return;\n if (!(obj && typeof obj === 'object') || obj === null) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must be a valid object.');\n }\n};\nexports.validateObjectContainsKey = function (fnName, argumentNumber, obj, key, optional, opt_type) {\n var objectContainsKey = obj && typeof obj === 'object' && util_1.contains(obj, key);\n if (!objectContainsKey) {\n if (optional) {\n return;\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\"');\n }\n }\n if (opt_type) {\n var val = util_1.safeGet(obj, key);\n if ((opt_type === 'number' && !(typeof val === 'number')) ||\n (opt_type === 'string' && !(typeof val === 'string')) ||\n (opt_type === 'boolean' && !(typeof val === 'boolean')) ||\n (opt_type === 'function' && !(typeof val === 'function')) ||\n (opt_type === 'object' && !(typeof val === 'object') && val)) {\n if (optional) {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'contains invalid value for key \"' +\n key +\n '\" (must be of type \"' +\n opt_type +\n '\")');\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, argumentNumber, optional) +\n 'must contain the key \"' +\n key +\n '\" with type \"' +\n opt_type +\n '\"');\n }\n }\n }\n};\n\n//# sourceMappingURL=validation.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/validation.js\n// module id = 7\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n *\n * @enum\n */\nvar OperationType;\n(function (OperationType) {\n OperationType[OperationType[\"OVERWRITE\"] = 0] = \"OVERWRITE\";\n OperationType[OperationType[\"MERGE\"] = 1] = \"MERGE\";\n OperationType[OperationType[\"ACK_USER_WRITE\"] = 2] = \"ACK_USER_WRITE\";\n OperationType[OperationType[\"LISTEN_COMPLETE\"] = 3] = \"LISTEN_COMPLETE\";\n})(OperationType = exports.OperationType || (exports.OperationType = {}));\n/**\n * @param {boolean} fromUser\n * @param {boolean} fromServer\n * @param {?string} queryId\n * @param {boolean} tagged\n * @constructor\n */\nvar OperationSource = /** @class */ (function () {\n function OperationSource(fromUser, fromServer, queryId, tagged) {\n this.fromUser = fromUser;\n this.fromServer = fromServer;\n this.queryId = queryId;\n this.tagged = tagged;\n util_1.assert(!tagged || fromServer, 'Tagged queries must be from server.');\n }\n /**\n * @const\n * @type {!OperationSource}\n */\n OperationSource.User = new OperationSource(\n /*fromUser=*/ true, false, null, \n /*tagged=*/ false);\n /**\n * @const\n * @type {!OperationSource}\n */\n OperationSource.Server = new OperationSource(false, \n /*fromServer=*/ true, null, \n /*tagged=*/ false);\n /**\n * @param {string} queryId\n * @return {!OperationSource}\n */\n OperationSource.forServerTaggedQuery = function (queryId) {\n return new OperationSource(false, \n /*fromServer=*/ true, queryId, \n /*tagged=*/ true);\n };\n return OperationSource;\n}());\nexports.OperationSource = OperationSource;\n\n//# sourceMappingURL=Operation.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/Operation.js\n// module id = 8\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @constructor\n * @struct\n * @param {!string} type The event type\n * @param {!Node} snapshotNode The data\n * @param {string=} childName The name for this child, if it's a child event\n * @param {Node=} oldSnap Used for intermediate processing of child changed events\n * @param {string=} prevName The name for the previous child, if applicable\n */\nvar Change = /** @class */ (function () {\n function Change(type, snapshotNode, childName, oldSnap, prevName) {\n this.type = type;\n this.snapshotNode = snapshotNode;\n this.childName = childName;\n this.oldSnap = oldSnap;\n this.prevName = prevName;\n }\n /**\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.valueChange = function (snapshot) {\n return new Change(Change.VALUE, snapshot);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childAddedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_ADDED, snapshot, childKey);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childRemovedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_REMOVED, snapshot, childKey);\n };\n /**\n * @param {string} childKey\n * @param {!Node} newSnapshot\n * @param {!Node} oldSnapshot\n * @return {!Change}\n */\n Change.childChangedChange = function (childKey, newSnapshot, oldSnapshot) {\n return new Change(Change.CHILD_CHANGED, newSnapshot, childKey, oldSnapshot);\n };\n /**\n * @param {string} childKey\n * @param {!Node} snapshot\n * @return {!Change}\n */\n Change.childMovedChange = function (childKey, snapshot) {\n return new Change(Change.CHILD_MOVED, snapshot, childKey);\n };\n //event types\n /** Event type for a child added */\n Change.CHILD_ADDED = 'child_added';\n /** Event type for a child removed */\n Change.CHILD_REMOVED = 'child_removed';\n /** Event type for a child changed */\n Change.CHILD_CHANGED = 'child_changed';\n /** Event type for a child moved */\n Change.CHILD_MOVED = 'child_moved';\n /** Event type for a value change */\n Change.VALUE = 'value';\n return Change;\n}());\nexports.Change = Change;\n\n//# sourceMappingURL=Change.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/Change.js\n// module id = 9\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = require(\"./Index\");\nvar Node_1 = require(\"../Node\");\nvar util_1 = require(\"../../util/util\");\nvar util_2 = require(\"@firebase/util\");\nvar __EMPTY_NODE;\nvar KeyIndex = /** @class */ (function (_super) {\n __extends(KeyIndex, _super);\n function KeyIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(KeyIndex, \"__EMPTY_NODE\", {\n get: function () {\n return __EMPTY_NODE;\n },\n set: function (val) {\n __EMPTY_NODE = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.compare = function (a, b) {\n return util_1.nameCompare(a.name, b.name);\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.isDefinedOn = function (node) {\n // We could probably return true here (since every node has a key), but it's never called\n // so just leaving unimplemented for now.\n throw util_2.assertionError('KeyIndex.isDefinedOn not expected to be called.');\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return false; // The key for a node never changes.\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n KeyIndex.prototype.maxPost = function () {\n // TODO: This should really be created once and cached in a static property, but\n // NamedNode isn't defined yet, so I can't use it in a static. Bleh.\n return new Node_1.NamedNode(util_1.MAX_NAME, __EMPTY_NODE);\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n KeyIndex.prototype.makePost = function (indexValue, name) {\n util_2.assert(typeof indexValue === 'string', 'KeyIndex indexValue must always be a string.');\n // We just use empty node, but it'll never be compared, since our comparator only looks at name.\n return new Node_1.NamedNode(indexValue, __EMPTY_NODE);\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n KeyIndex.prototype.toString = function () {\n return '.key';\n };\n return KeyIndex;\n}(Index_1.Index));\nexports.KeyIndex = KeyIndex;\nexports.KEY_INDEX = new KeyIndex();\n\n//# sourceMappingURL=KeyIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/KeyIndex.js\n// module id = 10\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = require(\"./ChildrenNode\");\nvar LeafNode_1 = require(\"./LeafNode\");\nvar Node_1 = require(\"./Node\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar childSet_1 = require(\"./childSet\");\nvar comparators_1 = require(\"./comparators\");\nvar IndexMap_1 = require(\"./IndexMap\");\nvar PriorityIndex_1 = require(\"./indexes/PriorityIndex\");\nvar USE_HINZE = true;\n/**\n * Constructs a snapshot node representing the passed JSON and returns it.\n * @param {*} json JSON to create a node for.\n * @param {?string|?number=} priority Optional priority to use. This will be ignored if the\n * passed JSON contains a .priority property.\n * @return {!Node}\n */\nfunction nodeFromJSON(json, priority) {\n if (priority === void 0) { priority = null; }\n if (json === null) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (typeof json === 'object' && '.priority' in json) {\n priority = json['.priority'];\n }\n util_2.assert(priority === null ||\n typeof priority === 'string' ||\n typeof priority === 'number' ||\n (typeof priority === 'object' && '.sv' in priority), 'Invalid priority type found: ' + typeof priority);\n if (typeof json === 'object' && '.value' in json && json['.value'] !== null) {\n json = json['.value'];\n }\n // Valid leaf nodes include non-objects or server-value wrapper objects\n if (typeof json !== 'object' || '.sv' in json) {\n var jsonLeaf = json;\n return new LeafNode_1.LeafNode(jsonLeaf, nodeFromJSON(priority));\n }\n if (!(json instanceof Array) && USE_HINZE) {\n var children_1 = [];\n var childrenHavePriority_1 = false;\n var hinzeJsonObj_1 = json;\n util_1.forEach(hinzeJsonObj_1, function (key, child) {\n if (typeof key !== 'string' || key.substring(0, 1) !== '.') {\n // Ignore metadata nodes\n var childNode = nodeFromJSON(hinzeJsonObj_1[key]);\n if (!childNode.isEmpty()) {\n childrenHavePriority_1 =\n childrenHavePriority_1 || !childNode.getPriority().isEmpty();\n children_1.push(new Node_1.NamedNode(key, childNode));\n }\n }\n });\n if (children_1.length == 0) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var childSet = childSet_1.buildChildSet(children_1, comparators_1.NAME_ONLY_COMPARATOR, function (namedNode) { return namedNode.name; }, comparators_1.NAME_COMPARATOR);\n if (childrenHavePriority_1) {\n var sortedChildSet = childSet_1.buildChildSet(children_1, PriorityIndex_1.PRIORITY_INDEX.getCompare());\n return new ChildrenNode_1.ChildrenNode(childSet, nodeFromJSON(priority), new IndexMap_1.IndexMap({ '.priority': sortedChildSet }, { '.priority': PriorityIndex_1.PRIORITY_INDEX }));\n }\n else {\n return new ChildrenNode_1.ChildrenNode(childSet, nodeFromJSON(priority), IndexMap_1.IndexMap.Default);\n }\n }\n else {\n var node_1 = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var jsonObj_1 = json;\n util_1.forEach(jsonObj_1, function (key, childData) {\n if (util_1.contains(jsonObj_1, key)) {\n if (key.substring(0, 1) !== '.') {\n // ignore metadata nodes.\n var childNode = nodeFromJSON(childData);\n if (childNode.isLeafNode() || !childNode.isEmpty())\n node_1 = node_1.updateImmediateChild(key, childNode);\n }\n }\n });\n return node_1.updatePriority(nodeFromJSON(priority));\n }\n}\nexports.nodeFromJSON = nodeFromJSON;\nPriorityIndex_1.setNodeFromJSON(nodeFromJSON);\n\n//# sourceMappingURL=nodeFromJSON.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/nodeFromJSON.js\n// module id = 11\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DOMStorageWrapper_1 = require(\"./DOMStorageWrapper\");\nvar MemoryStorage_1 = require(\"./MemoryStorage\");\n/**\n * Helper to create a DOMStorageWrapper or else fall back to MemoryStorage.\n * TODO: Once MemoryStorage and DOMStorageWrapper have a shared interface this method annotation should change\n * to reflect this type\n *\n * @param {string} domStorageName Name of the underlying storage object\n * (e.g. 'localStorage' or 'sessionStorage').\n * @return {?} Turning off type information until a common interface is defined.\n */\nvar createStoragefor = function (domStorageName) {\n try {\n // NOTE: just accessing \"localStorage\" or \"window['localStorage']\" may throw a security exception,\n // so it must be inside the try/catch.\n if (typeof window !== 'undefined' &&\n typeof window[domStorageName] !== 'undefined') {\n // Need to test cache. Just because it's here doesn't mean it works\n var domStorage = window[domStorageName];\n domStorage.setItem('firebase:sentinel', 'cache');\n domStorage.removeItem('firebase:sentinel');\n return new DOMStorageWrapper_1.DOMStorageWrapper(domStorage);\n }\n }\n catch (e) { }\n // Failed to create wrapper. Just return in-memory storage.\n // TODO: log?\n return new MemoryStorage_1.MemoryStorage();\n};\n/** A storage object that lasts across sessions */\nexports.PersistentStorage = createStoragefor('localStorage');\n/** A storage object that only lasts one session */\nexports.SessionStorage = createStoragefor('sessionStorage');\n\n//# sourceMappingURL=storage.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/storage/storage.js\n// module id = 12\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PROTOCOL_VERSION = '5';\nexports.VERSION_PARAM = 'v';\nexports.TRANSPORT_SESSION_PARAM = 's';\nexports.REFERER_PARAM = 'r';\nexports.FORGE_REF = 'f';\nexports.FORGE_DOMAIN = 'firebaseio.com';\nexports.LAST_SESSION_PARAM = 'ls';\nexports.WEBSOCKET = 'websocket';\nexports.LONG_POLLING = 'long_polling';\n\n//# sourceMappingURL=Constants.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/Constants.js\n// module id = 13\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = require(\"../Node\");\nvar util_1 = require(\"../../util/util\");\n/**\n *\n * @constructor\n */\nvar Index = /** @class */ (function () {\n function Index() {\n }\n /**\n * @return {function(!NamedNode, !NamedNode):number} A standalone comparison function for\n * this index\n */\n Index.prototype.getCompare = function () {\n return this.compare.bind(this);\n };\n /**\n * Given a before and after value for a node, determine if the indexed value has changed. Even if they are different,\n * it's possible that the changes are isolated to parts of the snapshot that are not indexed.\n *\n * @param {!Node} oldNode\n * @param {!Node} newNode\n * @return {boolean} True if the portion of the snapshot being indexed changed between oldNode and newNode\n */\n Index.prototype.indexedValueChanged = function (oldNode, newNode) {\n var oldWrapped = new Node_1.NamedNode(util_1.MIN_NAME, oldNode);\n var newWrapped = new Node_1.NamedNode(util_1.MIN_NAME, newNode);\n return this.compare(oldWrapped, newWrapped) !== 0;\n };\n /**\n * @return {!NamedNode} a node wrapper that will sort equal to or less than\n * any other node wrapper, using this index\n */\n Index.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n return Index;\n}());\nexports.Index = Index;\n\n//# sourceMappingURL=Index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/Index.js\n// module id = 14\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar snap_1 = require(\"./snap\");\nvar __childrenNodeConstructor;\n/**\n * LeafNode is a class for storing leaf nodes in a DataSnapshot. It\n * implements Node and stores the value of the node (a string,\n * number, or boolean) accessible via getValue().\n */\nvar LeafNode = /** @class */ (function () {\n /**\n * @implements {Node}\n * @param {!(string|number|boolean|Object)} value_ The value to store in this leaf node.\n * The object type is possible in the event of a deferred value\n * @param {!Node=} priorityNode_ The priority of this node.\n */\n function LeafNode(value_, priorityNode_) {\n if (priorityNode_ === void 0) { priorityNode_ = LeafNode.__childrenNodeConstructor.EMPTY_NODE; }\n this.value_ = value_;\n this.priorityNode_ = priorityNode_;\n this.lazyHash_ = null;\n util_1.assert(this.value_ !== undefined && this.value_ !== null, \"LeafNode shouldn't be created with null/undefined value.\");\n snap_1.validatePriorityNode(this.priorityNode_);\n }\n Object.defineProperty(LeafNode, \"__childrenNodeConstructor\", {\n get: function () {\n return __childrenNodeConstructor;\n },\n set: function (val) {\n __childrenNodeConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /** @inheritDoc */\n LeafNode.prototype.isLeafNode = function () {\n return true;\n };\n /** @inheritDoc */\n LeafNode.prototype.getPriority = function () {\n return this.priorityNode_;\n };\n /** @inheritDoc */\n LeafNode.prototype.updatePriority = function (newPriorityNode) {\n return new LeafNode(this.value_, newPriorityNode);\n };\n /** @inheritDoc */\n LeafNode.prototype.getImmediateChild = function (childName) {\n // Hack to treat priority as a regular child\n if (childName === '.priority') {\n return this.priorityNode_;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.getChild = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else if (path.getFront() === '.priority') {\n return this.priorityNode_;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE;\n }\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.hasChild = function () {\n return false;\n };\n /** @inheritDoc */\n LeafNode.prototype.getPredecessorChildName = function (childName, childNode) {\n return null;\n };\n /** @inheritDoc */\n LeafNode.prototype.updateImmediateChild = function (childName, newChildNode) {\n if (childName === '.priority') {\n return this.updatePriority(newChildNode);\n }\n else if (newChildNode.isEmpty() && childName !== '.priority') {\n return this;\n }\n else {\n return LeafNode.__childrenNodeConstructor.EMPTY_NODE\n .updateImmediateChild(childName, newChildNode)\n .updatePriority(this.priorityNode_);\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.updateChild = function (path, newChildNode) {\n var front = path.getFront();\n if (front === null) {\n return newChildNode;\n }\n else if (newChildNode.isEmpty() && front !== '.priority') {\n return this;\n }\n else {\n util_1.assert(front !== '.priority' || path.getLength() === 1, '.priority must be the last token in a path');\n return this.updateImmediateChild(front, LeafNode.__childrenNodeConstructor.EMPTY_NODE.updateChild(path.popFront(), newChildNode));\n }\n };\n /** @inheritDoc */\n LeafNode.prototype.isEmpty = function () {\n return false;\n };\n /** @inheritDoc */\n LeafNode.prototype.numChildren = function () {\n return 0;\n };\n /** @inheritDoc */\n LeafNode.prototype.forEachChild = function (index, action) {\n return false;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.val = function (exportFormat) {\n if (exportFormat && !this.getPriority().isEmpty())\n return {\n '.value': this.getValue(),\n '.priority': this.getPriority().val()\n };\n else\n return this.getValue();\n };\n /** @inheritDoc */\n LeafNode.prototype.hash = function () {\n if (this.lazyHash_ === null) {\n var toHash = '';\n if (!this.priorityNode_.isEmpty())\n toHash +=\n 'priority:' +\n snap_1.priorityHashText(this.priorityNode_.val()) +\n ':';\n var type = typeof this.value_;\n toHash += type + ':';\n if (type === 'number') {\n toHash += util_2.doubleToIEEE754String(this.value_);\n }\n else {\n toHash += this.value_;\n }\n this.lazyHash_ = util_2.sha1(toHash);\n }\n return this.lazyHash_;\n };\n /**\n * Returns the value of the leaf node.\n * @return {Object|string|number|boolean} The value of the node.\n */\n LeafNode.prototype.getValue = function () {\n return this.value_;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.compareTo = function (other) {\n if (other === LeafNode.__childrenNodeConstructor.EMPTY_NODE) {\n return 1;\n }\n else if (other instanceof LeafNode.__childrenNodeConstructor) {\n return -1;\n }\n else {\n util_1.assert(other.isLeafNode(), 'Unknown node type');\n return this.compareToLeafNode_(other);\n }\n };\n /**\n * Comparison specifically for two leaf nodes\n * @param {!LeafNode} otherLeaf\n * @return {!number}\n * @private\n */\n LeafNode.prototype.compareToLeafNode_ = function (otherLeaf) {\n var otherLeafType = typeof otherLeaf.value_;\n var thisLeafType = typeof this.value_;\n var otherIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(otherLeafType);\n var thisIndex = LeafNode.VALUE_TYPE_ORDER.indexOf(thisLeafType);\n util_1.assert(otherIndex >= 0, 'Unknown leaf type: ' + otherLeafType);\n util_1.assert(thisIndex >= 0, 'Unknown leaf type: ' + thisLeafType);\n if (otherIndex === thisIndex) {\n // Same type, compare values\n if (thisLeafType === 'object') {\n // Deferred value nodes are all equal, but we should also never get to this point...\n return 0;\n }\n else {\n // Note that this works because true > false, all others are number or string comparisons\n if (this.value_ < otherLeaf.value_) {\n return -1;\n }\n else if (this.value_ === otherLeaf.value_) {\n return 0;\n }\n else {\n return 1;\n }\n }\n }\n else {\n return thisIndex - otherIndex;\n }\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.withIndex = function () {\n return this;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.isIndexed = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LeafNode.prototype.equals = function (other) {\n /**\n * @inheritDoc\n */\n if (other === this) {\n return true;\n }\n else if (other.isLeafNode()) {\n var otherLeaf = other;\n return (this.value_ === otherLeaf.value_ &&\n this.priorityNode_.equals(otherLeaf.priorityNode_));\n }\n else {\n return false;\n }\n };\n /**\n * The sort order for comparing leaf nodes of different types. If two leaf nodes have\n * the same type, the comparison falls back to their value\n * @type {Array.}\n * @const\n */\n LeafNode.VALUE_TYPE_ORDER = ['object', 'boolean', 'number', 'string'];\n return LeafNode;\n}());\nexports.LeafNode = LeafNode;\n\n//# sourceMappingURL=LeafNode.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/LeafNode.js\n// module id = 15\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * An iterator over an LLRBNode.\n */\nvar SortedMapIterator = /** @class */ (function () {\n /**\n * @template K, V, T\n * @param {LLRBNode|LLRBEmptyNode} node Node to iterate.\n * @param {?K} startKey\n * @param {function(K, K): number} comparator\n * @param {boolean} isReverse_ Whether or not to iterate in reverse\n * @param {(function(K, V):T)=} resultGenerator_\n */\n function SortedMapIterator(node, startKey, comparator, isReverse_, resultGenerator_) {\n if (resultGenerator_ === void 0) { resultGenerator_ = null; }\n this.isReverse_ = isReverse_;\n this.resultGenerator_ = resultGenerator_;\n /** @private\n * @type {Array.}\n */\n this.nodeStack_ = [];\n var cmp = 1;\n while (!node.isEmpty()) {\n node = node;\n cmp = startKey ? comparator(node.key, startKey) : 1;\n // flip the comparison if we're going in reverse\n if (isReverse_)\n cmp *= -1;\n if (cmp < 0) {\n // This node is less than our start key. ignore it\n if (this.isReverse_) {\n node = node.left;\n }\n else {\n node = node.right;\n }\n }\n else if (cmp === 0) {\n // This node is exactly equal to our start key. Push it on the stack, but stop iterating;\n this.nodeStack_.push(node);\n break;\n }\n else {\n // This node is greater than our start key, add it to the stack and move to the next one\n this.nodeStack_.push(node);\n if (this.isReverse_) {\n node = node.right;\n }\n else {\n node = node.left;\n }\n }\n }\n }\n SortedMapIterator.prototype.getNext = function () {\n if (this.nodeStack_.length === 0)\n return null;\n var node = this.nodeStack_.pop();\n var result;\n if (this.resultGenerator_)\n result = this.resultGenerator_(node.key, node.value);\n else\n result = { key: node.key, value: node.value };\n if (this.isReverse_) {\n node = node.left;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.right;\n }\n }\n else {\n node = node.right;\n while (!node.isEmpty()) {\n this.nodeStack_.push(node);\n node = node.left;\n }\n }\n return result;\n };\n SortedMapIterator.prototype.hasNext = function () {\n return this.nodeStack_.length > 0;\n };\n SortedMapIterator.prototype.peek = function () {\n if (this.nodeStack_.length === 0)\n return null;\n var node = this.nodeStack_[this.nodeStack_.length - 1];\n if (this.resultGenerator_) {\n return this.resultGenerator_(node.key, node.value);\n }\n else {\n return { key: node.key, value: node.value };\n }\n };\n return SortedMapIterator;\n}());\nexports.SortedMapIterator = SortedMapIterator;\n/**\n * Represents a node in a Left-leaning Red-Black tree.\n */\nvar LLRBNode = /** @class */ (function () {\n /**\n * @template K, V\n * @param {!K} key Key associated with this node.\n * @param {!V} value Value associated with this node.\n * @param {?boolean} color Whether this node is red.\n * @param {?(LLRBNode|LLRBEmptyNode)=} left Left child.\n * @param {?(LLRBNode|LLRBEmptyNode)=} right Right child.\n */\n function LLRBNode(key, value, color, left, right) {\n this.key = key;\n this.value = value;\n this.color = color != null ? color : LLRBNode.RED;\n this.left =\n left != null ? left : SortedMap.EMPTY_NODE;\n this.right =\n right != null ? right : SortedMap.EMPTY_NODE;\n }\n /**\n * Returns a copy of the current node, optionally replacing pieces of it.\n *\n * @param {?K} key New key for the node, or null.\n * @param {?V} value New value for the node, or null.\n * @param {?boolean} color New color for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} left New left child for the node, or null.\n * @param {?LLRBNode|LLRBEmptyNode} right New right child for the node, or null.\n * @return {!LLRBNode} The node copy.\n */\n LLRBNode.prototype.copy = function (key, value, color, left, right) {\n return new LLRBNode(key != null ? key : this.key, value != null ? value : this.value, color != null ? color : this.color, left != null ? left : this.left, right != null ? right : this.right);\n };\n /**\n * @return {number} The total number of nodes in the tree.\n */\n LLRBNode.prototype.count = function () {\n return this.left.count() + 1 + this.right.count();\n };\n /**\n * @return {boolean} True if the tree is empty.\n */\n LLRBNode.prototype.isEmpty = function () {\n return false;\n };\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n LLRBNode.prototype.inorderTraversal = function (action) {\n return (this.left.inorderTraversal(action) ||\n action(this.key, this.value) ||\n this.right.inorderTraversal(action));\n };\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!Object, !Object)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {*} True if traversal was aborted.\n */\n LLRBNode.prototype.reverseTraversal = function (action) {\n return (this.right.reverseTraversal(action) ||\n action(this.key, this.value) ||\n this.left.reverseTraversal(action));\n };\n /**\n * @return {!Object} The minimum node in the tree.\n * @private\n */\n LLRBNode.prototype.min_ = function () {\n if (this.left.isEmpty()) {\n return this;\n }\n else {\n return this.left.min_();\n }\n };\n /**\n * @return {!K} The maximum key in the tree.\n */\n LLRBNode.prototype.minKey = function () {\n return this.min_().key;\n };\n /**\n * @return {!K} The maximum key in the tree.\n */\n LLRBNode.prototype.maxKey = function () {\n if (this.right.isEmpty()) {\n return this.key;\n }\n else {\n return this.right.maxKey();\n }\n };\n /**\n *\n * @param {!Object} key Key to insert.\n * @param {!Object} value Value to insert.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with the key/value added.\n */\n LLRBNode.prototype.insert = function (key, value, comparator) {\n var cmp, n;\n n = this;\n cmp = comparator(key, n.key);\n if (cmp < 0) {\n n = n.copy(null, null, null, n.left.insert(key, value, comparator), null);\n }\n else if (cmp === 0) {\n n = n.copy(null, value, null, null, null);\n }\n else {\n n = n.copy(null, null, null, null, n.right.insert(key, value, comparator));\n }\n return n.fixUp_();\n };\n /**\n * @private\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the minimum key removed.\n */\n LLRBNode.prototype.removeMin_ = function () {\n if (this.left.isEmpty()) {\n return SortedMap.EMPTY_NODE;\n }\n var n = this;\n if (!n.left.isRed_() && !n.left.left.isRed_())\n n = n.moveRedLeft_();\n n = n.copy(null, null, null, n.left.removeMin_(), null);\n return n.fixUp_();\n };\n /**\n * @param {!Object} key The key of the item to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode|LLRBEmptyNode} New tree, with the specified item removed.\n */\n LLRBNode.prototype.remove = function (key, comparator) {\n var n, smallest;\n n = this;\n if (comparator(key, n.key) < 0) {\n if (!n.left.isEmpty() && !n.left.isRed_() && !n.left.left.isRed_()) {\n n = n.moveRedLeft_();\n }\n n = n.copy(null, null, null, n.left.remove(key, comparator), null);\n }\n else {\n if (n.left.isRed_())\n n = n.rotateRight_();\n if (!n.right.isEmpty() && !n.right.isRed_() && !n.right.left.isRed_()) {\n n = n.moveRedRight_();\n }\n if (comparator(key, n.key) === 0) {\n if (n.right.isEmpty()) {\n return SortedMap.EMPTY_NODE;\n }\n else {\n smallest = n.right.min_();\n n = n.copy(smallest.key, smallest.value, null, null, n.right.removeMin_());\n }\n }\n n = n.copy(null, null, null, null, n.right.remove(key, comparator));\n }\n return n.fixUp_();\n };\n /**\n * @private\n * @return {boolean} Whether this is a RED node.\n */\n LLRBNode.prototype.isRed_ = function () {\n return this.color;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree after performing any needed rotations.\n */\n LLRBNode.prototype.fixUp_ = function () {\n var n = this;\n if (n.right.isRed_() && !n.left.isRed_())\n n = n.rotateLeft_();\n if (n.left.isRed_() && n.left.left.isRed_())\n n = n.rotateRight_();\n if (n.left.isRed_() && n.right.isRed_())\n n = n.colorFlip_();\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedLeft.\n */\n LLRBNode.prototype.moveRedLeft_ = function () {\n var n = this.colorFlip_();\n if (n.right.left.isRed_()) {\n n = n.copy(null, null, null, null, n.right.rotateRight_());\n n = n.rotateLeft_();\n n = n.colorFlip_();\n }\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after moveRedRight.\n */\n LLRBNode.prototype.moveRedRight_ = function () {\n var n = this.colorFlip_();\n if (n.left.left.isRed_()) {\n n = n.rotateRight_();\n n = n.colorFlip_();\n }\n return n;\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateLeft.\n */\n LLRBNode.prototype.rotateLeft_ = function () {\n var nl = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, nl, null);\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after rotateRight.\n */\n LLRBNode.prototype.rotateRight_ = function () {\n var nr = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, nr);\n };\n /**\n * @private\n * @return {!LLRBNode} New tree, after colorFlip.\n */\n LLRBNode.prototype.colorFlip_ = function () {\n var left = this.left.copy(null, null, !this.left.color, null, null);\n var right = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, left, right);\n };\n /**\n * For testing.\n *\n * @private\n * @return {boolean} True if all is well.\n */\n LLRBNode.prototype.checkMaxDepth_ = function () {\n var blackDepth = this.check_();\n return Math.pow(2.0, blackDepth) <= this.count() + 1;\n };\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n LLRBNode.prototype.check_ = function () {\n var blackDepth;\n if (this.isRed_() && this.left.isRed_()) {\n throw new Error('Red node has red child(' + this.key + ',' + this.value + ')');\n }\n if (this.right.isRed_()) {\n throw new Error('Right child of (' + this.key + ',' + this.value + ') is red');\n }\n blackDepth = this.left.check_();\n if (blackDepth !== this.right.check_()) {\n throw new Error('Black depths differ');\n }\n else {\n return blackDepth + (this.isRed_() ? 0 : 1);\n }\n };\n LLRBNode.RED = true;\n LLRBNode.BLACK = false;\n return LLRBNode;\n}());\nexports.LLRBNode = LLRBNode;\n/**\n * Represents an empty node (a leaf node in the Red-Black Tree).\n */\nvar LLRBEmptyNode = /** @class */ (function () {\n function LLRBEmptyNode() {\n }\n /**\n * Returns a copy of the current node.\n *\n * @return {!LLRBEmptyNode} The node copy.\n */\n LLRBEmptyNode.prototype.copy = function (key, value, color, left, right) {\n return this;\n };\n /**\n * Returns a copy of the tree, with the specified key/value added.\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBNode} New tree, with item added.\n */\n LLRBEmptyNode.prototype.insert = function (key, value, comparator) {\n return new LLRBNode(key, value, null);\n };\n /**\n * Returns a copy of the tree, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @param {Comparator} comparator Comparator.\n * @return {!LLRBEmptyNode} New tree, with item removed.\n */\n LLRBEmptyNode.prototype.remove = function (key, comparator) {\n return this;\n };\n /**\n * @return {number} The total number of nodes in the tree.\n */\n LLRBEmptyNode.prototype.count = function () {\n return 0;\n };\n /**\n * @return {boolean} True if the tree is empty.\n */\n LLRBEmptyNode.prototype.isEmpty = function () {\n return true;\n };\n /**\n * Traverses the tree in key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V):*} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n LLRBEmptyNode.prototype.inorderTraversal = function (action) {\n return false;\n };\n /**\n * Traverses the tree in reverse key order and calls the specified action function\n * for each node.\n *\n * @param {function(!K, !V)} action Callback function to be called for each\n * node. If it returns true, traversal is aborted.\n * @return {boolean} True if traversal was aborted.\n */\n LLRBEmptyNode.prototype.reverseTraversal = function (action) {\n return false;\n };\n /**\n * @return {null}\n */\n LLRBEmptyNode.prototype.minKey = function () {\n return null;\n };\n /**\n * @return {null}\n */\n LLRBEmptyNode.prototype.maxKey = function () {\n return null;\n };\n /**\n * @private\n * @return {number} Not sure what this returns exactly. :-).\n */\n LLRBEmptyNode.prototype.check_ = function () {\n return 0;\n };\n /**\n * @private\n * @return {boolean} Whether this node is red.\n */\n LLRBEmptyNode.prototype.isRed_ = function () {\n return false;\n };\n return LLRBEmptyNode;\n}());\nexports.LLRBEmptyNode = LLRBEmptyNode;\n/**\n * An immutable sorted map implementation, based on a Left-leaning Red-Black\n * tree.\n */\nvar SortedMap = /** @class */ (function () {\n /**\n * @template K, V\n * @param {function(K, K):number} comparator_ Key comparator.\n * @param {LLRBNode=} root_ (Optional) Root node for the map.\n */\n function SortedMap(comparator_, root_) {\n if (root_ === void 0) { root_ = SortedMap.EMPTY_NODE; }\n this.comparator_ = comparator_;\n this.root_ = root_;\n }\n /**\n * Returns a copy of the map, with the specified key/value added or replaced.\n * (TODO: We should perhaps rename this method to 'put')\n *\n * @param {!K} key Key to be added.\n * @param {!V} value Value to be added.\n * @return {!SortedMap.} New map, with item added.\n */\n SortedMap.prototype.insert = function (key, value) {\n return new SortedMap(this.comparator_, this.root_\n .insert(key, value, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n /**\n * Returns a copy of the map, with the specified key removed.\n *\n * @param {!K} key The key to remove.\n * @return {!SortedMap.} New map, with item removed.\n */\n SortedMap.prototype.remove = function (key) {\n return new SortedMap(this.comparator_, this.root_\n .remove(key, this.comparator_)\n .copy(null, null, LLRBNode.BLACK, null, null));\n };\n /**\n * Returns the value of the node with the given key, or null.\n *\n * @param {!K} key The key to look up.\n * @return {?V} The value of the node with the given key, or null if the\n * key doesn't exist.\n */\n SortedMap.prototype.get = function (key) {\n var cmp;\n var node = this.root_;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n return node.value;\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n node = node.right;\n }\n }\n return null;\n };\n /**\n * Returns the key of the item *before* the specified key, or null if key is the first item.\n * @param {K} key The key to find the predecessor of\n * @return {?K} The predecessor key.\n */\n SortedMap.prototype.getPredecessorKey = function (key) {\n var cmp, node = this.root_, rightParent = null;\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n if (cmp === 0) {\n if (!node.left.isEmpty()) {\n node = node.left;\n while (!node.right.isEmpty())\n node = node.right;\n return node.key;\n }\n else if (rightParent) {\n return rightParent.key;\n }\n else {\n return null; // first item.\n }\n }\n else if (cmp < 0) {\n node = node.left;\n }\n else if (cmp > 0) {\n rightParent = node;\n node = node.right;\n }\n }\n throw new Error('Attempted to find predecessor key for a nonexistent key. What gives?');\n };\n /**\n * @return {boolean} True if the map is empty.\n */\n SortedMap.prototype.isEmpty = function () {\n return this.root_.isEmpty();\n };\n /**\n * @return {number} The total number of nodes in the map.\n */\n SortedMap.prototype.count = function () {\n return this.root_.count();\n };\n /**\n * @return {?K} The minimum key in the map.\n */\n SortedMap.prototype.minKey = function () {\n return this.root_.minKey();\n };\n /**\n * @return {?K} The maximum key in the map.\n */\n SortedMap.prototype.maxKey = function () {\n return this.root_.maxKey();\n };\n /**\n * Traverses the map in key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!K, !V):*} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} The first truthy value returned by action, or the last falsey\n * value returned by action\n */\n SortedMap.prototype.inorderTraversal = function (action) {\n return this.root_.inorderTraversal(action);\n };\n /**\n * Traverses the map in reverse key order and calls the specified action function\n * for each key/value pair.\n *\n * @param {function(!Object, !Object)} action Callback function to be called\n * for each key/value pair. If action returns true, traversal is aborted.\n * @return {*} True if the traversal was aborted.\n */\n SortedMap.prototype.reverseTraversal = function (action) {\n return this.root_.reverseTraversal(action);\n };\n /**\n * Returns an iterator over the SortedMap.\n * @template T\n * @param {(function(K, V):T)=} resultGenerator\n * @return {SortedMapIterator.} The iterator.\n */\n SortedMap.prototype.getIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root_, null, this.comparator_, false, resultGenerator);\n };\n SortedMap.prototype.getIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root_, key, this.comparator_, false, resultGenerator);\n };\n SortedMap.prototype.getReverseIteratorFrom = function (key, resultGenerator) {\n return new SortedMapIterator(this.root_, key, this.comparator_, true, resultGenerator);\n };\n SortedMap.prototype.getReverseIterator = function (resultGenerator) {\n return new SortedMapIterator(this.root_, null, this.comparator_, true, resultGenerator);\n };\n /**\n * Always use the same empty node, to reduce memory.\n * @const\n */\n SortedMap.EMPTY_NODE = new LLRBEmptyNode();\n return SortedMap;\n}());\nexports.SortedMap = SortedMap;\n\n//# sourceMappingURL=SortedMap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/SortedMap.js\n// module id = 16\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ServerValues_1 = require(\"./util/ServerValues\");\nvar nodeFromJSON_1 = require(\"./snap/nodeFromJSON\");\nvar Path_1 = require(\"./util/Path\");\nvar SparseSnapshotTree_1 = require(\"./SparseSnapshotTree\");\nvar SyncTree_1 = require(\"./SyncTree\");\nvar SnapshotHolder_1 = require(\"./SnapshotHolder\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util/util\");\nvar util_3 = require(\"@firebase/util\");\nvar AuthTokenProvider_1 = require(\"./AuthTokenProvider\");\nvar StatsManager_1 = require(\"./stats/StatsManager\");\nvar StatsReporter_1 = require(\"./stats/StatsReporter\");\nvar StatsListener_1 = require(\"./stats/StatsListener\");\nvar EventQueue_1 = require(\"./view/EventQueue\");\nvar PersistentConnection_1 = require(\"./PersistentConnection\");\nvar ReadonlyRestClient_1 = require(\"./ReadonlyRestClient\");\nvar Database_1 = require(\"../api/Database\");\nvar INTERRUPT_REASON = 'repo_interrupt';\n/**\n * A connection to a single data repository.\n */\nvar Repo = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo_\n * @param {boolean} forceRestClient\n * @param {!FirebaseApp} app\n */\n function Repo(repoInfo_, forceRestClient, app) {\n var _this = this;\n this.repoInfo_ = repoInfo_;\n this.app = app;\n this.dataUpdateCount = 0;\n this.statsListener_ = null;\n this.eventQueue_ = new EventQueue_1.EventQueue();\n this.nextWriteId_ = 1;\n this.interceptServerDataCallback_ = null;\n // A list of data pieces and paths to be set when this client disconnects.\n this.onDisconnect_ = new SparseSnapshotTree_1.SparseSnapshotTree();\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @type {?PersistentConnection}\n */\n this.persistentConnection_ = null;\n /** @type {!AuthTokenProvider} */\n var authTokenProvider = new AuthTokenProvider_1.AuthTokenProvider(app);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo_);\n if (forceRestClient || util_2.beingCrawled()) {\n this.server_ = new ReadonlyRestClient_1.ReadonlyRestClient(this.repoInfo_, this.onDataUpdate_.bind(this), authTokenProvider);\n // Minor hack: Fire onConnect immediately, since there's no actual connection.\n setTimeout(this.onConnectStatus_.bind(this, true), 0);\n }\n else {\n var authOverride = app.options['databaseAuthVariableOverride'];\n // Validate authOverride\n if (typeof authOverride !== 'undefined' && authOverride !== null) {\n if (typeof authOverride !== 'object') {\n throw new Error('Only objects are supported for option databaseAuthVariableOverride');\n }\n try {\n util_1.stringify(authOverride);\n }\n catch (e) {\n throw new Error('Invalid authOverride provided: ' + e);\n }\n }\n this.persistentConnection_ = new PersistentConnection_1.PersistentConnection(this.repoInfo_, this.onDataUpdate_.bind(this), this.onConnectStatus_.bind(this), this.onServerInfoUpdate_.bind(this), authTokenProvider, authOverride);\n this.server_ = this.persistentConnection_;\n }\n authTokenProvider.addTokenChangeListener(function (token) {\n _this.server_.refreshAuthToken(token);\n });\n // In the case of multiple Repos for the same repoInfo (i.e. there are multiple Firebase.Contexts being used),\n // we only want to create one StatsReporter. As such, we'll report stats over the first Repo created.\n this.statsReporter_ = StatsManager_1.StatsManager.getOrCreateReporter(repoInfo_, function () { return new StatsReporter_1.StatsReporter(_this.stats_, _this.server_); });\n this.transactions_init_();\n // Used for .info.\n this.infoData_ = new SnapshotHolder_1.SnapshotHolder();\n this.infoSyncTree_ = new SyncTree_1.SyncTree({\n startListening: function (query, tag, currentHashFn, onComplete) {\n var infoEvents = [];\n var node = _this.infoData_.getNode(query.path);\n // This is possibly a hack, but we have different semantics for .info endpoints. We don't raise null events\n // on initial data...\n if (!node.isEmpty()) {\n infoEvents = _this.infoSyncTree_.applyServerOverwrite(query.path, node);\n setTimeout(function () {\n onComplete('ok');\n }, 0);\n }\n return infoEvents;\n },\n stopListening: function () { }\n });\n this.updateInfo_('connected', false);\n this.serverSyncTree_ = new SyncTree_1.SyncTree({\n startListening: function (query, tag, currentHashFn, onComplete) {\n _this.server_.listen(query, currentHashFn, tag, function (status, data) {\n var events = onComplete(status, data);\n _this.eventQueue_.raiseEventsForChangedPath(query.path, events);\n });\n // No synchronous events for network-backed sync trees\n return [];\n },\n stopListening: function (query, tag) {\n _this.server_.unlisten(query, tag);\n }\n });\n }\n /**\n * @return {string} The URL corresponding to the root of this Firebase.\n */\n Repo.prototype.toString = function () {\n return ((this.repoInfo_.secure ? 'https://' : 'http://') + this.repoInfo_.host);\n };\n /**\n * @return {!string} The namespace represented by the repo.\n */\n Repo.prototype.name = function () {\n return this.repoInfo_.namespace;\n };\n /**\n * @return {!number} The time in milliseconds, taking the server offset into account if we have one.\n */\n Repo.prototype.serverTime = function () {\n var offsetNode = this.infoData_.getNode(new Path_1.Path('.info/serverTimeOffset'));\n var offset = offsetNode.val() || 0;\n return new Date().getTime() + offset;\n };\n /**\n * Generate ServerValues using some variables from the repo object.\n * @return {!Object}\n */\n Repo.prototype.generateServerValues = function () {\n return ServerValues_1.generateWithValues({\n timestamp: this.serverTime()\n });\n };\n /**\n * Called by realtime when we get new messages from the server.\n *\n * @private\n * @param {string} pathString\n * @param {*} data\n * @param {boolean} isMerge\n * @param {?number} tag\n */\n Repo.prototype.onDataUpdate_ = function (pathString, data, isMerge, tag) {\n // For testing.\n this.dataUpdateCount++;\n var path = new Path_1.Path(pathString);\n data = this.interceptServerDataCallback_\n ? this.interceptServerDataCallback_(pathString, data)\n : data;\n var events = [];\n if (tag) {\n if (isMerge) {\n var taggedChildren = util_3.map(data, function (raw) {\n return nodeFromJSON_1.nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyTaggedQueryMerge(path, taggedChildren, tag);\n }\n else {\n var taggedSnap = nodeFromJSON_1.nodeFromJSON(data);\n events = this.serverSyncTree_.applyTaggedQueryOverwrite(path, taggedSnap, tag);\n }\n }\n else if (isMerge) {\n var changedChildren = util_3.map(data, function (raw) {\n return nodeFromJSON_1.nodeFromJSON(raw);\n });\n events = this.serverSyncTree_.applyServerMerge(path, changedChildren);\n }\n else {\n var snap = nodeFromJSON_1.nodeFromJSON(data);\n events = this.serverSyncTree_.applyServerOverwrite(path, snap);\n }\n var affectedPath = path;\n if (events.length > 0) {\n // Since we have a listener outstanding for each transaction, receiving any events\n // is a proxy for some change having occurred.\n affectedPath = this.rerunTransactions_(path);\n }\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, events);\n };\n /**\n * TODO: This should be @private but it's used by test_access.js and internal.js\n * @param {?function(!string, *):*} callback\n * @private\n */\n Repo.prototype.interceptServerData_ = function (callback) {\n this.interceptServerDataCallback_ = callback;\n };\n /**\n * @param {!boolean} connectStatus\n * @private\n */\n Repo.prototype.onConnectStatus_ = function (connectStatus) {\n this.updateInfo_('connected', connectStatus);\n if (connectStatus === false) {\n this.runOnDisconnectEvents_();\n }\n };\n /**\n * @param {!Object} updates\n * @private\n */\n Repo.prototype.onServerInfoUpdate_ = function (updates) {\n var _this = this;\n util_2.each(updates, function (value, key) {\n _this.updateInfo_(key, value);\n });\n };\n /**\n *\n * @param {!string} pathString\n * @param {*} value\n * @private\n */\n Repo.prototype.updateInfo_ = function (pathString, value) {\n var path = new Path_1.Path('/.info/' + pathString);\n var newNode = nodeFromJSON_1.nodeFromJSON(value);\n this.infoData_.updateSnapshot(path, newNode);\n var events = this.infoSyncTree_.applyServerOverwrite(path, newNode);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n };\n /**\n * @return {!number}\n * @private\n */\n Repo.prototype.getNextWriteId_ = function () {\n return this.nextWriteId_++;\n };\n /**\n * @param {!Path} path\n * @param {*} newVal\n * @param {number|string|null} newPriority\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.setWithPriority = function (path, newVal, newPriority, onComplete) {\n var _this = this;\n this.log_('set', {\n path: path.toString(),\n value: newVal,\n priority: newPriority\n });\n // TODO: Optimize this behavior to either (a) store flag to skip resolving where possible and / or\n // (b) store unresolved paths on JSON parse\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, newPriority);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n var writeId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, writeId, true);\n this.eventQueue_.queueEvents(events);\n this.server_.put(path.toString(), newNodeUnresolved.val(/*export=*/ true), function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n util_2.warn('set at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId, !success);\n _this.eventQueue_.raiseEventsForChangedPath(path, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n var affectedPath = this.abortTransactions_(path);\n this.rerunTransactions_(affectedPath);\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(affectedPath, []);\n };\n /**\n * @param {!Path} path\n * @param {!Object} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.update = function (path, childrenToMerge, onComplete) {\n var _this = this;\n this.log_('update', { path: path.toString(), value: childrenToMerge });\n // Start with our existing data and merge each child into it.\n var empty = true;\n var serverValues = this.generateServerValues();\n var changedChildren = {};\n util_3.forEach(childrenToMerge, function (changedKey, changedValue) {\n empty = false;\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(changedValue);\n changedChildren[changedKey] = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n });\n if (!empty) {\n var writeId_1 = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserMerge(path, changedChildren, writeId_1);\n this.eventQueue_.queueEvents(events);\n this.server_.merge(path.toString(), childrenToMerge, function (status, errorReason) {\n var success = status === 'ok';\n if (!success) {\n util_2.warn('update at ' + path + ' failed: ' + status);\n }\n var clearEvents = _this.serverSyncTree_.ackUserWrite(writeId_1, !success);\n var affectedPath = clearEvents.length > 0 ? _this.rerunTransactions_(path) : path;\n _this.eventQueue_.raiseEventsForChangedPath(affectedPath, clearEvents);\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n util_3.forEach(childrenToMerge, function (changedPath) {\n var affectedPath = _this.abortTransactions_(path.child(changedPath));\n _this.rerunTransactions_(affectedPath);\n });\n // We queued the events above, so just flush the queue here\n this.eventQueue_.raiseEventsForChangedPath(path, []);\n }\n else {\n util_2.log(\"update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n }\n };\n /**\n * Applies all of the changes stored up in the onDisconnect_ tree.\n * @private\n */\n Repo.prototype.runOnDisconnectEvents_ = function () {\n var _this = this;\n this.log_('onDisconnectEvents');\n var serverValues = this.generateServerValues();\n var resolvedOnDisconnectTree = ServerValues_1.resolveDeferredValueTree(this.onDisconnect_, serverValues);\n var events = [];\n resolvedOnDisconnectTree.forEachTree(Path_1.Path.Empty, function (path, snap) {\n events = events.concat(_this.serverSyncTree_.applyServerOverwrite(path, snap));\n var affectedPath = _this.abortTransactions_(path);\n _this.rerunTransactions_(affectedPath);\n });\n this.onDisconnect_ = new SparseSnapshotTree_1.SparseSnapshotTree();\n this.eventQueue_.raiseEventsForChangedPath(Path_1.Path.Empty, events);\n };\n /**\n * @param {!Path} path\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectCancel = function (path, onComplete) {\n var _this = this;\n this.server_.onDisconnectCancel(path.toString(), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.forget(path);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectSet = function (path, value, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_1.nodeFromJSON(value);\n this.server_.onDisconnectPut(path.toString(), newNode.val(/*export=*/ true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} value\n * @param {*} priority\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectSetWithPriority = function (path, value, priority, onComplete) {\n var _this = this;\n var newNode = nodeFromJSON_1.nodeFromJSON(value, priority);\n this.server_.onDisconnectPut(path.toString(), newNode.val(/*export=*/ true), function (status, errorReason) {\n if (status === 'ok') {\n _this.onDisconnect_.remember(path, newNode);\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Path} path\n * @param {*} childrenToMerge\n * @param {?function(?Error, *=)} onComplete\n */\n Repo.prototype.onDisconnectUpdate = function (path, childrenToMerge, onComplete) {\n var _this = this;\n if (util_3.isEmpty(childrenToMerge)) {\n util_2.log(\"onDisconnect().update() called with empty data. Don't do anything.\");\n this.callOnCompleteCallback(onComplete, 'ok');\n return;\n }\n this.server_.onDisconnectMerge(path.toString(), childrenToMerge, function (status, errorReason) {\n if (status === 'ok') {\n util_3.forEach(childrenToMerge, function (childName, childNode) {\n var newChildNode = nodeFromJSON_1.nodeFromJSON(childNode);\n _this.onDisconnect_.remember(path.child(childName), newChildNode);\n });\n }\n _this.callOnCompleteCallback(onComplete, status, errorReason);\n });\n };\n /**\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n */\n Repo.prototype.addEventCallbackForQuery = function (query, eventRegistration) {\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.addEventRegistration(query, eventRegistration);\n }\n else {\n events = this.serverSyncTree_.addEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n /**\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration\n */\n Repo.prototype.removeEventCallbackForQuery = function (query, eventRegistration) {\n // These are guaranteed not to raise events, since we're not passing in a cancelError. However, we can future-proof\n // a little bit by handling the return values anyways.\n var events;\n if (query.path.getFront() === '.info') {\n events = this.infoSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n else {\n events = this.serverSyncTree_.removeEventRegistration(query, eventRegistration);\n }\n this.eventQueue_.raiseEventsAtPath(query.path, events);\n };\n Repo.prototype.interrupt = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.interrupt(INTERRUPT_REASON);\n }\n };\n Repo.prototype.resume = function () {\n if (this.persistentConnection_) {\n this.persistentConnection_.resume(INTERRUPT_REASON);\n }\n };\n Repo.prototype.stats = function (showDelta) {\n if (showDelta === void 0) { showDelta = false; }\n if (typeof console === 'undefined')\n return;\n var stats;\n if (showDelta) {\n if (!this.statsListener_)\n this.statsListener_ = new StatsListener_1.StatsListener(this.stats_);\n stats = this.statsListener_.get();\n }\n else {\n stats = this.stats_.get();\n }\n var longestName = Object.keys(stats).reduce(function (previousValue, currentValue) {\n return Math.max(currentValue.length, previousValue);\n }, 0);\n util_3.forEach(stats, function (stat, value) {\n // pad stat names to be the same length (plus 2 extra spaces).\n for (var i = stat.length; i < longestName + 2; i++)\n stat += ' ';\n console.log(stat + value);\n });\n };\n Repo.prototype.statsIncrementCounter = function (metric) {\n this.stats_.incrementCounter(metric);\n this.statsReporter_.includeStat(metric);\n };\n /**\n * @param {...*} var_args\n * @private\n */\n Repo.prototype.log_ = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var prefix = '';\n if (this.persistentConnection_) {\n prefix = this.persistentConnection_.id + ':';\n }\n util_2.log.apply(void 0, [prefix].concat(var_args));\n };\n /**\n * @param {?function(?Error, *=)} callback\n * @param {!string} status\n * @param {?string=} errorReason\n */\n Repo.prototype.callOnCompleteCallback = function (callback, status, errorReason) {\n if (callback) {\n util_2.exceptionGuard(function () {\n if (status == 'ok') {\n callback(null);\n }\n else {\n var code = (status || 'error').toUpperCase();\n var message = code;\n if (errorReason)\n message += ': ' + errorReason;\n var error = new Error(message);\n error.code = code;\n callback(error);\n }\n });\n }\n };\n Object.defineProperty(Repo.prototype, \"database\", {\n get: function () {\n return this.__database || (this.__database = new Database_1.Database(this));\n },\n enumerable: true,\n configurable: true\n });\n return Repo;\n}());\nexports.Repo = Repo;\n\n//# sourceMappingURL=Repo.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/Repo.js\n// module id = 17\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully\n * initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.\n * initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks\n * whether a node potentially had children removed due to a filter.\n */\nvar CacheNode = /** @class */ (function () {\n /**\n * @param {!Node} node_\n * @param {boolean} fullyInitialized_\n * @param {boolean} filtered_\n */\n function CacheNode(node_, fullyInitialized_, filtered_) {\n this.node_ = node_;\n this.fullyInitialized_ = fullyInitialized_;\n this.filtered_ = filtered_;\n }\n /**\n * Returns whether this node was fully initialized with either server data or a complete overwrite by the client\n * @return {boolean}\n */\n CacheNode.prototype.isFullyInitialized = function () {\n return this.fullyInitialized_;\n };\n /**\n * Returns whether this node is potentially missing children due to a filter applied to the node\n * @return {boolean}\n */\n CacheNode.prototype.isFiltered = function () {\n return this.filtered_;\n };\n /**\n * @param {!Path} path\n * @return {boolean}\n */\n CacheNode.prototype.isCompleteForPath = function (path) {\n if (path.isEmpty()) {\n return this.isFullyInitialized() && !this.filtered_;\n }\n var childKey = path.getFront();\n return this.isCompleteForChild(childKey);\n };\n /**\n * @param {!string} key\n * @return {boolean}\n */\n CacheNode.prototype.isCompleteForChild = function (key) {\n return ((this.isFullyInitialized() && !this.filtered_) || this.node_.hasChild(key));\n };\n /**\n * @return {!Node}\n */\n CacheNode.prototype.getNode = function () {\n return this.node_;\n };\n return CacheNode;\n}());\nexports.CacheNode = CacheNode;\n\n//# sourceMappingURL=CacheNode.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/CacheNode.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar onDisconnect_1 = require(\"./onDisconnect\");\nvar TransactionResult_1 = require(\"./TransactionResult\");\nvar util_1 = require(\"../core/util/util\");\nvar NextPushId_1 = require(\"../core/util/NextPushId\");\nvar Query_1 = require(\"./Query\");\nvar Repo_1 = require(\"../core/Repo\");\nvar Path_1 = require(\"../core/util/Path\");\nvar QueryParams_1 = require(\"../core/view/QueryParams\");\nvar validation_1 = require(\"../core/util/validation\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\nvar SyncPoint_1 = require(\"../core/SyncPoint\");\nvar Reference = /** @class */ (function (_super) {\n __extends(Reference, _super);\n /**\n * Call options:\n * new Reference(Repo, Path) or\n * new Reference(url: string, string|RepoManager)\n *\n * Externally - this is the firebase.database.Reference type.\n *\n * @param {!Repo} repo\n * @param {(!Path)} path\n * @extends {Query}\n */\n function Reference(repo, path) {\n var _this = this;\n if (!(repo instanceof Repo_1.Repo)) {\n throw new Error('new Reference() no longer supported - use app.database().');\n }\n // call Query's constructor, passing in the repo and path.\n _this = _super.call(this, repo, path, QueryParams_1.QueryParams.DEFAULT, false) || this;\n return _this;\n }\n /** @return {?string} */\n Reference.prototype.getKey = function () {\n util_2.validateArgCount('Reference.key', 0, 0, arguments.length);\n if (this.path.isEmpty())\n return null;\n else\n return this.path.getBack();\n };\n /**\n * @param {!(string|Path)} pathString\n * @return {!Reference}\n */\n Reference.prototype.child = function (pathString) {\n util_2.validateArgCount('Reference.child', 1, 1, arguments.length);\n if (typeof pathString === 'number') {\n pathString = String(pathString);\n }\n else if (!(pathString instanceof Path_1.Path)) {\n if (this.path.getFront() === null)\n validation_1.validateRootPathString('Reference.child', 1, pathString, false);\n else\n validation_1.validatePathString('Reference.child', 1, pathString, false);\n }\n return new Reference(this.repo, this.path.child(pathString));\n };\n /** @return {?Reference} */\n Reference.prototype.getParent = function () {\n util_2.validateArgCount('Reference.parent', 0, 0, arguments.length);\n var parentPath = this.path.parent();\n return parentPath === null ? null : new Reference(this.repo, parentPath);\n };\n /** @return {!Reference} */\n Reference.prototype.getRoot = function () {\n util_2.validateArgCount('Reference.root', 0, 0, arguments.length);\n var ref = this;\n while (ref.getParent() !== null) {\n ref = ref.getParent();\n }\n return ref;\n };\n /** @return {!Database} */\n Reference.prototype.databaseProp = function () {\n return this.repo.database;\n };\n /**\n * @param {*} newVal\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.set = function (newVal, onComplete) {\n util_2.validateArgCount('Reference.set', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.set', this.path);\n validation_1.validateFirebaseDataArg('Reference.set', 1, newVal, this.path, false);\n util_2.validateCallback('Reference.set', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path, newVal, \n /*priority=*/ null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.update = function (objectToMerge, onComplete) {\n util_2.validateArgCount('Reference.update', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.update', this.path);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n util_1.warn('Passing an Array to Firebase.update() is deprecated. ' +\n 'Use set() if you want to overwrite the existing data, or ' +\n 'an Object with integer keys if you really do want to ' +\n 'only update some of the children.');\n }\n validation_1.validateFirebaseMergeDataArg('Reference.update', 1, objectToMerge, this.path, false);\n util_2.validateCallback('Reference.update', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.update(this.path, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} newVal\n * @param {string|number|null} newPriority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.setWithPriority = function (newVal, newPriority, onComplete) {\n util_2.validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);\n validation_1.validateWritablePath('Reference.setWithPriority', this.path);\n validation_1.validateFirebaseDataArg('Reference.setWithPriority', 1, newVal, this.path, false);\n validation_1.validatePriority('Reference.setWithPriority', 2, newPriority, false);\n util_2.validateCallback('Reference.setWithPriority', 3, onComplete, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.setWithPriority failed: ' +\n this.getKey() +\n ' is a read-only object.';\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path, newVal, newPriority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.remove = function (onComplete) {\n util_2.validateArgCount('Reference.remove', 0, 1, arguments.length);\n validation_1.validateWritablePath('Reference.remove', this.path);\n util_2.validateCallback('Reference.remove', 1, onComplete, true);\n return this.set(null, onComplete);\n };\n /**\n * @param {function(*):*} transactionUpdate\n * @param {(function(?Error, boolean, ?DataSnapshot))=} onComplete\n * @param {boolean=} applyLocally\n * @return {!Promise}\n */\n Reference.prototype.transaction = function (transactionUpdate, onComplete, applyLocally) {\n util_2.validateArgCount('Reference.transaction', 1, 3, arguments.length);\n validation_1.validateWritablePath('Reference.transaction', this.path);\n util_2.validateCallback('Reference.transaction', 1, transactionUpdate, false);\n util_2.validateCallback('Reference.transaction', 2, onComplete, true);\n // NOTE: applyLocally is an internal-only option for now. We need to decide if we want to keep it and how\n // to expose it.\n validation_1.validateBoolean('Reference.transaction', 3, applyLocally, true);\n if (this.getKey() === '.length' || this.getKey() === '.keys')\n throw 'Reference.transaction failed: ' +\n this.getKey() +\n ' is a read-only object.';\n if (applyLocally === undefined)\n applyLocally = true;\n var deferred = new util_3.Deferred();\n if (typeof onComplete === 'function') {\n deferred.promise.catch(function () { });\n }\n var promiseComplete = function (error, committed, snapshot) {\n if (error) {\n deferred.reject(error);\n }\n else {\n deferred.resolve(new TransactionResult_1.TransactionResult(committed, snapshot));\n }\n if (typeof onComplete === 'function') {\n onComplete(error, committed, snapshot);\n }\n };\n this.repo.startTransaction(this.path, transactionUpdate, promiseComplete, applyLocally);\n return deferred.promise;\n };\n /**\n * @param {string|number|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!Promise}\n */\n Reference.prototype.setPriority = function (priority, onComplete) {\n util_2.validateArgCount('Reference.setPriority', 1, 2, arguments.length);\n validation_1.validateWritablePath('Reference.setPriority', this.path);\n validation_1.validatePriority('Reference.setPriority', 1, priority, false);\n util_2.validateCallback('Reference.setPriority', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo.setWithPriority(this.path.child('.priority'), priority, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*=} value\n * @param {function(?Error)=} onComplete\n * @return {!Reference}\n */\n Reference.prototype.push = function (value, onComplete) {\n util_2.validateArgCount('Reference.push', 0, 2, arguments.length);\n validation_1.validateWritablePath('Reference.push', this.path);\n validation_1.validateFirebaseDataArg('Reference.push', 1, value, this.path, true);\n util_2.validateCallback('Reference.push', 2, onComplete, true);\n var now = this.repo.serverTime();\n var name = NextPushId_1.nextPushId(now);\n // push() returns a ThennableReference whose promise is fulfilled with a regular Reference.\n // We use child() to create handles to two different references. The first is turned into a\n // ThennableReference below by adding then() and catch() methods and is used as the\n // return value of push(). The second remains a regular Reference and is used as the fulfilled\n // value of the first ThennableReference.\n var thennablePushRef = this.child(name);\n var pushRef = this.child(name);\n var promise;\n if (value != null) {\n promise = thennablePushRef.set(value, onComplete).then(function () { return pushRef; });\n }\n else {\n promise = Promise.resolve(pushRef);\n }\n thennablePushRef.then = promise.then.bind(promise);\n thennablePushRef.catch = promise.then.bind(promise, undefined);\n if (typeof onComplete === 'function') {\n promise.catch(function () { });\n }\n return thennablePushRef;\n };\n /**\n * @return {!OnDisconnect}\n */\n Reference.prototype.onDisconnect = function () {\n validation_1.validateWritablePath('Reference.onDisconnect', this.path);\n return new onDisconnect_1.OnDisconnect(this.repo, this.path);\n };\n Object.defineProperty(Reference.prototype, \"database\", {\n get: function () {\n return this.databaseProp();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"key\", {\n get: function () {\n return this.getKey();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"parent\", {\n get: function () {\n return this.getParent();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n get: function () {\n return this.getRoot();\n },\n enumerable: true,\n configurable: true\n });\n return Reference;\n}(Query_1.Query));\nexports.Reference = Reference;\n/**\n * Define reference constructor in various modules\n *\n * We are doing this here to avoid several circular\n * dependency issues\n */\nQuery_1.Query.__referenceConstructor = Reference;\nSyncPoint_1.SyncPoint.__referenceConstructor = Reference;\n\n//# sourceMappingURL=Reference.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/Reference.js\n// module id = 21\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar validation_1 = require(\"../core/util/validation\");\nvar Path_1 = require(\"../core/util/Path\");\nvar PriorityIndex_1 = require(\"../core/snap/indexes/PriorityIndex\");\n/**\n * Class representing a firebase data snapshot. It wraps a SnapshotNode and\n * surfaces the public methods (val, forEach, etc.) we want to expose.\n */\nvar DataSnapshot = /** @class */ (function () {\n /**\n * @param {!Node} node_ A SnapshotNode to wrap.\n * @param {!Reference} ref_ The ref of the location this snapshot came from.\n * @param {!Index} index_ The iteration order for this snapshot\n */\n function DataSnapshot(node_, ref_, index_) {\n this.node_ = node_;\n this.ref_ = ref_;\n this.index_ = index_;\n }\n /**\n * Retrieves the snapshot contents as JSON. Returns null if the snapshot is\n * empty.\n *\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n DataSnapshot.prototype.val = function () {\n util_1.validateArgCount('DataSnapshot.val', 0, 0, arguments.length);\n return this.node_.val();\n };\n /**\n * Returns the snapshot contents as JSON, including priorities of node. Suitable for exporting\n * the entire node contents.\n * @return {*} JSON representation of the DataSnapshot contents, or null if empty.\n */\n DataSnapshot.prototype.exportVal = function () {\n util_1.validateArgCount('DataSnapshot.exportVal', 0, 0, arguments.length);\n return this.node_.val(true);\n };\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n DataSnapshot.prototype.toJSON = function () {\n // Optional spacer argument is unnecessary because we're depending on recursion rather than stringifying the content\n util_1.validateArgCount('DataSnapshot.toJSON', 0, 1, arguments.length);\n return this.exportVal();\n };\n /**\n * Returns whether the snapshot contains a non-null value.\n *\n * @return {boolean} Whether the snapshot contains a non-null value, or is empty.\n */\n DataSnapshot.prototype.exists = function () {\n util_1.validateArgCount('DataSnapshot.exists', 0, 0, arguments.length);\n return !this.node_.isEmpty();\n };\n /**\n * Returns a DataSnapshot of the specified child node's contents.\n *\n * @param {!string} childPathString Path to a child.\n * @return {!DataSnapshot} DataSnapshot for child node.\n */\n DataSnapshot.prototype.child = function (childPathString) {\n util_1.validateArgCount('DataSnapshot.child', 0, 1, arguments.length);\n // Ensure the childPath is a string (can be a number)\n childPathString = String(childPathString);\n validation_1.validatePathString('DataSnapshot.child', 1, childPathString, false);\n var childPath = new Path_1.Path(childPathString);\n var childRef = this.ref_.child(childPath);\n return new DataSnapshot(this.node_.getChild(childPath), childRef, PriorityIndex_1.PRIORITY_INDEX);\n };\n /**\n * Returns whether the snapshot contains a child at the specified path.\n *\n * @param {!string} childPathString Path to a child.\n * @return {boolean} Whether the child exists.\n */\n DataSnapshot.prototype.hasChild = function (childPathString) {\n util_1.validateArgCount('DataSnapshot.hasChild', 1, 1, arguments.length);\n validation_1.validatePathString('DataSnapshot.hasChild', 1, childPathString, false);\n var childPath = new Path_1.Path(childPathString);\n return !this.node_.getChild(childPath).isEmpty();\n };\n /**\n * Returns the priority of the object, or null if no priority was set.\n *\n * @return {string|number|null} The priority.\n */\n DataSnapshot.prototype.getPriority = function () {\n util_1.validateArgCount('DataSnapshot.getPriority', 0, 0, arguments.length);\n // typecast here because we never return deferred values or internal priorities (MAX_PRIORITY)\n return this.node_.getPriority().val();\n };\n /**\n * Iterates through child nodes and calls the specified action for each one.\n *\n * @param {function(!DataSnapshot)} action Callback function to be called\n * for each child.\n * @return {boolean} True if forEach was canceled by action returning true for\n * one of the child nodes.\n */\n DataSnapshot.prototype.forEach = function (action) {\n var _this = this;\n util_1.validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);\n util_1.validateCallback('DataSnapshot.forEach', 1, action, false);\n if (this.node_.isLeafNode())\n return false;\n var childrenNode = this.node_;\n // Sanitize the return value to a boolean. ChildrenNode.forEachChild has a weird return type...\n return !!childrenNode.forEachChild(this.index_, function (key, node) {\n return action(new DataSnapshot(node, _this.ref_.child(key), PriorityIndex_1.PRIORITY_INDEX));\n });\n };\n /**\n * Returns whether this DataSnapshot has children.\n * @return {boolean} True if the DataSnapshot contains 1 or more child nodes.\n */\n DataSnapshot.prototype.hasChildren = function () {\n util_1.validateArgCount('DataSnapshot.hasChildren', 0, 0, arguments.length);\n if (this.node_.isLeafNode())\n return false;\n else\n return !this.node_.isEmpty();\n };\n Object.defineProperty(DataSnapshot.prototype, \"key\", {\n get: function () {\n return this.ref_.getKey();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the number of children for this DataSnapshot.\n * @return {number} The number of children that this DataSnapshot contains.\n */\n DataSnapshot.prototype.numChildren = function () {\n util_1.validateArgCount('DataSnapshot.numChildren', 0, 0, arguments.length);\n return this.node_.numChildren();\n };\n /**\n * @return {Reference} The Firebase reference for the location this snapshot's data came from.\n */\n DataSnapshot.prototype.getRef = function () {\n util_1.validateArgCount('DataSnapshot.ref', 0, 0, arguments.length);\n return this.ref_;\n };\n Object.defineProperty(DataSnapshot.prototype, \"ref\", {\n get: function () {\n return this.getRef();\n },\n enumerable: true,\n configurable: true\n });\n return DataSnapshot;\n}());\nexports.DataSnapshot = DataSnapshot;\n\n//# sourceMappingURL=DataSnapshot.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/DataSnapshot.js\n// module id = 22\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SortedMap_1 = require(\"./SortedMap\");\nvar Path_1 = require(\"./Path\");\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"@firebase/util\");\nvar emptyChildrenSingleton;\n/**\n * Singleton empty children collection.\n *\n * @const\n * @type {!SortedMap.>}\n */\nvar EmptyChildren = function () {\n if (!emptyChildrenSingleton) {\n emptyChildrenSingleton = new SortedMap_1.SortedMap(util_1.stringCompare);\n }\n return emptyChildrenSingleton;\n};\n/**\n * A tree with immutable elements.\n */\nvar ImmutableTree = /** @class */ (function () {\n /**\n * @template T\n * @param {?T} value\n * @param {SortedMap.>=} children\n */\n function ImmutableTree(value, children) {\n if (children === void 0) { children = EmptyChildren(); }\n this.value = value;\n this.children = children;\n }\n /**\n * @template T\n * @param {!Object.} obj\n * @return {!ImmutableTree.}\n */\n ImmutableTree.fromObject = function (obj) {\n var tree = ImmutableTree.Empty;\n util_2.forEach(obj, function (childPath, childSnap) {\n tree = tree.set(new Path_1.Path(childPath), childSnap);\n });\n return tree;\n };\n /**\n * True if the value is empty and there are no children\n * @return {boolean}\n */\n ImmutableTree.prototype.isEmpty = function () {\n return this.value === null && this.children.isEmpty();\n };\n /**\n * Given a path and predicate, return the first node and the path to that node\n * where the predicate returns true.\n *\n * TODO Do a perf test -- If we're creating a bunch of {path: value:} objects\n * on the way back out, it may be better to pass down a pathSoFar obj.\n *\n * @param {!Path} relativePath The remainder of the path\n * @param {function(T):boolean} predicate The predicate to satisfy to return a\n * node\n * @return {?{path:!Path, value:!T}}\n */\n ImmutableTree.prototype.findRootMostMatchingPathAndValue = function (relativePath, predicate) {\n if (this.value != null && predicate(this.value)) {\n return { path: Path_1.Path.Empty, value: this.value };\n }\n else {\n if (relativePath.isEmpty()) {\n return null;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child !== null) {\n var childExistingPathAndValue = child.findRootMostMatchingPathAndValue(relativePath.popFront(), predicate);\n if (childExistingPathAndValue != null) {\n var fullPath = new Path_1.Path(front).child(childExistingPathAndValue.path);\n return { path: fullPath, value: childExistingPathAndValue.value };\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n }\n }\n };\n /**\n * Find, if it exists, the shortest subpath of the given path that points a defined\n * value in the tree\n * @param {!Path} relativePath\n * @return {?{path: !Path, value: !T}}\n */\n ImmutableTree.prototype.findRootMostValueAndPath = function (relativePath) {\n return this.findRootMostMatchingPathAndValue(relativePath, function () { return true; });\n };\n /**\n * @param {!Path} relativePath\n * @return {!ImmutableTree.} The subtree at the given path\n */\n ImmutableTree.prototype.subtree = function (relativePath) {\n if (relativePath.isEmpty()) {\n return this;\n }\n else {\n var front = relativePath.getFront();\n var childTree = this.children.get(front);\n if (childTree !== null) {\n return childTree.subtree(relativePath.popFront());\n }\n else {\n return ImmutableTree.Empty;\n }\n }\n };\n /**\n * Sets a value at the specified path.\n *\n * @param {!Path} relativePath Path to set value at.\n * @param {?T} toSet Value to set.\n * @return {!ImmutableTree.} Resulting tree.\n */\n ImmutableTree.prototype.set = function (relativePath, toSet) {\n if (relativePath.isEmpty()) {\n return new ImmutableTree(toSet, this.children);\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front) || ImmutableTree.Empty;\n var newChild = child.set(relativePath.popFront(), toSet);\n var newChildren = this.children.insert(front, newChild);\n return new ImmutableTree(this.value, newChildren);\n }\n };\n /**\n * Removes the value at the specified path.\n *\n * @param {!Path} relativePath Path to value to remove.\n * @return {!ImmutableTree.} Resulting tree.\n */\n ImmutableTree.prototype.remove = function (relativePath) {\n if (relativePath.isEmpty()) {\n if (this.children.isEmpty()) {\n return ImmutableTree.Empty;\n }\n else {\n return new ImmutableTree(null, this.children);\n }\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child) {\n var newChild = child.remove(relativePath.popFront());\n var newChildren = void 0;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n }\n else {\n newChildren = this.children.insert(front, newChild);\n }\n if (this.value === null && newChildren.isEmpty()) {\n return ImmutableTree.Empty;\n }\n else {\n return new ImmutableTree(this.value, newChildren);\n }\n }\n else {\n return this;\n }\n }\n };\n /**\n * Gets a value from the tree.\n *\n * @param {!Path} relativePath Path to get value for.\n * @return {?T} Value at path, or null.\n */\n ImmutableTree.prototype.get = function (relativePath) {\n if (relativePath.isEmpty()) {\n return this.value;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front);\n if (child) {\n return child.get(relativePath.popFront());\n }\n else {\n return null;\n }\n }\n };\n /**\n * Replace the subtree at the specified path with the given new tree.\n *\n * @param {!Path} relativePath Path to replace subtree for.\n * @param {!ImmutableTree} newTree New tree.\n * @return {!ImmutableTree} Resulting tree.\n */\n ImmutableTree.prototype.setTree = function (relativePath, newTree) {\n if (relativePath.isEmpty()) {\n return newTree;\n }\n else {\n var front = relativePath.getFront();\n var child = this.children.get(front) || ImmutableTree.Empty;\n var newChild = child.setTree(relativePath.popFront(), newTree);\n var newChildren = void 0;\n if (newChild.isEmpty()) {\n newChildren = this.children.remove(front);\n }\n else {\n newChildren = this.children.insert(front, newChild);\n }\n return new ImmutableTree(this.value, newChildren);\n }\n };\n /**\n * Performs a depth first fold on this tree. Transforms a tree into a single\n * value, given a function that operates on the path to a node, an optional\n * current value, and a map of child names to folded subtrees\n * @template V\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n */\n ImmutableTree.prototype.fold = function (fn) {\n return this.fold_(Path_1.Path.Empty, fn);\n };\n /**\n * Recursive helper for public-facing fold() method\n * @template V\n * @param {!Path} pathSoFar\n * @param {function(Path, ?T, Object.):V} fn\n * @return {V}\n * @private\n */\n ImmutableTree.prototype.fold_ = function (pathSoFar, fn) {\n var accum = {};\n this.children.inorderTraversal(function (childKey, childTree) {\n accum[childKey] = childTree.fold_(pathSoFar.child(childKey), fn);\n });\n return fn(pathSoFar, this.value, accum);\n };\n /**\n * Find the first matching value on the given path. Return the result of applying f to it.\n * @template V\n * @param {!Path} path\n * @param {!function(!Path, !T):?V} f\n * @return {?V}\n */\n ImmutableTree.prototype.findOnPath = function (path, f) {\n return this.findOnPath_(path, Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.findOnPath_ = function (pathToFollow, pathSoFar, f) {\n var result = this.value ? f(pathSoFar, this.value) : false;\n if (result) {\n return result;\n }\n else {\n if (pathToFollow.isEmpty()) {\n return null;\n }\n else {\n var front = pathToFollow.getFront();\n var nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.findOnPath_(pathToFollow.popFront(), pathSoFar.child(front), f);\n }\n else {\n return null;\n }\n }\n }\n };\n /**\n *\n * @param {!Path} path\n * @param {!function(!Path, !T)} f\n * @returns {!ImmutableTree.}\n */\n ImmutableTree.prototype.foreachOnPath = function (path, f) {\n return this.foreachOnPath_(path, Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.foreachOnPath_ = function (pathToFollow, currentRelativePath, f) {\n if (pathToFollow.isEmpty()) {\n return this;\n }\n else {\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n var front = pathToFollow.getFront();\n var nextChild = this.children.get(front);\n if (nextChild) {\n return nextChild.foreachOnPath_(pathToFollow.popFront(), currentRelativePath.child(front), f);\n }\n else {\n return ImmutableTree.Empty;\n }\n }\n };\n /**\n * Calls the given function for each node in the tree that has a value.\n *\n * @param {function(!Path, !T)} f A function to be called with\n * the path from the root of the tree to a node, and the value at that node.\n * Called in depth-first order.\n */\n ImmutableTree.prototype.foreach = function (f) {\n this.foreach_(Path_1.Path.Empty, f);\n };\n ImmutableTree.prototype.foreach_ = function (currentRelativePath, f) {\n this.children.inorderTraversal(function (childName, childTree) {\n childTree.foreach_(currentRelativePath.child(childName), f);\n });\n if (this.value) {\n f(currentRelativePath, this.value);\n }\n };\n /**\n *\n * @param {function(string, !T)} f\n */\n ImmutableTree.prototype.foreachChild = function (f) {\n this.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value) {\n f(childName, childTree.value);\n }\n });\n };\n ImmutableTree.Empty = new ImmutableTree(null);\n return ImmutableTree;\n}());\nexports.ImmutableTree = ImmutableTree;\n\n//# sourceMappingURL=ImmutableTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/ImmutableTree.js\n// module id = 23\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Change_1 = require(\"../Change\");\nvar ChildrenNode_1 = require(\"../../snap/ChildrenNode\");\nvar PriorityIndex_1 = require(\"../../snap/indexes/PriorityIndex\");\n/**\n * Doesn't really filter nodes but applies an index to the node and keeps track of any changes\n *\n * @constructor\n * @implements {NodeFilter}\n * @param {!Index} index\n */\nvar IndexedFilter = /** @class */ (function () {\n function IndexedFilter(index_) {\n this.index_ = index_;\n }\n IndexedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n util_1.assert(snap.isIndexed(this.index_), 'A node must be indexed if only a child is updated');\n var oldChild = snap.getImmediateChild(key);\n // Check if anything actually changed.\n if (oldChild.getChild(affectedPath).equals(newChild.getChild(affectedPath))) {\n // There's an edge case where a child can enter or leave the view because affectedPath was set to null.\n // In this case, affectedPath will appear null in both the old and new snapshots. So we need\n // to avoid treating these cases as \"nothing changed.\"\n if (oldChild.isEmpty() == newChild.isEmpty()) {\n // Nothing changed.\n // This assert should be valid, but it's expensive (can dominate perf testing) so don't actually do it.\n //assert(oldChild.equals(newChild), 'Old and new snapshots should be equal.');\n return snap;\n }\n }\n if (optChangeAccumulator != null) {\n if (newChild.isEmpty()) {\n if (snap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(key, oldChild));\n }\n else {\n util_1.assert(snap.isLeafNode(), 'A child remove without an old child only makes sense on a leaf node');\n }\n }\n else if (oldChild.isEmpty()) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childAddedChange(key, newChild));\n }\n else {\n optChangeAccumulator.trackChildChange(Change_1.Change.childChangedChange(key, newChild, oldChild));\n }\n }\n if (snap.isLeafNode() && newChild.isEmpty()) {\n return snap;\n }\n else {\n // Make sure the node is indexed\n return snap.updateImmediateChild(key, newChild).withIndex(this.index_);\n }\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (optChangeAccumulator != null) {\n if (!oldSnap.isLeafNode()) {\n oldSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!newSnap.hasChild(key)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(key, childNode));\n }\n });\n }\n if (!newSnap.isLeafNode()) {\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (oldSnap.hasChild(key)) {\n var oldChild = oldSnap.getImmediateChild(key);\n if (!oldChild.equals(childNode)) {\n optChangeAccumulator.trackChildChange(Change_1.Change.childChangedChange(key, childNode, oldChild));\n }\n }\n else {\n optChangeAccumulator.trackChildChange(Change_1.Change.childAddedChange(key, childNode));\n }\n });\n }\n }\n return newSnap.withIndex(this.index_);\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n if (oldSnap.isEmpty()) {\n return ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n else {\n return oldSnap.updatePriority(newPriority);\n }\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.filtersNodes = function () {\n return false;\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.getIndexedFilter = function () {\n return this;\n };\n /**\n * @inheritDoc\n */\n IndexedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n return IndexedFilter;\n}());\nexports.IndexedFilter = IndexedFilter;\n\n//# sourceMappingURL=IndexedFilter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/filter/IndexedFilter.js\n// module id = 24\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar StatsCollection_1 = require(\"./StatsCollection\");\nvar StatsManager = /** @class */ (function () {\n function StatsManager() {\n }\n StatsManager.getCollection = function (repoInfo) {\n var hashString = repoInfo.toString();\n if (!this.collections_[hashString]) {\n this.collections_[hashString] = new StatsCollection_1.StatsCollection();\n }\n return this.collections_[hashString];\n };\n StatsManager.getOrCreateReporter = function (repoInfo, creatorFunction) {\n var hashString = repoInfo.toString();\n if (!this.reporters_[hashString]) {\n this.reporters_[hashString] = creatorFunction();\n }\n return this.reporters_[hashString];\n };\n StatsManager.collections_ = {};\n StatsManager.reporters_ = {};\n return StatsManager;\n}());\nexports.StatsManager = StatsManager;\n\n//# sourceMappingURL=StatsManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsManager.js\n// module id = 25\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Repo_1 = require(\"./Repo\");\nvar util_2 = require(\"./util/util\");\nvar parser_1 = require(\"./util/libs/parser\");\nvar validation_1 = require(\"./util/validation\");\nrequire(\"./Repo_transaction\");\n/** @const {string} */\nvar DATABASE_URL_OPTION = 'databaseURL';\nvar _staticInstance;\n/**\n * Creates and caches Repo instances.\n */\nvar RepoManager = /** @class */ (function () {\n function RepoManager() {\n /**\n * @private {!Object.>}\n */\n this.repos_ = {};\n /**\n * If true, new Repos will be created to use ReadonlyRestClient (for testing purposes).\n * @private {boolean}\n */\n this.useRestClient_ = false;\n }\n RepoManager.getInstance = function () {\n if (!_staticInstance) {\n _staticInstance = new RepoManager();\n }\n return _staticInstance;\n };\n // TODO(koss): Remove these functions unless used in tests?\n RepoManager.prototype.interrupt = function () {\n for (var appName in this.repos_) {\n for (var dbUrl in this.repos_[appName]) {\n this.repos_[appName][dbUrl].interrupt();\n }\n }\n };\n RepoManager.prototype.resume = function () {\n for (var appName in this.repos_) {\n for (var dbUrl in this.repos_[appName]) {\n this.repos_[appName][dbUrl].resume();\n }\n }\n };\n /**\n * This function should only ever be called to CREATE a new database instance.\n *\n * @param {!FirebaseApp} app\n * @return {!Database}\n */\n RepoManager.prototype.databaseFromApp = function (app, url) {\n var dbUrl = url || app.options[DATABASE_URL_OPTION];\n if (dbUrl === undefined) {\n util_2.fatal(\"Can't determine Firebase Database URL. Be sure to include \" +\n DATABASE_URL_OPTION +\n ' option when calling firebase.intializeApp().');\n }\n var parsedUrl = parser_1.parseRepoInfo(dbUrl);\n var repoInfo = parsedUrl.repoInfo;\n validation_1.validateUrl('Invalid Firebase Database URL', 1, parsedUrl);\n if (!parsedUrl.path.isEmpty()) {\n util_2.fatal('Database URL must point to the root of a Firebase Database ' +\n '(not including a child path).');\n }\n var repo = this.createRepo(repoInfo, app);\n return repo.database;\n };\n /**\n * Remove the repo and make sure it is disconnected.\n *\n * @param {!Repo} repo\n */\n RepoManager.prototype.deleteRepo = function (repo) {\n var appRepos = util_1.safeGet(this.repos_, repo.app.name);\n // This should never happen...\n if (!appRepos || util_1.safeGet(appRepos, repo.repoInfo_.toURLString()) !== repo) {\n util_2.fatal(\"Database \" + repo.app.name + \"(\" + repo.repoInfo_ + \") has already been deleted.\");\n }\n repo.interrupt();\n delete appRepos[repo.repoInfo_.toURLString()];\n };\n /**\n * Ensures a repo doesn't already exist and then creates one using the\n * provided app.\n *\n * @param {!RepoInfo} repoInfo The metadata about the Repo\n * @param {!FirebaseApp} app\n * @return {!Repo} The Repo object for the specified server / repoName.\n */\n RepoManager.prototype.createRepo = function (repoInfo, app) {\n var appRepos = util_1.safeGet(this.repos_, app.name);\n if (!appRepos) {\n appRepos = {};\n this.repos_[app.name] = appRepos;\n }\n var repo = util_1.safeGet(appRepos, repoInfo.toURLString());\n if (repo) {\n util_2.fatal('Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.');\n }\n repo = new Repo_1.Repo(repoInfo, this.useRestClient_, app);\n appRepos[repoInfo.toURLString()] = repo;\n return repo;\n };\n /**\n * Forces us to use ReadonlyRestClient instead of PersistentConnection for new Repos.\n * @param {boolean} forceRestClient\n */\n RepoManager.prototype.forceRestClient = function (forceRestClient) {\n this.useRestClient_ = forceRestClient;\n };\n return RepoManager;\n}());\nexports.RepoManager = RepoManager;\n\n//# sourceMappingURL=RepoManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/RepoManager.js\n// module id = 26\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../core/util/util\");\nvar parser_1 = require(\"../core/util/libs/parser\");\nvar Path_1 = require(\"../core/util/Path\");\nvar Reference_1 = require(\"./Reference\");\nvar Repo_1 = require(\"../core/Repo\");\nvar RepoManager_1 = require(\"../core/RepoManager\");\nvar util_2 = require(\"@firebase/util\");\nvar validation_1 = require(\"../core/util/validation\");\n/**\n * Class representing a firebase database.\n * @implements {FirebaseService}\n */\nvar Database = /** @class */ (function () {\n /**\n * The constructor should not be called by users of our public API.\n * @param {!Repo} repo_\n */\n function Database(repo_) {\n this.repo_ = repo_;\n if (!(repo_ instanceof Repo_1.Repo)) {\n util_1.fatal(\"Don't call new Database() directly - please use firebase.database().\");\n }\n /** @type {Reference} */\n this.root_ = new Reference_1.Reference(repo_, Path_1.Path.Empty);\n this.INTERNAL = new DatabaseInternals(this);\n }\n Object.defineProperty(Database.prototype, \"app\", {\n get: function () {\n return this.repo_.app;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns a reference to the root or the path specified in opt_pathString.\n * @param {string=} pathString\n * @return {!Reference} Firebase reference.\n */\n Database.prototype.ref = function (pathString) {\n this.checkDeleted_('ref');\n util_2.validateArgCount('database.ref', 0, 1, arguments.length);\n return pathString !== undefined ? this.root_.child(pathString) : this.root_;\n };\n /**\n * Returns a reference to the root or the path specified in url.\n * We throw a exception if the url is not in the same domain as the\n * current repo.\n * @param {string} url\n * @return {!Reference} Firebase reference.\n */\n Database.prototype.refFromURL = function (url) {\n /** @const {string} */\n var apiName = 'database.refFromURL';\n this.checkDeleted_(apiName);\n util_2.validateArgCount(apiName, 1, 1, arguments.length);\n var parsedURL = parser_1.parseRepoInfo(url);\n validation_1.validateUrl(apiName, 1, parsedURL);\n var repoInfo = parsedURL.repoInfo;\n if (repoInfo.host !== this.repo_.repoInfo_.host) {\n util_1.fatal(apiName +\n ': Host name does not match the current database: ' +\n '(found ' +\n repoInfo.host +\n ' but expected ' +\n this.repo_.repoInfo_.host +\n ')');\n }\n return this.ref(parsedURL.path.toString());\n };\n /**\n * @param {string} apiName\n */\n Database.prototype.checkDeleted_ = function (apiName) {\n if (this.repo_ === null) {\n util_1.fatal('Cannot call ' + apiName + ' on a deleted database.');\n }\n };\n // Make individual repo go offline.\n Database.prototype.goOffline = function () {\n util_2.validateArgCount('database.goOffline', 0, 0, arguments.length);\n this.checkDeleted_('goOffline');\n this.repo_.interrupt();\n };\n Database.prototype.goOnline = function () {\n util_2.validateArgCount('database.goOnline', 0, 0, arguments.length);\n this.checkDeleted_('goOnline');\n this.repo_.resume();\n };\n Database.ServerValue = {\n TIMESTAMP: {\n '.sv': 'timestamp'\n }\n };\n return Database;\n}());\nexports.Database = Database;\nvar DatabaseInternals = /** @class */ (function () {\n /** @param {!Database} database */\n function DatabaseInternals(database) {\n this.database = database;\n }\n /** @return {Promise} */\n DatabaseInternals.prototype.delete = function () {\n this.database.checkDeleted_('delete');\n RepoManager_1.RepoManager.getInstance().deleteRepo(this.database.repo_);\n this.database.repo_ = null;\n this.database.root_ = null;\n this.database.INTERNAL = null;\n this.database = null;\n return Promise.resolve();\n };\n return DatabaseInternals;\n}());\nexports.DatabaseInternals = DatabaseInternals;\n\n//# sourceMappingURL=Database.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/Database.js\n// module id = 32\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"../Path\");\nvar RepoInfo_1 = require(\"../../RepoInfo\");\nvar util_1 = require(\"../util\");\n/**\n * @param {!string} pathString\n * @return {string}\n */\nfunction decodePath(pathString) {\n var pathStringDecoded = '';\n var pieces = pathString.split('/');\n for (var i = 0; i < pieces.length; i++) {\n if (pieces[i].length > 0) {\n var piece = pieces[i];\n try {\n piece = decodeURIComponent(piece.replace(/\\+/g, ' '));\n }\n catch (e) { }\n pathStringDecoded += '/' + piece;\n }\n }\n return pathStringDecoded;\n}\n/**\n *\n * @param {!string} dataURL\n * @return {{repoInfo: !RepoInfo, path: !Path}}\n */\nexports.parseRepoInfo = function (dataURL) {\n var parsedUrl = exports.parseURL(dataURL), namespace = parsedUrl.subdomain;\n if (parsedUrl.domain === 'firebase') {\n util_1.fatal(parsedUrl.host +\n ' is no longer supported. ' +\n 'Please use .firebaseio.com instead');\n }\n // Catch common error of uninitialized namespace value.\n if (!namespace || namespace == 'undefined') {\n util_1.fatal('Cannot parse Firebase url. Please use https://.firebaseio.com');\n }\n if (!parsedUrl.secure) {\n util_1.warnIfPageIsSecure();\n }\n var webSocketOnly = parsedUrl.scheme === 'ws' || parsedUrl.scheme === 'wss';\n return {\n repoInfo: new RepoInfo_1.RepoInfo(parsedUrl.host, parsedUrl.secure, namespace, webSocketOnly),\n path: new Path_1.Path(parsedUrl.pathString)\n };\n};\n/**\n *\n * @param {!string} dataURL\n * @return {{host: string, port: number, domain: string, subdomain: string, secure: boolean, scheme: string, pathString: string}}\n */\nexports.parseURL = function (dataURL) {\n // Default to empty strings in the event of a malformed string.\n var host = '', domain = '', subdomain = '', pathString = '';\n // Always default to SSL, unless otherwise specified.\n var secure = true, scheme = 'https', port = 443;\n // Don't do any validation here. The caller is responsible for validating the result of parsing.\n if (typeof dataURL === 'string') {\n // Parse scheme.\n var colonInd = dataURL.indexOf('//');\n if (colonInd >= 0) {\n scheme = dataURL.substring(0, colonInd - 1);\n dataURL = dataURL.substring(colonInd + 2);\n }\n // Parse host and path.\n var slashInd = dataURL.indexOf('/');\n if (slashInd === -1) {\n slashInd = dataURL.length;\n }\n host = dataURL.substring(0, slashInd);\n pathString = decodePath(dataURL.substring(slashInd));\n var parts = host.split('.');\n if (parts.length === 3) {\n // Normalize namespaces to lowercase to share storage / connection.\n domain = parts[1];\n subdomain = parts[0].toLowerCase();\n }\n else if (parts.length === 2) {\n domain = parts[0];\n }\n // If we have a port, use scheme for determining if it's secure.\n colonInd = host.indexOf(':');\n if (colonInd >= 0) {\n secure = scheme === 'https' || scheme === 'wss';\n port = parseInt(host.substring(colonInd + 1), 10);\n }\n }\n return {\n host: host,\n port: port,\n domain: domain,\n subdomain: subdomain,\n secure: secure,\n scheme: scheme,\n pathString: pathString\n };\n};\n\n//# sourceMappingURL=parser.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/libs/parser.js\n// module id = 33\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar storage_1 = require(\"./storage/storage\");\nvar Constants_1 = require(\"../realtime/Constants\");\n/**\n * A class that holds metadata about a Repo object\n *\n * @constructor\n */\nvar RepoInfo = /** @class */ (function () {\n /**\n * @param {string} host Hostname portion of the url for the repo\n * @param {boolean} secure Whether or not this repo is accessed over ssl\n * @param {string} namespace The namespace represented by the repo\n * @param {boolean} webSocketOnly Whether to prefer websockets over all other transports (used by Nest).\n * @param {string=} persistenceKey Override the default session persistence storage key\n */\n function RepoInfo(host, secure, namespace, webSocketOnly, persistenceKey) {\n if (persistenceKey === void 0) { persistenceKey = ''; }\n this.secure = secure;\n this.namespace = namespace;\n this.webSocketOnly = webSocketOnly;\n this.persistenceKey = persistenceKey;\n this.host = host.toLowerCase();\n this.domain = this.host.substr(this.host.indexOf('.') + 1);\n this.internalHost = storage_1.PersistentStorage.get('host:' + host) || this.host;\n }\n RepoInfo.prototype.needsQueryParam = function () {\n return this.host !== this.internalHost;\n };\n RepoInfo.prototype.isCacheableHost = function () {\n return this.internalHost.substr(0, 2) === 's-';\n };\n RepoInfo.prototype.isDemoHost = function () {\n return this.domain === 'firebaseio-demo.com';\n };\n RepoInfo.prototype.isCustomHost = function () {\n return (this.domain !== 'firebaseio.com' && this.domain !== 'firebaseio-demo.com');\n };\n RepoInfo.prototype.updateHost = function (newHost) {\n if (newHost !== this.internalHost) {\n this.internalHost = newHost;\n if (this.isCacheableHost()) {\n storage_1.PersistentStorage.set('host:' + this.host, this.internalHost);\n }\n }\n };\n /**\n * Returns the websocket URL for this repo\n * @param {string} type of connection\n * @param {Object} params list\n * @return {string} The URL for this repo\n */\n RepoInfo.prototype.connectionURL = function (type, params) {\n util_1.assert(typeof type === 'string', 'typeof type must == string');\n util_1.assert(typeof params === 'object', 'typeof params must == object');\n var connURL;\n if (type === Constants_1.WEBSOCKET) {\n connURL =\n (this.secure ? 'wss://' : 'ws://') + this.internalHost + '/.ws?';\n }\n else if (type === Constants_1.LONG_POLLING) {\n connURL =\n (this.secure ? 'https://' : 'http://') + this.internalHost + '/.lp?';\n }\n else {\n throw new Error('Unknown connection type: ' + type);\n }\n if (this.needsQueryParam()) {\n params['ns'] = this.namespace;\n }\n var pairs = [];\n util_2.forEach(params, function (key, value) {\n pairs.push(key + '=' + value);\n });\n return connURL + pairs.join('&');\n };\n /** @return {string} */\n RepoInfo.prototype.toString = function () {\n var str = this.toURLString();\n if (this.persistenceKey) {\n str += '<' + this.persistenceKey + '>';\n }\n return str;\n };\n /** @return {string} */\n RepoInfo.prototype.toURLString = function () {\n return (this.secure ? 'https://' : 'http://') + this.host;\n };\n return RepoInfo;\n}());\nexports.RepoInfo = RepoInfo;\n\n//# sourceMappingURL=RepoInfo.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/RepoInfo.js\n// module id = 34\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar validation_1 = require(\"../core/util/validation\");\nvar util_2 = require(\"../core/util/util\");\nvar util_3 = require(\"@firebase/util\");\n/**\n * @constructor\n */\nvar OnDisconnect = /** @class */ (function () {\n /**\n * @param {!Repo} repo_\n * @param {!Path} path_\n */\n function OnDisconnect(repo_, path_) {\n this.repo_ = repo_;\n this.path_ = path_;\n }\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.cancel = function (onComplete) {\n util_1.validateArgCount('OnDisconnect.cancel', 0, 1, arguments.length);\n util_1.validateCallback('OnDisconnect.cancel', 1, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectCancel(this.path_, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.remove = function (onComplete) {\n util_1.validateArgCount('OnDisconnect.remove', 0, 1, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.remove', this.path_);\n util_1.validateCallback('OnDisconnect.remove', 1, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSet(this.path_, null, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} value\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.set = function (value, onComplete) {\n util_1.validateArgCount('OnDisconnect.set', 1, 2, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.set', this.path_);\n validation_1.validateFirebaseDataArg('OnDisconnect.set', 1, value, this.path_, false);\n util_1.validateCallback('OnDisconnect.set', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSet(this.path_, value, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {*} value\n * @param {number|string|null} priority\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.setWithPriority = function (value, priority, onComplete) {\n util_1.validateArgCount('OnDisconnect.setWithPriority', 2, 3, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.setWithPriority', this.path_);\n validation_1.validateFirebaseDataArg('OnDisconnect.setWithPriority', 1, value, this.path_, false);\n validation_1.validatePriority('OnDisconnect.setWithPriority', 2, priority, false);\n util_1.validateCallback('OnDisconnect.setWithPriority', 3, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectSetWithPriority(this.path_, value, priority, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n /**\n * @param {!Object} objectToMerge\n * @param {function(?Error)=} onComplete\n * @return {!firebase.Promise}\n */\n OnDisconnect.prototype.update = function (objectToMerge, onComplete) {\n util_1.validateArgCount('OnDisconnect.update', 1, 2, arguments.length);\n validation_1.validateWritablePath('OnDisconnect.update', this.path_);\n if (Array.isArray(objectToMerge)) {\n var newObjectToMerge = {};\n for (var i = 0; i < objectToMerge.length; ++i) {\n newObjectToMerge['' + i] = objectToMerge[i];\n }\n objectToMerge = newObjectToMerge;\n util_2.warn('Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the ' +\n 'existing data, or an Object with integer keys if you really do want to only update some of the children.');\n }\n validation_1.validateFirebaseMergeDataArg('OnDisconnect.update', 1, objectToMerge, this.path_, false);\n util_1.validateCallback('OnDisconnect.update', 2, onComplete, true);\n var deferred = new util_3.Deferred();\n this.repo_.onDisconnectUpdate(this.path_, objectToMerge, deferred.wrapCallback(onComplete));\n return deferred.promise;\n };\n return OnDisconnect;\n}());\nexports.OnDisconnect = OnDisconnect;\n\n//# sourceMappingURL=onDisconnect.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/onDisconnect.js\n// module id = 35\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar KeyIndex_1 = require(\"../core/snap/indexes/KeyIndex\");\nvar PriorityIndex_1 = require(\"../core/snap/indexes/PriorityIndex\");\nvar ValueIndex_1 = require(\"../core/snap/indexes/ValueIndex\");\nvar PathIndex_1 = require(\"../core/snap/indexes/PathIndex\");\nvar util_2 = require(\"../core/util/util\");\nvar Path_1 = require(\"../core/util/Path\");\nvar validation_1 = require(\"../core/util/validation\");\nvar util_3 = require(\"@firebase/util\");\nvar EventRegistration_1 = require(\"../core/view/EventRegistration\");\nvar util_4 = require(\"@firebase/util\");\nvar __referenceConstructor;\n/**\n * A Query represents a filter to be applied to a firebase location. This object purely represents the\n * query expression (and exposes our public API to build the query). The actual query logic is in ViewBase.js.\n *\n * Since every Firebase reference is a query, Firebase inherits from this object.\n */\nvar Query = /** @class */ (function () {\n function Query(repo, path, queryParams_, orderByCalled_) {\n this.repo = repo;\n this.path = path;\n this.queryParams_ = queryParams_;\n this.orderByCalled_ = orderByCalled_;\n }\n Object.defineProperty(Query, \"__referenceConstructor\", {\n get: function () {\n util_1.assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n },\n set: function (val) {\n __referenceConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Validates start/end values for queries.\n * @param {!QueryParams} params\n * @private\n */\n Query.validateQueryEndpoints_ = function (params) {\n var startNode = null;\n var endNode = null;\n if (params.hasStart()) {\n startNode = params.getIndexStartValue();\n }\n if (params.hasEnd()) {\n endNode = params.getIndexEndValue();\n }\n if (params.getIndex() === KeyIndex_1.KEY_INDEX) {\n var tooManyArgsError = 'Query: When ordering by key, you may only pass one argument to ' +\n 'startAt(), endAt(), or equalTo().';\n var wrongArgTypeError = 'Query: When ordering by key, the argument passed to startAt(), endAt(),' +\n 'or equalTo() must be a string.';\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n if (startName != util_2.MIN_NAME) {\n throw new Error(tooManyArgsError);\n }\n else if (typeof startNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n if (endName != util_2.MAX_NAME) {\n throw new Error(tooManyArgsError);\n }\n else if (typeof endNode !== 'string') {\n throw new Error(wrongArgTypeError);\n }\n }\n }\n else if (params.getIndex() === PriorityIndex_1.PRIORITY_INDEX) {\n if ((startNode != null && !validation_1.isValidPriority(startNode)) ||\n (endNode != null && !validation_1.isValidPriority(endNode))) {\n throw new Error('Query: When ordering by priority, the first argument passed to startAt(), ' +\n 'endAt(), or equalTo() must be a valid priority value (null, a number, or a string).');\n }\n }\n else {\n util_1.assert(params.getIndex() instanceof PathIndex_1.PathIndex ||\n params.getIndex() === ValueIndex_1.VALUE_INDEX, 'unknown index type.');\n if ((startNode != null && typeof startNode === 'object') ||\n (endNode != null && typeof endNode === 'object')) {\n throw new Error('Query: First argument passed to startAt(), endAt(), or equalTo() cannot be ' +\n 'an object.');\n }\n }\n };\n /**\n * Validates that limit* has been called with the correct combination of parameters\n * @param {!QueryParams} params\n * @private\n */\n Query.validateLimit_ = function (params) {\n if (params.hasStart() &&\n params.hasEnd() &&\n params.hasLimit() &&\n !params.hasAnchoredLimit()) {\n throw new Error(\"Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.\");\n }\n };\n /**\n * Validates that no other order by call has been made\n * @param {!string} fnName\n * @private\n */\n Query.prototype.validateNoPreviousOrderByCall_ = function (fnName) {\n if (this.orderByCalled_ === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n };\n /**\n * @return {!QueryParams}\n */\n Query.prototype.getQueryParams = function () {\n return this.queryParams_;\n };\n /**\n * @return {!Reference}\n */\n Query.prototype.getRef = function () {\n util_3.validateArgCount('Query.ref', 0, 0, arguments.length);\n // This is a slight hack. We cannot goog.require('fb.api.Firebase'), since Firebase requires fb.api.Query.\n // However, we will always export 'Firebase' to the global namespace, so it's guaranteed to exist by the time this\n // method gets called.\n return new Query.__referenceConstructor(this.repo, this.path);\n };\n /**\n * @param {!string} eventType\n * @param {!function(DataSnapshot, string=)} callback\n * @param {(function(Error)|Object)=} cancelCallbackOrContext\n * @param {Object=} context\n * @return {!function(DataSnapshot, string=)}\n */\n Query.prototype.on = function (eventType, callback, cancelCallbackOrContext, context) {\n util_3.validateArgCount('Query.on', 2, 4, arguments.length);\n validation_1.validateEventType('Query.on', 1, eventType, false);\n util_3.validateCallback('Query.on', 2, callback, false);\n var ret = Query.getCancelAndContextArgs_('Query.on', cancelCallbackOrContext, context);\n if (eventType === 'value') {\n this.onValueEvent(callback, ret.cancel, ret.context);\n }\n else {\n var callbacks = {};\n callbacks[eventType] = callback;\n this.onChildEvent(callbacks, ret.cancel, ret.context);\n }\n return callback;\n };\n /**\n * @param {!function(!DataSnapshot)} callback\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n Query.prototype.onValueEvent = function (callback, cancelCallback, context) {\n var container = new EventRegistration_1.ValueEventRegistration(callback, cancelCallback || null, context || null);\n this.repo.addEventCallbackForQuery(this, container);\n };\n /**\n * @param {!Object.} callbacks\n * @param {?function(Error)} cancelCallback\n * @param {?Object} context\n * @protected\n */\n Query.prototype.onChildEvent = function (callbacks, cancelCallback, context) {\n var container = new EventRegistration_1.ChildEventRegistration(callbacks, cancelCallback, context);\n this.repo.addEventCallbackForQuery(this, container);\n };\n /**\n * @param {string=} eventType\n * @param {(function(!DataSnapshot, ?string=))=} callback\n * @param {Object=} context\n */\n Query.prototype.off = function (eventType, callback, context) {\n util_3.validateArgCount('Query.off', 0, 3, arguments.length);\n validation_1.validateEventType('Query.off', 1, eventType, true);\n util_3.validateCallback('Query.off', 2, callback, true);\n util_3.validateContextObject('Query.off', 3, context, true);\n var container = null;\n var callbacks = null;\n if (eventType === 'value') {\n var valueCallback = callback || null;\n container = new EventRegistration_1.ValueEventRegistration(valueCallback, null, context || null);\n }\n else if (eventType) {\n if (callback) {\n callbacks = {};\n callbacks[eventType] = callback;\n }\n container = new EventRegistration_1.ChildEventRegistration(callbacks, null, context || null);\n }\n this.repo.removeEventCallbackForQuery(this, container);\n };\n /**\n * Attaches a listener, waits for the first event, and then removes the listener\n * @param {!string} eventType\n * @param {!function(!DataSnapshot, string=)} userCallback\n * @param cancelOrContext\n * @param context\n * @return {!firebase.Promise}\n */\n Query.prototype.once = function (eventType, userCallback, cancelOrContext, context) {\n var _this = this;\n util_3.validateArgCount('Query.once', 1, 4, arguments.length);\n validation_1.validateEventType('Query.once', 1, eventType, false);\n util_3.validateCallback('Query.once', 2, userCallback, true);\n var ret = Query.getCancelAndContextArgs_('Query.once', cancelOrContext, context);\n // TODO: Implement this more efficiently (in particular, use 'get' wire protocol for 'value' event)\n // TODO: consider actually wiring the callbacks into the promise. We cannot do this without a breaking change\n // because the API currently expects callbacks will be called synchronously if the data is cached, but this is\n // against the Promise specification.\n var firstCall = true;\n var deferred = new util_4.Deferred();\n // A dummy error handler in case a user wasn't expecting promises\n deferred.promise.catch(function () { });\n var onceCallback = function (snapshot) {\n // NOTE: Even though we unsubscribe, we may get called multiple times if a single action (e.g. set() with JSON)\n // triggers multiple events (e.g. child_added or child_changed).\n if (firstCall) {\n firstCall = false;\n _this.off(eventType, onceCallback);\n if (userCallback) {\n userCallback.bind(ret.context)(snapshot);\n }\n deferred.resolve(snapshot);\n }\n };\n this.on(eventType, onceCallback, \n /*cancel=*/ function (err) {\n _this.off(eventType, onceCallback);\n if (ret.cancel)\n ret.cancel.bind(ret.context)(err);\n deferred.reject(err);\n });\n return deferred.promise;\n };\n /**\n * Set a limit and anchor it to the start of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n Query.prototype.limitToFirst = function (limit) {\n util_3.validateArgCount('Query.limitToFirst', 1, 1, arguments.length);\n if (typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0) {\n throw new Error('Query.limitToFirst: First argument must be a positive integer.');\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error('Query.limitToFirst: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).');\n }\n return new Query(this.repo, this.path, this.queryParams_.limitToFirst(limit), this.orderByCalled_);\n };\n /**\n * Set a limit and anchor it to the end of the window.\n * @param {!number} limit\n * @return {!Query}\n */\n Query.prototype.limitToLast = function (limit) {\n util_3.validateArgCount('Query.limitToLast', 1, 1, arguments.length);\n if (typeof limit !== 'number' ||\n Math.floor(limit) !== limit ||\n limit <= 0) {\n throw new Error('Query.limitToLast: First argument must be a positive integer.');\n }\n if (this.queryParams_.hasLimit()) {\n throw new Error('Query.limitToLast: Limit was already set (by another call to limit, ' +\n 'limitToFirst, or limitToLast).');\n }\n return new Query(this.repo, this.path, this.queryParams_.limitToLast(limit), this.orderByCalled_);\n };\n /**\n * Given a child path, return a new query ordered by the specified grandchild path.\n * @param {!string} path\n * @return {!Query}\n */\n Query.prototype.orderByChild = function (path) {\n util_3.validateArgCount('Query.orderByChild', 1, 1, arguments.length);\n if (path === '$key') {\n throw new Error('Query.orderByChild: \"$key\" is invalid. Use Query.orderByKey() instead.');\n }\n else if (path === '$priority') {\n throw new Error('Query.orderByChild: \"$priority\" is invalid. Use Query.orderByPriority() instead.');\n }\n else if (path === '$value') {\n throw new Error('Query.orderByChild: \"$value\" is invalid. Use Query.orderByValue() instead.');\n }\n validation_1.validatePathString('Query.orderByChild', 1, path, false);\n this.validateNoPreviousOrderByCall_('Query.orderByChild');\n var parsedPath = new Path_1.Path(path);\n if (parsedPath.isEmpty()) {\n throw new Error('Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.');\n }\n var index = new PathIndex_1.PathIndex(parsedPath);\n var newParams = this.queryParams_.orderBy(index);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the KeyIndex\n * @return {!Query}\n */\n Query.prototype.orderByKey = function () {\n util_3.validateArgCount('Query.orderByKey', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByKey');\n var newParams = this.queryParams_.orderBy(KeyIndex_1.KEY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the PriorityIndex\n * @return {!Query}\n */\n Query.prototype.orderByPriority = function () {\n util_3.validateArgCount('Query.orderByPriority', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByPriority');\n var newParams = this.queryParams_.orderBy(PriorityIndex_1.PRIORITY_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * Return a new query ordered by the ValueIndex\n * @return {!Query}\n */\n Query.prototype.orderByValue = function () {\n util_3.validateArgCount('Query.orderByValue', 0, 0, arguments.length);\n this.validateNoPreviousOrderByCall_('Query.orderByValue');\n var newParams = this.queryParams_.orderBy(ValueIndex_1.VALUE_INDEX);\n Query.validateQueryEndpoints_(newParams);\n return new Query(this.repo, this.path, newParams, /*orderByCalled=*/ true);\n };\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n Query.prototype.startAt = function (value, name) {\n if (value === void 0) { value = null; }\n util_3.validateArgCount('Query.startAt', 0, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.startAt', 1, value, this.path, true);\n validation_1.validateKey('Query.startAt', 2, name, true);\n var newParams = this.queryParams_.startAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasStart()) {\n throw new Error('Query.startAt: Starting point was already set (by another call to startAt ' +\n 'or equalTo).');\n }\n // Calling with no params tells us to start at the beginning.\n if (value === undefined) {\n value = null;\n name = null;\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n };\n /**\n * @param {number|string|boolean|null} value\n * @param {?string=} name\n * @return {!Query}\n */\n Query.prototype.endAt = function (value, name) {\n if (value === void 0) { value = null; }\n util_3.validateArgCount('Query.endAt', 0, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.endAt', 1, value, this.path, true);\n validation_1.validateKey('Query.endAt', 2, name, true);\n var newParams = this.queryParams_.endAt(value, name);\n Query.validateLimit_(newParams);\n Query.validateQueryEndpoints_(newParams);\n if (this.queryParams_.hasEnd()) {\n throw new Error('Query.endAt: Ending point was already set (by another call to endAt or ' +\n 'equalTo).');\n }\n return new Query(this.repo, this.path, newParams, this.orderByCalled_);\n };\n /**\n * Load the selection of children with exactly the specified value, and, optionally,\n * the specified name.\n * @param {number|string|boolean|null} value\n * @param {string=} name\n * @return {!Query}\n */\n Query.prototype.equalTo = function (value, name) {\n util_3.validateArgCount('Query.equalTo', 1, 2, arguments.length);\n validation_1.validateFirebaseDataArg('Query.equalTo', 1, value, this.path, false);\n validation_1.validateKey('Query.equalTo', 2, name, true);\n if (this.queryParams_.hasStart()) {\n throw new Error('Query.equalTo: Starting point was already set (by another call to startAt or ' +\n 'equalTo).');\n }\n if (this.queryParams_.hasEnd()) {\n throw new Error('Query.equalTo: Ending point was already set (by another call to endAt or ' +\n 'equalTo).');\n }\n return this.startAt(value, name).endAt(value, name);\n };\n /**\n * @return {!string} URL for this location.\n */\n Query.prototype.toString = function () {\n util_3.validateArgCount('Query.toString', 0, 0, arguments.length);\n return this.repo.toString() + this.path.toUrlEncodedString();\n };\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users.\n Query.prototype.toJSON = function () {\n // An optional spacer argument is unnecessary for a string.\n util_3.validateArgCount('Query.toJSON', 0, 1, arguments.length);\n return this.toString();\n };\n /**\n * An object representation of the query parameters used by this Query.\n * @return {!Object}\n */\n Query.prototype.queryObject = function () {\n return this.queryParams_.getQueryObject();\n };\n /**\n * @return {!string}\n */\n Query.prototype.queryIdentifier = function () {\n var obj = this.queryObject();\n var id = util_2.ObjectToUniqueKey(obj);\n return id === '{}' ? 'default' : id;\n };\n /**\n * Return true if this query and the provided query are equivalent; otherwise, return false.\n * @param {Query} other\n * @return {boolean}\n */\n Query.prototype.isEqual = function (other) {\n util_3.validateArgCount('Query.isEqual', 1, 1, arguments.length);\n if (!(other instanceof Query)) {\n var error = 'Query.isEqual failed: First argument must be an instance of firebase.database.Query.';\n throw new Error(error);\n }\n var sameRepo = this.repo === other.repo;\n var samePath = this.path.equals(other.path);\n var sameQueryIdentifier = this.queryIdentifier() === other.queryIdentifier();\n return sameRepo && samePath && sameQueryIdentifier;\n };\n /**\n * Helper used by .on and .once to extract the context and or cancel arguments.\n * @param {!string} fnName The function name (on or once)\n * @param {(function(Error)|Object)=} cancelOrContext\n * @param {Object=} context\n * @return {{cancel: ?function(Error), context: ?Object}}\n * @private\n */\n Query.getCancelAndContextArgs_ = function (fnName, cancelOrContext, context) {\n var ret = { cancel: null, context: null };\n if (cancelOrContext && context) {\n ret.cancel = cancelOrContext;\n util_3.validateCallback(fnName, 3, ret.cancel, true);\n ret.context = context;\n util_3.validateContextObject(fnName, 4, ret.context, true);\n }\n else if (cancelOrContext) {\n // we have either a cancel callback or a context.\n if (typeof cancelOrContext === 'object' && cancelOrContext !== null) {\n // it's a context!\n ret.context = cancelOrContext;\n }\n else if (typeof cancelOrContext === 'function') {\n ret.cancel = cancelOrContext;\n }\n else {\n throw new Error(util_3.errorPrefix(fnName, 3, true) +\n ' must either be a cancel callback or a context object.');\n }\n }\n return ret;\n };\n Object.defineProperty(Query.prototype, \"ref\", {\n get: function () {\n return this.getRef();\n },\n enumerable: true,\n configurable: true\n });\n return Query;\n}());\nexports.Query = Query;\n\n//# sourceMappingURL=Query.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/Query.js\n// module id = 36\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar util_3 = require(\"@firebase/util\");\nvar MAX_NODE;\nfunction setMaxNode(val) {\n MAX_NODE = val;\n}\nexports.setMaxNode = setMaxNode;\n/**\n * @param {(!string|!number)} priority\n * @return {!string}\n */\nexports.priorityHashText = function (priority) {\n if (typeof priority === 'number')\n return 'number:' + util_2.doubleToIEEE754String(priority);\n else\n return 'string:' + priority;\n};\n/**\n * Validates that a priority snapshot Node is valid.\n *\n * @param {!Node} priorityNode\n */\nexports.validatePriorityNode = function (priorityNode) {\n if (priorityNode.isLeafNode()) {\n var val = priorityNode.val();\n util_1.assert(typeof val === 'string' ||\n typeof val === 'number' ||\n (typeof val === 'object' && util_3.contains(val, '.sv')), 'Priority must be a string or number.');\n }\n else {\n util_1.assert(priorityNode === MAX_NODE || priorityNode.isEmpty(), 'priority of unexpected type.');\n }\n // Don't call getPriority() on MAX_NODE to avoid hitting assertion.\n util_1.assert(priorityNode === MAX_NODE || priorityNode.getPriority().isEmpty(), \"Priority nodes can't have a priority of their own.\");\n};\n\n//# sourceMappingURL=snap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/snap.js\n// module id = 37\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Index_1 = require(\"./Index\");\nvar Node_1 = require(\"../Node\");\nvar util_1 = require(\"../../util/util\");\nvar nodeFromJSON_1 = require(\"../nodeFromJSON\");\n/**\n * @constructor\n * @extends {Index}\n * @private\n */\nvar ValueIndex = /** @class */ (function (_super) {\n __extends(ValueIndex, _super);\n function ValueIndex() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.compare = function (a, b) {\n var indexCmp = a.node.compareTo(b.node);\n if (indexCmp === 0) {\n return util_1.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.isDefinedOn = function (node) {\n return true;\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.indexedValueChanged = function (oldNode, newNode) {\n return !oldNode.equals(newNode);\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.minPost = function () {\n return Node_1.NamedNode.MIN;\n };\n /**\n * @inheritDoc\n */\n ValueIndex.prototype.maxPost = function () {\n return Node_1.NamedNode.MAX;\n };\n /**\n * @param {*} indexValue\n * @param {string} name\n * @return {!NamedNode}\n */\n ValueIndex.prototype.makePost = function (indexValue, name) {\n var valueNode = nodeFromJSON_1.nodeFromJSON(indexValue);\n return new Node_1.NamedNode(name, valueNode);\n };\n /**\n * @return {!string} String representation for inclusion in a query spec\n */\n ValueIndex.prototype.toString = function () {\n return '.value';\n };\n return ValueIndex;\n}(Index_1.Index));\nexports.ValueIndex = ValueIndex;\nexports.VALUE_INDEX = new ValueIndex();\n\n//# sourceMappingURL=ValueIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/ValueIndex.js\n// module id = 38\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar childSet_1 = require(\"./childSet\");\nvar util_2 = require(\"@firebase/util\");\nvar Node_1 = require(\"./Node\");\nvar PriorityIndex_1 = require(\"./indexes/PriorityIndex\");\nvar KeyIndex_1 = require(\"./indexes/KeyIndex\");\nvar _defaultIndexMap;\nvar fallbackObject = {};\n/**\n *\n * @param {Object.>} indexes\n * @param {Object.} indexSet\n * @constructor\n */\nvar IndexMap = /** @class */ (function () {\n function IndexMap(indexes_, indexSet_) {\n this.indexes_ = indexes_;\n this.indexSet_ = indexSet_;\n }\n Object.defineProperty(IndexMap, \"Default\", {\n /**\n * The default IndexMap for nodes without a priority\n * @type {!IndexMap}\n * @const\n */\n get: function () {\n util_1.assert(fallbackObject && PriorityIndex_1.PRIORITY_INDEX, 'ChildrenNode.ts has not been loaded');\n _defaultIndexMap =\n _defaultIndexMap ||\n new IndexMap({ '.priority': fallbackObject }, { '.priority': PriorityIndex_1.PRIORITY_INDEX });\n return _defaultIndexMap;\n },\n enumerable: true,\n configurable: true\n });\n /**\n *\n * @param {!string} indexKey\n * @return {?SortedMap.}\n */\n IndexMap.prototype.get = function (indexKey) {\n var sortedMap = util_2.safeGet(this.indexes_, indexKey);\n if (!sortedMap)\n throw new Error('No index defined for ' + indexKey);\n if (sortedMap === fallbackObject) {\n // The index exists, but it falls back to just name comparison. Return null so that the calling code uses the\n // regular child map\n return null;\n }\n else {\n return sortedMap;\n }\n };\n /**\n * @param {!Index} indexDefinition\n * @return {boolean}\n */\n IndexMap.prototype.hasIndex = function (indexDefinition) {\n return util_2.contains(this.indexSet_, indexDefinition.toString());\n };\n /**\n * @param {!Index} indexDefinition\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.addIndex = function (indexDefinition, existingChildren) {\n util_1.assert(indexDefinition !== KeyIndex_1.KEY_INDEX, \"KeyIndex always exists and isn't meant to be added to the IndexMap.\");\n var childList = [];\n var sawIndexedValue = false;\n var iter = existingChildren.getIterator(Node_1.NamedNode.Wrap);\n var next = iter.getNext();\n while (next) {\n sawIndexedValue =\n sawIndexedValue || indexDefinition.isDefinedOn(next.node);\n childList.push(next);\n next = iter.getNext();\n }\n var newIndex;\n if (sawIndexedValue) {\n newIndex = childSet_1.buildChildSet(childList, indexDefinition.getCompare());\n }\n else {\n newIndex = fallbackObject;\n }\n var indexName = indexDefinition.toString();\n var newIndexSet = util_2.clone(this.indexSet_);\n newIndexSet[indexName] = indexDefinition;\n var newIndexes = util_2.clone(this.indexes_);\n newIndexes[indexName] = newIndex;\n return new IndexMap(newIndexes, newIndexSet);\n };\n /**\n * Ensure that this node is properly tracked in any indexes that we're maintaining\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.addToIndexes = function (namedNode, existingChildren) {\n var _this = this;\n var newIndexes = util_2.map(this.indexes_, function (indexedChildren, indexName) {\n var index = util_2.safeGet(_this.indexSet_, indexName);\n util_1.assert(index, 'Missing index implementation for ' + indexName);\n if (indexedChildren === fallbackObject) {\n // Check to see if we need to index everything\n if (index.isDefinedOn(namedNode.node)) {\n // We need to build this index\n var childList = [];\n var iter = existingChildren.getIterator(Node_1.NamedNode.Wrap);\n var next = iter.getNext();\n while (next) {\n if (next.name != namedNode.name) {\n childList.push(next);\n }\n next = iter.getNext();\n }\n childList.push(namedNode);\n return childSet_1.buildChildSet(childList, index.getCompare());\n }\n else {\n // No change, this remains a fallback\n return fallbackObject;\n }\n }\n else {\n var existingSnap = existingChildren.get(namedNode.name);\n var newChildren = indexedChildren;\n if (existingSnap) {\n newChildren = newChildren.remove(new Node_1.NamedNode(namedNode.name, existingSnap));\n }\n return newChildren.insert(namedNode, namedNode.node);\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n };\n /**\n * Create a new IndexMap instance with the given value removed\n * @param {!NamedNode} namedNode\n * @param {!SortedMap.} existingChildren\n * @return {!IndexMap}\n */\n IndexMap.prototype.removeFromIndexes = function (namedNode, existingChildren) {\n var newIndexes = util_2.map(this.indexes_, function (indexedChildren) {\n if (indexedChildren === fallbackObject) {\n // This is the fallback. Just return it, nothing to do in this case\n return indexedChildren;\n }\n else {\n var existingSnap = existingChildren.get(namedNode.name);\n if (existingSnap) {\n return indexedChildren.remove(new Node_1.NamedNode(namedNode.name, existingSnap));\n }\n else {\n // No record of this child\n return indexedChildren;\n }\n }\n });\n return new IndexMap(newIndexes, this.indexSet_);\n };\n return IndexMap;\n}());\nexports.IndexMap = IndexMap;\n\n//# sourceMappingURL=IndexMap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/IndexMap.js\n// module id = 39\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SortedMap_1 = require(\"../util/SortedMap\");\nvar SortedMap_2 = require(\"../util/SortedMap\");\nvar LOG_2 = Math.log(2);\n/**\n * @constructor\n */\nvar Base12Num = /** @class */ (function () {\n /**\n * @param {number} length\n */\n function Base12Num(length) {\n var logBase2 = function (num) {\n return parseInt((Math.log(num) / LOG_2), 10);\n };\n var bitMask = function (bits) { return parseInt(Array(bits + 1).join('1'), 2); };\n this.count = logBase2(length + 1);\n this.current_ = this.count - 1;\n var mask = bitMask(this.count);\n this.bits_ = (length + 1) & mask;\n }\n /**\n * @return {boolean}\n */\n Base12Num.prototype.nextBitIsOne = function () {\n //noinspection JSBitwiseOperatorUsage\n var result = !(this.bits_ & (0x1 << this.current_));\n this.current_--;\n return result;\n };\n return Base12Num;\n}());\n/**\n * Takes a list of child nodes and constructs a SortedSet using the given comparison\n * function\n *\n * Uses the algorithm described in the paper linked here:\n * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.1458\n *\n * @template K, V\n * @param {Array.} childList Unsorted list of children\n * @param {function(!NamedNode, !NamedNode):number} cmp The comparison method to be used\n * @param {(function(NamedNode):K)=} keyFn An optional function to extract K from a node wrapper, if K's\n * type is not NamedNode\n * @param {(function(K, K):number)=} mapSortFn An optional override for comparator used by the generated sorted map\n * @return {SortedMap.}\n */\nexports.buildChildSet = function (childList, cmp, keyFn, mapSortFn) {\n childList.sort(cmp);\n var buildBalancedTree = function (low, high) {\n var length = high - low;\n var namedNode;\n var key;\n if (length == 0) {\n return null;\n }\n else if (length == 1) {\n namedNode = childList[low];\n key = keyFn ? keyFn(namedNode) : namedNode;\n return new SortedMap_1.LLRBNode(key, namedNode.node, SortedMap_1.LLRBNode.BLACK, null, null);\n }\n else {\n var middle = parseInt((length / 2), 10) + low;\n var left = buildBalancedTree(low, middle);\n var right = buildBalancedTree(middle + 1, high);\n namedNode = childList[middle];\n key = keyFn ? keyFn(namedNode) : namedNode;\n return new SortedMap_1.LLRBNode(key, namedNode.node, SortedMap_1.LLRBNode.BLACK, left, right);\n }\n };\n var buildFrom12Array = function (base12) {\n var node = null;\n var root = null;\n var index = childList.length;\n var buildPennant = function (chunkSize, color) {\n var low = index - chunkSize;\n var high = index;\n index -= chunkSize;\n var childTree = buildBalancedTree(low + 1, high);\n var namedNode = childList[low];\n var key = keyFn ? keyFn(namedNode) : namedNode;\n attachPennant(new SortedMap_1.LLRBNode(key, namedNode.node, color, null, childTree));\n };\n var attachPennant = function (pennant) {\n if (node) {\n node.left = pennant;\n node = pennant;\n }\n else {\n root = pennant;\n node = pennant;\n }\n };\n for (var i = 0; i < base12.count; ++i) {\n var isOne = base12.nextBitIsOne();\n // The number of nodes taken in each slice is 2^(arr.length - (i + 1))\n var chunkSize = Math.pow(2, base12.count - (i + 1));\n if (isOne) {\n buildPennant(chunkSize, SortedMap_1.LLRBNode.BLACK);\n }\n else {\n // current == 2\n buildPennant(chunkSize, SortedMap_1.LLRBNode.BLACK);\n buildPennant(chunkSize, SortedMap_1.LLRBNode.RED);\n }\n }\n return root;\n };\n var base12 = new Base12Num(childList.length);\n var root = buildFrom12Array(base12);\n return new SortedMap_2.SortedMap(mapSortFn || cmp, root);\n};\n\n//# sourceMappingURL=childSet.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/childSet.js\n// module id = 40\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util/util\");\nfunction NAME_ONLY_COMPARATOR(left, right) {\n return util_1.nameCompare(left.name, right.name);\n}\nexports.NAME_ONLY_COMPARATOR = NAME_ONLY_COMPARATOR;\nfunction NAME_COMPARATOR(left, right) {\n return util_1.nameCompare(left, right);\n}\nexports.NAME_COMPARATOR = NAME_COMPARATOR;\n\n//# sourceMappingURL=comparators.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/comparators.js\n// module id = 41\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../../util/util\");\nvar Index_1 = require(\"./Index\");\nvar ChildrenNode_1 = require(\"../ChildrenNode\");\nvar Node_1 = require(\"../Node\");\nvar nodeFromJSON_1 = require(\"../nodeFromJSON\");\n/**\n * @param {!Path} indexPath\n * @constructor\n * @extends {Index}\n */\nvar PathIndex = /** @class */ (function (_super) {\n __extends(PathIndex, _super);\n function PathIndex(indexPath_) {\n var _this = _super.call(this) || this;\n _this.indexPath_ = indexPath_;\n util_1.assert(!indexPath_.isEmpty() && indexPath_.getFront() !== '.priority', \"Can't create PathIndex with empty path or .priority key\");\n return _this;\n }\n /**\n * @param {!Node} snap\n * @return {!Node}\n * @protected\n */\n PathIndex.prototype.extractChild = function (snap) {\n return snap.getChild(this.indexPath_);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.isDefinedOn = function (node) {\n return !node.getChild(this.indexPath_).isEmpty();\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.compare = function (a, b) {\n var aChild = this.extractChild(a.node);\n var bChild = this.extractChild(b.node);\n var indexCmp = aChild.compareTo(bChild);\n if (indexCmp === 0) {\n return util_2.nameCompare(a.name, b.name);\n }\n else {\n return indexCmp;\n }\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.makePost = function (indexValue, name) {\n var valueNode = nodeFromJSON_1.nodeFromJSON(indexValue);\n var node = ChildrenNode_1.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, valueNode);\n return new Node_1.NamedNode(name, node);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.maxPost = function () {\n var node = ChildrenNode_1.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_, ChildrenNode_1.MAX_NODE);\n return new Node_1.NamedNode(util_2.MAX_NAME, node);\n };\n /**\n * @inheritDoc\n */\n PathIndex.prototype.toString = function () {\n return this.indexPath_.slice().join('/');\n };\n return PathIndex;\n}(Index_1.Index));\nexports.PathIndex = PathIndex;\n\n//# sourceMappingURL=PathIndex.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/snap/indexes/PathIndex.js\n// module id = 42\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Path_1 = require(\"./Path\");\nvar SparseSnapshotTree_1 = require(\"../SparseSnapshotTree\");\nvar LeafNode_1 = require(\"../snap/LeafNode\");\nvar nodeFromJSON_1 = require(\"../snap/nodeFromJSON\");\nvar PriorityIndex_1 = require(\"../snap/indexes/PriorityIndex\");\n/**\n * Generate placeholders for deferred values.\n * @param {?Object} values\n * @return {!Object}\n */\nexports.generateWithValues = function (values) {\n values = values || {};\n values['timestamp'] = values['timestamp'] || new Date().getTime();\n return values;\n};\n/**\n * Value to use when firing local events. When writing server values, fire\n * local events with an approximate value, otherwise return value as-is.\n * @param {(Object|string|number|boolean)} value\n * @param {!Object} serverValues\n * @return {!(string|number|boolean)}\n */\nexports.resolveDeferredValue = function (value, serverValues) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n else {\n util_1.assert('.sv' in value, 'Unexpected leaf node or priority contents');\n return serverValues[value['.sv']];\n }\n};\n/**\n * Recursively replace all deferred values and priorities in the tree with the\n * specified generated replacement values.\n * @param {!SparseSnapshotTree} tree\n * @param {!Object} serverValues\n * @return {!SparseSnapshotTree}\n */\nexports.resolveDeferredValueTree = function (tree, serverValues) {\n var resolvedTree = new SparseSnapshotTree_1.SparseSnapshotTree();\n tree.forEachTree(new Path_1.Path(''), function (path, node) {\n resolvedTree.remember(path, exports.resolveDeferredValueSnapshot(node, serverValues));\n });\n return resolvedTree;\n};\n/**\n * Recursively replace all deferred values and priorities in the node with the\n * specified generated replacement values. If there are no server values in the node,\n * it'll be returned as-is.\n * @param {!Node} node\n * @param {!Object} serverValues\n * @return {!Node}\n */\nexports.resolveDeferredValueSnapshot = function (node, serverValues) {\n var rawPri = node.getPriority().val();\n var priority = exports.resolveDeferredValue(rawPri, serverValues);\n var newNode;\n if (node.isLeafNode()) {\n var leafNode = node;\n var value = exports.resolveDeferredValue(leafNode.getValue(), serverValues);\n if (value !== leafNode.getValue() ||\n priority !== leafNode.getPriority().val()) {\n return new LeafNode_1.LeafNode(value, nodeFromJSON_1.nodeFromJSON(priority));\n }\n else {\n return node;\n }\n }\n else {\n var childrenNode = node;\n newNode = childrenNode;\n if (priority !== childrenNode.getPriority().val()) {\n newNode = newNode.updatePriority(new LeafNode_1.LeafNode(priority));\n }\n childrenNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var newChildNode = exports.resolveDeferredValueSnapshot(childNode, serverValues);\n if (newChildNode !== childNode) {\n newNode = newNode.updateImmediateChild(childName, newChildNode);\n }\n });\n return newNode;\n }\n};\n\n//# sourceMappingURL=ServerValues.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/ServerValues.js\n// module id = 43\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"./util/Path\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar CountedSet_1 = require(\"./util/CountedSet\");\n/**\n * Helper class to store a sparse set of snapshots.\n *\n * @constructor\n */\nvar SparseSnapshotTree = /** @class */ (function () {\n function SparseSnapshotTree() {\n /**\n * @private\n * @type {Node}\n */\n this.value_ = null;\n /**\n * @private\n * @type {CountedSet}\n */\n this.children_ = null;\n }\n /**\n * Gets the node stored at the given path if one exists.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {?Node} The retrieved node, or null.\n */\n SparseSnapshotTree.prototype.find = function (path) {\n if (this.value_ != null) {\n return this.value_.getChild(path);\n }\n else if (!path.isEmpty() && this.children_ != null) {\n var childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n var childTree = this.children_.get(childKey);\n return childTree.find(path);\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n };\n /**\n * Stores the given node at the specified path. If there is already a node\n * at a shallower path, it merges the new data into that snapshot node.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @param {!Node} data The new data, or null.\n */\n SparseSnapshotTree.prototype.remember = function (path, data) {\n if (path.isEmpty()) {\n this.value_ = data;\n this.children_ = null;\n }\n else if (this.value_ !== null) {\n this.value_ = this.value_.updateChild(path, data);\n }\n else {\n if (this.children_ == null) {\n this.children_ = new CountedSet_1.CountedSet();\n }\n var childKey = path.getFront();\n if (!this.children_.contains(childKey)) {\n this.children_.add(childKey, new SparseSnapshotTree());\n }\n var child = this.children_.get(childKey);\n path = path.popFront();\n child.remember(path, data);\n }\n };\n /**\n * Purge the data at path from the cache.\n *\n * @param {!Path} path Path to look up snapshot for.\n * @return {boolean} True if this node should now be removed.\n */\n SparseSnapshotTree.prototype.forget = function (path) {\n if (path.isEmpty()) {\n this.value_ = null;\n this.children_ = null;\n return true;\n }\n else {\n if (this.value_ !== null) {\n if (this.value_.isLeafNode()) {\n // We're trying to forget a node that doesn't exist\n return false;\n }\n else {\n var value = this.value_;\n this.value_ = null;\n var self_1 = this;\n value.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, tree) {\n self_1.remember(new Path_1.Path(key), tree);\n });\n return this.forget(path);\n }\n }\n else if (this.children_ !== null) {\n var childKey = path.getFront();\n path = path.popFront();\n if (this.children_.contains(childKey)) {\n var safeToRemove = this.children_.get(childKey).forget(path);\n if (safeToRemove) {\n this.children_.remove(childKey);\n }\n }\n if (this.children_.isEmpty()) {\n this.children_ = null;\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }\n };\n /**\n * Recursively iterates through all of the stored tree and calls the\n * callback on each one.\n *\n * @param {!Path} prefixPath Path to look up node for.\n * @param {!Function} func The function to invoke for each tree.\n */\n SparseSnapshotTree.prototype.forEachTree = function (prefixPath, func) {\n if (this.value_ !== null) {\n func(prefixPath, this.value_);\n }\n else {\n this.forEachChild(function (key, tree) {\n var path = new Path_1.Path(prefixPath.toString() + '/' + key);\n tree.forEachTree(path, func);\n });\n }\n };\n /**\n * Iterates through each immediate child and triggers the callback.\n *\n * @param {!Function} func The function to invoke for each child.\n */\n SparseSnapshotTree.prototype.forEachChild = function (func) {\n if (this.children_ !== null) {\n this.children_.each(function (key, tree) {\n func(key, tree);\n });\n }\n };\n return SparseSnapshotTree;\n}());\nexports.SparseSnapshotTree = SparseSnapshotTree;\n\n//# sourceMappingURL=SparseSnapshotTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SparseSnapshotTree.js\n// module id = 44\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Implements a set with a count of elements.\n *\n * @template K, V\n */\nvar CountedSet = /** @class */ (function () {\n function CountedSet() {\n this.set = {};\n }\n /**\n * @param {!K} item\n * @param {V} val\n */\n CountedSet.prototype.add = function (item, val) {\n this.set[item] = val !== null ? val : true;\n };\n /**\n * @param {!K} key\n * @return {boolean}\n */\n CountedSet.prototype.contains = function (key) {\n return util_1.contains(this.set, key);\n };\n /**\n * @param {!K} item\n * @return {V}\n */\n CountedSet.prototype.get = function (item) {\n return this.contains(item) ? this.set[item] : undefined;\n };\n /**\n * @param {!K} item\n */\n CountedSet.prototype.remove = function (item) {\n delete this.set[item];\n };\n /**\n * Deletes everything in the set\n */\n CountedSet.prototype.clear = function () {\n this.set = {};\n };\n /**\n * True if there's nothing in the set\n * @return {boolean}\n */\n CountedSet.prototype.isEmpty = function () {\n return util_1.isEmpty(this.set);\n };\n /**\n * @return {number} The number of items in the set\n */\n CountedSet.prototype.count = function () {\n return util_1.getCount(this.set);\n };\n /**\n * Run a function on each k,v pair in the set\n * @param {function(K, V)} fn\n */\n CountedSet.prototype.each = function (fn) {\n util_1.forEach(this.set, function (k, v) { return fn(k, v); });\n };\n /**\n * Mostly for debugging\n * @return {Array.} The keys present in this CountedSet\n */\n CountedSet.prototype.keys = function () {\n var keys = [];\n util_1.forEach(this.set, function (k) {\n keys.push(k);\n });\n return keys;\n };\n return CountedSet;\n}());\nexports.CountedSet = CountedSet;\n\n//# sourceMappingURL=CountedSet.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/CountedSet.js\n// module id = 45\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = require(\"./Operation\");\nvar Path_1 = require(\"../util/Path\");\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!Node} snap\n * @constructor\n * @implements {Operation}\n */\nvar Overwrite = /** @class */ (function () {\n function Overwrite(source, path, snap) {\n this.source = source;\n this.path = path;\n this.snap = snap;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.OVERWRITE;\n }\n Overwrite.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new Overwrite(this.source, Path_1.Path.Empty, this.snap.getImmediateChild(childName));\n }\n else {\n return new Overwrite(this.source, this.path.popFront(), this.snap);\n }\n };\n return Overwrite;\n}());\nexports.Overwrite = Overwrite;\n\n//# sourceMappingURL=Overwrite.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/Overwrite.js\n// module id = 46\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = require(\"./view/CacheNode\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar ViewCache_1 = require(\"./view/ViewCache\");\nvar View_1 = require(\"./view/View\");\nvar __referenceConstructor;\n/**\n * SyncPoint represents a single location in a SyncTree with 1 or more event registrations, meaning we need to\n * maintain 1 or more Views at this location to cache server data and raise appropriate events for server changes\n * and user writes (set, transaction, update).\n *\n * It's responsible for:\n * - Maintaining the set of 1 or more views necessary at this location (a SyncPoint with 0 views should be removed).\n * - Proxying user / server operations to the views as appropriate (i.e. applyServerOverwrite,\n * applyUserOverwrite, etc.)\n */\nvar SyncPoint = /** @class */ (function () {\n function SyncPoint() {\n /**\n * The Views being tracked at this location in the tree, stored as a map where the key is a\n * queryId and the value is the View for that query.\n *\n * NOTE: This list will be quite small (usually 1, but perhaps 2 or 3; any more is an odd use case).\n *\n * @type {!Object.}\n * @private\n */\n this.views_ = {};\n }\n Object.defineProperty(SyncPoint, \"__referenceConstructor\", {\n get: function () {\n util_1.assert(__referenceConstructor, 'Reference.ts has not been loaded');\n return __referenceConstructor;\n },\n set: function (val) {\n util_1.assert(!__referenceConstructor, '__referenceConstructor has already been defined');\n __referenceConstructor = val;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {boolean}\n */\n SyncPoint.prototype.isEmpty = function () {\n return util_2.isEmpty(this.views_);\n };\n /**\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} optCompleteServerCache\n * @return {!Array.}\n */\n SyncPoint.prototype.applyOperation = function (operation, writesCache, optCompleteServerCache) {\n var queryId = operation.source.queryId;\n if (queryId !== null) {\n var view = util_2.safeGet(this.views_, queryId);\n util_1.assert(view != null, 'SyncTree gave us an op for an invalid query.');\n return view.applyOperation(operation, writesCache, optCompleteServerCache);\n }\n else {\n var events_1 = [];\n util_2.forEach(this.views_, function (key, view) {\n events_1 = events_1.concat(view.applyOperation(operation, writesCache, optCompleteServerCache));\n });\n return events_1;\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache Complete server cache, if we have it.\n * @param {boolean} serverCacheComplete\n * @return {!Array.} Events to raise.\n */\n SyncPoint.prototype.addEventRegistration = function (query, eventRegistration, writesCache, serverCache, serverCacheComplete) {\n var queryId = query.queryIdentifier();\n var view = util_2.safeGet(this.views_, queryId);\n if (!view) {\n // TODO: make writesCache take flag for complete server node\n var eventCache = writesCache.calcCompleteEventCache(serverCacheComplete ? serverCache : null);\n var eventCacheComplete = false;\n if (eventCache) {\n eventCacheComplete = true;\n }\n else if (serverCache instanceof ChildrenNode_1.ChildrenNode) {\n eventCache = writesCache.calcCompleteEventChildren(serverCache);\n eventCacheComplete = false;\n }\n else {\n eventCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n eventCacheComplete = false;\n }\n var viewCache = new ViewCache_1.ViewCache(new CacheNode_1.CacheNode(\n /** @type {!Node} */ (eventCache), eventCacheComplete, false), new CacheNode_1.CacheNode(\n /** @type {!Node} */ (serverCache), serverCacheComplete, false));\n view = new View_1.View(query, viewCache);\n this.views_[queryId] = view;\n }\n // This is guaranteed to exist now, we just created anything that was missing\n view.addEventRegistration(eventRegistration);\n return view.getInitialEvents(eventRegistration);\n };\n /**\n * Remove event callback(s). Return cancelEvents if a cancelError is specified.\n *\n * If query is the default query, we'll check all views for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified view(s).\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {{removed:!Array., events:!Array.}} removed queries and any cancel events\n */\n SyncPoint.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var queryId = query.queryIdentifier();\n var removed = [];\n var cancelEvents = [];\n var hadCompleteView = this.hasCompleteView();\n if (queryId === 'default') {\n // When you do ref.off(...), we search all views for the registration to remove.\n var self_1 = this;\n util_2.forEach(this.views_, function (viewQueryId, view) {\n cancelEvents = cancelEvents.concat(view.removeEventRegistration(eventRegistration, cancelError));\n if (view.isEmpty()) {\n delete self_1.views_[viewQueryId];\n // We'll deal with complete views later.\n if (!view\n .getQuery()\n .getQueryParams()\n .loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n });\n }\n else {\n // remove the callback from the specific view.\n var view = util_2.safeGet(this.views_, queryId);\n if (view) {\n cancelEvents = cancelEvents.concat(view.removeEventRegistration(eventRegistration, cancelError));\n if (view.isEmpty()) {\n delete this.views_[queryId];\n // We'll deal with complete views later.\n if (!view\n .getQuery()\n .getQueryParams()\n .loadsAllData()) {\n removed.push(view.getQuery());\n }\n }\n }\n }\n if (hadCompleteView && !this.hasCompleteView()) {\n // We removed our last complete view.\n removed.push(new SyncPoint.__referenceConstructor(query.repo, query.path));\n }\n return { removed: removed, events: cancelEvents };\n };\n /**\n * @return {!Array.}\n */\n SyncPoint.prototype.getQueryViews = function () {\n var _this = this;\n var values = Object.keys(this.views_).map(function (key) { return _this.views_[key]; });\n return values.filter(function (view) {\n return !view\n .getQuery()\n .getQueryParams()\n .loadsAllData();\n });\n };\n /**\n *\n * @param {!Path} path The path to the desired complete snapshot\n * @return {?Node} A complete cache, if it exists\n */\n SyncPoint.prototype.getCompleteServerCache = function (path) {\n var serverCache = null;\n util_2.forEach(this.views_, function (key, view) {\n serverCache = serverCache || view.getCompleteServerCache(path);\n });\n return serverCache;\n };\n /**\n * @param {!Query} query\n * @return {?View}\n */\n SyncPoint.prototype.viewForQuery = function (query) {\n var params = query.getQueryParams();\n if (params.loadsAllData()) {\n return this.getCompleteView();\n }\n else {\n var queryId = query.queryIdentifier();\n return util_2.safeGet(this.views_, queryId);\n }\n };\n /**\n * @param {!Query} query\n * @return {boolean}\n */\n SyncPoint.prototype.viewExistsForQuery = function (query) {\n return this.viewForQuery(query) != null;\n };\n /**\n * @return {boolean}\n */\n SyncPoint.prototype.hasCompleteView = function () {\n return this.getCompleteView() != null;\n };\n /**\n * @return {?View}\n */\n SyncPoint.prototype.getCompleteView = function () {\n var completeView = util_2.findValue(this.views_, function (view) {\n return view\n .getQuery()\n .getQueryParams()\n .loadsAllData();\n });\n return completeView || null;\n };\n return SyncPoint;\n}());\nexports.SyncPoint = SyncPoint;\n\n//# sourceMappingURL=SyncPoint.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SyncPoint.js\n// module id = 47\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = require(\"../snap/ChildrenNode\");\nvar CacheNode_1 = require(\"./CacheNode\");\n/**\n * Stores the data we have cached for a view.\n *\n * serverSnap is the cached server data, eventSnap is the cached event data (server data plus any local writes).\n *\n * @constructor\n */\nvar ViewCache = /** @class */ (function () {\n /**\n *\n * @param {!CacheNode} eventCache_\n * @param {!CacheNode} serverCache_\n */\n function ViewCache(eventCache_, serverCache_) {\n this.eventCache_ = eventCache_;\n this.serverCache_ = serverCache_;\n }\n /**\n * @param {!Node} eventSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n ViewCache.prototype.updateEventSnap = function (eventSnap, complete, filtered) {\n return new ViewCache(new CacheNode_1.CacheNode(eventSnap, complete, filtered), this.serverCache_);\n };\n /**\n * @param {!Node} serverSnap\n * @param {boolean} complete\n * @param {boolean} filtered\n * @return {!ViewCache}\n */\n ViewCache.prototype.updateServerSnap = function (serverSnap, complete, filtered) {\n return new ViewCache(this.eventCache_, new CacheNode_1.CacheNode(serverSnap, complete, filtered));\n };\n /**\n * @return {!CacheNode}\n */\n ViewCache.prototype.getEventCache = function () {\n return this.eventCache_;\n };\n /**\n * @return {?Node}\n */\n ViewCache.prototype.getCompleteEventSnap = function () {\n return this.eventCache_.isFullyInitialized()\n ? this.eventCache_.getNode()\n : null;\n };\n /**\n * @return {!CacheNode}\n */\n ViewCache.prototype.getServerCache = function () {\n return this.serverCache_;\n };\n /**\n * @return {?Node}\n */\n ViewCache.prototype.getCompleteServerSnap = function () {\n return this.serverCache_.isFullyInitialized()\n ? this.serverCache_.getNode()\n : null;\n };\n /**\n * @const\n * @type {ViewCache}\n */\n ViewCache.Empty = new ViewCache(new CacheNode_1.CacheNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, \n /*fullyInitialized=*/ false, \n /*filtered=*/ false), new CacheNode_1.CacheNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, \n /*fullyInitialized=*/ false, \n /*filtered=*/ false));\n return ViewCache;\n}());\nexports.ViewCache = ViewCache;\n\n//# sourceMappingURL=ViewCache.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/ViewCache.js\n// module id = 48\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Returns the delta from the previous call to get stats.\n *\n * @param collection_ The collection to \"listen\" to.\n * @constructor\n */\nvar StatsListener = /** @class */ (function () {\n function StatsListener(collection_) {\n this.collection_ = collection_;\n this.last_ = null;\n }\n StatsListener.prototype.get = function () {\n var newStats = this.collection_.get();\n var delta = util_1.clone(newStats);\n if (this.last_) {\n util_1.forEach(this.last_, function (stat, value) {\n delta[stat] = delta[stat] - value;\n });\n }\n this.last_ = newStats;\n return delta;\n };\n return StatsListener;\n}());\nexports.StatsListener = StatsListener;\n\n//# sourceMappingURL=StatsListener.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsListener.js\n// module id = 49\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = require(\"@firebase/app\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"./util/util\");\nvar Path_1 = require(\"./util/Path\");\nvar VisibilityMonitor_1 = require(\"./util/VisibilityMonitor\");\nvar OnlineMonitor_1 = require(\"./util/OnlineMonitor\");\nvar util_5 = require(\"@firebase/util\");\nvar Connection_1 = require(\"../realtime/Connection\");\nvar util_6 = require(\"@firebase/util\");\nvar util_7 = require(\"@firebase/util\");\nvar ServerActions_1 = require(\"./ServerActions\");\nvar RECONNECT_MIN_DELAY = 1000;\nvar RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)\nvar RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)\nvar RECONNECT_DELAY_MULTIPLIER = 1.3;\nvar RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.\nvar SERVER_KILL_INTERRUPT_REASON = 'server_kill';\n// If auth fails repeatedly, we'll assume something is wrong and log a warning / back off.\nvar INVALID_AUTH_TOKEN_THRESHOLD = 3;\n/**\n * Firebase connection. Abstracts wire protocol and handles reconnecting.\n *\n * NOTE: All JSON objects sent to the realtime connection must have property names enclosed\n * in quotes to make sure the closure compiler does not minify them.\n */\nvar PersistentConnection = /** @class */ (function (_super) {\n __extends(PersistentConnection, _super);\n /**\n * @implements {ServerActions}\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param onConnectStatus_\n * @param onServerInfoUpdate_\n * @param authTokenProvider_\n * @param authOverride_\n */\n function PersistentConnection(repoInfo_, onDataUpdate_, onConnectStatus_, onServerInfoUpdate_, authTokenProvider_, authOverride_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.onConnectStatus_ = onConnectStatus_;\n _this.onServerInfoUpdate_ = onServerInfoUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n _this.authOverride_ = authOverride_;\n // Used for diagnostic logging.\n _this.id = PersistentConnection.nextPersistentConnectionId_++;\n _this.log_ = util_4.logWrapper('p:' + _this.id + ':');\n /** @private {Object} */\n _this.interruptReasons_ = {};\n _this.listens_ = {};\n _this.outstandingPuts_ = [];\n _this.outstandingPutCount_ = 0;\n _this.onDisconnectRequestQueue_ = [];\n _this.connected_ = false;\n _this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n _this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_DEFAULT;\n _this.securityDebugCallback_ = null;\n _this.lastSessionId = null;\n /** @private {number|null} */\n _this.establishConnectionTimer_ = null;\n /** @private {boolean} */\n _this.visible_ = false;\n // Before we get connected, we keep a queue of pending messages to send.\n _this.requestCBHash_ = {};\n _this.requestNumber_ = 0;\n /** @private {?{\n * sendRequest(Object),\n * close()\n * }} */\n _this.realtime_ = null;\n /** @private {string|null} */\n _this.authToken_ = null;\n _this.forceTokenRefresh_ = false;\n _this.invalidAuthTokenCount_ = 0;\n _this.firstConnection_ = true;\n _this.lastConnectionAttemptTime_ = null;\n _this.lastConnectionEstablishedTime_ = null;\n if (authOverride_ && !util_7.isNodeSdk()) {\n throw new Error('Auth override specified in options, but not supported on non Node.js platforms');\n }\n _this.scheduleConnect_(0);\n VisibilityMonitor_1.VisibilityMonitor.getInstance().on('visible', _this.onVisible_, _this);\n if (repoInfo_.host.indexOf('fblocal') === -1) {\n OnlineMonitor_1.OnlineMonitor.getInstance().on('online', _this.onOnline_, _this);\n }\n return _this;\n }\n /**\n * @param {!string} action\n * @param {*} body\n * @param {function(*)=} onResponse\n * @protected\n */\n PersistentConnection.prototype.sendRequest = function (action, body, onResponse) {\n var curReqNum = ++this.requestNumber_;\n var msg = { r: curReqNum, a: action, b: body };\n this.log_(util_2.stringify(msg));\n util_3.assert(this.connected_, \"sendRequest call when we're not connected not allowed.\");\n this.realtime_.sendRequest(msg);\n if (onResponse) {\n this.requestCBHash_[curReqNum] = onResponse;\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var queryId = query.queryIdentifier();\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + queryId);\n this.listens_[pathString] = this.listens_[pathString] || {};\n util_3.assert(query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(), 'listen() called for non-default but complete query');\n util_3.assert(!this.listens_[pathString][queryId], 'listen() called twice for same path/queryId.');\n var listenSpec = {\n onComplete: onComplete,\n hashFn: currentHashFn,\n query: query,\n tag: tag\n };\n this.listens_[pathString][queryId] = listenSpec;\n if (this.connected_) {\n this.sendListen_(listenSpec);\n }\n };\n /**\n * @param {!{onComplete(),\n * hashFn():!string,\n * query: !Query,\n * tag: ?number}} listenSpec\n * @private\n */\n PersistentConnection.prototype.sendListen_ = function (listenSpec) {\n var _this = this;\n var query = listenSpec.query;\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Listen on ' + pathString + ' for ' + queryId);\n var req = { /*path*/ p: pathString };\n var action = 'q';\n // Only bother to send query if it's non-default.\n if (listenSpec.tag) {\n req['q'] = query.queryObject();\n req['t'] = listenSpec.tag;\n }\n req['h'] = listenSpec.hashFn();\n this.sendRequest(action, req, function (message) {\n var payload = message['d'];\n var status = message['s'];\n // print warnings in any case...\n PersistentConnection.warnOnListenWarnings_(payload, query);\n var currentListenSpec = _this.listens_[pathString] && _this.listens_[pathString][queryId];\n // only trigger actions if the listen hasn't been removed and readded\n if (currentListenSpec === listenSpec) {\n _this.log_('listen response', message);\n if (status !== 'ok') {\n _this.removeListen_(pathString, queryId);\n }\n if (listenSpec.onComplete) {\n listenSpec.onComplete(status, payload);\n }\n }\n });\n };\n /**\n * @param {*} payload\n * @param {!Query} query\n * @private\n */\n PersistentConnection.warnOnListenWarnings_ = function (payload, query) {\n if (payload && typeof payload === 'object' && util_1.contains(payload, 'w')) {\n var warnings = util_1.safeGet(payload, 'w');\n if (Array.isArray(warnings) && ~warnings.indexOf('no_index')) {\n var indexSpec = '\".indexOn\": \"' +\n query\n .getQueryParams()\n .getIndex()\n .toString() +\n '\"';\n var indexPath = query.path.toString();\n util_4.warn(\"Using an unspecified index. Your data will be downloaded and \" +\n (\"filtered on the client. Consider adding \" + indexSpec + \" at \") +\n (indexPath + \" to your security rules for better performance.\"));\n }\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.refreshAuthToken = function (token) {\n this.authToken_ = token;\n this.log_('Auth token refreshed');\n if (this.authToken_) {\n this.tryAuth();\n }\n else {\n //If we're connected we want to let the server know to unauthenticate us. If we're not connected, simply delete\n //the credential so we dont become authenticated next time we connect.\n if (this.connected_) {\n this.sendRequest('unauth', {}, function () { });\n }\n }\n this.reduceReconnectDelayIfAdminCredential_(token);\n };\n /**\n * @param {!string} credential\n * @private\n */\n PersistentConnection.prototype.reduceReconnectDelayIfAdminCredential_ = function (credential) {\n // NOTE: This isn't intended to be bulletproof (a malicious developer can always just modify the client).\n // Additionally, we don't bother resetting the max delay back to the default if auth fails / expires.\n var isFirebaseSecret = credential && credential.length === 40;\n if (isFirebaseSecret || util_5.isAdmin(credential)) {\n this.log_('Admin auth credential detected. Reducing max reconnect time.');\n this.maxReconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n }\n };\n /**\n * Attempts to authenticate with the given credentials. If the authentication attempt fails, it's triggered like\n * a auth revoked (the connection is closed).\n */\n PersistentConnection.prototype.tryAuth = function () {\n var _this = this;\n if (this.connected_ && this.authToken_) {\n var token_1 = this.authToken_;\n var authMethod = util_5.isValidFormat(token_1) ? 'auth' : 'gauth';\n var requestData = { cred: token_1 };\n if (this.authOverride_ === null) {\n requestData['noauth'] = true;\n }\n else if (typeof this.authOverride_ === 'object') {\n requestData['authvar'] = this.authOverride_;\n }\n this.sendRequest(authMethod, requestData, function (res) {\n var status = res['s'];\n var data = res['d'] || 'error';\n if (_this.authToken_ === token_1) {\n if (status === 'ok') {\n _this.invalidAuthTokenCount_ = 0;\n }\n else {\n // Triggers reconnect and force refresh for auth token\n _this.onAuthRevoked_(status, data);\n }\n }\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.unlisten = function (query, tag) {\n var pathString = query.path.toString();\n var queryId = query.queryIdentifier();\n this.log_('Unlisten called for ' + pathString + ' ' + queryId);\n util_3.assert(query.getQueryParams().isDefault() ||\n !query.getQueryParams().loadsAllData(), 'unlisten() called for non-default but complete query');\n var listen = this.removeListen_(pathString, queryId);\n if (listen && this.connected_) {\n this.sendUnlisten_(pathString, queryId, query.queryObject(), tag);\n }\n };\n PersistentConnection.prototype.sendUnlisten_ = function (pathString, queryId, queryObj, tag) {\n this.log_('Unlisten on ' + pathString + ' for ' + queryId);\n var req = { /*path*/ p: pathString };\n var action = 'n';\n // Only bother sending queryId if it's non-default.\n if (tag) {\n req['q'] = queryObj;\n req['t'] = tag;\n }\n this.sendRequest(action, req);\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectPut = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('o', pathString, data, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'o',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectMerge = function (pathString, data, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('om', pathString, data, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'om',\n data: data,\n onComplete: onComplete\n });\n }\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.onDisconnectCancel = function (pathString, onComplete) {\n if (this.connected_) {\n this.sendOnDisconnect_('oc', pathString, null, onComplete);\n }\n else {\n this.onDisconnectRequestQueue_.push({\n pathString: pathString,\n action: 'oc',\n data: null,\n onComplete: onComplete\n });\n }\n };\n PersistentConnection.prototype.sendOnDisconnect_ = function (action, pathString, data, onComplete) {\n var request = { /*path*/ p: pathString, /*data*/ d: data };\n this.log_('onDisconnect ' + action, request);\n this.sendRequest(action, request, function (response) {\n if (onComplete) {\n setTimeout(function () {\n onComplete(response['s'], response['d']);\n }, Math.floor(0));\n }\n });\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.put = function (pathString, data, onComplete, hash) {\n this.putInternal('p', pathString, data, onComplete, hash);\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.merge = function (pathString, data, onComplete, hash) {\n this.putInternal('m', pathString, data, onComplete, hash);\n };\n PersistentConnection.prototype.putInternal = function (action, pathString, data, onComplete, hash) {\n var request = {\n /*path*/ p: pathString,\n /*data*/ d: data\n };\n if (hash !== undefined)\n request['h'] = hash;\n // TODO: Only keep track of the most recent put for a given path?\n this.outstandingPuts_.push({\n action: action,\n request: request,\n onComplete: onComplete\n });\n this.outstandingPutCount_++;\n var index = this.outstandingPuts_.length - 1;\n if (this.connected_) {\n this.sendPut_(index);\n }\n else {\n this.log_('Buffering put: ' + pathString);\n }\n };\n PersistentConnection.prototype.sendPut_ = function (index) {\n var _this = this;\n var action = this.outstandingPuts_[index].action;\n var request = this.outstandingPuts_[index].request;\n var onComplete = this.outstandingPuts_[index].onComplete;\n this.outstandingPuts_[index].queued = this.connected_;\n this.sendRequest(action, request, function (message) {\n _this.log_(action + ' response', message);\n delete _this.outstandingPuts_[index];\n _this.outstandingPutCount_--;\n // Clean up array occasionally.\n if (_this.outstandingPutCount_ === 0) {\n _this.outstandingPuts_ = [];\n }\n if (onComplete)\n onComplete(message['s'], message['d']);\n });\n };\n /**\n * @inheritDoc\n */\n PersistentConnection.prototype.reportStats = function (stats) {\n var _this = this;\n // If we're not connected, we just drop the stats.\n if (this.connected_) {\n var request = { /*counters*/ c: stats };\n this.log_('reportStats', request);\n this.sendRequest(/*stats*/ 's', request, function (result) {\n var status = result['s'];\n if (status !== 'ok') {\n var errorReason = result['d'];\n _this.log_('reportStats', 'Error sending stats: ' + errorReason);\n }\n });\n }\n };\n /**\n * @param {*} message\n * @private\n */\n PersistentConnection.prototype.onDataMessage_ = function (message) {\n if ('r' in message) {\n // this is a response\n this.log_('from server: ' + util_2.stringify(message));\n var reqNum = message['r'];\n var onResponse = this.requestCBHash_[reqNum];\n if (onResponse) {\n delete this.requestCBHash_[reqNum];\n onResponse(message['b']);\n }\n }\n else if ('error' in message) {\n throw 'A server-side error has occurred: ' + message['error'];\n }\n else if ('a' in message) {\n // a and b are action and body, respectively\n this.onDataPush_(message['a'], message['b']);\n }\n };\n PersistentConnection.prototype.onDataPush_ = function (action, body) {\n this.log_('handleServerMessage', action, body);\n if (action === 'd')\n this.onDataUpdate_(body['p'], body['d'], \n /*isMerge*/ false, body['t']);\n else if (action === 'm')\n this.onDataUpdate_(body['p'], body['d'], \n /*isMerge=*/ true, body['t']);\n else if (action === 'c')\n this.onListenRevoked_(body['p'], body['q']);\n else if (action === 'ac')\n this.onAuthRevoked_(body['s'], body['d']);\n else if (action === 'sd')\n this.onSecurityDebugPacket_(body);\n else\n util_4.error('Unrecognized action received from server: ' +\n util_2.stringify(action) +\n '\\nAre you using the latest client?');\n };\n PersistentConnection.prototype.onReady_ = function (timestamp, sessionId) {\n this.log_('connection ready');\n this.connected_ = true;\n this.lastConnectionEstablishedTime_ = new Date().getTime();\n this.handleTimestamp_(timestamp);\n this.lastSessionId = sessionId;\n if (this.firstConnection_) {\n this.sendConnectStats_();\n }\n this.restoreState_();\n this.firstConnection_ = false;\n this.onConnectStatus_(true);\n };\n PersistentConnection.prototype.scheduleConnect_ = function (timeout) {\n var _this = this;\n util_3.assert(!this.realtime_, \"Scheduling a connect when we're already connected/ing?\");\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n }\n // NOTE: Even when timeout is 0, it's important to do a setTimeout to work around an infuriating \"Security Error\" in\n // Firefox when trying to write to our long-polling iframe in some scenarios (e.g. Forge or our unit tests).\n this.establishConnectionTimer_ = setTimeout(function () {\n _this.establishConnectionTimer_ = null;\n _this.establishConnection_();\n }, Math.floor(timeout));\n };\n /**\n * @param {boolean} visible\n * @private\n */\n PersistentConnection.prototype.onVisible_ = function (visible) {\n // NOTE: Tabbing away and back to a window will defeat our reconnect backoff, but I think that's fine.\n if (visible &&\n !this.visible_ &&\n this.reconnectDelay_ === this.maxReconnectDelay_) {\n this.log_('Window became visible. Reducing delay.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n this.visible_ = visible;\n };\n PersistentConnection.prototype.onOnline_ = function (online) {\n if (online) {\n this.log_('Browser went online.');\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n else {\n this.log_('Browser went offline. Killing connection.');\n if (this.realtime_) {\n this.realtime_.close();\n }\n }\n };\n PersistentConnection.prototype.onRealtimeDisconnect_ = function () {\n this.log_('data client disconnected');\n this.connected_ = false;\n this.realtime_ = null;\n // Since we don't know if our sent transactions succeeded or not, we need to cancel them.\n this.cancelSentTransactions_();\n // Clear out the pending requests.\n this.requestCBHash_ = {};\n if (this.shouldReconnect_()) {\n if (!this.visible_) {\n this.log_(\"Window isn't visible. Delaying reconnect.\");\n this.reconnectDelay_ = this.maxReconnectDelay_;\n this.lastConnectionAttemptTime_ = new Date().getTime();\n }\n else if (this.lastConnectionEstablishedTime_) {\n // If we've been connected long enough, reset reconnect delay to minimum.\n var timeSinceLastConnectSucceeded = new Date().getTime() - this.lastConnectionEstablishedTime_;\n if (timeSinceLastConnectSucceeded > RECONNECT_DELAY_RESET_TIMEOUT)\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n this.lastConnectionEstablishedTime_ = null;\n }\n var timeSinceLastConnectAttempt = new Date().getTime() - this.lastConnectionAttemptTime_;\n var reconnectDelay = Math.max(0, this.reconnectDelay_ - timeSinceLastConnectAttempt);\n reconnectDelay = Math.random() * reconnectDelay;\n this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');\n this.scheduleConnect_(reconnectDelay);\n // Adjust reconnect delay for next time.\n this.reconnectDelay_ = Math.min(this.maxReconnectDelay_, this.reconnectDelay_ * RECONNECT_DELAY_MULTIPLIER);\n }\n this.onConnectStatus_(false);\n };\n PersistentConnection.prototype.establishConnection_ = function () {\n if (this.shouldReconnect_()) {\n this.log_('Making a connection attempt');\n this.lastConnectionAttemptTime_ = new Date().getTime();\n this.lastConnectionEstablishedTime_ = null;\n var onDataMessage_1 = this.onDataMessage_.bind(this);\n var onReady_1 = this.onReady_.bind(this);\n var onDisconnect_1 = this.onRealtimeDisconnect_.bind(this);\n var connId_1 = this.id + ':' + PersistentConnection.nextConnectionId_++;\n var self_1 = this;\n var lastSessionId_1 = this.lastSessionId;\n var canceled_1 = false;\n var connection_1 = null;\n var closeFn_1 = function () {\n if (connection_1) {\n connection_1.close();\n }\n else {\n canceled_1 = true;\n onDisconnect_1();\n }\n };\n var sendRequestFn = function (msg) {\n util_3.assert(connection_1, \"sendRequest call when we're not connected not allowed.\");\n connection_1.sendRequest(msg);\n };\n this.realtime_ = {\n close: closeFn_1,\n sendRequest: sendRequestFn\n };\n var forceRefresh = this.forceTokenRefresh_;\n this.forceTokenRefresh_ = false;\n // First fetch auth token, and establish connection after fetching the token was successful\n this.authTokenProvider_\n .getToken(forceRefresh)\n .then(function (result) {\n if (!canceled_1) {\n util_4.log('getToken() completed. Creating connection.');\n self_1.authToken_ = result && result.accessToken;\n connection_1 = new Connection_1.Connection(connId_1, self_1.repoInfo_, onDataMessage_1, onReady_1, onDisconnect_1, \n /* onKill= */ function (reason) {\n util_4.warn(reason + ' (' + self_1.repoInfo_.toString() + ')');\n self_1.interrupt(SERVER_KILL_INTERRUPT_REASON);\n }, lastSessionId_1);\n }\n else {\n util_4.log('getToken() completed but was canceled');\n }\n })\n .then(null, function (error) {\n self_1.log_('Failed to get token: ' + error);\n if (!canceled_1) {\n if (util_6.CONSTANTS.NODE_ADMIN) {\n // This may be a critical error for the Admin Node.js SDK, so log a warning.\n // But getToken() may also just have temporarily failed, so we still want to\n // continue retrying.\n util_4.warn(error);\n }\n closeFn_1();\n }\n });\n }\n };\n /**\n * @param {string} reason\n */\n PersistentConnection.prototype.interrupt = function (reason) {\n util_4.log('Interrupting connection for reason: ' + reason);\n this.interruptReasons_[reason] = true;\n if (this.realtime_) {\n this.realtime_.close();\n }\n else {\n if (this.establishConnectionTimer_) {\n clearTimeout(this.establishConnectionTimer_);\n this.establishConnectionTimer_ = null;\n }\n if (this.connected_) {\n this.onRealtimeDisconnect_();\n }\n }\n };\n /**\n * @param {string} reason\n */\n PersistentConnection.prototype.resume = function (reason) {\n util_4.log('Resuming connection for reason: ' + reason);\n delete this.interruptReasons_[reason];\n if (util_1.isEmpty(this.interruptReasons_)) {\n this.reconnectDelay_ = RECONNECT_MIN_DELAY;\n if (!this.realtime_) {\n this.scheduleConnect_(0);\n }\n }\n };\n PersistentConnection.prototype.handleTimestamp_ = function (timestamp) {\n var delta = timestamp - new Date().getTime();\n this.onServerInfoUpdate_({ serverTimeOffset: delta });\n };\n PersistentConnection.prototype.cancelSentTransactions_ = function () {\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n var put = this.outstandingPuts_[i];\n if (put && /*hash*/ 'h' in put.request && put.queued) {\n if (put.onComplete)\n put.onComplete('disconnect');\n delete this.outstandingPuts_[i];\n this.outstandingPutCount_--;\n }\n }\n // Clean up array occasionally.\n if (this.outstandingPutCount_ === 0)\n this.outstandingPuts_ = [];\n };\n /**\n * @param {!string} pathString\n * @param {Array.<*>=} query\n * @private\n */\n PersistentConnection.prototype.onListenRevoked_ = function (pathString, query) {\n // Remove the listen and manufacture a \"permission_denied\" error for the failed listen.\n var queryId;\n if (!query) {\n queryId = 'default';\n }\n else {\n queryId = query.map(function (q) { return util_4.ObjectToUniqueKey(q); }).join('$');\n }\n var listen = this.removeListen_(pathString, queryId);\n if (listen && listen.onComplete)\n listen.onComplete('permission_denied');\n };\n /**\n * @param {!string} pathString\n * @param {!string} queryId\n * @return {{queries:Array., onComplete:function(string)}}\n * @private\n */\n PersistentConnection.prototype.removeListen_ = function (pathString, queryId) {\n var normalizedPathString = new Path_1.Path(pathString).toString(); // normalize path.\n var listen;\n if (this.listens_[normalizedPathString] !== undefined) {\n listen = this.listens_[normalizedPathString][queryId];\n delete this.listens_[normalizedPathString][queryId];\n if (util_1.getCount(this.listens_[normalizedPathString]) === 0) {\n delete this.listens_[normalizedPathString];\n }\n }\n else {\n // all listens for this path has already been removed\n listen = undefined;\n }\n return listen;\n };\n PersistentConnection.prototype.onAuthRevoked_ = function (statusCode, explanation) {\n util_4.log('Auth token revoked: ' + statusCode + '/' + explanation);\n this.authToken_ = null;\n this.forceTokenRefresh_ = true;\n this.realtime_.close();\n if (statusCode === 'invalid_token' || statusCode === 'permission_denied') {\n // We'll wait a couple times before logging the warning / increasing the\n // retry period since oauth tokens will report as \"invalid\" if they're\n // just expired. Plus there may be transient issues that resolve themselves.\n this.invalidAuthTokenCount_++;\n if (this.invalidAuthTokenCount_ >= INVALID_AUTH_TOKEN_THRESHOLD) {\n // Set a long reconnect delay because recovery is unlikely\n this.reconnectDelay_ = RECONNECT_MAX_DELAY_FOR_ADMINS;\n // Notify the auth token provider that the token is invalid, which will log\n // a warning\n this.authTokenProvider_.notifyForInvalidToken();\n }\n }\n };\n PersistentConnection.prototype.onSecurityDebugPacket_ = function (body) {\n if (this.securityDebugCallback_) {\n this.securityDebugCallback_(body);\n }\n else {\n if ('msg' in body && typeof console !== 'undefined') {\n console.log('FIREBASE: ' + body['msg'].replace('\\n', '\\nFIREBASE: '));\n }\n }\n };\n PersistentConnection.prototype.restoreState_ = function () {\n var _this = this;\n //Re-authenticate ourselves if we have a credential stored.\n this.tryAuth();\n // Puts depend on having received the corresponding data update from the server before they complete, so we must\n // make sure to send listens before puts.\n util_1.forEach(this.listens_, function (pathString, queries) {\n util_1.forEach(queries, function (key, listenSpec) {\n _this.sendListen_(listenSpec);\n });\n });\n for (var i = 0; i < this.outstandingPuts_.length; i++) {\n if (this.outstandingPuts_[i])\n this.sendPut_(i);\n }\n while (this.onDisconnectRequestQueue_.length) {\n var request = this.onDisconnectRequestQueue_.shift();\n this.sendOnDisconnect_(request.action, request.pathString, request.data, request.onComplete);\n }\n };\n /**\n * Sends client stats for first connection\n * @private\n */\n PersistentConnection.prototype.sendConnectStats_ = function () {\n var stats = {};\n var clientName = 'js';\n if (util_6.CONSTANTS.NODE_ADMIN) {\n clientName = 'admin_node';\n }\n else if (util_6.CONSTANTS.NODE_CLIENT) {\n clientName = 'node';\n }\n stats['sdk.' + clientName + '.' + app_1.default.SDK_VERSION.replace(/\\./g, '-')] = 1;\n if (util_7.isMobileCordova()) {\n stats['framework.cordova'] = 1;\n }\n else if (util_7.isReactNative()) {\n stats['framework.reactnative'] = 1;\n }\n this.reportStats(stats);\n };\n /**\n * @return {boolean}\n * @private\n */\n PersistentConnection.prototype.shouldReconnect_ = function () {\n var online = OnlineMonitor_1.OnlineMonitor.getInstance().currentlyOnline();\n return util_1.isEmpty(this.interruptReasons_) && online;\n };\n /**\n * @private\n */\n PersistentConnection.nextPersistentConnectionId_ = 0;\n /**\n * Counter for number of connections created. Mainly used for tagging in the logs\n * @type {number}\n * @private\n */\n PersistentConnection.nextConnectionId_ = 0;\n return PersistentConnection;\n}(ServerActions_1.ServerActions));\nexports.PersistentConnection = PersistentConnection;\n\n//# sourceMappingURL=PersistentConnection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/PersistentConnection.js\n// module id = 50\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Base class to be used if you want to emit events. Call the constructor with\n * the set of allowed event names.\n */\nvar EventEmitter = /** @class */ (function () {\n /**\n * @param {!Array.} allowedEvents_\n */\n function EventEmitter(allowedEvents_) {\n this.allowedEvents_ = allowedEvents_;\n this.listeners_ = {};\n util_1.assert(Array.isArray(allowedEvents_) && allowedEvents_.length > 0, 'Requires a non-empty array');\n }\n /**\n * To be called by derived classes to trigger events.\n * @param {!string} eventType\n * @param {...*} var_args\n */\n EventEmitter.prototype.trigger = function (eventType) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (Array.isArray(this.listeners_[eventType])) {\n // Clone the list, since callbacks could add/remove listeners.\n var listeners = this.listeners_[eventType].slice();\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].callback.apply(listeners[i].context, var_args);\n }\n }\n };\n EventEmitter.prototype.on = function (eventType, callback, context) {\n this.validateEventType_(eventType);\n this.listeners_[eventType] = this.listeners_[eventType] || [];\n this.listeners_[eventType].push({ callback: callback, context: context });\n var eventData = this.getInitialEvent(eventType);\n if (eventData) {\n callback.apply(context, eventData);\n }\n };\n EventEmitter.prototype.off = function (eventType, callback, context) {\n this.validateEventType_(eventType);\n var listeners = this.listeners_[eventType] || [];\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].callback === callback &&\n (!context || context === listeners[i].context)) {\n listeners.splice(i, 1);\n return;\n }\n }\n };\n EventEmitter.prototype.validateEventType_ = function (eventType) {\n util_1.assert(this.allowedEvents_.find(function (et) {\n return et === eventType;\n }), 'Unknown event: ' + eventType);\n };\n return EventEmitter;\n}());\nexports.EventEmitter = EventEmitter;\n\n//# sourceMappingURL=EventEmitter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/EventEmitter.js\n// module id = 51\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../core/util/util\");\nvar storage_1 = require(\"../core/storage/storage\");\nvar Constants_1 = require(\"./Constants\");\nvar TransportManager_1 = require(\"./TransportManager\");\n// Abort upgrade attempt if it takes longer than 60s.\nvar UPGRADE_TIMEOUT = 60000;\n// For some transports (WebSockets), we need to \"validate\" the transport by exchanging a few requests and responses.\n// If we haven't sent enough requests within 5s, we'll start sending noop ping requests.\nvar DELAY_BEFORE_SENDING_EXTRA_REQUESTS = 5000;\n// If the initial data sent triggers a lot of bandwidth (i.e. it's a large put or a listen for a large amount of data)\n// then we may not be able to exchange our ping/pong requests within the healthy timeout. So if we reach the timeout\n// but we've sent/received enough bytes, we don't cancel the connection.\nvar BYTES_SENT_HEALTHY_OVERRIDE = 10 * 1024;\nvar BYTES_RECEIVED_HEALTHY_OVERRIDE = 100 * 1024;\nvar MESSAGE_TYPE = 't';\nvar MESSAGE_DATA = 'd';\nvar CONTROL_SHUTDOWN = 's';\nvar CONTROL_RESET = 'r';\nvar CONTROL_ERROR = 'e';\nvar CONTROL_PONG = 'o';\nvar SWITCH_ACK = 'a';\nvar END_TRANSMISSION = 'n';\nvar PING = 'p';\nvar SERVER_HELLO = 'h';\n/**\n * Creates a new real-time connection to the server using whichever method works\n * best in the current browser.\n *\n * @constructor\n */\nvar Connection = /** @class */ (function () {\n /**\n * @param {!string} id - an id for this connection\n * @param {!RepoInfo} repoInfo_ - the info for the endpoint to connect to\n * @param {function(Object)} onMessage_ - the callback to be triggered when a server-push message arrives\n * @param {function(number, string)} onReady_ - the callback to be triggered when this connection is ready to send messages.\n * @param {function()} onDisconnect_ - the callback to be triggered when a connection was lost\n * @param {function(string)} onKill_ - the callback to be triggered when this connection has permanently shut down.\n * @param {string=} lastSessionId - last session id in persistent connection. is used to clean up old session in real-time server\n */\n function Connection(id, repoInfo_, onMessage_, onReady_, onDisconnect_, onKill_, lastSessionId) {\n this.id = id;\n this.repoInfo_ = repoInfo_;\n this.onMessage_ = onMessage_;\n this.onReady_ = onReady_;\n this.onDisconnect_ = onDisconnect_;\n this.onKill_ = onKill_;\n this.lastSessionId = lastSessionId;\n this.connectionCount = 0;\n this.pendingDataMessages = [];\n this.state_ = 0 /* CONNECTING */;\n this.log_ = util_1.logWrapper('c:' + this.id + ':');\n this.transportManager_ = new TransportManager_1.TransportManager(repoInfo_);\n this.log_('Connection created');\n this.start_();\n }\n /**\n * Starts a connection attempt\n * @private\n */\n Connection.prototype.start_ = function () {\n var _this = this;\n var conn = this.transportManager_.initialTransport();\n this.conn_ = new conn(this.nextTransportId_(), this.repoInfo_, undefined, this.lastSessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.primaryResponsesRequired_ = conn['responsesRequiredToBeHealthy'] || 0;\n var onMessageReceived = this.connReceiver_(this.conn_);\n var onConnectionLost = this.disconnReceiver_(this.conn_);\n this.tx_ = this.conn_;\n this.rx_ = this.conn_;\n this.secondaryConn_ = null;\n this.isHealthy_ = false;\n /*\n * Firefox doesn't like when code from one iframe tries to create another iframe by way of the parent frame.\n * This can occur in the case of a redirect, i.e. we guessed wrong on what server to connect to and received a reset.\n * Somehow, setTimeout seems to make this ok. That doesn't make sense from a security perspective, since you should\n * still have the context of your originating frame.\n */\n setTimeout(function () {\n // this.conn_ gets set to null in some of the tests. Check to make sure it still exists before using it\n _this.conn_ && _this.conn_.open(onMessageReceived, onConnectionLost);\n }, Math.floor(0));\n var healthyTimeout_ms = conn['healthyTimeout'] || 0;\n if (healthyTimeout_ms > 0) {\n this.healthyTimeout_ = util_1.setTimeoutNonBlocking(function () {\n _this.healthyTimeout_ = null;\n if (!_this.isHealthy_) {\n if (_this.conn_ &&\n _this.conn_.bytesReceived > BYTES_RECEIVED_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has received ' +\n _this.conn_.bytesReceived +\n ' bytes. Marking connection healthy.');\n _this.isHealthy_ = true;\n _this.conn_.markConnectionHealthy();\n }\n else if (_this.conn_ &&\n _this.conn_.bytesSent > BYTES_SENT_HEALTHY_OVERRIDE) {\n _this.log_('Connection exceeded healthy timeout but has sent ' +\n _this.conn_.bytesSent +\n ' bytes. Leaving connection alive.');\n // NOTE: We don't want to mark it healthy, since we have no guarantee that the bytes have made it to\n // the server.\n }\n else {\n _this.log_('Closing unhealthy connection after timeout.');\n _this.close();\n }\n }\n }, Math.floor(healthyTimeout_ms));\n }\n };\n /**\n * @return {!string}\n * @private\n */\n Connection.prototype.nextTransportId_ = function () {\n return 'c:' + this.id + ':' + this.connectionCount++;\n };\n Connection.prototype.disconnReceiver_ = function (conn) {\n var _this = this;\n return function (everConnected) {\n if (conn === _this.conn_) {\n _this.onConnectionLost_(everConnected);\n }\n else if (conn === _this.secondaryConn_) {\n _this.log_('Secondary connection lost.');\n _this.onSecondaryConnectionLost_();\n }\n else {\n _this.log_('closing an old connection');\n }\n };\n };\n Connection.prototype.connReceiver_ = function (conn) {\n var _this = this;\n return function (message) {\n if (_this.state_ != 2 /* DISCONNECTED */) {\n if (conn === _this.rx_) {\n _this.onPrimaryMessageReceived_(message);\n }\n else if (conn === _this.secondaryConn_) {\n _this.onSecondaryMessageReceived_(message);\n }\n else {\n _this.log_('message on old connection');\n }\n }\n };\n };\n /**\n *\n * @param {Object} dataMsg An arbitrary data message to be sent to the server\n */\n Connection.prototype.sendRequest = function (dataMsg) {\n // wrap in a data message envelope and send it on\n var msg = { t: 'd', d: dataMsg };\n this.sendData_(msg);\n };\n Connection.prototype.tryCleanupConnection = function () {\n if (this.tx_ === this.secondaryConn_ && this.rx_ === this.secondaryConn_) {\n this.log_('cleaning up and promoting a connection: ' + this.secondaryConn_.connId);\n this.conn_ = this.secondaryConn_;\n this.secondaryConn_ = null;\n // the server will shutdown the old connection\n }\n };\n Connection.prototype.onSecondaryControl_ = function (controlData) {\n if (MESSAGE_TYPE in controlData) {\n var cmd = controlData[MESSAGE_TYPE];\n if (cmd === SWITCH_ACK) {\n this.upgradeIfSecondaryHealthy_();\n }\n else if (cmd === CONTROL_RESET) {\n // Most likely the session wasn't valid. Abandon the switch attempt\n this.log_('Got a reset on secondary, closing it');\n this.secondaryConn_.close();\n // If we were already using this connection for something, than we need to fully close\n if (this.tx_ === this.secondaryConn_ ||\n this.rx_ === this.secondaryConn_) {\n this.close();\n }\n }\n else if (cmd === CONTROL_PONG) {\n this.log_('got pong on secondary.');\n this.secondaryResponsesRequired_--;\n this.upgradeIfSecondaryHealthy_();\n }\n }\n };\n Connection.prototype.onSecondaryMessageReceived_ = function (parsedData) {\n var layer = util_1.requireKey('t', parsedData);\n var data = util_1.requireKey('d', parsedData);\n if (layer == 'c') {\n this.onSecondaryControl_(data);\n }\n else if (layer == 'd') {\n // got a data message, but we're still second connection. Need to buffer it up\n this.pendingDataMessages.push(data);\n }\n else {\n throw new Error('Unknown protocol layer: ' + layer);\n }\n };\n Connection.prototype.upgradeIfSecondaryHealthy_ = function () {\n if (this.secondaryResponsesRequired_ <= 0) {\n this.log_('Secondary connection is healthy.');\n this.isHealthy_ = true;\n this.secondaryConn_.markConnectionHealthy();\n this.proceedWithUpgrade_();\n }\n else {\n // Send a ping to make sure the connection is healthy.\n this.log_('sending ping on secondary.');\n this.secondaryConn_.send({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.proceedWithUpgrade_ = function () {\n // tell this connection to consider itself open\n this.secondaryConn_.start();\n // send ack\n this.log_('sending client ack on secondary');\n this.secondaryConn_.send({ t: 'c', d: { t: SWITCH_ACK, d: {} } });\n // send end packet on primary transport, switch to sending on this one\n // can receive on this one, buffer responses until end received on primary transport\n this.log_('Ending transmission on primary');\n this.conn_.send({ t: 'c', d: { t: END_TRANSMISSION, d: {} } });\n this.tx_ = this.secondaryConn_;\n this.tryCleanupConnection();\n };\n Connection.prototype.onPrimaryMessageReceived_ = function (parsedData) {\n // Must refer to parsedData properties in quotes, so closure doesn't touch them.\n var layer = util_1.requireKey('t', parsedData);\n var data = util_1.requireKey('d', parsedData);\n if (layer == 'c') {\n this.onControl_(data);\n }\n else if (layer == 'd') {\n this.onDataMessage_(data);\n }\n };\n Connection.prototype.onDataMessage_ = function (message) {\n this.onPrimaryResponse_();\n // We don't do anything with data messages, just kick them up a level\n this.onMessage_(message);\n };\n Connection.prototype.onPrimaryResponse_ = function () {\n if (!this.isHealthy_) {\n this.primaryResponsesRequired_--;\n if (this.primaryResponsesRequired_ <= 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n this.conn_.markConnectionHealthy();\n }\n }\n };\n Connection.prototype.onControl_ = function (controlData) {\n var cmd = util_1.requireKey(MESSAGE_TYPE, controlData);\n if (MESSAGE_DATA in controlData) {\n var payload = controlData[MESSAGE_DATA];\n if (cmd === SERVER_HELLO) {\n this.onHandshake_(payload);\n }\n else if (cmd === END_TRANSMISSION) {\n this.log_('recvd end transmission on primary');\n this.rx_ = this.secondaryConn_;\n for (var i = 0; i < this.pendingDataMessages.length; ++i) {\n this.onDataMessage_(this.pendingDataMessages[i]);\n }\n this.pendingDataMessages = [];\n this.tryCleanupConnection();\n }\n else if (cmd === CONTROL_SHUTDOWN) {\n // This was previously the 'onKill' callback passed to the lower-level connection\n // payload in this case is the reason for the shutdown. Generally a human-readable error\n this.onConnectionShutdown_(payload);\n }\n else if (cmd === CONTROL_RESET) {\n // payload in this case is the host we should contact\n this.onReset_(payload);\n }\n else if (cmd === CONTROL_ERROR) {\n util_1.error('Server Error: ' + payload);\n }\n else if (cmd === CONTROL_PONG) {\n this.log_('got pong on primary.');\n this.onPrimaryResponse_();\n this.sendPingOnPrimaryIfNecessary_();\n }\n else {\n util_1.error('Unknown control packet command: ' + cmd);\n }\n }\n };\n /**\n *\n * @param {Object} handshake The handshake data returned from the server\n * @private\n */\n Connection.prototype.onHandshake_ = function (handshake) {\n var timestamp = handshake.ts;\n var version = handshake.v;\n var host = handshake.h;\n this.sessionId = handshake.s;\n this.repoInfo_.updateHost(host);\n // if we've already closed the connection, then don't bother trying to progress further\n if (this.state_ == 0 /* CONNECTING */) {\n this.conn_.start();\n this.onConnectionEstablished_(this.conn_, timestamp);\n if (Constants_1.PROTOCOL_VERSION !== version) {\n util_1.warn('Protocol version mismatch detected');\n }\n // TODO: do we want to upgrade? when? maybe a delay?\n this.tryStartUpgrade_();\n }\n };\n Connection.prototype.tryStartUpgrade_ = function () {\n var conn = this.transportManager_.upgradeTransport();\n if (conn) {\n this.startUpgrade_(conn);\n }\n };\n Connection.prototype.startUpgrade_ = function (conn) {\n var _this = this;\n this.secondaryConn_ = new conn(this.nextTransportId_(), this.repoInfo_, this.sessionId);\n // For certain transports (WebSockets), we need to send and receive several messages back and forth before we\n // can consider the transport healthy.\n this.secondaryResponsesRequired_ =\n conn['responsesRequiredToBeHealthy'] || 0;\n var onMessage = this.connReceiver_(this.secondaryConn_);\n var onDisconnect = this.disconnReceiver_(this.secondaryConn_);\n this.secondaryConn_.open(onMessage, onDisconnect);\n // If we haven't successfully upgraded after UPGRADE_TIMEOUT, give up and kill the secondary.\n util_1.setTimeoutNonBlocking(function () {\n if (_this.secondaryConn_) {\n _this.log_('Timed out trying to upgrade.');\n _this.secondaryConn_.close();\n }\n }, Math.floor(UPGRADE_TIMEOUT));\n };\n Connection.prototype.onReset_ = function (host) {\n this.log_('Reset packet received. New host: ' + host);\n this.repoInfo_.updateHost(host);\n // TODO: if we're already \"connected\", we need to trigger a disconnect at the next layer up.\n // We don't currently support resets after the connection has already been established\n if (this.state_ === 1 /* CONNECTED */) {\n this.close();\n }\n else {\n // Close whatever connections we have open and start again.\n this.closeConnections_();\n this.start_();\n }\n };\n Connection.prototype.onConnectionEstablished_ = function (conn, timestamp) {\n var _this = this;\n this.log_('Realtime connection established.');\n this.conn_ = conn;\n this.state_ = 1 /* CONNECTED */;\n if (this.onReady_) {\n this.onReady_(timestamp, this.sessionId);\n this.onReady_ = null;\n }\n // If after 5 seconds we haven't sent enough requests to the server to get the connection healthy,\n // send some pings.\n if (this.primaryResponsesRequired_ === 0) {\n this.log_('Primary connection is healthy.');\n this.isHealthy_ = true;\n }\n else {\n util_1.setTimeoutNonBlocking(function () {\n _this.sendPingOnPrimaryIfNecessary_();\n }, Math.floor(DELAY_BEFORE_SENDING_EXTRA_REQUESTS));\n }\n };\n Connection.prototype.sendPingOnPrimaryIfNecessary_ = function () {\n // If the connection isn't considered healthy yet, we'll send a noop ping packet request.\n if (!this.isHealthy_ && this.state_ === 1 /* CONNECTED */) {\n this.log_('sending ping on primary.');\n this.sendData_({ t: 'c', d: { t: PING, d: {} } });\n }\n };\n Connection.prototype.onSecondaryConnectionLost_ = function () {\n var conn = this.secondaryConn_;\n this.secondaryConn_ = null;\n if (this.tx_ === conn || this.rx_ === conn) {\n // we are relying on this connection already in some capacity. Therefore, a failure is real\n this.close();\n }\n };\n /**\n *\n * @param {boolean} everConnected Whether or not the connection ever reached a server. Used to determine if\n * we should flush the host cache\n * @private\n */\n Connection.prototype.onConnectionLost_ = function (everConnected) {\n this.conn_ = null;\n // NOTE: IF you're seeing a Firefox error for this line, I think it might be because it's getting\n // called on window close and RealtimeState.CONNECTING is no longer defined. Just a guess.\n if (!everConnected && this.state_ === 0 /* CONNECTING */) {\n this.log_('Realtime connection failed.');\n // Since we failed to connect at all, clear any cached entry for this namespace in case the machine went away\n if (this.repoInfo_.isCacheableHost()) {\n storage_1.PersistentStorage.remove('host:' + this.repoInfo_.host);\n // reset the internal host to what we would show the user, i.e. .firebaseio.com\n this.repoInfo_.internalHost = this.repoInfo_.host;\n }\n }\n else if (this.state_ === 1 /* CONNECTED */) {\n this.log_('Realtime connection lost.');\n }\n this.close();\n };\n /**\n *\n * @param {string} reason\n * @private\n */\n Connection.prototype.onConnectionShutdown_ = function (reason) {\n this.log_('Connection shutdown command received. Shutting down...');\n if (this.onKill_) {\n this.onKill_(reason);\n this.onKill_ = null;\n }\n // We intentionally don't want to fire onDisconnect (kill is a different case),\n // so clear the callback.\n this.onDisconnect_ = null;\n this.close();\n };\n Connection.prototype.sendData_ = function (data) {\n if (this.state_ !== 1 /* CONNECTED */) {\n throw 'Connection is not connected';\n }\n else {\n this.tx_.send(data);\n }\n };\n /**\n * Cleans up this connection, calling the appropriate callbacks\n */\n Connection.prototype.close = function () {\n if (this.state_ !== 2 /* DISCONNECTED */) {\n this.log_('Closing realtime connection.');\n this.state_ = 2 /* DISCONNECTED */;\n this.closeConnections_();\n if (this.onDisconnect_) {\n this.onDisconnect_();\n this.onDisconnect_ = null;\n }\n }\n };\n /**\n *\n * @private\n */\n Connection.prototype.closeConnections_ = function () {\n this.log_('Shutting down all connections');\n if (this.conn_) {\n this.conn_.close();\n this.conn_ = null;\n }\n if (this.secondaryConn_) {\n this.secondaryConn_.close();\n this.secondaryConn_ = null;\n }\n if (this.healthyTimeout_) {\n clearTimeout(this.healthyTimeout_);\n this.healthyTimeout_ = null;\n }\n };\n return Connection;\n}());\nexports.Connection = Connection;\n\n//# sourceMappingURL=Connection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/Connection.js\n// module id = 52\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../core/util/util\");\nvar CountedSet_1 = require(\"../core/util/CountedSet\");\nvar StatsManager_1 = require(\"../core/stats/StatsManager\");\nvar PacketReceiver_1 = require(\"./polling/PacketReceiver\");\nvar Constants_1 = require(\"./Constants\");\nvar util_2 = require(\"@firebase/util\");\nvar util_3 = require(\"@firebase/util\");\n// URL query parameters associated with longpolling\nexports.FIREBASE_LONGPOLL_START_PARAM = 'start';\nexports.FIREBASE_LONGPOLL_CLOSE_COMMAND = 'close';\nexports.FIREBASE_LONGPOLL_COMMAND_CB_NAME = 'pLPCommand';\nexports.FIREBASE_LONGPOLL_DATA_CB_NAME = 'pRTLPCB';\nexports.FIREBASE_LONGPOLL_ID_PARAM = 'id';\nexports.FIREBASE_LONGPOLL_PW_PARAM = 'pw';\nexports.FIREBASE_LONGPOLL_SERIAL_PARAM = 'ser';\nexports.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM = 'cb';\nexports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM = 'seg';\nexports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET = 'ts';\nexports.FIREBASE_LONGPOLL_DATA_PARAM = 'd';\nexports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM = 'disconn';\nexports.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM = 'dframe';\n//Data size constants.\n//TODO: Perf: the maximum length actually differs from browser to browser.\n// We should check what browser we're on and set accordingly.\nvar MAX_URL_DATA_SIZE = 1870;\nvar SEG_HEADER_SIZE = 30; //ie: &seg=8299234&ts=982389123&d=\nvar MAX_PAYLOAD_SIZE = MAX_URL_DATA_SIZE - SEG_HEADER_SIZE;\n/**\n * Keepalive period\n * send a fresh request at minimum every 25 seconds. Opera has a maximum request\n * length of 30 seconds that we can't exceed.\n * @const\n * @type {number}\n */\nvar KEEPALIVE_REQUEST_INTERVAL = 25000;\n/**\n * How long to wait before aborting a long-polling connection attempt.\n * @const\n * @type {number}\n */\nvar LP_CONNECT_TIMEOUT = 30000;\n/**\n * This class manages a single long-polling connection.\n *\n * @constructor\n * @implements {Transport}\n */\nvar BrowserPollConnection = /** @class */ (function () {\n /**\n * @param {string} connId An identifier for this connection, used for logging\n * @param {RepoInfo} repoInfo The info for the endpoint to send data to.\n * @param {string=} transportSessionId Optional transportSessionid if we are reconnecting for an existing\n * transport session\n * @param {string=} lastSessionId Optional lastSessionId if the PersistentConnection has already created a\n * connection previously\n */\n function BrowserPollConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.repoInfo = repoInfo;\n this.transportSessionId = transportSessionId;\n this.lastSessionId = lastSessionId;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.everConnected_ = false;\n this.log_ = util_1.logWrapper(connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.urlFn = function (params) {\n return repoInfo.connectionURL(Constants_1.LONG_POLLING, params);\n };\n }\n /**\n *\n * @param {function(Object)} onMessage Callback when messages arrive\n * @param {function()} onDisconnect Callback with connection lost.\n */\n BrowserPollConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.curSegmentNum = 0;\n this.onDisconnect_ = onDisconnect;\n this.myPacketOrderer = new PacketReceiver_1.PacketReceiver(onMessage);\n this.isClosed_ = false;\n this.connectTimeoutTimer_ = setTimeout(function () {\n _this.log_('Timed out trying to connect.');\n // Make sure we clear the host cache\n _this.onClosed_();\n _this.connectTimeoutTimer_ = null;\n }, Math.floor(LP_CONNECT_TIMEOUT));\n // Ensure we delay the creation of the iframe until the DOM is loaded.\n util_1.executeWhenDOMReady(function () {\n if (_this.isClosed_)\n return;\n //Set up a callback that gets triggered once a connection is set up.\n _this.scriptTagHolder = new FirebaseIFrameScriptHolder(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var command = args[0], arg1 = args[1], arg2 = args[2], arg3 = args[3], arg4 = args[4];\n _this.incrementIncomingBytes_(args);\n if (!_this.scriptTagHolder)\n return; // we closed the connection.\n if (_this.connectTimeoutTimer_) {\n clearTimeout(_this.connectTimeoutTimer_);\n _this.connectTimeoutTimer_ = null;\n }\n _this.everConnected_ = true;\n if (command == exports.FIREBASE_LONGPOLL_START_PARAM) {\n _this.id = arg1;\n _this.password = arg2;\n }\n else if (command === exports.FIREBASE_LONGPOLL_CLOSE_COMMAND) {\n // Don't clear the host cache. We got a response from the server, so we know it's reachable\n if (arg1) {\n // We aren't expecting any more data (other than what the server's already in the process of sending us\n // through our already open polls), so don't send any more.\n _this.scriptTagHolder.sendNewPolls = false;\n // arg1 in this case is the last response number sent by the server. We should try to receive\n // all of the responses up to this one before closing\n _this.myPacketOrderer.closeAfter(arg1, function () {\n _this.onClosed_();\n });\n }\n else {\n _this.onClosed_();\n }\n }\n else {\n throw new Error('Unrecognized command received: ' + command);\n }\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var pN = args[0], data = args[1];\n _this.incrementIncomingBytes_(args);\n _this.myPacketOrderer.handleResponse(pN, data);\n }, function () {\n _this.onClosed_();\n }, _this.urlFn);\n //Send the initial request to connect. The serial number is simply to keep the browser from pulling previous results\n //from cache.\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_START_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = Math.floor(Math.random() * 100000000);\n if (_this.scriptTagHolder.uniqueCallbackIdentifier)\n urlParams[exports.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM] = _this.scriptTagHolder.uniqueCallbackIdentifier;\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (_this.transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = _this.transportSessionId;\n }\n if (_this.lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = _this.lastSessionId;\n }\n if (!util_3.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n var connectURL = _this.urlFn(urlParams);\n _this.log_('Connecting via long-poll to ' + connectURL);\n _this.scriptTagHolder.addTag(connectURL, function () {\n /* do nothing */\n });\n });\n };\n /**\n * Call this when a handshake has completed successfully and we want to consider the connection established\n */\n BrowserPollConnection.prototype.start = function () {\n this.scriptTagHolder.startLongPoll(this.id, this.password);\n this.addDisconnectPingFrame(this.id, this.password);\n };\n /**\n * Forces long polling to be considered as a potential transport\n */\n BrowserPollConnection.forceAllow = function () {\n BrowserPollConnection.forceAllow_ = true;\n };\n /**\n * Forces longpolling to not be considered as a potential transport\n */\n BrowserPollConnection.forceDisallow = function () {\n BrowserPollConnection.forceDisallow_ = true;\n };\n // Static method, use string literal so it can be accessed in a generic way\n BrowserPollConnection.isAvailable = function () {\n // NOTE: In React-Native there's normally no 'document', but if you debug a React-Native app in\n // the Chrome debugger, 'document' is defined, but document.createElement is null (2015/06/08).\n return (BrowserPollConnection.forceAllow_ ||\n (!BrowserPollConnection.forceDisallow_ &&\n typeof document !== 'undefined' &&\n document.createElement != null &&\n !util_1.isChromeExtensionContentScript() &&\n !util_1.isWindowsStoreApp() &&\n !util_3.isNodeSdk()));\n };\n /**\n * No-op for polling\n */\n BrowserPollConnection.prototype.markConnectionHealthy = function () { };\n /**\n * Stops polling and cleans up the iframe\n * @private\n */\n BrowserPollConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.scriptTagHolder) {\n this.scriptTagHolder.close();\n this.scriptTagHolder = null;\n }\n //remove the disconnect frame, which will trigger an XHR call to the server to tell it we're leaving.\n if (this.myDisconnFrame) {\n document.body.removeChild(this.myDisconnFrame);\n this.myDisconnFrame = null;\n }\n if (this.connectTimeoutTimer_) {\n clearTimeout(this.connectTimeoutTimer_);\n this.connectTimeoutTimer_ = null;\n }\n };\n /**\n * Triggered when this transport is closed\n * @private\n */\n BrowserPollConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('Longpoll is closing itself');\n this.shutdown_();\n if (this.onDisconnect_) {\n this.onDisconnect_(this.everConnected_);\n this.onDisconnect_ = null;\n }\n }\n };\n /**\n * External-facing close handler. RealTime has requested we shut down. Kill our connection and tell the server\n * that we've left.\n */\n BrowserPollConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('Longpoll is being closed.');\n this.shutdown_();\n }\n };\n /**\n * Send the JSON object down to the server. It will need to be stringified, base64 encoded, and then\n * broken into chunks (since URLs have a small maximum length).\n * @param {!Object} data The JSON data to transmit.\n */\n BrowserPollConnection.prototype.send = function (data) {\n var dataStr = util_2.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //first, lets get the base64-encoded data\n var base64data = util_2.base64Encode(dataStr);\n //We can only fit a certain amount in each URL, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_1.splitStringBySize(base64data, MAX_PAYLOAD_SIZE);\n //Enqueue each segment for transmission. We assign each chunk a sequential ID and a total number\n //of segments so that we can reassemble the packet on the server.\n for (var i = 0; i < dataSegs.length; i++) {\n this.scriptTagHolder.enqueueSegment(this.curSegmentNum, dataSegs.length, dataSegs[i]);\n this.curSegmentNum++;\n }\n };\n /**\n * This is how we notify the server that we're leaving.\n * We aren't able to send requests with DHTML on a window close event, but we can\n * trigger XHR requests in some browsers (everything but Opera basically).\n * @param {!string} id\n * @param {!string} pw\n */\n BrowserPollConnection.prototype.addDisconnectPingFrame = function (id, pw) {\n if (util_3.isNodeSdk())\n return;\n this.myDisconnFrame = document.createElement('iframe');\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = id;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = pw;\n this.myDisconnFrame.src = this.urlFn(urlParams);\n this.myDisconnFrame.style.display = 'none';\n document.body.appendChild(this.myDisconnFrame);\n };\n /**\n * Used to track the bytes received by this client\n * @param {*} args\n * @private\n */\n BrowserPollConnection.prototype.incrementIncomingBytes_ = function (args) {\n // TODO: This is an annoying perf hit just to track the number of incoming bytes. Maybe it should be opt-in.\n var bytesReceived = util_2.stringify(args).length;\n this.bytesReceived += bytesReceived;\n this.stats_.incrementCounter('bytes_received', bytesReceived);\n };\n return BrowserPollConnection;\n}());\nexports.BrowserPollConnection = BrowserPollConnection;\n/*********************************************************************************************\n * A wrapper around an iframe that is used as a long-polling script holder.\n * @constructor\n *********************************************************************************************/\nvar FirebaseIFrameScriptHolder = /** @class */ (function () {\n /**\n * @param commandCB - The callback to be called when control commands are recevied from the server.\n * @param onMessageCB - The callback to be triggered when responses arrive from the server.\n * @param onDisconnect - The callback to be triggered when this tag holder is closed\n * @param urlFn - A function that provides the URL of the endpoint to send data to.\n */\n function FirebaseIFrameScriptHolder(commandCB, onMessageCB, onDisconnect, urlFn) {\n this.onDisconnect = onDisconnect;\n this.urlFn = urlFn;\n //We maintain a count of all of the outstanding requests, because if we have too many active at once it can cause\n //problems in some browsers.\n /**\n * @type {CountedSet.}\n */\n this.outstandingRequests = new CountedSet_1.CountedSet();\n //A queue of the pending segments waiting for transmission to the server.\n this.pendingSegs = [];\n //A serial number. We use this for two things:\n // 1) A way to ensure the browser doesn't cache responses to polls\n // 2) A way to make the server aware when long-polls arrive in a different order than we started them. The\n // server needs to release both polls in this case or it will cause problems in Opera since Opera can only execute\n // JSONP code in the order it was added to the iframe.\n this.currentSerial = Math.floor(Math.random() * 100000000);\n // This gets set to false when we're \"closing down\" the connection (e.g. we're switching transports but there's still\n // incoming data from the server that we're waiting for).\n this.sendNewPolls = true;\n if (!util_3.isNodeSdk()) {\n //Each script holder registers a couple of uniquely named callbacks with the window. These are called from the\n //iframes where we put the long-polling script tags. We have two callbacks:\n // 1) Command Callback - Triggered for control issues, like starting a connection.\n // 2) Message Callback - Triggered when new data arrives.\n this.uniqueCallbackIdentifier = util_1.LUIDGenerator();\n window[exports.FIREBASE_LONGPOLL_COMMAND_CB_NAME + this.uniqueCallbackIdentifier] = commandCB;\n window[exports.FIREBASE_LONGPOLL_DATA_CB_NAME + this.uniqueCallbackIdentifier] = onMessageCB;\n //Create an iframe for us to add script tags to.\n this.myIFrame = FirebaseIFrameScriptHolder.createIFrame_();\n // Set the iframe's contents.\n var script = '';\n // if we set a javascript url, it's IE and we need to set the document domain. The javascript url is sufficient\n // for ie9, but ie8 needs to do it again in the document itself.\n if (this.myIFrame.src &&\n this.myIFrame.src.substr(0, 'javascript:'.length) === 'javascript:') {\n var currentDomain = document.domain;\n script = '';\n }\n var iframeContents = '' + script + '';\n try {\n this.myIFrame.doc.open();\n this.myIFrame.doc.write(iframeContents);\n this.myIFrame.doc.close();\n }\n catch (e) {\n util_1.log('frame writing exception');\n if (e.stack) {\n util_1.log(e.stack);\n }\n util_1.log(e);\n }\n }\n else {\n this.commandCB = commandCB;\n this.onMessageCB = onMessageCB;\n }\n }\n /**\n * Each browser has its own funny way to handle iframes. Here we mush them all together into one object that I can\n * actually use.\n * @private\n * @return {Element}\n */\n FirebaseIFrameScriptHolder.createIFrame_ = function () {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n // This is necessary in order to initialize the document inside the iframe\n if (document.body) {\n document.body.appendChild(iframe);\n try {\n // If document.domain has been modified in IE, this will throw an error, and we need to set the\n // domain of the iframe's document manually. We can do this via a javascript: url as the src attribute\n // Also note that we must do this *after* the iframe has been appended to the page. Otherwise it doesn't work.\n var a = iframe.contentWindow.document;\n if (!a) {\n // Apologies for the log-spam, I need to do something to keep closure from optimizing out the assignment above.\n util_1.log('No IE domain setting required');\n }\n }\n catch (e) {\n var domain = document.domain;\n iframe.src =\n \"javascript:void((function(){document.open();document.domain='\" +\n domain +\n \"';document.close();})())\";\n }\n }\n else {\n // LongPollConnection attempts to delay initialization until the document is ready, so hopefully this\n // never gets hit.\n throw 'Document body has not initialized. Wait to initialize Firebase until after the document is ready.';\n }\n // Get the document of the iframe in a browser-specific way.\n if (iframe.contentDocument) {\n iframe.doc = iframe.contentDocument; // Firefox, Opera, Safari\n }\n else if (iframe.contentWindow) {\n iframe.doc = iframe.contentWindow.document; // Internet Explorer\n }\n else if (iframe.document) {\n iframe.doc = iframe.document; //others?\n }\n return iframe;\n };\n /**\n * Cancel all outstanding queries and remove the frame.\n */\n FirebaseIFrameScriptHolder.prototype.close = function () {\n var _this = this;\n //Mark this iframe as dead, so no new requests are sent.\n this.alive = false;\n if (this.myIFrame) {\n //We have to actually remove all of the html inside this iframe before removing it from the\n //window, or IE will continue loading and executing the script tags we've already added, which\n //can lead to some errors being thrown. Setting innerHTML seems to be the easiest way to do this.\n this.myIFrame.doc.body.innerHTML = '';\n setTimeout(function () {\n if (_this.myIFrame !== null) {\n document.body.removeChild(_this.myIFrame);\n _this.myIFrame = null;\n }\n }, Math.floor(0));\n }\n if (util_3.isNodeSdk() && this.myID) {\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM] = 't';\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n var theURL = this.urlFn(urlParams);\n FirebaseIFrameScriptHolder.nodeRestRequest(theURL);\n }\n // Protect from being called recursively.\n var onDisconnect = this.onDisconnect;\n if (onDisconnect) {\n this.onDisconnect = null;\n onDisconnect();\n }\n };\n /**\n * Actually start the long-polling session by adding the first script tag(s) to the iframe.\n * @param {!string} id - The ID of this connection\n * @param {!string} pw - The password for this connection\n */\n FirebaseIFrameScriptHolder.prototype.startLongPoll = function (id, pw) {\n this.myID = id;\n this.myPW = pw;\n this.alive = true;\n //send the initial request. If there are requests queued, make sure that we transmit as many as we are currently able to.\n while (this.newRequest_()) { }\n };\n /**\n * This is called any time someone might want a script tag to be added. It adds a script tag when there aren't\n * too many outstanding requests and we are still alive.\n *\n * If there are outstanding packet segments to send, it sends one. If there aren't, it sends a long-poll anyways if\n * needed.\n */\n FirebaseIFrameScriptHolder.prototype.newRequest_ = function () {\n // We keep one outstanding request open all the time to receive data, but if we need to send data\n // (pendingSegs.length > 0) then we create a new request to send the data. The server will automatically\n // close the old request.\n if (this.alive &&\n this.sendNewPolls &&\n this.outstandingRequests.count() < (this.pendingSegs.length > 0 ? 2 : 1)) {\n //construct our url\n this.currentSerial++;\n var urlParams = {};\n urlParams[exports.FIREBASE_LONGPOLL_ID_PARAM] = this.myID;\n urlParams[exports.FIREBASE_LONGPOLL_PW_PARAM] = this.myPW;\n urlParams[exports.FIREBASE_LONGPOLL_SERIAL_PARAM] = this.currentSerial;\n var theURL = this.urlFn(urlParams);\n //Now add as much data as we can.\n var curDataString = '';\n var i = 0;\n while (this.pendingSegs.length > 0) {\n //first, lets see if the next segment will fit.\n var nextSeg = this.pendingSegs[0];\n if (nextSeg.d.length + SEG_HEADER_SIZE + curDataString.length <=\n MAX_URL_DATA_SIZE) {\n //great, the segment will fit. Lets append it.\n var theSeg = this.pendingSegs.shift();\n curDataString =\n curDataString +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM +\n i +\n '=' +\n theSeg.seg +\n '&' +\n exports.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET +\n i +\n '=' +\n theSeg.ts +\n '&' +\n exports.FIREBASE_LONGPOLL_DATA_PARAM +\n i +\n '=' +\n theSeg.d;\n i++;\n }\n else {\n break;\n }\n }\n theURL = theURL + curDataString;\n this.addLongPollTag_(theURL, this.currentSerial);\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * Queue a packet for transmission to the server.\n * @param segnum - A sequential id for this packet segment used for reassembly\n * @param totalsegs - The total number of segments in this packet\n * @param data - The data for this segment.\n */\n FirebaseIFrameScriptHolder.prototype.enqueueSegment = function (segnum, totalsegs, data) {\n //add this to the queue of segments to send.\n this.pendingSegs.push({ seg: segnum, ts: totalsegs, d: data });\n //send the data immediately if there isn't already data being transmitted, unless\n //startLongPoll hasn't been called yet.\n if (this.alive) {\n this.newRequest_();\n }\n };\n /**\n * Add a script tag for a regular long-poll request.\n * @param {!string} url - The URL of the script tag.\n * @param {!number} serial - The serial number of the request.\n * @private\n */\n FirebaseIFrameScriptHolder.prototype.addLongPollTag_ = function (url, serial) {\n var _this = this;\n //remember that we sent this request.\n this.outstandingRequests.add(serial, 1);\n var doNewRequest = function () {\n _this.outstandingRequests.remove(serial);\n _this.newRequest_();\n };\n // If this request doesn't return on its own accord (by the server sending us some data), we'll\n // create a new one after the KEEPALIVE interval to make sure we always keep a fresh request open.\n var keepaliveTimeout = setTimeout(doNewRequest, Math.floor(KEEPALIVE_REQUEST_INTERVAL));\n var readyStateCB = function () {\n // Request completed. Cancel the keepalive.\n clearTimeout(keepaliveTimeout);\n // Trigger a new request so we can continue receiving data.\n doNewRequest();\n };\n this.addTag(url, readyStateCB);\n };\n /**\n * Add an arbitrary script tag to the iframe.\n * @param {!string} url - The URL for the script tag source.\n * @param {!function()} loadCB - A callback to be triggered once the script has loaded.\n */\n FirebaseIFrameScriptHolder.prototype.addTag = function (url, loadCB) {\n var _this = this;\n if (util_3.isNodeSdk()) {\n this.doNodeLongPoll(url, loadCB);\n }\n else {\n setTimeout(function () {\n try {\n // if we're already closed, don't add this poll\n if (!_this.sendNewPolls)\n return;\n var newScript_1 = _this.myIFrame.doc.createElement('script');\n newScript_1.type = 'text/javascript';\n newScript_1.async = true;\n newScript_1.src = url;\n newScript_1.onload = newScript_1.onreadystatechange = function () {\n var rstate = newScript_1.readyState;\n if (!rstate || rstate === 'loaded' || rstate === 'complete') {\n newScript_1.onload = newScript_1.onreadystatechange = null;\n if (newScript_1.parentNode) {\n newScript_1.parentNode.removeChild(newScript_1);\n }\n loadCB();\n }\n };\n newScript_1.onerror = function () {\n util_1.log('Long-poll script failed to load: ' + url);\n _this.sendNewPolls = false;\n _this.close();\n };\n _this.myIFrame.doc.body.appendChild(newScript_1);\n }\n catch (e) {\n // TODO: we should make this error visible somehow\n }\n }, Math.floor(1));\n }\n };\n return FirebaseIFrameScriptHolder;\n}());\nexports.FirebaseIFrameScriptHolder = FirebaseIFrameScriptHolder;\n\n//# sourceMappingURL=BrowserPollConnection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/BrowserPollConnection.js\n// module id = 53\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = require(\"@firebase/app\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../core/util/util\");\nvar StatsManager_1 = require(\"../core/stats/StatsManager\");\nvar Constants_1 = require(\"./Constants\");\nvar util_3 = require(\"@firebase/util\");\nvar storage_1 = require(\"../core/storage/storage\");\nvar util_4 = require(\"@firebase/util\");\nvar util_5 = require(\"@firebase/util\");\nvar WEBSOCKET_MAX_FRAME_SIZE = 16384;\nvar WEBSOCKET_KEEPALIVE_INTERVAL = 45000;\nvar WebSocketImpl = null;\nif (typeof MozWebSocket !== 'undefined') {\n WebSocketImpl = MozWebSocket;\n}\nelse if (typeof WebSocket !== 'undefined') {\n WebSocketImpl = WebSocket;\n}\nfunction setWebSocketImpl(impl) {\n WebSocketImpl = impl;\n}\nexports.setWebSocketImpl = setWebSocketImpl;\n/**\n * Create a new websocket connection with the given callbacks.\n * @constructor\n * @implements {Transport}\n */\nvar WebSocketConnection = /** @class */ (function () {\n /**\n * @param {string} connId identifier for this transport\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n */\n function WebSocketConnection(connId, repoInfo, transportSessionId, lastSessionId) {\n this.connId = connId;\n this.keepaliveTimer = null;\n this.frames = null;\n this.totalFrames = 0;\n this.bytesSent = 0;\n this.bytesReceived = 0;\n this.log_ = util_2.logWrapper(this.connId);\n this.stats_ = StatsManager_1.StatsManager.getCollection(repoInfo);\n this.connURL = WebSocketConnection.connectionURL_(repoInfo, transportSessionId, lastSessionId);\n }\n /**\n * @param {RepoInfo} repoInfo The info for the websocket endpoint.\n * @param {string=} transportSessionId Optional transportSessionId if this is connecting to an existing transport\n * session\n * @param {string=} lastSessionId Optional lastSessionId if there was a previous connection\n * @return {string} connection url\n * @private\n */\n WebSocketConnection.connectionURL_ = function (repoInfo, transportSessionId, lastSessionId) {\n var urlParams = {};\n urlParams[Constants_1.VERSION_PARAM] = Constants_1.PROTOCOL_VERSION;\n if (!util_5.isNodeSdk() &&\n typeof location !== 'undefined' &&\n location.href &&\n location.href.indexOf(Constants_1.FORGE_DOMAIN) !== -1) {\n urlParams[Constants_1.REFERER_PARAM] = Constants_1.FORGE_REF;\n }\n if (transportSessionId) {\n urlParams[Constants_1.TRANSPORT_SESSION_PARAM] = transportSessionId;\n }\n if (lastSessionId) {\n urlParams[Constants_1.LAST_SESSION_PARAM] = lastSessionId;\n }\n return repoInfo.connectionURL(Constants_1.WEBSOCKET, urlParams);\n };\n /**\n *\n * @param onMessage Callback when messages arrive\n * @param onDisconnect Callback with connection lost.\n */\n WebSocketConnection.prototype.open = function (onMessage, onDisconnect) {\n var _this = this;\n this.onDisconnect = onDisconnect;\n this.onMessage = onMessage;\n this.log_('Websocket connecting to ' + this.connURL);\n this.everConnected_ = false;\n // Assume failure until proven otherwise.\n storage_1.PersistentStorage.set('previous_websocket_failure', true);\n try {\n if (util_5.isNodeSdk()) {\n var device = util_3.CONSTANTS.NODE_ADMIN ? 'AdminNode' : 'Node';\n // UA Format: Firebase////\n var options = {\n headers: {\n 'User-Agent': \"Firebase/\" + Constants_1.PROTOCOL_VERSION + \"/\" + app_1.default.SDK_VERSION + \"/\" + process.platform + \"/\" + device\n }\n };\n // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.\n var env = process['env'];\n var proxy = this.connURL.indexOf('wss://') == 0\n ? env['HTTPS_PROXY'] || env['https_proxy']\n : env['HTTP_PROXY'] || env['http_proxy'];\n if (proxy) {\n options['proxy'] = { origin: proxy };\n }\n this.mySock = new WebSocketImpl(this.connURL, [], options);\n }\n else {\n this.mySock = new WebSocketImpl(this.connURL);\n }\n }\n catch (e) {\n this.log_('Error instantiating WebSocket.');\n var error = e.message || e.data;\n if (error) {\n this.log_(error);\n }\n this.onClosed_();\n return;\n }\n this.mySock.onopen = function () {\n _this.log_('Websocket connected.');\n _this.everConnected_ = true;\n };\n this.mySock.onclose = function () {\n _this.log_('Websocket connection was disconnected.');\n _this.mySock = null;\n _this.onClosed_();\n };\n this.mySock.onmessage = function (m) {\n _this.handleIncomingFrame(m);\n };\n this.mySock.onerror = function (e) {\n _this.log_('WebSocket error. Closing connection.');\n var error = e.message || e.data;\n if (error) {\n _this.log_(error);\n }\n _this.onClosed_();\n };\n };\n /**\n * No-op for websockets, we don't need to do anything once the connection is confirmed as open\n */\n WebSocketConnection.prototype.start = function () { };\n WebSocketConnection.forceDisallow = function () {\n WebSocketConnection.forceDisallow_ = true;\n };\n WebSocketConnection.isAvailable = function () {\n var isOldAndroid = false;\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n var oldAndroidRegex = /Android ([0-9]{0,}\\.[0-9]{0,})/;\n var oldAndroidMatch = navigator.userAgent.match(oldAndroidRegex);\n if (oldAndroidMatch && oldAndroidMatch.length > 1) {\n if (parseFloat(oldAndroidMatch[1]) < 4.4) {\n isOldAndroid = true;\n }\n }\n }\n return (!isOldAndroid &&\n WebSocketImpl !== null &&\n !WebSocketConnection.forceDisallow_);\n };\n /**\n * Returns true if we previously failed to connect with this transport.\n * @return {boolean}\n */\n WebSocketConnection.previouslyFailed = function () {\n // If our persistent storage is actually only in-memory storage,\n // we default to assuming that it previously failed to be safe.\n return (storage_1.PersistentStorage.isInMemoryStorage ||\n storage_1.PersistentStorage.get('previous_websocket_failure') === true);\n };\n WebSocketConnection.prototype.markConnectionHealthy = function () {\n storage_1.PersistentStorage.remove('previous_websocket_failure');\n };\n WebSocketConnection.prototype.appendFrame_ = function (data) {\n this.frames.push(data);\n if (this.frames.length == this.totalFrames) {\n var fullMess = this.frames.join('');\n this.frames = null;\n var jsonMess = util_4.jsonEval(fullMess);\n //handle the message\n this.onMessage(jsonMess);\n }\n };\n /**\n * @param {number} frameCount The number of frames we are expecting from the server\n * @private\n */\n WebSocketConnection.prototype.handleNewFrameCount_ = function (frameCount) {\n this.totalFrames = frameCount;\n this.frames = [];\n };\n /**\n * Attempts to parse a frame count out of some text. If it can't, assumes a value of 1\n * @param {!String} data\n * @return {?String} Any remaining data to be process, or null if there is none\n * @private\n */\n WebSocketConnection.prototype.extractFrameCount_ = function (data) {\n util_1.assert(this.frames === null, 'We already have a frame buffer');\n // TODO: The server is only supposed to send up to 9999 frames (i.e. length <= 4), but that isn't being enforced\n // currently. So allowing larger frame counts (length <= 6). See https://app.asana.com/0/search/8688598998380/8237608042508\n if (data.length <= 6) {\n var frameCount = Number(data);\n if (!isNaN(frameCount)) {\n this.handleNewFrameCount_(frameCount);\n return null;\n }\n }\n this.handleNewFrameCount_(1);\n return data;\n };\n /**\n * Process a websocket frame that has arrived from the server.\n * @param mess The frame data\n */\n WebSocketConnection.prototype.handleIncomingFrame = function (mess) {\n if (this.mySock === null)\n return; // Chrome apparently delivers incoming packets even after we .close() the connection sometimes.\n var data = mess['data'];\n this.bytesReceived += data.length;\n this.stats_.incrementCounter('bytes_received', data.length);\n this.resetKeepAlive();\n if (this.frames !== null) {\n // we're buffering\n this.appendFrame_(data);\n }\n else {\n // try to parse out a frame count, otherwise, assume 1 and process it\n var remainingData = this.extractFrameCount_(data);\n if (remainingData !== null) {\n this.appendFrame_(remainingData);\n }\n }\n };\n /**\n * Send a message to the server\n * @param {Object} data The JSON object to transmit\n */\n WebSocketConnection.prototype.send = function (data) {\n this.resetKeepAlive();\n var dataStr = util_4.stringify(data);\n this.bytesSent += dataStr.length;\n this.stats_.incrementCounter('bytes_sent', dataStr.length);\n //We can only fit a certain amount in each websocket frame, so we need to split this request\n //up into multiple pieces if it doesn't fit in one request.\n var dataSegs = util_2.splitStringBySize(dataStr, WEBSOCKET_MAX_FRAME_SIZE);\n //Send the length header\n if (dataSegs.length > 1) {\n this.sendString_(String(dataSegs.length));\n }\n //Send the actual data in segments.\n for (var i = 0; i < dataSegs.length; i++) {\n this.sendString_(dataSegs[i]);\n }\n };\n WebSocketConnection.prototype.shutdown_ = function () {\n this.isClosed_ = true;\n if (this.keepaliveTimer) {\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = null;\n }\n if (this.mySock) {\n this.mySock.close();\n this.mySock = null;\n }\n };\n WebSocketConnection.prototype.onClosed_ = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is closing itself');\n this.shutdown_();\n // since this is an internal close, trigger the close listener\n if (this.onDisconnect) {\n this.onDisconnect(this.everConnected_);\n this.onDisconnect = null;\n }\n }\n };\n /**\n * External-facing close handler.\n * Close the websocket and kill the connection.\n */\n WebSocketConnection.prototype.close = function () {\n if (!this.isClosed_) {\n this.log_('WebSocket is being closed');\n this.shutdown_();\n }\n };\n /**\n * Kill the current keepalive timer and start a new one, to ensure that it always fires N seconds after\n * the last activity.\n */\n WebSocketConnection.prototype.resetKeepAlive = function () {\n var _this = this;\n clearInterval(this.keepaliveTimer);\n this.keepaliveTimer = setInterval(function () {\n //If there has been no websocket activity for a while, send a no-op\n if (_this.mySock) {\n _this.sendString_('0');\n }\n _this.resetKeepAlive();\n }, Math.floor(WEBSOCKET_KEEPALIVE_INTERVAL));\n };\n /**\n * Send a string over the websocket.\n *\n * @param {string} str String to send.\n * @private\n */\n WebSocketConnection.prototype.sendString_ = function (str) {\n // Firefox seems to sometimes throw exceptions (NS_ERROR_UNEXPECTED) from websocket .send()\n // calls for some unknown reason. We treat these as an error and disconnect.\n // See https://app.asana.com/0/58926111402292/68021340250410\n try {\n this.mySock.send(str);\n }\n catch (e) {\n this.log_('Exception thrown from WebSocket.send():', e.message || e.data, 'Closing connection.');\n setTimeout(this.onClosed_.bind(this), 0);\n }\n };\n /**\n * Number of response before we consider the connection \"healthy.\"\n * @type {number}\n */\n WebSocketConnection.responsesRequiredToBeHealthy = 2;\n /**\n * Time to wait for the connection te become healthy before giving up.\n * @type {number}\n */\n WebSocketConnection.healthyTimeout = 30000;\n return WebSocketConnection;\n}());\nexports.WebSocketConnection = WebSocketConnection;\n\n//# sourceMappingURL=WebSocketConnection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/WebSocketConnection.js\n// module id = 54\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Interface defining the set of actions that can be performed against the Firebase server\n * (basically corresponds to our wire protocol).\n *\n * @interface\n */\nvar ServerActions = /** @class */ (function () {\n function ServerActions() {\n }\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.put = function (pathString, data, onComplete, hash) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, ?string)} onComplete\n * @param {string=} hash\n */\n ServerActions.prototype.merge = function (pathString, data, onComplete, hash) { };\n /**\n * Refreshes the auth token for the current connection.\n * @param {string} token The authentication token\n */\n ServerActions.prototype.refreshAuthToken = function (token) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectPut = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {*} data\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectMerge = function (pathString, data, onComplete) { };\n /**\n * @param {string} pathString\n * @param {function(string, string)=} onComplete\n */\n ServerActions.prototype.onDisconnectCancel = function (pathString, onComplete) { };\n /**\n * @param {Object.} stats\n */\n ServerActions.prototype.reportStats = function (stats) { };\n return ServerActions;\n}());\nexports.ServerActions = ServerActions;\n\n//# sourceMappingURL=ServerActions.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/ServerActions.js\n// module id = 55\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = require(\"./IndexedFilter\");\nvar PriorityIndex_1 = require(\"../../snap/indexes/PriorityIndex\");\nvar Node_1 = require(\"../../../core/snap/Node\");\nvar ChildrenNode_1 = require(\"../../snap/ChildrenNode\");\n/**\n * Filters nodes by range and uses an IndexFilter to track any changes after filtering the node\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar RangedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function RangedFilter(params) {\n this.indexedFilter_ = new IndexedFilter_1.IndexedFilter(params.getIndex());\n this.index_ = params.getIndex();\n this.startPost_ = RangedFilter.getStartPost_(params);\n this.endPost_ = RangedFilter.getEndPost_(params);\n }\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getStartPost = function () {\n return this.startPost_;\n };\n /**\n * @return {!NamedNode}\n */\n RangedFilter.prototype.getEndPost = function () {\n return this.endPost_;\n };\n /**\n * @param {!NamedNode} node\n * @return {boolean}\n */\n RangedFilter.prototype.matches = function (node) {\n return (this.index_.compare(this.getStartPost(), node) <= 0 &&\n this.index_.compare(node, this.getEndPost()) <= 0);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n return this.indexedFilter_.updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n if (newSnap.isLeafNode()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n newSnap = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n var filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var self = this;\n newSnap.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n if (!self.matches(new Node_1.NamedNode(key, childNode))) {\n filtered = filtered.updateImmediateChild(key, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n });\n return this.indexedFilter_.updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndexedFilter = function () {\n return this.indexedFilter_;\n };\n /**\n * @inheritDoc\n */\n RangedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getStartPost_ = function (params) {\n if (params.hasStart()) {\n var startName = params.getIndexStartName();\n return params.getIndex().makePost(params.getIndexStartValue(), startName);\n }\n else {\n return params.getIndex().minPost();\n }\n };\n /**\n * @param {!QueryParams} params\n * @return {!NamedNode}\n * @private\n */\n RangedFilter.getEndPost_ = function (params) {\n if (params.hasEnd()) {\n var endName = params.getIndexEndName();\n return params.getIndex().makePost(params.getIndexEndValue(), endName);\n }\n else {\n return params.getIndex().maxPost();\n }\n };\n return RangedFilter;\n}());\nexports.RangedFilter = RangedFilter;\n\n//# sourceMappingURL=RangedFilter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/filter/RangedFilter.js\n// module id = 56\n// module chunks = 0","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nmodule.exports = require('@firebase/database');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./database/index.js\n// module id = 78\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar app_1 = require(\"@firebase/app\");\nvar Database_1 = require(\"./src/api/Database\");\nexports.Database = Database_1.Database;\nvar Query_1 = require(\"./src/api/Query\");\nexports.Query = Query_1.Query;\nvar Reference_1 = require(\"./src/api/Reference\");\nexports.Reference = Reference_1.Reference;\nvar util_1 = require(\"./src/core/util/util\");\nexports.enableLogging = util_1.enableLogging;\nvar RepoManager_1 = require(\"./src/core/RepoManager\");\nvar INTERNAL = require(\"./src/api/internal\");\nvar TEST_ACCESS = require(\"./src/api/test_access\");\nvar util_2 = require(\"@firebase/util\");\nvar ServerValue = Database_1.Database.ServerValue;\nexports.ServerValue = ServerValue;\nfunction registerDatabase(instance) {\n // Register the Database Service with the 'firebase' namespace.\n var namespace = instance.INTERNAL.registerService('database', function (app, unused, url) { return RepoManager_1.RepoManager.getInstance().databaseFromApp(app, url); }, \n // firebase.database namespace properties\n {\n Reference: Reference_1.Reference,\n Query: Query_1.Query,\n Database: Database_1.Database,\n enableLogging: util_1.enableLogging,\n INTERNAL: INTERNAL,\n ServerValue: ServerValue,\n TEST_ACCESS: TEST_ACCESS\n }, null, true);\n if (util_2.isNodeSdk()) {\n module.exports = namespace;\n }\n}\nexports.registerDatabase = registerDatabase;\nregisterDatabase(app_1.default);\nvar DataSnapshot_1 = require(\"./src/api/DataSnapshot\");\nexports.DataSnapshot = DataSnapshot_1.DataSnapshot;\nvar onDisconnect_1 = require(\"./src/api/onDisconnect\");\nexports.OnDisconnect = onDisconnect_1.OnDisconnect;\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/index.js\n// module id = 79\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Wraps a DOM Storage object and:\n * - automatically encode objects as JSON strings before storing them to allow us to store arbitrary types.\n * - prefixes names with \"firebase:\" to avoid collisions with app data.\n *\n * We automatically (see storage.js) create two such wrappers, one for sessionStorage,\n * and one for localStorage.\n *\n * @constructor\n */\nvar DOMStorageWrapper = /** @class */ (function () {\n /**\n * @param {Storage} domStorage_ The underlying storage object (e.g. localStorage or sessionStorage)\n */\n function DOMStorageWrapper(domStorage_) {\n this.domStorage_ = domStorage_;\n // Use a prefix to avoid collisions with other stuff saved by the app.\n this.prefix_ = 'firebase:';\n }\n /**\n * @param {string} key The key to save the value under\n * @param {?Object} value The value being stored, or null to remove the key.\n */\n DOMStorageWrapper.prototype.set = function (key, value) {\n if (value == null) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n }\n else {\n this.domStorage_.setItem(this.prefixedName_(key), util_1.stringify(value));\n }\n };\n /**\n * @param {string} key\n * @return {*} The value that was stored under this key, or null\n */\n DOMStorageWrapper.prototype.get = function (key) {\n var storedVal = this.domStorage_.getItem(this.prefixedName_(key));\n if (storedVal == null) {\n return null;\n }\n else {\n return util_1.jsonEval(storedVal);\n }\n };\n /**\n * @param {string} key\n */\n DOMStorageWrapper.prototype.remove = function (key) {\n this.domStorage_.removeItem(this.prefixedName_(key));\n };\n /**\n * @param {string} name\n * @return {string}\n */\n DOMStorageWrapper.prototype.prefixedName_ = function (name) {\n return this.prefix_ + name;\n };\n DOMStorageWrapper.prototype.toString = function () {\n return this.domStorage_.toString();\n };\n return DOMStorageWrapper;\n}());\nexports.DOMStorageWrapper = DOMStorageWrapper;\n\n//# sourceMappingURL=DOMStorageWrapper.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/storage/DOMStorageWrapper.js\n// module id = 80\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * An in-memory storage implementation that matches the API of DOMStorageWrapper\n * (TODO: create interface for both to implement).\n *\n * @constructor\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n this.cache_ = {};\n this.isInMemoryStorage = true;\n }\n MemoryStorage.prototype.set = function (key, value) {\n if (value == null) {\n delete this.cache_[key];\n }\n else {\n this.cache_[key] = value;\n }\n };\n MemoryStorage.prototype.get = function (key) {\n if (util_1.contains(this.cache_, key)) {\n return this.cache_[key];\n }\n return null;\n };\n MemoryStorage.prototype.remove = function (key) {\n delete this.cache_[key];\n };\n return MemoryStorage;\n}());\nexports.MemoryStorage = MemoryStorage;\n\n//# sourceMappingURL=MemoryStorage.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/storage/MemoryStorage.js\n// module id = 81\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar TransactionResult = /** @class */ (function () {\n /**\n * A type for the resolve value of Firebase.transaction.\n * @constructor\n * @dict\n * @param {boolean} committed\n * @param {DataSnapshot} snapshot\n */\n function TransactionResult(committed, snapshot) {\n this.committed = committed;\n this.snapshot = snapshot;\n }\n // Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary\n // for end-users\n TransactionResult.prototype.toJSON = function () {\n util_1.validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);\n return { committed: this.committed, snapshot: this.snapshot.toJSON() };\n };\n return TransactionResult;\n}());\nexports.TransactionResult = TransactionResult;\n\n//# sourceMappingURL=TransactionResult.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/TransactionResult.js\n// module id = 82\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Fancy ID generator that creates 20-character string identifiers with the\n * following properties:\n *\n * 1. They're based on timestamp so that they sort *after* any existing ids.\n * 2. They contain 72-bits of random data after the timestamp so that IDs won't\n * collide with other clients' IDs.\n * 3. They sort *lexicographically* (so the timestamp is converted to characters\n * that will sort properly).\n * 4. They're monotonically increasing. Even if you generate more than one in\n * the same timestamp, the latter ones will sort after the former ones. We do\n * this by using the previous random bits but \"incrementing\" them by 1 (only\n * in the case of a timestamp collision).\n */\nexports.nextPushId = (function () {\n // Modeled after base64 web-safe chars, but ordered by ASCII.\n var PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n // Timestamp of last push, used to prevent local collisions if you push twice\n // in one ms.\n var lastPushTime = 0;\n // We generate 72-bits of randomness which get turned into 12 characters and\n // appended to the timestamp to prevent collisions with other clients. We\n // store the last characters we generated because in the event of a collision,\n // we'll use those same characters except \"incremented\" by one.\n var lastRandChars = [];\n return function (now) {\n var duplicateTime = now === lastPushTime;\n lastPushTime = now;\n var i;\n var timeStampChars = new Array(8);\n for (i = 7; i >= 0; i--) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n // NOTE: Can't use << here because javascript will convert to int and lose\n // the upper bits.\n now = Math.floor(now / 64);\n }\n util_1.assert(now === 0, 'Cannot push at time == 0');\n var id = timeStampChars.join('');\n if (!duplicateTime) {\n for (i = 0; i < 12; i++) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n }\n else {\n // If the timestamp hasn't changed since last push, use the same random\n // number, except incremented by 1.\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i--) {\n lastRandChars[i] = 0;\n }\n lastRandChars[i]++;\n }\n for (i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n util_1.assert(id.length === 20, 'nextPushId: Length should be 20.');\n return id;\n };\n})();\n\n//# sourceMappingURL=NextPushId.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/NextPushId.js\n// module id = 83\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DataSnapshot_1 = require(\"../../api/DataSnapshot\");\nvar Event_1 = require(\"./Event\");\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Represents registration for 'value' events.\n */\nvar ValueEventRegistration = /** @class */ (function () {\n /**\n * @param {?function(!DataSnapshot)} callback_\n * @param {?function(Error)} cancelCallback_\n * @param {?Object} context_\n */\n function ValueEventRegistration(callback_, cancelCallback_, context_) {\n this.callback_ = callback_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.respondsTo = function (eventType) {\n return eventType === 'value';\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createEvent = function (change, query) {\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent('value', this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, query.getRef(), index));\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_1 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_1.call(ctx, eventData.error);\n };\n }\n else {\n var cb_1 = this.callback_;\n return function () {\n cb_1.call(ctx, eventData.snapshot);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.matches = function (other) {\n if (!(other instanceof ValueEventRegistration)) {\n return false;\n }\n else if (!other.callback_ || !this.callback_) {\n // If no callback specified, we consider it to match any callback.\n return true;\n }\n else {\n return (other.callback_ === this.callback_ && other.context_ === this.context_);\n }\n };\n /**\n * @inheritDoc\n */\n ValueEventRegistration.prototype.hasAnyCallback = function () {\n return this.callback_ !== null;\n };\n return ValueEventRegistration;\n}());\nexports.ValueEventRegistration = ValueEventRegistration;\n/**\n * Represents the registration of 1 or more child_xxx events.\n *\n * Currently, it is always exactly 1 child_xxx event, but the idea is we might let you\n * register a group of callbacks together in the future.\n *\n * @constructor\n * @implements {EventRegistration}\n */\nvar ChildEventRegistration = /** @class */ (function () {\n /**\n * @param {?Object.} callbacks_\n * @param {?function(Error)} cancelCallback_\n * @param {Object=} context_\n */\n function ChildEventRegistration(callbacks_, cancelCallback_, context_) {\n this.callbacks_ = callbacks_;\n this.cancelCallback_ = cancelCallback_;\n this.context_ = context_;\n }\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.respondsTo = function (eventType) {\n var eventToCheck = eventType === 'children_added' ? 'child_added' : eventType;\n eventToCheck =\n eventToCheck === 'children_removed' ? 'child_removed' : eventToCheck;\n return util_1.contains(this.callbacks_, eventToCheck);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createCancelEvent = function (error, path) {\n if (this.cancelCallback_) {\n return new Event_1.CancelEvent(this, error, path);\n }\n else {\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.createEvent = function (change, query) {\n util_2.assert(change.childName != null, 'Child events should have a childName.');\n var ref = query.getRef().child(/** @type {!string} */ (change.childName));\n var index = query.getQueryParams().getIndex();\n return new Event_1.DataEvent(change.type, this, new DataSnapshot_1.DataSnapshot(change.snapshotNode, ref, index), change.prevName);\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.getEventRunner = function (eventData) {\n var ctx = this.context_;\n if (eventData.getEventType() === 'cancel') {\n util_2.assert(this.cancelCallback_, 'Raising a cancel event on a listener with no cancel callback');\n var cancelCB_2 = this.cancelCallback_;\n return function () {\n // We know that error exists, we checked above that this is a cancel event\n cancelCB_2.call(ctx, eventData.error);\n };\n }\n else {\n var cb_2 = this.callbacks_[eventData.eventType];\n return function () {\n cb_2.call(ctx, eventData.snapshot, eventData.prevName);\n };\n }\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.matches = function (other) {\n if (other instanceof ChildEventRegistration) {\n if (!this.callbacks_ || !other.callbacks_) {\n return true;\n }\n else if (this.context_ === other.context_) {\n var otherCount = util_1.getCount(other.callbacks_);\n var thisCount = util_1.getCount(this.callbacks_);\n if (otherCount === thisCount) {\n // If count is 1, do an exact match on eventType, if either is defined but null, it's a match.\n // If event types don't match, not a match\n // If count is not 1, exact match across all\n if (otherCount === 1) {\n var otherKey /** @type {!string} */ = util_1.getAnyKey(other.callbacks_);\n var thisKey /** @type {!string} */ = util_1.getAnyKey(this.callbacks_);\n return (thisKey === otherKey &&\n (!other.callbacks_[otherKey] ||\n !this.callbacks_[thisKey] ||\n other.callbacks_[otherKey] === this.callbacks_[thisKey]));\n }\n else {\n // Exact match on each key.\n return util_1.every(this.callbacks_, function (eventType, cb) { return other.callbacks_[eventType] === cb; });\n }\n }\n }\n }\n return false;\n };\n /**\n * @inheritDoc\n */\n ChildEventRegistration.prototype.hasAnyCallback = function () {\n return this.callbacks_ !== null;\n };\n return ChildEventRegistration;\n}());\nexports.ChildEventRegistration = ChildEventRegistration;\n\n//# sourceMappingURL=EventRegistration.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/EventRegistration.js\n// module id = 84\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\n/**\n * Encapsulates the data needed to raise an event\n * @implements {Event}\n */\nvar DataEvent = /** @class */ (function () {\n /**\n * @param {!string} eventType One of: value, child_added, child_changed, child_moved, child_removed\n * @param {!EventRegistration} eventRegistration The function to call to with the event data. User provided\n * @param {!DataSnapshot} snapshot The data backing the event\n * @param {?string=} prevName Optional, the name of the previous child for child_* events.\n */\n function DataEvent(eventType, eventRegistration, snapshot, prevName) {\n this.eventType = eventType;\n this.eventRegistration = eventRegistration;\n this.snapshot = snapshot;\n this.prevName = prevName;\n }\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getPath = function () {\n var ref = this.snapshot.getRef();\n if (this.eventType === 'value') {\n return ref.path;\n }\n else {\n return ref.getParent().path;\n }\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventType = function () {\n return this.eventType;\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n DataEvent.prototype.toString = function () {\n return (this.getPath().toString() +\n ':' +\n this.eventType +\n ':' +\n util_1.stringify(this.snapshot.exportVal()));\n };\n return DataEvent;\n}());\nexports.DataEvent = DataEvent;\nvar CancelEvent = /** @class */ (function () {\n /**\n * @param {EventRegistration} eventRegistration\n * @param {Error} error\n * @param {!Path} path\n */\n function CancelEvent(eventRegistration, error, path) {\n this.eventRegistration = eventRegistration;\n this.error = error;\n this.path = path;\n }\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getPath = function () {\n return this.path;\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventType = function () {\n return 'cancel';\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.getEventRunner = function () {\n return this.eventRegistration.getEventRunner(this);\n };\n /**\n * @inheritDoc\n */\n CancelEvent.prototype.toString = function () {\n return this.path.toString() + ':cancel';\n };\n return CancelEvent;\n}());\nexports.CancelEvent = CancelEvent;\n\n//# sourceMappingURL=Event.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/Event.js\n// module id = 85\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util/util\");\nvar AckUserWrite_1 = require(\"./operation/AckUserWrite\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\nvar util_3 = require(\"@firebase/util\");\nvar ImmutableTree_1 = require(\"./util/ImmutableTree\");\nvar ListenComplete_1 = require(\"./operation/ListenComplete\");\nvar Merge_1 = require(\"./operation/Merge\");\nvar Operation_1 = require(\"./operation/Operation\");\nvar Overwrite_1 = require(\"./operation/Overwrite\");\nvar Path_1 = require(\"./util/Path\");\nvar SyncPoint_1 = require(\"./SyncPoint\");\nvar WriteTree_1 = require(\"./WriteTree\");\n/**\n * SyncTree is the central class for managing event callback registration, data caching, views\n * (query processing), and event generation. There are typically two SyncTree instances for\n * each Repo, one for the normal Firebase data, and one for the .info data.\n *\n * It has a number of responsibilities, including:\n * - Tracking all user event callbacks (registered via addEventRegistration() and removeEventRegistration()).\n * - Applying and caching data changes for user set(), transaction(), and update() calls\n * (applyUserOverwrite(), applyUserMerge()).\n * - Applying and caching data changes for server data changes (applyServerOverwrite(),\n * applyServerMerge()).\n * - Generating user-facing events for server and user changes (all of the apply* methods\n * return the set of events that need to be raised as a result).\n * - Maintaining the appropriate set of server listens to ensure we are always subscribed\n * to the correct set of paths and queries to satisfy the current set of user event\n * callbacks (listens are started/stopped using the provided listenProvider).\n *\n * NOTE: Although SyncTree tracks event callbacks and calculates events to raise, the actual\n * events are returned to the caller rather than raised synchronously.\n *\n * @constructor\n */\nvar SyncTree = /** @class */ (function () {\n /**\n * @param {!ListenProvider} listenProvider_ Used by SyncTree to start / stop listening\n * to server data.\n */\n function SyncTree(listenProvider_) {\n this.listenProvider_ = listenProvider_;\n /**\n * Tree of SyncPoints. There's a SyncPoint at any location that has 1 or more views.\n * @type {!ImmutableTree.}\n * @private\n */\n this.syncPointTree_ = ImmutableTree_1.ImmutableTree.Empty;\n /**\n * A tree of all pending user writes (user-initiated set()'s, transaction()'s, update()'s, etc.).\n * @type {!WriteTree}\n * @private\n */\n this.pendingWriteTree_ = new WriteTree_1.WriteTree();\n this.tagToQueryMap_ = {};\n this.queryToTagMap_ = {};\n }\n /**\n * Apply the data changes for a user-generated set() or transaction() call.\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @param {number} writeId\n * @param {boolean=} visible\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserOverwrite = function (path, newData, writeId, visible) {\n // Record pending write.\n this.pendingWriteTree_.addOverwrite(path, newData, writeId, visible);\n if (!visible) {\n return [];\n }\n else {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.User, path, newData));\n }\n };\n /**\n * Apply the data from a user-generated update() call\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyUserMerge = function (path, changedChildren, writeId) {\n // Record pending merge.\n this.pendingWriteTree_.addMerge(path, changedChildren, writeId);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.User, path, changeTree));\n };\n /**\n * Acknowledge a pending user write that was previously registered with applyUserOverwrite() or applyUserMerge().\n *\n * @param {!number} writeId\n * @param {boolean=} revert True if the given write failed and needs to be reverted\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.ackUserWrite = function (writeId, revert) {\n if (revert === void 0) { revert = false; }\n var write = this.pendingWriteTree_.getWrite(writeId);\n var needToReevaluate = this.pendingWriteTree_.removeWrite(writeId);\n if (!needToReevaluate) {\n return [];\n }\n else {\n var affectedTree_1 = ImmutableTree_1.ImmutableTree.Empty;\n if (write.snap != null) {\n // overwrite\n affectedTree_1 = affectedTree_1.set(Path_1.Path.Empty, true);\n }\n else {\n util_3.forEach(write.children, function (pathString, node) {\n affectedTree_1 = affectedTree_1.set(new Path_1.Path(pathString), node);\n });\n }\n return this.applyOperationToSyncPoints_(new AckUserWrite_1.AckUserWrite(write.path, affectedTree_1, revert));\n }\n };\n /**\n * Apply new server data for the specified path..\n *\n * @param {!Path} path\n * @param {!Node} newData\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerOverwrite = function (path, newData) {\n return this.applyOperationToSyncPoints_(new Overwrite_1.Overwrite(Operation_1.OperationSource.Server, path, newData));\n };\n /**\n * Apply new server data to be merged in at the specified path.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyServerMerge = function (path, changedChildren) {\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n return this.applyOperationToSyncPoints_(new Merge_1.Merge(Operation_1.OperationSource.Server, path, changeTree));\n };\n /**\n * Apply a listen complete for a query\n *\n * @param {!Path} path\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyListenComplete = function (path) {\n return this.applyOperationToSyncPoints_(new ListenComplete_1.ListenComplete(Operation_1.OperationSource.Server, path));\n };\n /**\n * Apply new server data for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryOverwrite = function (path, snap, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey != null) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new Overwrite_1.Overwrite(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, snap);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // Query must have been removed already\n return [];\n }\n };\n /**\n * Apply server data to be merged in for the specified tagged query.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedQueryMerge = function (path, changedChildren, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var changeTree = ImmutableTree_1.ImmutableTree.fromObject(changedChildren);\n var op = new Merge_1.Merge(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath, changeTree);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Apply a listen complete for a tagged query\n *\n * @param {!Path} path\n * @param {!number} tag\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.applyTaggedListenComplete = function (path, tag) {\n var queryKey = this.queryKeyForTag_(tag);\n if (queryKey) {\n var r = SyncTree.parseQueryKey_(queryKey);\n var queryPath = r.path, queryId = r.queryId;\n var relativePath = Path_1.Path.relativePath(queryPath, path);\n var op = new ListenComplete_1.ListenComplete(Operation_1.OperationSource.forServerTaggedQuery(queryId), relativePath);\n return this.applyTaggedOperation_(queryPath, op);\n }\n else {\n // We've already removed the query. No big deal, ignore the update\n return [];\n }\n };\n /**\n * Add an event callback for the specified query.\n *\n * @param {!Query} query\n * @param {!EventRegistration} eventRegistration\n * @return {!Array.} Events to raise.\n */\n SyncTree.prototype.addEventRegistration = function (query, eventRegistration) {\n var path = query.path;\n var serverCache = null;\n var foundAncestorDefaultView = false;\n // Any covering writes will necessarily be at the root, so really all we need to find is the server cache.\n // Consider optimizing this once there's a better understanding of what actual behavior will be.\n this.syncPointTree_.foreachOnPath(path, function (pathToSyncPoint, sp) {\n var relativePath = Path_1.Path.relativePath(pathToSyncPoint, path);\n serverCache = serverCache || sp.getCompleteServerCache(relativePath);\n foundAncestorDefaultView =\n foundAncestorDefaultView || sp.hasCompleteView();\n });\n var syncPoint = this.syncPointTree_.get(path);\n if (!syncPoint) {\n syncPoint = new SyncPoint_1.SyncPoint();\n this.syncPointTree_ = this.syncPointTree_.set(path, syncPoint);\n }\n else {\n foundAncestorDefaultView =\n foundAncestorDefaultView || syncPoint.hasCompleteView();\n serverCache = serverCache || syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var serverCacheComplete;\n if (serverCache != null) {\n serverCacheComplete = true;\n }\n else {\n serverCacheComplete = false;\n serverCache = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var subtree = this.syncPointTree_.subtree(path);\n subtree.foreachChild(function (childName, childSyncPoint) {\n var completeCache = childSyncPoint.getCompleteServerCache(Path_1.Path.Empty);\n if (completeCache) {\n serverCache = serverCache.updateImmediateChild(childName, completeCache);\n }\n });\n }\n var viewAlreadyExists = syncPoint.viewExistsForQuery(query);\n if (!viewAlreadyExists && !query.getQueryParams().loadsAllData()) {\n // We need to track a tag for this query\n var queryKey = SyncTree.makeQueryKey_(query);\n util_1.assert(!(queryKey in this.queryToTagMap_), 'View does not exist, but we have a tag');\n var tag = SyncTree.getNextQueryTag_();\n this.queryToTagMap_[queryKey] = tag;\n // Coerce to string to avoid sparse arrays.\n this.tagToQueryMap_['_' + tag] = queryKey;\n }\n var writesCache = this.pendingWriteTree_.childWrites(path);\n var events = syncPoint.addEventRegistration(query, eventRegistration, writesCache, serverCache, serverCacheComplete);\n if (!viewAlreadyExists && !foundAncestorDefaultView) {\n var view /** @type !View */ = syncPoint.viewForQuery(query);\n events = events.concat(this.setupListener_(query, view));\n }\n return events;\n };\n /**\n * Remove event callback(s).\n *\n * If query is the default query, we'll check all queries for the specified eventRegistration.\n * If eventRegistration is null, we'll remove all callbacks for the specified query/queries.\n *\n * @param {!Query} query\n * @param {?EventRegistration} eventRegistration If null, all callbacks are removed.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n SyncTree.prototype.removeEventRegistration = function (query, eventRegistration, cancelError) {\n var _this = this;\n // Find the syncPoint first. Then deal with whether or not it has matching listeners\n var path = query.path;\n var maybeSyncPoint = this.syncPointTree_.get(path);\n var cancelEvents = [];\n // A removal on a default query affects all queries at that location. A removal on an indexed query, even one without\n // other query constraints, does *not* affect all queries at that location. So this check must be for 'default', and\n // not loadsAllData().\n if (maybeSyncPoint &&\n (query.queryIdentifier() === 'default' ||\n maybeSyncPoint.viewExistsForQuery(query))) {\n /**\n * @type {{removed: !Array., events: !Array.}}\n */\n var removedAndEvents = maybeSyncPoint.removeEventRegistration(query, eventRegistration, cancelError);\n if (maybeSyncPoint.isEmpty()) {\n this.syncPointTree_ = this.syncPointTree_.remove(path);\n }\n var removed = removedAndEvents.removed;\n cancelEvents = removedAndEvents.events;\n // We may have just removed one of many listeners and can short-circuit this whole process\n // We may also not have removed a default listener, in which case all of the descendant listeners should already be\n // properly set up.\n //\n // Since indexed queries can shadow if they don't have other query constraints, check for loadsAllData(), instead of\n // queryId === 'default'\n var removingDefault = -1 !==\n removed.findIndex(function (query) {\n return query.getQueryParams().loadsAllData();\n });\n var covered = this.syncPointTree_.findOnPath(path, function (relativePath, parentSyncPoint) {\n return parentSyncPoint.hasCompleteView();\n });\n if (removingDefault && !covered) {\n var subtree = this.syncPointTree_.subtree(path);\n // There are potentially child listeners. Determine what if any listens we need to send before executing the\n // removal\n if (!subtree.isEmpty()) {\n // We need to fold over our subtree and collect the listeners to send\n var newViews = this.collectDistinctViewsForSubTree_(subtree);\n // Ok, we've collected all the listens we need. Set them up.\n for (var i = 0; i < newViews.length; ++i) {\n var view = newViews[i], newQuery = view.getQuery();\n var listener = this.createListenerForView_(view);\n this.listenProvider_.startListening(SyncTree.queryForListening_(newQuery), this.tagForQuery_(newQuery), listener.hashFn, listener.onComplete);\n }\n }\n else {\n // There's nothing below us, so nothing we need to start listening on\n }\n }\n // If we removed anything and we're not covered by a higher up listen, we need to stop listening on this query\n // The above block has us covered in terms of making sure we're set up on listens lower in the tree.\n // Also, note that if we have a cancelError, it's already been removed at the provider level.\n if (!covered && removed.length > 0 && !cancelError) {\n // If we removed a default, then we weren't listening on any of the other queries here. Just cancel the one\n // default. Otherwise, we need to iterate through and cancel each individual query\n if (removingDefault) {\n // We don't tag default listeners\n var defaultTag = null;\n this.listenProvider_.stopListening(SyncTree.queryForListening_(query), defaultTag);\n }\n else {\n removed.forEach(function (queryToRemove) {\n var tagToRemove = _this.queryToTagMap_[SyncTree.makeQueryKey_(queryToRemove)];\n _this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToRemove), tagToRemove);\n });\n }\n }\n // Now, clear all of the tags we're tracking for the removed listens\n this.removeTags_(removed);\n }\n else {\n // No-op, this listener must've been already removed\n }\n return cancelEvents;\n };\n /**\n * Returns a complete cache, if we have one, of the data at a particular path. The location must have a listener above\n * it, but as this is only used by transaction code, that should always be the case anyways.\n *\n * Note: this method will *include* hidden writes from transaction with applyLocally set to false.\n * @param {!Path} path The path to the data we want\n * @param {Array.=} writeIdsToExclude A specific set to be excluded\n * @return {?Node}\n */\n SyncTree.prototype.calcCompleteEventCache = function (path, writeIdsToExclude) {\n var includeHiddenSets = true;\n var writeTree = this.pendingWriteTree_;\n var serverCache = this.syncPointTree_.findOnPath(path, function (pathSoFar, syncPoint) {\n var relativePath = Path_1.Path.relativePath(pathSoFar, path);\n var serverCache = syncPoint.getCompleteServerCache(relativePath);\n if (serverCache) {\n return serverCache;\n }\n });\n return writeTree.calcCompleteEventCache(path, serverCache, writeIdsToExclude, includeHiddenSets);\n };\n /**\n * This collapses multiple unfiltered views into a single view, since we only need a single\n * listener for them.\n *\n * @param {!ImmutableTree.} subtree\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.collectDistinctViewsForSubTree_ = function (subtree) {\n return subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (maybeChildSyncPoint && maybeChildSyncPoint.hasCompleteView()) {\n var completeView = maybeChildSyncPoint.getCompleteView();\n return [completeView];\n }\n else {\n // No complete view here, flatten any deeper listens into an array\n var views_1 = [];\n if (maybeChildSyncPoint) {\n views_1 = maybeChildSyncPoint.getQueryViews();\n }\n util_3.forEach(childMap, function (key, childViews) {\n views_1 = views_1.concat(childViews);\n });\n return views_1;\n }\n });\n };\n /**\n * @param {!Array.} queries\n * @private\n */\n SyncTree.prototype.removeTags_ = function (queries) {\n for (var j = 0; j < queries.length; ++j) {\n var removedQuery = queries[j];\n if (!removedQuery.getQueryParams().loadsAllData()) {\n // We should have a tag for this\n var removedQueryKey = SyncTree.makeQueryKey_(removedQuery);\n var removedQueryTag = this.queryToTagMap_[removedQueryKey];\n delete this.queryToTagMap_[removedQueryKey];\n delete this.tagToQueryMap_['_' + removedQueryTag];\n }\n }\n };\n /**\n * Normalizes a query to a query we send the server for listening\n * @param {!Query} query\n * @return {!Query} The normalized query\n * @private\n */\n SyncTree.queryForListening_ = function (query) {\n if (query.getQueryParams().loadsAllData() &&\n !query.getQueryParams().isDefault()) {\n // We treat queries that load all data as default queries\n // Cast is necessary because ref() technically returns Firebase which is actually fb.api.Firebase which inherits\n // from Query\n return /** @type {!Query} */ query.getRef();\n }\n else {\n return query;\n }\n };\n /**\n * For a given new listen, manage the de-duplication of outstanding subscriptions.\n *\n * @param {!Query} query\n * @param {!View} view\n * @return {!Array.} This method can return events to support synchronous data sources\n * @private\n */\n SyncTree.prototype.setupListener_ = function (query, view) {\n var path = query.path;\n var tag = this.tagForQuery_(query);\n var listener = this.createListenerForView_(view);\n var events = this.listenProvider_.startListening(SyncTree.queryForListening_(query), tag, listener.hashFn, listener.onComplete);\n var subtree = this.syncPointTree_.subtree(path);\n // The root of this subtree has our query. We're here because we definitely need to send a listen for that, but we\n // may need to shadow other listens as well.\n if (tag) {\n util_1.assert(!subtree.value.hasCompleteView(), \"If we're adding a query, it shouldn't be shadowed\");\n }\n else {\n // Shadow everything at or below this location, this is a default listener.\n var queriesToStop = subtree.fold(function (relativePath, maybeChildSyncPoint, childMap) {\n if (!relativePath.isEmpty() &&\n maybeChildSyncPoint &&\n maybeChildSyncPoint.hasCompleteView()) {\n return [maybeChildSyncPoint.getCompleteView().getQuery()];\n }\n else {\n // No default listener here, flatten any deeper queries into an array\n var queries_1 = [];\n if (maybeChildSyncPoint) {\n queries_1 = queries_1.concat(maybeChildSyncPoint.getQueryViews().map(function (view) { return view.getQuery(); }));\n }\n util_3.forEach(childMap, function (key, childQueries) {\n queries_1 = queries_1.concat(childQueries);\n });\n return queries_1;\n }\n });\n for (var i = 0; i < queriesToStop.length; ++i) {\n var queryToStop = queriesToStop[i];\n this.listenProvider_.stopListening(SyncTree.queryForListening_(queryToStop), this.tagForQuery_(queryToStop));\n }\n }\n return events;\n };\n /**\n *\n * @param {!View} view\n * @return {{hashFn: function(), onComplete: function(!string, *)}}\n * @private\n */\n SyncTree.prototype.createListenerForView_ = function (view) {\n var _this = this;\n var query = view.getQuery();\n var tag = this.tagForQuery_(query);\n return {\n hashFn: function () {\n var cache = view.getServerCache() || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return cache.hash();\n },\n onComplete: function (status) {\n if (status === 'ok') {\n if (tag) {\n return _this.applyTaggedListenComplete(query.path, tag);\n }\n else {\n return _this.applyListenComplete(query.path);\n }\n }\n else {\n // If a listen failed, kill all of the listeners here, not just the one that triggered the error.\n // Note that this may need to be scoped to just this listener if we change permissions on filtered children\n var error = util_2.errorForServerCode(status, query);\n return _this.removeEventRegistration(query, \n /*eventRegistration*/ null, error);\n }\n }\n };\n };\n /**\n * Given a query, computes a \"queryKey\" suitable for use in our queryToTagMap_.\n * @private\n * @param {!Query} query\n * @return {string}\n */\n SyncTree.makeQueryKey_ = function (query) {\n return query.path.toString() + '$' + query.queryIdentifier();\n };\n /**\n * Given a queryKey (created by makeQueryKey), parse it back into a path and queryId.\n * @private\n * @param {!string} queryKey\n * @return {{queryId: !string, path: !Path}}\n */\n SyncTree.parseQueryKey_ = function (queryKey) {\n var splitIndex = queryKey.indexOf('$');\n util_1.assert(splitIndex !== -1 && splitIndex < queryKey.length - 1, 'Bad queryKey.');\n return {\n queryId: queryKey.substr(splitIndex + 1),\n path: new Path_1.Path(queryKey.substr(0, splitIndex))\n };\n };\n /**\n * Return the query associated with the given tag, if we have one\n * @param {!number} tag\n * @return {?string}\n * @private\n */\n SyncTree.prototype.queryKeyForTag_ = function (tag) {\n return this.tagToQueryMap_['_' + tag];\n };\n /**\n * Return the tag associated with the given query.\n * @param {!Query} query\n * @return {?number}\n * @private\n */\n SyncTree.prototype.tagForQuery_ = function (query) {\n var queryKey = SyncTree.makeQueryKey_(query);\n return util_3.safeGet(this.queryToTagMap_, queryKey);\n };\n /**\n * Static accessor for query tags.\n * @return {number}\n * @private\n */\n SyncTree.getNextQueryTag_ = function () {\n return SyncTree.nextQueryTag_++;\n };\n /**\n * A helper method to apply tagged operations\n *\n * @param {!Path} queryPath\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyTaggedOperation_ = function (queryPath, operation) {\n var syncPoint = this.syncPointTree_.get(queryPath);\n util_1.assert(syncPoint, \"Missing sync point for query tag that we're tracking\");\n var writesCache = this.pendingWriteTree_.childWrites(queryPath);\n return syncPoint.applyOperation(operation, writesCache, \n /*serverCache=*/ null);\n };\n /**\n * A helper method that visits all descendant and ancestor SyncPoints, applying the operation.\n *\n * NOTES:\n * - Descendant SyncPoints will be visited first (since we raise events depth-first).\n \n * - We call applyOperation() on each SyncPoint passing three things:\n * 1. A version of the Operation that has been made relative to the SyncPoint location.\n * 2. A WriteTreeRef of any writes we have cached at the SyncPoint location.\n * 3. A snapshot Node with cached server data, if we have it.\n \n * - We concatenate all of the events returned by each SyncPoint and return the result.\n *\n * @param {!Operation} operation\n * @return {!Array.}\n * @private\n */\n SyncTree.prototype.applyOperationToSyncPoints_ = function (operation) {\n return this.applyOperationHelper_(operation, this.syncPointTree_, \n /*serverCache=*/ null, this.pendingWriteTree_.childWrites(Path_1.Path.Empty));\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n if (operation.path.isEmpty()) {\n return this.applyOperationDescendantsHelper_(operation, syncPointTree, serverCache, writesCache);\n }\n else {\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n var childName = operation.path.getFront();\n var childOperation = operation.operationForChild(childName);\n var childTree = syncPointTree.children.get(childName);\n if (childTree && childOperation) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n events = events.concat(this.applyOperationHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n }\n };\n /**\n * Recursive helper for applyOperationToSyncPoints_\n *\n * @private\n * @param {!Operation} operation\n * @param {ImmutableTree.} syncPointTree\n * @param {?Node} serverCache\n * @param {!WriteTreeRef} writesCache\n * @return {!Array.}\n */\n SyncTree.prototype.applyOperationDescendantsHelper_ = function (operation, syncPointTree, serverCache, writesCache) {\n var _this = this;\n var syncPoint = syncPointTree.get(Path_1.Path.Empty);\n // If we don't have cached server data, see if we can get it from this SyncPoint.\n if (serverCache == null && syncPoint != null) {\n serverCache = syncPoint.getCompleteServerCache(Path_1.Path.Empty);\n }\n var events = [];\n syncPointTree.children.inorderTraversal(function (childName, childTree) {\n var childServerCache = serverCache\n ? serverCache.getImmediateChild(childName)\n : null;\n var childWritesCache = writesCache.child(childName);\n var childOperation = operation.operationForChild(childName);\n if (childOperation) {\n events = events.concat(_this.applyOperationDescendantsHelper_(childOperation, childTree, childServerCache, childWritesCache));\n }\n });\n if (syncPoint) {\n events = events.concat(syncPoint.applyOperation(operation, writesCache, serverCache));\n }\n return events;\n };\n /**\n * Static tracker for next query tag.\n * @type {number}\n * @private\n */\n SyncTree.nextQueryTag_ = 1;\n return SyncTree;\n}());\nexports.SyncTree = SyncTree;\n\n//# sourceMappingURL=SyncTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SyncTree.js\n// module id = 86\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Path_1 = require(\"../util/Path\");\nvar Operation_1 = require(\"./Operation\");\nvar AckUserWrite = /** @class */ (function () {\n /**\n *\n * @param {!Path} path\n * @param {!ImmutableTree} affectedTree A tree containing true for each affected path. Affected paths can't overlap.\n * @param {!boolean} revert\n */\n function AckUserWrite(\n /**@inheritDoc */ path, \n /**@inheritDoc */ affectedTree, \n /**@inheritDoc */ revert) {\n this.path = path;\n this.affectedTree = affectedTree;\n this.revert = revert;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.ACK_USER_WRITE;\n /** @inheritDoc */\n this.source = Operation_1.OperationSource.User;\n }\n /**\n * @inheritDoc\n */\n AckUserWrite.prototype.operationForChild = function (childName) {\n if (!this.path.isEmpty()) {\n util_1.assert(this.path.getFront() === childName, 'operationForChild called for unrelated child.');\n return new AckUserWrite(this.path.popFront(), this.affectedTree, this.revert);\n }\n else if (this.affectedTree.value != null) {\n util_1.assert(this.affectedTree.children.isEmpty(), 'affectedTree should not have overlapping affected paths.');\n // All child locations are affected as well; just return same operation.\n return this;\n }\n else {\n var childTree = this.affectedTree.subtree(new Path_1.Path(childName));\n return new AckUserWrite(Path_1.Path.Empty, childTree, this.revert);\n }\n };\n return AckUserWrite;\n}());\nexports.AckUserWrite = AckUserWrite;\n\n//# sourceMappingURL=AckUserWrite.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/AckUserWrite.js\n// module id = 87\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Path_1 = require(\"../util/Path\");\nvar Operation_1 = require(\"./Operation\");\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @constructor\n * @implements {Operation}\n */\nvar ListenComplete = /** @class */ (function () {\n function ListenComplete(source, path) {\n this.source = source;\n this.path = path;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.LISTEN_COMPLETE;\n }\n ListenComplete.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n return new ListenComplete(this.source, Path_1.Path.Empty);\n }\n else {\n return new ListenComplete(this.source, this.path.popFront());\n }\n };\n return ListenComplete;\n}());\nexports.ListenComplete = ListenComplete;\n\n//# sourceMappingURL=ListenComplete.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/ListenComplete.js\n// module id = 88\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = require(\"./Operation\");\nvar Overwrite_1 = require(\"./Overwrite\");\nvar Path_1 = require(\"../util/Path\");\nvar util_1 = require(\"@firebase/util\");\n/**\n * @param {!OperationSource} source\n * @param {!Path} path\n * @param {!ImmutableTree.} children\n * @constructor\n * @implements {Operation}\n */\nvar Merge = /** @class */ (function () {\n function Merge(\n /**@inheritDoc */ source, \n /**@inheritDoc */ path, \n /**@inheritDoc */ children) {\n this.source = source;\n this.path = path;\n this.children = children;\n /** @inheritDoc */\n this.type = Operation_1.OperationType.MERGE;\n }\n /**\n * @inheritDoc\n */\n Merge.prototype.operationForChild = function (childName) {\n if (this.path.isEmpty()) {\n var childTree = this.children.subtree(new Path_1.Path(childName));\n if (childTree.isEmpty()) {\n // This child is unaffected\n return null;\n }\n else if (childTree.value) {\n // We have a snapshot for the child in question. This becomes an overwrite of the child.\n return new Overwrite_1.Overwrite(this.source, Path_1.Path.Empty, childTree.value);\n }\n else {\n // This is a merge at a deeper level\n return new Merge(this.source, Path_1.Path.Empty, childTree);\n }\n }\n else {\n util_1.assert(this.path.getFront() === childName, \"Can't get a merge for a child not on the path of the operation\");\n return new Merge(this.source, this.path.popFront(), this.children);\n }\n };\n /**\n * @inheritDoc\n */\n Merge.prototype.toString = function () {\n return ('Operation(' +\n this.path +\n ': ' +\n this.source.toString() +\n ' merge: ' +\n this.children.toString() +\n ')');\n };\n return Merge;\n}());\nexports.Merge = Merge;\n\n//# sourceMappingURL=Merge.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/operation/Merge.js\n// module id = 89\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar IndexedFilter_1 = require(\"./filter/IndexedFilter\");\nvar ViewProcessor_1 = require(\"./ViewProcessor\");\nvar ChildrenNode_1 = require(\"../snap/ChildrenNode\");\nvar CacheNode_1 = require(\"./CacheNode\");\nvar ViewCache_1 = require(\"./ViewCache\");\nvar EventGenerator_1 = require(\"./EventGenerator\");\nvar util_1 = require(\"@firebase/util\");\nvar Operation_1 = require(\"../operation/Operation\");\nvar Change_1 = require(\"./Change\");\nvar PriorityIndex_1 = require(\"../snap/indexes/PriorityIndex\");\n/**\n * A view represents a specific location and query that has 1 or more event registrations.\n *\n * It does several things:\n * - Maintains the list of event registrations for this location/query.\n * - Maintains a cache of the data visible for this location/query.\n * - Applies new operations (via applyOperation), updates the cache, and based on the event\n * registrations returns the set of events to be raised.\n * @constructor\n */\nvar View = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n * @param {!ViewCache} initialViewCache\n */\n function View(query_, initialViewCache) {\n this.query_ = query_;\n this.eventRegistrations_ = [];\n var params = this.query_.getQueryParams();\n var indexFilter = new IndexedFilter_1.IndexedFilter(params.getIndex());\n var filter = params.getNodeFilter();\n /**\n * @type {ViewProcessor}\n * @private\n */\n this.processor_ = new ViewProcessor_1.ViewProcessor(filter);\n var initialServerCache = initialViewCache.getServerCache();\n var initialEventCache = initialViewCache.getEventCache();\n // Don't filter server node with other filter than index, wait for tagged listen\n var serverSnap = indexFilter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialServerCache.getNode(), null);\n var eventSnap = filter.updateFullNode(ChildrenNode_1.ChildrenNode.EMPTY_NODE, initialEventCache.getNode(), null);\n var newServerCache = new CacheNode_1.CacheNode(serverSnap, initialServerCache.isFullyInitialized(), indexFilter.filtersNodes());\n var newEventCache = new CacheNode_1.CacheNode(eventSnap, initialEventCache.isFullyInitialized(), filter.filtersNodes());\n /**\n * @type {!ViewCache}\n * @private\n */\n this.viewCache_ = new ViewCache_1.ViewCache(newEventCache, newServerCache);\n /**\n * @type {!EventGenerator}\n * @private\n */\n this.eventGenerator_ = new EventGenerator_1.EventGenerator(this.query_);\n }\n /**\n * @return {!Query}\n */\n View.prototype.getQuery = function () {\n return this.query_;\n };\n /**\n * @return {?Node}\n */\n View.prototype.getServerCache = function () {\n return this.viewCache_.getServerCache().getNode();\n };\n /**\n * @param {!Path} path\n * @return {?Node}\n */\n View.prototype.getCompleteServerCache = function (path) {\n var cache = this.viewCache_.getCompleteServerSnap();\n if (cache) {\n // If this isn't a \"loadsAllData\" view, then cache isn't actually a complete cache and\n // we need to see if it contains the child we're interested in.\n if (this.query_.getQueryParams().loadsAllData() ||\n (!path.isEmpty() && !cache.getImmediateChild(path.getFront()).isEmpty())) {\n return cache.getChild(path);\n }\n }\n return null;\n };\n /**\n * @return {boolean}\n */\n View.prototype.isEmpty = function () {\n return this.eventRegistrations_.length === 0;\n };\n /**\n * @param {!EventRegistration} eventRegistration\n */\n View.prototype.addEventRegistration = function (eventRegistration) {\n this.eventRegistrations_.push(eventRegistration);\n };\n /**\n * @param {?EventRegistration} eventRegistration If null, remove all callbacks.\n * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.\n * @return {!Array.} Cancel events, if cancelError was provided.\n */\n View.prototype.removeEventRegistration = function (eventRegistration, cancelError) {\n var cancelEvents = [];\n if (cancelError) {\n util_1.assert(eventRegistration == null, 'A cancel should cancel all event registrations.');\n var path_1 = this.query_.path;\n this.eventRegistrations_.forEach(function (registration) {\n cancelError /** @type {!Error} */ = cancelError;\n var maybeEvent = registration.createCancelEvent(cancelError, path_1);\n if (maybeEvent) {\n cancelEvents.push(maybeEvent);\n }\n });\n }\n if (eventRegistration) {\n var remaining = [];\n for (var i = 0; i < this.eventRegistrations_.length; ++i) {\n var existing = this.eventRegistrations_[i];\n if (!existing.matches(eventRegistration)) {\n remaining.push(existing);\n }\n else if (eventRegistration.hasAnyCallback()) {\n // We're removing just this one\n remaining = remaining.concat(this.eventRegistrations_.slice(i + 1));\n break;\n }\n }\n this.eventRegistrations_ = remaining;\n }\n else {\n this.eventRegistrations_ = [];\n }\n return cancelEvents;\n };\n /**\n * Applies the given Operation, updates our cache, and returns the appropriate events.\n *\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @return {!Array.}\n */\n View.prototype.applyOperation = function (operation, writesCache, completeServerCache) {\n if (operation.type === Operation_1.OperationType.MERGE &&\n operation.source.queryId !== null) {\n util_1.assert(this.viewCache_.getCompleteServerSnap(), 'We should always have a full cache before handling merges');\n util_1.assert(this.viewCache_.getCompleteEventSnap(), 'Missing event cache, even though we have a server cache');\n }\n var oldViewCache = this.viewCache_;\n var result = this.processor_.applyOperation(oldViewCache, operation, writesCache, completeServerCache);\n this.processor_.assertIndexed(result.viewCache);\n util_1.assert(result.viewCache.getServerCache().isFullyInitialized() ||\n !oldViewCache.getServerCache().isFullyInitialized(), 'Once a server snap is complete, it should never go back');\n this.viewCache_ = result.viewCache;\n return this.generateEventsForChanges_(result.changes, result.viewCache.getEventCache().getNode(), null);\n };\n /**\n * @param {!EventRegistration} registration\n * @return {!Array.}\n */\n View.prototype.getInitialEvents = function (registration) {\n var eventSnap = this.viewCache_.getEventCache();\n var initialChanges = [];\n if (!eventSnap.getNode().isLeafNode()) {\n var eventNode = eventSnap.getNode();\n eventNode.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (key, childNode) {\n initialChanges.push(Change_1.Change.childAddedChange(key, childNode));\n });\n }\n if (eventSnap.isFullyInitialized()) {\n initialChanges.push(Change_1.Change.valueChange(eventSnap.getNode()));\n }\n return this.generateEventsForChanges_(initialChanges, eventSnap.getNode(), registration);\n };\n /**\n * @private\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {EventRegistration=} eventRegistration\n * @return {!Array.}\n */\n View.prototype.generateEventsForChanges_ = function (changes, eventCache, eventRegistration) {\n var registrations = eventRegistration\n ? [eventRegistration]\n : this.eventRegistrations_;\n return this.eventGenerator_.generateEventsForChanges(changes, eventCache, registrations);\n };\n return View;\n}());\nexports.View = View;\n\n//# sourceMappingURL=View.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/View.js\n// module id = 90\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Operation_1 = require(\"../operation/Operation\");\nvar util_1 = require(\"@firebase/util\");\nvar ChildChangeAccumulator_1 = require(\"./ChildChangeAccumulator\");\nvar Change_1 = require(\"./Change\");\nvar ChildrenNode_1 = require(\"../snap/ChildrenNode\");\nvar KeyIndex_1 = require(\"../snap/indexes/KeyIndex\");\nvar ImmutableTree_1 = require(\"../util/ImmutableTree\");\nvar Path_1 = require(\"../util/Path\");\nvar CompleteChildSource_1 = require(\"./CompleteChildSource\");\n/**\n * @constructor\n * @struct\n */\nvar ProcessorResult = /** @class */ (function () {\n /**\n * @param {!ViewCache} viewCache\n * @param {!Array.} changes\n */\n function ProcessorResult(viewCache, changes) {\n this.viewCache = viewCache;\n this.changes = changes;\n }\n return ProcessorResult;\n}());\nexports.ProcessorResult = ProcessorResult;\n/**\n * @constructor\n */\nvar ViewProcessor = /** @class */ (function () {\n /**\n * @param {!NodeFilter} filter_\n */\n function ViewProcessor(filter_) {\n this.filter_ = filter_;\n }\n /**\n * @param {!ViewCache} viewCache\n */\n ViewProcessor.prototype.assertIndexed = function (viewCache) {\n util_1.assert(viewCache\n .getEventCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Event snap not indexed');\n util_1.assert(viewCache\n .getServerCache()\n .getNode()\n .isIndexed(this.filter_.getIndex()), 'Server snap not indexed');\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Operation} operation\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @return {!ProcessorResult}\n */\n ViewProcessor.prototype.applyOperation = function (oldViewCache, operation, writesCache, completeCache) {\n var accumulator = new ChildChangeAccumulator_1.ChildChangeAccumulator();\n var newViewCache, filterServerNode;\n if (operation.type === Operation_1.OperationType.OVERWRITE) {\n var overwrite = operation;\n if (overwrite.source.fromUser) {\n newViewCache = this.applyUserOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(overwrite.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered and the\n // update is not at the root in which case it is ok (and necessary) to mark the node unfiltered\n // again\n filterServerNode =\n overwrite.source.tagged ||\n (oldViewCache.getServerCache().isFiltered() &&\n !overwrite.path.isEmpty());\n newViewCache = this.applyServerOverwrite_(oldViewCache, overwrite.path, overwrite.snap, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.MERGE) {\n var merge = operation;\n if (merge.source.fromUser) {\n newViewCache = this.applyUserMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, accumulator);\n }\n else {\n util_1.assert(merge.source.fromServer, 'Unknown source.');\n // We filter the node if it's a tagged update or the node has been previously filtered\n filterServerNode =\n merge.source.tagged || oldViewCache.getServerCache().isFiltered();\n newViewCache = this.applyServerMerge_(oldViewCache, merge.path, merge.children, writesCache, completeCache, filterServerNode, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.ACK_USER_WRITE) {\n var ackUserWrite = operation;\n if (!ackUserWrite.revert) {\n newViewCache = this.ackUserWrite_(oldViewCache, ackUserWrite.path, ackUserWrite.affectedTree, writesCache, completeCache, accumulator);\n }\n else {\n newViewCache = this.revertUserWrite_(oldViewCache, ackUserWrite.path, writesCache, completeCache, accumulator);\n }\n }\n else if (operation.type === Operation_1.OperationType.LISTEN_COMPLETE) {\n newViewCache = this.listenComplete_(oldViewCache, operation.path, writesCache, accumulator);\n }\n else {\n throw util_1.assertionError('Unknown operation type: ' + operation.type);\n }\n var changes = accumulator.getChanges();\n ViewProcessor.maybeAddValueEvent_(oldViewCache, newViewCache, changes);\n return new ProcessorResult(newViewCache, changes);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!ViewCache} newViewCache\n * @param {!Array.} accumulator\n * @private\n */\n ViewProcessor.maybeAddValueEvent_ = function (oldViewCache, newViewCache, accumulator) {\n var eventSnap = newViewCache.getEventCache();\n if (eventSnap.isFullyInitialized()) {\n var isLeafOrEmpty = eventSnap.getNode().isLeafNode() || eventSnap.getNode().isEmpty();\n var oldCompleteSnap = oldViewCache.getCompleteEventSnap();\n if (accumulator.length > 0 ||\n !oldViewCache.getEventCache().isFullyInitialized() ||\n (isLeafOrEmpty &&\n !eventSnap\n .getNode()\n .equals(/** @type {!Node} */ (oldCompleteSnap))) ||\n !eventSnap\n .getNode()\n .getPriority()\n .equals(oldCompleteSnap.getPriority())) {\n accumulator.push(Change_1.Change.valueChange(\n /** @type {!Node} */ newViewCache.getCompleteEventSnap()));\n }\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} changePath\n * @param {!WriteTreeRef} writesCache\n * @param {!CompleteChildSource} source\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.generateEventCacheAfterServerEvent_ = function (viewCache, changePath, writesCache, source, accumulator) {\n var oldEventSnap = viewCache.getEventCache();\n if (writesCache.shadowingWrite(changePath) != null) {\n // we have a shadowing write, ignore changes\n return viewCache;\n }\n else {\n var newEventCache = void 0, serverNode = void 0;\n if (changePath.isEmpty()) {\n // TODO: figure out how this plays with \"sliding ack windows\"\n util_1.assert(viewCache.getServerCache().isFullyInitialized(), 'If change path is empty, we must have complete server data');\n if (viewCache.getServerCache().isFiltered()) {\n // We need to special case this, because we need to only apply writes to complete children, or\n // we might end up raising events for incomplete children. If the server data is filtered deep\n // writes cannot be guaranteed to be complete\n var serverCache = viewCache.getCompleteServerSnap();\n var completeChildren = serverCache instanceof ChildrenNode_1.ChildrenNode\n ? serverCache\n : ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var completeEventChildren = writesCache.calcCompleteEventChildren(completeChildren);\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeEventChildren, accumulator);\n }\n else {\n var completeNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n newEventCache = this.filter_.updateFullNode(viewCache.getEventCache().getNode(), completeNode, accumulator);\n }\n }\n else {\n var childKey = changePath.getFront();\n if (childKey == '.priority') {\n util_1.assert(changePath.getLength() == 1, \"Can't have a priority with additional path components\");\n var oldEventNode = oldEventSnap.getNode();\n serverNode = viewCache.getServerCache().getNode();\n // we might have overwrites for this priority\n var updatedPriority = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventNode, serverNode);\n if (updatedPriority != null) {\n newEventCache = this.filter_.updatePriority(oldEventNode, updatedPriority);\n }\n else {\n // priority didn't change, keep old node\n newEventCache = oldEventSnap.getNode();\n }\n }\n else {\n var childChangePath = changePath.popFront();\n // update child\n var newEventChild = void 0;\n if (oldEventSnap.isCompleteForChild(childKey)) {\n serverNode = viewCache.getServerCache().getNode();\n var eventChildUpdate = writesCache.calcEventCacheAfterServerOverwrite(changePath, oldEventSnap.getNode(), serverNode);\n if (eventChildUpdate != null) {\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey)\n .updateChild(childChangePath, eventChildUpdate);\n }\n else {\n // Nothing changed, just keep the old child\n newEventChild = oldEventSnap\n .getNode()\n .getImmediateChild(childKey);\n }\n }\n else {\n newEventChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n }\n if (newEventChild != null) {\n newEventCache = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newEventChild, childChangePath, source, accumulator);\n }\n else {\n // no complete child available or no change\n newEventCache = oldEventSnap.getNode();\n }\n }\n }\n return viewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized() || changePath.isEmpty(), this.filter_.filtersNodes());\n }\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, filterServerNode, accumulator) {\n var oldServerSnap = oldViewCache.getServerCache();\n var newServerCache;\n var serverFilter = filterServerNode\n ? this.filter_\n : this.filter_.getIndexedFilter();\n if (changePath.isEmpty()) {\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), changedSnap, null);\n }\n else if (serverFilter.filtersNodes() && !oldServerSnap.isFiltered()) {\n // we want to filter the server node, but we didn't filter the server node yet, so simulate a full update\n var newServerNode = oldServerSnap\n .getNode()\n .updateChild(changePath, changedSnap);\n newServerCache = serverFilter.updateFullNode(oldServerSnap.getNode(), newServerNode, null);\n }\n else {\n var childKey = changePath.getFront();\n if (!oldServerSnap.isCompleteForPath(changePath) &&\n changePath.getLength() > 1) {\n // We don't update incomplete nodes with updates intended for other listeners\n return oldViewCache;\n }\n var childChangePath = changePath.popFront();\n var childNode = oldServerSnap.getNode().getImmediateChild(childKey);\n var newChildNode = childNode.updateChild(childChangePath, changedSnap);\n if (childKey == '.priority') {\n newServerCache = serverFilter.updatePriority(oldServerSnap.getNode(), newChildNode);\n }\n else {\n newServerCache = serverFilter.updateChild(oldServerSnap.getNode(), childKey, newChildNode, childChangePath, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, null);\n }\n }\n var newViewCache = oldViewCache.updateServerSnap(newServerCache, oldServerSnap.isFullyInitialized() || changePath.isEmpty(), serverFilter.filtersNodes());\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, newViewCache, completeCache);\n return this.generateEventCacheAfterServerEvent_(newViewCache, changePath, writesCache, source, accumulator);\n };\n /**\n * @param {!ViewCache} oldViewCache\n * @param {!Path} changePath\n * @param {!Node} changedSnap\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserOverwrite_ = function (oldViewCache, changePath, changedSnap, writesCache, completeCache, accumulator) {\n var oldEventSnap = oldViewCache.getEventCache();\n var newViewCache, newEventCache;\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, oldViewCache, completeCache);\n if (changePath.isEmpty()) {\n newEventCache = this.filter_.updateFullNode(oldViewCache.getEventCache().getNode(), changedSnap, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, true, this.filter_.filtersNodes());\n }\n else {\n var childKey = changePath.getFront();\n if (childKey === '.priority') {\n newEventCache = this.filter_.updatePriority(oldViewCache.getEventCache().getNode(), changedSnap);\n newViewCache = oldViewCache.updateEventSnap(newEventCache, oldEventSnap.isFullyInitialized(), oldEventSnap.isFiltered());\n }\n else {\n var childChangePath = changePath.popFront();\n var oldChild = oldEventSnap.getNode().getImmediateChild(childKey);\n var newChild = void 0;\n if (childChangePath.isEmpty()) {\n // Child overwrite, we can replace the child\n newChild = changedSnap;\n }\n else {\n var childNode = source.getCompleteChild(childKey);\n if (childNode != null) {\n if (childChangePath.getBack() === '.priority' &&\n childNode.getChild(childChangePath.parent()).isEmpty()) {\n // This is a priority update on an empty node. If this node exists on the server, the\n // server will send down the priority in the update, so ignore for now\n newChild = childNode;\n }\n else {\n newChild = childNode.updateChild(childChangePath, changedSnap);\n }\n }\n else {\n // There is no complete child node available\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n }\n if (!oldChild.equals(newChild)) {\n var newEventSnap = this.filter_.updateChild(oldEventSnap.getNode(), childKey, newChild, childChangePath, source, accumulator);\n newViewCache = oldViewCache.updateEventSnap(newEventSnap, oldEventSnap.isFullyInitialized(), this.filter_.filtersNodes());\n }\n else {\n newViewCache = oldViewCache;\n }\n }\n }\n return newViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {string} childKey\n * @return {boolean}\n * @private\n */\n ViewProcessor.cacheHasChild_ = function (viewCache, childKey) {\n return viewCache.getEventCache().isCompleteForChild(childKey);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyUserMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, accumulator) {\n var _this = this;\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n changedChildren.foreach(function (relativePath, childNode) {\n var writePath = path.child(relativePath);\n if (!ViewProcessor.cacheHasChild_(viewCache, writePath.getFront())) {\n curViewCache = _this.applyUserOverwrite_(curViewCache, writePath, childNode, writesCache, serverCache, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!Node} node\n * @param {ImmutableTree.} merge\n * @return {!Node}\n * @private\n */\n ViewProcessor.prototype.applyMerge_ = function (node, merge) {\n merge.foreach(function (relativePath, childNode) {\n node = node.updateChild(relativePath, childNode);\n });\n return node;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!ImmutableTree.} changedChildren\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} serverCache\n * @param {boolean} filterServerNode\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.applyServerMerge_ = function (viewCache, path, changedChildren, writesCache, serverCache, filterServerNode, accumulator) {\n var _this = this;\n // If we don't have a cache yet, this merge was intended for a previously listen in the same location. Ignore it and\n // wait for the complete data update coming soon.\n if (viewCache\n .getServerCache()\n .getNode()\n .isEmpty() &&\n !viewCache.getServerCache().isFullyInitialized()) {\n return viewCache;\n }\n // HACK: In the case of a limit query, there may be some changes that bump things out of the\n // window leaving room for new items. It's important we process these changes first, so we\n // iterate the changes twice, first processing any that affect items currently in view.\n // TODO: I consider an item \"in view\" if cacheHasChild is true, which checks both the server\n // and event snap. I'm not sure if this will result in edge cases when a child is in one but\n // not the other.\n var curViewCache = viewCache;\n var viewMergeTree;\n if (path.isEmpty()) {\n viewMergeTree = changedChildren;\n }\n else {\n viewMergeTree = ImmutableTree_1.ImmutableTree.Empty.setTree(path, changedChildren);\n }\n var serverNode = viewCache.getServerCache().getNode();\n viewMergeTree.children.inorderTraversal(function (childKey, childTree) {\n if (serverNode.hasChild(childKey)) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n viewMergeTree.children.inorderTraversal(function (childKey, childMergeTree) {\n var isUnknownDeepMerge = !viewCache.getServerCache().isCompleteForChild(childKey) &&\n childMergeTree.value == null;\n if (!serverNode.hasChild(childKey) && !isUnknownDeepMerge) {\n var serverChild = viewCache\n .getServerCache()\n .getNode()\n .getImmediateChild(childKey);\n var newChild = _this.applyMerge_(serverChild, childMergeTree);\n curViewCache = _this.applyServerOverwrite_(curViewCache, new Path_1.Path(childKey), newChild, writesCache, serverCache, filterServerNode, accumulator);\n }\n });\n return curViewCache;\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} ackPath\n * @param {!ImmutableTree} affectedTree\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.ackUserWrite_ = function (viewCache, ackPath, affectedTree, writesCache, completeCache, accumulator) {\n if (writesCache.shadowingWrite(ackPath) != null) {\n return viewCache;\n }\n // Only filter server node if it is currently filtered\n var filterServerNode = viewCache.getServerCache().isFiltered();\n // Essentially we'll just get our existing server cache for the affected paths and re-apply it as a server update\n // now that it won't be shadowed.\n var serverCache = viewCache.getServerCache();\n if (affectedTree.value != null) {\n // This is an overwrite.\n if ((ackPath.isEmpty() && serverCache.isFullyInitialized()) ||\n serverCache.isCompleteForPath(ackPath)) {\n return this.applyServerOverwrite_(viewCache, ackPath, serverCache.getNode().getChild(ackPath), writesCache, completeCache, filterServerNode, accumulator);\n }\n else if (ackPath.isEmpty()) {\n // This is a goofy edge case where we are acking data at this location but don't have full data. We\n // should just re-apply whatever we have in our cache as a merge.\n var changedChildren_1 = ImmutableTree_1.ImmutableTree.Empty;\n serverCache.getNode().forEachChild(KeyIndex_1.KEY_INDEX, function (name, node) {\n changedChildren_1 = changedChildren_1.set(new Path_1.Path(name), node);\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_1, writesCache, completeCache, filterServerNode, accumulator);\n }\n else {\n return viewCache;\n }\n }\n else {\n // This is a merge.\n var changedChildren_2 = ImmutableTree_1.ImmutableTree.Empty;\n affectedTree.foreach(function (mergePath, value) {\n var serverCachePath = ackPath.child(mergePath);\n if (serverCache.isCompleteForPath(serverCachePath)) {\n changedChildren_2 = changedChildren_2.set(mergePath, serverCache.getNode().getChild(serverCachePath));\n }\n });\n return this.applyServerMerge_(viewCache, ackPath, changedChildren_2, writesCache, completeCache, filterServerNode, accumulator);\n }\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.listenComplete_ = function (viewCache, path, writesCache, accumulator) {\n var oldServerNode = viewCache.getServerCache();\n var newViewCache = viewCache.updateServerSnap(oldServerNode.getNode(), oldServerNode.isFullyInitialized() || path.isEmpty(), oldServerNode.isFiltered());\n return this.generateEventCacheAfterServerEvent_(newViewCache, path, writesCache, CompleteChildSource_1.NO_COMPLETE_CHILD_SOURCE, accumulator);\n };\n /**\n * @param {!ViewCache} viewCache\n * @param {!Path} path\n * @param {!WriteTreeRef} writesCache\n * @param {?Node} completeServerCache\n * @param {!ChildChangeAccumulator} accumulator\n * @return {!ViewCache}\n * @private\n */\n ViewProcessor.prototype.revertUserWrite_ = function (viewCache, path, writesCache, completeServerCache, accumulator) {\n var complete;\n if (writesCache.shadowingWrite(path) != null) {\n return viewCache;\n }\n else {\n var source = new CompleteChildSource_1.WriteTreeCompleteChildSource(writesCache, viewCache, completeServerCache);\n var oldEventCache = viewCache.getEventCache().getNode();\n var newEventCache = void 0;\n if (path.isEmpty() || path.getFront() === '.priority') {\n var newNode = void 0;\n if (viewCache.getServerCache().isFullyInitialized()) {\n newNode = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n }\n else {\n var serverChildren = viewCache.getServerCache().getNode();\n util_1.assert(serverChildren instanceof ChildrenNode_1.ChildrenNode, 'serverChildren would be complete if leaf node');\n newNode = writesCache.calcCompleteEventChildren(serverChildren);\n }\n newNode = newNode;\n newEventCache = this.filter_.updateFullNode(oldEventCache, newNode, accumulator);\n }\n else {\n var childKey = path.getFront();\n var newChild = writesCache.calcCompleteChild(childKey, viewCache.getServerCache());\n if (newChild == null &&\n viewCache.getServerCache().isCompleteForChild(childKey)) {\n newChild = oldEventCache.getImmediateChild(childKey);\n }\n if (newChild != null) {\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, newChild, path.popFront(), source, accumulator);\n }\n else if (viewCache\n .getEventCache()\n .getNode()\n .hasChild(childKey)) {\n // No complete child available, delete the existing one, if any\n newEventCache = this.filter_.updateChild(oldEventCache, childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE, path.popFront(), source, accumulator);\n }\n else {\n newEventCache = oldEventCache;\n }\n if (newEventCache.isEmpty() &&\n viewCache.getServerCache().isFullyInitialized()) {\n // We might have reverted all child writes. Maybe the old event was a leaf node\n complete = writesCache.calcCompleteEventCache(viewCache.getCompleteServerSnap());\n if (complete.isLeafNode()) {\n newEventCache = this.filter_.updateFullNode(newEventCache, complete, accumulator);\n }\n }\n }\n complete =\n viewCache.getServerCache().isFullyInitialized() ||\n writesCache.shadowingWrite(Path_1.Path.Empty) != null;\n return viewCache.updateEventSnap(newEventCache, complete, this.filter_.filtersNodes());\n }\n };\n return ViewProcessor;\n}());\nexports.ViewProcessor = ViewProcessor;\n\n//# sourceMappingURL=ViewProcessor.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/ViewProcessor.js\n// module id = 91\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Change_1 = require(\"./Change\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * @constructor\n */\nvar ChildChangeAccumulator = /** @class */ (function () {\n function ChildChangeAccumulator() {\n this.changeMap_ = {};\n }\n /**\n * @param {!Change} change\n */\n ChildChangeAccumulator.prototype.trackChildChange = function (change) {\n var type = change.type;\n var childKey /** @type {!string} */ = change.childName;\n util_2.assert(type == Change_1.Change.CHILD_ADDED ||\n type == Change_1.Change.CHILD_CHANGED ||\n type == Change_1.Change.CHILD_REMOVED, 'Only child changes supported for tracking');\n util_2.assert(childKey !== '.priority', 'Only non-priority child changes can be tracked.');\n var oldChange = util_1.safeGet(this.changeMap_, childKey);\n if (oldChange) {\n var oldType = oldChange.type;\n if (type == Change_1.Change.CHILD_ADDED && oldType == Change_1.Change.CHILD_REMOVED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n delete this.changeMap_[childKey];\n }\n else if (type == Change_1.Change.CHILD_REMOVED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childRemovedChange(childKey, oldChange.oldSnap);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_ADDED) {\n this.changeMap_[childKey] = Change_1.Change.childAddedChange(childKey, change.snapshotNode);\n }\n else if (type == Change_1.Change.CHILD_CHANGED &&\n oldType == Change_1.Change.CHILD_CHANGED) {\n this.changeMap_[childKey] = Change_1.Change.childChangedChange(childKey, change.snapshotNode, oldChange.oldSnap);\n }\n else {\n throw util_2.assertionError('Illegal combination of changes: ' +\n change +\n ' occurred after ' +\n oldChange);\n }\n }\n else {\n this.changeMap_[childKey] = change;\n }\n };\n /**\n * @return {!Array.}\n */\n ChildChangeAccumulator.prototype.getChanges = function () {\n return util_1.getValues(this.changeMap_);\n };\n return ChildChangeAccumulator;\n}());\nexports.ChildChangeAccumulator = ChildChangeAccumulator;\n\n//# sourceMappingURL=ChildChangeAccumulator.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/ChildChangeAccumulator.js\n// module id = 92\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheNode_1 = require(\"./CacheNode\");\n/**\n * An implementation of CompleteChildSource that never returns any additional children\n *\n * @private\n * @constructor\n * @implements CompleteChildSource\n */\nvar NoCompleteChildSource_ = /** @class */ (function () {\n function NoCompleteChildSource_() {\n }\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getCompleteChild = function (childKey) {\n return null;\n };\n /**\n * @inheritDoc\n */\n NoCompleteChildSource_.prototype.getChildAfterChild = function (index, child, reverse) {\n return null;\n };\n return NoCompleteChildSource_;\n}());\nexports.NoCompleteChildSource_ = NoCompleteChildSource_;\n/**\n * Singleton instance.\n * @const\n * @type {!CompleteChildSource}\n */\nexports.NO_COMPLETE_CHILD_SOURCE = new NoCompleteChildSource_();\n/**\n * An implementation of CompleteChildSource that uses a WriteTree in addition to any other server data or\n * old event caches available to calculate complete children.\n *\n *\n * @implements CompleteChildSource\n */\nvar WriteTreeCompleteChildSource = /** @class */ (function () {\n /**\n * @param {!WriteTreeRef} writes_\n * @param {!ViewCache} viewCache_\n * @param {?Node} optCompleteServerCache_\n */\n function WriteTreeCompleteChildSource(writes_, viewCache_, optCompleteServerCache_) {\n if (optCompleteServerCache_ === void 0) { optCompleteServerCache_ = null; }\n this.writes_ = writes_;\n this.viewCache_ = viewCache_;\n this.optCompleteServerCache_ = optCompleteServerCache_;\n }\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getCompleteChild = function (childKey) {\n var node = this.viewCache_.getEventCache();\n if (node.isCompleteForChild(childKey)) {\n return node.getNode().getImmediateChild(childKey);\n }\n else {\n var serverNode = this.optCompleteServerCache_ != null\n ? new CacheNode_1.CacheNode(this.optCompleteServerCache_, true, false)\n : this.viewCache_.getServerCache();\n return this.writes_.calcCompleteChild(childKey, serverNode);\n }\n };\n /**\n * @inheritDoc\n */\n WriteTreeCompleteChildSource.prototype.getChildAfterChild = function (index, child, reverse) {\n var completeServerData = this.optCompleteServerCache_ != null\n ? this.optCompleteServerCache_\n : this.viewCache_.getCompleteServerSnap();\n var nodes = this.writes_.calcIndexedSlice(completeServerData, child, 1, reverse, index);\n if (nodes.length === 0) {\n return null;\n }\n else {\n return nodes[0];\n }\n };\n return WriteTreeCompleteChildSource;\n}());\nexports.WriteTreeCompleteChildSource = WriteTreeCompleteChildSource;\n\n//# sourceMappingURL=CompleteChildSource.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/CompleteChildSource.js\n// module id = 93\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Node_1 = require(\"../snap/Node\");\nvar Change_1 = require(\"./Change\");\nvar util_1 = require(\"@firebase/util\");\n/**\n * An EventGenerator is used to convert \"raw\" changes (Change) as computed by the\n * CacheDiffer into actual events (Event) that can be raised. See generateEventsForChanges()\n * for details.\n *\n * @constructor\n */\nvar EventGenerator = /** @class */ (function () {\n /**\n *\n * @param {!Query} query_\n */\n function EventGenerator(query_) {\n this.query_ = query_;\n /**\n * @private\n * @type {!Index}\n */\n this.index_ = this.query_.getQueryParams().getIndex();\n }\n /**\n * Given a set of raw changes (no moved events and prevName not specified yet), and a set of\n * EventRegistrations that should be notified of these changes, generate the actual events to be raised.\n *\n * Notes:\n * - child_moved events will be synthesized at this time for any child_changed events that affect\n * our index.\n * - prevName will be calculated based on the index ordering.\n *\n * @param {!Array.} changes\n * @param {!Node} eventCache\n * @param {!Array.} eventRegistrations\n * @return {!Array.}\n */\n EventGenerator.prototype.generateEventsForChanges = function (changes, eventCache, eventRegistrations) {\n var _this = this;\n var events = [];\n var moves = [];\n changes.forEach(function (change) {\n if (change.type === Change_1.Change.CHILD_CHANGED &&\n _this.index_.indexedValueChanged(change.oldSnap, change.snapshotNode)) {\n moves.push(Change_1.Change.childMovedChange(change.childName, change.snapshotNode));\n }\n });\n this.generateEventsForType_(events, Change_1.Change.CHILD_REMOVED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_ADDED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_MOVED, moves, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.CHILD_CHANGED, changes, eventRegistrations, eventCache);\n this.generateEventsForType_(events, Change_1.Change.VALUE, changes, eventRegistrations, eventCache);\n return events;\n };\n /**\n * Given changes of a single change type, generate the corresponding events.\n *\n * @param {!Array.} events\n * @param {!string} eventType\n * @param {!Array.} changes\n * @param {!Array.} registrations\n * @param {!Node} eventCache\n * @private\n */\n EventGenerator.prototype.generateEventsForType_ = function (events, eventType, changes, registrations, eventCache) {\n var _this = this;\n var filteredChanges = changes.filter(function (change) { return change.type === eventType; });\n filteredChanges.sort(this.compareChanges_.bind(this));\n filteredChanges.forEach(function (change) {\n var materializedChange = _this.materializeSingleChange_(change, eventCache);\n registrations.forEach(function (registration) {\n if (registration.respondsTo(change.type)) {\n events.push(registration.createEvent(materializedChange, _this.query_));\n }\n });\n });\n };\n /**\n * @param {!Change} change\n * @param {!Node} eventCache\n * @return {!Change}\n * @private\n */\n EventGenerator.prototype.materializeSingleChange_ = function (change, eventCache) {\n if (change.type === 'value' || change.type === 'child_removed') {\n return change;\n }\n else {\n change.prevName = eventCache.getPredecessorChildName(\n /** @type {!string} */\n change.childName, change.snapshotNode, this.index_);\n return change;\n }\n };\n /**\n * @param {!Change} a\n * @param {!Change} b\n * @return {number}\n * @private\n */\n EventGenerator.prototype.compareChanges_ = function (a, b) {\n if (a.childName == null || b.childName == null) {\n throw util_1.assertionError('Should only compare child_ events.');\n }\n var aWrapped = new Node_1.NamedNode(a.childName, a.snapshotNode);\n var bWrapped = new Node_1.NamedNode(b.childName, b.snapshotNode);\n return this.index_.compare(aWrapped, bWrapped);\n };\n return EventGenerator;\n}());\nexports.EventGenerator = EventGenerator;\n\n//# sourceMappingURL=EventGenerator.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/EventGenerator.js\n// module id = 94\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\nvar Path_1 = require(\"./util/Path\");\nvar CompoundWrite_1 = require(\"./CompoundWrite\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\n/**\n * WriteTree tracks all pending user-initiated writes and has methods to calculate the result of merging them\n * with underlying server data (to create \"event cache\" data). Pending writes are added with addOverwrite()\n * and addMerge(), and removed with removeWrite().\n *\n * @constructor\n */\nvar WriteTree = /** @class */ (function () {\n function WriteTree() {\n /**\n * A tree tracking the result of applying all visible writes. This does not include transactions with\n * applyLocally=false or writes that are completely shadowed by other writes.\n *\n * @type {!CompoundWrite}\n * @private\n */\n this.visibleWrites_ = CompoundWrite_1.CompoundWrite.Empty;\n /**\n * A list of all pending writes, regardless of visibility and shadowed-ness. Used to calculate arbitrary\n * sets of the changed data, such as hidden writes (from transactions) or changes with certain writes excluded (also\n * used by transactions).\n *\n * @type {!Array.}\n * @private\n */\n this.allWrites_ = [];\n this.lastWriteId_ = -1;\n }\n /**\n * Create a new WriteTreeRef for the given path. For use with a new sync point at the given path.\n *\n * @param {!Path} path\n * @return {!WriteTreeRef}\n */\n WriteTree.prototype.childWrites = function (path) {\n return new WriteTreeRef(path, this);\n };\n /**\n * Record a new overwrite from user code.\n *\n * @param {!Path} path\n * @param {!Node} snap\n * @param {!number} writeId\n * @param {boolean=} visible This is set to false by some transactions. It should be excluded from event caches\n */\n WriteTree.prototype.addOverwrite = function (path, snap, writeId, visible) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older write on top of newer ones');\n if (visible === undefined) {\n visible = true;\n }\n this.allWrites_.push({\n path: path,\n snap: snap,\n writeId: writeId,\n visible: visible\n });\n if (visible) {\n this.visibleWrites_ = this.visibleWrites_.addWrite(path, snap);\n }\n this.lastWriteId_ = writeId;\n };\n /**\n * Record a new merge from user code.\n *\n * @param {!Path} path\n * @param {!Object.} changedChildren\n * @param {!number} writeId\n */\n WriteTree.prototype.addMerge = function (path, changedChildren, writeId) {\n util_2.assert(writeId > this.lastWriteId_, 'Stacking an older merge on top of newer ones');\n this.allWrites_.push({\n path: path,\n children: changedChildren,\n writeId: writeId,\n visible: true\n });\n this.visibleWrites_ = this.visibleWrites_.addWrites(path, changedChildren);\n this.lastWriteId_ = writeId;\n };\n /**\n * @param {!number} writeId\n * @return {?WriteRecord}\n */\n WriteTree.prototype.getWrite = function (writeId) {\n for (var i = 0; i < this.allWrites_.length; i++) {\n var record = this.allWrites_[i];\n if (record.writeId === writeId) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove a write (either an overwrite or merge) that has been successfully acknowledge by the server. Recalculates\n * the tree if necessary. We return true if it may have been visible, meaning views need to reevaluate.\n *\n * @param {!number} writeId\n * @return {boolean} true if the write may have been visible (meaning we'll need to reevaluate / raise\n * events as a result).\n */\n WriteTree.prototype.removeWrite = function (writeId) {\n // Note: disabling this check. It could be a transaction that preempted another transaction, and thus was applied\n // out of order.\n //const validClear = revert || this.allWrites_.length === 0 || writeId <= this.allWrites_[0].writeId;\n //assert(validClear, \"Either we don't have this write, or it's the first one in the queue\");\n var _this = this;\n var idx = this.allWrites_.findIndex(function (s) {\n return s.writeId === writeId;\n });\n util_2.assert(idx >= 0, 'removeWrite called with nonexistent writeId.');\n var writeToRemove = this.allWrites_[idx];\n this.allWrites_.splice(idx, 1);\n var removedWriteWasVisible = writeToRemove.visible;\n var removedWriteOverlapsWithOtherWrites = false;\n var i = this.allWrites_.length - 1;\n while (removedWriteWasVisible && i >= 0) {\n var currentWrite = this.allWrites_[i];\n if (currentWrite.visible) {\n if (i >= idx &&\n this.recordContainsPath_(currentWrite, writeToRemove.path)) {\n // The removed write was completely shadowed by a subsequent write.\n removedWriteWasVisible = false;\n }\n else if (writeToRemove.path.contains(currentWrite.path)) {\n // Either we're covering some writes or they're covering part of us (depending on which came first).\n removedWriteOverlapsWithOtherWrites = true;\n }\n }\n i--;\n }\n if (!removedWriteWasVisible) {\n return false;\n }\n else if (removedWriteOverlapsWithOtherWrites) {\n // There's some shadowing going on. Just rebuild the visible writes from scratch.\n this.resetTree_();\n return true;\n }\n else {\n // There's no shadowing. We can safely just remove the write(s) from visibleWrites.\n if (writeToRemove.snap) {\n this.visibleWrites_ = this.visibleWrites_.removeWrite(writeToRemove.path);\n }\n else {\n var children = writeToRemove.children;\n util_1.forEach(children, function (childName) {\n _this.visibleWrites_ = _this.visibleWrites_.removeWrite(writeToRemove.path.child(childName));\n });\n }\n return true;\n }\n };\n /**\n * Return a complete snapshot for the given path if there's visible write data at that path, else null.\n * No server data is considered.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.getCompleteWriteData = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * Given optional, underlying server data, and an optional set of constraints (exclude some sets, include hidden\n * writes), attempt to calculate a complete snapshot for the given path\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude An optional set to be excluded\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteEventCache = function (treePath, completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n if (!writeIdsToExclude && !includeHiddenWrites) {\n var shadowingNode = this.visibleWrites_.getCompleteNode(treePath);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n var subMerge = this.visibleWrites_.childCompoundWrite(treePath);\n if (subMerge.isEmpty()) {\n return completeServerCache;\n }\n else if (completeServerCache == null &&\n !subMerge.hasCompleteWrite(Path_1.Path.Empty)) {\n // We wouldn't have a complete snapshot, since there's no underlying data and no complete shadow\n return null;\n }\n else {\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return subMerge.apply(layeredCache);\n }\n }\n }\n else {\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n if (!includeHiddenWrites && merge.isEmpty()) {\n return completeServerCache;\n }\n else {\n // If the server cache is null, and we don't have a complete cache, we need to return null\n if (!includeHiddenWrites &&\n completeServerCache == null &&\n !merge.hasCompleteWrite(Path_1.Path.Empty)) {\n return null;\n }\n else {\n var filter = function (write) {\n return ((write.visible || includeHiddenWrites) &&\n (!writeIdsToExclude ||\n !~writeIdsToExclude.indexOf(write.writeId)) &&\n (write.path.contains(treePath) || treePath.contains(write.path)));\n };\n var mergeAtPath = WriteTree.layerTree_(this.allWrites_, filter, treePath);\n var layeredCache = completeServerCache || ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n return mergeAtPath.apply(layeredCache);\n }\n }\n }\n };\n /**\n * With optional, underlying server data, attempt to return a children node of children that we have complete data for.\n * Used when creating new views, to pre-fill their complete event children snapshot.\n *\n * @param {!Path} treePath\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTree.prototype.calcCompleteEventChildren = function (treePath, completeServerChildren) {\n var completeChildren = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n var topLevelSet = this.visibleWrites_.getCompleteNode(treePath);\n if (topLevelSet) {\n if (!topLevelSet.isLeafNode()) {\n // we're shadowing everything. Return the children.\n topLevelSet.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childSnap) {\n completeChildren = completeChildren.updateImmediateChild(childName, childSnap);\n });\n }\n return completeChildren;\n }\n else if (completeServerChildren) {\n // Layer any children we have on top of this\n // We know we don't have a top-level set, so just enumerate existing children\n var merge_1 = this.visibleWrites_.childCompoundWrite(treePath);\n completeServerChildren.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n var node = merge_1\n .childCompoundWrite(new Path_1.Path(childName))\n .apply(childNode);\n completeChildren = completeChildren.updateImmediateChild(childName, node);\n });\n // Add any complete children we have from the set\n merge_1.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n else {\n // We don't have anything to layer on top of. Layer on any children we have\n // Note that we can return an empty snap if we have a defined delete\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n merge.getCompleteChildren().forEach(function (namedNode) {\n completeChildren = completeChildren.updateImmediateChild(namedNode.name, namedNode.node);\n });\n return completeChildren;\n }\n };\n /**\n * Given that the underlying server data has updated, determine what, if anything, needs to be\n * applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events\n *\n * Either existingEventSnap or existingServerSnap must exist\n *\n * @param {!Path} treePath\n * @param {!Path} childPath\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcEventCacheAfterServerOverwrite = function (treePath, childPath, existingEventSnap, existingServerSnap) {\n util_2.assert(existingEventSnap || existingServerSnap, 'Either existingEventSnap or existingServerSnap must exist');\n var path = treePath.child(childPath);\n if (this.visibleWrites_.hasCompleteWrite(path)) {\n // At this point we can probably guarantee that we're in case 2, meaning no events\n // May need to check visibility while doing the findRootMostValueAndPath call\n return null;\n }\n else {\n // No complete shadowing. We're either partially shadowing or not shadowing at all.\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n if (childMerge.isEmpty()) {\n // We're not shadowing at all. Case 1\n return existingServerSnap.getChild(childPath);\n }\n else {\n // This could be more efficient if the serverNode + updates doesn't change the eventSnap\n // However this is tricky to find out, since user updates don't necessary change the server\n // snap, e.g. priority updates on empty nodes, or deep deletes. Another special case is if the server\n // adds nodes, but doesn't change any existing writes. It is therefore not enough to\n // only check if the updates change the serverNode.\n // Maybe check if the merge tree contains these special cases and only do a full overwrite in that case?\n return childMerge.apply(existingServerSnap.getChild(childPath));\n }\n }\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!Path} treePath\n * @param {!string} childKey\n * @param {!CacheNode} existingServerSnap\n * @return {?Node}\n */\n WriteTree.prototype.calcCompleteChild = function (treePath, childKey, existingServerSnap) {\n var path = treePath.child(childKey);\n var shadowingNode = this.visibleWrites_.getCompleteNode(path);\n if (shadowingNode != null) {\n return shadowingNode;\n }\n else {\n if (existingServerSnap.isCompleteForChild(childKey)) {\n var childMerge = this.visibleWrites_.childCompoundWrite(path);\n return childMerge.apply(existingServerSnap.getNode().getImmediateChild(childKey));\n }\n else {\n return null;\n }\n }\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTree.prototype.shadowingWrite = function (path) {\n return this.visibleWrites_.getCompleteNode(path);\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window.\n *\n * @param {!Path} treePath\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTree.prototype.calcIndexedSlice = function (treePath, completeServerData, startPost, count, reverse, index) {\n var toIterate;\n var merge = this.visibleWrites_.childCompoundWrite(treePath);\n var shadowingNode = merge.getCompleteNode(Path_1.Path.Empty);\n if (shadowingNode != null) {\n toIterate = shadowingNode;\n }\n else if (completeServerData != null) {\n toIterate = merge.apply(completeServerData);\n }\n else {\n // no children to iterate on\n return [];\n }\n toIterate = toIterate.withIndex(index);\n if (!toIterate.isEmpty() && !toIterate.isLeafNode()) {\n var nodes = [];\n var cmp = index.getCompare();\n var iter = reverse\n ? toIterate.getReverseIteratorFrom(startPost, index)\n : toIterate.getIteratorFrom(startPost, index);\n var next = iter.getNext();\n while (next && nodes.length < count) {\n if (cmp(next, startPost) !== 0) {\n nodes.push(next);\n }\n next = iter.getNext();\n }\n return nodes;\n }\n else {\n return [];\n }\n };\n /**\n * @param {!WriteRecord} writeRecord\n * @param {!Path} path\n * @return {boolean}\n * @private\n */\n WriteTree.prototype.recordContainsPath_ = function (writeRecord, path) {\n if (writeRecord.snap) {\n return writeRecord.path.contains(path);\n }\n else {\n // findKey can return undefined, so use !! to coerce to boolean\n return !!util_1.findKey(writeRecord.children, function (childSnap, childName) {\n return writeRecord.path.child(childName).contains(path);\n });\n }\n };\n /**\n * Re-layer the writes and merges into a tree so we can efficiently calculate event snapshots\n * @private\n */\n WriteTree.prototype.resetTree_ = function () {\n this.visibleWrites_ = WriteTree.layerTree_(this.allWrites_, WriteTree.DefaultFilter_, Path_1.Path.Empty);\n if (this.allWrites_.length > 0) {\n this.lastWriteId_ = this.allWrites_[this.allWrites_.length - 1].writeId;\n }\n else {\n this.lastWriteId_ = -1;\n }\n };\n /**\n * The default filter used when constructing the tree. Keep everything that's visible.\n *\n * @param {!WriteRecord} write\n * @return {boolean}\n * @private\n */\n WriteTree.DefaultFilter_ = function (write) {\n return write.visible;\n };\n /**\n * Static method. Given an array of WriteRecords, a filter for which ones to include, and a path, construct the tree of\n * event data at that path.\n *\n * @param {!Array.} writes\n * @param {!function(!WriteRecord):boolean} filter\n * @param {!Path} treeRoot\n * @return {!CompoundWrite}\n * @private\n */\n WriteTree.layerTree_ = function (writes, filter, treeRoot) {\n var compoundWrite = CompoundWrite_1.CompoundWrite.Empty;\n for (var i = 0; i < writes.length; ++i) {\n var write = writes[i];\n // Theory, a later set will either:\n // a) abort a relevant transaction, so no need to worry about excluding it from calculating that transaction\n // b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction\n if (filter(write)) {\n var writePath = write.path;\n var relativePath = void 0;\n if (write.snap) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrite(relativePath, write.snap);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, write.snap.getChild(relativePath));\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else if (write.children) {\n if (treeRoot.contains(writePath)) {\n relativePath = Path_1.Path.relativePath(treeRoot, writePath);\n compoundWrite = compoundWrite.addWrites(relativePath, write.children);\n }\n else if (writePath.contains(treeRoot)) {\n relativePath = Path_1.Path.relativePath(writePath, treeRoot);\n if (relativePath.isEmpty()) {\n compoundWrite = compoundWrite.addWrites(Path_1.Path.Empty, write.children);\n }\n else {\n var child = util_1.safeGet(write.children, relativePath.getFront());\n if (child) {\n // There exists a child in this node that matches the root path\n var deepNode = child.getChild(relativePath.popFront());\n compoundWrite = compoundWrite.addWrite(Path_1.Path.Empty, deepNode);\n }\n }\n }\n else {\n // There is no overlap between root path and write path, ignore write\n }\n }\n else {\n throw util_2.assertionError('WriteRecord should have .snap or .children');\n }\n }\n }\n return compoundWrite;\n };\n return WriteTree;\n}());\nexports.WriteTree = WriteTree;\n/**\n * A WriteTreeRef wraps a WriteTree and a path, for convenient access to a particular subtree. All of the methods\n * just proxy to the underlying WriteTree.\n *\n * @constructor\n */\nvar WriteTreeRef = /** @class */ (function () {\n /**\n * @param {!Path} path\n * @param {!WriteTree} writeTree\n */\n function WriteTreeRef(path, writeTree) {\n this.treePath_ = path;\n this.writeTree_ = writeTree;\n }\n /**\n * If possible, returns a complete event cache, using the underlying server data if possible. In addition, can be used\n * to get a cache that includes hidden writes, and excludes arbitrary writes. Note that customizing the returned node\n * can lead to a more expensive calculation.\n *\n * @param {?Node} completeServerCache\n * @param {Array.=} writeIdsToExclude Optional writes to exclude.\n * @param {boolean=} includeHiddenWrites Defaults to false, whether or not to layer on writes with visible set to false\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteEventCache = function (completeServerCache, writeIdsToExclude, includeHiddenWrites) {\n return this.writeTree_.calcCompleteEventCache(this.treePath_, completeServerCache, writeIdsToExclude, includeHiddenWrites);\n };\n /**\n * If possible, returns a children node containing all of the complete children we have data for. The returned data is a\n * mix of the given server data and write data.\n *\n * @param {?ChildrenNode} completeServerChildren\n * @return {!ChildrenNode}\n */\n WriteTreeRef.prototype.calcCompleteEventChildren = function (completeServerChildren) {\n return this.writeTree_.calcCompleteEventChildren(this.treePath_, completeServerChildren);\n };\n /**\n * Given that either the underlying server data has updated or the outstanding writes have updated, determine what,\n * if anything, needs to be applied to the event cache.\n *\n * Possibilities:\n *\n * 1. No writes are shadowing. Events should be raised, the snap to be applied comes from the server data\n *\n * 2. Some write is completely shadowing. No events to be raised\n *\n * 3. Is partially shadowed. Events should be raised\n *\n * Either existingEventSnap or existingServerSnap must exist, this is validated via an assert\n *\n * @param {!Path} path\n * @param {?Node} existingEventSnap\n * @param {?Node} existingServerSnap\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcEventCacheAfterServerOverwrite = function (path, existingEventSnap, existingServerSnap) {\n return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_, path, existingEventSnap, existingServerSnap);\n };\n /**\n * Returns a node if there is a complete overwrite for this path. More specifically, if there is a write at\n * a higher path, this will return the child of that write relative to the write and this path.\n * Returns null if there is no write at this path.\n *\n * @param {!Path} path\n * @return {?Node}\n */\n WriteTreeRef.prototype.shadowingWrite = function (path) {\n return this.writeTree_.shadowingWrite(this.treePath_.child(path));\n };\n /**\n * This method is used when processing child remove events on a query. If we can, we pull in children that were outside\n * the window, but may now be in the window\n *\n * @param {?Node} completeServerData\n * @param {!NamedNode} startPost\n * @param {!number} count\n * @param {boolean} reverse\n * @param {!Index} index\n * @return {!Array.}\n */\n WriteTreeRef.prototype.calcIndexedSlice = function (completeServerData, startPost, count, reverse, index) {\n return this.writeTree_.calcIndexedSlice(this.treePath_, completeServerData, startPost, count, reverse, index);\n };\n /**\n * Returns a complete child for a given server snap after applying all user writes or null if there is no\n * complete child for this ChildKey.\n *\n * @param {!string} childKey\n * @param {!CacheNode} existingServerCache\n * @return {?Node}\n */\n WriteTreeRef.prototype.calcCompleteChild = function (childKey, existingServerCache) {\n return this.writeTree_.calcCompleteChild(this.treePath_, childKey, existingServerCache);\n };\n /**\n * Return a WriteTreeRef for a child.\n *\n * @param {string} childName\n * @return {!WriteTreeRef}\n */\n WriteTreeRef.prototype.child = function (childName) {\n return new WriteTreeRef(this.treePath_.child(childName), this.writeTree_);\n };\n return WriteTreeRef;\n}());\nexports.WriteTreeRef = WriteTreeRef;\n\n//# sourceMappingURL=WriteTree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/WriteTree.js\n// module id = 95\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ImmutableTree_1 = require(\"./util/ImmutableTree\");\nvar Path_1 = require(\"./util/Path\");\nvar util_1 = require(\"@firebase/util\");\nvar Node_1 = require(\"./snap/Node\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * This class holds a collection of writes that can be applied to nodes in unison. It abstracts away the logic with\n * dealing with priority writes and multiple nested writes. At any given path there is only allowed to be one write\n * modifying that path. Any write to an existing path or shadowing an existing path will modify that existing write\n * to reflect the write added.\n *\n * @constructor\n * @param {!ImmutableTree.} writeTree\n */\nvar CompoundWrite = /** @class */ (function () {\n function CompoundWrite(writeTree_) {\n this.writeTree_ = writeTree_;\n }\n /**\n * @param {!Path} path\n * @param {!Node} node\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrite = function (path, node) {\n if (path.isEmpty()) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(node));\n }\n else {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n var rootMostPath = rootmost.path;\n var value = rootmost.value;\n var relativePath = Path_1.Path.relativePath(rootMostPath, path);\n value = value.updateChild(relativePath, node);\n return new CompoundWrite(this.writeTree_.set(rootMostPath, value));\n }\n else {\n var subtree = new ImmutableTree_1.ImmutableTree(node);\n var newWriteTree = this.writeTree_.setTree(path, subtree);\n return new CompoundWrite(newWriteTree);\n }\n }\n };\n /**\n * @param {!Path} path\n * @param {!Object.} updates\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.addWrites = function (path, updates) {\n var newWrite = this;\n util_1.forEach(updates, function (childKey, node) {\n newWrite = newWrite.addWrite(path.child(childKey), node);\n });\n return newWrite;\n };\n /**\n * Will remove a write at the given path and deeper paths. This will not modify a write at a higher\n * location, which must be removed by calling this method with that path.\n *\n * @param {!Path} path The path at which a write and all deeper writes should be removed\n * @return {!CompoundWrite} The new CompoundWrite with the removed path\n */\n CompoundWrite.prototype.removeWrite = function (path) {\n if (path.isEmpty()) {\n return CompoundWrite.Empty;\n }\n else {\n var newWriteTree = this.writeTree_.setTree(path, ImmutableTree_1.ImmutableTree.Empty);\n return new CompoundWrite(newWriteTree);\n }\n };\n /**\n * Returns whether this CompoundWrite will fully overwrite a node at a given location and can therefore be\n * considered \"complete\".\n *\n * @param {!Path} path The path to check for\n * @return {boolean} Whether there is a complete write at that path\n */\n CompoundWrite.prototype.hasCompleteWrite = function (path) {\n return this.getCompleteNode(path) != null;\n };\n /**\n * Returns a node for a path if and only if the node is a \"complete\" overwrite at that path. This will not aggregate\n * writes from deeper paths, but will return child nodes from a more shallow path.\n *\n * @param {!Path} path The path to get a complete write\n * @return {?Node} The node if complete at that path, or null otherwise.\n */\n CompoundWrite.prototype.getCompleteNode = function (path) {\n var rootmost = this.writeTree_.findRootMostValueAndPath(path);\n if (rootmost != null) {\n return this.writeTree_\n .get(rootmost.path)\n .getChild(Path_1.Path.relativePath(rootmost.path, path));\n }\n else {\n return null;\n }\n };\n /**\n * Returns all children that are guaranteed to be a complete overwrite.\n *\n * @return {!Array.} A list of all complete children.\n */\n CompoundWrite.prototype.getCompleteChildren = function () {\n var children = [];\n var node = this.writeTree_.value;\n if (node != null) {\n // If it's a leaf node, it has no children; so nothing to do.\n if (!node.isLeafNode()) {\n node.forEachChild(PriorityIndex_1.PRIORITY_INDEX, function (childName, childNode) {\n children.push(new Node_1.NamedNode(childName, childNode));\n });\n }\n }\n else {\n this.writeTree_.children.inorderTraversal(function (childName, childTree) {\n if (childTree.value != null) {\n children.push(new Node_1.NamedNode(childName, childTree.value));\n }\n });\n }\n return children;\n };\n /**\n * @param {!Path} path\n * @return {!CompoundWrite}\n */\n CompoundWrite.prototype.childCompoundWrite = function (path) {\n if (path.isEmpty()) {\n return this;\n }\n else {\n var shadowingNode = this.getCompleteNode(path);\n if (shadowingNode != null) {\n return new CompoundWrite(new ImmutableTree_1.ImmutableTree(shadowingNode));\n }\n else {\n return new CompoundWrite(this.writeTree_.subtree(path));\n }\n }\n };\n /**\n * Returns true if this CompoundWrite is empty and therefore does not modify any nodes.\n * @return {boolean} Whether this CompoundWrite is empty\n */\n CompoundWrite.prototype.isEmpty = function () {\n return this.writeTree_.isEmpty();\n };\n /**\n * Applies this CompoundWrite to a node. The node is returned with all writes from this CompoundWrite applied to the\n * node\n * @param {!Node} node The node to apply this CompoundWrite to\n * @return {!Node} The node with all writes applied\n */\n CompoundWrite.prototype.apply = function (node) {\n return CompoundWrite.applySubtreeWrite_(Path_1.Path.Empty, this.writeTree_, node);\n };\n /**\n * @type {!CompoundWrite}\n */\n CompoundWrite.Empty = new CompoundWrite(new ImmutableTree_1.ImmutableTree(null));\n /**\n * @param {!Path} relativePath\n * @param {!ImmutableTree.} writeTree\n * @param {!Node} node\n * @return {!Node}\n * @private\n */\n CompoundWrite.applySubtreeWrite_ = function (relativePath, writeTree, node) {\n if (writeTree.value != null) {\n // Since there a write is always a leaf, we're done here\n return node.updateChild(relativePath, writeTree.value);\n }\n else {\n var priorityWrite_1 = null;\n writeTree.children.inorderTraversal(function (childKey, childTree) {\n if (childKey === '.priority') {\n // Apply priorities at the end so we don't update priorities for either empty nodes or forget\n // to apply priorities to empty nodes that are later filled\n util_2.assert(childTree.value !== null, 'Priority writes must always be leaf nodes');\n priorityWrite_1 = childTree.value;\n }\n else {\n node = CompoundWrite.applySubtreeWrite_(relativePath.child(childKey), childTree, node);\n }\n });\n // If there was a priority write, we only apply it if the node is not empty\n if (!node.getChild(relativePath).isEmpty() && priorityWrite_1 !== null) {\n node = node.updateChild(relativePath.child('.priority'), priorityWrite_1);\n }\n return node;\n }\n };\n return CompoundWrite;\n}());\nexports.CompoundWrite = CompoundWrite;\n\n//# sourceMappingURL=CompoundWrite.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/CompoundWrite.js\n// module id = 96\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\n/**\n * Mutable object which basically just stores a reference to the \"latest\" immutable snapshot.\n *\n * @constructor\n */\nvar SnapshotHolder = /** @class */ (function () {\n function SnapshotHolder() {\n this.rootNode_ = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n SnapshotHolder.prototype.getNode = function (path) {\n return this.rootNode_.getChild(path);\n };\n SnapshotHolder.prototype.updateSnapshot = function (path, newSnapshotNode) {\n this.rootNode_ = this.rootNode_.updateChild(path, newSnapshotNode);\n };\n return SnapshotHolder;\n}());\nexports.SnapshotHolder = SnapshotHolder;\n\n//# sourceMappingURL=SnapshotHolder.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/SnapshotHolder.js\n// module id = 97\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util/util\");\n/**\n * Abstraction around FirebaseApp's token fetching capabilities.\n */\nvar AuthTokenProvider = /** @class */ (function () {\n /**\n * @param {!FirebaseApp} app_\n */\n function AuthTokenProvider(app_) {\n this.app_ = app_;\n }\n /**\n * @param {boolean} forceRefresh\n * @return {!Promise}\n */\n AuthTokenProvider.prototype.getToken = function (forceRefresh) {\n return this.app_['INTERNAL']['getToken'](forceRefresh).then(null, \n // .catch\n function (error) {\n // TODO: Need to figure out all the cases this is raised and whether\n // this makes sense.\n if (error && error.code === 'auth/token-not-initialized') {\n util_1.log('Got auth/token-not-initialized error. Treating as null token.');\n return null;\n }\n else {\n return Promise.reject(error);\n }\n });\n };\n AuthTokenProvider.prototype.addTokenChangeListener = function (listener) {\n // TODO: We might want to wrap the listener and call it with no args to\n // avoid a leaky abstraction, but that makes removing the listener harder.\n this.app_['INTERNAL']['addAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.removeTokenChangeListener = function (listener) {\n this.app_['INTERNAL']['removeAuthTokenListener'](listener);\n };\n AuthTokenProvider.prototype.notifyForInvalidToken = function () {\n var errorMessage = 'Provided authentication credentials for the app named \"' +\n this.app_.name +\n '\" are invalid. This usually indicates your app was not ' +\n 'initialized correctly. ';\n if ('credential' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"credential\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else if ('serviceAccount' in this.app_.options) {\n errorMessage +=\n 'Make sure the \"serviceAccount\" property provided to initializeApp() ' +\n 'is authorized to access the specified \"databaseURL\" and is from the correct ' +\n 'project.';\n }\n else {\n errorMessage +=\n 'Make sure the \"apiKey\" and \"databaseURL\" properties provided to ' +\n 'initializeApp() match the values provided for your app at ' +\n 'https://console.firebase.google.com/.';\n }\n util_1.warn(errorMessage);\n };\n return AuthTokenProvider;\n}());\nexports.AuthTokenProvider = AuthTokenProvider;\n\n//# sourceMappingURL=AuthTokenProvider.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/AuthTokenProvider.js\n// module id = 98\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Tracks a collection of stats.\n *\n * @constructor\n */\nvar StatsCollection = /** @class */ (function () {\n function StatsCollection() {\n this.counters_ = {};\n }\n StatsCollection.prototype.incrementCounter = function (name, amount) {\n if (amount === void 0) { amount = 1; }\n if (!util_2.contains(this.counters_, name))\n this.counters_[name] = 0;\n this.counters_[name] += amount;\n };\n StatsCollection.prototype.get = function () {\n return util_1.deepCopy(this.counters_);\n };\n return StatsCollection;\n}());\nexports.StatsCollection = StatsCollection;\n\n//# sourceMappingURL=StatsCollection.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsCollection.js\n// module id = 99\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar StatsListener_1 = require(\"./StatsListener\");\n// Assuming some apps may have a short amount of time on page, and a bulk of firebase operations probably\n// happen on page load, we try to report our first set of stats pretty quickly, but we wait at least 10\n// seconds to try to ensure the Firebase connection is established / settled.\nvar FIRST_STATS_MIN_TIME = 10 * 1000;\nvar FIRST_STATS_MAX_TIME = 30 * 1000;\n// We'll continue to report stats on average every 5 minutes.\nvar REPORT_STATS_INTERVAL = 5 * 60 * 1000;\n/**\n * @constructor\n */\nvar StatsReporter = /** @class */ (function () {\n /**\n * @param collection\n * @param server_\n */\n function StatsReporter(collection, server_) {\n this.server_ = server_;\n this.statsToReport_ = {};\n this.statsListener_ = new StatsListener_1.StatsListener(collection);\n var timeout = FIRST_STATS_MIN_TIME +\n (FIRST_STATS_MAX_TIME - FIRST_STATS_MIN_TIME) * Math.random();\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(timeout));\n }\n StatsReporter.prototype.includeStat = function (stat) {\n this.statsToReport_[stat] = true;\n };\n StatsReporter.prototype.reportStats_ = function () {\n var _this = this;\n var stats = this.statsListener_.get();\n var reportedStats = {};\n var haveStatsToReport = false;\n util_1.forEach(stats, function (stat, value) {\n if (value > 0 && util_1.contains(_this.statsToReport_, stat)) {\n reportedStats[stat] = value;\n haveStatsToReport = true;\n }\n });\n if (haveStatsToReport) {\n this.server_.reportStats(reportedStats);\n }\n // queue our next run.\n util_2.setTimeoutNonBlocking(this.reportStats_.bind(this), Math.floor(Math.random() * 2 * REPORT_STATS_INTERVAL));\n };\n return StatsReporter;\n}());\nexports.StatsReporter = StatsReporter;\n\n//# sourceMappingURL=StatsReporter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/stats/StatsReporter.js\n// module id = 100\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util/util\");\n/**\n * The event queue serves a few purposes:\n * 1. It ensures we maintain event order in the face of event callbacks doing operations that result in more\n * events being queued.\n * 2. raiseQueuedEvents() handles being called reentrantly nicely. That is, if in the course of raising events,\n * raiseQueuedEvents() is called again, the \"inner\" call will pick up raising events where the \"outer\" call\n * left off, ensuring that the events are still raised synchronously and in order.\n * 3. You can use raiseEventsAtPath and raiseEventsForChangedPath to ensure only relevant previously-queued\n * events are raised synchronously.\n *\n * NOTE: This can all go away if/when we move to async events.\n *\n * @constructor\n */\nvar EventQueue = /** @class */ (function () {\n function EventQueue() {\n /**\n * @private\n * @type {!Array.}\n */\n this.eventLists_ = [];\n /**\n * Tracks recursion depth of raiseQueuedEvents_, for debugging purposes.\n * @private\n * @type {!number}\n */\n this.recursionDepth_ = 0;\n }\n /**\n * @param {!Array.} eventDataList The new events to queue.\n */\n EventQueue.prototype.queueEvents = function (eventDataList) {\n // We group events by path, storing them in a single EventList, to make it easier to skip over them quickly.\n var currList = null;\n for (var i = 0; i < eventDataList.length; i++) {\n var eventData = eventDataList[i];\n var eventPath = eventData.getPath();\n if (currList !== null && !eventPath.equals(currList.getPath())) {\n this.eventLists_.push(currList);\n currList = null;\n }\n if (currList === null) {\n currList = new EventList(eventPath);\n }\n currList.add(eventData);\n }\n if (currList) {\n this.eventLists_.push(currList);\n }\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones)\n * for the specified path.\n *\n * It is assumed that the new events are all for the specified path.\n *\n * @param {!Path} path The path to raise events for.\n * @param {!Array.} eventDataList The new events to raise.\n */\n EventQueue.prototype.raiseEventsAtPath = function (path, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.equals(path);\n });\n };\n /**\n * Queues the specified events and synchronously raises all events (including previously queued ones) for\n * locations related to the specified change path (i.e. all ancestors and descendants).\n *\n * It is assumed that the new events are all related (ancestor or descendant) to the specified path.\n *\n * @param {!Path} changedPath The path to raise events for.\n * @param {!Array.} eventDataList The events to raise\n */\n EventQueue.prototype.raiseEventsForChangedPath = function (changedPath, eventDataList) {\n this.queueEvents(eventDataList);\n this.raiseQueuedEventsMatchingPredicate_(function (eventPath) {\n return eventPath.contains(changedPath) || changedPath.contains(eventPath);\n });\n };\n /**\n * @param {!function(!Path):boolean} predicate\n * @private\n */\n EventQueue.prototype.raiseQueuedEventsMatchingPredicate_ = function (predicate) {\n this.recursionDepth_++;\n var sentAll = true;\n for (var i = 0; i < this.eventLists_.length; i++) {\n var eventList = this.eventLists_[i];\n if (eventList) {\n var eventPath = eventList.getPath();\n if (predicate(eventPath)) {\n this.eventLists_[i].raise();\n this.eventLists_[i] = null;\n }\n else {\n sentAll = false;\n }\n }\n }\n if (sentAll) {\n this.eventLists_ = [];\n }\n this.recursionDepth_--;\n };\n return EventQueue;\n}());\nexports.EventQueue = EventQueue;\n/**\n * @param {!Path} path\n * @constructor\n */\nvar EventList = /** @class */ (function () {\n function EventList(path_) {\n this.path_ = path_;\n /**\n * @type {!Array.}\n * @private\n */\n this.events_ = [];\n }\n /**\n * @param {!Event} eventData\n */\n EventList.prototype.add = function (eventData) {\n this.events_.push(eventData);\n };\n /**\n * Iterates through the list and raises each event\n */\n EventList.prototype.raise = function () {\n for (var i = 0; i < this.events_.length; i++) {\n var eventData = this.events_[i];\n if (eventData !== null) {\n this.events_[i] = null;\n var eventFn = eventData.getEventRunner();\n if (util_1.logger) {\n util_1.log('event: ' + eventData.toString());\n }\n util_1.exceptionGuard(eventFn);\n }\n }\n };\n /**\n * @return {!Path}\n */\n EventList.prototype.getPath = function () {\n return this.path_;\n };\n return EventList;\n}());\nexports.EventList = EventList;\n\n//# sourceMappingURL=EventQueue.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/EventQueue.js\n// module id = 101\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar EventEmitter_1 = require(\"./EventEmitter\");\nvar util_1 = require(\"@firebase/util\");\n/**\n * @extends {EventEmitter}\n */\nvar VisibilityMonitor = /** @class */ (function (_super) {\n __extends(VisibilityMonitor, _super);\n function VisibilityMonitor() {\n var _this = _super.call(this, ['visible']) || this;\n var hidden;\n var visibilityChange;\n if (typeof document !== 'undefined' &&\n typeof document.addEventListener !== 'undefined') {\n if (typeof document['hidden'] !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n visibilityChange = 'visibilitychange';\n hidden = 'hidden';\n }\n else if (typeof document['mozHidden'] !== 'undefined') {\n visibilityChange = 'mozvisibilitychange';\n hidden = 'mozHidden';\n }\n else if (typeof document['msHidden'] !== 'undefined') {\n visibilityChange = 'msvisibilitychange';\n hidden = 'msHidden';\n }\n else if (typeof document['webkitHidden'] !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange';\n hidden = 'webkitHidden';\n }\n }\n // Initially, we always assume we are visible. This ensures that in browsers\n // without page visibility support or in cases where we are never visible\n // (e.g. chrome extension), we act as if we are visible, i.e. don't delay\n // reconnects\n _this.visible_ = true;\n if (visibilityChange) {\n document.addEventListener(visibilityChange, function () {\n var visible = !document[hidden];\n if (visible !== _this.visible_) {\n _this.visible_ = visible;\n _this.trigger('visible', visible);\n }\n }, false);\n }\n return _this;\n }\n VisibilityMonitor.getInstance = function () {\n return new VisibilityMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n VisibilityMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'visible', 'Unknown event type: ' + eventType);\n return [this.visible_];\n };\n return VisibilityMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.VisibilityMonitor = VisibilityMonitor;\n\n//# sourceMappingURL=VisibilityMonitor.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/VisibilityMonitor.js\n// module id = 102\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar EventEmitter_1 = require(\"./EventEmitter\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Monitors online state (as reported by window.online/offline events).\n *\n * The expectation is that this could have many false positives (thinks we are online\n * when we're not), but no false negatives. So we can safely use it to determine when\n * we definitely cannot reach the internet.\n *\n * @extends {EventEmitter}\n */\nvar OnlineMonitor = /** @class */ (function (_super) {\n __extends(OnlineMonitor, _super);\n function OnlineMonitor() {\n var _this = _super.call(this, ['online']) || this;\n _this.online_ = true;\n // We've had repeated complaints that Cordova apps can get stuck \"offline\", e.g.\n // https://forum.ionicframework.com/t/firebase-connection-is-lost-and-never-come-back/43810\n // It would seem that the 'online' event does not always fire consistently. So we disable it\n // for Cordova.\n if (typeof window !== 'undefined' &&\n typeof window.addEventListener !== 'undefined' &&\n !util_2.isMobileCordova()) {\n window.addEventListener('online', function () {\n if (!_this.online_) {\n _this.online_ = true;\n _this.trigger('online', true);\n }\n }, false);\n window.addEventListener('offline', function () {\n if (_this.online_) {\n _this.online_ = false;\n _this.trigger('online', false);\n }\n }, false);\n }\n return _this;\n }\n OnlineMonitor.getInstance = function () {\n return new OnlineMonitor();\n };\n /**\n * @param {!string} eventType\n * @return {Array.}\n */\n OnlineMonitor.prototype.getInitialEvent = function (eventType) {\n util_1.assert(eventType === 'online', 'Unknown event type: ' + eventType);\n return [this.online_];\n };\n /**\n * @return {boolean}\n */\n OnlineMonitor.prototype.currentlyOnline = function () {\n return this.online_;\n };\n return OnlineMonitor;\n}(EventEmitter_1.EventEmitter));\nexports.OnlineMonitor = OnlineMonitor;\n\n//# sourceMappingURL=OnlineMonitor.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/OnlineMonitor.js\n// module id = 103\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BrowserPollConnection_1 = require(\"./BrowserPollConnection\");\nvar WebSocketConnection_1 = require(\"./WebSocketConnection\");\nvar util_1 = require(\"../core/util/util\");\n/**\n * Currently simplistic, this class manages what transport a Connection should use at various stages of its\n * lifecycle.\n *\n * It starts with longpolling in a browser, and httppolling on node. It then upgrades to websockets if\n * they are available.\n * @constructor\n */\nvar TransportManager = /** @class */ (function () {\n /**\n * @param {!RepoInfo} repoInfo Metadata around the namespace we're connecting to\n */\n function TransportManager(repoInfo) {\n this.initTransports_(repoInfo);\n }\n Object.defineProperty(TransportManager, \"ALL_TRANSPORTS\", {\n /**\n * @const\n * @type {!Array.}\n */\n get: function () {\n return [BrowserPollConnection_1.BrowserPollConnection, WebSocketConnection_1.WebSocketConnection];\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @param {!RepoInfo} repoInfo\n * @private\n */\n TransportManager.prototype.initTransports_ = function (repoInfo) {\n var isWebSocketsAvailable = WebSocketConnection_1.WebSocketConnection && WebSocketConnection_1.WebSocketConnection['isAvailable']();\n var isSkipPollConnection = isWebSocketsAvailable && !WebSocketConnection_1.WebSocketConnection.previouslyFailed();\n if (repoInfo.webSocketOnly) {\n if (!isWebSocketsAvailable)\n util_1.warn(\"wss:// URL used, but browser isn't known to support websockets. Trying anyway.\");\n isSkipPollConnection = true;\n }\n if (isSkipPollConnection) {\n this.transports_ = [WebSocketConnection_1.WebSocketConnection];\n }\n else {\n var transports_1 = (this.transports_ = []);\n util_1.each(TransportManager.ALL_TRANSPORTS, function (i, transport) {\n if (transport && transport['isAvailable']()) {\n transports_1.push(transport);\n }\n });\n }\n };\n /**\n * @return {function(new:Transport, !string, !RepoInfo, string=, string=)} The constructor for the\n * initial transport to use\n */\n TransportManager.prototype.initialTransport = function () {\n if (this.transports_.length > 0) {\n return this.transports_[0];\n }\n else {\n throw new Error('No transports available');\n }\n };\n /**\n * @return {?function(new:Transport, function(),function(), string=)} The constructor for the next\n * transport, or null\n */\n TransportManager.prototype.upgradeTransport = function () {\n if (this.transports_.length > 1) {\n return this.transports_[1];\n }\n else {\n return null;\n }\n };\n return TransportManager;\n}());\nexports.TransportManager = TransportManager;\n\n//# sourceMappingURL=TransportManager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/TransportManager.js\n// module id = 104\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../../core/util/util\");\n/**\n * This class ensures the packets from the server arrive in order\n * This class takes data from the server and ensures it gets passed into the callbacks in order.\n * @constructor\n */\nvar PacketReceiver = /** @class */ (function () {\n /**\n * @param onMessage_\n */\n function PacketReceiver(onMessage_) {\n this.onMessage_ = onMessage_;\n this.pendingResponses = [];\n this.currentResponseNum = 0;\n this.closeAfterResponse = -1;\n this.onClose = null;\n }\n PacketReceiver.prototype.closeAfter = function (responseNum, callback) {\n this.closeAfterResponse = responseNum;\n this.onClose = callback;\n if (this.closeAfterResponse < this.currentResponseNum) {\n this.onClose();\n this.onClose = null;\n }\n };\n /**\n * Each message from the server comes with a response number, and an array of data. The responseNumber\n * allows us to ensure that we process them in the right order, since we can't be guaranteed that all\n * browsers will respond in the same order as the requests we sent\n * @param {number} requestNum\n * @param {Array} data\n */\n PacketReceiver.prototype.handleResponse = function (requestNum, data) {\n var _this = this;\n this.pendingResponses[requestNum] = data;\n var _loop_1 = function () {\n var toProcess = this_1.pendingResponses[this_1.currentResponseNum];\n delete this_1.pendingResponses[this_1.currentResponseNum];\n var _loop_2 = function (i) {\n if (toProcess[i]) {\n util_1.exceptionGuard(function () {\n _this.onMessage_(toProcess[i]);\n });\n }\n };\n for (var i = 0; i < toProcess.length; ++i) {\n _loop_2(i);\n }\n if (this_1.currentResponseNum === this_1.closeAfterResponse) {\n if (this_1.onClose) {\n this_1.onClose();\n this_1.onClose = null;\n }\n return \"break\";\n }\n this_1.currentResponseNum++;\n };\n var this_1 = this;\n while (this.pendingResponses[this.currentResponseNum]) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n };\n return PacketReceiver;\n}());\nexports.PacketReceiver = PacketReceiver;\n\n//# sourceMappingURL=PacketReceiver.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/realtime/polling/PacketReceiver.js\n// module id = 105\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"./util/util\");\nvar util_3 = require(\"@firebase/util\");\nvar util_4 = require(\"@firebase/util\");\nvar util_5 = require(\"@firebase/util\");\nvar ServerActions_1 = require(\"./ServerActions\");\n/**\n * An implementation of ServerActions that communicates with the server via REST requests.\n * This is mostly useful for compatibility with crawlers, where we don't want to spin up a full\n * persistent connection (using WebSockets or long-polling)\n */\nvar ReadonlyRestClient = /** @class */ (function (_super) {\n __extends(ReadonlyRestClient, _super);\n /**\n * @param {!RepoInfo} repoInfo_ Data about the namespace we are connecting to\n * @param {function(string, *, boolean, ?number)} onDataUpdate_ A callback for new data from the server\n * @param {AuthTokenProvider} authTokenProvider_\n * @implements {ServerActions}\n */\n function ReadonlyRestClient(repoInfo_, onDataUpdate_, authTokenProvider_) {\n var _this = _super.call(this) || this;\n _this.repoInfo_ = repoInfo_;\n _this.onDataUpdate_ = onDataUpdate_;\n _this.authTokenProvider_ = authTokenProvider_;\n /** @private {function(...[*])} */\n _this.log_ = util_2.logWrapper('p:rest:');\n /**\n * We don't actually need to track listens, except to prevent us calling an onComplete for a listen\n * that's been removed. :-/\n *\n * @private {!Object.}\n */\n _this.listens_ = {};\n return _this;\n }\n ReadonlyRestClient.prototype.reportStats = function (stats) {\n throw new Error('Method not implemented.');\n };\n /**\n * @param {!Query} query\n * @param {?number=} tag\n * @return {string}\n * @private\n */\n ReadonlyRestClient.getListenId_ = function (query, tag) {\n if (tag !== undefined) {\n return 'tag$' + tag;\n }\n else {\n util_1.assert(query.getQueryParams().isDefault(), \"should have a tag if it's not a default query.\");\n return query.path.toString();\n }\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.listen = function (query, currentHashFn, tag, onComplete) {\n var _this = this;\n var pathString = query.path.toString();\n this.log_('Listen called for ' + pathString + ' ' + query.queryIdentifier());\n // Mark this listener so we can tell if it's removed.\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n var thisListen = {};\n this.listens_[listenId] = thisListen;\n var queryStringParamaters = query\n .getQueryParams()\n .toRestQueryStringParameters();\n this.restRequest_(pathString + '.json', queryStringParamaters, function (error, result) {\n var data = result;\n if (error === 404) {\n data = null;\n error = null;\n }\n if (error === null) {\n _this.onDataUpdate_(pathString, data, /*isMerge=*/ false, tag);\n }\n if (util_4.safeGet(_this.listens_, listenId) === thisListen) {\n var status_1;\n if (!error) {\n status_1 = 'ok';\n }\n else if (error == 401) {\n status_1 = 'permission_denied';\n }\n else {\n status_1 = 'rest_error:' + error;\n }\n onComplete(status_1, null);\n }\n });\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.unlisten = function (query, tag) {\n var listenId = ReadonlyRestClient.getListenId_(query, tag);\n delete this.listens_[listenId];\n };\n /** @inheritDoc */\n ReadonlyRestClient.prototype.refreshAuthToken = function (token) {\n // no-op since we just always call getToken.\n };\n /**\n * Performs a REST request to the given path, with the provided query string parameters,\n * and any auth credentials we have.\n *\n * @param {!string} pathString\n * @param {!Object.} queryStringParameters\n * @param {?function(?number, *=)} callback\n * @private\n */\n ReadonlyRestClient.prototype.restRequest_ = function (pathString, queryStringParameters, callback) {\n var _this = this;\n if (queryStringParameters === void 0) { queryStringParameters = {}; }\n queryStringParameters['format'] = 'export';\n this.authTokenProvider_\n .getToken(/*forceRefresh=*/ false)\n .then(function (authTokenData) {\n var authToken = authTokenData && authTokenData.accessToken;\n if (authToken) {\n queryStringParameters['auth'] = authToken;\n }\n var url = (_this.repoInfo_.secure ? 'https://' : 'http://') +\n _this.repoInfo_.host +\n pathString +\n '?' +\n util_5.querystring(queryStringParameters);\n _this.log_('Sending REST request for ' + url);\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (callback && xhr.readyState === 4) {\n _this.log_('REST Response for ' + url + ' received. status:', xhr.status, 'response:', xhr.responseText);\n var res = null;\n if (xhr.status >= 200 && xhr.status < 300) {\n try {\n res = util_3.jsonEval(xhr.responseText);\n }\n catch (e) {\n util_2.warn('Failed to parse JSON response for ' +\n url +\n ': ' +\n xhr.responseText);\n }\n callback(null, res);\n }\n else {\n // 401 and 404 are expected.\n if (xhr.status !== 401 && xhr.status !== 404) {\n util_2.warn('Got unsuccessful REST response for ' +\n url +\n ' Status: ' +\n xhr.status);\n }\n callback(xhr.status);\n }\n callback = null;\n }\n };\n xhr.open('GET', url, /*asynchronous=*/ true);\n xhr.send();\n });\n };\n return ReadonlyRestClient;\n}(ServerActions_1.ServerActions));\nexports.ReadonlyRestClient = ReadonlyRestClient;\n\n//# sourceMappingURL=ReadonlyRestClient.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/ReadonlyRestClient.js\n// module id = 106\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar util_2 = require(\"../util/util\");\nvar KeyIndex_1 = require(\"../snap/indexes/KeyIndex\");\nvar PriorityIndex_1 = require(\"../snap/indexes/PriorityIndex\");\nvar ValueIndex_1 = require(\"../snap/indexes/ValueIndex\");\nvar PathIndex_1 = require(\"../snap/indexes/PathIndex\");\nvar IndexedFilter_1 = require(\"./filter/IndexedFilter\");\nvar LimitedFilter_1 = require(\"./filter/LimitedFilter\");\nvar RangedFilter_1 = require(\"./filter/RangedFilter\");\nvar util_3 = require(\"@firebase/util\");\n/**\n * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a\n * range to be returned for a particular location. It is assumed that validation of parameters is done at the\n * user-facing API level, so it is not done here.\n * @constructor\n */\nvar QueryParams = /** @class */ (function () {\n function QueryParams() {\n this.limitSet_ = false;\n this.startSet_ = false;\n this.startNameSet_ = false;\n this.endSet_ = false;\n this.endNameSet_ = false;\n this.limit_ = 0;\n this.viewFrom_ = '';\n this.indexStartValue_ = null;\n this.indexStartName_ = '';\n this.indexEndValue_ = null;\n this.indexEndName_ = '';\n this.index_ = PriorityIndex_1.PRIORITY_INDEX;\n }\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasStart = function () {\n return this.startSet_;\n };\n /**\n * @return {boolean} True if it would return from left.\n */\n QueryParams.prototype.isViewFromLeft = function () {\n if (this.viewFrom_ === '') {\n // limit(), rather than limitToFirst or limitToLast was called.\n // This means that only one of startSet_ and endSet_ is true. Use them\n // to calculate which side of the view to anchor to. If neither is set,\n // anchor to the end.\n return this.startSet_;\n }\n else {\n return (this.viewFrom_ === QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT);\n }\n };\n /**\n * Only valid to call if hasStart() returns true\n * @return {*}\n */\n QueryParams.prototype.getIndexStartValue = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n return this.indexStartValue_;\n };\n /**\n * Only valid to call if hasStart() returns true.\n * Returns the starting key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexStartName = function () {\n util_1.assert(this.startSet_, 'Only valid if start has been set');\n if (this.startNameSet_) {\n return this.indexStartName_;\n }\n else {\n return util_2.MIN_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasEnd = function () {\n return this.endSet_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * @return {*}\n */\n QueryParams.prototype.getIndexEndValue = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n return this.indexEndValue_;\n };\n /**\n * Only valid to call if hasEnd() returns true.\n * Returns the end key name for the range defined by these query parameters\n * @return {!string}\n */\n QueryParams.prototype.getIndexEndName = function () {\n util_1.assert(this.endSet_, 'Only valid if end has been set');\n if (this.endNameSet_) {\n return this.indexEndName_;\n }\n else {\n return util_2.MAX_NAME;\n }\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.hasLimit = function () {\n return this.limitSet_;\n };\n /**\n * @return {boolean} True if a limit has been set and it has been explicitly anchored\n */\n QueryParams.prototype.hasAnchoredLimit = function () {\n return this.limitSet_ && this.viewFrom_ !== '';\n };\n /**\n * Only valid to call if hasLimit() returns true\n * @return {!number}\n */\n QueryParams.prototype.getLimit = function () {\n util_1.assert(this.limitSet_, 'Only valid if limit has been set');\n return this.limit_;\n };\n /**\n * @return {!Index}\n */\n QueryParams.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @return {!QueryParams}\n * @private\n */\n QueryParams.prototype.copy_ = function () {\n var copy = new QueryParams();\n copy.limitSet_ = this.limitSet_;\n copy.limit_ = this.limit_;\n copy.startSet_ = this.startSet_;\n copy.indexStartValue_ = this.indexStartValue_;\n copy.startNameSet_ = this.startNameSet_;\n copy.indexStartName_ = this.indexStartName_;\n copy.endSet_ = this.endSet_;\n copy.indexEndValue_ = this.indexEndValue_;\n copy.endNameSet_ = this.endNameSet_;\n copy.indexEndName_ = this.indexEndName_;\n copy.index_ = this.index_;\n copy.viewFrom_ = this.viewFrom_;\n return copy;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limit = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = '';\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToFirst = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT;\n return newParams;\n };\n /**\n * @param {!number} newLimit\n * @return {!QueryParams}\n */\n QueryParams.prototype.limitToLast = function (newLimit) {\n var newParams = this.copy_();\n newParams.limitSet_ = true;\n newParams.limit_ = newLimit;\n newParams.viewFrom_ = QueryParams.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT;\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.startAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.startSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexStartValue_ = indexValue;\n if (key != null) {\n newParams.startNameSet_ = true;\n newParams.indexStartName_ = key;\n }\n else {\n newParams.startNameSet_ = false;\n newParams.indexStartName_ = '';\n }\n return newParams;\n };\n /**\n * @param {*} indexValue\n * @param {?string=} key\n * @return {!QueryParams}\n */\n QueryParams.prototype.endAt = function (indexValue, key) {\n var newParams = this.copy_();\n newParams.endSet_ = true;\n if (!(indexValue !== undefined)) {\n indexValue = null;\n }\n newParams.indexEndValue_ = indexValue;\n if (key !== undefined) {\n newParams.endNameSet_ = true;\n newParams.indexEndName_ = key;\n }\n else {\n newParams.endNameSet_ = false;\n newParams.indexEndName_ = '';\n }\n return newParams;\n };\n /**\n * @param {!Index} index\n * @return {!QueryParams}\n */\n QueryParams.prototype.orderBy = function (index) {\n var newParams = this.copy_();\n newParams.index_ = index;\n return newParams;\n };\n /**\n * @return {!Object}\n */\n QueryParams.prototype.getQueryObject = function () {\n var WIRE_PROTOCOL_CONSTANTS = QueryParams.WIRE_PROTOCOL_CONSTANTS_;\n var obj = {};\n if (this.startSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_VALUE] = this.indexStartValue_;\n if (this.startNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_START_NAME] = this.indexStartName_;\n }\n }\n if (this.endSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_VALUE] = this.indexEndValue_;\n if (this.endNameSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX_END_NAME] = this.indexEndName_;\n }\n }\n if (this.limitSet_) {\n obj[WIRE_PROTOCOL_CONSTANTS.LIMIT] = this.limit_;\n var viewFrom = this.viewFrom_;\n if (viewFrom === '') {\n if (this.isViewFromLeft()) {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_LEFT;\n }\n else {\n viewFrom = WIRE_PROTOCOL_CONSTANTS.VIEW_FROM_RIGHT;\n }\n }\n obj[WIRE_PROTOCOL_CONSTANTS.VIEW_FROM] = viewFrom;\n }\n // For now, priority index is the default, so we only specify if it's some other index\n if (this.index_ !== PriorityIndex_1.PRIORITY_INDEX) {\n obj[WIRE_PROTOCOL_CONSTANTS.INDEX] = this.index_.toString();\n }\n return obj;\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.loadsAllData = function () {\n return !(this.startSet_ || this.endSet_ || this.limitSet_);\n };\n /**\n * @return {boolean}\n */\n QueryParams.prototype.isDefault = function () {\n return this.loadsAllData() && this.index_ == PriorityIndex_1.PRIORITY_INDEX;\n };\n /**\n * @return {!NodeFilter}\n */\n QueryParams.prototype.getNodeFilter = function () {\n if (this.loadsAllData()) {\n return new IndexedFilter_1.IndexedFilter(this.getIndex());\n }\n else if (this.hasLimit()) {\n return new LimitedFilter_1.LimitedFilter(this);\n }\n else {\n return new RangedFilter_1.RangedFilter(this);\n }\n };\n /**\n * Returns a set of REST query string parameters representing this query.\n *\n * @return {!Object.} query string parameters\n */\n QueryParams.prototype.toRestQueryStringParameters = function () {\n var REST_CONSTANTS = QueryParams.REST_QUERY_CONSTANTS_;\n var qs = {};\n if (this.isDefault()) {\n return qs;\n }\n var orderBy;\n if (this.index_ === PriorityIndex_1.PRIORITY_INDEX) {\n orderBy = REST_CONSTANTS.PRIORITY_INDEX;\n }\n else if (this.index_ === ValueIndex_1.VALUE_INDEX) {\n orderBy = REST_CONSTANTS.VALUE_INDEX;\n }\n else if (this.index_ === KeyIndex_1.KEY_INDEX) {\n orderBy = REST_CONSTANTS.KEY_INDEX;\n }\n else {\n util_1.assert(this.index_ instanceof PathIndex_1.PathIndex, 'Unrecognized index type!');\n orderBy = this.index_.toString();\n }\n qs[REST_CONSTANTS.ORDER_BY] = util_3.stringify(orderBy);\n if (this.startSet_) {\n qs[REST_CONSTANTS.START_AT] = util_3.stringify(this.indexStartValue_);\n if (this.startNameSet_) {\n qs[REST_CONSTANTS.START_AT] += ',' + util_3.stringify(this.indexStartName_);\n }\n }\n if (this.endSet_) {\n qs[REST_CONSTANTS.END_AT] = util_3.stringify(this.indexEndValue_);\n if (this.endNameSet_) {\n qs[REST_CONSTANTS.END_AT] += ',' + util_3.stringify(this.indexEndName_);\n }\n }\n if (this.limitSet_) {\n if (this.isViewFromLeft()) {\n qs[REST_CONSTANTS.LIMIT_TO_FIRST] = this.limit_;\n }\n else {\n qs[REST_CONSTANTS.LIMIT_TO_LAST] = this.limit_;\n }\n }\n return qs;\n };\n /**\n * Wire Protocol Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.WIRE_PROTOCOL_CONSTANTS_ = {\n INDEX_START_VALUE: 'sp',\n INDEX_START_NAME: 'sn',\n INDEX_END_VALUE: 'ep',\n INDEX_END_NAME: 'en',\n LIMIT: 'l',\n VIEW_FROM: 'vf',\n VIEW_FROM_LEFT: 'l',\n VIEW_FROM_RIGHT: 'r',\n INDEX: 'i'\n };\n /**\n * REST Query Constants\n * @const\n * @enum {string}\n * @private\n */\n QueryParams.REST_QUERY_CONSTANTS_ = {\n ORDER_BY: 'orderBy',\n PRIORITY_INDEX: '$priority',\n VALUE_INDEX: '$value',\n KEY_INDEX: '$key',\n START_AT: 'startAt',\n END_AT: 'endAt',\n LIMIT_TO_FIRST: 'limitToFirst',\n LIMIT_TO_LAST: 'limitToLast'\n };\n /**\n * Default, empty query parameters\n * @type {!QueryParams}\n * @const\n */\n QueryParams.DEFAULT = new QueryParams();\n return QueryParams;\n}());\nexports.QueryParams = QueryParams;\n\n//# sourceMappingURL=QueryParams.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/QueryParams.js\n// module id = 107\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RangedFilter_1 = require(\"./RangedFilter\");\nvar ChildrenNode_1 = require(\"../../snap/ChildrenNode\");\nvar Node_1 = require(\"../../snap/Node\");\nvar util_1 = require(\"@firebase/util\");\nvar Change_1 = require(\"../Change\");\n/**\n * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible\n *\n * @constructor\n * @implements {NodeFilter}\n */\nvar LimitedFilter = /** @class */ (function () {\n /**\n * @param {!QueryParams} params\n */\n function LimitedFilter(params) {\n this.rangedFilter_ = new RangedFilter_1.RangedFilter(params);\n this.index_ = params.getIndex();\n this.limit_ = params.getLimit();\n this.reverse_ = !params.isViewFromLeft();\n }\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateChild = function (snap, key, newChild, affectedPath, source, optChangeAccumulator) {\n if (!this.rangedFilter_.matches(new Node_1.NamedNode(key, newChild))) {\n newChild = ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n }\n if (snap.getImmediateChild(key).equals(newChild)) {\n // No change\n return snap;\n }\n else if (snap.numChildren() < this.limit_) {\n return this.rangedFilter_\n .getIndexedFilter()\n .updateChild(snap, key, newChild, affectedPath, source, optChangeAccumulator);\n }\n else {\n return this.fullLimitUpdateChild_(snap, key, newChild, source, optChangeAccumulator);\n }\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updateFullNode = function (oldSnap, newSnap, optChangeAccumulator) {\n var filtered;\n if (newSnap.isLeafNode() || newSnap.isEmpty()) {\n // Make sure we have a children node with the correct index, not a leaf node;\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n }\n else {\n if (this.limit_ * 2 < newSnap.numChildren() &&\n newSnap.isIndexed(this.index_)) {\n // Easier to build up a snapshot, since what we're given has more than twice the elements we want\n filtered = ChildrenNode_1.ChildrenNode.EMPTY_NODE.withIndex(this.index_);\n // anchor to the startPost, endPost, or last element as appropriate\n var iterator = void 0;\n if (this.reverse_) {\n iterator = newSnap.getReverseIteratorFrom(this.rangedFilter_.getEndPost(), this.index_);\n }\n else {\n iterator = newSnap.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_);\n }\n var count = 0;\n while (iterator.hasNext() && count < this.limit_) {\n var next = iterator.getNext();\n var inRange = void 0;\n if (this.reverse_) {\n inRange =\n this.index_.compare(this.rangedFilter_.getStartPost(), next) <= 0;\n }\n else {\n inRange =\n this.index_.compare(next, this.rangedFilter_.getEndPost()) <= 0;\n }\n if (inRange) {\n filtered = filtered.updateImmediateChild(next.name, next.node);\n count++;\n }\n else {\n // if we have reached the end post, we cannot keep adding elemments\n break;\n }\n }\n }\n else {\n // The snap contains less than twice the limit. Faster to delete from the snap than build up a new one\n filtered = newSnap.withIndex(this.index_);\n // Don't support priorities on queries\n filtered = filtered.updatePriority(ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var startPost = void 0;\n var endPost = void 0;\n var cmp = void 0;\n var iterator = void 0;\n if (this.reverse_) {\n iterator = filtered.getReverseIterator(this.index_);\n startPost = this.rangedFilter_.getEndPost();\n endPost = this.rangedFilter_.getStartPost();\n var indexCompare_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCompare_1(b, a); };\n }\n else {\n iterator = filtered.getIterator(this.index_);\n startPost = this.rangedFilter_.getStartPost();\n endPost = this.rangedFilter_.getEndPost();\n cmp = this.index_.getCompare();\n }\n var count = 0;\n var foundStartPost = false;\n while (iterator.hasNext()) {\n var next = iterator.getNext();\n if (!foundStartPost && cmp(startPost, next) <= 0) {\n // start adding\n foundStartPost = true;\n }\n var inRange = foundStartPost && count < this.limit_ && cmp(next, endPost) <= 0;\n if (inRange) {\n count++;\n }\n else {\n filtered = filtered.updateImmediateChild(next.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n }\n }\n }\n return this.rangedFilter_\n .getIndexedFilter()\n .updateFullNode(oldSnap, filtered, optChangeAccumulator);\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.updatePriority = function (oldSnap, newPriority) {\n // Don't support priorities on queries\n return oldSnap;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.filtersNodes = function () {\n return true;\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndexedFilter = function () {\n return this.rangedFilter_.getIndexedFilter();\n };\n /**\n * @inheritDoc\n */\n LimitedFilter.prototype.getIndex = function () {\n return this.index_;\n };\n /**\n * @param {!Node} snap\n * @param {string} childKey\n * @param {!Node} childSnap\n * @param {!CompleteChildSource} source\n * @param {?ChildChangeAccumulator} changeAccumulator\n * @return {!Node}\n * @private\n */\n LimitedFilter.prototype.fullLimitUpdateChild_ = function (snap, childKey, childSnap, source, changeAccumulator) {\n // TODO: rename all cache stuff etc to general snap terminology\n var cmp;\n if (this.reverse_) {\n var indexCmp_1 = this.index_.getCompare();\n cmp = function (a, b) { return indexCmp_1(b, a); };\n }\n else {\n cmp = this.index_.getCompare();\n }\n var oldEventCache = snap;\n util_1.assert(oldEventCache.numChildren() == this.limit_, '');\n var newChildNamedNode = new Node_1.NamedNode(childKey, childSnap);\n var windowBoundary = this.reverse_\n ? oldEventCache.getFirstChild(this.index_)\n : oldEventCache.getLastChild(this.index_);\n var inRange = this.rangedFilter_.matches(newChildNamedNode);\n if (oldEventCache.hasChild(childKey)) {\n var oldChildSnap = oldEventCache.getImmediateChild(childKey);\n var nextChild = source.getChildAfterChild(this.index_, windowBoundary, this.reverse_);\n while (nextChild != null &&\n (nextChild.name == childKey || oldEventCache.hasChild(nextChild.name))) {\n // There is a weird edge case where a node is updated as part of a merge in the write tree, but hasn't\n // been applied to the limited filter yet. Ignore this next child which will be updated later in\n // the limited filter...\n nextChild = source.getChildAfterChild(this.index_, nextChild, this.reverse_);\n }\n var compareNext = nextChild == null ? 1 : cmp(nextChild, newChildNamedNode);\n var remainsInWindow = inRange && !childSnap.isEmpty() && compareNext >= 0;\n if (remainsInWindow) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childChangedChange(childKey, childSnap, oldChildSnap));\n }\n return oldEventCache.updateImmediateChild(childKey, childSnap);\n }\n else {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(childKey, oldChildSnap));\n }\n var newEventCache = oldEventCache.updateImmediateChild(childKey, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n var nextChildInRange = nextChild != null && this.rangedFilter_.matches(nextChild);\n if (nextChildInRange) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(nextChild.name, nextChild.node));\n }\n return newEventCache.updateImmediateChild(nextChild.name, nextChild.node);\n }\n else {\n return newEventCache;\n }\n }\n }\n else if (childSnap.isEmpty()) {\n // we're deleting a node, but it was not in the window, so ignore it\n return snap;\n }\n else if (inRange) {\n if (cmp(windowBoundary, newChildNamedNode) >= 0) {\n if (changeAccumulator != null) {\n changeAccumulator.trackChildChange(Change_1.Change.childRemovedChange(windowBoundary.name, windowBoundary.node));\n changeAccumulator.trackChildChange(Change_1.Change.childAddedChange(childKey, childSnap));\n }\n return oldEventCache\n .updateImmediateChild(childKey, childSnap)\n .updateImmediateChild(windowBoundary.name, ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n }\n else {\n return snap;\n }\n }\n else {\n return snap;\n }\n };\n return LimitedFilter;\n}());\nexports.LimitedFilter = LimitedFilter;\n\n//# sourceMappingURL=LimitedFilter.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/view/filter/LimitedFilter.js\n// module id = 108\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Reference_1 = require(\"../api/Reference\");\nvar DataSnapshot_1 = require(\"../api/DataSnapshot\");\nvar Path_1 = require(\"./util/Path\");\nvar Tree_1 = require(\"./util/Tree\");\nvar PriorityIndex_1 = require(\"./snap/indexes/PriorityIndex\");\nvar util_2 = require(\"./util/util\");\nvar ServerValues_1 = require(\"./util/ServerValues\");\nvar validation_1 = require(\"./util/validation\");\nvar util_3 = require(\"@firebase/util\");\nvar nodeFromJSON_1 = require(\"./snap/nodeFromJSON\");\nvar ChildrenNode_1 = require(\"./snap/ChildrenNode\");\nvar Repo_1 = require(\"./Repo\");\n// TODO: This is pretty messy. Ideally, a lot of this would move into FirebaseData, or a transaction-specific\n// component used by FirebaseData, but it has ties to user callbacks (transaction update and onComplete) as well\n// as the realtime connection (to send transactions to the server). So that all needs to be decoupled first.\n// For now it's part of Repo, but in its own file.\n/**\n * @enum {number}\n */\nvar TransactionStatus;\n(function (TransactionStatus) {\n // We've run the transaction and updated transactionResultData_ with the result, but it isn't currently sent to the\n // server. A transaction will go from RUN -> SENT -> RUN if it comes back from the server as rejected due to\n // mismatched hash.\n TransactionStatus[TransactionStatus[\"RUN\"] = 0] = \"RUN\";\n // We've run the transaction and sent it to the server and it's currently outstanding (hasn't come back as accepted\n // or rejected yet).\n TransactionStatus[TransactionStatus[\"SENT\"] = 1] = \"SENT\";\n // Temporary state used to mark completed transactions (whether successful or aborted). The transaction will be\n // removed when we get a chance to prune completed ones.\n TransactionStatus[TransactionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n // Used when an already-sent transaction needs to be aborted (e.g. due to a conflicting set() call that was made).\n // If it comes back as unsuccessful, we'll abort it.\n TransactionStatus[TransactionStatus[\"SENT_NEEDS_ABORT\"] = 3] = \"SENT_NEEDS_ABORT\";\n // Temporary state used to mark transactions that need to be aborted.\n TransactionStatus[TransactionStatus[\"NEEDS_ABORT\"] = 4] = \"NEEDS_ABORT\";\n})(TransactionStatus = exports.TransactionStatus || (exports.TransactionStatus = {}));\n/**\n * If a transaction does not succeed after 25 retries, we abort it. Among other things this ensure that if there's\n * ever a bug causing a mismatch between client / server hashes for some data, we won't retry indefinitely.\n * @type {number}\n * @const\n * @private\n */\nRepo_1.Repo.MAX_TRANSACTION_RETRIES_ = 25;\n/**\n * Setup the transaction data structures\n * @private\n */\nRepo_1.Repo.prototype.transactions_init_ = function () {\n /**\n * Stores queues of outstanding transactions for Firebase locations.\n *\n * @type {!Tree.>}\n * @private\n */\n this.transactionQueueTree_ = new Tree_1.Tree();\n};\n/**\n * Creates a new transaction, adds it to the transactions we're tracking, and sends it to the server if possible.\n *\n * @param {!Path} path Path at which to do transaction.\n * @param {function(*):*} transactionUpdate Update callback.\n * @param {?function(?Error, boolean, ?DataSnapshot)} onComplete Completion callback.\n * @param {boolean} applyLocally Whether or not to make intermediate results visible\n */\nRepo_1.Repo.prototype.startTransaction = function (path, transactionUpdate, onComplete, applyLocally) {\n this.log_('transaction on ' + path);\n // Add a watch to make sure we get server updates.\n var valueCallback = function () { };\n var watchRef = new Reference_1.Reference(this, path);\n watchRef.on('value', valueCallback);\n var unwatcher = function () {\n watchRef.off('value', valueCallback);\n };\n // Initialize transaction.\n var transaction = {\n path: path,\n update: transactionUpdate,\n onComplete: onComplete,\n // One of TransactionStatus enums.\n status: null,\n // Used when combining transactions at different locations to figure out which one goes first.\n order: util_2.LUIDGenerator(),\n // Whether to raise local events for this transaction.\n applyLocally: applyLocally,\n // Count of how many times we've retried the transaction.\n retryCount: 0,\n // Function to call to clean up our .on() listener.\n unwatcher: unwatcher,\n // Stores why a transaction was aborted.\n abortReason: null,\n currentWriteId: null,\n currentInputSnapshot: null,\n currentOutputSnapshotRaw: null,\n currentOutputSnapshotResolved: null\n };\n // Run transaction initially.\n var currentState = this.getLatestState_(path);\n transaction.currentInputSnapshot = currentState;\n var newVal = transaction.update(currentState.val());\n if (newVal === undefined) {\n // Abort transaction.\n transaction.unwatcher();\n transaction.currentOutputSnapshotRaw = null;\n transaction.currentOutputSnapshotResolved = null;\n if (transaction.onComplete) {\n // We just set the input snapshot, so this cast should be safe\n var snapshot = new DataSnapshot_1.DataSnapshot(transaction.currentInputSnapshot, new Reference_1.Reference(this, transaction.path), PriorityIndex_1.PRIORITY_INDEX);\n transaction.onComplete(null, false, snapshot);\n }\n }\n else {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newVal, transaction.path);\n // Mark as run and add to our queue.\n transaction.status = TransactionStatus.RUN;\n var queueNode = this.transactionQueueTree_.subTree(path);\n var nodeQueue = queueNode.getValue() || [];\n nodeQueue.push(transaction);\n queueNode.setValue(nodeQueue);\n // Update visibleData and raise events\n // Note: We intentionally raise events after updating all of our transaction state, since the user could\n // start new transactions from the event callbacks.\n var priorityForNode = void 0;\n if (typeof newVal === 'object' &&\n newVal !== null &&\n util_3.contains(newVal, '.priority')) {\n priorityForNode = util_3.safeGet(newVal, '.priority');\n util_1.assert(validation_1.isValidPriority(priorityForNode), 'Invalid priority returned by transaction. ' +\n 'Priority must be a valid string, finite number, server value, or null.');\n }\n else {\n var currentNode = this.serverSyncTree_.calcCompleteEventCache(path) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE;\n priorityForNode = currentNode.getPriority().val();\n }\n priorityForNode /** @type {null|number|string} */ = priorityForNode;\n var serverValues = this.generateServerValues();\n var newNodeUnresolved = nodeFromJSON_1.nodeFromJSON(newVal, priorityForNode);\n var newNode = ServerValues_1.resolveDeferredValueSnapshot(newNodeUnresolved, serverValues);\n transaction.currentOutputSnapshotRaw = newNodeUnresolved;\n transaction.currentOutputSnapshotResolved = newNode;\n transaction.currentWriteId = this.getNextWriteId_();\n var events = this.serverSyncTree_.applyUserOverwrite(path, newNode, transaction.currentWriteId, transaction.applyLocally);\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n this.sendReadyTransactions_();\n }\n};\n/**\n * @param {!Path} path\n * @param {Array.=} excludeSets A specific set to exclude\n * @return {Node}\n * @private\n */\nRepo_1.Repo.prototype.getLatestState_ = function (path, excludeSets) {\n return (this.serverSyncTree_.calcCompleteEventCache(path, excludeSets) ||\n ChildrenNode_1.ChildrenNode.EMPTY_NODE);\n};\n/**\n * Sends any already-run transactions that aren't waiting for outstanding transactions to\n * complete.\n *\n * Externally it's called with no arguments, but it calls itself recursively with a particular\n * transactionQueueTree node to recurse through the tree.\n *\n * @param {Tree.>=} node transactionQueueTree node to start at.\n * @private\n */\nRepo_1.Repo.prototype.sendReadyTransactions_ = function (node) {\n var _this = this;\n if (node === void 0) { node = this.transactionQueueTree_; }\n // Before recursing, make sure any completed transactions are removed.\n if (!node) {\n this.pruneCompletedTransactionsBelowNode_(node);\n }\n if (node.getValue() !== null) {\n var queue = this.buildTransactionQueue_(node);\n util_1.assert(queue.length > 0, 'Sending zero length transaction queue');\n var allRun = queue.every(function (transaction) { return transaction.status === TransactionStatus.RUN; });\n // If they're all run (and not sent), we can send them. Else, we must wait.\n if (allRun) {\n this.sendTransactionQueue_(node.path(), queue);\n }\n }\n else if (node.hasChildren()) {\n node.forEachChild(function (childNode) {\n _this.sendReadyTransactions_(childNode);\n });\n }\n};\n/**\n * Given a list of run transactions, send them to the server and then handle the result (success or failure).\n *\n * @param {!Path} path The location of the queue.\n * @param {!Array.} queue Queue of transactions under the specified location.\n * @private\n */\nRepo_1.Repo.prototype.sendTransactionQueue_ = function (path, queue) {\n var _this = this;\n // Mark transactions as sent and increment retry count!\n var setsToIgnore = queue.map(function (txn) {\n return txn.currentWriteId;\n });\n var latestState = this.getLatestState_(path, setsToIgnore);\n var snapToSend = latestState;\n var latestHash = latestState.hash();\n for (var i = 0; i < queue.length; i++) {\n var txn = queue[i];\n util_1.assert(txn.status === TransactionStatus.RUN, 'tryToSendTransactionQueue_: items in queue should all be run.');\n txn.status = TransactionStatus.SENT;\n txn.retryCount++;\n var relativePath = Path_1.Path.relativePath(path, txn.path);\n // If we've gotten to this point, the output snapshot must be defined.\n snapToSend = snapToSend.updateChild(relativePath /**@type {!Node} */, txn.currentOutputSnapshotRaw);\n }\n var dataToSend = snapToSend.val(true);\n var pathToSend = path;\n // Send the put.\n this.server_.put(pathToSend.toString(), dataToSend, function (status) {\n _this.log_('transaction put response', {\n path: pathToSend.toString(),\n status: status\n });\n var events = [];\n if (status === 'ok') {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.COMPLETED;\n events = events.concat(_this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId));\n if (queue[i].onComplete) {\n // We never unset the output snapshot, and given that this transaction is complete, it should be set\n var node = queue[i].currentOutputSnapshotResolved;\n var ref = new Reference_1.Reference(_this, queue[i].path);\n var snapshot = new DataSnapshot_1.DataSnapshot(node, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, true, snapshot));\n }\n queue[i].unwatcher();\n }\n // Now remove the completed transactions.\n _this.pruneCompletedTransactionsBelowNode_(_this.transactionQueueTree_.subTree(path));\n // There may be pending transactions that we can now send.\n _this.sendReadyTransactions_();\n _this.eventQueue_.raiseEventsForChangedPath(path, events);\n // Finally, trigger onComplete callbacks.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n else {\n // transactions are no longer sent. Update their status appropriately.\n if (status === 'datastale') {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT)\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n else\n queue[i].status = TransactionStatus.RUN;\n }\n }\n else {\n util_2.warn('transaction at ' + pathToSend.toString() + ' failed: ' + status);\n for (var i = 0; i < queue.length; i++) {\n queue[i].status = TransactionStatus.NEEDS_ABORT;\n queue[i].abortReason = status;\n }\n }\n _this.rerunTransactions_(path);\n }\n }, latestHash);\n};\n/**\n * Finds all transactions dependent on the data at changedPath and reruns them.\n *\n * Should be called any time cached data changes.\n *\n * Return the highest path that was affected by rerunning transactions. This is the path at which events need to\n * be raised for.\n *\n * @param {!Path} changedPath The path in mergedData that changed.\n * @return {!Path} The rootmost path that was affected by rerunning transactions.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactions_ = function (changedPath) {\n var rootMostTransactionNode = this.getAncestorTransactionNode_(changedPath);\n var path = rootMostTransactionNode.path();\n var queue = this.buildTransactionQueue_(rootMostTransactionNode);\n this.rerunTransactionQueue_(queue, path);\n return path;\n};\n/**\n * Does all the work of rerunning transactions (as well as cleans up aborted transactions and whatnot).\n *\n * @param {Array.} queue The queue of transactions to run.\n * @param {!Path} path The path the queue is for.\n * @private\n */\nRepo_1.Repo.prototype.rerunTransactionQueue_ = function (queue, path) {\n if (queue.length === 0) {\n return; // Nothing to do!\n }\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n var events = [];\n // Ignore all of the sets we're going to re-run.\n var txnsToRerun = queue.filter(function (q) {\n return q.status === TransactionStatus.RUN;\n });\n var setsToIgnore = txnsToRerun.map(function (q) {\n return q.currentWriteId;\n });\n for (var i = 0; i < queue.length; i++) {\n var transaction = queue[i];\n var relativePath = Path_1.Path.relativePath(path, transaction.path);\n var abortTransaction = false, abortReason = void 0;\n util_1.assert(relativePath !== null, 'rerunTransactionsUnderNode_: relativePath should not be null.');\n if (transaction.status === TransactionStatus.NEEDS_ABORT) {\n abortTransaction = true;\n abortReason = transaction.abortReason;\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else if (transaction.status === TransactionStatus.RUN) {\n if (transaction.retryCount >= Repo_1.Repo.MAX_TRANSACTION_RETRIES_) {\n abortTransaction = true;\n abortReason = 'maxretry';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n else {\n // This code reruns a transaction\n var currentNode = this.getLatestState_(transaction.path, setsToIgnore);\n transaction.currentInputSnapshot = currentNode;\n var newData = queue[i].update(currentNode.val());\n if (newData !== undefined) {\n validation_1.validateFirebaseData('transaction failed: Data returned ', newData, transaction.path);\n var newDataNode = nodeFromJSON_1.nodeFromJSON(newData);\n var hasExplicitPriority = typeof newData === 'object' &&\n newData != null &&\n util_3.contains(newData, '.priority');\n if (!hasExplicitPriority) {\n // Keep the old priority if there wasn't a priority explicitly specified.\n newDataNode = newDataNode.updatePriority(currentNode.getPriority());\n }\n var oldWriteId = transaction.currentWriteId;\n var serverValues = this.generateServerValues();\n var newNodeResolved = ServerValues_1.resolveDeferredValueSnapshot(newDataNode, serverValues);\n transaction.currentOutputSnapshotRaw = newDataNode;\n transaction.currentOutputSnapshotResolved = newNodeResolved;\n transaction.currentWriteId = this.getNextWriteId_();\n // Mutates setsToIgnore in place\n setsToIgnore.splice(setsToIgnore.indexOf(oldWriteId), 1);\n events = events.concat(this.serverSyncTree_.applyUserOverwrite(transaction.path, newNodeResolved, transaction.currentWriteId, transaction.applyLocally));\n events = events.concat(this.serverSyncTree_.ackUserWrite(oldWriteId, true));\n }\n else {\n abortTransaction = true;\n abortReason = 'nodata';\n events = events.concat(this.serverSyncTree_.ackUserWrite(transaction.currentWriteId, true));\n }\n }\n }\n this.eventQueue_.raiseEventsForChangedPath(path, events);\n events = [];\n if (abortTransaction) {\n // Abort.\n queue[i].status = TransactionStatus.COMPLETED;\n // Removing a listener can trigger pruning which can muck with mergedData/visibleData (as it prunes data).\n // So defer the unwatcher until we're done.\n (function (unwatcher) {\n setTimeout(unwatcher, Math.floor(0));\n })(queue[i].unwatcher);\n if (queue[i].onComplete) {\n if (abortReason === 'nodata') {\n var ref = new Reference_1.Reference(this, queue[i].path);\n // We set this field immediately, so it's safe to cast to an actual snapshot\n var lastInput /** @type {!Node} */ = queue[i].currentInputSnapshot;\n var snapshot = new DataSnapshot_1.DataSnapshot(lastInput, ref, PriorityIndex_1.PRIORITY_INDEX);\n callbacks.push(queue[i].onComplete.bind(null, null, false, snapshot));\n }\n else {\n callbacks.push(queue[i].onComplete.bind(null, new Error(abortReason), false, null));\n }\n }\n }\n }\n // Clean up completed transactions.\n this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);\n // Now fire callbacks, now that we're in a good, known state.\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n // Try to send the transaction result to the server.\n this.sendReadyTransactions_();\n};\n/**\n * Returns the rootmost ancestor node of the specified path that has a pending transaction on it, or just returns\n * the node for the given path if there are no pending transactions on any ancestor.\n *\n * @param {!Path} path The location to start at.\n * @return {!Tree.>} The rootmost node with a transaction.\n * @private\n */\nRepo_1.Repo.prototype.getAncestorTransactionNode_ = function (path) {\n var front;\n // Start at the root and walk deeper into the tree towards path until we find a node with pending transactions.\n var transactionNode = this.transactionQueueTree_;\n while ((front = path.getFront()) !== null &&\n transactionNode.getValue() === null) {\n transactionNode = transactionNode.subTree(front);\n path = path.popFront();\n }\n return transactionNode;\n};\n/**\n * Builds the queue of all transactions at or below the specified transactionNode.\n *\n * @param {!Tree.>} transactionNode\n * @return {Array.} The generated queue.\n * @private\n */\nRepo_1.Repo.prototype.buildTransactionQueue_ = function (transactionNode) {\n // Walk any child transaction queues and aggregate them into a single queue.\n var transactionQueue = [];\n this.aggregateTransactionQueuesForNode_(transactionNode, transactionQueue);\n // Sort them by the order the transactions were created.\n transactionQueue.sort(function (a, b) {\n return a.order - b.order;\n });\n return transactionQueue;\n};\n/**\n * @param {!Tree.>} node\n * @param {Array.} queue\n * @private\n */\nRepo_1.Repo.prototype.aggregateTransactionQueuesForNode_ = function (node, queue) {\n var _this = this;\n var nodeQueue = node.getValue();\n if (nodeQueue !== null) {\n for (var i = 0; i < nodeQueue.length; i++) {\n queue.push(nodeQueue[i]);\n }\n }\n node.forEachChild(function (child) {\n _this.aggregateTransactionQueuesForNode_(child, queue);\n });\n};\n/**\n * Remove COMPLETED transactions at or below this node in the transactionQueueTree_.\n *\n * @param {!Tree.>} node\n * @private\n */\nRepo_1.Repo.prototype.pruneCompletedTransactionsBelowNode_ = function (node) {\n var _this = this;\n var queue = node.getValue();\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== TransactionStatus.COMPLETED) {\n queue[to] = queue[from];\n to++;\n }\n }\n queue.length = to;\n node.setValue(queue.length > 0 ? queue : null);\n }\n node.forEachChild(function (childNode) {\n _this.pruneCompletedTransactionsBelowNode_(childNode);\n });\n};\n/**\n * Aborts all transactions on ancestors or descendants of the specified path. Called when doing a set() or update()\n * since we consider them incompatible with transactions.\n *\n * @param {!Path} path Path for which we want to abort related transactions.\n * @return {!Path}\n * @private\n */\nRepo_1.Repo.prototype.abortTransactions_ = function (path) {\n var _this = this;\n var affectedPath = this.getAncestorTransactionNode_(path).path();\n var transactionNode = this.transactionQueueTree_.subTree(path);\n transactionNode.forEachAncestor(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n this.abortTransactionsOnNode_(transactionNode);\n transactionNode.forEachDescendant(function (node) {\n _this.abortTransactionsOnNode_(node);\n });\n return affectedPath;\n};\n/**\n * Abort transactions stored in this transaction queue node.\n *\n * @param {!Tree.>} node Node to abort transactions for.\n * @private\n */\nRepo_1.Repo.prototype.abortTransactionsOnNode_ = function (node) {\n var queue = node.getValue();\n if (queue !== null) {\n // Queue up the callbacks and fire them after cleaning up all of our transaction state, since\n // the callback could trigger more transactions or sets.\n var callbacks = [];\n // Go through queue. Any already-sent transactions must be marked for abort, while the unsent ones\n // can be immediately aborted and removed.\n var events = [];\n var lastSent = -1;\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].status === TransactionStatus.SENT_NEEDS_ABORT) {\n // Already marked. No action needed.\n }\n else if (queue[i].status === TransactionStatus.SENT) {\n util_1.assert(lastSent === i - 1, 'All SENT items should be at beginning of queue.');\n lastSent = i;\n // Mark transaction for abort when it comes back.\n queue[i].status = TransactionStatus.SENT_NEEDS_ABORT;\n queue[i].abortReason = 'set';\n }\n else {\n util_1.assert(queue[i].status === TransactionStatus.RUN, 'Unexpected transaction status in abort');\n // We can abort it immediately.\n queue[i].unwatcher();\n events = events.concat(this.serverSyncTree_.ackUserWrite(queue[i].currentWriteId, true));\n if (queue[i].onComplete) {\n var snapshot = null;\n callbacks.push(queue[i].onComplete.bind(null, new Error('set'), false, snapshot));\n }\n }\n }\n if (lastSent === -1) {\n // We're not waiting for any sent transactions. We can clear the queue.\n node.setValue(null);\n }\n else {\n // Remove the transactions we aborted.\n queue.length = lastSent + 1;\n }\n // Now fire the callbacks.\n this.eventQueue_.raiseEventsForChangedPath(node.path(), events);\n for (var i = 0; i < callbacks.length; i++) {\n util_2.exceptionGuard(callbacks[i]);\n }\n }\n};\n\n//# sourceMappingURL=Repo_transaction.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/Repo_transaction.js\n// module id = 109\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@firebase/util\");\nvar Path_1 = require(\"./Path\");\nvar util_2 = require(\"@firebase/util\");\n/**\n * Node in a Tree.\n */\nvar TreeNode = /** @class */ (function () {\n function TreeNode() {\n // TODO: Consider making accessors that create children and value lazily or\n // separate Internal / Leaf 'types'.\n this.children = {};\n this.childCount = 0;\n this.value = null;\n }\n return TreeNode;\n}());\nexports.TreeNode = TreeNode;\n/**\n * A light-weight tree, traversable by path. Nodes can have both values and children.\n * Nodes are not enumerated (by forEachChild) unless they have a value or non-empty\n * children.\n */\nvar Tree = /** @class */ (function () {\n /**\n * @template T\n * @param {string=} name_ Optional name of the node.\n * @param {Tree=} parent_ Optional parent node.\n * @param {TreeNode=} node_ Optional node to wrap.\n */\n function Tree(name_, parent_, node_) {\n if (name_ === void 0) { name_ = ''; }\n if (parent_ === void 0) { parent_ = null; }\n if (node_ === void 0) { node_ = new TreeNode(); }\n this.name_ = name_;\n this.parent_ = parent_;\n this.node_ = node_;\n }\n /**\n * Returns a sub-Tree for the given path.\n *\n * @param {!(string|Path)} pathObj Path to look up.\n * @return {!Tree.} Tree for path.\n */\n Tree.prototype.subTree = function (pathObj) {\n // TODO: Require pathObj to be Path?\n var path = pathObj instanceof Path_1.Path ? pathObj : new Path_1.Path(pathObj);\n var child = this, next;\n while ((next = path.getFront()) !== null) {\n var childNode = util_2.safeGet(child.node_.children, next) || new TreeNode();\n child = new Tree(next, child, childNode);\n path = path.popFront();\n }\n return child;\n };\n /**\n * Returns the data associated with this tree node.\n *\n * @return {?T} The data or null if no data exists.\n */\n Tree.prototype.getValue = function () {\n return this.node_.value;\n };\n /**\n * Sets data to this tree node.\n *\n * @param {!T} value Value to set.\n */\n Tree.prototype.setValue = function (value) {\n util_1.assert(typeof value !== 'undefined', 'Cannot set value to undefined');\n this.node_.value = value;\n this.updateParents_();\n };\n /**\n * Clears the contents of the tree node (its value and all children).\n */\n Tree.prototype.clear = function () {\n this.node_.value = null;\n this.node_.children = {};\n this.node_.childCount = 0;\n this.updateParents_();\n };\n /**\n * @return {boolean} Whether the tree has any children.\n */\n Tree.prototype.hasChildren = function () {\n return this.node_.childCount > 0;\n };\n /**\n * @return {boolean} Whether the tree is empty (no value or children).\n */\n Tree.prototype.isEmpty = function () {\n return this.getValue() === null && !this.hasChildren();\n };\n /**\n * Calls action for each child of this tree node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachChild = function (action) {\n var _this = this;\n util_2.forEach(this.node_.children, function (child, childTree) {\n action(new Tree(child, _this, childTree));\n });\n };\n /**\n * Does a depth-first traversal of this node's descendants, calling action for each one.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n * @param {boolean=} includeSelf Whether to call action on this node as well. Defaults to\n * false.\n * @param {boolean=} childrenFirst Whether to call action on children before calling it on\n * parent.\n */\n Tree.prototype.forEachDescendant = function (action, includeSelf, childrenFirst) {\n if (includeSelf && !childrenFirst)\n action(this);\n this.forEachChild(function (child) {\n child.forEachDescendant(action, /*includeSelf=*/ true, childrenFirst);\n });\n if (includeSelf && childrenFirst)\n action(this);\n };\n /**\n * Calls action on each ancestor node.\n *\n * @param {function(!Tree.)} action Action to be called on each parent; return\n * true to abort.\n * @param {boolean=} includeSelf Whether to call action on this node as well.\n * @return {boolean} true if the action callback returned true.\n */\n Tree.prototype.forEachAncestor = function (action, includeSelf) {\n var node = includeSelf ? this : this.parent();\n while (node !== null) {\n if (action(node)) {\n return true;\n }\n node = node.parent();\n }\n return false;\n };\n /**\n * Does a depth-first traversal of this node's descendants. When a descendant with a value\n * is found, action is called on it and traversal does not continue inside the node.\n * Action is *not* called on this node.\n *\n * @param {function(!Tree.)} action Action to be called for each child.\n */\n Tree.prototype.forEachImmediateDescendantWithValue = function (action) {\n this.forEachChild(function (child) {\n if (child.getValue() !== null)\n action(child);\n else\n child.forEachImmediateDescendantWithValue(action);\n });\n };\n /**\n * @return {!Path} The path of this tree node, as a Path.\n */\n Tree.prototype.path = function () {\n return new Path_1.Path(this.parent_ === null\n ? this.name_\n : this.parent_.path() + '/' + this.name_);\n };\n /**\n * @return {string} The name of the tree node.\n */\n Tree.prototype.name = function () {\n return this.name_;\n };\n /**\n * @return {?Tree} The parent tree node, or null if this is the root of the tree.\n */\n Tree.prototype.parent = function () {\n return this.parent_;\n };\n /**\n * Adds or removes this child from its parent based on whether it's empty or not.\n *\n * @private\n */\n Tree.prototype.updateParents_ = function () {\n if (this.parent_ !== null)\n this.parent_.updateChild_(this.name_, this);\n };\n /**\n * Adds or removes the passed child to this tree node, depending on whether it's empty.\n *\n * @param {string} childName The name of the child to update.\n * @param {!Tree.} child The child to update.\n * @private\n */\n Tree.prototype.updateChild_ = function (childName, child) {\n var childEmpty = child.isEmpty();\n var childExists = util_2.contains(this.node_.children, childName);\n if (childEmpty && childExists) {\n delete this.node_.children[childName];\n this.node_.childCount--;\n this.updateParents_();\n }\n else if (!childEmpty && !childExists) {\n this.node_.children[childName] = child.node_;\n this.node_.childCount++;\n this.updateParents_();\n }\n };\n return Tree;\n}());\nexports.Tree = Tree;\n\n//# sourceMappingURL=Tree.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/core/util/Tree.js\n// module id = 110\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar WebSocketConnection_1 = require(\"../realtime/WebSocketConnection\");\nvar BrowserPollConnection_1 = require(\"../realtime/BrowserPollConnection\");\n/**\n * INTERNAL methods for internal-use only (tests, etc.).\n *\n * Customers shouldn't use these or else should be aware that they could break at any time.\n *\n * @const\n */\nexports.forceLongPolling = function () {\n WebSocketConnection_1.WebSocketConnection.forceDisallow();\n BrowserPollConnection_1.BrowserPollConnection.forceAllow();\n};\nexports.forceWebSockets = function () {\n BrowserPollConnection_1.BrowserPollConnection.forceDisallow();\n};\n/* Used by App Manager */\nexports.isWebSocketsAvailable = function () {\n return WebSocketConnection_1.WebSocketConnection['isAvailable']();\n};\nexports.setSecurityDebugCallback = function (ref, callback) {\n ref.repo.persistentConnection_.securityDebugCallback_ = callback;\n};\nexports.stats = function (ref, showDelta) {\n ref.repo.stats(showDelta);\n};\nexports.statsIncrementCounter = function (ref, metric) {\n ref.repo.statsIncrementCounter(metric);\n};\nexports.dataUpdateCount = function (ref) {\n return ref.repo.dataUpdateCount;\n};\nexports.interceptServerData = function (ref, callback) {\n return ref.repo.interceptServerData_(callback);\n};\n\n//# sourceMappingURL=internal.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/internal.js\n// module id = 111\n// module chunks = 0","\"use strict\";\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RepoInfo_1 = require(\"../core/RepoInfo\");\nvar PersistentConnection_1 = require(\"../core/PersistentConnection\");\nvar RepoManager_1 = require(\"../core/RepoManager\");\nvar Connection_1 = require(\"../realtime/Connection\");\nexports.DataConnection = PersistentConnection_1.PersistentConnection;\n/**\n * @param {!string} pathString\n * @param {function(*)} onComplete\n */\nPersistentConnection_1.PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {\n this.sendRequest('q', { p: pathString }, onComplete);\n};\n/**\n * @param {*} data\n * @param {function(*)} onEcho\n */\nPersistentConnection_1.PersistentConnection.prototype.echo = function (data, onEcho) {\n this.sendRequest('echo', { d: data }, onEcho);\n};\n// RealTimeConnection properties that we use in tests.\nexports.RealTimeConnection = Connection_1.Connection;\n/**\n * @param {function(): string} newHash\n * @return {function()}\n */\nexports.hijackHash = function (newHash) {\n var oldPut = PersistentConnection_1.PersistentConnection.prototype.put;\n PersistentConnection_1.PersistentConnection.prototype.put = function (pathString, data, opt_onComplete, opt_hash) {\n if (opt_hash !== undefined) {\n opt_hash = newHash();\n }\n oldPut.call(this, pathString, data, opt_onComplete, opt_hash);\n };\n return function () {\n PersistentConnection_1.PersistentConnection.prototype.put = oldPut;\n };\n};\n/**\n * @type {function(new:RepoInfo, !string, boolean, !string, boolean): undefined}\n */\nexports.ConnectionTarget = RepoInfo_1.RepoInfo;\n/**\n * @param {!Query} query\n * @return {!string}\n */\nexports.queryIdentifier = function (query) {\n return query.queryIdentifier();\n};\n/**\n * @param {!Query} firebaseRef\n * @return {!Object}\n */\nexports.listens = function (firebaseRef) {\n return firebaseRef.repo.persistentConnection_.listens_;\n};\n/**\n * Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.\n *\n * @param {boolean} forceRestClient\n */\nexports.forceRestClient = function (forceRestClient) {\n RepoManager_1.RepoManager.getInstance().forceRestClient(forceRestClient);\n};\n\n//# sourceMappingURL=test_access.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../database/dist/cjs/src/api/test_access.js\n// module id = 112\n// module chunks = 0","/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\ntry {\n webpackJsonpFirebase([3],{\n\n/***/ 116:\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n__webpack_require__(117);\n\n\n/***/ }),\n\n/***/ 117:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ../util/dist/cjs/index.js\nvar cjs = __webpack_require__(0);\nvar cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/errors.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\nvar ERROR_MAP = (_a = {},\n _a[CODES.AVAILABLE_IN_WINDOW] = 'This method is available in a Window context.',\n _a[CODES.AVAILABLE_IN_SW] = 'This method is available in a service worker ' + 'context.',\n _a[CODES.SHOULD_BE_INHERITED] = 'This method should be overriden by ' + 'extended classes.',\n _a[CODES.BAD_SENDER_ID] = \"Please ensure that 'messagingSenderId' is set \" +\n 'correctly in the options passed into firebase.initializeApp().',\n _a[CODES.PERMISSION_DEFAULT] = 'The required permissions were not granted and ' + 'dismissed instead.',\n _a[CODES.PERMISSION_BLOCKED] = 'The required permissions were not granted and ' + 'blocked instead.',\n _a[CODES.UNSUPPORTED_BROWSER] = \"This browser doesn't support the API's \" +\n 'required to use the firebase SDK.',\n _a[CODES.NOTIFICATIONS_BLOCKED] = 'Notifications have been blocked.',\n _a[CODES.FAILED_DEFAULT_REGISTRATION] = 'We are unable to register the ' +\n 'default service worker. {$browserErrorMessage}',\n _a[CODES.SW_REGISTRATION_EXPECTED] = 'A service worker registration was the ' + 'expected input.',\n _a[CODES.GET_SUBSCRIPTION_FAILED] = 'There was an error when trying to get ' +\n 'any existing Push Subscriptions.',\n _a[CODES.INVALID_SAVED_TOKEN] = 'Unable to access details of the saved token.',\n _a[CODES.SW_REG_REDUNDANT] = 'The service worker being used for push was made ' + 'redundant.',\n _a[CODES.TOKEN_SUBSCRIBE_FAILED] = 'A problem occured while subscribing the ' + 'user to FCM: {$message}',\n _a[CODES.TOKEN_SUBSCRIBE_NO_TOKEN] = 'FCM returned no token when subscribing ' + 'the user to push.',\n _a[CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET] = 'FCM returned an invalid response ' + 'when getting an FCM token.',\n _a[CODES.USE_SW_BEFORE_GET_TOKEN] = 'You must call useServiceWorker() before ' +\n 'calling getToken() to ensure your service worker is used.',\n _a[CODES.INVALID_DELETE_TOKEN] = 'You must pass a valid token into ' +\n 'deleteToken(), i.e. the token from getToken().',\n _a[CODES.DELETE_TOKEN_NOT_FOUND] = 'The deletion attempt for token could not ' +\n 'be performed as the token was not found.',\n _a[CODES.DELETE_SCOPE_NOT_FOUND] = 'The deletion attempt for service worker ' +\n 'scope could not be performed as the scope was not found.',\n _a[CODES.BG_HANDLER_FUNCTION_EXPECTED] = 'The input to ' + 'setBackgroundMessageHandler() must be a function.',\n _a[CODES.NO_WINDOW_CLIENT_TO_MSG] = 'An attempt was made to message a ' + 'non-existant window client.',\n _a[CODES.UNABLE_TO_RESUBSCRIBE] = 'There was an error while re-subscribing ' +\n 'the FCM token for push messaging. Will have to resubscribe the ' +\n 'user on next visit. {$message}',\n _a[CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE] = 'Could not find an FCM token ' +\n 'and as a result, unable to resubscribe. Will have to resubscribe the ' +\n 'user on next visit.',\n _a[CODES.FAILED_TO_DELETE_TOKEN] = 'Unable to delete the currently saved token.',\n _a[CODES.NO_SW_IN_REG] = 'Even though the service worker registration was ' +\n 'successful, there was a problem accessing the service worker itself.',\n _a[CODES.INCORRECT_GCM_SENDER_ID] = \"Please change your web app manifest's \" +\n \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\",\n _a[CODES.BAD_SCOPE] = 'The service worker scope must be a string with at ' +\n 'least one character.',\n _a[CODES.BAD_VAPID_KEY] = 'The public VAPID key must be a string with at ' + 'least one character.',\n _a[CODES.BAD_SUBSCRIPTION] = 'The subscription must be a valid ' + 'PushSubscription.',\n _a[CODES.BAD_TOKEN] = 'The FCM Token used for storage / lookup was not ' +\n 'a valid token string.',\n _a[CODES.BAD_PUSH_SET] = 'The FCM push set used for storage / lookup was not ' +\n 'not a valid push set string.',\n _a[CODES.FAILED_DELETE_VAPID_KEY] = 'The VAPID key could not be deleted.',\n _a);\n/* harmony default export */ var errors = ({\n codes: CODES,\n map: ERROR_MAP\n});\nvar _a;\n\n//# sourceMappingURL=errors.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/helpers/array-buffer-to-base64.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction toBase64(arrayBuffer) {\n var uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\n/* harmony default export */ var array_buffer_to_base64 = (function (arrayBuffer) {\n var base64String = toBase64(arrayBuffer);\n return base64String\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n});;\n\n//# sourceMappingURL=array-buffer-to-base64.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/fcm-details.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar FCM_APPLICATION_SERVER_KEY = [\n 0x04,\n 0x33,\n 0x94,\n 0xf7,\n 0xdf,\n 0xa1,\n 0xeb,\n 0xb1,\n 0xdc,\n 0x03,\n 0xa2,\n 0x5e,\n 0x15,\n 0x71,\n 0xdb,\n 0x48,\n 0xd3,\n 0x2e,\n 0xed,\n 0xed,\n 0xb2,\n 0x34,\n 0xdb,\n 0xb7,\n 0x47,\n 0x3a,\n 0x0c,\n 0x8f,\n 0xc4,\n 0xcc,\n 0xe1,\n 0x6f,\n 0x3c,\n 0x8c,\n 0x84,\n 0xdf,\n 0xab,\n 0xb6,\n 0x66,\n 0x3e,\n 0xf2,\n 0x0c,\n 0xd4,\n 0x8b,\n 0xfe,\n 0xe3,\n 0xf9,\n 0x76,\n 0x2f,\n 0x14,\n 0x1c,\n 0x63,\n 0x08,\n 0x6a,\n 0x6f,\n 0x2d,\n 0xb1,\n 0x1a,\n 0x95,\n 0xb0,\n 0xce,\n 0x37,\n 0xc0,\n 0x9c,\n 0x6e\n];\nvar SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\n/* harmony default export */ var fcm_details = ({\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n});\n\n//# sourceMappingURL=fcm-details.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/token-manager.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nvar FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nvar FCM_TOKEN_DETAILS_DB_VERSION = 1;\nvar token_manager_TokenManager = /** @class */ (function () {\n function TokenManager() {\n this.errorFactory_ = new cjs[\"ErrorFactory\"]('messaging', 'Messaging', errors.map);\n this.openDbPromise_ = null;\n }\n /**\n * Get the indexedDB as a promsie.\n * @private\n * @return {Promise} The IndexedDB database\n */\n TokenManager.prototype.openDatabase_ = function () {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n this.openDbPromise_ = new Promise(function (resolve, reject) {\n var request = indexedDB.open(TokenManager.DB_NAME, FCM_TOKEN_DETAILS_DB_VERSION);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n request.onupgradeneeded = function (event) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n return this.openDbPromise_;\n };\n /**\n * Close the currently open database.\n * @return {Promise} Returns the result of the promise chain.\n */\n TokenManager.prototype.closeDatabase = function () {\n var _this = this;\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(function (db) {\n db.close();\n _this.openDbPromise_ = null;\n });\n }\n return Promise.resolve();\n };\n /**\n * Given a token, this method will look up the details in indexedDB.\n * @public\n * @param {string} fcmToken\n * @return {Promise} The details associated with that token.\n */\n TokenManager.prototype.getTokenDetailsFromToken = function (fcmToken) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var index = objectStore.index('fcmToken');\n var request = index.get(fcmToken);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getTokenDetailsFromSWScope_ = function (swScope) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = function (event) {\n reject(event.target.error);\n };\n scopeRequest.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getAllTokenDetailsForSenderId_ = function (senderId) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var senderIdTokens = [];\n var cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n }\n else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n };\n /**\n * Given a PushSubscription and messagingSenderId, get an FCM token.\n * @public\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\n * @param {string=} pushSet If defined this will swap the subscription for\n * matching FCM token.\n * @return {Promise} Returns the FCM token to be used in place\n * of the PushSubscription.\n */\n TokenManager.prototype.subscribeToFCM = function (senderId, subscription, pushSet) {\n var _this = this;\n var p256dh = array_buffer_to_base64(subscription['getKey']('p256dh'));\n var auth = array_buffer_to_base64(subscription['getKey']('auth'));\n var fcmSubscribeBody = \"authorized_entity=\" + senderId + \"&\" +\n (\"endpoint=\" + subscription.endpoint + \"&\") +\n (\"encryption_key=\" + p256dh + \"&\") +\n (\"encryption_auth=\" + auth);\n if (pushSet) {\n fcmSubscribeBody += \"&pushSet=\" + pushSet;\n }\n var headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n var subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n return fetch(fcm_details.ENDPOINT + '/fcm/connect/subscribe', subscribeOptions)\n .then(function (response) { return response.json(); })\n .then(function (response) {\n var fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n var message = fcmTokenResponse['error']['message'];\n throw _this.errorFactory_.create(errors.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n if (!fcmTokenResponse['token']) {\n throw _this.errorFactory_.create(errors.codes.TOKEN_SUBSCRIBE_NO_TOKEN);\n }\n if (!fcmTokenResponse['pushSet']) {\n throw _this.errorFactory_.create(errors.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);\n }\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n };\n /**\n * Checks the that fields in the PushSubscription are equivalent to the\n * details stores in the masterTokenDetails.\n * @private\n * @param {PushSubscription} subscription The push subscription we expect\n * the master token to match.\n * @param {Object} masterTokenDetails The saved details we wish to compare\n * with the PushSubscription\n * @return {boolean} true if the subscription and token details are\n * equivalent.\n */\n TokenManager.prototype.isSameSubscription_ = function (subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return (subscription.endpoint === masterTokenDetails['endpoint'] &&\n array_buffer_to_base64(subscription['getKey']('auth')) ===\n masterTokenDetails['auth'] &&\n array_buffer_to_base64(subscription['getKey']('p256dh')) ===\n masterTokenDetails['p256dh']);\n };\n /**\n * Save the details for the fcm token for re-use at a later date.\n * @private\n * @param {string} senderId The 'messagingSenderId' used for this project\n * @param {ServiceWorkerRegistration} swRegistration The service worker\n * used to subscribe the user for web push\n * @param {PushSubscription} subscription The push subscription passed to\n * FCM for the current token.\n * @param {string} fcmToken The FCM token currently used on this\n * device.\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\n * @return {Promise}\n */\n TokenManager.prototype.saveTokenDetails_ = function (senderId, swRegistration, subscription, fcmToken, fcmPushSet) {\n var details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: array_buffer_to_base64(subscription['getKey']('auth')),\n p256dh: array_buffer_to_base64(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.put(details);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve();\n };\n });\n });\n };\n /**\n * Returns the saved FCM Token if one is available and still valid,\n * otherwise `null` is returned.\n * @param {string} senderId This should be the sender ID associated with the\n * FCM Token being retrieved.\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\n * to subscribe the user to push.\n * @return {Promise | Promise} Returns the saved FCM Token if\n * avilable and valid.\n * @export\n */\n TokenManager.prototype.getSavedToken = function (senderId, swRegistration) {\n var _this = this;\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors.codes.SW_REGISTRATION_EXPECTED));\n }\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors.codes.BAD_SENDER_ID));\n }\n return this.getAllTokenDetailsForSenderId_(senderId)\n .then(function (allTokenDetails) {\n if (allTokenDetails.length === 0) {\n return;\n }\n var index = allTokenDetails.findIndex(function (tokenDetails) {\n return (swRegistration.scope === tokenDetails['swScope'] &&\n senderId === tokenDetails['fcmSenderId']);\n });\n if (index === -1) {\n return;\n }\n return allTokenDetails[index];\n })\n .then(function (tokenDetails) {\n if (!tokenDetails) {\n return;\n }\n return swRegistration.pushManager\n .getSubscription()\n .catch(function (err) {\n throw _this.errorFactory_.create(errors.codes.GET_SUBSCRIPTION_FAILED);\n })\n .then(function (subscription) {\n if (subscription &&\n _this.isSameSubscription_(subscription, tokenDetails)) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n };\n /**\n * Creates a new FCM token.\n */\n TokenManager.prototype.createToken = function (senderId, swRegistration) {\n var _this = this;\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors.codes.BAD_SENDER_ID));\n }\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(errors.codes.SW_REGISTRATION_EXPECTED));\n }\n // Check for existing subscription first\n var subscription;\n var fcmTokenDetails;\n return swRegistration.pushManager\n .getSubscription()\n .then(function (subscription) {\n if (subscription) {\n return subscription;\n }\n return swRegistration.pushManager.subscribe(fcm_details.SUBSCRIPTION_OPTIONS);\n })\n .then(function (sub) {\n subscription = sub;\n return _this.subscribeToFCM(senderId, subscription);\n })\n .then(function (tokenDetails) {\n fcmTokenDetails = tokenDetails;\n return _this.saveTokenDetails_(senderId, swRegistration, subscription, fcmTokenDetails['token'], fcmTokenDetails['pushSet']);\n })\n .then(function () { return fcmTokenDetails['token']; });\n };\n /**\n * This method deletes details of the current FCM token.\n * It's returning a promise in case we need to move to an async\n * method for deleting at a later date.\n * @param {string} token Token to be deleted\n * @return {Promise} Resolves once the FCM token details have been\n * deleted and returns the deleted details.\n */\n TokenManager.prototype.deleteToken = function (token) {\n var _this = this;\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(this.errorFactory_.create(errors.codes.INVALID_DELETE_TOKEN));\n }\n return this.getTokenDetailsFromToken(token).then(function (details) {\n if (!details) {\n throw _this.errorFactory_.create(errors.codes.DELETE_TOKEN_NOT_FOUND);\n }\n return _this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.delete(details['swScope']);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n if (event.target.result === 0) {\n reject(_this.errorFactory_.create(errors.codes.FAILED_TO_DELETE_TOKEN));\n return;\n }\n resolve(details);\n };\n });\n });\n });\n };\n return TokenManager;\n}());\n/* harmony default export */ var token_manager = (token_manager_TokenManager);\n\n//# sourceMappingURL=token-manager.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/notification-permission.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* harmony default export */ var notification_permission = ({\n granted: 'granted',\n default: 'default',\n denied: 'denied'\n});\n\n//# sourceMappingURL=notification-permission.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/controllers/controller-interface.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nvar SENDER_ID_OPTION_NAME = 'messagingSenderId';\nvar controller_interface_ControllerInterface = /** @class */ (function () {\n /**\n * An interface of the Messaging Service API\n * @param {!firebase.app.App} app\n */\n function ControllerInterface(app) {\n var _this = this;\n this.errorFactory_ = new cjs[\"ErrorFactory\"]('messaging', 'Messaging', errors.map);\n if (!app.options[SENDER_ID_OPTION_NAME] ||\n typeof app.options[SENDER_ID_OPTION_NAME] !== 'string') {\n throw this.errorFactory_.create(errors.codes.BAD_SENDER_ID);\n }\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n this.tokenManager_ = new token_manager();\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = function () { return _this.delete; };\n }\n /**\n * @export\n * @return {Promise | Promise} Returns a promise that\n * resolves to an FCM token.\n */\n ControllerInterface.prototype.getToken = function () {\n var _this = this;\n // Check with permissions\n var currentPermission = this.getNotificationPermission_();\n if (currentPermission !== notification_permission.granted) {\n if (currentPermission === notification_permission.denied) {\n return Promise.reject(this.errorFactory_.create(errors.codes.NOTIFICATIONS_BLOCKED));\n }\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n return this.getSWRegistration_().then(function (registration) {\n return _this.tokenManager_\n .getSavedToken(_this.messagingSenderId_, registration)\n .then(function (token) {\n if (token) {\n return token;\n }\n return _this.tokenManager_.createToken(_this.messagingSenderId_, registration);\n });\n });\n };\n /**\n * This method deletes tokens that the token manager looks after and then\n * unregisters the push subscription if it exists.\n * @export\n * @param {string} token\n * @return {Promise}\n */\n ControllerInterface.prototype.deleteToken = function (token) {\n var _this = this;\n return this.tokenManager_.deleteToken(token).then(function () {\n return _this.getSWRegistration_()\n .then(function (registration) {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n })\n .then(function (subscription) {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n };\n ControllerInterface.prototype.getSWRegistration_ = function () {\n throw this.errorFactory_.create(errors.codes.SHOULD_BE_INHERITED);\n };\n //\n // The following methods should only be available in the window.\n //\n ControllerInterface.prototype.requestPermission = function () {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!ServiceWorkerRegistration} registration\n */\n ControllerInterface.prototype.useServiceWorker = function (registration) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver\n * @param {function(!Error)=} optError\n * @param {function()=} optCompleted\n * @return {!function()}\n */\n ControllerInterface.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n ControllerInterface.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_WINDOW);\n };\n //\n // The following methods are used by the service worker only.\n //\n /**\n * @export\n * @param {function(Object)} callback\n */\n ControllerInterface.prototype.setBackgroundMessageHandler = function (callback) {\n throw this.errorFactory_.create(errors.codes.AVAILABLE_IN_SW);\n };\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n /**\n * This method is required to adhere to the Firebase interface.\n * It closes any currently open indexdb database connections.\n */\n ControllerInterface.prototype.delete = function () {\n return this.tokenManager_.closeDatabase();\n };\n /**\n * Returns the current Notification Permission state.\n * @private\n * @return {string} The currenct permission state.\n */\n ControllerInterface.prototype.getNotificationPermission_ = function () {\n return Notification.permission;\n };\n /**\n * @protected\n * @returns {TokenManager}\n */\n ControllerInterface.prototype.getTokenManager = function () {\n return this.tokenManager_;\n };\n return ControllerInterface;\n}());\n/* harmony default export */ var controller_interface = (controller_interface_ControllerInterface);\n\n//# sourceMappingURL=controller-interface.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/worker-page-message.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\nvar PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nvar msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\nvar createNewMsg = function (msgType, msgData) {\n var message = (_a = {},\n _a[PARAMS.TYPE_OF_MSG] = msgType,\n _a[PARAMS.DATA] = msgData,\n _a);\n return message;\n var _a;\n};\n/* harmony default export */ var worker_page_message = ({\n PARAMS: PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg: createNewMsg\n});\n\n//# sourceMappingURL=worker-page-message.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/models/default-sw.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* harmony default export */ var default_sw = ({\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n});\n\n//# sourceMappingURL=default-sw.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/controllers/window-controller.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\nvar window_controller_WindowController = /** @class */ (function (_super) {\n __extends(WindowController, _super);\n /**\n * A service that provides a MessagingService instance.\n * @param {!firebase.app.App} app\n */\n function WindowController(app) {\n var _this = _super.call(this, app) || this;\n /**\n * @private\n * @type {ServiceWorkerRegistration}\n */\n _this.registrationToUse_;\n /**\n * @private\n * @type {Promise}\n */\n _this.manifestCheckPromise_;\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.messageObserver_ = null;\n /**\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\n * observer.\n */\n _this.onMessage_ = Object(cjs[\"createSubscribe\"])(function (observer) {\n _this.messageObserver_ = observer;\n });\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.tokenRefreshObserver_ = null;\n _this.onTokenRefresh_ = Object(cjs[\"createSubscribe\"])(function (observer) {\n _this.tokenRefreshObserver_ = observer;\n });\n _this.setupSWMessageListener_();\n return _this;\n }\n /**\n * This method returns an FCM token if it can be generated.\n * The return promise will reject if the browser doesn't support\n * FCM, if permission is denied for notifications or it's not\n * possible to generate a token.\n * @export\n * @return {Promise | Promise} Returns a promise the\n * resolves to an FCM token or null if permission isn't granted.\n */\n WindowController.prototype.getToken = function () {\n var _this = this;\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(this.errorFactory_.create(errors.codes.UNSUPPORTED_BROWSER));\n }\n return this.manifestCheck_().then(function () {\n return _super.prototype.getToken.call(_this);\n });\n };\n /**\n * The method checks that a manifest is defined and has the correct GCM\n * sender ID.\n * @private\n * @return {Promise} Returns a promise that resolves if the manifest matches\n * our required sender ID\n */\n WindowController.prototype.manifestCheck_ = function () {\n var _this = this;\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n var manifestTag = document.querySelector('link[rel=\"manifest\"]');\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n }\n else {\n this.manifestCheckPromise_ = fetch(manifestTag.href)\n .then(function (response) {\n return response.json();\n })\n .catch(function () {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n })\n .then(function (manifestContent) {\n if (!manifestContent) {\n return;\n }\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw _this.errorFactory_.create(errors.codes.INCORRECT_GCM_SENDER_ID);\n }\n });\n }\n return this.manifestCheckPromise_;\n };\n /**\n * Request permission if it is not currently granted\n * @export\n * @returns {Promise} Resolves if the permission was granted, otherwise\n * rejects\n */\n WindowController.prototype.requestPermission = function () {\n var _this = this;\n if (Notification.permission === notification_permission.granted) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var managePermissionResult = function (result) {\n if (result === notification_permission.granted) {\n return resolve();\n }\n else if (result === notification_permission.denied) {\n return reject(_this.errorFactory_.create(errors.codes.PERMISSION_BLOCKED));\n }\n else {\n return reject(_this.errorFactory_.create(errors.codes.PERMISSION_DEFAULT));\n }\n };\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n var permissionPromise = Notification.requestPermission(function (result) {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n managePermissionResult(result);\n });\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n };\n /**\n * This method allows a developer to override the default service worker and\n * instead use a custom service worker.\n * @export\n * @param {!ServiceWorkerRegistration} registration The service worker\n * registration that should be used to receive the push messages.\n */\n WindowController.prototype.useServiceWorker = function (registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(errors.codes.SW_REGISTRATION_EXPECTED);\n }\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(errors.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n this.registrationToUse_ = registration;\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\n * or a function triggered on message.\n * @param {function(!Error)=} optError Optional A function triggered on\n * message error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n };\n /**\n * Given a registration, wait for the service worker it relates to\n * become activer\n * @private\n * @param {ServiceWorkerRegistration} registration Registration to wait\n * for service worker to become active\n * @return {Promise} Wait for service worker\n * registration to become active\n */\n WindowController.prototype.waitForRegistrationToActivate_ = function (registration) {\n var _this = this;\n var serviceWorker = registration.installing || registration.waiting || registration.active;\n return new Promise(function (resolve, reject) {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(_this.errorFactory_.create(errors.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors.codes.SW_REG_REDUNDANT));\n return;\n }\n var stateChangeListener = function () {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n }\n else if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(errors.codes.SW_REG_REDUNDANT));\n }\n else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n };\n /**\n * This will regiater the default service worker and return the registration\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n WindowController.prototype.getSWRegistration_ = function () {\n var _this = this;\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n return navigator.serviceWorker\n .register(default_sw.path, {\n scope: default_sw.scope\n })\n .catch(function (err) {\n throw _this.errorFactory_.create(errors.codes.FAILED_DEFAULT_REGISTRATION, {\n browserErrorMessage: err.message\n });\n })\n .then(function (registration) {\n return _this.waitForRegistrationToActivate_(registration).then(function () {\n _this.registrationToUse_ = registration;\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n return registration;\n });\n });\n };\n /**\n * This method will set up a message listener to handle\n * events from the service worker that should trigger\n * events in the page.\n *\n * @private\n */\n WindowController.prototype.setupSWMessageListener_ = function () {\n var _this = this;\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('message', function (event) {\n if (!event.data || !event.data[worker_page_message.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n var workerPageMessage = event.data;\n switch (workerPageMessage[worker_page_message.PARAMS.TYPE_OF_MSG]) {\n case worker_page_message.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case worker_page_message.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n var pushMessage = workerPageMessage[worker_page_message.PARAMS.DATA];\n _this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n }, false);\n };\n /**\n * Checks to see if the required API's are valid or not.\n * @private\n * @return {boolean} Returns true if the desired APIs are available.\n */\n WindowController.prototype.isSupported_ = function () {\n return ('serviceWorker' in navigator &&\n 'PushManager' in window &&\n 'Notification' in window &&\n 'fetch' in window &&\n ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') &&\n PushSubscription.prototype.hasOwnProperty('getKey'));\n };\n return WindowController;\n}(controller_interface));\n/* harmony default export */ var window_controller = (window_controller_WindowController);\n\n//# sourceMappingURL=window-controller.js.map\n\n// CONCATENATED MODULE: ../messaging/dist/esm/src/controllers/sw-controller.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar sw_controller___extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar FCM_MSG = 'FCM_MSG';\nvar sw_controller_SWController = /** @class */ (function (_super) {\n sw_controller___extends(SWController, _super);\n function SWController(app) {\n var _this = _super.call(this, app) || this;\n self.addEventListener('push', function (e) { return _this.onPush_(e); }, false);\n self.addEventListener('pushsubscriptionchange', function (e) { return _this.onSubChange_(e); }, false);\n self.addEventListener('notificationclick', function (e) { return _this.onNotificationClick_(e); }, false);\n /**\n * @private\n * @type {function(Object)|null}\n */\n _this.bgMessageHandler_ = null;\n return _this;\n }\n /**\n * A handler for push events that shows notifications based on the content of\n * the payload.\n *\n * The payload must be a JSON-encoded Object with a `notification` key. The\n * value of the `notification` property will be used as the NotificationOptions\n * object passed to showNotification. Additionally, the `title` property of the\n * notification object will be used as the title.\n *\n * If there is no notification data in the payload then no notification will be\n * shown.\n * @private\n */\n SWController.prototype.onPush_ = function (event) {\n var _this = this;\n var msgPayload;\n try {\n msgPayload = event.data.json();\n }\n catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n var handleMsgPromise = this.hasVisibleClients_().then(function (hasVisibleClients) {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || _this.bgMessageHandler_) {\n // Send to page\n return _this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n var notificationDetails = _this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n var notificationTitle = notificationDetails.title || '';\n return self.registration.showNotification(notificationTitle, notificationDetails);\n }\n else if (_this.bgMessageHandler_) {\n return _this.bgMessageHandler_(msgPayload);\n }\n });\n event.waitUntil(handleMsgPromise);\n };\n /**\n * @private\n */\n SWController.prototype.onSubChange_ = function (event) {\n var _this = this;\n var promiseChain = this.getToken().then(function (token) {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw _this.errorFactory_.create(errors.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);\n }\n var tokenDetails = null;\n var tokenManager = _this.getTokenManager();\n return tokenManager\n .getTokenDetailsFromToken(token)\n .then(function (details) {\n tokenDetails = details;\n if (!tokenDetails) {\n throw _this.errorFactory_.create(errors.codes.INVALID_SAVED_TOKEN);\n }\n // Attempt to get a new subscription\n return self.registration.pushManager.subscribe(fcm_details.SUBSCRIPTION_OPTIONS);\n })\n .then(function (newSubscription) {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(tokenDetails.fcmSenderId, newSubscription, tokenDetails.fcmPushSet);\n })\n .catch(function (err) {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(function () {\n throw _this.errorFactory_.create(errors.codes.UNABLE_TO_RESUBSCRIBE, {\n message: err\n });\n });\n });\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n */\n SWController.prototype.onNotificationClick_ = function (event) {\n var _this = this;\n if (!(event.notification &&\n event.notification.data &&\n event.notification.data[FCM_MSG])) {\n // Not an FCM notification, do nothing.\n return;\n }\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n event.notification.close();\n var msgPayload = event.notification.data[FCM_MSG];\n var clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n var promiseChain = this.getWindowClient_(clickAction)\n .then(function (windowClient) {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return self.clients.openWindow(clickAction);\n }\n return windowClient;\n })\n .then(function (windowClient) {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n // Delete notification data from payload before sending to the page.\n var notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n var internalMsg = worker_page_message.createNewMsg(worker_page_message.TYPES_OF_MSG.NOTIFICATION_CLICKED, msgPayload);\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return _this.attemptToMessageClient_(windowClient, internalMsg);\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n * @param {Object} msgPayload\n * @return {NotificationOptions|undefined}\n */\n SWController.prototype.getNotificationData_ = function (msgPayload) {\n if (!msgPayload) {\n return;\n }\n if (typeof msgPayload.notification !== 'object') {\n return;\n }\n var notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = (_a = {},\n _a[FCM_MSG] = msgPayload,\n _a);\n return notificationInformation;\n var _a;\n };\n /**\n * Calling setBackgroundMessageHandler will opt in to some specific\n * behaviours.\n * 1.) If a notification doesn't need to be shown due to a window already\n * being visible, then push messages will be sent to the page.\n * 2.) If a notification needs to be shown, and the message contains no\n * notification data this method will be called\n * and the promise it returns will be passed to event.waitUntil.\n * If you do not set this callback then all push messages will let and the\n * developer can handle them in a their own 'push' event callback\n * @export\n * @param {function(Object)} callback The callback to be called when a push\n * message is received and a notification must be shown. The callback will\n * be given the data from the push message.\n */\n SWController.prototype.setBackgroundMessageHandler = function (callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(errors.codes.BG_HANDLER_FUNCTION_EXPECTED);\n }\n this.bgMessageHandler_ = callback;\n };\n /**\n * @private\n * @param {string} url The URL to look for when focusing a client.\n * @return {Object} Returns an existing window client or a newly opened\n * WindowClient.\n */\n SWController.prototype.getWindowClient_ = function (url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n var parsedURL = new URL(url).href;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var suitableClient = null;\n for (var i = 0; i < clientList.length; i++) {\n var parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n };\n /**\n * This message will attempt to send the message to a window client.\n * @private\n * @param {Object} client The WindowClient to send the message to.\n * @param {Object} message The message to send to the client.\n * @returns {Promise} Returns a promise that resolves after sending the\n * message. This does not guarantee that the message was successfully\n * received.\n */\n SWController.prototype.attemptToMessageClient_ = function (client, message) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!client) {\n return reject(_this.errorFactory_.create(errors.codes.NO_WINDOW_CLIENT_TO_MSG));\n }\n client.postMessage(message);\n resolve();\n });\n };\n /**\n * @private\n * @returns {Promise} If there is currently a visible WindowClient,\n * this method will resolve to true, otherwise false.\n */\n SWController.prototype.hasVisibleClients_ = function () {\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n return clientList.some(function (client) { return client.visibilityState === 'visible'; });\n });\n };\n /**\n * @private\n * @param {Object} msgPayload The data from the push event that should be sent\n * to all available pages.\n * @returns {Promise} Returns a promise that resolves once the message\n * has been sent to all WindowClients.\n */\n SWController.prototype.sendMessageToWindowClients_ = function (msgPayload) {\n var _this = this;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var internalMsg = worker_page_message.createNewMsg(worker_page_message.TYPES_OF_MSG.PUSH_MSG_RECEIVED, msgPayload);\n return Promise.all(clientList.map(function (client) {\n return _this.attemptToMessageClient_(client, internalMsg);\n }));\n });\n };\n /**\n * This will register the default service worker and return the registration.\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n SWController.prototype.getSWRegistration_ = function () {\n return Promise.resolve(self.registration);\n };\n return SWController;\n}(controller_interface));\n/* harmony default export */ var sw_controller = (sw_controller_SWController);\n\n//# sourceMappingURL=sw-controller.js.map\n\n// EXTERNAL MODULE: ../app/dist/esm/index.js + 1 modules\nvar esm = __webpack_require__(6);\n\n// CONCATENATED MODULE: ../messaging/dist/esm/index.js\n/* harmony export (immutable) */ __webpack_exports__[\"registerMessaging\"] = registerMessaging;\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\nfunction registerMessaging(instance) {\n var messagingName = 'messaging';\n var factoryMethod = function (app) {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new sw_controller(app);\n }\n // Assume we are in the window context.\n return new window_controller(app);\n };\n var namespaceExports = {\n // no-inline\n Messaging: window_controller\n };\n instance.INTERNAL.registerService(messagingName, factoryMethod, namespaceExports);\n}\nregisterMessaging(esm[\"default\"]);\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ })\n\n},[116]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-messaging.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-messaging.js","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nrequire('@firebase/messaging');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./messaging/index.js\n// module id = 116\n// module chunks = 3","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction toBase64(arrayBuffer) {\n var uint8Version = new Uint8Array(arrayBuffer);\n return window.btoa(String.fromCharCode.apply(null, uint8Version));\n}\nexport default function (arrayBuffer) {\n var base64String = toBase64(arrayBuffer);\n return base64String\n .replace(/=/g, '')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_');\n};\n\n//# sourceMappingURL=array-buffer-to-base64.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/helpers/array-buffer-to-base64.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nimport WindowController from './src/controllers/window-controller';\nimport SWController from './src/controllers/sw-controller';\nimport firebase from '@firebase/app';\nexport function registerMessaging(instance) {\n var messagingName = 'messaging';\n var factoryMethod = function (app) {\n if (self && 'ServiceWorkerGlobalScope' in self) {\n return new SWController(app);\n }\n // Assume we are in the window context.\n return new WindowController(app);\n };\n var namespaceExports = {\n // no-inline\n Messaging: WindowController\n };\n instance.INTERNAL.registerService(messagingName, factoryMethod, namespaceExports);\n}\nregisterMessaging(firebase);\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/index.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar CODES = {\n AVAILABLE_IN_WINDOW: 'only-available-in-window',\n AVAILABLE_IN_SW: 'only-available-in-sw',\n SHOULD_BE_INHERITED: 'should-be-overriden',\n BAD_SENDER_ID: 'bad-sender-id',\n INCORRECT_GCM_SENDER_ID: 'incorrect-gcm-sender-id',\n PERMISSION_DEFAULT: 'permission-default',\n PERMISSION_BLOCKED: 'permission-blocked',\n UNSUPPORTED_BROWSER: 'unsupported-browser',\n NOTIFICATIONS_BLOCKED: 'notifications-blocked',\n FAILED_DEFAULT_REGISTRATION: 'failed-serviceworker-registration',\n SW_REGISTRATION_EXPECTED: 'sw-registration-expected',\n GET_SUBSCRIPTION_FAILED: 'get-subscription-failed',\n INVALID_SAVED_TOKEN: 'invalid-saved-token',\n SW_REG_REDUNDANT: 'sw-reg-redundant',\n TOKEN_SUBSCRIBE_FAILED: 'token-subscribe-failed',\n TOKEN_SUBSCRIBE_NO_TOKEN: 'token-subscribe-no-token',\n TOKEN_SUBSCRIBE_NO_PUSH_SET: 'token-subscribe-no-push-set',\n USE_SW_BEFORE_GET_TOKEN: 'use-sw-before-get-token',\n INVALID_DELETE_TOKEN: 'invalid-delete-token',\n DELETE_TOKEN_NOT_FOUND: 'delete-token-not-found',\n DELETE_SCOPE_NOT_FOUND: 'delete-scope-not-found',\n BG_HANDLER_FUNCTION_EXPECTED: 'bg-handler-function-expected',\n NO_WINDOW_CLIENT_TO_MSG: 'no-window-client-to-msg',\n UNABLE_TO_RESUBSCRIBE: 'unable-to-resubscribe',\n NO_FCM_TOKEN_FOR_RESUBSCRIBE: 'no-fcm-token-for-resubscribe',\n FAILED_TO_DELETE_TOKEN: 'failed-to-delete-token',\n NO_SW_IN_REG: 'no-sw-in-reg',\n BAD_SCOPE: 'bad-scope',\n BAD_VAPID_KEY: 'bad-vapid-key',\n BAD_SUBSCRIPTION: 'bad-subscription',\n BAD_TOKEN: 'bad-token',\n BAD_PUSH_SET: 'bad-push-set',\n FAILED_DELETE_VAPID_KEY: 'failed-delete-vapid-key'\n};\nvar ERROR_MAP = (_a = {},\n _a[CODES.AVAILABLE_IN_WINDOW] = 'This method is available in a Window context.',\n _a[CODES.AVAILABLE_IN_SW] = 'This method is available in a service worker ' + 'context.',\n _a[CODES.SHOULD_BE_INHERITED] = 'This method should be overriden by ' + 'extended classes.',\n _a[CODES.BAD_SENDER_ID] = \"Please ensure that 'messagingSenderId' is set \" +\n 'correctly in the options passed into firebase.initializeApp().',\n _a[CODES.PERMISSION_DEFAULT] = 'The required permissions were not granted and ' + 'dismissed instead.',\n _a[CODES.PERMISSION_BLOCKED] = 'The required permissions were not granted and ' + 'blocked instead.',\n _a[CODES.UNSUPPORTED_BROWSER] = \"This browser doesn't support the API's \" +\n 'required to use the firebase SDK.',\n _a[CODES.NOTIFICATIONS_BLOCKED] = 'Notifications have been blocked.',\n _a[CODES.FAILED_DEFAULT_REGISTRATION] = 'We are unable to register the ' +\n 'default service worker. {$browserErrorMessage}',\n _a[CODES.SW_REGISTRATION_EXPECTED] = 'A service worker registration was the ' + 'expected input.',\n _a[CODES.GET_SUBSCRIPTION_FAILED] = 'There was an error when trying to get ' +\n 'any existing Push Subscriptions.',\n _a[CODES.INVALID_SAVED_TOKEN] = 'Unable to access details of the saved token.',\n _a[CODES.SW_REG_REDUNDANT] = 'The service worker being used for push was made ' + 'redundant.',\n _a[CODES.TOKEN_SUBSCRIBE_FAILED] = 'A problem occured while subscribing the ' + 'user to FCM: {$message}',\n _a[CODES.TOKEN_SUBSCRIBE_NO_TOKEN] = 'FCM returned no token when subscribing ' + 'the user to push.',\n _a[CODES.TOKEN_SUBSCRIBE_NO_PUSH_SET] = 'FCM returned an invalid response ' + 'when getting an FCM token.',\n _a[CODES.USE_SW_BEFORE_GET_TOKEN] = 'You must call useServiceWorker() before ' +\n 'calling getToken() to ensure your service worker is used.',\n _a[CODES.INVALID_DELETE_TOKEN] = 'You must pass a valid token into ' +\n 'deleteToken(), i.e. the token from getToken().',\n _a[CODES.DELETE_TOKEN_NOT_FOUND] = 'The deletion attempt for token could not ' +\n 'be performed as the token was not found.',\n _a[CODES.DELETE_SCOPE_NOT_FOUND] = 'The deletion attempt for service worker ' +\n 'scope could not be performed as the scope was not found.',\n _a[CODES.BG_HANDLER_FUNCTION_EXPECTED] = 'The input to ' + 'setBackgroundMessageHandler() must be a function.',\n _a[CODES.NO_WINDOW_CLIENT_TO_MSG] = 'An attempt was made to message a ' + 'non-existant window client.',\n _a[CODES.UNABLE_TO_RESUBSCRIBE] = 'There was an error while re-subscribing ' +\n 'the FCM token for push messaging. Will have to resubscribe the ' +\n 'user on next visit. {$message}',\n _a[CODES.NO_FCM_TOKEN_FOR_RESUBSCRIBE] = 'Could not find an FCM token ' +\n 'and as a result, unable to resubscribe. Will have to resubscribe the ' +\n 'user on next visit.',\n _a[CODES.FAILED_TO_DELETE_TOKEN] = 'Unable to delete the currently saved token.',\n _a[CODES.NO_SW_IN_REG] = 'Even though the service worker registration was ' +\n 'successful, there was a problem accessing the service worker itself.',\n _a[CODES.INCORRECT_GCM_SENDER_ID] = \"Please change your web app manifest's \" +\n \"'gcm_sender_id' value to '103953800507' to use Firebase messaging.\",\n _a[CODES.BAD_SCOPE] = 'The service worker scope must be a string with at ' +\n 'least one character.',\n _a[CODES.BAD_VAPID_KEY] = 'The public VAPID key must be a string with at ' + 'least one character.',\n _a[CODES.BAD_SUBSCRIPTION] = 'The subscription must be a valid ' + 'PushSubscription.',\n _a[CODES.BAD_TOKEN] = 'The FCM Token used for storage / lookup was not ' +\n 'a valid token string.',\n _a[CODES.BAD_PUSH_SET] = 'The FCM push set used for storage / lookup was not ' +\n 'not a valid push set string.',\n _a[CODES.FAILED_DELETE_VAPID_KEY] = 'The VAPID key could not be deleted.',\n _a);\nexport default {\n codes: CODES,\n map: ERROR_MAP\n};\nvar _a;\n\n//# sourceMappingURL=errors.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/errors.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar FCM_APPLICATION_SERVER_KEY = [\n 0x04,\n 0x33,\n 0x94,\n 0xf7,\n 0xdf,\n 0xa1,\n 0xeb,\n 0xb1,\n 0xdc,\n 0x03,\n 0xa2,\n 0x5e,\n 0x15,\n 0x71,\n 0xdb,\n 0x48,\n 0xd3,\n 0x2e,\n 0xed,\n 0xed,\n 0xb2,\n 0x34,\n 0xdb,\n 0xb7,\n 0x47,\n 0x3a,\n 0x0c,\n 0x8f,\n 0xc4,\n 0xcc,\n 0xe1,\n 0x6f,\n 0x3c,\n 0x8c,\n 0x84,\n 0xdf,\n 0xab,\n 0xb6,\n 0x66,\n 0x3e,\n 0xf2,\n 0x0c,\n 0xd4,\n 0x8b,\n 0xfe,\n 0xe3,\n 0xf9,\n 0x76,\n 0x2f,\n 0x14,\n 0x1c,\n 0x63,\n 0x08,\n 0x6a,\n 0x6f,\n 0x2d,\n 0xb1,\n 0x1a,\n 0x95,\n 0xb0,\n 0xce,\n 0x37,\n 0xc0,\n 0x9c,\n 0x6e\n];\nvar SUBSCRIPTION_DETAILS = {\n userVisibleOnly: true,\n applicationServerKey: new Uint8Array(FCM_APPLICATION_SERVER_KEY)\n};\nexport default {\n ENDPOINT: 'https://fcm.googleapis.com',\n APPLICATION_SERVER_KEY: FCM_APPLICATION_SERVER_KEY,\n SUBSCRIPTION_OPTIONS: SUBSCRIPTION_DETAILS\n};\n\n//# sourceMappingURL=fcm-details.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/fcm-details.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nimport { ErrorFactory } from '@firebase/util';\nimport Errors from './errors';\nimport arrayBufferToBase64 from '../helpers/array-buffer-to-base64';\nimport FCMDetails from './fcm-details';\nvar FCM_TOKEN_OBJ_STORE = 'fcm_token_object_Store';\nvar FCM_TOKEN_DETAILS_DB_VERSION = 1;\nvar TokenManager = /** @class */ (function () {\n function TokenManager() {\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n this.openDbPromise_ = null;\n }\n /**\n * Get the indexedDB as a promsie.\n * @private\n * @return {Promise} The IndexedDB database\n */\n TokenManager.prototype.openDatabase_ = function () {\n if (this.openDbPromise_) {\n return this.openDbPromise_;\n }\n this.openDbPromise_ = new Promise(function (resolve, reject) {\n var request = indexedDB.open(TokenManager.DB_NAME, FCM_TOKEN_DETAILS_DB_VERSION);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n request.onupgradeneeded = function (event) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(FCM_TOKEN_OBJ_STORE, {\n keyPath: 'swScope'\n });\n // Make sure the sender ID can be searched\n objectStore.createIndex('fcmSenderId', 'fcmSenderId', {\n unique: false\n });\n objectStore.createIndex('fcmToken', 'fcmToken', {\n unique: true\n });\n };\n });\n return this.openDbPromise_;\n };\n /**\n * Close the currently open database.\n * @return {Promise} Returns the result of the promise chain.\n */\n TokenManager.prototype.closeDatabase = function () {\n var _this = this;\n if (this.openDbPromise_) {\n return this.openDbPromise_.then(function (db) {\n db.close();\n _this.openDbPromise_ = null;\n });\n }\n return Promise.resolve();\n };\n /**\n * Given a token, this method will look up the details in indexedDB.\n * @public\n * @param {string} fcmToken\n * @return {Promise} The details associated with that token.\n */\n TokenManager.prototype.getTokenDetailsFromToken = function (fcmToken) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var index = objectStore.index('fcmToken');\n var request = index.get(fcmToken);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getTokenDetailsFromSWScope_ = function (swScope) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var scopeRequest = objectStore.get(swScope);\n scopeRequest.onerror = function (event) {\n reject(event.target.error);\n };\n scopeRequest.onsuccess = function (event) {\n resolve(event.target.result);\n };\n });\n });\n };\n TokenManager.prototype.getAllTokenDetailsForSenderId_ = function (senderId) {\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE]);\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var senderIdTokens = [];\n var cursorRequest = objectStore.openCursor();\n cursorRequest.onerror = function (event) {\n reject(event.target.error);\n };\n cursorRequest.onsuccess = function (event) {\n var cursor = event.target.result;\n if (cursor) {\n if (cursor.value['fcmSenderId'] === senderId) {\n senderIdTokens.push(cursor.value);\n }\n cursor.continue();\n }\n else {\n resolve(senderIdTokens);\n }\n };\n });\n });\n };\n /**\n * Given a PushSubscription and messagingSenderId, get an FCM token.\n * @public\n * @param {string} senderId The 'messagingSenderId' to tie the token to.\n * @param {PushSubscription} subscription The PushSusbcription to \"federate\".\n * @param {string=} pushSet If defined this will swap the subscription for\n * matching FCM token.\n * @return {Promise} Returns the FCM token to be used in place\n * of the PushSubscription.\n */\n TokenManager.prototype.subscribeToFCM = function (senderId, subscription, pushSet) {\n var _this = this;\n var p256dh = arrayBufferToBase64(subscription['getKey']('p256dh'));\n var auth = arrayBufferToBase64(subscription['getKey']('auth'));\n var fcmSubscribeBody = \"authorized_entity=\" + senderId + \"&\" +\n (\"endpoint=\" + subscription.endpoint + \"&\") +\n (\"encryption_key=\" + p256dh + \"&\") +\n (\"encryption_auth=\" + auth);\n if (pushSet) {\n fcmSubscribeBody += \"&pushSet=\" + pushSet;\n }\n var headers = new Headers();\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\n var subscribeOptions = {\n method: 'POST',\n headers: headers,\n body: fcmSubscribeBody\n };\n return fetch(FCMDetails.ENDPOINT + '/fcm/connect/subscribe', subscribeOptions)\n .then(function (response) { return response.json(); })\n .then(function (response) {\n var fcmTokenResponse = response;\n if (fcmTokenResponse['error']) {\n var message = fcmTokenResponse['error']['message'];\n throw _this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_FAILED, {\n message: message\n });\n }\n if (!fcmTokenResponse['token']) {\n throw _this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_NO_TOKEN);\n }\n if (!fcmTokenResponse['pushSet']) {\n throw _this.errorFactory_.create(Errors.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);\n }\n return {\n token: fcmTokenResponse['token'],\n pushSet: fcmTokenResponse['pushSet']\n };\n });\n };\n /**\n * Checks the that fields in the PushSubscription are equivalent to the\n * details stores in the masterTokenDetails.\n * @private\n * @param {PushSubscription} subscription The push subscription we expect\n * the master token to match.\n * @param {Object} masterTokenDetails The saved details we wish to compare\n * with the PushSubscription\n * @return {boolean} true if the subscription and token details are\n * equivalent.\n */\n TokenManager.prototype.isSameSubscription_ = function (subscription, masterTokenDetails) {\n // getKey() isn't defined in the PushSubscription externs file, hence\n // subscription['getKey']('').\n return (subscription.endpoint === masterTokenDetails['endpoint'] &&\n arrayBufferToBase64(subscription['getKey']('auth')) ===\n masterTokenDetails['auth'] &&\n arrayBufferToBase64(subscription['getKey']('p256dh')) ===\n masterTokenDetails['p256dh']);\n };\n /**\n * Save the details for the fcm token for re-use at a later date.\n * @private\n * @param {string} senderId The 'messagingSenderId' used for this project\n * @param {ServiceWorkerRegistration} swRegistration The service worker\n * used to subscribe the user for web push\n * @param {PushSubscription} subscription The push subscription passed to\n * FCM for the current token.\n * @param {string} fcmToken The FCM token currently used on this\n * device.\n * @param {string} fcmPushSet The FCM push tied to the fcm token.\n * @return {Promise}\n */\n TokenManager.prototype.saveTokenDetails_ = function (senderId, swRegistration, subscription, fcmToken, fcmPushSet) {\n var details = {\n swScope: swRegistration.scope,\n endpoint: subscription.endpoint,\n auth: arrayBufferToBase64(subscription['getKey']('auth')),\n p256dh: arrayBufferToBase64(subscription['getKey']('p256dh')),\n fcmToken: fcmToken,\n fcmPushSet: fcmPushSet,\n fcmSenderId: senderId\n };\n return this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.put(details);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n resolve();\n };\n });\n });\n };\n /**\n * Returns the saved FCM Token if one is available and still valid,\n * otherwise `null` is returned.\n * @param {string} senderId This should be the sender ID associated with the\n * FCM Token being retrieved.\n * @param {ServiceWorkerRegistration} swRegistration Registration to be used\n * to subscribe the user to push.\n * @return {Promise | Promise} Returns the saved FCM Token if\n * avilable and valid.\n * @export\n */\n TokenManager.prototype.getSavedToken = function (senderId, swRegistration) {\n var _this = this;\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED));\n }\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.BAD_SENDER_ID));\n }\n return this.getAllTokenDetailsForSenderId_(senderId)\n .then(function (allTokenDetails) {\n if (allTokenDetails.length === 0) {\n return;\n }\n var index = allTokenDetails.findIndex(function (tokenDetails) {\n return (swRegistration.scope === tokenDetails['swScope'] &&\n senderId === tokenDetails['fcmSenderId']);\n });\n if (index === -1) {\n return;\n }\n return allTokenDetails[index];\n })\n .then(function (tokenDetails) {\n if (!tokenDetails) {\n return;\n }\n return swRegistration.pushManager\n .getSubscription()\n .catch(function (err) {\n throw _this.errorFactory_.create(Errors.codes.GET_SUBSCRIPTION_FAILED);\n })\n .then(function (subscription) {\n if (subscription &&\n _this.isSameSubscription_(subscription, tokenDetails)) {\n return tokenDetails['fcmToken'];\n }\n });\n });\n };\n /**\n * Creates a new FCM token.\n */\n TokenManager.prototype.createToken = function (senderId, swRegistration) {\n var _this = this;\n if (typeof senderId !== 'string' || senderId.length === 0) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.BAD_SENDER_ID));\n }\n if (!(swRegistration instanceof ServiceWorkerRegistration)) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED));\n }\n // Check for existing subscription first\n var subscription;\n var fcmTokenDetails;\n return swRegistration.pushManager\n .getSubscription()\n .then(function (subscription) {\n if (subscription) {\n return subscription;\n }\n return swRegistration.pushManager.subscribe(FCMDetails.SUBSCRIPTION_OPTIONS);\n })\n .then(function (sub) {\n subscription = sub;\n return _this.subscribeToFCM(senderId, subscription);\n })\n .then(function (tokenDetails) {\n fcmTokenDetails = tokenDetails;\n return _this.saveTokenDetails_(senderId, swRegistration, subscription, fcmTokenDetails['token'], fcmTokenDetails['pushSet']);\n })\n .then(function () { return fcmTokenDetails['token']; });\n };\n /**\n * This method deletes details of the current FCM token.\n * It's returning a promise in case we need to move to an async\n * method for deleting at a later date.\n * @param {string} token Token to be deleted\n * @return {Promise} Resolves once the FCM token details have been\n * deleted and returns the deleted details.\n */\n TokenManager.prototype.deleteToken = function (token) {\n var _this = this;\n if (typeof token !== 'string' || token.length === 0) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.INVALID_DELETE_TOKEN));\n }\n return this.getTokenDetailsFromToken(token).then(function (details) {\n if (!details) {\n throw _this.errorFactory_.create(Errors.codes.DELETE_TOKEN_NOT_FOUND);\n }\n return _this.openDatabase_().then(function (db) {\n return new Promise(function (resolve, reject) {\n var transaction = db.transaction([FCM_TOKEN_OBJ_STORE], 'readwrite');\n var objectStore = transaction.objectStore(FCM_TOKEN_OBJ_STORE);\n var request = objectStore.delete(details['swScope']);\n request.onerror = function (event) {\n reject(event.target.error);\n };\n request.onsuccess = function (event) {\n if (event.target.result === 0) {\n reject(_this.errorFactory_.create(Errors.codes.FAILED_TO_DELETE_TOKEN));\n return;\n }\n resolve(details);\n };\n });\n });\n });\n };\n return TokenManager;\n}());\nexport default TokenManager;\n\n//# sourceMappingURL=token-manager.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/token-manager.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nimport { ErrorFactory } from '@firebase/util';\nimport Errors from '../models/errors';\nimport TokenManager from '../models/token-manager';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\nvar SENDER_ID_OPTION_NAME = 'messagingSenderId';\nvar ControllerInterface = /** @class */ (function () {\n /**\n * An interface of the Messaging Service API\n * @param {!firebase.app.App} app\n */\n function ControllerInterface(app) {\n var _this = this;\n this.errorFactory_ = new ErrorFactory('messaging', 'Messaging', Errors.map);\n if (!app.options[SENDER_ID_OPTION_NAME] ||\n typeof app.options[SENDER_ID_OPTION_NAME] !== 'string') {\n throw this.errorFactory_.create(Errors.codes.BAD_SENDER_ID);\n }\n this.messagingSenderId_ = app.options[SENDER_ID_OPTION_NAME];\n this.tokenManager_ = new TokenManager();\n this.app = app;\n this.INTERNAL = {};\n this.INTERNAL.delete = function () { return _this.delete; };\n }\n /**\n * @export\n * @return {Promise | Promise} Returns a promise that\n * resolves to an FCM token.\n */\n ControllerInterface.prototype.getToken = function () {\n var _this = this;\n // Check with permissions\n var currentPermission = this.getNotificationPermission_();\n if (currentPermission !== NOTIFICATION_PERMISSION.granted) {\n if (currentPermission === NOTIFICATION_PERMISSION.denied) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.NOTIFICATIONS_BLOCKED));\n }\n // We must wait for permission to be granted\n return Promise.resolve(null);\n }\n return this.getSWRegistration_().then(function (registration) {\n return _this.tokenManager_\n .getSavedToken(_this.messagingSenderId_, registration)\n .then(function (token) {\n if (token) {\n return token;\n }\n return _this.tokenManager_.createToken(_this.messagingSenderId_, registration);\n });\n });\n };\n /**\n * This method deletes tokens that the token manager looks after and then\n * unregisters the push subscription if it exists.\n * @export\n * @param {string} token\n * @return {Promise}\n */\n ControllerInterface.prototype.deleteToken = function (token) {\n var _this = this;\n return this.tokenManager_.deleteToken(token).then(function () {\n return _this.getSWRegistration_()\n .then(function (registration) {\n if (registration) {\n return registration.pushManager.getSubscription();\n }\n })\n .then(function (subscription) {\n if (subscription) {\n return subscription.unsubscribe();\n }\n });\n });\n };\n ControllerInterface.prototype.getSWRegistration_ = function () {\n throw this.errorFactory_.create(Errors.codes.SHOULD_BE_INHERITED);\n };\n //\n // The following methods should only be available in the window.\n //\n ControllerInterface.prototype.requestPermission = function () {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!ServiceWorkerRegistration} registration\n */\n ControllerInterface.prototype.useServiceWorker = function (registration) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver\n * @param {function(!Error)=} optError\n * @param {function()=} optCompleted\n * @return {!function()}\n */\n ControllerInterface.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n ControllerInterface.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_WINDOW);\n };\n //\n // The following methods are used by the service worker only.\n //\n /**\n * @export\n * @param {function(Object)} callback\n */\n ControllerInterface.prototype.setBackgroundMessageHandler = function (callback) {\n throw this.errorFactory_.create(Errors.codes.AVAILABLE_IN_SW);\n };\n //\n // The following methods are used by the service themselves and not exposed\n // publicly or not expected to be used by developers.\n //\n /**\n * This method is required to adhere to the Firebase interface.\n * It closes any currently open indexdb database connections.\n */\n ControllerInterface.prototype.delete = function () {\n return this.tokenManager_.closeDatabase();\n };\n /**\n * Returns the current Notification Permission state.\n * @private\n * @return {string} The currenct permission state.\n */\n ControllerInterface.prototype.getNotificationPermission_ = function () {\n return Notification.permission;\n };\n /**\n * @protected\n * @returns {TokenManager}\n */\n ControllerInterface.prototype.getTokenManager = function () {\n return this.tokenManager_;\n };\n return ControllerInterface;\n}());\nexport default ControllerInterface;\n\n//# sourceMappingURL=controller-interface.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/controllers/controller-interface.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n// These fields are strings to prevent closure from thinking goog.getMsg\n// should be used to initialise the values\nvar PARAMS = {\n TYPE_OF_MSG: 'firebase-messaging-msg-type',\n DATA: 'firebase-messaging-msg-data'\n};\n// This value isn't using the TYPE_OF_MSG short hand as closure\n// expects the variable to be defined via goog.getMsg\nvar msgType = {\n PUSH_MSG_RECEIVED: 'push-msg-received',\n NOTIFICATION_CLICKED: 'notification-clicked'\n};\nvar createNewMsg = function (msgType, msgData) {\n var message = (_a = {},\n _a[PARAMS.TYPE_OF_MSG] = msgType,\n _a[PARAMS.DATA] = msgData,\n _a);\n return message;\n var _a;\n};\nexport default {\n PARAMS: PARAMS,\n TYPES_OF_MSG: msgType,\n createNewMsg: createNewMsg\n};\n\n//# sourceMappingURL=worker-page-message.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/worker-page-message.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nexport default {\n path: '/firebase-messaging-sw.js',\n scope: '/firebase-cloud-messaging-push-scope'\n};\n\n//# sourceMappingURL=default-sw.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/models/default-sw.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport DefaultSW from '../models/default-sw';\nimport NOTIFICATION_PERMISSION from '../models/notification-permission';\nimport { createSubscribe } from '@firebase/util';\nvar WindowController = /** @class */ (function (_super) {\n __extends(WindowController, _super);\n /**\n * A service that provides a MessagingService instance.\n * @param {!firebase.app.App} app\n */\n function WindowController(app) {\n var _this = _super.call(this, app) || this;\n /**\n * @private\n * @type {ServiceWorkerRegistration}\n */\n _this.registrationToUse_;\n /**\n * @private\n * @type {Promise}\n */\n _this.manifestCheckPromise_;\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.messageObserver_ = null;\n /**\n * @private {!firebase.Subscribe} The subscribe function to the onMessage\n * observer.\n */\n _this.onMessage_ = createSubscribe(function (observer) {\n _this.messageObserver_ = observer;\n });\n /**\n * @private\n * @type {firebase.Observer}\n */\n _this.tokenRefreshObserver_ = null;\n _this.onTokenRefresh_ = createSubscribe(function (observer) {\n _this.tokenRefreshObserver_ = observer;\n });\n _this.setupSWMessageListener_();\n return _this;\n }\n /**\n * This method returns an FCM token if it can be generated.\n * The return promise will reject if the browser doesn't support\n * FCM, if permission is denied for notifications or it's not\n * possible to generate a token.\n * @export\n * @return {Promise | Promise} Returns a promise the\n * resolves to an FCM token or null if permission isn't granted.\n */\n WindowController.prototype.getToken = function () {\n var _this = this;\n // Check that the required API's are available\n if (!this.isSupported_()) {\n return Promise.reject(this.errorFactory_.create(Errors.codes.UNSUPPORTED_BROWSER));\n }\n return this.manifestCheck_().then(function () {\n return _super.prototype.getToken.call(_this);\n });\n };\n /**\n * The method checks that a manifest is defined and has the correct GCM\n * sender ID.\n * @private\n * @return {Promise} Returns a promise that resolves if the manifest matches\n * our required sender ID\n */\n WindowController.prototype.manifestCheck_ = function () {\n var _this = this;\n if (this.manifestCheckPromise_) {\n return this.manifestCheckPromise_;\n }\n var manifestTag = document.querySelector('link[rel=\"manifest\"]');\n if (!manifestTag) {\n this.manifestCheckPromise_ = Promise.resolve();\n }\n else {\n this.manifestCheckPromise_ = fetch(manifestTag.href)\n .then(function (response) {\n return response.json();\n })\n .catch(function () {\n // If the download or parsing fails allow check.\n // We only want to error if we KNOW that the gcm_sender_id is incorrect.\n return Promise.resolve();\n })\n .then(function (manifestContent) {\n if (!manifestContent) {\n return;\n }\n if (!manifestContent['gcm_sender_id']) {\n return;\n }\n if (manifestContent['gcm_sender_id'] !== '103953800507') {\n throw _this.errorFactory_.create(Errors.codes.INCORRECT_GCM_SENDER_ID);\n }\n });\n }\n return this.manifestCheckPromise_;\n };\n /**\n * Request permission if it is not currently granted\n * @export\n * @returns {Promise} Resolves if the permission was granted, otherwise\n * rejects\n */\n WindowController.prototype.requestPermission = function () {\n var _this = this;\n if (Notification.permission === NOTIFICATION_PERMISSION.granted) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var managePermissionResult = function (result) {\n if (result === NOTIFICATION_PERMISSION.granted) {\n return resolve();\n }\n else if (result === NOTIFICATION_PERMISSION.denied) {\n return reject(_this.errorFactory_.create(Errors.codes.PERMISSION_BLOCKED));\n }\n else {\n return reject(_this.errorFactory_.create(Errors.codes.PERMISSION_DEFAULT));\n }\n };\n // The Notification.requestPermission API was changed to\n // return a promise so now have to handle both in case\n // browsers stop support callbacks for promised version\n var permissionPromise = Notification.requestPermission(function (result) {\n if (permissionPromise) {\n // Let the promise manage this\n return;\n }\n managePermissionResult(result);\n });\n if (permissionPromise) {\n // Prefer the promise version as it's the future API.\n permissionPromise.then(managePermissionResult);\n }\n });\n };\n /**\n * This method allows a developer to override the default service worker and\n * instead use a custom service worker.\n * @export\n * @param {!ServiceWorkerRegistration} registration The service worker\n * registration that should be used to receive the push messages.\n */\n WindowController.prototype.useServiceWorker = function (registration) {\n if (!(registration instanceof ServiceWorkerRegistration)) {\n throw this.errorFactory_.create(Errors.codes.SW_REGISTRATION_EXPECTED);\n }\n if (typeof this.registrationToUse_ !== 'undefined') {\n throw this.errorFactory_.create(Errors.codes.USE_SW_BEFORE_GET_TOKEN);\n }\n this.registrationToUse_ = registration;\n };\n /**\n * @export\n * @param {!firebase.Observer|function(*)} nextOrObserver An observer object\n * or a function triggered on message.\n * @param {function(!Error)=} optError Optional A function triggered on\n * message error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onMessage = function (nextOrObserver, optError, optCompleted) {\n return this.onMessage_(nextOrObserver, optError, optCompleted);\n };\n /**\n * @export\n * @param {!firebase.Observer|function()} nextOrObserver An observer object\n * or a function triggered on token refresh.\n * @param {function(!Error)=} optError Optional A function\n * triggered on token refresh error.\n * @param {function()=} optCompleted Optional function triggered when the\n * observer is removed.\n * @return {!function()} The unsubscribe function for the observer.\n */\n WindowController.prototype.onTokenRefresh = function (nextOrObserver, optError, optCompleted) {\n return this.onTokenRefresh_(nextOrObserver, optError, optCompleted);\n };\n /**\n * Given a registration, wait for the service worker it relates to\n * become activer\n * @private\n * @param {ServiceWorkerRegistration} registration Registration to wait\n * for service worker to become active\n * @return {Promise} Wait for service worker\n * registration to become active\n */\n WindowController.prototype.waitForRegistrationToActivate_ = function (registration) {\n var _this = this;\n var serviceWorker = registration.installing || registration.waiting || registration.active;\n return new Promise(function (resolve, reject) {\n if (!serviceWorker) {\n // This is a rare scenario but has occured in firefox\n reject(_this.errorFactory_.create(Errors.codes.NO_SW_IN_REG));\n return;\n }\n // Because the Promise function is called on next tick there is a\n // small chance that the worker became active or redundant already.\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n return;\n }\n if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n return;\n }\n var stateChangeListener = function () {\n if (serviceWorker.state === 'activated') {\n resolve(registration);\n }\n else if (serviceWorker.state === 'redundant') {\n reject(_this.errorFactory_.create(Errors.codes.SW_REG_REDUNDANT));\n }\n else {\n // Return early and wait to next state change\n return;\n }\n serviceWorker.removeEventListener('statechange', stateChangeListener);\n };\n serviceWorker.addEventListener('statechange', stateChangeListener);\n });\n };\n /**\n * This will regiater the default service worker and return the registration\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n WindowController.prototype.getSWRegistration_ = function () {\n var _this = this;\n if (this.registrationToUse_) {\n return this.waitForRegistrationToActivate_(this.registrationToUse_);\n }\n // Make the registration null so we know useServiceWorker will not\n // use a new service worker as registrationToUse_ is no longer undefined\n this.registrationToUse_ = null;\n return navigator.serviceWorker\n .register(DefaultSW.path, {\n scope: DefaultSW.scope\n })\n .catch(function (err) {\n throw _this.errorFactory_.create(Errors.codes.FAILED_DEFAULT_REGISTRATION, {\n browserErrorMessage: err.message\n });\n })\n .then(function (registration) {\n return _this.waitForRegistrationToActivate_(registration).then(function () {\n _this.registrationToUse_ = registration;\n // We update after activation due to an issue with Firefox v49 where\n // a race condition occassionally causes the service work to not\n // install\n registration.update();\n return registration;\n });\n });\n };\n /**\n * This method will set up a message listener to handle\n * events from the service worker that should trigger\n * events in the page.\n *\n * @private\n */\n WindowController.prototype.setupSWMessageListener_ = function () {\n var _this = this;\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('message', function (event) {\n if (!event.data || !event.data[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n // Not a message from FCM\n return;\n }\n var workerPageMessage = event.data;\n switch (workerPageMessage[WorkerPageMessage.PARAMS.TYPE_OF_MSG]) {\n case WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED:\n case WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED:\n var pushMessage = workerPageMessage[WorkerPageMessage.PARAMS.DATA];\n _this.messageObserver_.next(pushMessage);\n break;\n default:\n // Noop.\n break;\n }\n }, false);\n };\n /**\n * Checks to see if the required API's are valid or not.\n * @private\n * @return {boolean} Returns true if the desired APIs are available.\n */\n WindowController.prototype.isSupported_ = function () {\n return ('serviceWorker' in navigator &&\n 'PushManager' in window &&\n 'Notification' in window &&\n 'fetch' in window &&\n ServiceWorkerRegistration.prototype.hasOwnProperty('showNotification') &&\n PushSubscription.prototype.hasOwnProperty('getKey'));\n };\n return WindowController;\n}(ControllerInterface));\nexport default WindowController;\n\n//# sourceMappingURL=window-controller.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/controllers/window-controller.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ControllerInterface from './controller-interface';\nimport Errors from '../models/errors';\nimport WorkerPageMessage from '../models/worker-page-message';\nimport FCMDetails from '../models/fcm-details';\nvar FCM_MSG = 'FCM_MSG';\nvar SWController = /** @class */ (function (_super) {\n __extends(SWController, _super);\n function SWController(app) {\n var _this = _super.call(this, app) || this;\n self.addEventListener('push', function (e) { return _this.onPush_(e); }, false);\n self.addEventListener('pushsubscriptionchange', function (e) { return _this.onSubChange_(e); }, false);\n self.addEventListener('notificationclick', function (e) { return _this.onNotificationClick_(e); }, false);\n /**\n * @private\n * @type {function(Object)|null}\n */\n _this.bgMessageHandler_ = null;\n return _this;\n }\n /**\n * A handler for push events that shows notifications based on the content of\n * the payload.\n *\n * The payload must be a JSON-encoded Object with a `notification` key. The\n * value of the `notification` property will be used as the NotificationOptions\n * object passed to showNotification. Additionally, the `title` property of the\n * notification object will be used as the title.\n *\n * If there is no notification data in the payload then no notification will be\n * shown.\n * @private\n */\n SWController.prototype.onPush_ = function (event) {\n var _this = this;\n var msgPayload;\n try {\n msgPayload = event.data.json();\n }\n catch (err) {\n // Not JSON so not an FCM message\n return;\n }\n var handleMsgPromise = this.hasVisibleClients_().then(function (hasVisibleClients) {\n if (hasVisibleClients) {\n // Do not need to show a notification.\n if (msgPayload.notification || _this.bgMessageHandler_) {\n // Send to page\n return _this.sendMessageToWindowClients_(msgPayload);\n }\n return;\n }\n var notificationDetails = _this.getNotificationData_(msgPayload);\n if (notificationDetails) {\n var notificationTitle = notificationDetails.title || '';\n return self.registration.showNotification(notificationTitle, notificationDetails);\n }\n else if (_this.bgMessageHandler_) {\n return _this.bgMessageHandler_(msgPayload);\n }\n });\n event.waitUntil(handleMsgPromise);\n };\n /**\n * @private\n */\n SWController.prototype.onSubChange_ = function (event) {\n var _this = this;\n var promiseChain = this.getToken().then(function (token) {\n if (!token) {\n // We can't resubscribe if we don't have an FCM token for this scope.\n throw _this.errorFactory_.create(Errors.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);\n }\n var tokenDetails = null;\n var tokenManager = _this.getTokenManager();\n return tokenManager\n .getTokenDetailsFromToken(token)\n .then(function (details) {\n tokenDetails = details;\n if (!tokenDetails) {\n throw _this.errorFactory_.create(Errors.codes.INVALID_SAVED_TOKEN);\n }\n // Attempt to get a new subscription\n return self.registration.pushManager.subscribe(FCMDetails.SUBSCRIPTION_OPTIONS);\n })\n .then(function (newSubscription) {\n // Send new subscription to FCM.\n return tokenManager.subscribeToFCM(tokenDetails.fcmSenderId, newSubscription, tokenDetails.fcmPushSet);\n })\n .catch(function (err) {\n // The best thing we can do is log this to the terminal so\n // developers might notice the error.\n return tokenManager.deleteToken(tokenDetails.fcmToken).then(function () {\n throw _this.errorFactory_.create(Errors.codes.UNABLE_TO_RESUBSCRIBE, {\n message: err\n });\n });\n });\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n */\n SWController.prototype.onNotificationClick_ = function (event) {\n var _this = this;\n if (!(event.notification &&\n event.notification.data &&\n event.notification.data[FCM_MSG])) {\n // Not an FCM notification, do nothing.\n return;\n }\n // Prevent other listeners from receiving the event\n event.stopImmediatePropagation();\n event.notification.close();\n var msgPayload = event.notification.data[FCM_MSG];\n var clickAction = msgPayload['notification']['click_action'];\n if (!clickAction) {\n // Nothing to do.\n return;\n }\n var promiseChain = this.getWindowClient_(clickAction)\n .then(function (windowClient) {\n if (!windowClient) {\n // Unable to find window client so need to open one.\n return self.clients.openWindow(clickAction);\n }\n return windowClient;\n })\n .then(function (windowClient) {\n if (!windowClient) {\n // Window Client will not be returned if it's for a third party origin.\n return;\n }\n // Delete notification data from payload before sending to the page.\n var notificationData = msgPayload['notification'];\n delete msgPayload['notification'];\n var internalMsg = WorkerPageMessage.createNewMsg(WorkerPageMessage.TYPES_OF_MSG.NOTIFICATION_CLICKED, msgPayload);\n // Attempt to send a message to the client to handle the data\n // Is affected by: https://github.com/slightlyoff/ServiceWorker/issues/728\n return _this.attemptToMessageClient_(windowClient, internalMsg);\n });\n event.waitUntil(promiseChain);\n };\n /**\n * @private\n * @param {Object} msgPayload\n * @return {NotificationOptions|undefined}\n */\n SWController.prototype.getNotificationData_ = function (msgPayload) {\n if (!msgPayload) {\n return;\n }\n if (typeof msgPayload.notification !== 'object') {\n return;\n }\n var notificationInformation = Object.assign({}, msgPayload.notification);\n // Put the message payload under FCM_MSG name so we can identify the\n // notification as being an FCM notification vs a notification from\n // somewhere else (i.e. normal web push or developer generated\n // notification).\n notificationInformation['data'] = (_a = {},\n _a[FCM_MSG] = msgPayload,\n _a);\n return notificationInformation;\n var _a;\n };\n /**\n * Calling setBackgroundMessageHandler will opt in to some specific\n * behaviours.\n * 1.) If a notification doesn't need to be shown due to a window already\n * being visible, then push messages will be sent to the page.\n * 2.) If a notification needs to be shown, and the message contains no\n * notification data this method will be called\n * and the promise it returns will be passed to event.waitUntil.\n * If you do not set this callback then all push messages will let and the\n * developer can handle them in a their own 'push' event callback\n * @export\n * @param {function(Object)} callback The callback to be called when a push\n * message is received and a notification must be shown. The callback will\n * be given the data from the push message.\n */\n SWController.prototype.setBackgroundMessageHandler = function (callback) {\n if (callback && typeof callback !== 'function') {\n throw this.errorFactory_.create(Errors.codes.BG_HANDLER_FUNCTION_EXPECTED);\n }\n this.bgMessageHandler_ = callback;\n };\n /**\n * @private\n * @param {string} url The URL to look for when focusing a client.\n * @return {Object} Returns an existing window client or a newly opened\n * WindowClient.\n */\n SWController.prototype.getWindowClient_ = function (url) {\n // Use URL to normalize the URL when comparing to windowClients.\n // This at least handles whether to include trailing slashes or not\n var parsedURL = new URL(url).href;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var suitableClient = null;\n for (var i = 0; i < clientList.length; i++) {\n var parsedClientUrl = new URL(clientList[i].url).href;\n if (parsedClientUrl === parsedURL) {\n suitableClient = clientList[i];\n break;\n }\n }\n if (suitableClient) {\n suitableClient.focus();\n return suitableClient;\n }\n });\n };\n /**\n * This message will attempt to send the message to a window client.\n * @private\n * @param {Object} client The WindowClient to send the message to.\n * @param {Object} message The message to send to the client.\n * @returns {Promise} Returns a promise that resolves after sending the\n * message. This does not guarantee that the message was successfully\n * received.\n */\n SWController.prototype.attemptToMessageClient_ = function (client, message) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!client) {\n return reject(_this.errorFactory_.create(Errors.codes.NO_WINDOW_CLIENT_TO_MSG));\n }\n client.postMessage(message);\n resolve();\n });\n };\n /**\n * @private\n * @returns {Promise} If there is currently a visible WindowClient,\n * this method will resolve to true, otherwise false.\n */\n SWController.prototype.hasVisibleClients_ = function () {\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n return clientList.some(function (client) { return client.visibilityState === 'visible'; });\n });\n };\n /**\n * @private\n * @param {Object} msgPayload The data from the push event that should be sent\n * to all available pages.\n * @returns {Promise} Returns a promise that resolves once the message\n * has been sent to all WindowClients.\n */\n SWController.prototype.sendMessageToWindowClients_ = function (msgPayload) {\n var _this = this;\n return self.clients\n .matchAll({\n type: 'window',\n includeUncontrolled: true\n })\n .then(function (clientList) {\n var internalMsg = WorkerPageMessage.createNewMsg(WorkerPageMessage.TYPES_OF_MSG.PUSH_MSG_RECEIVED, msgPayload);\n return Promise.all(clientList.map(function (client) {\n return _this.attemptToMessageClient_(client, internalMsg);\n }));\n });\n };\n /**\n * This will register the default service worker and return the registration.\n * @private\n * @return {Promise} The service worker\n * registration to be used for the push service.\n */\n SWController.prototype.getSWRegistration_ = function () {\n return Promise.resolve(self.registration);\n };\n return SWController;\n}(ControllerInterface));\nexport default SWController;\n\n//# sourceMappingURL=sw-controller.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../messaging/dist/esm/src/controllers/sw-controller.js\n// module id = null\n// module chunks = ","/*!\n * @license Firebase v4.6.1\n * Build: rev-0ea11f2\n * Terms: https://firebase.google.com/terms/\n */\ntry {\n webpackJsonpFirebase([2],{\n\n/***/ 118:\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n__webpack_require__(119);\n\n\n/***/ }),\n\n/***/ 119:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n\n// EXTERNAL MODULE: ../app/dist/esm/index.js + 1 modules\nvar esm = __webpack_require__(6);\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/constants.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Constants used in the Firebase Storage library.\n */\n/**\n * Domain and scheme for API calls.\n */\nvar domainBase = 'https://firebasestorage.googleapis.com';\n/**\n * Domain and scheme for object downloads.\n */\nvar downloadBase = 'https://firebasestorage.googleapis.com';\n/**\n * Base URL for non-upload calls to the API.\n */\nvar apiBaseUrl = '/v0';\n/**\n * Base URL for upload calls to the API.\n */\nvar apiUploadBaseUrl = '/v0';\nfunction setDomainBase(domainBase) {\n domainBase = domainBase;\n}\nvar configOption = 'storageBucket';\n/**\n * 1 minute\n */\nvar shortMaxOperationRetryTime = 1 * 60 * 1000;\n/**\n * 2 minutes\n */\nvar defaultMaxOperationRetryTime = 2 * 60 * 1000;\n/**\n * 10 minutes\n */\nvar defaultMaxUploadRetryTime = 10 * 60 * 100;\n/**\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\n * enough for us to use it directly.\n */\nvar minSafeInteger = -9007199254740991;\n\n//# sourceMappingURL=constants.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/error.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar FirebaseStorageError = /** @class */ (function () {\n function FirebaseStorageError(code, message) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n FirebaseStorageError.prototype.codeProp = function () {\n return this.code;\n };\n FirebaseStorageError.prototype.codeEquals = function (code) {\n return prependCode(code) === this.codeProp();\n };\n FirebaseStorageError.prototype.serverResponseProp = function () {\n return this.serverResponse_;\n };\n FirebaseStorageError.prototype.setServerResponseProp = function (serverResponse) {\n this.serverResponse_ = serverResponse;\n };\n Object.defineProperty(FirebaseStorageError.prototype, \"name\", {\n get: function () {\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"code\", {\n get: function () {\n return this.code_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"message\", {\n get: function () {\n return this.message_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n get: function () {\n return this.serverResponse_;\n },\n enumerable: true,\n configurable: true\n });\n return FirebaseStorageError;\n}());\n\nvar errors = {};\nvar Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\nfunction prependCode(code) {\n return 'storage/' + code;\n}\nfunction unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' +\n 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\nfunction objectNotFound(path) {\n return new FirebaseStorageError(Code.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nfunction bucketNotFound(bucket) {\n return new FirebaseStorageError(Code.BUCKET_NOT_FOUND, \"Bucket '\" + bucket + \"' does not exist.\");\n}\nfunction projectNotFound(project) {\n return new FirebaseStorageError(Code.PROJECT_NOT_FOUND, \"Project '\" + project + \"' does not exist.\");\n}\nfunction quotaExceeded(bucket) {\n return new FirebaseStorageError(Code.QUOTA_EXCEEDED, \"Quota for bucket '\" +\n bucket +\n \"' exceeded, please view quota on \" +\n 'https://firebase.google.com/pricing/.');\n}\nfunction unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' +\n 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\nfunction unauthorized(path) {\n return new FirebaseStorageError(Code.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nfunction retryLimitExceeded() {\n return new FirebaseStorageError(Code.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nfunction invalidChecksum(path, checksum, calculated) {\n return new FirebaseStorageError(Code.INVALID_CHECKSUM, \"Uploaded/downloaded object '\" +\n path +\n \"' has checksum '\" +\n checksum +\n \"' which does not match '\" +\n calculated +\n \"'. Please retry the upload/download.\");\n}\nfunction error_canceled() {\n return new FirebaseStorageError(Code.CANCELED, 'User canceled the upload/download.');\n}\nfunction invalidEventName(name) {\n return new FirebaseStorageError(Code.INVALID_EVENT_NAME, \"Invalid event name '\" + name + \"'.\");\n}\nfunction invalidUrl(url) {\n return new FirebaseStorageError(Code.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nfunction invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(Code.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nfunction noDefaultBucket() {\n return new FirebaseStorageError(Code.NO_DEFAULT_BUCKET, 'No default bucket ' +\n \"found. Did you set the '\" +\n configOption +\n \"' property when initializing the app?\");\n}\nfunction cannotSliceBlob() {\n return new FirebaseStorageError(Code.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nfunction serverFileWrongSize() {\n return new FirebaseStorageError(Code.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nfunction noDownloadURL() {\n return new FirebaseStorageError(Code.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nfunction invalidArgument(index, fnName, message) {\n return new FirebaseStorageError(Code.INVALID_ARGUMENT, 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message);\n}\nfunction invalidArgumentCount(argMin, argMax, fnName, real) {\n var countPart;\n var plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n }\n else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(Code.INVALID_ARGUMENT_COUNT, 'Invalid argument count in `' +\n fnName +\n '`: Expected ' +\n countPart +\n ' ' +\n plural +\n ', received ' +\n real +\n '.');\n}\nfunction appDeleted() {\n return new FirebaseStorageError(Code.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\n * @param name The name of the operation that was invalid.\n */\nfunction invalidRootOperation(name) {\n return new FirebaseStorageError(Code.INVALID_ROOT_OPERATION, \"The operation '\" +\n name +\n \"' cannot be performed on a root reference, create a non-root \" +\n \"reference using child, such as .child('file.png').\");\n}\n/**\n * @param format The format that was not valid.\n * @param message A message describing the format violation.\n */\nfunction invalidFormat(format, message) {\n return new FirebaseStorageError(Code.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\n * @param message A message describing the internal error.\n */\nfunction internalError(message) {\n throw new FirebaseStorageError(Code.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n\n//# sourceMappingURL=error.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/string.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\nfunction formatValidator(stringFormat) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' +\n StringFormat.RAW +\n ', ' +\n StringFormat.BASE64 +\n ', ' +\n StringFormat.BASE64URL +\n ', ' +\n StringFormat.DATA_URL +\n '].';\n }\n}\n/**\n * @struct\n */\nvar StringData = /** @class */ (function () {\n function StringData(data, opt_contentType) {\n this.data = data;\n this.contentType = opt_contentType || null;\n }\n return StringData;\n}());\n\nfunction dataFromString(format, string) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n // assert(false);\n throw unknown();\n}\nfunction utf8Bytes_(string) {\n var b = [];\n for (var i = 0; i < string.length; i++) {\n var c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n }\n else {\n if (c <= 2047) {\n b.push(192 | (c >> 6), 128 | (c & 63));\n }\n else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n var valid = i < string.length - 1 &&\n (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n }\n else {\n var hi = c;\n var lo = string.charCodeAt(++i);\n c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\n b.push(240 | (c >> 18), 128 | ((c >> 12) & 63), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n }\n else {\n b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\nfunction percentEncodedBytes_(string) {\n var decoded;\n try {\n decoded = decodeURIComponent(string);\n }\n catch (e) {\n throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n return utf8Bytes_(decoded);\n}\nfunction base64Bytes_(format, string) {\n switch (format) {\n case StringFormat.BASE64: {\n var hasMinus = string.indexOf('-') !== -1;\n var hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw invalidFormat(format, \"Invalid character '\" +\n invalidChar +\n \"' found: is it base64url encoded?\");\n }\n break;\n }\n case StringFormat.BASE64URL: {\n var hasPlus = string.indexOf('+') !== -1;\n var hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n var bytes;\n try {\n bytes = atob(string);\n }\n catch (e) {\n throw invalidFormat(format, 'Invalid character found');\n }\n var array = new Uint8Array(bytes.length);\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n/**\n * @struct\n */\nvar string_DataURLParts = /** @class */ (function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n var middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64\n ? middle.substring(0, middle.length - ';base64'.length)\n : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n return DataURLParts;\n}());\nfunction dataURLBytes_(string) {\n var parts = new string_DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n }\n else {\n return percentEncodedBytes_(parts.rest);\n }\n}\nfunction dataURLContentType_(string) {\n var parts = new string_DataURLParts(string);\n return parts.contentType;\n}\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n return s.substring(s.length - end.length) === end;\n}\n\n//# sourceMappingURL=string.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/taskenums.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\nvar InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\nvar TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\nfunction taskStateFromInternalTaskState(state) {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n\n//# sourceMappingURL=taskenums.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/object.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains methods for working with objects.\n */\nfunction contains(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction forEach(obj, f) {\n for (var key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\nfunction clone(obj) {\n if (obj == null) {\n return {};\n }\n var c = {};\n forEach(obj, function (key, val) {\n c[key] = val;\n });\n return c;\n}\n\n//# sourceMappingURL=object.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/promise_external.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Implements the promise abstraction interface for external\n * (public SDK) packaging, which just passes through to the firebase-app impl.\n */\n/**\n * @template T\n * @param {function((function(T): void),\n * (function(!Error): void))} resolver\n */\nfunction make(resolver) {\n return new Promise(resolver);\n}\n/**\n * @template T\n */\nfunction promise_external_resolve(value) {\n return Promise.resolve(value);\n}\nfunction promise_external_reject(error) {\n return Promise.reject(error);\n}\n\n//# sourceMappingURL=promise_external.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/type.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @return False if the object is undefined or null, true otherwise.\n */\nfunction isDef(p) {\n return p != null;\n}\nfunction isJustDef(p) {\n return p !== void 0;\n}\nfunction isFunction(p) {\n return typeof p === 'function';\n}\nfunction isObject(p) {\n return typeof p === 'object';\n}\nfunction isNonNullObject(p) {\n return isObject(p) && p !== null;\n}\nfunction isNonArrayObject(p) {\n return isObject(p) && !Array.isArray(p);\n}\nfunction isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\nfunction isNumber(p) {\n return typeof p === 'number' || p instanceof Number;\n}\nfunction isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\nfunction isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n\n//# sourceMappingURL=type.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/xhrio.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @enum{number}\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode = ErrorCode || (ErrorCode = {}));\n\n//# sourceMappingURL=xhrio.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/xhrio_network.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n/**\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\n * doesn't work in React Native on Android.\n */\nvar xhrio_network_NetworkXhrIo = /** @class */ (function () {\n function NetworkXhrIo() {\n var _this = this;\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = ErrorCode.NO_ERROR;\n this.sendPromise_ = make(function (resolve, reject) {\n _this.xhr_.addEventListener('abort', function (event) {\n _this.errorCode_ = ErrorCode.ABORT;\n resolve(_this);\n });\n _this.xhr_.addEventListener('error', function (event) {\n _this.errorCode_ = ErrorCode.NETWORK_ERROR;\n resolve(_this);\n });\n _this.xhr_.addEventListener('load', function (event) {\n resolve(_this);\n });\n });\n }\n /**\n * @override\n */\n NetworkXhrIo.prototype.send = function (url, method, opt_body, opt_headers) {\n var _this = this;\n if (this.sent_) {\n throw internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (isDef(opt_headers)) {\n var headers = opt_headers;\n forEach(headers, function (key, val) {\n _this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (isDef(opt_body)) {\n this.xhr_.send(opt_body);\n }\n else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw internalError('cannot .getErrorCode() before sending');\n }\n return this.errorCode_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getStatus = function () {\n if (!this.sent_) {\n throw internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n }\n catch (e) {\n return -1;\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw internalError('cannot .getResponseText() before sending');\n }\n return this.xhr_.responseText;\n };\n /**\n * Aborts the request.\n * @override\n */\n NetworkXhrIo.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.addUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.removeUploadProgressListener = function (listener) {\n if (isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n return NetworkXhrIo;\n}());\n\n\n//# sourceMappingURL=xhrio_network.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/xhriopool.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Factory-like class for creating XhrIo instances.\n */\nvar xhriopool_XhrIoPool = /** @class */ (function () {\n function XhrIoPool() {\n }\n XhrIoPool.prototype.createXhrIo = function () {\n return new xhrio_network_NetworkXhrIo();\n };\n return XhrIoPool;\n}());\n\n\n//# sourceMappingURL=xhriopool.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/json.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Returns the Object resulting from parsing the given JSON, or null if the\n * given string does not represent a JSON object.\n */\nfunction jsonObjectOrNull(s) {\n var obj;\n try {\n obj = JSON.parse(s);\n }\n catch (e) {\n return null;\n }\n if (isNonArrayObject(obj)) {\n return obj;\n }\n else {\n return null;\n }\n}\n\n//# sourceMappingURL=json.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/location.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functionality related to the parsing/composition of bucket/\n * object location.\n */\n\n/**\n * @struct\n */\nvar location_Location = /** @class */ (function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n Object.defineProperty(Location.prototype, \"path\", {\n get: function () {\n return this.path_;\n },\n enumerable: true,\n configurable: true\n });\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n Location.makeFromBucketSpec = function (bucketString) {\n var bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n }\n catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n }\n else {\n throw invalidDefaultBucket(bucketString);\n }\n };\n Location.makeFromUrl = function (url) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n var gsPath = '(/(.*))?$';\n var path = '(/([^?#]*).*)?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = { bucket: 1, path: 3 };\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n var version = 'v[A-Za-z0-9_]+';\n var httpRegex = new RegExp('^https?://firebasestorage\\\\.googleapis\\\\.com/' +\n version +\n '/b/' +\n bucketDomain +\n '/o' +\n path, 'i');\n var httpIndices = { bucket: 1, path: 3 };\n var groups = [\n { regex: gsRegex, indices: gsIndices, postModify: gsModify },\n { regex: httpRegex, indices: httpIndices, postModify: httpModify }\n ];\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw invalidUrl(url);\n }\n return location;\n };\n return Location;\n}());\n\n\n//# sourceMappingURL=location.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/path.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains helper methods for manipulating paths.\n */\n/**\n * @return Null if the path is already at the root.\n */\nfunction path_parent(path) {\n if (path.length == 0) {\n return null;\n }\n var index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n var newPath = path.slice(0, index);\n return newPath;\n}\nfunction child(path, childPath) {\n var canonicalChildPath = childPath\n .split('/')\n .filter(function (component) {\n return component.length > 0;\n })\n .join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n }\n else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\n * Returns the last component of a path.\n * '/foo/bar' -> 'bar'\n * '/foo/bar/baz/' -> 'baz/'\n * '/a' -> 'a'\n */\nfunction lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n }\n else {\n return path.slice(index + 1);\n }\n}\n\n//# sourceMappingURL=path.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/url.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functions to create and manipulate URLs for the server API.\n */\n\n\nfunction makeNormalUrl(urlPart) {\n return domainBase + apiBaseUrl + urlPart;\n}\nfunction makeDownloadUrl(urlPart) {\n return downloadBase + apiBaseUrl + urlPart;\n}\nfunction makeUploadUrl(urlPart) {\n return domainBase + apiUploadBaseUrl + urlPart;\n}\nfunction makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n forEach(params, function (key, val) {\n var nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n\n//# sourceMappingURL=url.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/metadata.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\nfunction noXform_(metadata, value) {\n return value;\n}\n/**\n * @struct\n */\nvar Mapping = /** @class */ (function () {\n function Mapping(server, opt_local, opt_writable, opt_xform) {\n this.server = server;\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n return Mapping;\n}());\n\nvar mappings_ = null;\nfunction xformPath(fullPath) {\n var valid = isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n }\n else {\n fullPath = fullPath;\n return lastComponent(fullPath);\n }\n}\nfunction getMappings() {\n if (mappings_) {\n return mappings_;\n }\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n function mappingsXformPath(metadata, fullPath) {\n return xformPath(fullPath);\n }\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\n * Coerces the second param to a number, if it is defined.\n */\n function xformSize(metadata, size) {\n if (isDef(size)) {\n return +size;\n }\n else {\n return size;\n }\n }\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n /**\n * Transforms a comma-separated string of tokens into a list of download\n * URLs.\n */\n function xformTokens(metadata, tokens) {\n var valid = isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = makeDownloadUrl(urlPart);\n var queryString = makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(new Mapping('downloadTokens', 'downloadURLs', false, xformTokens));\n mappings_ = mappings;\n return mappings_;\n}\nfunction addRef(metadata, authWrapper) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new location_Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\nfunction fromResource(authWrapper, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\nfunction fromResourceString(authWrapper, resourceString, mappings) {\n var obj = jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n var resource = obj;\n return fromResource(authWrapper, resource, mappings);\n}\nfunction toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\nfunction metadataValidator(p) {\n var validType = p && isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (var key in p) {\n var val = p[key];\n if (key === 'customMetadata') {\n if (!isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n }\n else {\n if (isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n\n//# sourceMappingURL=metadata.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/args.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n/**\n * @param name Name of the function.\n * @param specs Argument specs.\n * @param passed The actual arguments passed to the function.\n * @throws {fbs.Error} If the arguments are invalid.\n */\nfunction validate(name, specs, passed) {\n var minArgs = specs.length;\n var maxArgs = specs.length;\n for (var i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n var validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw invalidArgumentCount(minArgs, maxArgs, name, passed.length);\n }\n for (var i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n }\n catch (e) {\n if (e instanceof Error) {\n throw invalidArgument(i, name, e.message);\n }\n else {\n throw invalidArgument(i, name, e);\n }\n }\n }\n}\n/**\n * @struct\n */\nvar args_ArgSpec = /** @class */ (function () {\n function ArgSpec(validator, opt_optional) {\n var self = this;\n this.validator = function (p) {\n if (self.optional && !isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n return ArgSpec;\n}());\n\nfunction and_(v1, v2) {\n return function (p) {\n v1(p);\n v2(p);\n };\n}\nfunction stringSpec(opt_validator, opt_optional) {\n function stringValidator(p) {\n if (!isString(p)) {\n throw 'Expected string.';\n }\n }\n var validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n }\n else {\n validator = stringValidator;\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction uploadDataSpec() {\n function validator(p) {\n var valid = p instanceof Uint8Array ||\n p instanceof ArrayBuffer ||\n (isNativeBlobDefined() && p instanceof Blob);\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction metadataSpec(opt_optional) {\n return new args_ArgSpec(metadataValidator, opt_optional);\n}\nfunction nonNegativeNumberSpec() {\n function validator(p) {\n var valid = isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new args_ArgSpec(validator);\n}\nfunction looseObjectSpec(opt_validator, opt_optional) {\n function validator(p) {\n var isLooseObject = p === null || (isDef(p) && p instanceof Object);\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\nfunction nullFunctionSpec(opt_optional) {\n function validator(p) {\n var valid = p === null || isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new args_ArgSpec(validator, opt_optional);\n}\n\n//# sourceMappingURL=args.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/fs.js\n\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n }\n else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n }\n else {\n return undefined;\n }\n}\n/**\n * Concatenates one or more values together and converts them to a Blob.\n *\n * @param var_args The values that will make up the resulting blob.\n * @return The blob.\n */\nfunction getBlob() {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n for (var i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n }\n else {\n if (isNativeBlobDefined()) {\n return new Blob(var_args);\n }\n else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\n * Slices the blob. The returned blob contains data from the start byte\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\n *\n * @param blob The blob to be sliced.\n * @param start Index of the starting byte.\n * @param end Index of the ending byte.\n * @return The blob slice or null if not supported.\n */\nfunction sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n }\n else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n }\n else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n\n//# sourceMappingURL=fs.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/blob.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file Provides a Blob-like wrapper for various binary types (including the\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\n * making uploads possible in environments without the native Blob type.\n */\n\n\n\n\n/**\n * @param opt_elideCopy If true, doesn't copy mutable input data\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\n * modified after this blob's construction.\n */\nvar blob_FbsBlob = /** @class */ (function () {\n function FbsBlob(data, opt_elideCopy) {\n var size = 0;\n var blobType = '';\n if (isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n }\n else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n }\n else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n }\n else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data;\n }\n else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n }\n else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n FbsBlob.getBlob = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (isNativeBlobDefined()) {\n var blobby = var_args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n }\n else {\n return val;\n }\n });\n return new FbsBlob(getBlob.apply(null, blobby));\n }\n else {\n var uint8Arrays = var_args.map(function (val) {\n if (isString(val)) {\n return dataFromString(StringFormat.RAW, val).data;\n }\n else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n return FbsBlob;\n}());\n\n\n//# sourceMappingURL=blob.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/array.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns true if the object is contained in the array (compared with ===).\n * @template T\n */\nfunction array_contains(array, elem) {\n return array.indexOf(elem) !== -1;\n}\n/**\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\n * @template T\n */\nfunction array_clone(arraylike) {\n return Array.prototype.slice.call(arraylike);\n}\n/**\n * Removes the given element from the given array, if it is contained.\n * Directly modifies the passed-in array.\n * @template T\n */\nfunction remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n\n//# sourceMappingURL=array.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/requestinfo.js\nvar RequestInfo = /** @class */ (function () {\n function RequestInfo(url, method, \n /**\n * Returns the value with which to resolve the request's promise. Only called\n * if the request is successful. Throw from this function to reject the\n * returned Request's promise with the thrown error.\n * Note: The XhrIo passed to this function may be reused after this callback\n * returns. Do not keep a reference to it in any way.\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\n * Called with the current number of bytes uploaded and total size (-1 if not\n * computable) of the request body (i.e. used to report upload progress).\n */\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n return RequestInfo;\n}());\n\n\n//# sourceMappingURL=requestinfo.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/requests.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n/**\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\n */\nfunction handlerCheck(cndn) {\n if (!cndn) {\n throw unknown();\n }\n}\nfunction metadataHandler(authWrapper, mappings) {\n function handler(xhr, text) {\n var metadata = fromResourceString(authWrapper, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n return handler;\n}\nfunction sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n if (xhr.getStatus() === 401) {\n newErr = unauthenticated();\n }\n else {\n if (xhr.getStatus() === 402) {\n newErr = quotaExceeded(location.bucket);\n }\n else {\n if (xhr.getStatus() === 403) {\n newErr = unauthorized(location.path);\n }\n else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nfunction getMetadata(authWrapper, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'GET';\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction updateMetadata(authWrapper, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'PATCH';\n var body = toResourceString(metadata, mappings);\n var headers = { 'Content-Type': 'application/json; charset=utf-8' };\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction deleteObject(authWrapper, location) {\n var urlPart = location.fullServerUrl();\n var url = makeNormalUrl(urlPart);\n var method = 'DELETE';\n var timeout = authWrapper.maxOperationRetryTime();\n function handler(xhr, text) { }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nfunction determineContentType_(metadata, blob) {\n return ((metadata && metadata['contentType']) ||\n (blob && blob.type()) ||\n 'application/octet-stream');\n}\nfunction metadataForUpload_(location, blob, opt_metadata) {\n var metadata = clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\nfunction multipartUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n function genBoundary() {\n var str = '';\n for (var i = 0; i < 2; i++) {\n str =\n str +\n Math.random()\n .toString()\n .slice(2);\n }\n return str;\n }\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var metadataString = toResourceString(metadata, mappings);\n var preBlobPart = '--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\n metadataString +\n '\\r\\n--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: ' +\n metadata['contentType'] +\n '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = blob_FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw cannotSliceBlob();\n }\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param current The number of bytes that have been uploaded so far.\n * @param total The total number of bytes in the upload.\n * @param opt_finalized True if the server has finished the upload.\n * @param opt_metadata The upload metadata, should\n * only be passed if opt_finalized is true.\n * @struct\n */\nvar ResumableUploadStatus = /** @class */ (function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n return ResumableUploadStatus;\n}());\n\nfunction checkResumeHeader_(xhr, opt_allowed) {\n var status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n }\n catch (e) {\n handlerCheck(false);\n }\n var allowed = opt_allowed || ['active'];\n handlerCheck(array_contains(allowed, status));\n return status;\n}\nfunction createResumableUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var urlParams = { name: metadata['fullPath'] };\n var url = makeUploadUrl(urlPart);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = toResourceString(metadata, mappings);\n var timeout = authWrapper.maxUploadRetryTime();\n function handler(xhr, text) {\n checkResumeHeader_(xhr);\n var url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n }\n catch (e) {\n handlerCheck(false);\n }\n handlerCheck(isString(url));\n return url;\n }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n */\nfunction getResumableUploadStatus(authWrapper, location, url, blob) {\n var headers = { 'X-Goog-Upload-Command': 'query' };\n function handler(xhr, text) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n }\n catch (e) {\n handlerCheck(false);\n }\n var size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * Any uploads via the resumable upload API must transfer a number of bytes\n * that is a multiple of this number.\n */\nvar resumableUploadChunkSize = 256 * 1024;\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n * @param chunkSize Number of bytes to upload.\n * @param opt_status The previous status.\n * If not passed or null, we start from the beginning.\n * @throws fbs.Error If the upload is already complete, the passed in status\n * has a final size inconsistent with the blob, or the blob cannot be sliced\n * for upload.\n */\nfunction continueResumableUpload(location, authWrapper, url, blob, chunkSize, mappings, opt_status, opt_progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n }\n else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw serverFileWrongSize();\n }\n var bytesLeft = status.total - status.current;\n var bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n var startByte = status.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n var body = blob.slice(startByte, endByte);\n if (body === null) {\n throw cannotSliceBlob();\n }\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n }\n else {\n metadata = null;\n }\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n//# sourceMappingURL=requests.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/observer.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @struct\n */\nvar observer_Observer = /** @class */ (function () {\n function Observer(nextOrObserver, opt_error, opt_complete) {\n var asFunctions = isFunction(nextOrObserver) ||\n isDef(opt_error) ||\n isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n }\n else {\n var observer = nextOrObserver;\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n return Observer;\n}());\n\n\n//# sourceMappingURL=observer.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/tasksnapshot.js\nvar UploadTaskSnapshot = /** @class */ (function () {\n function UploadTaskSnapshot(bytesTransferred, totalBytes, state, metadata, task, ref) {\n this.bytesTransferred = bytesTransferred;\n this.totalBytes = totalBytes;\n this.state = state;\n this.metadata = metadata;\n this.task = task;\n this.ref = ref;\n }\n Object.defineProperty(UploadTaskSnapshot.prototype, \"downloadURL\", {\n get: function () {\n if (this.metadata !== null) {\n var urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n return UploadTaskSnapshot;\n}());\n\n\n//# sourceMappingURL=tasksnapshot.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/async.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Method for invoking a callback asynchronously.\n */\n\n/**\n * Returns a function that invokes f with its arguments asynchronously as a\n * microtask, i.e. as soon as possible after the current script returns back\n * into browser code.\n */\nfunction async_async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promise_external_resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}\n\n//# sourceMappingURL=async.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/task.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines types for interacting with blob transfer tasks.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\n * upload and manage callbacks for various events.\n */\nvar task_UploadTask = /** @class */ (function () {\n /**\n * @param ref The firebaseStorage.Reference object this task came\n * from, untyped to avoid cyclic dependencies.\n * @param blob The blob to upload.\n */\n function UploadTask(ref, authWrapper, location, mappings, blob, metadata) {\n if (metadata === void 0) { metadata = null; }\n var _this = this;\n this.transferred_ = 0;\n this.needToFetchStatus_ = false;\n this.needToFetchMetadata_ = false;\n this.observers_ = [];\n this.error_ = null;\n this.uploadUrl_ = null;\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n this.resolve_ = null;\n this.reject_ = null;\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = function (error) {\n _this.request_ = null;\n _this.chunkMultiplier_ = 1;\n if (error.codeEquals(Code.CANCELED)) {\n _this.needToFetchStatus_ = true;\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = function (error) {\n _this.request_ = null;\n if (error.codeEquals(Code.CANCELED)) {\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = make(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n _this.start_();\n });\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, function () { });\n }\n UploadTask.prototype.makeProgressCallback_ = function () {\n var _this = this;\n var sizeBefore = this.transferred_;\n return function (loaded, total) {\n _this.updateProgress_(sizeBefore + loaded);\n };\n };\n UploadTask.prototype.shouldDoResumable_ = function (blob) {\n return blob.size() > 256 * 1024;\n };\n UploadTask.prototype.start_ = function () {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n }\n else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n }\n else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n }\n else {\n this.continueUpload_();\n }\n }\n }\n }\n else {\n this.oneShotUpload_();\n }\n };\n UploadTask.prototype.resolveToken_ = function (callback) {\n var _this = this;\n this.authWrapper_.getAuthToken().then(function (authToken) {\n switch (_this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n _this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n _this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n };\n // TODO(andysoto): assert false\n UploadTask.prototype.createResumable_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = createResumableUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var createRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = createRequest;\n createRequest.getPromise().then(function (url) {\n _this.request_ = null;\n _this.uploadUrl_ = url;\n _this.needToFetchStatus_ = false;\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.fetchStatus_ = function () {\n var _this = this;\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo = getResumableUploadStatus(_this.authWrapper_, _this.location_, url, _this.blob_);\n var statusRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this.request_ = null;\n _this.updateProgress_(status.current);\n _this.needToFetchStatus_ = false;\n if (status.finalized) {\n _this.needToFetchMetadata_ = true;\n }\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.continueUpload_ = function () {\n var _this = this;\n var chunkSize = resumableUploadChunkSize * this.chunkMultiplier_;\n var status = new ResumableUploadStatus(this.transferred_, this.blob_.size());\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo;\n try {\n requestInfo = continueResumableUpload(_this.location_, _this.authWrapper_, url, _this.blob_, chunkSize, _this.mappings_, status, _this.makeProgressCallback_());\n }\n catch (e) {\n _this.error_ = e;\n _this.transition_(InternalTaskState.ERROR);\n return;\n }\n var uploadRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = uploadRequest;\n uploadRequest\n .getPromise()\n .then(function (newStatus) {\n _this.increaseMultiplier_();\n _this.request_ = null;\n _this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n _this.metadata_ = newStatus.metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }\n else {\n _this.completeTransitions_();\n }\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.increaseMultiplier_ = function () {\n var currentSize = resumableUploadChunkSize * this.chunkMultiplier_;\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n };\n UploadTask.prototype.fetchMetadata_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = getMetadata(_this.authWrapper_, _this.location_, _this.mappings_);\n var metadataRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.metadataErrorHandler_);\n });\n };\n UploadTask.prototype.oneShotUpload_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = multipartUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var multipartRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.updateProgress_(_this.blob_.size());\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.updateProgress_ = function (transferred) {\n var old = this.transferred_;\n this.transferred_ = transferred;\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n };\n UploadTask.prototype.transition_ = function (state) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = error_canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n };\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n };\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n get: function () {\n var externalState = taskStateFromInternalTaskState(this.state_);\n return new UploadTaskSnapshot(this.transferred_, this.blob_.size(), externalState, this.metadata_, this, this.ref_);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a callback for an event.\n * @param type The type of event to listen for.\n */\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n if (nextOrObserver === void 0) { nextOrObserver = undefined; }\n if (error === void 0) { error = undefined; }\n if (completed === void 0) { completed = undefined; }\n function typeValidator(_p) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw \"Expected one of the event types: [\" + TaskEvent.STATE_CHANGED + \"].\";\n }\n }\n var nextOrObserverMessage = 'Expected a function or an Object with one of ' +\n '`next`, `error`, `complete` properties.';\n var nextValidator = nullFunctionSpec(true).validator;\n var observerValidator = looseObjectSpec(null, true).validator;\n function nextOrObserverValidator(p) {\n try {\n nextValidator(p);\n return;\n }\n catch (e) { }\n try {\n observerValidator(p);\n var anyDefined = isJustDef(p['next']) ||\n isJustDef(p['error']) ||\n isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n }\n catch (e) {\n throw nextOrObserverMessage;\n }\n }\n var specs = [\n stringSpec(typeValidator),\n looseObjectSpec(nextOrObserverValidator, true),\n nullFunctionSpec(true),\n nullFunctionSpec(true)\n ];\n validate('on', specs, arguments);\n var self = this;\n function makeBinder(specs) {\n function binder(nextOrObserver, error, opt_complete) {\n if (specs !== null) {\n validate('on', specs, arguments);\n }\n var observer = new observer_Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return function () {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n function binderNextOrObserverValidator(p) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n var binderSpecs = [\n looseObjectSpec(binderNextOrObserverValidator),\n nullFunctionSpec(true),\n nullFunctionSpec(true)\n ];\n var typeOnly = !(isJustDef(nextOrObserver) ||\n isJustDef(error) ||\n isJustDef(completed));\n if (typeOnly) {\n return makeBinder(binderSpecs);\n }\n else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n };\n /**\n * This object behaves like a Promise, and resolves with its snapshot data\n * when the upload completes.\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\n * @param onRejected The rejection callback.\n */\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(onFulfilled, onRejected);\n };\n /**\n * Equivalent to calling `then(null, onRejected)`.\n */\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\n * Adds the given observer.\n */\n UploadTask.prototype.addObserver_ = function (observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n };\n /**\n * Removes the given observer.\n */\n UploadTask.prototype.removeObserver_ = function (observer) {\n remove(this.observers_, observer);\n };\n UploadTask.prototype.notifyObservers_ = function () {\n var _this = this;\n this.finishPromise_();\n var observers = array_clone(this.observers_);\n observers.forEach(function (observer) {\n _this.notifyObserver_(observer);\n });\n };\n UploadTask.prototype.finishPromise_ = function () {\n if (this.resolve_ !== null) {\n var triggered = true;\n switch (taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n async_async(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this.reject_;\n async_async(toCall.bind(null, this.error_))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n };\n UploadTask.prototype.notifyObserver_ = function (observer) {\n var externalState = taskStateFromInternalTaskState(this.state_);\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n async_async(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n async_async(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n async_async(observer.error.bind(observer, this.error_))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n async_async(observer.error.bind(observer, this.error_))();\n }\n }\n };\n /**\n * Resumes a paused task. Has no effect on a currently running or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.resume = function () {\n validate('resume', [], arguments);\n var valid = this.state_ === InternalTaskState.PAUSED ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n };\n /**\n * Pauses a currently running task. Has no effect on a paused or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.pause = function () {\n validate('pause', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n };\n /**\n * Cancels a currently running or paused task. Has no effect on a complete or\n * failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.cancel = function () {\n validate('cancel', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n };\n return UploadTask;\n}());\n\n\n//# sourceMappingURL=task.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/reference.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines the Firebase Storage Reference class.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Provides methods to interact with a bucket in the Firebase Storage service.\n * @param location An fbs.location, or the URL at\n * which to base this object, in one of the following forms:\n * gs:///\n * http[s]://firebasestorage.googleapis.com/\n * /b//o/\n * Any query or fragment strings will be ignored in the http[s]\n * format. If no value is passed, the storage object will use a URL based on\n * the project ID of the base firebase.App instance.\n */\nvar reference_Reference = /** @class */ (function () {\n function Reference(authWrapper, location) {\n this.authWrapper = authWrapper;\n if (location instanceof location_Location) {\n this.location = location;\n }\n else {\n this.location = location_Location.makeFromUrl(location);\n }\n }\n /**\n * @return The URL for the bucket and path this object references,\n * in the form gs:///\n * @override\n */\n Reference.prototype.toString = function () {\n validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n };\n Reference.prototype.newRef = function (authWrapper, location) {\n return new Reference(authWrapper, location);\n };\n Reference.prototype.mappings = function () {\n return getMappings();\n };\n /**\n * @return A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n Reference.prototype.child = function (childPath) {\n validate('child', [stringSpec()], arguments);\n var newPath = child(this.location.path, childPath);\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n };\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\n * @return A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get: function () {\n var newPath = path_parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n var location = new location_Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\n * @return An reference to the root of this\n * object's bucket.\n */\n get: function () {\n var location = new location_Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n get: function () {\n return this.location.bucket;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n get: function () {\n return this.location.path;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n get: function () {\n return lastComponent(this.location.path);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n get: function () {\n return this.authWrapper.service();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Uploads a blob to this object's location.\n * @param data The blob to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.put = function (data, metadata) {\n if (metadata === void 0) { metadata = null; }\n validate('put', [uploadDataSpec(), metadataSpec(true)], arguments);\n this.throwIfRoot_('put');\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data), metadata);\n };\n /**\n * Uploads a string to this object's location.\n * @param string The string to upload.\n * @param opt_format The format of the string to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.putString = function (string, format, opt_metadata) {\n if (format === void 0) { format = StringFormat.RAW; }\n validate('putString', [\n stringSpec(),\n stringSpec(formatValidator, true),\n metadataSpec(true)\n ], arguments);\n this.throwIfRoot_('putString');\n var data = dataFromString(format, string);\n var metadata = clone(opt_metadata);\n if (!isDef(metadata['contentType']) && isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new task_UploadTask(this, this.authWrapper, this.location, this.mappings(), new blob_FbsBlob(data.data, true), metadata);\n };\n /**\n * Deletes the object at this location.\n * @return A promise that resolves if the deletion succeeds.\n */\n Reference.prototype.delete = function () {\n validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * A promise that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retreived, the promise is\n * rejected.\n */\n Reference.prototype.getMetadata = function () {\n validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = getMetadata(self.authWrapper, self.location, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * Updates the metadata for this object.\n * @param metadata The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @return A promise that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n Reference.prototype.updateMetadata = function (metadata) {\n validate('updateMetadata', [metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = updateMetadata(self.authWrapper, self.location, metadata, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * @return A promise that resolves with the download\n * URL for this object.\n */\n Reference.prototype.getDownloadURL = function () {\n validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function (metadata) {\n var url = metadata['downloadURLs'][0];\n if (isDef(url)) {\n return url;\n }\n else {\n throw noDownloadURL();\n }\n });\n };\n Reference.prototype.throwIfRoot_ = function (name) {\n if (this.location.path === '') {\n throw invalidRootOperation(name);\n }\n };\n return Reference;\n}());\n\n\n//# sourceMappingURL=reference.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/failrequest.js\n\n/**\n * A request whose promise always fails.\n * @struct\n * @template T\n */\nvar failrequest_FailRequest = /** @class */ (function () {\n function FailRequest(error) {\n this.promise_ = promise_external_reject(error);\n }\n /** @inheritDoc */\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n FailRequest.prototype.cancel = function (appDelete) {\n if (appDelete === void 0) { appDelete = false; }\n };\n return FailRequest;\n}());\n\n\n//# sourceMappingURL=failrequest.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/requestmap.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * @struct\n */\nvar requestmap_RequestMap = /** @class */ (function () {\n function RequestMap() {\n this.map_ = {};\n this.id_ = minSafeInteger;\n }\n /**\n * Registers the given request with this map.\n * The request is unregistered when it completes.\n * @param r The request to register.\n */\n RequestMap.prototype.addRequest = function (r) {\n var id = this.id_;\n this.id_++;\n this.map_[id] = r;\n var self = this;\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n };\n /**\n * Cancels all registered requests.\n */\n RequestMap.prototype.clear = function () {\n forEach(this.map_, function (key, val) {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n };\n return RequestMap;\n}());\n\n\n//# sourceMappingURL=requestmap.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/authwrapper.js\n\n\n\n\n\n\n\n/**\n * @param app If null, getAuthToken always resolves with null.\n * @param service The storage service associated with this auth wrapper.\n * Untyped to avoid circular type dependencies.\n * @struct\n */\nvar authwrapper_AuthWrapper = /** @class */ (function () {\n function AuthWrapper(app, maker, requestMaker, service, pool) {\n this.bucket_ = null;\n this.deleted_ = false;\n this.app_ = app;\n if (this.app_ !== null) {\n var options = this.app_.options;\n if (isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = defaultMaxUploadRetryTime;\n this.requestMap_ = new requestmap_RequestMap();\n }\n AuthWrapper.extractBucket_ = function (config) {\n var bucketString = config[configOption] || null;\n if (bucketString == null) {\n return null;\n }\n var loc = location_Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n };\n AuthWrapper.prototype.getAuthToken = function () {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (this.app_ !== null &&\n isDef(this.app_.INTERNAL) &&\n isDef(this.app_.INTERNAL.getToken)) {\n return this.app_.INTERNAL.getToken().then(function (response) {\n if (response !== null) {\n return response.accessToken;\n }\n else {\n return null;\n }\n }, function (_error) {\n return null;\n });\n }\n else {\n return promise_external_resolve(null);\n }\n };\n AuthWrapper.prototype.bucket = function () {\n if (this.deleted_) {\n throw appDeleted();\n }\n else {\n return this.bucket_;\n }\n };\n /**\n * The service associated with this auth wrapper. Untyped to avoid circular\n * type dependencies.\n */\n AuthWrapper.prototype.service = function () {\n return this.service_;\n };\n /**\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\n * at the given Location.\n * @param loc The Location.\n * @return Actually a firebaseStorage.Reference, typing not allowed\n * because of circular dependency problems.\n */\n AuthWrapper.prototype.makeStorageReference = function (loc) {\n return this.storageRefMaker_(this, loc);\n };\n AuthWrapper.prototype.makeRequest = function (requestInfo, authToken) {\n if (!this.deleted_) {\n var request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n }\n else {\n return new failrequest_FailRequest(appDeleted());\n }\n };\n /**\n * Stop running requests and prevent more from being created.\n */\n AuthWrapper.prototype.deleteApp = function () {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n };\n AuthWrapper.prototype.maxUploadRetryTime = function () {\n return this.maxUploadRetryTime_;\n };\n AuthWrapper.prototype.setMaxUploadRetryTime = function (time) {\n this.maxUploadRetryTime_ = time;\n };\n AuthWrapper.prototype.maxOperationRetryTime = function () {\n return this.maxOperationRetryTime_;\n };\n AuthWrapper.prototype.setMaxOperationRetryTime = function (time) {\n this.maxOperationRetryTime_ = time;\n };\n return AuthWrapper;\n}());\n\n\n//# sourceMappingURL=authwrapper.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/backoff.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @param f May be invoked\n * before the function returns.\n * @param callback Get all the arguments passed to the function\n * passed to f, including the initial boolean.\n */\nfunction start(f, callback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n function canceled() {\n return cancelState === 2;\n }\n var triggeredCallback = false;\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n function handler(success) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n var mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n var waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n }\n else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n var stopped = false;\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n }\n else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\n * Stops the retry loop from repeating.\n * If the function is currently \"in between\" retries, it is invoked immediately\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\n * after the current invocation finishes iff the current invocation would have\n * triggered another retry.\n */\nfunction stop(id) {\n id(false);\n}\n\n//# sourceMappingURL=backoff.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/implementation/request.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines methods used to actually send HTTP requests from\n * abstract representations.\n */\n\n\n\n\n\n\n\n\n\n/**\n * @struct\n * @template T\n */\nvar request_NetworkRequest = /** @class */ (function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n this.pendingXhr_ = null;\n this.backoffId_ = null;\n this.resolve_ = null;\n this.reject_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n var self = this;\n this.promise_ = make(function (resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n /**\n * Actually starts the retry loop.\n */\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n var xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr\n .send(self.url_, self.method_, self.body_, self.headers_)\n .then(function (xhr) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr;\n var hitServer = xhr.getErrorCode() === ErrorCode.NO_ERROR;\n var status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = xhr.getErrorCode() === ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n var successCode = array_contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n /**\n * @param requestWentThrough True if the request eventually went\n * through, false if it hit the retry limit or was canceled.\n */\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var xhr = status.xhr;\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(xhr, xhr.getResponseText());\n if (isJustDef(result)) {\n resolve(result);\n }\n else {\n resolve();\n }\n }\n catch (e) {\n reject(e);\n }\n }\n else {\n if (xhr !== null) {\n var err = unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n }\n else {\n reject(err);\n }\n }\n else {\n if (status.canceled) {\n var err = self.appDelete_\n ? appDeleted()\n : error_canceled();\n reject(err);\n }\n else {\n var err = retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n }\n else {\n this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n };\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429\n ];\n var isExtraRetryCode = array_contains(extraRetryCodes, status);\n var isRequestSpecificRetryCode = array_contains(this.additionalRetryCodes_, status);\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n return NetworkRequest;\n}());\n/**\n * A collection of information about the result of a network request.\n * @param opt_canceled Defaults to false.\n * @struct\n */\nvar RequestEndStatus = /** @class */ (function () {\n function RequestEndStatus(wasSuccessCode, xhr, opt_canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.xhr = xhr;\n this.canceled = !!opt_canceled;\n }\n return RequestEndStatus;\n}());\n\nfunction addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\nfunction addVersionHeader_(headers) {\n var number = typeof esm[\"default\"] !== 'undefined' ? esm[\"default\"].SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n/**\n * @template T\n */\nfunction makeRequest(requestInfo, authToken, pool) {\n var queryPart = makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new request_NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n\n//# sourceMappingURL=request.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/src/service.js\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n *\n * @struct\n */\nvar service_Service = /** @class */ (function () {\n function Service(app, pool, url) {\n this.bucket_ = null;\n function maker(authWrapper, loc) {\n return new reference_Reference(authWrapper, loc);\n }\n this.authWrapper_ = new authwrapper_AuthWrapper(app, maker, makeRequest, this, pool);\n this.app_ = app;\n if (url != null) {\n this.bucket_ = location_Location.makeFromBucketSpec(url);\n }\n else {\n var authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new location_Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new service_ServiceInternals(this);\n }\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n Service.prototype.ref = function (path) {\n function validator(path) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n validate('ref', [stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n var ref = new reference_Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n }\n else {\n return ref;\n }\n };\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n Service.prototype.refFromURL = function (url) {\n function validator(p) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n location_Location.makeFromUrl(p);\n }\n catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n validate('refFromURL', [stringSpec(validator, false)], arguments);\n return new reference_Reference(this.authWrapper_, url);\n };\n Object.defineProperty(Service.prototype, \"maxUploadRetryTime\", {\n get: function () {\n return this.authWrapper_.maxUploadRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxUploadRetryTime = function (time) {\n validate('setMaxUploadRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxUploadRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"maxOperationRetryTime\", {\n get: function () {\n return this.authWrapper_.maxOperationRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxOperationRetryTime = function (time) {\n validate('setMaxOperationRetryTime', [nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxOperationRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"app\", {\n get: function () {\n return this.app_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Service.prototype, \"INTERNAL\", {\n get: function () {\n return this.internals_;\n },\n enumerable: true,\n configurable: true\n });\n return Service;\n}());\n\n/**\n * @struct\n */\nvar service_ServiceInternals = /** @class */ (function () {\n function ServiceInternals(service) {\n this.service_ = service;\n }\n /**\n * Called when the associated app is deleted.\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\n */\n ServiceInternals.prototype.delete = function () {\n this.service_.authWrapper_.deleteApp();\n return promise_external_resolve(undefined);\n };\n return ServiceInternals;\n}());\n\n\n//# sourceMappingURL=service.js.map\n\n// CONCATENATED MODULE: ../storage/dist/esm/index.js\n/* harmony export (immutable) */ __webpack_exports__[\"registerStorage\"] = registerStorage;\n/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n/**\n * Type constant for Firebase Storage.\n */\nvar STORAGE_TYPE = 'storage';\nfunction factory(app, unused, opt_url) {\n return new service_Service(app, new xhriopool_XhrIoPool(), opt_url);\n}\nfunction registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: service_Service,\n Reference: reference_Reference\n };\n instance.INTERNAL.registerService(STORAGE_TYPE, factory, namespaceExports, undefined, \n // Allow multiple storage instances per app.\n true);\n}\nregisterStorage(esm[\"default\"]);\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ })\n\n},[118]);\n } catch(error) {\n throw new Error(\n 'Cannot instantiate firebase-storage.js - ' +\n 'be sure to load firebase-app.js first.'\n )\n }\n\n\n// WEBPACK FOOTER //\n// firebase-storage.js","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nrequire('@firebase/storage');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./storage/index.js\n// module id = 118\n// module chunks = 2","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { configOption } from './constants';\nvar FirebaseStorageError = /** @class */ (function () {\n function FirebaseStorageError(code, message) {\n this.code_ = prependCode(code);\n this.message_ = 'Firebase Storage: ' + message;\n this.serverResponse_ = null;\n this.name_ = 'FirebaseError';\n }\n FirebaseStorageError.prototype.codeProp = function () {\n return this.code;\n };\n FirebaseStorageError.prototype.codeEquals = function (code) {\n return prependCode(code) === this.codeProp();\n };\n FirebaseStorageError.prototype.serverResponseProp = function () {\n return this.serverResponse_;\n };\n FirebaseStorageError.prototype.setServerResponseProp = function (serverResponse) {\n this.serverResponse_ = serverResponse;\n };\n Object.defineProperty(FirebaseStorageError.prototype, \"name\", {\n get: function () {\n return this.name_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"code\", {\n get: function () {\n return this.code_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"message\", {\n get: function () {\n return this.message_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n get: function () {\n return this.serverResponse_;\n },\n enumerable: true,\n configurable: true\n });\n return FirebaseStorageError;\n}());\nexport { FirebaseStorageError };\nexport var errors = {};\nexport var Code = {\n // Shared between all platforms\n UNKNOWN: 'unknown',\n OBJECT_NOT_FOUND: 'object-not-found',\n BUCKET_NOT_FOUND: 'bucket-not-found',\n PROJECT_NOT_FOUND: 'project-not-found',\n QUOTA_EXCEEDED: 'quota-exceeded',\n UNAUTHENTICATED: 'unauthenticated',\n UNAUTHORIZED: 'unauthorized',\n RETRY_LIMIT_EXCEEDED: 'retry-limit-exceeded',\n INVALID_CHECKSUM: 'invalid-checksum',\n CANCELED: 'canceled',\n // JS specific\n INVALID_EVENT_NAME: 'invalid-event-name',\n INVALID_URL: 'invalid-url',\n INVALID_DEFAULT_BUCKET: 'invalid-default-bucket',\n NO_DEFAULT_BUCKET: 'no-default-bucket',\n CANNOT_SLICE_BLOB: 'cannot-slice-blob',\n SERVER_FILE_WRONG_SIZE: 'server-file-wrong-size',\n NO_DOWNLOAD_URL: 'no-download-url',\n INVALID_ARGUMENT: 'invalid-argument',\n INVALID_ARGUMENT_COUNT: 'invalid-argument-count',\n APP_DELETED: 'app-deleted',\n INVALID_ROOT_OPERATION: 'invalid-root-operation',\n INVALID_FORMAT: 'invalid-format',\n INTERNAL_ERROR: 'internal-error'\n};\nexport function prependCode(code) {\n return 'storage/' + code;\n}\nexport function unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' +\n 'server response.';\n return new FirebaseStorageError(Code.UNKNOWN, message);\n}\nexport function objectNotFound(path) {\n return new FirebaseStorageError(Code.OBJECT_NOT_FOUND, \"Object '\" + path + \"' does not exist.\");\n}\nexport function bucketNotFound(bucket) {\n return new FirebaseStorageError(Code.BUCKET_NOT_FOUND, \"Bucket '\" + bucket + \"' does not exist.\");\n}\nexport function projectNotFound(project) {\n return new FirebaseStorageError(Code.PROJECT_NOT_FOUND, \"Project '\" + project + \"' does not exist.\");\n}\nexport function quotaExceeded(bucket) {\n return new FirebaseStorageError(Code.QUOTA_EXCEEDED, \"Quota for bucket '\" +\n bucket +\n \"' exceeded, please view quota on \" +\n 'https://firebase.google.com/pricing/.');\n}\nexport function unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' +\n 'Authentication and try again.';\n return new FirebaseStorageError(Code.UNAUTHENTICATED, message);\n}\nexport function unauthorized(path) {\n return new FirebaseStorageError(Code.UNAUTHORIZED, \"User does not have permission to access '\" + path + \"'.\");\n}\nexport function retryLimitExceeded() {\n return new FirebaseStorageError(Code.RETRY_LIMIT_EXCEEDED, 'Max retry time for operation exceeded, please try again.');\n}\nexport function invalidChecksum(path, checksum, calculated) {\n return new FirebaseStorageError(Code.INVALID_CHECKSUM, \"Uploaded/downloaded object '\" +\n path +\n \"' has checksum '\" +\n checksum +\n \"' which does not match '\" +\n calculated +\n \"'. Please retry the upload/download.\");\n}\nexport function canceled() {\n return new FirebaseStorageError(Code.CANCELED, 'User canceled the upload/download.');\n}\nexport function invalidEventName(name) {\n return new FirebaseStorageError(Code.INVALID_EVENT_NAME, \"Invalid event name '\" + name + \"'.\");\n}\nexport function invalidUrl(url) {\n return new FirebaseStorageError(Code.INVALID_URL, \"Invalid URL '\" + url + \"'.\");\n}\nexport function invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(Code.INVALID_DEFAULT_BUCKET, \"Invalid default bucket '\" + bucket + \"'.\");\n}\nexport function noDefaultBucket() {\n return new FirebaseStorageError(Code.NO_DEFAULT_BUCKET, 'No default bucket ' +\n \"found. Did you set the '\" +\n configOption +\n \"' property when initializing the app?\");\n}\nexport function cannotSliceBlob() {\n return new FirebaseStorageError(Code.CANNOT_SLICE_BLOB, 'Cannot slice blob for upload. Please retry the upload.');\n}\nexport function serverFileWrongSize() {\n return new FirebaseStorageError(Code.SERVER_FILE_WRONG_SIZE, 'Server recorded incorrect upload file size, please retry the upload.');\n}\nexport function noDownloadURL() {\n return new FirebaseStorageError(Code.NO_DOWNLOAD_URL, 'The given file does not have any download URLs.');\n}\nexport function invalidArgument(index, fnName, message) {\n return new FirebaseStorageError(Code.INVALID_ARGUMENT, 'Invalid argument in `' + fnName + '` at index ' + index + ': ' + message);\n}\nexport function invalidArgumentCount(argMin, argMax, fnName, real) {\n var countPart;\n var plural;\n if (argMin === argMax) {\n countPart = argMin;\n plural = argMin === 1 ? 'argument' : 'arguments';\n }\n else {\n countPart = 'between ' + argMin + ' and ' + argMax;\n plural = 'arguments';\n }\n return new FirebaseStorageError(Code.INVALID_ARGUMENT_COUNT, 'Invalid argument count in `' +\n fnName +\n '`: Expected ' +\n countPart +\n ' ' +\n plural +\n ', received ' +\n real +\n '.');\n}\nexport function appDeleted() {\n return new FirebaseStorageError(Code.APP_DELETED, 'The Firebase app was deleted.');\n}\n/**\n * @param name The name of the operation that was invalid.\n */\nexport function invalidRootOperation(name) {\n return new FirebaseStorageError(Code.INVALID_ROOT_OPERATION, \"The operation '\" +\n name +\n \"' cannot be performed on a root reference, create a non-root \" +\n \"reference using child, such as .child('file.png').\");\n}\n/**\n * @param format The format that was not valid.\n * @param message A message describing the format violation.\n */\nexport function invalidFormat(format, message) {\n return new FirebaseStorageError(Code.INVALID_FORMAT, \"String does not match format '\" + format + \"': \" + message);\n}\n/**\n * @param message A message describing the internal error.\n */\nexport function internalError(message) {\n throw new FirebaseStorageError(Code.INTERNAL_ERROR, 'Internal error: ' + message);\n}\n\n//# sourceMappingURL=error.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/error.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as errorsExports from './error';\nexport var StringFormat = {\n RAW: 'raw',\n BASE64: 'base64',\n BASE64URL: 'base64url',\n DATA_URL: 'data_url'\n};\nexport function formatValidator(stringFormat) {\n switch (stringFormat) {\n case StringFormat.RAW:\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n case StringFormat.DATA_URL:\n return;\n default:\n throw 'Expected one of the event types: [' +\n StringFormat.RAW +\n ', ' +\n StringFormat.BASE64 +\n ', ' +\n StringFormat.BASE64URL +\n ', ' +\n StringFormat.DATA_URL +\n '].';\n }\n}\n/**\n * @struct\n */\nvar StringData = /** @class */ (function () {\n function StringData(data, opt_contentType) {\n this.data = data;\n this.contentType = opt_contentType || null;\n }\n return StringData;\n}());\nexport { StringData };\nexport function dataFromString(format, string) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(string));\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, string));\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(string), dataURLContentType_(string));\n }\n // assert(false);\n throw errorsExports.unknown();\n}\nexport function utf8Bytes_(string) {\n var b = [];\n for (var i = 0; i < string.length; i++) {\n var c = string.charCodeAt(i);\n if (c <= 127) {\n b.push(c);\n }\n else {\n if (c <= 2047) {\n b.push(192 | (c >> 6), 128 | (c & 63));\n }\n else {\n if ((c & 64512) == 55296) {\n // The start of a surrogate pair.\n var valid = i < string.length - 1 &&\n (string.charCodeAt(i + 1) & 64512) == 56320;\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n }\n else {\n var hi = c;\n var lo = string.charCodeAt(++i);\n c = 65536 | ((hi & 1023) << 10) | (lo & 1023);\n b.push(240 | (c >> 18), 128 | ((c >> 12) & 63), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n else {\n if ((c & 64512) == 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n }\n else {\n b.push(224 | (c >> 12), 128 | ((c >> 6) & 63), 128 | (c & 63));\n }\n }\n }\n }\n }\n return new Uint8Array(b);\n}\nexport function percentEncodedBytes_(string) {\n var decoded;\n try {\n decoded = decodeURIComponent(string);\n }\n catch (e) {\n throw errorsExports.invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n return utf8Bytes_(decoded);\n}\nexport function base64Bytes_(format, string) {\n switch (format) {\n case StringFormat.BASE64: {\n var hasMinus = string.indexOf('-') !== -1;\n var hasUnder = string.indexOf('_') !== -1;\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw errorsExports.invalidFormat(format, \"Invalid character '\" +\n invalidChar +\n \"' found: is it base64url encoded?\");\n }\n break;\n }\n case StringFormat.BASE64URL: {\n var hasPlus = string.indexOf('+') !== -1;\n var hasSlash = string.indexOf('/') !== -1;\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw errorsExports.invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n string = string.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n }\n var bytes;\n try {\n bytes = atob(string);\n }\n catch (e) {\n throw errorsExports.invalidFormat(format, 'Invalid character found');\n }\n var array = new Uint8Array(bytes.length);\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n return array;\n}\n/**\n * @struct\n */\nvar DataURLParts = /** @class */ (function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n if (matches === null) {\n throw errorsExports.invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n var middle = matches[1] || null;\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64\n ? middle.substring(0, middle.length - ';base64'.length)\n : middle;\n }\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n return DataURLParts;\n}());\nexport function dataURLBytes_(string) {\n var parts = new DataURLParts(string);\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n }\n else {\n return percentEncodedBytes_(parts.rest);\n }\n}\nexport function dataURLContentType_(string) {\n var parts = new DataURLParts(string);\n return parts.contentType;\n}\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n if (!longEnough) {\n return false;\n }\n return s.substring(s.length - end.length) === end;\n}\n\n//# sourceMappingURL=string.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/string.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var TaskEvent = {\n /** Triggered whenever the task changes or progress is updated. */\n STATE_CHANGED: 'state_changed'\n};\nexport var InternalTaskState = {\n RUNNING: 'running',\n PAUSING: 'pausing',\n PAUSED: 'paused',\n SUCCESS: 'success',\n CANCELING: 'canceling',\n CANCELED: 'canceled',\n ERROR: 'error'\n};\nexport var TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n /** The task was paused by the user. */\n PAUSED: 'paused',\n /** The task completed successfully. */\n SUCCESS: 'success',\n /** The task was canceled. */\n CANCELED: 'canceled',\n /** The task failed with an error. */\n ERROR: 'error'\n};\nexport function taskStateFromInternalTaskState(state) {\n switch (state) {\n case InternalTaskState.RUNNING:\n case InternalTaskState.PAUSING:\n case InternalTaskState.CANCELING:\n return TaskState.RUNNING;\n case InternalTaskState.PAUSED:\n return TaskState.PAUSED;\n case InternalTaskState.SUCCESS:\n return TaskState.SUCCESS;\n case InternalTaskState.CANCELED:\n return TaskState.CANCELED;\n case InternalTaskState.ERROR:\n return TaskState.ERROR;\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n\n//# sourceMappingURL=taskenums.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/taskenums.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains methods for working with objects.\n */\nexport function contains(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nexport function forEach(obj, f) {\n for (var key in obj) {\n if (contains(obj, key)) {\n f(key, obj[key]);\n }\n }\n}\nexport function clone(obj) {\n if (obj == null) {\n return {};\n }\n var c = {};\n forEach(obj, function (key, val) {\n c[key] = val;\n });\n return c;\n}\n\n//# sourceMappingURL=object.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/object.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Implements the promise abstraction interface for external\n * (public SDK) packaging, which just passes through to the firebase-app impl.\n */\n/**\n * @template T\n * @param {function((function(T): void),\n * (function(!Error): void))} resolver\n */\nexport function make(resolver) {\n return new Promise(resolver);\n}\n/**\n * @template T\n */\nexport function resolve(value) {\n return Promise.resolve(value);\n}\nexport function reject(error) {\n return Promise.reject(error);\n}\n\n//# sourceMappingURL=promise_external.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/promise_external.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @return False if the object is undefined or null, true otherwise.\n */\nexport function isDef(p) {\n return p != null;\n}\nexport function isJustDef(p) {\n return p !== void 0;\n}\nexport function isFunction(p) {\n return typeof p === 'function';\n}\nexport function isObject(p) {\n return typeof p === 'object';\n}\nexport function isNonNullObject(p) {\n return isObject(p) && p !== null;\n}\nexport function isNonArrayObject(p) {\n return isObject(p) && !Array.isArray(p);\n}\nexport function isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\nexport function isNumber(p) {\n return typeof p === 'number' || p instanceof Number;\n}\nexport function isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\nexport function isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n\n//# sourceMappingURL=type.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/type.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as type from './type';\n/**\n * Returns the Object resulting from parsing the given JSON, or null if the\n * given string does not represent a JSON object.\n */\nexport function jsonObjectOrNull(s) {\n var obj;\n try {\n obj = JSON.parse(s);\n }\n catch (e) {\n return null;\n }\n if (type.isNonArrayObject(obj)) {\n return obj;\n }\n else {\n return null;\n }\n}\n\n//# sourceMappingURL=json.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/json.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Contains helper methods for manipulating paths.\n */\n/**\n * @return Null if the path is already at the root.\n */\nexport function parent(path) {\n if (path.length == 0) {\n return null;\n }\n var index = path.lastIndexOf('/');\n if (index === -1) {\n return '';\n }\n var newPath = path.slice(0, index);\n return newPath;\n}\nexport function child(path, childPath) {\n var canonicalChildPath = childPath\n .split('/')\n .filter(function (component) {\n return component.length > 0;\n })\n .join('/');\n if (path.length === 0) {\n return canonicalChildPath;\n }\n else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\n * Returns the last component of a path.\n * '/foo/bar' -> 'bar'\n * '/foo/bar/baz/' -> 'baz/'\n * '/a' -> 'a'\n */\nexport function lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n }\n else {\n return path.slice(index + 1);\n }\n}\n\n//# sourceMappingURL=path.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/path.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functions to create and manipulate URLs for the server API.\n */\nimport * as constants from './constants';\nimport * as object from './object';\nexport function makeNormalUrl(urlPart) {\n return constants.domainBase + constants.apiBaseUrl + urlPart;\n}\nexport function makeDownloadUrl(urlPart) {\n return constants.downloadBase + constants.apiBaseUrl + urlPart;\n}\nexport function makeUploadUrl(urlPart) {\n return constants.domainBase + constants.apiUploadBaseUrl + urlPart;\n}\nexport function makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n object.forEach(params, function (key, val) {\n var nextPart = encode(key) + '=' + encode(val);\n queryPart = queryPart + nextPart + '&';\n });\n // Chop off the extra '&' or '?' on the end\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n\n//# sourceMappingURL=url.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/url.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as json from './json';\nimport { Location } from './location';\nimport * as path from './path';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nexport function noXform_(metadata, value) {\n return value;\n}\n/**\n * @struct\n */\nvar Mapping = /** @class */ (function () {\n function Mapping(server, opt_local, opt_writable, opt_xform) {\n this.server = server;\n this.local = opt_local || server;\n this.writable = !!opt_writable;\n this.xform = opt_xform || noXform_;\n }\n return Mapping;\n}());\nexport { Mapping };\nvar mappings_ = null;\nexport function xformPath(fullPath) {\n var valid = type.isString(fullPath);\n if (!valid || fullPath.length < 2) {\n return fullPath;\n }\n else {\n fullPath = fullPath;\n return path.lastComponent(fullPath);\n }\n}\nexport function getMappings() {\n if (mappings_) {\n return mappings_;\n }\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n function mappingsXformPath(metadata, fullPath) {\n return xformPath(fullPath);\n }\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\n * Coerces the second param to a number, if it is defined.\n */\n function xformSize(metadata, size) {\n if (type.isDef(size)) {\n return +size;\n }\n else {\n return size;\n }\n }\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n /**\n * Transforms a comma-separated string of tokens into a list of download\n * URLs.\n */\n function xformTokens(metadata, tokens) {\n var valid = type.isString(tokens) && tokens.length > 0;\n if (!valid) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return [];\n }\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = UrlUtils.makeDownloadUrl(urlPart);\n var queryString = UrlUtils.makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls;\n }\n mappings.push(new Mapping('downloadTokens', 'downloadURLs', false, xformTokens));\n mappings_ = mappings;\n return mappings_;\n}\nexport function addRef(metadata, authWrapper) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new Location(bucket, path);\n return authWrapper.makeStorageReference(loc);\n }\n Object.defineProperty(metadata, 'ref', { get: generateRef });\n}\nexport function fromResource(authWrapper, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n addRef(metadata, authWrapper);\n return metadata;\n}\nexport function fromResourceString(authWrapper, resourceString, mappings) {\n var obj = json.jsonObjectOrNull(resourceString);\n if (obj === null) {\n return null;\n }\n var resource = obj;\n return fromResource(authWrapper, resource, mappings);\n}\nexport function toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n return JSON.stringify(resource);\n}\nexport function metadataValidator(p) {\n var validType = p && type.isObject(p);\n if (!validType) {\n throw 'Expected Metadata object.';\n }\n for (var key in p) {\n var val = p[key];\n if (key === 'customMetadata') {\n if (!type.isObject(val)) {\n throw 'Expected object for \\'customMetadata\\' mapping.';\n }\n }\n else {\n if (type.isNonNullObject(val)) {\n throw \"Mapping for '\" + key + \"' cannot be an object.\";\n }\n }\n }\n}\n\n//# sourceMappingURL=metadata.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/metadata.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as errorsExports from './error';\nimport * as MetadataUtils from './metadata';\nimport * as type from './type';\n/**\n * @param name Name of the function.\n * @param specs Argument specs.\n * @param passed The actual arguments passed to the function.\n * @throws {fbs.Error} If the arguments are invalid.\n */\nexport function validate(name, specs, passed) {\n var minArgs = specs.length;\n var maxArgs = specs.length;\n for (var i = 0; i < specs.length; i++) {\n if (specs[i].optional) {\n minArgs = i;\n break;\n }\n }\n var validLength = minArgs <= passed.length && passed.length <= maxArgs;\n if (!validLength) {\n throw errorsExports.invalidArgumentCount(minArgs, maxArgs, name, passed.length);\n }\n for (var i = 0; i < passed.length; i++) {\n try {\n specs[i].validator(passed[i]);\n }\n catch (e) {\n if (e instanceof Error) {\n throw errorsExports.invalidArgument(i, name, e.message);\n }\n else {\n throw errorsExports.invalidArgument(i, name, e);\n }\n }\n }\n}\n/**\n * @struct\n */\nvar ArgSpec = /** @class */ (function () {\n function ArgSpec(validator, opt_optional) {\n var self = this;\n this.validator = function (p) {\n if (self.optional && !type.isJustDef(p)) {\n return;\n }\n validator(p);\n };\n this.optional = !!opt_optional;\n }\n return ArgSpec;\n}());\nexport { ArgSpec };\nexport function and_(v1, v2) {\n return function (p) {\n v1(p);\n v2(p);\n };\n}\nexport function stringSpec(opt_validator, opt_optional) {\n function stringValidator(p) {\n if (!type.isString(p)) {\n throw 'Expected string.';\n }\n }\n var validator;\n if (opt_validator) {\n validator = and_(stringValidator, opt_validator);\n }\n else {\n validator = stringValidator;\n }\n return new ArgSpec(validator, opt_optional);\n}\nexport function uploadDataSpec() {\n function validator(p) {\n var valid = p instanceof Uint8Array ||\n p instanceof ArrayBuffer ||\n (type.isNativeBlobDefined() && p instanceof Blob);\n if (!valid) {\n throw 'Expected Blob or File.';\n }\n }\n return new ArgSpec(validator);\n}\nexport function metadataSpec(opt_optional) {\n return new ArgSpec(MetadataUtils.metadataValidator, opt_optional);\n}\nexport function nonNegativeNumberSpec() {\n function validator(p) {\n var valid = type.isNumber(p) && p >= 0;\n if (!valid) {\n throw 'Expected a number 0 or greater.';\n }\n }\n return new ArgSpec(validator);\n}\nexport function looseObjectSpec(opt_validator, opt_optional) {\n function validator(p) {\n var isLooseObject = p === null || (type.isDef(p) && p instanceof Object);\n if (!isLooseObject) {\n throw 'Expected an Object.';\n }\n if (opt_validator !== undefined && opt_validator !== null) {\n opt_validator(p);\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\nexport function nullFunctionSpec(opt_optional) {\n function validator(p) {\n var valid = p === null || type.isFunction(p);\n if (!valid) {\n throw 'Expected a Function.';\n }\n }\n return new ArgSpec(validator, opt_optional);\n}\n\n//# sourceMappingURL=args.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/args.js\n// module id = null\n// module chunks = ","import * as type from './type';\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n }\n else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n }\n else {\n return undefined;\n }\n}\n/**\n * Concatenates one or more values together and converts them to a Blob.\n *\n * @param var_args The values that will make up the resulting blob.\n * @return The blob.\n */\nexport function getBlob() {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n var BlobBuilder = getBlobBuilder();\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n for (var i = 0; i < var_args.length; i++) {\n bb.append(var_args[i]);\n }\n return bb.getBlob();\n }\n else {\n if (type.isNativeBlobDefined()) {\n return new Blob(var_args);\n }\n else {\n throw Error(\"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\n * Slices the blob. The returned blob contains data from the start byte\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\n *\n * @param blob The blob to be sliced.\n * @param start Index of the starting byte.\n * @param end Index of the ending byte.\n * @return The blob slice or null if not supported.\n */\nexport function sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n }\n else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n }\n else if (blob.slice) {\n return blob.slice(start, end);\n }\n return null;\n}\n\n//# sourceMappingURL=fs.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/fs.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns true if the object is contained in the array (compared with ===).\n * @template T\n */\nexport function contains(array, elem) {\n return array.indexOf(elem) !== -1;\n}\n/**\n * Returns a shallow copy of the array or array-like object (e.g. arguments).\n * @template T\n */\nexport function clone(arraylike) {\n return Array.prototype.slice.call(arraylike);\n}\n/**\n * Removes the given element from the given array, if it is contained.\n * Directly modifies the passed-in array.\n * @template T\n */\nexport function remove(array, elem) {\n var i = array.indexOf(elem);\n if (i !== -1) {\n array.splice(i, 1);\n }\n}\n\n//# sourceMappingURL=array.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/array.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as array from './array';\nimport { FbsBlob } from './blob';\nimport * as errorsExports from './error';\nimport * as MetadataUtils from './metadata';\nimport * as object from './object';\nimport { RequestInfo } from './requestinfo';\nimport * as type from './type';\nimport * as UrlUtils from './url';\n/**\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\n */\nexport function handlerCheck(cndn) {\n if (!cndn) {\n throw errorsExports.unknown();\n }\n}\nexport function metadataHandler(authWrapper, mappings) {\n function handler(xhr, text) {\n var metadata = MetadataUtils.fromResourceString(authWrapper, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n return handler;\n}\nexport function sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n if (xhr.getStatus() === 401) {\n newErr = errorsExports.unauthenticated();\n }\n else {\n if (xhr.getStatus() === 402) {\n newErr = errorsExports.quotaExceeded(location.bucket);\n }\n else {\n if (xhr.getStatus() === 403) {\n newErr = errorsExports.unauthorized(location.path);\n }\n else {\n newErr = err;\n }\n }\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nexport function objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n if (xhr.getStatus() === 404) {\n newErr = errorsExports.objectNotFound(location.path);\n }\n newErr.setServerResponseProp(err.serverResponseProp());\n return newErr;\n }\n return errorHandler;\n}\nexport function getMetadata(authWrapper, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = UrlUtils.makeNormalUrl(urlPart);\n var method = 'GET';\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nexport function updateMetadata(authWrapper, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = UrlUtils.makeNormalUrl(urlPart);\n var method = 'PATCH';\n var body = MetadataUtils.toResourceString(metadata, mappings);\n var headers = { 'Content-Type': 'application/json; charset=utf-8' };\n var timeout = authWrapper.maxOperationRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nexport function deleteObject(authWrapper, location) {\n var urlPart = location.fullServerUrl();\n var url = UrlUtils.makeNormalUrl(urlPart);\n var method = 'DELETE';\n var timeout = authWrapper.maxOperationRetryTime();\n function handler(xhr, text) { }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\nexport function determineContentType_(metadata, blob) {\n return ((metadata && metadata['contentType']) ||\n (blob && blob.type()) ||\n 'application/octet-stream');\n}\nexport function metadataForUpload_(location, blob, opt_metadata) {\n var metadata = object.clone(opt_metadata);\n metadata['fullPath'] = location.path;\n metadata['size'] = blob.size();\n if (!metadata['contentType']) {\n metadata['contentType'] = determineContentType_(null, blob);\n }\n return metadata;\n}\nexport function multipartUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n function genBoundary() {\n var str = '';\n for (var i = 0; i < 2; i++) {\n str =\n str +\n Math.random()\n .toString()\n .slice(2);\n }\n return str;\n }\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var metadataString = MetadataUtils.toResourceString(metadata, mappings);\n var preBlobPart = '--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' +\n metadataString +\n '\\r\\n--' +\n boundary +\n '\\r\\n' +\n 'Content-Type: ' +\n metadata['contentType'] +\n '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n var urlParams = { name: metadata['fullPath'] };\n var url = UrlUtils.makeUploadUrl(urlPart);\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, metadataHandler(authWrapper, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param current The number of bytes that have been uploaded so far.\n * @param total The total number of bytes in the upload.\n * @param opt_finalized True if the server has finished the upload.\n * @param opt_metadata The upload metadata, should\n * only be passed if opt_finalized is true.\n * @struct\n */\nvar ResumableUploadStatus = /** @class */ (function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n return ResumableUploadStatus;\n}());\nexport { ResumableUploadStatus };\nexport function checkResumeHeader_(xhr, opt_allowed) {\n var status;\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n }\n catch (e) {\n handlerCheck(false);\n }\n var allowed = opt_allowed || ['active'];\n handlerCheck(array.contains(allowed, status));\n return status;\n}\nexport function createResumableUpload(authWrapper, location, mappings, blob, opt_metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadata = metadataForUpload_(location, blob, opt_metadata);\n var urlParams = { name: metadata['fullPath'] };\n var url = UrlUtils.makeUploadUrl(urlPart);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadata['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = MetadataUtils.toResourceString(metadata, mappings);\n var timeout = authWrapper.maxUploadRetryTime();\n function handler(xhr, text) {\n checkResumeHeader_(xhr);\n var url;\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n }\n catch (e) {\n handlerCheck(false);\n }\n handlerCheck(type.isString(url));\n return url;\n }\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n */\nexport function getResumableUploadStatus(authWrapper, location, url, blob) {\n var headers = { 'X-Goog-Upload-Command': 'query' };\n function handler(xhr, text) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString;\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n }\n catch (e) {\n handlerCheck(false);\n }\n var size = parseInt(sizeString, 10);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\n * Any uploads via the resumable upload API must transfer a number of bytes\n * that is a multiple of this number.\n */\nexport var resumableUploadChunkSize = 256 * 1024;\n/**\n * @param url From a call to fbs.requests.createResumableUpload.\n * @param chunkSize Number of bytes to upload.\n * @param opt_status The previous status.\n * If not passed or null, we start from the beginning.\n * @throws fbs.Error If the upload is already complete, the passed in status\n * has a final size inconsistent with the blob, or the blob cannot be sliced\n * for upload.\n */\nexport function continueResumableUpload(location, authWrapper, url, blob, chunkSize, mappings, opt_status, opt_progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status = new ResumableUploadStatus(0, 0);\n if (opt_status) {\n status.current = opt_status.current;\n status.total = opt_status.total;\n }\n else {\n status.current = 0;\n status.total = blob.size();\n }\n if (blob.size() !== status.total) {\n throw errorsExports.serverFileWrongSize();\n }\n var bytesLeft = status.total - status.current;\n var bytesToUpload = bytesLeft;\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n var startByte = status.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': status.current\n };\n var body = blob.slice(startByte, endByte);\n if (body === null) {\n throw errorsExports.cannotSliceBlob();\n }\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n if (uploadStatus === 'final') {\n metadata = metadataHandler(authWrapper, mappings)(xhr, text);\n }\n else {\n metadata = null;\n }\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n var method = 'POST';\n var timeout = authWrapper.maxUploadRetryTime();\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = opt_progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\n//# sourceMappingURL=requests.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/requests.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Method for invoking a callback asynchronously.\n */\nimport * as promiseimpl from './promise_external';\n/**\n * Returns a function that invokes f with its arguments asynchronously as a\n * microtask, i.e. as soon as possible after the current script returns back\n * into browser code.\n */\nexport function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n promiseimpl.resolve(true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}\n\n//# sourceMappingURL=async.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/async.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @param f May be invoked\n * before the function returns.\n * @param callback Get all the arguments passed to the function\n * passed to f, including the initial boolean.\n */\nexport function start(f, callback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1;\n // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n function canceled() {\n return cancelState === 2;\n }\n var triggeredCallback = false;\n function triggerCallback() {\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, arguments);\n }\n }\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n function handler(success) {\n var var_args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n var_args[_i - 1] = arguments[_i];\n }\n if (triggeredCallback) {\n return;\n }\n if (success) {\n triggerCallback.apply(null, arguments);\n return;\n }\n var mustStop = canceled() || hitTimeout;\n if (mustStop) {\n triggerCallback.apply(null, arguments);\n return;\n }\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n var waitMillis;\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n }\n else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n callWithDelay(waitMillis);\n }\n var stopped = false;\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n stopped = true;\n if (triggeredCallback) {\n return;\n }\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n clearTimeout(timeoutId);\n callWithDelay(0);\n }\n else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\n * Stops the retry loop from repeating.\n * If the function is currently \"in between\" retries, it is invoked immediately\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\n * after the current invocation finishes iff the current invocation would have\n * triggered another retry.\n */\nexport function stop(id) {\n id(false);\n}\n\n//# sourceMappingURL=backoff.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/backoff.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines methods used to actually send HTTP requests from\n * abstract representations.\n */\nimport firebase from '@firebase/app';\nimport * as array from './array';\nimport * as backoff from './backoff';\nimport * as errorsExports from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport * as type from './type';\nimport * as UrlUtils from './url';\nimport * as XhrIoExports from './xhrio';\n/**\n * @struct\n * @template T\n */\nvar NetworkRequest = /** @class */ (function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n this.pendingXhr_ = null;\n this.backoffId_ = null;\n this.resolve_ = null;\n this.reject_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n var self = this;\n this.promise_ = promiseimpl.make(function (resolve, reject) {\n self.resolve_ = resolve;\n self.reject_ = reject;\n self.start_();\n });\n }\n /**\n * Actually starts the retry loop.\n */\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n var xhr = self.pool_.createXhrIo();\n self.pendingXhr_ = xhr;\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n if (self.progressCallback_ !== null) {\n xhr.addUploadProgressListener(progressListener);\n }\n xhr\n .send(self.url_, self.method_, self.body_, self.headers_)\n .then(function (xhr) {\n if (self.progressCallback_ !== null) {\n xhr.removeUploadProgressListener(progressListener);\n }\n self.pendingXhr_ = null;\n xhr = xhr;\n var hitServer = xhr.getErrorCode() === XhrIoExports.ErrorCode.NO_ERROR;\n var status = xhr.getStatus();\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = xhr.getErrorCode() === XhrIoExports.ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n var successCode = array.contains(self.successCodes_, status);\n backoffCallback(true, new RequestEndStatus(successCode, xhr));\n });\n }\n /**\n * @param requestWentThrough True if the request eventually went\n * through, false if it hit the retry limit or was canceled.\n */\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var xhr = status.xhr;\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(xhr, xhr.getResponseText());\n if (type.isJustDef(result)) {\n resolve(result);\n }\n else {\n resolve();\n }\n }\n catch (e) {\n reject(e);\n }\n }\n else {\n if (xhr !== null) {\n var err = errorsExports.unknown();\n err.setServerResponseProp(xhr.getResponseText());\n if (self.errorCallback_) {\n reject(self.errorCallback_(xhr, err));\n }\n else {\n reject(err);\n }\n }\n else {\n if (status.canceled) {\n var err = self.appDelete_\n ? errorsExports.appDeleted()\n : errorsExports.canceled();\n reject(err);\n }\n else {\n var err = errorsExports.retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n }\n else {\n this.backoffId_ = backoff.start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n if (this.backoffId_ !== null) {\n backoff.stop(this.backoffId_);\n }\n if (this.pendingXhr_ !== null) {\n this.pendingXhr_.abort();\n }\n };\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [\n // Request Timeout: web server didn't receive full request in time.\n 408,\n // Too Many Requests: you're getting rate-limited, basically.\n 429\n ];\n var isExtraRetryCode = array.contains(extraRetryCodes, status);\n var isRequestSpecificRetryCode = array.contains(this.additionalRetryCodes_, status);\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n return NetworkRequest;\n}());\n/**\n * A collection of information about the result of a network request.\n * @param opt_canceled Defaults to false.\n * @struct\n */\nvar RequestEndStatus = /** @class */ (function () {\n function RequestEndStatus(wasSuccessCode, xhr, opt_canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.xhr = xhr;\n this.canceled = !!opt_canceled;\n }\n return RequestEndStatus;\n}());\nexport { RequestEndStatus };\nexport function addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\nexport function addVersionHeader_(headers) {\n var number = typeof firebase !== 'undefined' ? firebase.SDK_VERSION : 'AppManager';\n headers['X-Firebase-Storage-Version'] = 'webjs/' + number;\n}\n/**\n * @template T\n */\nexport function makeRequest(requestInfo, authToken, pool) {\n var queryPart = UrlUtils.makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = object.clone(requestInfo.headers);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers);\n return new NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n\n//# sourceMappingURL=request.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/request.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport firebase from '@firebase/app';\nimport { StringFormat } from './src/implementation/string';\nimport { TaskEvent } from './src/implementation/taskenums';\nimport { TaskState } from './src/implementation/taskenums';\nimport { XhrIoPool } from './src/implementation/xhriopool';\nimport { Reference } from './src/reference';\nimport { Service } from './src/service';\n/**\n * Type constant for Firebase Storage.\n */\nvar STORAGE_TYPE = 'storage';\nfunction factory(app, unused, opt_url) {\n return new Service(app, new XhrIoPool(), opt_url);\n}\nexport function registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: Service,\n Reference: Reference\n };\n instance.INTERNAL.registerService(STORAGE_TYPE, factory, namespaceExports, undefined, \n // Allow multiple storage instances per app.\n true);\n}\nregisterStorage(firebase);\n\n//# sourceMappingURL=index.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/index.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @enum{number}\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode = ErrorCode || (ErrorCode = {}));\n\n//# sourceMappingURL=xhrio.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/xhrio.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Constants used in the Firebase Storage library.\n */\n/**\n * Domain and scheme for API calls.\n */\nexport var domainBase = 'https://firebasestorage.googleapis.com';\n/**\n * Domain and scheme for object downloads.\n */\nexport var downloadBase = 'https://firebasestorage.googleapis.com';\n/**\n * Base URL for non-upload calls to the API.\n */\nexport var apiBaseUrl = '/v0';\n/**\n * Base URL for upload calls to the API.\n */\nexport var apiUploadBaseUrl = '/v0';\nexport function setDomainBase(domainBase) {\n domainBase = domainBase;\n}\nexport var configOption = 'storageBucket';\n/**\n * 1 minute\n */\nexport var shortMaxOperationRetryTime = 1 * 60 * 1000;\n/**\n * 2 minutes\n */\nexport var defaultMaxOperationRetryTime = 2 * 60 * 1000;\n/**\n * 10 minutes\n */\nexport var defaultMaxUploadRetryTime = 10 * 60 * 100;\n/**\n * This is the value of Number.MIN_SAFE_INTEGER, which is not well supported\n * enough for us to use it directly.\n */\nexport var minSafeInteger = -9007199254740991;\n\n//# sourceMappingURL=constants.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/constants.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as errorsExports from './error';\nimport * as object from './object';\nimport * as promiseimpl from './promise_external';\nimport * as type from './type';\nimport * as XhrIoExports from './xhrio';\n/**\n * We use this instead of goog.net.XhrIo because goog.net.XhrIo is hyuuuuge and\n * doesn't work in React Native on Android.\n */\nvar NetworkXhrIo = /** @class */ (function () {\n function NetworkXhrIo() {\n var _this = this;\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = XhrIoExports.ErrorCode.NO_ERROR;\n this.sendPromise_ = promiseimpl.make(function (resolve, reject) {\n _this.xhr_.addEventListener('abort', function (event) {\n _this.errorCode_ = XhrIoExports.ErrorCode.ABORT;\n resolve(_this);\n });\n _this.xhr_.addEventListener('error', function (event) {\n _this.errorCode_ = XhrIoExports.ErrorCode.NETWORK_ERROR;\n resolve(_this);\n });\n _this.xhr_.addEventListener('load', function (event) {\n resolve(_this);\n });\n });\n }\n /**\n * @override\n */\n NetworkXhrIo.prototype.send = function (url, method, opt_body, opt_headers) {\n var _this = this;\n if (this.sent_) {\n throw errorsExports.internalError('cannot .send() more than once');\n }\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n if (type.isDef(opt_headers)) {\n var headers = opt_headers;\n object.forEach(headers, function (key, val) {\n _this.xhr_.setRequestHeader(key, val.toString());\n });\n }\n if (type.isDef(opt_body)) {\n this.xhr_.send(opt_body);\n }\n else {\n this.xhr_.send();\n }\n return this.sendPromise_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getErrorCode() before sending');\n }\n return this.errorCode_;\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getStatus = function () {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getStatus() before sending');\n }\n try {\n return this.xhr_.status;\n }\n catch (e) {\n return -1;\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw errorsExports.internalError('cannot .getResponseText() before sending');\n }\n return this.xhr_.responseText;\n };\n /**\n * Aborts the request.\n * @override\n */\n NetworkXhrIo.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.addUploadProgressListener = function (listener) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\n * @override\n */\n NetworkXhrIo.prototype.removeUploadProgressListener = function (listener) {\n if (type.isDef(this.xhr_.upload)) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n return NetworkXhrIo;\n}());\nexport { NetworkXhrIo };\n\n//# sourceMappingURL=xhrio_network.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/xhrio_network.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NetworkXhrIo } from './xhrio_network';\n/**\n * Factory-like class for creating XhrIo instances.\n */\nvar XhrIoPool = /** @class */ (function () {\n function XhrIoPool() {\n }\n XhrIoPool.prototype.createXhrIo = function () {\n return new NetworkXhrIo();\n };\n return XhrIoPool;\n}());\nexport { XhrIoPool };\n\n//# sourceMappingURL=xhriopool.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/xhriopool.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Functionality related to the parsing/composition of bucket/\n * object location.\n */\nimport * as errorsExports from './error';\n/**\n * @struct\n */\nvar Location = /** @class */ (function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n Object.defineProperty(Location.prototype, \"path\", {\n get: function () {\n return this.path_;\n },\n enumerable: true,\n configurable: true\n });\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n Location.makeFromBucketSpec = function (bucketString) {\n var bucketLocation;\n try {\n bucketLocation = Location.makeFromUrl(bucketString);\n }\n catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n if (bucketLocation.path === '') {\n return bucketLocation;\n }\n else {\n throw errorsExports.invalidDefaultBucket(bucketString);\n }\n };\n Location.makeFromUrl = function (url) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-]+)';\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n var gsPath = '(/(.*))?$';\n var path = '(/([^?#]*).*)?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = { bucket: 1, path: 3 };\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n var version = 'v[A-Za-z0-9_]+';\n var httpRegex = new RegExp('^https?://firebasestorage\\\\.googleapis\\\\.com/' +\n version +\n '/b/' +\n bucketDomain +\n '/o' +\n path, 'i');\n var httpIndices = { bucket: 1, path: 3 };\n var groups = [\n { regex: gsRegex, indices: gsIndices, postModify: gsModify },\n { regex: httpRegex, indices: httpIndices, postModify: httpModify }\n ];\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n if (!pathValue) {\n pathValue = '';\n }\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n if (location == null) {\n throw errorsExports.invalidUrl(url);\n }\n return location;\n };\n return Location;\n}());\nexport { Location };\n\n//# sourceMappingURL=location.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/location.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file Provides a Blob-like wrapper for various binary types (including the\n * native Blob type). This makes it possible to upload types like ArrayBuffers,\n * making uploads possible in environments without the native Blob type.\n */\nimport * as fs from './fs';\nimport * as string from './string';\nimport { StringFormat } from './string';\nimport * as type from './type';\n/**\n * @param opt_elideCopy If true, doesn't copy mutable input data\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\n * modified after this blob's construction.\n */\nvar FbsBlob = /** @class */ (function () {\n function FbsBlob(data, opt_elideCopy) {\n var size = 0;\n var blobType = '';\n if (type.isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n }\n else if (data instanceof ArrayBuffer) {\n if (opt_elideCopy) {\n this.data_ = new Uint8Array(data);\n }\n else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n size = this.data_.length;\n }\n else if (data instanceof Uint8Array) {\n if (opt_elideCopy) {\n this.data_ = data;\n }\n else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n size = data.length;\n }\n this.size_ = size;\n this.type_ = blobType;\n }\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (type.isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = fs.sliceBlob(realBlob, startByte, endByte);\n if (sliced === null) {\n return null;\n }\n return new FbsBlob(sliced);\n }\n else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n FbsBlob.getBlob = function () {\n var var_args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n var_args[_i] = arguments[_i];\n }\n if (type.isNativeBlobDefined()) {\n var blobby = var_args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n }\n else {\n return val;\n }\n });\n return new FbsBlob(fs.getBlob.apply(null, blobby));\n }\n else {\n var uint8Arrays = var_args.map(function (val) {\n if (type.isString(val)) {\n return string.dataFromString(StringFormat.RAW, val).data;\n }\n else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n return FbsBlob;\n}());\nexport { FbsBlob };\n\n//# sourceMappingURL=blob.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/blob.js\n// module id = null\n// module chunks = ","var RequestInfo = /** @class */ (function () {\n function RequestInfo(url, method, \n /**\n * Returns the value with which to resolve the request's promise. Only called\n * if the request is successful. Throw from this function to reject the\n * returned Request's promise with the thrown error.\n * Note: The XhrIo passed to this function may be reused after this callback\n * returns. Do not keep a reference to it in any way.\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\n * Called with the current number of bytes uploaded and total size (-1 if not\n * computable) of the request body (i.e. used to report upload progress).\n */\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n return RequestInfo;\n}());\nexport { RequestInfo };\n\n//# sourceMappingURL=requestinfo.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/requestinfo.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as type from './type';\n/**\n * @struct\n */\nvar Observer = /** @class */ (function () {\n function Observer(nextOrObserver, opt_error, opt_complete) {\n var asFunctions = type.isFunction(nextOrObserver) ||\n type.isDef(opt_error) ||\n type.isDef(opt_complete);\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = opt_error || null;\n this.complete = opt_complete || null;\n }\n else {\n var observer = nextOrObserver;\n this.next = observer.next || null;\n this.error = observer.error || null;\n this.complete = observer.complete || null;\n }\n }\n return Observer;\n}());\nexport { Observer };\n\n//# sourceMappingURL=observer.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/observer.js\n// module id = null\n// module chunks = ","var UploadTaskSnapshot = /** @class */ (function () {\n function UploadTaskSnapshot(bytesTransferred, totalBytes, state, metadata, task, ref) {\n this.bytesTransferred = bytesTransferred;\n this.totalBytes = totalBytes;\n this.state = state;\n this.metadata = metadata;\n this.task = task;\n this.ref = ref;\n }\n Object.defineProperty(UploadTaskSnapshot.prototype, \"downloadURL\", {\n get: function () {\n if (this.metadata !== null) {\n var urls = this.metadata['downloadURLs'];\n if (urls != null && urls[0] != null) {\n return urls[0];\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n },\n enumerable: true,\n configurable: true\n });\n return UploadTaskSnapshot;\n}());\nexport { UploadTaskSnapshot };\n\n//# sourceMappingURL=tasksnapshot.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/tasksnapshot.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines types for interacting with blob transfer tasks.\n */\nimport { InternalTaskState } from './implementation/taskenums';\nimport { Observer } from './implementation/observer';\nimport { TaskEvent, TaskState } from './implementation/taskenums';\nimport { UploadTaskSnapshot } from './tasksnapshot';\nimport * as fbsArgs from './implementation/args';\nimport * as fbsArray from './implementation/array';\nimport { async as fbsAsync } from './implementation/async';\nimport * as errors from './implementation/error';\nimport * as fbsPromiseimpl from './implementation/promise_external';\nimport * as fbsRequests from './implementation/requests';\nimport * as fbsTaskEnums from './implementation/taskenums';\nimport * as typeUtils from './implementation/type';\n/**\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\n * upload and manage callbacks for various events.\n */\nvar UploadTask = /** @class */ (function () {\n /**\n * @param ref The firebaseStorage.Reference object this task came\n * from, untyped to avoid cyclic dependencies.\n * @param blob The blob to upload.\n */\n function UploadTask(ref, authWrapper, location, mappings, blob, metadata) {\n if (metadata === void 0) { metadata = null; }\n var _this = this;\n this.transferred_ = 0;\n this.needToFetchStatus_ = false;\n this.needToFetchMetadata_ = false;\n this.observers_ = [];\n this.error_ = null;\n this.uploadUrl_ = null;\n this.request_ = null;\n this.chunkMultiplier_ = 1;\n this.resolve_ = null;\n this.reject_ = null;\n this.ref_ = ref;\n this.authWrapper_ = authWrapper;\n this.location_ = location;\n this.blob_ = blob;\n this.metadata_ = metadata;\n this.mappings_ = mappings;\n this.resumable_ = this.shouldDoResumable_(this.blob_);\n this.state_ = InternalTaskState.RUNNING;\n this.errorHandler_ = function (error) {\n _this.request_ = null;\n _this.chunkMultiplier_ = 1;\n if (error.codeEquals(errors.Code.CANCELED)) {\n _this.needToFetchStatus_ = true;\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.metadataErrorHandler_ = function (error) {\n _this.request_ = null;\n if (error.codeEquals(errors.Code.CANCELED)) {\n _this.completeTransitions_();\n }\n else {\n _this.error_ = error;\n _this.transition_(InternalTaskState.ERROR);\n }\n };\n this.promise_ = fbsPromiseimpl.make(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n _this.start_();\n });\n // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n this.promise_.then(null, function () { });\n }\n UploadTask.prototype.makeProgressCallback_ = function () {\n var _this = this;\n var sizeBefore = this.transferred_;\n return function (loaded, total) {\n _this.updateProgress_(sizeBefore + loaded);\n };\n };\n UploadTask.prototype.shouldDoResumable_ = function (blob) {\n return blob.size() > 256 * 1024;\n };\n UploadTask.prototype.start_ = function () {\n if (this.state_ !== InternalTaskState.RUNNING) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n if (this.request_ !== null) {\n return;\n }\n if (this.resumable_) {\n if (this.uploadUrl_ === null) {\n this.createResumable_();\n }\n else {\n if (this.needToFetchStatus_) {\n this.fetchStatus_();\n }\n else {\n if (this.needToFetchMetadata_) {\n // Happens if we miss the metadata on upload completion.\n this.fetchMetadata_();\n }\n else {\n this.continueUpload_();\n }\n }\n }\n }\n else {\n this.oneShotUpload_();\n }\n };\n UploadTask.prototype.resolveToken_ = function (callback) {\n var _this = this;\n this.authWrapper_.getAuthToken().then(function (authToken) {\n switch (_this.state_) {\n case InternalTaskState.RUNNING:\n callback(authToken);\n break;\n case InternalTaskState.CANCELING:\n _this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.PAUSING:\n _this.transition_(InternalTaskState.PAUSED);\n break;\n default:\n }\n });\n };\n // TODO(andysoto): assert false\n UploadTask.prototype.createResumable_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.createResumableUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var createRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = createRequest;\n createRequest.getPromise().then(function (url) {\n _this.request_ = null;\n _this.uploadUrl_ = url;\n _this.needToFetchStatus_ = false;\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.fetchStatus_ = function () {\n var _this = this;\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.getResumableUploadStatus(_this.authWrapper_, _this.location_, url, _this.blob_);\n var statusRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this.request_ = null;\n _this.updateProgress_(status.current);\n _this.needToFetchStatus_ = false;\n if (status.finalized) {\n _this.needToFetchMetadata_ = true;\n }\n _this.completeTransitions_();\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.continueUpload_ = function () {\n var _this = this;\n var chunkSize = fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n var status = new fbsRequests.ResumableUploadStatus(this.transferred_, this.blob_.size());\n // TODO(andysoto): assert(this.uploadUrl_ !== null);\n var url = this.uploadUrl_;\n this.resolveToken_(function (authToken) {\n var requestInfo;\n try {\n requestInfo = fbsRequests.continueResumableUpload(_this.location_, _this.authWrapper_, url, _this.blob_, chunkSize, _this.mappings_, status, _this.makeProgressCallback_());\n }\n catch (e) {\n _this.error_ = e;\n _this.transition_(InternalTaskState.ERROR);\n return;\n }\n var uploadRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = uploadRequest;\n uploadRequest\n .getPromise()\n .then(function (newStatus) {\n _this.increaseMultiplier_();\n _this.request_ = null;\n _this.updateProgress_(newStatus.current);\n if (newStatus.finalized) {\n _this.metadata_ = newStatus.metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }\n else {\n _this.completeTransitions_();\n }\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.increaseMultiplier_ = function () {\n var currentSize = fbsRequests.resumableUploadChunkSize * this.chunkMultiplier_;\n // Max chunk size is 32M.\n if (currentSize < 32 * 1024 * 1024) {\n this.chunkMultiplier_ *= 2;\n }\n };\n UploadTask.prototype.fetchMetadata_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.getMetadata(_this.authWrapper_, _this.location_, _this.mappings_);\n var metadataRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.metadataErrorHandler_);\n });\n };\n UploadTask.prototype.oneShotUpload_ = function () {\n var _this = this;\n this.resolveToken_(function (authToken) {\n var requestInfo = fbsRequests.multipartUpload(_this.authWrapper_, _this.location_, _this.mappings_, _this.blob_, _this.metadata_);\n var multipartRequest = _this.authWrapper_.makeRequest(requestInfo, authToken);\n _this.request_ = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this.request_ = null;\n _this.metadata_ = metadata;\n _this.updateProgress_(_this.blob_.size());\n _this.transition_(InternalTaskState.SUCCESS);\n }, _this.errorHandler_);\n });\n };\n UploadTask.prototype.updateProgress_ = function (transferred) {\n var old = this.transferred_;\n this.transferred_ = transferred;\n // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n if (this.transferred_ !== old) {\n this.notifyObservers_();\n }\n };\n UploadTask.prototype.transition_ = function (state) {\n if (this.state_ === state) {\n return;\n }\n switch (state) {\n case InternalTaskState.CANCELING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.PAUSING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this.state_ = state;\n if (this.request_ !== null) {\n this.request_.cancel();\n }\n break;\n case InternalTaskState.RUNNING:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this.state_ === InternalTaskState.PAUSED;\n this.state_ = state;\n if (wasPaused) {\n this.notifyObservers_();\n this.start_();\n }\n break;\n case InternalTaskState.PAUSED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.CANCELED:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this.error_ = errors.canceled();\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.ERROR:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n case InternalTaskState.SUCCESS:\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this.state_ = state;\n this.notifyObservers_();\n break;\n }\n };\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this.state_) {\n case InternalTaskState.PAUSING:\n this.transition_(InternalTaskState.PAUSED);\n break;\n case InternalTaskState.CANCELING:\n this.transition_(InternalTaskState.CANCELED);\n break;\n case InternalTaskState.RUNNING:\n this.start_();\n break;\n default:\n // TODO(andysoto): assert(false);\n break;\n }\n };\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n get: function () {\n var externalState = fbsTaskEnums.taskStateFromInternalTaskState(this.state_);\n return new UploadTaskSnapshot(this.transferred_, this.blob_.size(), externalState, this.metadata_, this, this.ref_);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a callback for an event.\n * @param type The type of event to listen for.\n */\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n if (nextOrObserver === void 0) { nextOrObserver = undefined; }\n if (error === void 0) { error = undefined; }\n if (completed === void 0) { completed = undefined; }\n function typeValidator(_p) {\n if (type !== TaskEvent.STATE_CHANGED) {\n throw \"Expected one of the event types: [\" + TaskEvent.STATE_CHANGED + \"].\";\n }\n }\n var nextOrObserverMessage = 'Expected a function or an Object with one of ' +\n '`next`, `error`, `complete` properties.';\n var nextValidator = fbsArgs.nullFunctionSpec(true).validator;\n var observerValidator = fbsArgs.looseObjectSpec(null, true).validator;\n function nextOrObserverValidator(p) {\n try {\n nextValidator(p);\n return;\n }\n catch (e) { }\n try {\n observerValidator(p);\n var anyDefined = typeUtils.isJustDef(p['next']) ||\n typeUtils.isJustDef(p['error']) ||\n typeUtils.isJustDef(p['complete']);\n if (!anyDefined) {\n throw '';\n }\n return;\n }\n catch (e) {\n throw nextOrObserverMessage;\n }\n }\n var specs = [\n fbsArgs.stringSpec(typeValidator),\n fbsArgs.looseObjectSpec(nextOrObserverValidator, true),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n fbsArgs.validate('on', specs, arguments);\n var self = this;\n function makeBinder(specs) {\n function binder(nextOrObserver, error, opt_complete) {\n if (specs !== null) {\n fbsArgs.validate('on', specs, arguments);\n }\n var observer = new Observer(nextOrObserver, error, completed);\n self.addObserver_(observer);\n return function () {\n self.removeObserver_(observer);\n };\n }\n return binder;\n }\n function binderNextOrObserverValidator(p) {\n if (p === null) {\n throw nextOrObserverMessage;\n }\n nextOrObserverValidator(p);\n }\n var binderSpecs = [\n fbsArgs.looseObjectSpec(binderNextOrObserverValidator),\n fbsArgs.nullFunctionSpec(true),\n fbsArgs.nullFunctionSpec(true)\n ];\n var typeOnly = !(typeUtils.isJustDef(nextOrObserver) ||\n typeUtils.isJustDef(error) ||\n typeUtils.isJustDef(completed));\n if (typeOnly) {\n return makeBinder(binderSpecs);\n }\n else {\n return makeBinder(null)(nextOrObserver, error, completed);\n }\n };\n /**\n * This object behaves like a Promise, and resolves with its snapshot data\n * when the upload completes.\n * @param onFulfilled The fulfillment callback. Promise chaining works as normal.\n * @param onRejected The rejection callback.\n */\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this.promise_.then(onFulfilled, onRejected);\n };\n /**\n * Equivalent to calling `then(null, onRejected)`.\n */\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\n * Adds the given observer.\n */\n UploadTask.prototype.addObserver_ = function (observer) {\n this.observers_.push(observer);\n this.notifyObserver_(observer);\n };\n /**\n * Removes the given observer.\n */\n UploadTask.prototype.removeObserver_ = function (observer) {\n fbsArray.remove(this.observers_, observer);\n };\n UploadTask.prototype.notifyObservers_ = function () {\n var _this = this;\n this.finishPromise_();\n var observers = fbsArray.clone(this.observers_);\n observers.forEach(function (observer) {\n _this.notifyObserver_(observer);\n });\n };\n UploadTask.prototype.finishPromise_ = function () {\n if (this.resolve_ !== null) {\n var triggered = true;\n switch (fbsTaskEnums.taskStateFromInternalTaskState(this.state_)) {\n case TaskState.SUCCESS:\n fbsAsync(this.resolve_.bind(null, this.snapshot))();\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this.reject_;\n fbsAsync(toCall.bind(null, this.error_))();\n break;\n default:\n triggered = false;\n break;\n }\n if (triggered) {\n this.resolve_ = null;\n this.reject_ = null;\n }\n }\n };\n UploadTask.prototype.notifyObserver_ = function (observer) {\n var externalState = fbsTaskEnums.taskStateFromInternalTaskState(this.state_);\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next !== null) {\n fbsAsync(observer.next.bind(observer, this.snapshot))();\n }\n break;\n case TaskState.SUCCESS:\n if (observer.complete !== null) {\n fbsAsync(observer.complete.bind(observer))();\n }\n break;\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_))();\n }\n break;\n default:\n // TODO(andysoto): assert(false);\n if (observer.error !== null) {\n fbsAsync(observer.error.bind(observer, this.error_))();\n }\n }\n };\n /**\n * Resumes a paused task. Has no effect on a currently running or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.resume = function () {\n fbsArgs.validate('resume', [], arguments);\n var valid = this.state_ === InternalTaskState.PAUSED ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.RUNNING);\n }\n return valid;\n };\n /**\n * Pauses a currently running task. Has no effect on a paused or failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.pause = function () {\n fbsArgs.validate('pause', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING;\n if (valid) {\n this.transition_(InternalTaskState.PAUSING);\n }\n return valid;\n };\n /**\n * Cancels a currently running or paused task. Has no effect on a complete or\n * failed task.\n * @return True if the operation took effect, false if ignored.\n */\n UploadTask.prototype.cancel = function () {\n fbsArgs.validate('cancel', [], arguments);\n var valid = this.state_ === InternalTaskState.RUNNING ||\n this.state_ === InternalTaskState.PAUSING;\n if (valid) {\n this.transition_(InternalTaskState.CANCELING);\n }\n return valid;\n };\n return UploadTask;\n}());\nexport { UploadTask };\n\n//# sourceMappingURL=task.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/task.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @fileoverview Defines the Firebase Storage Reference class.\n */\nimport * as args from './implementation/args';\nimport { FbsBlob } from './implementation/blob';\nimport * as errorsExports from './implementation/error';\nimport { Location } from './implementation/location';\nimport * as metadata from './implementation/metadata';\nimport * as object from './implementation/object';\nimport * as path from './implementation/path';\nimport * as requests from './implementation/requests';\nimport * as fbsString from './implementation/string';\nimport { StringFormat } from './implementation/string';\nimport * as type from './implementation/type';\nimport { UploadTask } from './task';\n/**\n * Provides methods to interact with a bucket in the Firebase Storage service.\n * @param location An fbs.location, or the URL at\n * which to base this object, in one of the following forms:\n * gs:///\n * http[s]://firebasestorage.googleapis.com/\n * /b//o/\n * Any query or fragment strings will be ignored in the http[s]\n * format. If no value is passed, the storage object will use a URL based on\n * the project ID of the base firebase.App instance.\n */\nvar Reference = /** @class */ (function () {\n function Reference(authWrapper, location) {\n this.authWrapper = authWrapper;\n if (location instanceof Location) {\n this.location = location;\n }\n else {\n this.location = Location.makeFromUrl(location);\n }\n }\n /**\n * @return The URL for the bucket and path this object references,\n * in the form gs:///\n * @override\n */\n Reference.prototype.toString = function () {\n args.validate('toString', [], arguments);\n return 'gs://' + this.location.bucket + '/' + this.location.path;\n };\n Reference.prototype.newRef = function (authWrapper, location) {\n return new Reference(authWrapper, location);\n };\n Reference.prototype.mappings = function () {\n return metadata.getMappings();\n };\n /**\n * @return A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n Reference.prototype.child = function (childPath) {\n args.validate('child', [args.stringSpec()], arguments);\n var newPath = path.child(this.location.path, childPath);\n var location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n };\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\n * @return A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get: function () {\n var newPath = path.parent(this.location.path);\n if (newPath === null) {\n return null;\n }\n var location = new Location(this.location.bucket, newPath);\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\n * @return An reference to the root of this\n * object's bucket.\n */\n get: function () {\n var location = new Location(this.location.bucket, '');\n return this.newRef(this.authWrapper, location);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n get: function () {\n return this.location.bucket;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n get: function () {\n return this.location.path;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n get: function () {\n return path.lastComponent(this.location.path);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n get: function () {\n return this.authWrapper.service();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Uploads a blob to this object's location.\n * @param data The blob to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.put = function (data, metadata) {\n if (metadata === void 0) { metadata = null; }\n args.validate('put', [args.uploadDataSpec(), args.metadataSpec(true)], arguments);\n this.throwIfRoot_('put');\n return new UploadTask(this, this.authWrapper, this.location, this.mappings(), new FbsBlob(data), metadata);\n };\n /**\n * Uploads a string to this object's location.\n * @param string The string to upload.\n * @param opt_format The format of the string to upload.\n * @return An UploadTask that lets you control and\n * observe the upload.\n */\n Reference.prototype.putString = function (string, format, opt_metadata) {\n if (format === void 0) { format = StringFormat.RAW; }\n args.validate('putString', [\n args.stringSpec(),\n args.stringSpec(fbsString.formatValidator, true),\n args.metadataSpec(true)\n ], arguments);\n this.throwIfRoot_('putString');\n var data = fbsString.dataFromString(format, string);\n var metadata = object.clone(opt_metadata);\n if (!type.isDef(metadata['contentType']) && type.isDef(data.contentType)) {\n metadata['contentType'] = data.contentType;\n }\n return new UploadTask(this, this.authWrapper, this.location, this.mappings(), new FbsBlob(data.data, true), metadata);\n };\n /**\n * Deletes the object at this location.\n * @return A promise that resolves if the deletion succeeds.\n */\n Reference.prototype.delete = function () {\n args.validate('delete', [], arguments);\n this.throwIfRoot_('delete');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = requests.deleteObject(self.authWrapper, self.location);\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * A promise that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retreived, the promise is\n * rejected.\n */\n Reference.prototype.getMetadata = function () {\n args.validate('getMetadata', [], arguments);\n this.throwIfRoot_('getMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = requests.getMetadata(self.authWrapper, self.location, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * Updates the metadata for this object.\n * @param metadata The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @return A promise that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n Reference.prototype.updateMetadata = function (metadata) {\n args.validate('updateMetadata', [args.metadataSpec()], arguments);\n this.throwIfRoot_('updateMetadata');\n var self = this;\n return this.authWrapper.getAuthToken().then(function (authToken) {\n var requestInfo = requests.updateMetadata(self.authWrapper, self.location, metadata, self.mappings());\n return self.authWrapper.makeRequest(requestInfo, authToken).getPromise();\n });\n };\n /**\n * @return A promise that resolves with the download\n * URL for this object.\n */\n Reference.prototype.getDownloadURL = function () {\n args.validate('getDownloadURL', [], arguments);\n this.throwIfRoot_('getDownloadURL');\n return this.getMetadata().then(function (metadata) {\n var url = metadata['downloadURLs'][0];\n if (type.isDef(url)) {\n return url;\n }\n else {\n throw errorsExports.noDownloadURL();\n }\n });\n };\n Reference.prototype.throwIfRoot_ = function (name) {\n if (this.location.path === '') {\n throw errorsExports.invalidRootOperation(name);\n }\n };\n return Reference;\n}());\nexport { Reference };\n\n//# sourceMappingURL=reference.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/reference.js\n// module id = null\n// module chunks = ","import * as promiseimpl from './promise_external';\n/**\n * A request whose promise always fails.\n * @struct\n * @template T\n */\nvar FailRequest = /** @class */ (function () {\n function FailRequest(error) {\n this.promise_ = promiseimpl.reject(error);\n }\n /** @inheritDoc */\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n FailRequest.prototype.cancel = function (appDelete) {\n if (appDelete === void 0) { appDelete = false; }\n };\n return FailRequest;\n}());\nexport { FailRequest };\n\n//# sourceMappingURL=failrequest.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/failrequest.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as object from './object';\nimport * as constants from './constants';\n/**\n * @struct\n */\nvar RequestMap = /** @class */ (function () {\n function RequestMap() {\n this.map_ = {};\n this.id_ = constants.minSafeInteger;\n }\n /**\n * Registers the given request with this map.\n * The request is unregistered when it completes.\n * @param r The request to register.\n */\n RequestMap.prototype.addRequest = function (r) {\n var id = this.id_;\n this.id_++;\n this.map_[id] = r;\n var self = this;\n function unmap() {\n delete self.map_[id];\n }\n r.getPromise().then(unmap, unmap);\n };\n /**\n * Cancels all registered requests.\n */\n RequestMap.prototype.clear = function () {\n object.forEach(this.map_, function (key, val) {\n if (val) {\n val.cancel(true);\n }\n });\n this.map_ = {};\n };\n return RequestMap;\n}());\nexport { RequestMap };\n\n//# sourceMappingURL=requestmap.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/requestmap.js\n// module id = null\n// module chunks = ","import * as constants from './constants';\nimport * as errorsExports from './error';\nimport { FailRequest } from './failrequest';\nimport { Location } from './location';\nimport * as promiseimpl from './promise_external';\nimport { RequestMap } from './requestmap';\nimport * as type from './type';\n/**\n * @param app If null, getAuthToken always resolves with null.\n * @param service The storage service associated with this auth wrapper.\n * Untyped to avoid circular type dependencies.\n * @struct\n */\nvar AuthWrapper = /** @class */ (function () {\n function AuthWrapper(app, maker, requestMaker, service, pool) {\n this.bucket_ = null;\n this.deleted_ = false;\n this.app_ = app;\n if (this.app_ !== null) {\n var options = this.app_.options;\n if (type.isDef(options)) {\n this.bucket_ = AuthWrapper.extractBucket_(options);\n }\n }\n this.storageRefMaker_ = maker;\n this.requestMaker_ = requestMaker;\n this.pool_ = pool;\n this.service_ = service;\n this.maxOperationRetryTime_ = constants.defaultMaxOperationRetryTime;\n this.maxUploadRetryTime_ = constants.defaultMaxUploadRetryTime;\n this.requestMap_ = new RequestMap();\n }\n AuthWrapper.extractBucket_ = function (config) {\n var bucketString = config[constants.configOption] || null;\n if (bucketString == null) {\n return null;\n }\n var loc = Location.makeFromBucketSpec(bucketString);\n return loc.bucket;\n };\n AuthWrapper.prototype.getAuthToken = function () {\n // TODO(andysoto): remove ifDef checks after firebase-app implements stubs\n // (b/28673818).\n if (this.app_ !== null &&\n type.isDef(this.app_.INTERNAL) &&\n type.isDef(this.app_.INTERNAL.getToken)) {\n return this.app_.INTERNAL.getToken().then(function (response) {\n if (response !== null) {\n return response.accessToken;\n }\n else {\n return null;\n }\n }, function (_error) {\n return null;\n });\n }\n else {\n return promiseimpl.resolve(null);\n }\n };\n AuthWrapper.prototype.bucket = function () {\n if (this.deleted_) {\n throw errorsExports.appDeleted();\n }\n else {\n return this.bucket_;\n }\n };\n /**\n * The service associated with this auth wrapper. Untyped to avoid circular\n * type dependencies.\n */\n AuthWrapper.prototype.service = function () {\n return this.service_;\n };\n /**\n * Returns a new firebaseStorage.Reference object referencing this AuthWrapper\n * at the given Location.\n * @param loc The Location.\n * @return Actually a firebaseStorage.Reference, typing not allowed\n * because of circular dependency problems.\n */\n AuthWrapper.prototype.makeStorageReference = function (loc) {\n return this.storageRefMaker_(this, loc);\n };\n AuthWrapper.prototype.makeRequest = function (requestInfo, authToken) {\n if (!this.deleted_) {\n var request = this.requestMaker_(requestInfo, authToken, this.pool_);\n this.requestMap_.addRequest(request);\n return request;\n }\n else {\n return new FailRequest(errorsExports.appDeleted());\n }\n };\n /**\n * Stop running requests and prevent more from being created.\n */\n AuthWrapper.prototype.deleteApp = function () {\n this.deleted_ = true;\n this.app_ = null;\n this.requestMap_.clear();\n };\n AuthWrapper.prototype.maxUploadRetryTime = function () {\n return this.maxUploadRetryTime_;\n };\n AuthWrapper.prototype.setMaxUploadRetryTime = function (time) {\n this.maxUploadRetryTime_ = time;\n };\n AuthWrapper.prototype.maxOperationRetryTime = function () {\n return this.maxOperationRetryTime_;\n };\n AuthWrapper.prototype.setMaxOperationRetryTime = function (time) {\n this.maxOperationRetryTime_ = time;\n };\n return AuthWrapper;\n}());\nexport { AuthWrapper };\n\n//# sourceMappingURL=authwrapper.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/implementation/authwrapper.js\n// module id = null\n// module chunks = ","/**\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as args from './implementation/args';\nimport { AuthWrapper } from './implementation/authwrapper';\nimport { Location } from './implementation/location';\nimport * as fbsPromiseImpl from './implementation/promise_external';\nimport * as RequestExports from './implementation/request';\nimport { Reference } from './reference';\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n *\n * @struct\n */\nvar Service = /** @class */ (function () {\n function Service(app, pool, url) {\n this.bucket_ = null;\n function maker(authWrapper, loc) {\n return new Reference(authWrapper, loc);\n }\n this.authWrapper_ = new AuthWrapper(app, maker, RequestExports.makeRequest, this, pool);\n this.app_ = app;\n if (url != null) {\n this.bucket_ = Location.makeFromBucketSpec(url);\n }\n else {\n var authWrapperBucket = this.authWrapper_.bucket();\n if (authWrapperBucket != null) {\n this.bucket_ = new Location(authWrapperBucket, '');\n }\n }\n this.internals_ = new ServiceInternals(this);\n }\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n Service.prototype.ref = function (path) {\n function validator(path) {\n if (/^[A-Za-z]+:\\/\\//.test(path)) {\n throw 'Expected child path but got a URL, use refFromURL instead.';\n }\n }\n args.validate('ref', [args.stringSpec(validator, true)], arguments);\n if (this.bucket_ == null) {\n throw new Error('No Storage Bucket defined in Firebase Options.');\n }\n var ref = new Reference(this.authWrapper_, this.bucket_);\n if (path != null) {\n return ref.child(path);\n }\n else {\n return ref;\n }\n };\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n Service.prototype.refFromURL = function (url) {\n function validator(p) {\n if (!/^[A-Za-z]+:\\/\\//.test(p)) {\n throw 'Expected full URL but got a child path, use ref instead.';\n }\n try {\n Location.makeFromUrl(p);\n }\n catch (e) {\n throw 'Expected valid full URL but got an invalid one.';\n }\n }\n args.validate('refFromURL', [args.stringSpec(validator, false)], arguments);\n return new Reference(this.authWrapper_, url);\n };\n Object.defineProperty(Service.prototype, \"maxUploadRetryTime\", {\n get: function () {\n return this.authWrapper_.maxUploadRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxUploadRetryTime = function (time) {\n args.validate('setMaxUploadRetryTime', [args.nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxUploadRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"maxOperationRetryTime\", {\n get: function () {\n return this.authWrapper_.maxOperationRetryTime();\n },\n enumerable: true,\n configurable: true\n });\n Service.prototype.setMaxOperationRetryTime = function (time) {\n args.validate('setMaxOperationRetryTime', [args.nonNegativeNumberSpec()], arguments);\n this.authWrapper_.setMaxOperationRetryTime(time);\n };\n Object.defineProperty(Service.prototype, \"app\", {\n get: function () {\n return this.app_;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Service.prototype, \"INTERNAL\", {\n get: function () {\n return this.internals_;\n },\n enumerable: true,\n configurable: true\n });\n return Service;\n}());\nexport { Service };\n/**\n * @struct\n */\nvar ServiceInternals = /** @class */ (function () {\n function ServiceInternals(service) {\n this.service_ = service;\n }\n /**\n * Called when the associated app is deleted.\n * @see {!fbs.AuthWrapper.prototype.deleteApp}\n */\n ServiceInternals.prototype.delete = function () {\n this.service_.authWrapper_.deleteApp();\n return fbsPromiseImpl.resolve(undefined);\n };\n return ServiceInternals;\n}());\nexport { ServiceInternals };\n\n//# sourceMappingURL=service.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../storage/dist/esm/src/service.js\n// module id = null\n// module chunks = "]} \ No newline at end of file diff --git a/lib/font-roboto/.bower.json b/lib/font-roboto/.bower.json index da837d1e..4bb3cb81 100644 --- a/lib/font-roboto/.bower.json +++ b/lib/font-roboto/.bower.json @@ -1,6 +1,6 @@ { "name": "font-roboto", - "version": "1.0.2", + "version": "1.0.3", "description": "An HTML import for Roboto", "authors": [ "The Polymer Authors" @@ -19,11 +19,11 @@ "ignore": [ "/.*" ], - "_release": "1.0.2", + "_release": "1.0.3", "_resolution": { "type": "version", - "tag": "v1.0.2", - "commit": "ad31da796c12dfa4a83526afe6ff6190ad29643f" + "tag": "v1.0.3", + "commit": "6b16584ff654fea05d6bf3e812fb8b225202663f" }, "_source": "https://github.com/PolymerElements/font-roboto.git", "_target": "^1", diff --git a/lib/font-roboto/CONTRIBUTING.md b/lib/font-roboto/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/font-roboto/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/font-roboto/README.md b/lib/font-roboto/README.md new file mode 100644 index 00000000..61c6394c --- /dev/null +++ b/lib/font-roboto/README.md @@ -0,0 +1 @@ +# font-roboto diff --git a/lib/font-roboto/bower.json b/lib/font-roboto/bower.json new file mode 100644 index 00000000..7099d7ff --- /dev/null +++ b/lib/font-roboto/bower.json @@ -0,0 +1,22 @@ +{ + "name": "font-roboto", + "version": "1.0.3", + "description": "An HTML import for Roboto", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "font", + "roboto" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/font-roboto.git" + }, + "main": "roboto.html", + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/font-roboto/", + "ignore": [ + "/.*" + ] +} diff --git a/lib/font-roboto/package.json b/lib/font-roboto/package.json new file mode 100644 index 00000000..f02f2fb7 --- /dev/null +++ b/lib/font-roboto/package.json @@ -0,0 +1,19 @@ +{ + "name": "@polymerelements/font-roboto", + "version": "1.0.1", + "description": "An HTML import for Roboto", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "font", + "roboto" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/font-roboto.git" + }, + "main": "roboto.html", + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/font-roboto/" +} diff --git a/lib/font-roboto/roboto.html b/lib/font-roboto/roboto.html new file mode 100644 index 00000000..417ee18c --- /dev/null +++ b/lib/font-roboto/roboto.html @@ -0,0 +1,10 @@ + + diff --git a/lib/gold-zip-input/.bower.json b/lib/gold-zip-input/.bower.json index f0176873..a72e4702 100644 --- a/lib/gold-zip-input/.bower.json +++ b/lib/gold-zip-input/.bower.json @@ -1,6 +1,6 @@ { "name": "gold-zip-input", - "version": "1.0.6", + "version": "2.0.0", "description": "An input field for a zip code", "authors": [ "The Polymer Authors" @@ -21,27 +21,46 @@ "homepage": "https://github.com/PolymerElements/gold-zip-input", "ignore": [], "dependencies": { - "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", - "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", - "iron-icon": "PolymerElements/iron-icon#^1.0.0", - "paper-input": "PolymerElements/paper-input#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "polymer": "Polymer/polymer#^1.1.0" + "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#1 - 2", + "iron-icon": "PolymerElements/iron-icon#1 - 2", + "iron-validator-behavior": "PolymerElements/iron-validator-behavior#1 - 2", + "paper-input": "PolymerElements/paper-input#1 - 2", + "paper-styles": "PolymerElements/paper-styles#1 - 2", + "polymer": "Polymer/polymer#1.9 - 2" }, "devDependencies": { - "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", - "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "^4.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + "iron-component-page": "PolymerElements/iron-component-page#1 - 2", + "iron-test-helpers": "PolymerElements/iron-test-helpers#1 - 2", + "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1", + "web-component-tester": "Polymer/web-component-tester#^6.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" }, - "_release": "1.0.6", + "variants": { + "1.x": { + "dependencies": { + "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", + "iron-icon": "PolymerElements/iron-icon#^1.0.0", + "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", + "paper-input": "PolymerElements/paper-input#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.1.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "^4.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } + } + }, + "_release": "2.0.0", "_resolution": { "type": "version", - "tag": "v1.0.6", - "commit": "cf9d7d170cababd24a2922558a7c87d9e99fe5ed" + "tag": "v2.0.0", + "commit": "4a91d23e9fca9b625a1caf9bde5cf96e794c91b0" }, "_source": "https://github.com/PolymerElements/gold-zip-input.git", - "_target": "^1.0.0", + "_target": "^2.0.0", "_originalSource": "PolymerElements/gold-zip-input" } \ No newline at end of file diff --git a/lib/gold-zip-input/.github/ISSUE_TEMPLATE.md b/lib/gold-zip-input/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..eb66af44 --- /dev/null +++ b/lib/gold-zip-input/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/gold-zip-input/.gitignore b/lib/gold-zip-input/.gitignore new file mode 100644 index 00000000..2be39e49 --- /dev/null +++ b/lib/gold-zip-input/.gitignore @@ -0,0 +1,2 @@ +bower_components* +bower-*.json diff --git a/lib/gold-zip-input/.travis.yml b/lib/gold-zip-input/.travis.yml new file mode 100644 index 00000000..7ad1ba6d --- /dev/null +++ b/lib/gold-zip-input/.travis.yml @@ -0,0 +1,26 @@ +language: node_js +sudo: required +before_script: + - npm install -g polymer-cli + - polymer install --variants +env: + global: + - secure: >- + XiAr66KtJfvGGp2Myf996f+9MsISiPSUHzoanAXB7qfK0iNbRsVtCuyMEozqjULR8I25c5x7xEhHHOpO22bingKlN/M181+9VfJmtrVGQv+tDMkrUETQLzbZZ6UuObUfrRuWCzFPCNppSrsGAaZFb46odZFuPypysOLkF2i46NUbzfui1REnEvf/UzB94eI8hpg8GGLMZbb3SYNsqLbPn9CWsqHIARje8YzPmL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eMG4kSNA05AfOGPXqaBfR2LBmV97qz5y7GBYVx6unSIdaVBM+0Gw/2UNjQ= +node_js: stable +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable + sauce_connect: true +script: + - xvfb-run polymer test + - >- + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default'; + fi +dist: trusty diff --git a/lib/gold-zip-input/CONTRIBUTING.md b/lib/gold-zip-input/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/gold-zip-input/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/gold-zip-input/README.md b/lib/gold-zip-input/README.md new file mode 100644 index 00000000..c44bd9fe --- /dev/null +++ b/lib/gold-zip-input/README.md @@ -0,0 +1,52 @@ + + + +[![Build status](https://travis-ci.org/PolymerElements/gold-zip-input.svg?branch=master)](https://travis-ci.org/PolymerElements/gold-zip-input) +[![Demo and API Docs](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/PolymerElements/gold-zip-input) + +## <gold-zip-input> + +`gold-zip-input` is a single-line text field with Material Design styling +for entering a US zip code. + +```html + +``` + +It may include an optional label, which by default is "Zip Code". + +```html + +``` + +### Validation + +The input supports both 5 digit zip codes (90210) or the full 9 digit ones, +separated by a dash (90210-9999). + +The input can be automatically validated as the user is typing by using +the `auto-validate` and `required` attributes. For manual validation, the +element also has a `validate()` method, which returns the validity of the +input as well sets any appropriate error messages and styles. + +See `Polymer.PaperInputBehavior` for more API docs. + +### Styling + +See `Polymer.PaperInputContainer` for a list of custom properties used to +style this element. + + + + diff --git a/lib/gold-zip-input/bower.json b/lib/gold-zip-input/bower.json new file mode 100644 index 00000000..43f48354 --- /dev/null +++ b/lib/gold-zip-input/bower.json @@ -0,0 +1,57 @@ +{ + "name": "gold-zip-input", + "version": "2.0.0", + "description": "An input field for a zip code", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "gold", + "input" + ], + "main": "gold-zip-input.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/gold-zip-input.git" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/gold-zip-input", + "ignore": [], + "dependencies": { + "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#1 - 2", + "iron-icon": "PolymerElements/iron-icon#1 - 2", + "iron-validator-behavior": "PolymerElements/iron-validator-behavior#1 - 2", + "paper-input": "PolymerElements/paper-input#1 - 2", + "paper-styles": "PolymerElements/paper-styles#1 - 2", + "polymer": "Polymer/polymer#1.9 - 2" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#1 - 2", + "iron-test-helpers": "PolymerElements/iron-test-helpers#1 - 2", + "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1", + "web-component-tester": "Polymer/web-component-tester#^6.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" + }, + "variants": { + "1.x": { + "dependencies": { + "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", + "iron-icon": "PolymerElements/iron-icon#^1.0.0", + "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", + "paper-input": "PolymerElements/paper-input#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.1.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "^4.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } + } + } +} diff --git a/lib/gold-zip-input/demo/index.html b/lib/gold-zip-input/demo/index.html new file mode 100644 index 00000000..9704ffad --- /dev/null +++ b/lib/gold-zip-input/demo/index.html @@ -0,0 +1,52 @@ + + + + + + + + + + gold-zip-input demo + + + + + + + + +
+

Standard

+
+ + +
+ +

Pre-validated

+
+ + + +
+ +

Custom error message

+
+ +
+
+ diff --git a/lib/gold-zip-input/gold-zip-input.html b/lib/gold-zip-input/gold-zip-input.html new file mode 100644 index 00000000..f6758e5f --- /dev/null +++ b/lib/gold-zip-input/gold-zip-input.html @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/gold-zip-input/hero.svg b/lib/gold-zip-input/hero.svg new file mode 100644 index 00000000..19734901 --- /dev/null +++ b/lib/gold-zip-input/hero.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/gold-zip-input/index.html b/lib/gold-zip-input/index.html new file mode 100644 index 00000000..2b529791 --- /dev/null +++ b/lib/gold-zip-input/index.html @@ -0,0 +1,28 @@ + + + + + + + + + gold-zip-input + + + + + + + + + + + diff --git a/lib/gold-zip-input/test/basic.html b/lib/gold-zip-input/test/basic.html new file mode 100644 index 00000000..3a0c51b2 --- /dev/null +++ b/lib/gold-zip-input/test/basic.html @@ -0,0 +1,152 @@ + + + + + + gold-zip-input tests + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/gold-zip-input/test/index.html b/lib/gold-zip-input/test/index.html new file mode 100644 index 00000000..7a035405 --- /dev/null +++ b/lib/gold-zip-input/test/index.html @@ -0,0 +1,24 @@ + + + + gold-zip-input tests + + + + + + + diff --git a/lib/gold-zip-input/zip-validator.html b/lib/gold-zip-input/zip-validator.html new file mode 100644 index 00000000..c2e35926 --- /dev/null +++ b/lib/gold-zip-input/zip-validator.html @@ -0,0 +1,32 @@ + + + + + + diff --git a/lib/intl-messageformat/.gitignore b/lib/intl-messageformat/.gitignore new file mode 100644 index 00000000..49a8b5ab --- /dev/null +++ b/lib/intl-messageformat/.gitignore @@ -0,0 +1,4 @@ +coverage/ +lib/ +node_modules/ +tmp/ diff --git a/lib/intl-messageformat/.npmignore b/lib/intl-messageformat/.npmignore new file mode 100644 index 00000000..4d04f7c6 --- /dev/null +++ b/lib/intl-messageformat/.npmignore @@ -0,0 +1,6 @@ +coverage/ +tasks/ +tests/ +tmp/ +.travis.yml +Gruntfile.js diff --git a/lib/intl-messageformat/.travis.yml b/lib/intl-messageformat/.travis.yml new file mode 100644 index 00000000..8ce9443c --- /dev/null +++ b/lib/intl-messageformat/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +node_js: +- "0.10" +- "0.12" +script: npm run travis +notifications: + email: + recipients: + - mojito-next@yahoo-inc.com + on_success: change + on_failure: always +env: + global: + - secure: Q1Agjbg1jP4OwEt2LZHX89gjxwK0vTK7EhXgQDIRnqJIqnQ26CbMn8eu8zdKOkysx8F0lHYjU5DqanV81VV4ApvjDuArAFpSJ3TjwFwyQf1UDwCGXsEb+gfd2S3zmzxc7N/T/QPdA+TsXxdzjg0NtnNW1rcThN3IL7Kh1Q1nvoQ= + - secure: K0CNsX5Dirh28CgYZtFSScrAKeyeH+YRNFxOADUNF4QVNPCGZWY8VNS+jHi5mekzm/2KgnkvLxpoD/0TECz8R6TvjIwrDZOcSRRi6Y5L7xO+R4xMZId93RT+mcwVR+7cqt+QVYnWjDVHof1ji4TdWq0WWbktDlULXq28VfjLr7c= diff --git a/lib/intl-messageformat/Gruntfile.js b/lib/intl-messageformat/Gruntfile.js new file mode 100644 index 00000000..1ee2927b --- /dev/null +++ b/lib/intl-messageformat/Gruntfile.js @@ -0,0 +1,264 @@ +module.exports = function (grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + clean: { + dist: 'dist/', + lib : 'lib/', + tmp : 'tmp/' + }, + + copy: { + tmp: { + expand: true, + cwd : 'tmp/src/', + src : '**/*.js', + dest : 'lib/' + } + }, + + concat: { + dist_with_locales: { + src: ['dist/intl-messageformat.js', 'dist/locale-data/*.js'], + dest: 'dist/intl-messageformat-with-locales.js', + + options: { + sourceMap: true + } + } + }, + + jshint: { + all: ['index.js', 'src/*.js', '!src/en.js', 'tests/*.js'] + }, + + extract_cldr_data: { + options: { + pluralRules: true + }, + + src_en: { + dest: 'src/en.js', + + options: { + locales: ['en'], + prelude: '// GENERATED FILE\n', + + wrapEntry: function (entry) { + return 'export default ' + entry + ';'; + } + } + }, + + lib_all: { + dest: 'lib/locales.js', + + options: { + prelude: [ + '// GENERATED FILE', + 'var IntlMessageFormat = require("./core")["default"];\n\n' + ].join('\n'), + + wrapEntry: function (entry) { + return 'IntlMessageFormat.__addLocaleData(' + entry + ');'; + } + } + }, + + dist_all: { + dest: 'dist/locale-data/', + options: { + wrapEntry: function (entry) { + return 'IntlMessageFormat.__addLocaleData(' + entry + ');'; + } + } + } + }, + + bundle_jsnext: { + dest: 'dist/intl-messageformat.js', + + options: { + namespace : 'IntlMessageFormat', + sourceRoot: 'intl-messageformat/' + } + }, + + cjs_jsnext: { + dest: 'tmp/' + }, + + uglify: { + options: { + preserveComments : 'some', + sourceMap : true, + sourceMapRoot : 'intl-messageformat/', + sourceMapIncludeSources : true + }, + + dist: { + options: { + sourceMapIn : 'dist/intl-messageformat.js.map' + }, + + files: { + 'dist/intl-messageformat.min.js': [ + 'dist/intl-messageformat.js' + ] + } + }, + + dist_with_locales: { + options: { + sourceMapIn: 'dist/intl-messageformat-with-locales.js.map' + }, + + files: { + 'dist/intl-messageformat-with-locales.min.js': [ + 'dist/intl-messageformat-with-locales.js' + ] + } + } + }, + + json_remove_fields: { + min_source_maps: { + options: { + fields: ['sourceRoot'] + }, + + src: 'dist/*.min.js.map' + } + }, + + benchmark: { + construct: { + src: ['tests/benchmark/new*.js'] + }, + format: { + src: ['tests/benchmark/format*.js'] + } + }, + + connect: { + server: { + options: { + base: '.', + port: 9999 + } + } + }, + + browserify: { + test: { + src : 'tests/browserify/app.js', + dest: 'tmp/browserify/app.js' + } + }, + + 'saucelabs-mocha': { + all: { + options: { + urls: [ + 'http://127.0.0.1:9999/tests/index.html', + 'http://127.0.0.1:9999/tests/browserify/index.html' + ], + + build: process.env.TRAVIS_BUILD_NUMBER, + sauceConfig: { + 'record-video': false, + 'capture-html': false, + 'record-screenshots': false, + 'command-timeout': 60 + }, + throttled: 3, + browsers: [ + { + browserName: 'internet explorer', + platform: 'Windows XP', + version: '7' + }, + { + browserName: 'internet explorer', + platform: 'Windows 7', + version: '8' + }, + { + browserName: 'internet explorer', + platform: 'Windows 7', + version: '9' + }, + { + browserName: 'internet explorer', + platform: 'Windows 8', + version: '10' + }, + { + browserName: 'internet explorer', + platform: 'Windows 8.1', + version: '11' + }, + { + browserName: 'chrome', + platform: 'Windows 7', + version: '37' + }, + { + browserName: 'firefox', + platform: 'Windows 7', + version: '32' + }, + { + browserName: 'iphone', + platform: 'OS X 10.9', + version: '7.1' + }, + { + browserName: 'android', + platform: 'Linux', + version: '4.4' + }, + { + browserName: 'safari', + platform: 'OS X 10.9', + version: '7' + } + ] + } + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-benchmark'); + grunt.loadNpmTasks('grunt-browserify'); + grunt.loadNpmTasks('grunt-bundle-jsnext-lib'); + grunt.loadNpmTasks('grunt-extract-cldr-data'); + grunt.loadNpmTasks('grunt-json-remove-fields'); + grunt.loadNpmTasks('grunt-saucelabs'); + grunt.loadNpmTasks('grunt-contrib-connect'); + + grunt.registerTask('sauce', [ + 'browserify', + 'connect', + 'saucelabs-mocha' + ]); + + grunt.registerTask('cldr', ['extract_cldr_data']); + + grunt.registerTask('default', [ + 'jshint', + 'clean', + 'cldr', + 'bundle_jsnext', + 'concat:dist_with_locales', + 'uglify', + 'json_remove_fields', + 'cjs_jsnext', + 'copy:tmp' + ]); +}; diff --git a/lib/intl-messageformat/LICENSE b/lib/intl-messageformat/LICENSE new file mode 100644 index 00000000..52b47031 --- /dev/null +++ b/lib/intl-messageformat/LICENSE @@ -0,0 +1,39 @@ +Copyright 2013 Yahoo! Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Yahoo! Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +Pluralization rules built from +https://github.com/papandreou/node-cldr +which is licensed under the BSD license and has the following license: + +Copyright (c) 2012, Andreas Lind Petersen +All rights reserved. + +See the following for more details: +https://github.com/papandreou/node-cldr/blob/master/LICENSE + diff --git a/lib/intl-messageformat/README.md b/lib/intl-messageformat/README.md new file mode 100644 index 00000000..a2e6b697 --- /dev/null +++ b/lib/intl-messageformat/README.md @@ -0,0 +1,281 @@ +Intl MessageFormat +================== + +Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages. + +[![npm Version][npm-badge]][npm] +[![Build Status][travis-badge]][travis] +[![Dependency Status][david-badge]][david] + +[![Sauce Test Status][sauce-badge]][sauce] + + +Overview +-------- + +### Goals + +This package aims to provide a way for you to manage and format your JavaScript app's string messages into localized strings for people using your app. You can use this package in the browser and on the server via Node.js. + +This implementation is based on the [Strawman proposal][strawman], but there are a few places this implementation diverges. + +_Note: This `IntlMessageFormat` API may change to stay in sync with ECMA-402, but this package will follow [semver][]._ + +### How It Works + +Messages are provided into the constructor as a `String` message, or a [pre-parsed AST][parser] object. + +```js +var msg = new IntlMessageFormat(message, locales, [formats]); +``` + +The string `message` is parsed, then stored internally in a compiled form that is optimized for the `format()` method to produce the formatted string for displaying to the user. + +```js +var output = msg.format(values); +``` + +### Common Usage Example + +A very common example is formatting messages that have numbers with plural labels. With this package you can make sure that the string is properly formatted for a person's locale, e.g.: + +```js +var MESSAGES = { + 'en-US': { + NUM_PHOTOS: 'You have {numPhotos, plural, ' + + '=0 {no photos.}' + + '=1 {one photo.}' + + 'other {# photos.}}' + }, + + 'es-MX': { + NUM_PHOTOS: 'Usted {numPhotos, plural, ' + + '=0 {no tiene fotos.}' + + '=1 {tiene una foto.}' + + 'other {tiene # fotos.}}' + } +}; + +var output; + +var enNumPhotos = new IntlMessageFormat(MESSAGES['en-US'].NUM_PHOTOS, 'en-US'); +output = enNumPhotos.format({numPhotos: 1000}); +console.log(output); // => "You have 1,000 photos." + +var esNumPhotos = new IntlMessageFormat(MESSAGES['es-MX'].NUM_PHOTOS, 'es-MX'); +output = esNumPhotos.format({numPhotos: 1000}); +console.log(output); // => "Usted tiene 1,000 fotos." +``` + +### Message Syntax + +The message syntax that this package uses is not proprietary, in fact it's a common standard message syntax that works across programming languages and one that professional translators are familiar with. This package uses the **[ICU Message syntax][ICU]** and works for all [CLDR languages][CLDR] which have pluralization rules defined. + +### Features + +* Uses industry standards: [ICU Message syntax][ICU] and [CLDR locale data][CLDR]. + +* Supports **plural**, **select**, and **selectordinal** message arguments. + +* Formats numbers and dates/times in messages using [`Intl.NumberFormat`][Intl-NF] and [`Intl.DateTimeFormat`][Intl-DTF], respectively. + +* Optimized for repeated calls to an `IntlMessageFormat` instance's `format()` method. + +* Supports defining custom format styles/options. + +* Supports escape sequences for message syntax chars, e.g.: `"\\{foo\\}"` will output: `"{foo}"` in the formatted output instead of interpreting it as a `foo` argument. + + +Usage +----- + +### `Intl` Dependency + +This package assumes that the [`Intl`][Intl] global object exists in the runtime. `Intl` is present in all modern browsers _except_ Safari, and there's work happening to [integrate `Intl` into Node.js][Intl-Node]. + +**Luckly, there's the [Intl.js][] polyfill!** You will need to conditionally load the polyfill if you want to support runtimes which `Intl` is not already built-in. + +#### Loading Intl.js Polyfill in a browser + +If the browser does not already have the `Intl` APIs built-in, the Intl.js Polyfill will need to be loaded on the page along with the locale data for any locales that need to be supported: + +```html + + +``` + +_Note: Modern browsers already have the `Intl` APIs built-in, so you can load the Intl.js Polyfill conditionally, by for checking for `window.Intl`._ + +#### Loading Intl.js Polyfill in Node.js + +Conditionally require the Intl.js Polyfill if it doesn't already exist in the runtime. As of Node <= 0.10, this polyfill will be required. + +```js +if (!global.Intl) { + require('intl'); +} +``` + +_Note: When using the Intl.js Polyfill in Node.js, it will automatically load the locale data for all supported locales._ + +### Loading Intl MessageFormat in a browser + +```html + +``` + +By default, Intl MessageFormat ships with the locale data for English (`en`) built-in to the library's runtime. When you need to format data in another locale, include its data; e.g., for French: + +```html + +``` + +_Note: All 200+ languages supported by this package use their root BCP 47 language tag; i.e., the part before the first hyphen (if any)._ + +### Loading Intl MessageFormat in Node.js + +Simply `require()` this package: + +```js +var IntlMessageFormat = require('intl-messageformat'); +``` + +_Note: in Node.js, the data for all 200+ languages is loaded along with the library._ + +### Public API + +#### `IntlMessageFormat` Constructor +To create a message to format, use the `IntlMessageFormat` constructor. The constructor takes three parameters: + + - **message** - _{String | AST}_ - String message (or pre-parsed AST) that serves as formatting pattern. + + - **locales** - _{String | String[]}_ - A string with a BCP 47 language tag, or an array of such strings. If you do not provide a locale, the default locale will be used. When an array of locales is provided, each item and its ancestor locales are checked and the first one with registered locale data is returned. **See: [Locale Resolution](#locale-resolution) for more details.** + + - **[formats]** - _{Object}_ - Optional object with user defined options for format styles. + +```js +var msg = new IntlMessageFormat('My name is {name}.', 'en-US'); +``` + +#### Locale Resolution + +`IntlMessageFormat` uses a locale resolution process similar to that of the built-in `Intl` APIs to determine which locale data to use based on the `locales` value passed to the constructor. The result of this resolution process can be determined by call the `resolvedOptions()` prototype method. + +The following are the abstract steps `IntlMessageFormat` goes through to resolve the locale value: + +* If no extra locale data is loaded, the locale will _always_ resolved to `"en"`. + +* If locale data is missing for a leaf locale like `"fr-FR"`, but there _is_ data for one of its ancestors, `"fr"` in this case, then its ancestor will be used. + +* If there's data for the specified locale, then that locale will be resolved; i.e., + + ```js + var mf = new IntlMessageFormat('', 'en-US'); + assert(mf.resolvedOptions().locale === 'en-US'); // true + ``` + +* The resolved locales are now normalized; e.g., `"en-us"` will resolve to: `"en-US"`. + +_Note: When an array is provided for `locales`, the above steps happen for each item in that array until a match is found._ + +#### `resolvedOptions()` Method + +This method returns an object with the options values that were resolved during instance creation. It currently only contains a `locale` property; here's an example: + +```js +var msg = new IntlMessageFormat('', 'en-us'); +console.log(msg.resolvedOptions().locale); // => "en-US" +``` + +Notice how the specified locale was the all lower-case value: `"en-us"`, but it was resolved and normalized to: `"en-US"`. + +#### `format(values)` Method + +Once the message is created, formatting the message is done by calling the `format()` method on the instance and passing a collection of `values`: + +```js +var output = msg.format({name: "Eric"}); +console.log(output); // => "My name is Eric." +``` + +_Note: A value **must** be supplied for every argument in the message pattern the instance was constructed with._ + +#### User Defined Formats + +Define custom format styles is useful you need supply a set of options to the underlying formatter; e.g., outputting a number in USD: + +```js +var msg = new IntlMessageFormat('The price is: {price, number, USD}', 'en-US', { + number: { + USD: { + style : 'currency', + currency: 'USD' + } + } +}); + +var output = msg.format({price: 100}); +console.log(output); // => "The price is: $100.00" +``` + +In this example, we're defining a `USD` number format style which is passed to the underlying `Intl.NumberFormat` instance as its options. + + +Examples +-------- + +### Plural Label + +This example shows how to use the [ICU Message syntax][ICU] to define a message that has a plural label; e.g., ``"You have 10 photos"``: + +``` +You have {numPhotos, plural, + =0 {no photos.} + =1 {one photo.} + other {# photos.} +} +``` + +```js +var MESSAGES = { + photos: '...', // String from code block above. + ... +}; + +var msg = new IntlMessageFormat(MESSAGES.photos, 'en-US'); + +console.log(msg.format({numPhotos: 0})); // => "You have no photos." +console.log(msg.format({numPhotos: 1})); // => "You have one photo." +console.log(msg.format({numPhotos: 1000})); // => "You have 1,000 photos." +``` + +_Note: how when `numPhotos` was `1000`, the number is formatted with the correct thousands separator._ + + +License +------- + +This software is free to use under the Yahoo! Inc. BSD license. +See the [LICENSE file][LICENSE] for license text and copyright information. + + +[npm]: https://www.npmjs.org/package/intl-messageformat +[npm-badge]: https://img.shields.io/npm/v/intl-messageformat.svg?style=flat-square +[david]: https://david-dm.org/yahoo/intl-messageformat +[david-badge]: https://img.shields.io/david/yahoo/intl-messageformat.svg?style=flat-square +[travis]: https://travis-ci.org/yahoo/intl-messageformat +[travis-badge]: https://img.shields.io/travis/yahoo/intl-messageformat/master.svg?style=flat-square +[sauce]: https://saucelabs.com/u/intl-messageformat +[sauce-badge]: https://saucelabs.com/browser-matrix/intl-messageformat.svg +[strawman]: http://wiki.ecmascript.org/doku.php?id=globalization:messageformatting +[parser]: https://github.com/yahoo/intl-messageformat-parser +[ICU]: http://userguide.icu-project.org/formatparse/messages +[CLDR]: http://cldr.unicode.org/ +[Intl]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl +[Intl-NF]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat +[Intl-DTF]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat +[Intl-Node]: https://github.com/joyent/node/issues/6371 +[Intl.js]: https://github.com/andyearnshaw/Intl.js +[rawgit]: https://rawgit.com/ +[semver]: http://semver.org/ +[LICENSE]: https://github.com/yahoo/intl-messageformat/blob/master/LICENSE diff --git a/lib/intl-messageformat/dist/intl-messageformat-with-locales.js b/lib/intl-messageformat/dist/intl-messageformat-with-locales.js new file mode 100644 index 00000000..702d321e --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat-with-locales.js @@ -0,0 +1,2661 @@ +(function() { + "use strict"; + var $$utils$$hop = Object.prototype.hasOwnProperty; + + function $$utils$$extend(obj) { + var sources = Array.prototype.slice.call(arguments, 1), + i, len, source, key; + + for (i = 0, len = sources.length; i < len; i += 1) { + source = sources[i]; + if (!source) { continue; } + + for (key in source) { + if ($$utils$$hop.call(source, key)) { + obj[key] = source[key]; + } + } + } + + return obj; + } + + // Purposely using the same implementation as the Intl.js `Intl` polyfill. + // Copyright 2013 Andy Earnshaw, MIT License + + var $$es5$$realDefineProp = (function () { + try { return !!Object.defineProperty({}, 'a', {}); } + catch (e) { return false; } + })(); + + var $$es5$$es3 = !$$es5$$realDefineProp && !Object.prototype.__defineGetter__; + + var $$es5$$defineProperty = $$es5$$realDefineProp ? Object.defineProperty : + function (obj, name, desc) { + + if ('get' in desc && obj.__defineGetter__) { + obj.__defineGetter__(name, desc.get); + } else if (!$$utils$$hop.call(obj, name) || 'value' in desc) { + obj[name] = desc.value; + } + }; + + var $$es5$$objCreate = Object.create || function (proto, props) { + var obj, k; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (k in props) { + if ($$utils$$hop.call(props, k)) { + $$es5$$defineProperty(obj, k, props[k]); + } + } + + return obj; + }; + var $$compiler$$default = $$compiler$$Compiler; + + function $$compiler$$Compiler(locales, formats, pluralFn) { + this.locales = locales; + this.formats = formats; + this.pluralFn = pluralFn; + } + + $$compiler$$Compiler.prototype.compile = function (ast) { + this.pluralStack = []; + this.currentPlural = null; + this.pluralNumberFormat = null; + + return this.compileMessage(ast); + }; + + $$compiler$$Compiler.prototype.compileMessage = function (ast) { + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new Error('Message AST is not of type: "messageFormatPattern"'); + } + + var elements = ast.elements, + pattern = []; + + var i, len, element; + + for (i = 0, len = elements.length; i < len; i += 1) { + element = elements[i]; + + switch (element.type) { + case 'messageTextElement': + pattern.push(this.compileMessageText(element)); + break; + + case 'argumentElement': + pattern.push(this.compileArgument(element)); + break; + + default: + throw new Error('Message element does not have a valid type'); + } + } + + return pattern; + }; + + $$compiler$$Compiler.prototype.compileMessageText = function (element) { + // When this `element` is part of plural sub-pattern and its value contains + // an unescaped '#', use a `PluralOffsetString` helper to properly output + // the number with the correct offset in the string. + if (this.currentPlural && /(^|[^\\])#/g.test(element.value)) { + // Create a cache a NumberFormat instance that can be reused for any + // PluralOffsetString instance in this message. + if (!this.pluralNumberFormat) { + this.pluralNumberFormat = new Intl.NumberFormat(this.locales); + } + + return new $$compiler$$PluralOffsetString( + this.currentPlural.id, + this.currentPlural.format.offset, + this.pluralNumberFormat, + element.value); + } + + // Unescape the escaped '#'s in the message text. + return element.value.replace(/\\#/g, '#'); + }; + + $$compiler$$Compiler.prototype.compileArgument = function (element) { + var format = element.format; + + if (!format) { + return new $$compiler$$StringFormat(element.id); + } + + var formats = this.formats, + locales = this.locales, + pluralFn = this.pluralFn, + options; + + switch (format.type) { + case 'numberFormat': + options = formats.number[format.style]; + return { + id : element.id, + format: new Intl.NumberFormat(locales, options).format + }; + + case 'dateFormat': + options = formats.date[format.style]; + return { + id : element.id, + format: new Intl.DateTimeFormat(locales, options).format + }; + + case 'timeFormat': + options = formats.time[format.style]; + return { + id : element.id, + format: new Intl.DateTimeFormat(locales, options).format + }; + + case 'pluralFormat': + options = this.compileOptions(element); + return new $$compiler$$PluralFormat( + element.id, format.ordinal, format.offset, options, pluralFn + ); + + case 'selectFormat': + options = this.compileOptions(element); + return new $$compiler$$SelectFormat(element.id, options); + + default: + throw new Error('Message element does not have a valid format type'); + } + }; + + $$compiler$$Compiler.prototype.compileOptions = function (element) { + var format = element.format, + options = format.options, + optionsHash = {}; + + // Save the current plural element, if any, then set it to a new value when + // compiling the options sub-patterns. This conforms the spec's algorithm + // for handling `"#"` syntax in message text. + this.pluralStack.push(this.currentPlural); + this.currentPlural = format.type === 'pluralFormat' ? element : null; + + var i, len, option; + + for (i = 0, len = options.length; i < len; i += 1) { + option = options[i]; + + // Compile the sub-pattern and save it under the options's selector. + optionsHash[option.selector] = this.compileMessage(option.value); + } + + // Pop the plural stack to put back the original current plural value. + this.currentPlural = this.pluralStack.pop(); + + return optionsHash; + }; + + // -- Compiler Helper Classes -------------------------------------------------- + + function $$compiler$$StringFormat(id) { + this.id = id; + } + + $$compiler$$StringFormat.prototype.format = function (value) { + if (!value) { + return ''; + } + + return typeof value === 'string' ? value : String(value); + }; + + function $$compiler$$PluralFormat(id, useOrdinal, offset, options, pluralFn) { + this.id = id; + this.useOrdinal = useOrdinal; + this.offset = offset; + this.options = options; + this.pluralFn = pluralFn; + } + + $$compiler$$PluralFormat.prototype.getOption = function (value) { + var options = this.options; + + var option = options['=' + value] || + options[this.pluralFn(value - this.offset, this.useOrdinal)]; + + return option || options.other; + }; + + function $$compiler$$PluralOffsetString(id, offset, numberFormat, string) { + this.id = id; + this.offset = offset; + this.numberFormat = numberFormat; + this.string = string; + } + + $$compiler$$PluralOffsetString.prototype.format = function (value) { + var number = this.numberFormat.format(value - this.offset); + + return this.string + .replace(/(^|[^\\])#/g, '$1' + number) + .replace(/\\#/g, '#'); + }; + + function $$compiler$$SelectFormat(id, options) { + this.id = id; + this.options = options; + } + + $$compiler$$SelectFormat.prototype.getOption = function (value) { + var options = this.options; + return options[value] || options.other; + }; + + var intl$messageformat$parser$$default = (function() { + /* + * Generated by PEG.js 0.8.0. + * + * http://pegjs.majda.cz/ + */ + + function peg$subclass(child, parent) { + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + + function SyntaxError(message, expected, found, offset, line, column) { + this.message = message; + this.expected = expected; + this.found = found; + this.offset = offset; + this.line = line; + this.column = column; + + this.name = "SyntaxError"; + } + + peg$subclass(SyntaxError, Error); + + function parse(input) { + var options = arguments.length > 1 ? arguments[1] : {}, + + peg$FAILED = {}, + + peg$startRuleFunctions = { start: peg$parsestart }, + peg$startRuleFunction = peg$parsestart, + + peg$c0 = [], + peg$c1 = function(elements) { + return { + type : 'messageFormatPattern', + elements: elements + }; + }, + peg$c2 = peg$FAILED, + peg$c3 = function(text) { + var string = '', + i, j, outerLen, inner, innerLen; + + for (i = 0, outerLen = text.length; i < outerLen; i += 1) { + inner = text[i]; + + for (j = 0, innerLen = inner.length; j < innerLen; j += 1) { + string += inner[j]; + } + } + + return string; + }, + peg$c4 = function(messageText) { + return { + type : 'messageTextElement', + value: messageText + }; + }, + peg$c5 = /^[^ \t\n\r,.+={}#]/, + peg$c6 = { type: "class", value: "[^ \\t\\n\\r,.+={}#]", description: "[^ \\t\\n\\r,.+={}#]" }, + peg$c7 = "{", + peg$c8 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c9 = null, + peg$c10 = ",", + peg$c11 = { type: "literal", value: ",", description: "\",\"" }, + peg$c12 = "}", + peg$c13 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c14 = function(id, format) { + return { + type : 'argumentElement', + id : id, + format: format && format[2] + }; + }, + peg$c15 = "number", + peg$c16 = { type: "literal", value: "number", description: "\"number\"" }, + peg$c17 = "date", + peg$c18 = { type: "literal", value: "date", description: "\"date\"" }, + peg$c19 = "time", + peg$c20 = { type: "literal", value: "time", description: "\"time\"" }, + peg$c21 = function(type, style) { + return { + type : type + 'Format', + style: style && style[2] + }; + }, + peg$c22 = "plural", + peg$c23 = { type: "literal", value: "plural", description: "\"plural\"" }, + peg$c24 = function(pluralStyle) { + return { + type : pluralStyle.type, + ordinal: false, + offset : pluralStyle.offset || 0, + options: pluralStyle.options + }; + }, + peg$c25 = "selectordinal", + peg$c26 = { type: "literal", value: "selectordinal", description: "\"selectordinal\"" }, + peg$c27 = function(pluralStyle) { + return { + type : pluralStyle.type, + ordinal: true, + offset : pluralStyle.offset || 0, + options: pluralStyle.options + } + }, + peg$c28 = "select", + peg$c29 = { type: "literal", value: "select", description: "\"select\"" }, + peg$c30 = function(options) { + return { + type : 'selectFormat', + options: options + }; + }, + peg$c31 = "=", + peg$c32 = { type: "literal", value: "=", description: "\"=\"" }, + peg$c33 = function(selector, pattern) { + return { + type : 'optionalFormatPattern', + selector: selector, + value : pattern + }; + }, + peg$c34 = "offset:", + peg$c35 = { type: "literal", value: "offset:", description: "\"offset:\"" }, + peg$c36 = function(number) { + return number; + }, + peg$c37 = function(offset, options) { + return { + type : 'pluralFormat', + offset : offset, + options: options + }; + }, + peg$c38 = { type: "other", description: "whitespace" }, + peg$c39 = /^[ \t\n\r]/, + peg$c40 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" }, + peg$c41 = { type: "other", description: "optionalWhitespace" }, + peg$c42 = /^[0-9]/, + peg$c43 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c44 = /^[0-9a-f]/i, + peg$c45 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" }, + peg$c46 = "0", + peg$c47 = { type: "literal", value: "0", description: "\"0\"" }, + peg$c48 = /^[1-9]/, + peg$c49 = { type: "class", value: "[1-9]", description: "[1-9]" }, + peg$c50 = function(digits) { + return parseInt(digits, 10); + }, + peg$c51 = /^[^{}\\\0-\x1F \t\n\r]/, + peg$c52 = { type: "class", value: "[^{}\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}\\\\\\0-\\x1F \\t\\n\\r]" }, + peg$c53 = "\\\\", + peg$c54 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, + peg$c55 = function() { return '\\'; }, + peg$c56 = "\\#", + peg$c57 = { type: "literal", value: "\\#", description: "\"\\\\#\"" }, + peg$c58 = function() { return '\\#'; }, + peg$c59 = "\\{", + peg$c60 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, + peg$c61 = function() { return '\u007B'; }, + peg$c62 = "\\}", + peg$c63 = { type: "literal", value: "\\}", description: "\"\\\\}\"" }, + peg$c64 = function() { return '\u007D'; }, + peg$c65 = "\\u", + peg$c66 = { type: "literal", value: "\\u", description: "\"\\\\u\"" }, + peg$c67 = function(digits) { + return String.fromCharCode(parseInt(digits, 16)); + }, + peg$c68 = function(chars) { return chars.join(''); }, + + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$reportedPos, peg$currPos); + } + + function offset() { + return peg$reportedPos; + } + + function line() { + return peg$computePosDetails(peg$reportedPos).line; + } + + function column() { + return peg$computePosDetails(peg$reportedPos).column; + } + + function expected(description) { + throw peg$buildException( + null, + [{ type: "other", description: description }], + peg$reportedPos + ); + } + + function error(message) { + throw peg$buildException(message, null, peg$reportedPos); + } + + function peg$computePosDetails(pos) { + function advance(details, startPos, endPos) { + var p, ch; + + for (p = startPos; p < endPos; p++) { + ch = input.charAt(p); + if (ch === "\n") { + if (!details.seenCR) { details.line++; } + details.column = 1; + details.seenCR = false; + } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { + details.line++; + details.column = 1; + details.seenCR = true; + } else { + details.column++; + details.seenCR = false; + } + } + } + + if (peg$cachedPos !== pos) { + if (peg$cachedPos > pos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advance(peg$cachedPosDetails, peg$cachedPos, pos); + peg$cachedPos = pos; + } + + return peg$cachedPosDetails; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildException(message, expected, pos) { + function cleanupExpected(expected) { + var i = 1; + + expected.sort(function(a, b) { + if (a.description < b.description) { + return -1; + } else if (a.description > b.description) { + return 1; + } else { + return 0; + } + }); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } + } + } + + function buildMessage(expected, found) { + function stringEscape(s) { + function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } + + return s + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) + .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); }) + .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) + .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); + } + + var expectedDescs = new Array(expected.length), + expectedDesc, foundDesc, i; + + for (i = 0; i < expected.length; i++) { + expectedDescs[i] = expected[i].description; + } + + expectedDesc = expected.length > 1 + ? expectedDescs.slice(0, -1).join(", ") + + " or " + + expectedDescs[expected.length - 1] + : expectedDescs[0]; + + foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; + + return "Expected " + expectedDesc + " but " + foundDesc + " found."; + } + + var posDetails = peg$computePosDetails(pos), + found = pos < input.length ? input.charAt(pos) : null; + + if (expected !== null) { + cleanupExpected(expected); + } + + return new SyntaxError( + message !== null ? message : buildMessage(expected, found), + expected, + found, + pos, + posDetails.line, + posDetails.column + ); + } + + function peg$parsestart() { + var s0; + + s0 = peg$parsemessageFormatPattern(); + + return s0; + } + + function peg$parsemessageFormatPattern() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsemessageFormatElement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsemessageFormatElement(); + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c1(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsemessageFormatElement() { + var s0; + + s0 = peg$parsemessageTextElement(); + if (s0 === peg$FAILED) { + s0 = peg$parseargumentElement(); + } + + return s0; + } + + function peg$parsemessageText() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parsechars(); + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parsechars(); + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c3(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsews(); + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parsemessageTextElement() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parsemessageText(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c4(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseargument() { + var s0, s1, s2; + + s0 = peg$parsenumber(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + if (peg$c5.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c5.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } + } + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parseargumentElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c7; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c8); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargument(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c10; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + s8 = peg$parseelementFormat(); + if (s8 !== peg$FAILED) { + s6 = [s6, s7, s8]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$c2; + } + } else { + peg$currPos = s5; + s5 = peg$c2; + } + } else { + peg$currPos = s5; + s5 = peg$c2; + } + if (s5 === peg$FAILED) { + s5 = peg$c9; + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c12; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s7 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c14(s3, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseelementFormat() { + var s0; + + s0 = peg$parsesimpleFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parsepluralFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectOrdinalFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectFormat(); + } + } + } + + return s0; + } + + function peg$parsesimpleFormat() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c15) { + s1 = peg$c15; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c16); } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c17) { + s1 = peg$c17; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c18); } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c19) { + s1 = peg$c19; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c20); } + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c10; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsechars(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + if (s3 === peg$FAILED) { + s3 = peg$c9; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c21(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsepluralFormat() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c22) { + s1 = peg$c22; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c23); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsepluralStyle(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c24(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselectOrdinalFormat() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 13) === peg$c25) { + s1 = peg$c25; + peg$currPos += 13; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsepluralStyle(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c27(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselectFormat() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c28) { + s1 = peg$c28; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c29); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseoptionalFormatPattern(); + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseoptionalFormatPattern(); + } + } else { + s5 = peg$c2; + } + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c30(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselector() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c31; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c2; + } + } else { + peg$currPos = s1; + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parsechars(); + } + + return s0; + } + + function peg$parseoptionalFormatPattern() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseselector(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c7; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c8); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsemessageFormatPattern(); + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c12; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s8 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseoffset() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c34) { + s1 = peg$c34; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c35); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c36(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsepluralStyle() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseoffset(); + if (s1 === peg$FAILED) { + s1 = peg$c9; + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseoptionalFormatPattern(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseoptionalFormatPattern(); + } + } else { + s3 = peg$c2; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c37(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsews() { + var s0, s1; + + peg$silentFails++; + s0 = []; + if (peg$c39.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c40); } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c39.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c40); } + } + } + } else { + s0 = peg$c2; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + + return s0; + } + + function peg$parse_() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsews(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsews(); + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c41); } + } + + return s0; + } + + function peg$parsedigit() { + var s0; + + if (peg$c42.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c43); } + } + + return s0; + } + + function peg$parsehexDigit() { + var s0; + + if (peg$c44.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c45); } + } + + return s0; + } + + function peg$parsenumber() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s1 = peg$c46; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c47); } + } + if (s1 === peg$FAILED) { + s1 = peg$currPos; + s2 = peg$currPos; + if (peg$c48.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c49); } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parsedigit(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parsedigit(); + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + if (s2 !== peg$FAILED) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsechar() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + if (peg$c51.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c52); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c53) { + s1 = peg$c53; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c54); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c55(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c56) { + s1 = peg$c56; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c57); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c59) { + s1 = peg$c59; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c60); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c61(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c62) { + s1 = peg$c62; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c63); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c64(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c65) { + s1 = peg$c65; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c66); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + s4 = peg$parsehexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsehexDigit(); + if (s5 !== peg$FAILED) { + s6 = peg$parsehexDigit(); + if (s6 !== peg$FAILED) { + s7 = peg$parsehexDigit(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + if (s3 !== peg$FAILED) { + s3 = input.substring(s2, peg$currPos); + } + s2 = s3; + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c67(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } + } + } + } + } + + return s0; + } + + function peg$parsechars() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsechar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsechar(); + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c68(s1); + } + s0 = s1; + + return s0; + } + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail({ type: "end", description: "end of input" }); + } + + throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); + } + } + + return { + SyntaxError: SyntaxError, + parse: parse + }; + })(); + + var $$core$$default = $$core$$MessageFormat; + + // -- MessageFormat -------------------------------------------------------- + + function $$core$$MessageFormat(message, locales, formats) { + // Parse string messages into an AST. + var ast = typeof message === 'string' ? + $$core$$MessageFormat.__parse(message) : message; + + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new TypeError('A message must be provided as a String or AST.'); + } + + // Creates a new object with the specified `formats` merged with the default + // formats. + formats = this._mergeFormats($$core$$MessageFormat.formats, formats); + + // Defined first because it's used to build the format pattern. + $$es5$$defineProperty(this, '_locale', {value: this._resolveLocale(locales)}); + + // Compile the `ast` to a pattern that is highly optimized for repeated + // `format()` invocations. **Note:** This passes the `locales` set provided + // to the constructor instead of just the resolved locale. + var pluralFn = this._findPluralRuleFunction(this._locale); + var pattern = this._compilePattern(ast, locales, formats, pluralFn); + + // "Bind" `format()` method to `this` so it can be passed by reference like + // the other `Intl` APIs. + var messageFormat = this; + this.format = function (values) { + return messageFormat._format(pattern, values); + }; + } + + // Default format options used as the prototype of the `formats` provided to the + // constructor. These are used when constructing the internal Intl.NumberFormat + // and Intl.DateTimeFormat instances. + $$es5$$defineProperty($$core$$MessageFormat, 'formats', { + enumerable: true, + + value: { + number: { + 'currency': { + style: 'currency' + }, + + 'percent': { + style: 'percent' + } + }, + + date: { + 'short': { + month: 'numeric', + day : 'numeric', + year : '2-digit' + }, + + 'medium': { + month: 'short', + day : 'numeric', + year : 'numeric' + }, + + 'long': { + month: 'long', + day : 'numeric', + year : 'numeric' + }, + + 'full': { + weekday: 'long', + month : 'long', + day : 'numeric', + year : 'numeric' + } + }, + + time: { + 'short': { + hour : 'numeric', + minute: 'numeric' + }, + + 'medium': { + hour : 'numeric', + minute: 'numeric', + second: 'numeric' + }, + + 'long': { + hour : 'numeric', + minute : 'numeric', + second : 'numeric', + timeZoneName: 'short' + }, + + 'full': { + hour : 'numeric', + minute : 'numeric', + second : 'numeric', + timeZoneName: 'short' + } + } + } + }); + + // Define internal private properties for dealing with locale data. + $$es5$$defineProperty($$core$$MessageFormat, '__localeData__', {value: $$es5$$objCreate(null)}); + $$es5$$defineProperty($$core$$MessageFormat, '__addLocaleData', {value: function (data) { + if (!(data && data.locale)) { + throw new Error( + 'Locale data provided to IntlMessageFormat is missing a ' + + '`locale` property' + ); + } + + $$core$$MessageFormat.__localeData__[data.locale.toLowerCase()] = data; + }}); + + // Defines `__parse()` static method as an exposed private. + $$es5$$defineProperty($$core$$MessageFormat, '__parse', {value: intl$messageformat$parser$$default.parse}); + + // Define public `defaultLocale` property which defaults to English, but can be + // set by the developer. + $$es5$$defineProperty($$core$$MessageFormat, 'defaultLocale', { + enumerable: true, + writable : true, + value : undefined + }); + + $$core$$MessageFormat.prototype.resolvedOptions = function () { + // TODO: Provide anything else? + return { + locale: this._locale + }; + }; + + $$core$$MessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) { + var compiler = new $$compiler$$default(locales, formats, pluralFn); + return compiler.compile(ast); + }; + + $$core$$MessageFormat.prototype._findPluralRuleFunction = function (locale) { + var localeData = $$core$$MessageFormat.__localeData__; + var data = localeData[locale.toLowerCase()]; + + // The locale data is de-duplicated, so we have to traverse the locale's + // hierarchy until we find a `pluralRuleFunction` to return. + while (data) { + if (data.pluralRuleFunction) { + return data.pluralRuleFunction; + } + + data = data.parentLocale && localeData[data.parentLocale.toLowerCase()]; + } + + throw new Error( + 'Locale data added to IntlMessageFormat is missing a ' + + '`pluralRuleFunction` for :' + locale + ); + }; + + $$core$$MessageFormat.prototype._format = function (pattern, values) { + var result = '', + i, len, part, id, value; + + for (i = 0, len = pattern.length; i < len; i += 1) { + part = pattern[i]; + + // Exist early for string parts. + if (typeof part === 'string') { + result += part; + continue; + } + + id = part.id; + + // Enforce that all required values are provided by the caller. + if (!(values && $$utils$$hop.call(values, id))) { + throw new Error('A value must be provided for: ' + id); + } + + value = values[id]; + + // Recursively format plural and select parts' option — which can be a + // nested pattern structure. The choosing of the option to use is + // abstracted-by and delegated-to the part helper object. + if (part.options) { + result += this._format(part.getOption(value), values); + } else { + result += part.format(value); + } + } + + return result; + }; + + $$core$$MessageFormat.prototype._mergeFormats = function (defaults, formats) { + var mergedFormats = {}, + type, mergedType; + + for (type in defaults) { + if (!$$utils$$hop.call(defaults, type)) { continue; } + + mergedFormats[type] = mergedType = $$es5$$objCreate(defaults[type]); + + if (formats && $$utils$$hop.call(formats, type)) { + $$utils$$extend(mergedType, formats[type]); + } + } + + return mergedFormats; + }; + + $$core$$MessageFormat.prototype._resolveLocale = function (locales) { + if (typeof locales === 'string') { + locales = [locales]; + } + + // Create a copy of the array so we can push on the default locale. + locales = (locales || []).concat($$core$$MessageFormat.defaultLocale); + + var localeData = $$core$$MessageFormat.__localeData__; + var i, len, localeParts, data; + + // Using the set of locales + the default locale, we look for the first one + // which that has been registered. When data does not exist for a locale, we + // traverse its ancestors to find something that's been registered within + // its hierarchy of locales. Since we lack the proper `parentLocale` data + // here, we must take a naive approach to traversal. + for (i = 0, len = locales.length; i < len; i += 1) { + localeParts = locales[i].toLowerCase().split('-'); + + while (localeParts.length) { + data = localeData[localeParts.join('-')]; + if (data) { + // Return the normalized locale string; e.g., we return "en-US", + // instead of "en-us". + return data.locale; + } + + localeParts.pop(); + } + } + + var defaultLocale = locales.pop(); + throw new Error( + 'No locale data has been added to IntlMessageFormat for: ' + + locales.join(', ') + ', or the default locale: ' + defaultLocale + ); + }; + var $$en$$default = {"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}}; + + $$core$$default.__addLocaleData($$en$$default); + $$core$$default.defaultLocale = 'en'; + + var src$main$$default = $$core$$default; + this['IntlMessageFormat'] = src$main$$default; +}).call(this); + +// +IntlMessageFormat.__addLocaleData({"locale":"af","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"af-NA","parentLocale":"af"}); + +IntlMessageFormat.__addLocaleData({"locale":"agq","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ak","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"am","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ar","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return"other";return n==0?"zero":n==1?"one":n==2?"two":n100>=3&&n100<=10?"few":n100>=11&&n100<=99?"many":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ar-AE","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-BH","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-DJ","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-DZ","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-EG","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-EH","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-ER","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-IL","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-IQ","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-JO","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-KM","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-KW","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-LB","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-LY","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-MA","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-MR","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-OM","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-PS","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-QA","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SA","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SD","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SO","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SS","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SY","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-TD","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-TN","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-YE","parentLocale":"ar"}); + +IntlMessageFormat.__addLocaleData({"locale":"as","pluralRuleFunction":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"asa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ast","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"az","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],i10=i.slice(-1),i100=i.slice(-2),i1000=i.slice(-3);if(ord)return i10==1||i10==2||i10==5||i10==7||i10==8||(i100==20||i100==50||i100==70||i100==80)?"one":i10==3||i10==4||(i1000==100||i1000==200||i1000==300||i1000==400||i1000==500||i1000==600||i1000==700||i1000==800||i1000==900)?"few":i==0||i10==6||(i100==40||i100==60||i100==90)?"many":"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"az-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"az-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"az-Latn","parentLocale":"az"}); + +IntlMessageFormat.__addLocaleData({"locale":"bas","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"be","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==2||n10==3)&&n100!=12&&n100!=13?"few":"other";return n10==1&&n100!=11?"one":n10>=2&&n10<=4&&(n100<12||n100>14)?"few":t0&&n10==0||n10>=5&&n10<=9||n100>=11&&n100<=14?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bem","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bez","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bm","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bm-Nkoo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bn","pluralRuleFunction":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bn-IN","parentLocale":"bn"}); + +IntlMessageFormat.__addLocaleData({"locale":"bo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bo-IN","parentLocale":"bo"}); + +IntlMessageFormat.__addLocaleData({"locale":"br","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),n1000000=t0&&s[0].slice(-6);if(ord)return"other";return n10==1&&n100!=11&&n100!=71&&n100!=91?"one":n10==2&&n100!=12&&n100!=72&&n100!=92?"two":(n10==3||n10==4||n10==9)&&(n100<10||n100>19)&&(n100<70||n100>79)&&(n100<90||n100>99)?"few":n!=0&&t0&&n1000000==0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"brx","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"bs","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bs-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bs-Latn","parentLocale":"bs"}); + +IntlMessageFormat.__addLocaleData({"locale":"ca","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return n==1||n==3?"one":n==2?"two":n==4?"few":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ca-AD","parentLocale":"ca"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-ES-VALENCIA","parentLocale":"ca-ES"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-ES","parentLocale":"ca"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-FR","parentLocale":"ca"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-IT","parentLocale":"ca"}); + +IntlMessageFormat.__addLocaleData({"locale":"ce","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"cgg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"chr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ckb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ckb-IR","parentLocale":"ckb"}); + +IntlMessageFormat.__addLocaleData({"locale":"cs","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1];if(ord)return"other";return n==1&&v0?"one":i>=2&&i<=4&&v0?"few":!v0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"cu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"cy","pluralRuleFunction":function (n,ord){if(ord)return n==0||n==7||n==8||n==9?"zero":n==1?"one":n==2?"two":n==3||n==4?"few":n==5||n==6?"many":"other";return n==0?"zero":n==1?"one":n==2?"two":n==3?"few":n==6?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"da","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],t0=Number(s[0])==n;if(ord)return"other";return n==1||!t0&&(i==0||i==1)?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"da-GL","parentLocale":"da"}); + +IntlMessageFormat.__addLocaleData({"locale":"dav","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"de","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"de-AT","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-BE","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-CH","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-LI","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-LU","parentLocale":"de"}); + +IntlMessageFormat.__addLocaleData({"locale":"dje","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"dsb","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return"other";return v0&&i100==1||f100==1?"one":v0&&i100==2||f100==2?"two":v0&&(i100==3||i100==4)||(f100==3||f100==4)?"few":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"dua","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"dv","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"dyo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"dz","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ebu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ee","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ee-TG","parentLocale":"ee"}); + +IntlMessageFormat.__addLocaleData({"locale":"el","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"el-CY","parentLocale":"el"}); + +IntlMessageFormat.__addLocaleData({"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"en-001","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-150","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AI","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AS","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AT","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BB","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BI","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CA","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CH","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CX","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DE","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DK","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-Dsrt","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"en-ER","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FI","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FJ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GB","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GD","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GH","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GI","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GU","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-HK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IL","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IN","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IO","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-JE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-JM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KI","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KN","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-LC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-LR","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-LS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MH","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MO","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MP","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MT","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NA","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NF","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NL","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NR","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PH","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PN","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PR","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-RW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SB","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SD","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SE","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SH","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SI","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SL","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SX","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-Shaw","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"en-TC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TO","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TT","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TV","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-UG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-UM","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-US","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VI","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-WS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-ZA","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-ZM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-ZW","parentLocale":"en-001"}); + +IntlMessageFormat.__addLocaleData({"locale":"eo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"es","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"es-419","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-AR","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-BO","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CL","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CO","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CR","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CU","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-DO","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-EA","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-EC","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-GQ","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-GT","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-HN","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-IC","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-MX","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-NI","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PA","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PE","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PH","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PR","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PY","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-SV","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-US","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-UY","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-VE","parentLocale":"es-419"}); + +IntlMessageFormat.__addLocaleData({"locale":"et","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"eu","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ewo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"fa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"fa-AF","parentLocale":"fa"}); + +IntlMessageFormat.__addLocaleData({"locale":"ff","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<2?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ff-CM","parentLocale":"ff"}); +IntlMessageFormat.__addLocaleData({"locale":"ff-GN","parentLocale":"ff"}); +IntlMessageFormat.__addLocaleData({"locale":"ff-MR","parentLocale":"ff"}); + +IntlMessageFormat.__addLocaleData({"locale":"fi","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"fil","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?"one":"other";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"fo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"fo-DK","parentLocale":"fo"}); + +IntlMessageFormat.__addLocaleData({"locale":"fr","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return n>=0&&n<2?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BE","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BI","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BJ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BL","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CA","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CD","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CG","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CH","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CI","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CM","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-DJ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-DZ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GA","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GN","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GP","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GQ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-HT","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-KM","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-LU","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MA","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MC","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MG","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-ML","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MQ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MR","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MU","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-NC","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-NE","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-PF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-PM","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-RE","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-RW","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-SC","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-SN","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-SY","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-TD","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-TG","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-TN","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-VU","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-WF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-YT","parentLocale":"fr"}); + +IntlMessageFormat.__addLocaleData({"locale":"fur","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"fy","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ga","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return n==1?"one":"other";return n==1?"one":n==2?"two":t0&&n>=3&&n<=6?"few":t0&&n>=7&&n<=10?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"gd","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return n==1||n==11?"one":n==2||n==12?"two":t0&&n>=3&&n<=10||t0&&n>=13&&n<=19?"few":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"gl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"gsw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"gsw-FR","parentLocale":"gsw"}); +IntlMessageFormat.__addLocaleData({"locale":"gsw-LI","parentLocale":"gsw"}); + +IntlMessageFormat.__addLocaleData({"locale":"gu","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"guw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"guz","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"gv","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return v0&&i10==1?"one":v0&&i10==2?"two":v0&&(i100==0||i100==20||i100==40||i100==60||i100==80)?"few":!v0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ha","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ha-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ha-GH","parentLocale":"ha"}); +IntlMessageFormat.__addLocaleData({"locale":"ha-NE","parentLocale":"ha"}); + +IntlMessageFormat.__addLocaleData({"locale":"haw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"he","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return"other";return n==1&&v0?"one":i==2&&v0?"two":v0&&(n<0||n>10)&&t0&&n10==0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"hi","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"hr","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"hr-BA","parentLocale":"hr"}); + +IntlMessageFormat.__addLocaleData({"locale":"hsb","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return"other";return v0&&i100==1||f100==1?"one":v0&&i100==2||f100==2?"two":v0&&(i100==3||i100==4)||(f100==3||f100==4)?"few":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"hu","pluralRuleFunction":function (n,ord){if(ord)return n==1||n==5?"one":"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"hy","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return n>=0&&n<2?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"id","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ig","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ii","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"in","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"is","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],t0=Number(s[0])==n,i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return t0&&i10==1&&i100!=11||!t0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"it","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return n==11||n==8||n==80||n==800?"many":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"it-CH","parentLocale":"it"}); +IntlMessageFormat.__addLocaleData({"locale":"it-SM","parentLocale":"it"}); + +IntlMessageFormat.__addLocaleData({"locale":"iu","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"iu-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"iw","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return"other";return n==1&&v0?"one":i==2&&v0?"two":v0&&(n<0||n>10)&&t0&&n10==0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ja","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"jbo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"jgo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ji","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"jmc","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"jv","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"jw","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ka","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],i100=i.slice(-2);if(ord)return i==1?"one":i==0||(i100>=2&&i100<=20||i100==40||i100==60||i100==80)?"many":"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kab","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<2?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kaj","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kam","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kcg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kde","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kea","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"khq","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ki","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return n10==6||n10==9||t0&&n10==0&&n!=0?"many":"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kkj","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kl","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kln","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"km","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ko","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ko-KP","parentLocale":"ko"}); + +IntlMessageFormat.__addLocaleData({"locale":"kok","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ks","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ksb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ksf","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ksh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0?"zero":n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ku","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"kw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ky","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lag","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0];if(ord)return"other";return n==0?"zero":(i==0||i==1)&&n!=0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lkt","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ln","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ln-AO","parentLocale":"ln"}); +IntlMessageFormat.__addLocaleData({"locale":"ln-CF","parentLocale":"ln"}); +IntlMessageFormat.__addLocaleData({"locale":"ln-CG","parentLocale":"ln"}); + +IntlMessageFormat.__addLocaleData({"locale":"lo","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lrc","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"lrc-IQ","parentLocale":"lrc"}); + +IntlMessageFormat.__addLocaleData({"locale":"lt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),f=s[1]||"",t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return"other";return n10==1&&(n100<11||n100>19)?"one":n10>=2&&n10<=9&&(n100<11||n100>19)?"few":f!=0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"luo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"luy","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"lv","pluralRuleFunction":function (n,ord){var s=String(n).split("."),f=s[1]||"",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return"other";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?"zero":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mas","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"mas-TZ","parentLocale":"mas"}); + +IntlMessageFormat.__addLocaleData({"locale":"mer","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mfe","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mgh","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mgo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1);if(ord)return i10==1&&i100!=11?"one":i10==2&&i100!=12?"two":(i10==7||i10==8)&&i100!=17&&i100!=18?"many":"other";return v0&&i10==1||f10==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ml","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"mn-Mong","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mo","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?"one":"other";return n==1&&v0?"one":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?"few":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mr","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":n==2||n==3?"two":n==4?"few":"other";return n>=0&&n<=1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ms","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ms-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ms-BN","parentLocale":"ms"}); +IntlMessageFormat.__addLocaleData({"locale":"ms-SG","parentLocale":"ms"}); + +IntlMessageFormat.__addLocaleData({"locale":"mt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return"other";return n==1?"one":n==0||n100>=2&&n100<=10?"few":n100>=11&&n100<=19?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mua","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"my","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"mzn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nah","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"naq","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"nb-SJ","parentLocale":"nb"}); + +IntlMessageFormat.__addLocaleData({"locale":"nd","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ne","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return t0&&n>=1&&n<=4?"one":"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ne-IN","parentLocale":"ne"}); + +IntlMessageFormat.__addLocaleData({"locale":"nl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"nl-AW","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-BE","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-BQ","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-CW","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-SR","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-SX","parentLocale":"nl"}); + +IntlMessageFormat.__addLocaleData({"locale":"nmg","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nnh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"no","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nqo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nso","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nus","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ny","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"nyn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"om","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"om-KE","parentLocale":"om"}); + +IntlMessageFormat.__addLocaleData({"locale":"or","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"os","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"os-RU","parentLocale":"os"}); + +IntlMessageFormat.__addLocaleData({"locale":"pa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pa-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pa-Guru","parentLocale":"pa"}); + +IntlMessageFormat.__addLocaleData({"locale":"pap","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"pl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return n==1&&v0?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?"few":v0&&i!=1&&(i10==0||i10==1)||v0&&(i10>=5&&i10<=9)||v0&&(i100>=12&&i100<=14)?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"prg","pluralRuleFunction":function (n,ord){var s=String(n).split("."),f=s[1]||"",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return"other";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?"zero":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ps","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"pt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return t0&&n>=0&&n<=2&&n!=2?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pt-AO","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-PT","parentLocale":"pt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pt-CV","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-GW","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-MO","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-MZ","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-ST","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-TL","parentLocale":"pt-PT"}); + +IntlMessageFormat.__addLocaleData({"locale":"qu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"qu-BO","parentLocale":"qu"}); +IntlMessageFormat.__addLocaleData({"locale":"qu-EC","parentLocale":"qu"}); + +IntlMessageFormat.__addLocaleData({"locale":"rm","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"rn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ro","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?"one":"other";return n==1&&v0?"one":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ro-MD","parentLocale":"ro"}); + +IntlMessageFormat.__addLocaleData({"locale":"rof","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ru","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?"few":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?"many":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ru-BY","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-KG","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-KZ","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-MD","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-UA","parentLocale":"ru"}); + +IntlMessageFormat.__addLocaleData({"locale":"rw","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"rwk","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sah","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"saq","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sbp","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sdh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"se","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"se-FI","parentLocale":"se"}); +IntlMessageFormat.__addLocaleData({"locale":"se-SE","parentLocale":"se"}); + +IntlMessageFormat.__addLocaleData({"locale":"seh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ses","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sg","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sh","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"shi","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return n>=0&&n<=1?"one":t0&&n>=2&&n<=10?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"shi-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"shi-Tfng","parentLocale":"shi"}); + +IntlMessageFormat.__addLocaleData({"locale":"si","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"";if(ord)return"other";return n==0||n==1||i==0&&f==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1];if(ord)return"other";return n==1&&v0?"one":i>=2&&i<=4&&v0?"few":!v0?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i100=i.slice(-2);if(ord)return"other";return v0&&i100==1?"one":v0&&i100==2?"two":v0&&(i100==3||i100==4)||!v0?"few":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sma","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"smi","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"smj","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"smn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sms","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"so","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"so-DJ","parentLocale":"so"}); +IntlMessageFormat.__addLocaleData({"locale":"so-ET","parentLocale":"so"}); +IntlMessageFormat.__addLocaleData({"locale":"so-KE","parentLocale":"so"}); + +IntlMessageFormat.__addLocaleData({"locale":"sq","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n==1?"one":n10==4&&n100!=14?"many":"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sq-MK","parentLocale":"sq"}); +IntlMessageFormat.__addLocaleData({"locale":"sq-XK","parentLocale":"sq"}); + +IntlMessageFormat.__addLocaleData({"locale":"sr","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl","parentLocale":"sr"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl-BA","parentLocale":"sr-Cyrl"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl-ME","parentLocale":"sr-Cyrl"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl-XK","parentLocale":"sr-Cyrl"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn-BA","parentLocale":"sr-Latn"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn-ME","parentLocale":"sr-Latn"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn-XK","parentLocale":"sr-Latn"}); + +IntlMessageFormat.__addLocaleData({"locale":"ss","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ssy","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"st","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"sv","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==1||n10==2)&&n100!=11&&n100!=12?"one":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sv-AX","parentLocale":"sv"}); +IntlMessageFormat.__addLocaleData({"locale":"sv-FI","parentLocale":"sv"}); + +IntlMessageFormat.__addLocaleData({"locale":"sw","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sw-CD","parentLocale":"sw"}); +IntlMessageFormat.__addLocaleData({"locale":"sw-KE","parentLocale":"sw"}); +IntlMessageFormat.__addLocaleData({"locale":"sw-UG","parentLocale":"sw"}); + +IntlMessageFormat.__addLocaleData({"locale":"syr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ta","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ta-LK","parentLocale":"ta"}); +IntlMessageFormat.__addLocaleData({"locale":"ta-MY","parentLocale":"ta"}); +IntlMessageFormat.__addLocaleData({"locale":"ta-SG","parentLocale":"ta"}); + +IntlMessageFormat.__addLocaleData({"locale":"te","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"teo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"teo-KE","parentLocale":"teo"}); + +IntlMessageFormat.__addLocaleData({"locale":"th","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ti","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ti-ER","parentLocale":"ti"}); + +IntlMessageFormat.__addLocaleData({"locale":"tig","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"tk","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"tl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?"one":"other";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"tn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"to","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"tr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"tr-CY","parentLocale":"tr"}); + +IntlMessageFormat.__addLocaleData({"locale":"ts","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"twq","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"tzm","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return n==0||n==1||t0&&n>=11&&n<=99?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ug","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"uk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),i10=i.slice(-1),i100=i.slice(-2);if(ord)return n10==3&&n100!=13?"few":"other";return v0&&i10==1&&i100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?"few":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?"many":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"ur","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ur-IN","parentLocale":"ur"}); + +IntlMessageFormat.__addLocaleData({"locale":"uz","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"uz-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"uz-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"uz-Latn","parentLocale":"uz"}); + +IntlMessageFormat.__addLocaleData({"locale":"vai","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"vai-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"vai-Vaii","parentLocale":"vai"}); + +IntlMessageFormat.__addLocaleData({"locale":"ve","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"vi","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"vo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"vun","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"wa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"wae","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"wo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"xh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"xog","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"yav","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"yi","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"yo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"yo-BJ","parentLocale":"yo"}); + +IntlMessageFormat.__addLocaleData({"locale":"zgh","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); + +IntlMessageFormat.__addLocaleData({"locale":"zh","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans","parentLocale":"zh"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans-HK","parentLocale":"zh-Hans"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans-MO","parentLocale":"zh-Hans"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans-SG","parentLocale":"zh-Hans"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hant","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hant-HK","parentLocale":"zh-Hant"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hant-MO","parentLocale":"zh-Hant-HK"}); + +IntlMessageFormat.__addLocaleData({"locale":"zu","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); + +//# sourceMappingURL=intl-messageformat-with-locales.js.map \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat-with-locales.js.map b/lib/intl-messageformat/dist/intl-messageformat-with-locales.js.map new file mode 100644 index 00000000..c782fbcc --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat-with-locales.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["intl-messageformat/src/utils.js","intl-messageformat/src/es5.js","intl-messageformat/src/compiler.js","intl-messageformat/node_modules/intl-messageformat-parser/src/parser.js","intl-messageformat/src/core.js","intl-messageformat/src/en.js","intl-messageformat/src/main.js","locale-data/af.js","locale-data/agq.js","locale-data/ak.js","locale-data/am.js","locale-data/ar.js","locale-data/as.js","locale-data/asa.js","locale-data/ast.js","locale-data/az.js","locale-data/bas.js","locale-data/be.js","locale-data/bem.js","locale-data/bez.js","locale-data/bg.js","locale-data/bh.js","locale-data/bm.js","locale-data/bn.js","locale-data/bo.js","locale-data/br.js","locale-data/brx.js","locale-data/bs.js","locale-data/ca.js","locale-data/ce.js","locale-data/cgg.js","locale-data/chr.js","locale-data/ckb.js","locale-data/cs.js","locale-data/cu.js","locale-data/cy.js","locale-data/da.js","locale-data/dav.js","locale-data/de.js","locale-data/dje.js","locale-data/dsb.js","locale-data/dua.js","locale-data/dv.js","locale-data/dyo.js","locale-data/dz.js","locale-data/ebu.js","locale-data/ee.js","locale-data/el.js","locale-data/en.js","locale-data/eo.js","locale-data/es.js","locale-data/et.js","locale-data/eu.js","locale-data/ewo.js","locale-data/fa.js","locale-data/ff.js","locale-data/fi.js","locale-data/fil.js","locale-data/fo.js","locale-data/fr.js","locale-data/fur.js","locale-data/fy.js","locale-data/ga.js","locale-data/gd.js","locale-data/gl.js","locale-data/gsw.js","locale-data/gu.js","locale-data/guw.js","locale-data/guz.js","locale-data/gv.js","locale-data/ha.js","locale-data/haw.js","locale-data/he.js","locale-data/hi.js","locale-data/hr.js","locale-data/hsb.js","locale-data/hu.js","locale-data/hy.js","locale-data/id.js","locale-data/ig.js","locale-data/ii.js","locale-data/in.js","locale-data/is.js","locale-data/it.js","locale-data/iu.js","locale-data/iw.js","locale-data/ja.js","locale-data/jbo.js","locale-data/jgo.js","locale-data/ji.js","locale-data/jmc.js","locale-data/jv.js","locale-data/jw.js","locale-data/ka.js","locale-data/kab.js","locale-data/kaj.js","locale-data/kam.js","locale-data/kcg.js","locale-data/kde.js","locale-data/kea.js","locale-data/khq.js","locale-data/ki.js","locale-data/kk.js","locale-data/kkj.js","locale-data/kl.js","locale-data/kln.js","locale-data/km.js","locale-data/kn.js","locale-data/ko.js","locale-data/kok.js","locale-data/ks.js","locale-data/ksb.js","locale-data/ksf.js","locale-data/ksh.js","locale-data/ku.js","locale-data/kw.js","locale-data/ky.js","locale-data/lag.js","locale-data/lb.js","locale-data/lg.js","locale-data/lkt.js","locale-data/ln.js","locale-data/lo.js","locale-data/lrc.js","locale-data/lt.js","locale-data/lu.js","locale-data/luo.js","locale-data/luy.js","locale-data/lv.js","locale-data/mas.js","locale-data/mer.js","locale-data/mfe.js","locale-data/mg.js","locale-data/mgh.js","locale-data/mgo.js","locale-data/mk.js","locale-data/ml.js","locale-data/mn.js","locale-data/mo.js","locale-data/mr.js","locale-data/ms.js","locale-data/mt.js","locale-data/mua.js","locale-data/my.js","locale-data/mzn.js","locale-data/nah.js","locale-data/naq.js","locale-data/nb.js","locale-data/nd.js","locale-data/ne.js","locale-data/nl.js","locale-data/nmg.js","locale-data/nn.js","locale-data/nnh.js","locale-data/no.js","locale-data/nqo.js","locale-data/nr.js","locale-data/nso.js","locale-data/nus.js","locale-data/ny.js","locale-data/nyn.js","locale-data/om.js","locale-data/or.js","locale-data/os.js","locale-data/pa.js","locale-data/pap.js","locale-data/pl.js","locale-data/prg.js","locale-data/ps.js","locale-data/pt.js","locale-data/qu.js","locale-data/rm.js","locale-data/rn.js","locale-data/ro.js","locale-data/rof.js","locale-data/ru.js","locale-data/rw.js","locale-data/rwk.js","locale-data/sah.js","locale-data/saq.js","locale-data/sbp.js","locale-data/sdh.js","locale-data/se.js","locale-data/seh.js","locale-data/ses.js","locale-data/sg.js","locale-data/sh.js","locale-data/shi.js","locale-data/si.js","locale-data/sk.js","locale-data/sl.js","locale-data/sma.js","locale-data/smi.js","locale-data/smj.js","locale-data/smn.js","locale-data/sms.js","locale-data/sn.js","locale-data/so.js","locale-data/sq.js","locale-data/sr.js","locale-data/ss.js","locale-data/ssy.js","locale-data/st.js","locale-data/sv.js","locale-data/sw.js","locale-data/syr.js","locale-data/ta.js","locale-data/te.js","locale-data/teo.js","locale-data/th.js","locale-data/ti.js","locale-data/tig.js","locale-data/tk.js","locale-data/tl.js","locale-data/tn.js","locale-data/to.js","locale-data/tr.js","locale-data/ts.js","locale-data/twq.js","locale-data/tzm.js","locale-data/ug.js","locale-data/uk.js","locale-data/ur.js","locale-data/uz.js","locale-data/vai.js","locale-data/ve.js","locale-data/vi.js","locale-data/vo.js","locale-data/vun.js","locale-data/wa.js","locale-data/wae.js","locale-data/wo.js","locale-data/xh.js","locale-data/xog.js","locale-data/yav.js","locale-data/yi.js","locale-data/yo.js","locale-data/zgh.js","locale-data/zh.js","locale-data/zu.js"],"names":[],"mappings":";;IAQO,CAAC,CAAC,eAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;IAEzC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;QACxB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC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AAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,GAAG,EAAE,CAAC,IAAI,IAAI;AACpF,iBAAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,GAAG,EAAE,CAAC,IAAI,IAAI;AACpF,iBAAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,GAAG,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,KAAK;AAClI,iBAAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,GAAG,EAAE,CAAC,IAAI,IAAI;AACpF,iBAAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI;;ACPvF,iBAAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,GAAG,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,KAAK,KAAK","file":"intl-messageformat-with-locales.js","sourcesContent":["/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(\n element.id, format.ordinal, format.offset, options, pluralFn\n );\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conforms the spec's algorithm\n // for handling `\"#\"` syntax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original current plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, useOrdinal, offset, options, pluralFn) {\n this.id = id;\n this.useOrdinal = useOrdinal;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset, this.useOrdinal)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: false,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n };\n },\n peg$c25 = \"selectordinal\",\n peg$c26 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n peg$c27 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: true,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n }\n },\n peg$c28 = \"select\",\n peg$c29 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c30 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n };\n },\n peg$c31 = \"=\",\n peg$c32 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c33 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c34 = \"offset:\",\n peg$c35 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c36 = function(number) {\n return number;\n },\n peg$c37 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset,\n options: options\n };\n },\n peg$c38 = { type: \"other\", description: \"whitespace\" },\n peg$c39 = /^[ \\t\\n\\r]/,\n peg$c40 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c41 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c42 = /^[0-9]/,\n peg$c43 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c44 = /^[0-9a-f]/i,\n peg$c45 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c46 = \"0\",\n peg$c47 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c48 = /^[1-9]/,\n peg$c49 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c50 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c51 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c52 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c53 = \"\\\\\\\\\",\n peg$c54 = { type: \"literal\", value: \"\\\\\\\\\", description: \"\\\"\\\\\\\\\\\\\\\\\\\"\" },\n peg$c55 = function() { return '\\\\'; },\n peg$c56 = \"\\\\#\",\n peg$c57 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c58 = function() { return '\\\\#'; },\n peg$c59 = \"\\\\{\",\n peg$c60 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c61 = function() { return '\\u007B'; },\n peg$c62 = \"\\\\}\",\n peg$c63 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c64 = function() { return '\\u007D'; },\n peg$c65 = \"\\\\u\",\n peg$c66 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c67 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c68 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectOrdinalFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectOrdinalFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 13) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 13;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c28) {\n s1 = peg$c28;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c31;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c34) {\n s1 = peg$c34;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralStyle() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseoffset();\n if (s1 === peg$FAILED) {\n s1 = peg$c9;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parseoptionalFormatPattern();\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parseoptionalFormatPattern();\n }\n } else {\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c48.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c53) {\n s1 = peg$c53;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c55();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c56) {\n s1 = peg$c56;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c58();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c59) {\n s1 = peg$c59;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c67(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c68(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pluralFn = this._findPluralRuleFunction(this._locale);\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n MessageFormat.__localeData__[data.locale.toLowerCase()] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._findPluralRuleFunction = function (locale) {\n var localeData = MessageFormat.__localeData__;\n var data = localeData[locale.toLowerCase()];\n\n // The locale data is de-duplicated, so we have to traverse the locale's\n // hierarchy until we find a `pluralRuleFunction` to return.\n while (data) {\n if (data.pluralRuleFunction) {\n return data.pluralRuleFunction;\n }\n\n data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];\n }\n\n throw new Error(\n 'Locale data added to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` for :' + locale\n );\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n // Create a copy of the array so we can push on the default locale.\n locales = (locales || []).concat(MessageFormat.defaultLocale);\n\n var localeData = MessageFormat.__localeData__;\n var i, len, localeParts, data;\n\n // Using the set of locales + the default locale, we look for the first one\n // which that has been registered. When data does not exist for a locale, we\n // traverse its ancestors to find something that's been registered within\n // its hierarchy of locales. Since we lack the proper `parentLocale` data\n // here, we must take a naive approach to traversal.\n for (i = 0, len = locales.length; i < len; i += 1) {\n localeParts = locales[i].toLowerCase().split('-');\n\n while (localeParts.length) {\n data = localeData[localeParts.join('-')];\n if (data) {\n // Return the normalized locale string; e.g., we return \"en-US\",\n // instead of \"en-us\".\n return data.locale;\n }\n\n localeParts.pop();\n }\n }\n\n var defaultLocale = locales.pop();\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ') + ', or the default locale: ' + defaultLocale\n );\n};\n","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}};\n","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n","IntlMessageFormat.__addLocaleData({\"locale\":\"af\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"af-NA\",\"parentLocale\":\"af\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"agq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ak\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"am\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ar\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return\"other\";return n==0?\"zero\":n==1?\"one\":n==2?\"two\":n100>=3&&n100<=10?\"few\":n100>=11&&n100<=99?\"many\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-AE\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-BH\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-DJ\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-DZ\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-EG\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-EH\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-ER\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-IL\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-IQ\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-JO\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-KM\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-KW\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-LB\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-LY\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-MA\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-MR\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-OM\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-PS\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-QA\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SA\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SD\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SO\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SS\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SY\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-TD\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-TN\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-YE\",\"parentLocale\":\"ar\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"as\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"asa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ast\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"az\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],i10=i.slice(-1),i100=i.slice(-2),i1000=i.slice(-3);if(ord)return i10==1||i10==2||i10==5||i10==7||i10==8||(i100==20||i100==50||i100==70||i100==80)?\"one\":i10==3||i10==4||(i1000==100||i1000==200||i1000==300||i1000==400||i1000==500||i1000==600||i1000==700||i1000==800||i1000==900)?\"few\":i==0||i10==6||(i100==40||i100==60||i100==90)?\"many\":\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"az-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"az-Cyrl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"az-Latn\",\"parentLocale\":\"az\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bas\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"be\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==2||n10==3)&&n100!=12&&n100!=13?\"few\":\"other\";return n10==1&&n100!=11?\"one\":n10>=2&&n10<=4&&(n100<12||n100>14)?\"few\":t0&&n10==0||n10>=5&&n10<=9||n100>=11&&n100<=14?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bem\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bez\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bm\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bm-Nkoo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bn\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bn-IN\",\"parentLocale\":\"bn\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bo-IN\",\"parentLocale\":\"bo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"br\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),n1000000=t0&&s[0].slice(-6);if(ord)return\"other\";return n10==1&&n100!=11&&n100!=71&&n100!=91?\"one\":n10==2&&n100!=12&&n100!=72&&n100!=92?\"two\":(n10==3||n10==4||n10==9)&&(n100<10||n100>19)&&(n100<70||n100>79)&&(n100<90||n100>99)?\"few\":n!=0&&t0&&n1000000==0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"brx\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bs\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bs-Cyrl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bs-Latn\",\"parentLocale\":\"bs\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ca\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return n==1||n==3?\"one\":n==2?\"two\":n==4?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-AD\",\"parentLocale\":\"ca\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-ES-VALENCIA\",\"parentLocale\":\"ca-ES\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-ES\",\"parentLocale\":\"ca\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-FR\",\"parentLocale\":\"ca\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-IT\",\"parentLocale\":\"ca\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ce\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cgg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"chr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ckb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ckb-IR\",\"parentLocale\":\"ckb\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cs\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":i>=2&&i<=4&&v0?\"few\":!v0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cy\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==0||n==7||n==8||n==9?\"zero\":n==1?\"one\":n==2?\"two\":n==3||n==4?\"few\":n==5||n==6?\"many\":\"other\";return n==0?\"zero\":n==1?\"one\":n==2?\"two\":n==3?\"few\":n==6?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"da\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],t0=Number(s[0])==n;if(ord)return\"other\";return n==1||!t0&&(i==0||i==1)?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"da-GL\",\"parentLocale\":\"da\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dav\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"de\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-AT\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-BE\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-CH\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-LI\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-LU\",\"parentLocale\":\"de\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dje\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dsb\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return\"other\";return v0&&i100==1||f100==1?\"one\":v0&&i100==2||f100==2?\"two\":v0&&(i100==3||i100==4)||(f100==3||f100==4)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dua\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dv\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dyo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dz\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ebu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ee\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ee-TG\",\"parentLocale\":\"ee\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"el\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"el-CY\",\"parentLocale\":\"el\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-001\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-150\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AI\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AS\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AT\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BB\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BI\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CA\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CH\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CX\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DE\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DK\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-Dsrt\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ER\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FI\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FJ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GB\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GD\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GH\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GI\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GU\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-HK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IL\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IN\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IO\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-JE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-JM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KI\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KN\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-LC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-LR\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-LS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MH\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MO\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MP\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MT\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NA\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NF\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NL\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NR\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PH\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PN\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PR\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-RW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SB\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SD\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SE\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SH\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SI\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SL\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SX\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-Shaw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TO\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TT\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TV\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-UG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-UM\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-US\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VI\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-WS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ZA\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ZM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ZW\",\"parentLocale\":\"en-001\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"eo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"es\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-419\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-AR\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-BO\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CL\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CO\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CR\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CU\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-DO\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-EA\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-EC\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-GQ\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-GT\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-HN\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-IC\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-MX\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-NI\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PA\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PE\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PH\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PR\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PY\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-SV\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-US\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-UY\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-VE\",\"parentLocale\":\"es-419\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"et\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"eu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ewo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fa-AF\",\"parentLocale\":\"fa\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ff\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<2?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ff-CM\",\"parentLocale\":\"ff\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ff-GN\",\"parentLocale\":\"ff\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ff-MR\",\"parentLocale\":\"ff\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fi\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fil\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?\"one\":\"other\";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fo-DK\",\"parentLocale\":\"fo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fr\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return n>=0&&n<2?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BE\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BI\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BJ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BL\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CA\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CD\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CG\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CH\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CI\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CM\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-DJ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-DZ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GA\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GN\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GP\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GQ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-HT\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-KM\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-LU\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MA\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MC\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MG\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-ML\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MQ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MR\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MU\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-NC\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-NE\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-PF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-PM\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-RE\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-RW\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-SC\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-SN\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-SY\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-TD\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-TG\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-TN\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-VU\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-WF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-YT\",\"parentLocale\":\"fr\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fur\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fy\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ga\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return n==1?\"one\":\"other\";return n==1?\"one\":n==2?\"two\":t0&&n>=3&&n<=6?\"few\":t0&&n>=7&&n<=10?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gd\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return n==1||n==11?\"one\":n==2||n==12?\"two\":t0&&n>=3&&n<=10||t0&&n>=13&&n<=19?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gsw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"gsw-FR\",\"parentLocale\":\"gsw\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"gsw-LI\",\"parentLocale\":\"gsw\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gu\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"guw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"guz\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gv\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return v0&&i10==1?\"one\":v0&&i10==2?\"two\":v0&&(i100==0||i100==20||i100==40||i100==60||i100==80)?\"few\":!v0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ha\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ha-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ha-GH\",\"parentLocale\":\"ha\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ha-NE\",\"parentLocale\":\"ha\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"haw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"he\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return\"other\";return n==1&&v0?\"one\":i==2&&v0?\"two\":v0&&(n<0||n>10)&&t0&&n10==0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hi\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hr\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"hr-BA\",\"parentLocale\":\"hr\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hsb\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return\"other\";return v0&&i100==1||f100==1?\"one\":v0&&i100==2||f100==2?\"two\":v0&&(i100==3||i100==4)||(f100==3||f100==4)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hu\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1||n==5?\"one\":\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hy\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return n>=0&&n<2?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"id\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ig\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ii\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"in\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"is\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],t0=Number(s[0])==n,i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return t0&&i10==1&&i100!=11||!t0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"it\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return n==11||n==8||n==80||n==800?\"many\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"it-CH\",\"parentLocale\":\"it\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"it-SM\",\"parentLocale\":\"it\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"iu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"iu-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"iw\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return\"other\";return n==1&&v0?\"one\":i==2&&v0?\"two\":v0&&(n<0||n>10)&&t0&&n10==0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ja\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jbo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jgo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ji\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jmc\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jv\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ka\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],i100=i.slice(-2);if(ord)return i==1?\"one\":i==0||(i100>=2&&i100<=20||i100==40||i100==60||i100==80)?\"many\":\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<2?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kaj\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kam\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kcg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kde\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kea\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"khq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ki\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return n10==6||n10==9||t0&&n10==0&&n!=0?\"many\":\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kkj\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kln\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"km\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ko\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ko-KP\",\"parentLocale\":\"ko\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kok\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ks\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ksb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ksf\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ksh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0?\"zero\":n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ku\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ky\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lag\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0];if(ord)return\"other\";return n==0?\"zero\":(i==0||i==1)&&n!=0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lkt\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ln\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ln-AO\",\"parentLocale\":\"ln\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ln-CF\",\"parentLocale\":\"ln\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ln-CG\",\"parentLocale\":\"ln\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lo\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lrc\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"lrc-IQ\",\"parentLocale\":\"lrc\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),f=s[1]||\"\",t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return\"other\";return n10==1&&(n100<11||n100>19)?\"one\":n10>=2&&n10<=9&&(n100<11||n100>19)?\"few\":f!=0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"luo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"luy\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lv\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),f=s[1]||\"\",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return\"other\";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?\"zero\":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mas\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"mas-TZ\",\"parentLocale\":\"mas\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mer\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mfe\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mgh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mgo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1);if(ord)return i10==1&&i100!=11?\"one\":i10==2&&i100!=12?\"two\":(i10==7||i10==8)&&i100!=17&&i100!=18?\"many\":\"other\";return v0&&i10==1||f10==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ml\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"mn-Mong\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mo\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?\"one\":\"other\";return n==1&&v0?\"one\":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mr\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":n==2||n==3?\"two\":n==4?\"few\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ms\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ms-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ms-BN\",\"parentLocale\":\"ms\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ms-SG\",\"parentLocale\":\"ms\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return\"other\";return n==1?\"one\":n==0||n100>=2&&n100<=10?\"few\":n100>=11&&n100<=19?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mua\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"my\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mzn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nah\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"naq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nb-SJ\",\"parentLocale\":\"nb\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nd\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ne\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return t0&&n>=1&&n<=4?\"one\":\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ne-IN\",\"parentLocale\":\"ne\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-AW\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-BE\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-BQ\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-CW\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-SR\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-SX\",\"parentLocale\":\"nl\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nmg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nnh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"no\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nqo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nso\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nus\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ny\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nyn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"om\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"om-KE\",\"parentLocale\":\"om\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"or\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"os\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"os-RU\",\"parentLocale\":\"os\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pa-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pa-Guru\",\"parentLocale\":\"pa\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pap\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return n==1&&v0?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?\"few\":v0&&i!=1&&(i10==0||i10==1)||v0&&(i10>=5&&i10<=9)||v0&&(i100>=12&&i100<=14)?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"prg\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),f=s[1]||\"\",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return\"other\";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?\"zero\":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ps\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return t0&&n>=0&&n<=2&&n!=2?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-AO\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-PT\",\"parentLocale\":\"pt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-CV\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-GW\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-MO\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-MZ\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-ST\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-TL\",\"parentLocale\":\"pt-PT\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"qu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"qu-BO\",\"parentLocale\":\"qu\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"qu-EC\",\"parentLocale\":\"qu\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rm\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ro\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?\"one\":\"other\";return n==1&&v0?\"one\":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ro-MD\",\"parentLocale\":\"ro\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rof\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ru\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?\"few\":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?\"many\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-BY\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-KG\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-KZ\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-MD\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-UA\",\"parentLocale\":\"ru\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rwk\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sah\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"saq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sbp\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sdh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"se\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"se-FI\",\"parentLocale\":\"se\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"se-SE\",\"parentLocale\":\"se\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"seh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ses\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sh\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"shi\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return n>=0&&n<=1?\"one\":t0&&n>=2&&n<=10?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"shi-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"shi-Tfng\",\"parentLocale\":\"shi\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"si\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\";if(ord)return\"other\";return n==0||n==1||i==0&&f==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":i>=2&&i<=4&&v0?\"few\":!v0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i100=i.slice(-2);if(ord)return\"other\";return v0&&i100==1?\"one\":v0&&i100==2?\"two\":v0&&(i100==3||i100==4)||!v0?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sma\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"smi\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"smj\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"smn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sms\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"so\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"so-DJ\",\"parentLocale\":\"so\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"so-ET\",\"parentLocale\":\"so\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"so-KE\",\"parentLocale\":\"so\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sq\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n==1?\"one\":n10==4&&n100!=14?\"many\":\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sq-MK\",\"parentLocale\":\"sq\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sq-XK\",\"parentLocale\":\"sq\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sr\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl\",\"parentLocale\":\"sr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl-BA\",\"parentLocale\":\"sr-Cyrl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl-ME\",\"parentLocale\":\"sr-Cyrl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl-XK\",\"parentLocale\":\"sr-Cyrl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn-BA\",\"parentLocale\":\"sr-Latn\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn-ME\",\"parentLocale\":\"sr-Latn\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn-XK\",\"parentLocale\":\"sr-Latn\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ss\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ssy\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"st\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sv\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==1||n10==2)&&n100!=11&&n100!=12?\"one\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sv-AX\",\"parentLocale\":\"sv\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sv-FI\",\"parentLocale\":\"sv\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sw\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sw-CD\",\"parentLocale\":\"sw\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sw-KE\",\"parentLocale\":\"sw\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sw-UG\",\"parentLocale\":\"sw\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"syr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ta\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ta-LK\",\"parentLocale\":\"ta\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ta-MY\",\"parentLocale\":\"ta\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ta-SG\",\"parentLocale\":\"ta\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"te\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"teo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"teo-KE\",\"parentLocale\":\"teo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"th\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ti\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ti-ER\",\"parentLocale\":\"ti\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tig\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tk\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?\"one\":\"other\";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"to\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"tr-CY\",\"parentLocale\":\"tr\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ts\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"twq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tzm\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return n==0||n==1||t0&&n>=11&&n<=99?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ug\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"uk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),i10=i.slice(-1),i100=i.slice(-2);if(ord)return n10==3&&n100!=13?\"few\":\"other\";return v0&&i10==1&&i100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?\"few\":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ur\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ur-IN\",\"parentLocale\":\"ur\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"uz\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"uz-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"uz-Cyrl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"uz-Latn\",\"parentLocale\":\"uz\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vai\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"vai-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"vai-Vaii\",\"parentLocale\":\"vai\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ve\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vi\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vun\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"wa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"wae\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"wo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"xh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"xog\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"yav\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"yi\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"yo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"yo-BJ\",\"parentLocale\":\"yo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"zgh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"zh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans\",\"parentLocale\":\"zh\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans-HK\",\"parentLocale\":\"zh-Hans\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans-MO\",\"parentLocale\":\"zh-Hans\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans-SG\",\"parentLocale\":\"zh-Hans\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hant\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hant-HK\",\"parentLocale\":\"zh-Hant\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hant-MO\",\"parentLocale\":\"zh-Hant-HK\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"zu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n"]} \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat-with-locales.min.js b/lib/intl-messageformat/dist/intl-messageformat-with-locales.min.js new file mode 100644 index 00000000..8865c1a0 --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat-with-locales.min.js @@ -0,0 +1,5 @@ +(function(){"use strict";function a(a){var b,c,d,e,f=Array.prototype.slice.call(arguments,1);for(b=0,c=f.length;c>b;b+=1)if(d=f[b])for(e in d)h.call(d,e)&&(a[e]=d[e]);return a}function b(a,b,c){this.locales=a,this.formats=b,this.pluralFn=c}function c(a){this.id=a}function d(a,b,c,d,e){this.id=a,this.useOrdinal=b,this.offset=c,this.options=d,this.pluralFn=e}function e(a,b,c,d){this.id=a,this.offset=b,this.numberFormat=c,this.string=d}function f(a,b){this.id=a,this.options=b}function g(a,b,c){var d="string"==typeof a?g.__parse(a):a;if(!d||"messageFormatPattern"!==d.type)throw new TypeError("A message must be provided as a String or AST.");c=this._mergeFormats(g.formats,c),j(this,"_locale",{value:this._resolveLocale(b)});var e=this._findPluralRuleFunction(this._locale),f=this._compilePattern(d,b,c,e),h=this;this.format=function(a){return h._format(f,a)}}var h=Object.prototype.hasOwnProperty,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(a){return!1}}(),j=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(a,b,c){"get"in c&&a.__defineGetter__?a.__defineGetter__(b,c.get):(!h.call(a,b)||"value"in c)&&(a[b]=c.value)}),k=Object.create||function(a,b){function c(){}var d,e;c.prototype=a,d=new c;for(e in b)h.call(b,e)&&j(d,e,b[e]);return d},l=b;b.prototype.compile=function(a){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(a)},b.prototype.compileMessage=function(a){if(!a||"messageFormatPattern"!==a.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var b,c,d,e=a.elements,f=[];for(b=0,c=e.length;c>b;b+=1)switch(d=e[b],d.type){case"messageTextElement":f.push(this.compileMessageText(d));break;case"argumentElement":f.push(this.compileArgument(d));break;default:throw new Error("Message element does not have a valid type")}return f},b.prototype.compileMessageText=function(a){return this.currentPlural&&/(^|[^\\])#/g.test(a.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new e(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,a.value)):a.value.replace(/\\#/g,"#")},b.prototype.compileArgument=function(a){var b=a.format;if(!b)return new c(a.id);var e,g=this.formats,h=this.locales,i=this.pluralFn;switch(b.type){case"numberFormat":return e=g.number[b.style],{id:a.id,format:new Intl.NumberFormat(h,e).format};case"dateFormat":return e=g.date[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"timeFormat":return e=g.time[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"pluralFormat":return e=this.compileOptions(a),new d(a.id,b.ordinal,b.offset,e,i);case"selectFormat":return e=this.compileOptions(a),new f(a.id,e);default:throw new Error("Message element does not have a valid format type")}},b.prototype.compileOptions=function(a){var b=a.format,c=b.options,d={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===b.type?a:null;var e,f,g;for(e=0,f=c.length;f>e;e+=1)g=c[e],d[g.selector]=this.compileMessage(g.value);return this.currentPlural=this.pluralStack.pop(),d},c.prototype.format=function(a){return a?"string"==typeof a?a:String(a):""},d.prototype.getOption=function(a){var b=this.options,c=b["="+a]||b[this.pluralFn(a-this.offset,this.useOrdinal)];return c||b.other},e.prototype.format=function(a){var b=this.numberFormat.format(a-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+b).replace(/\\#/g,"#")},f.prototype.getOption=function(a){var b=this.options;return b[a]||b.other};var m=function(){function a(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}function b(a,b,c,d,e,f){this.message=a,this.expected=b,this.found=c,this.offset=d,this.line=e,this.column=f,this.name="SyntaxError"}function c(a){function c(b){function c(b,c,d){var e,f;for(e=c;d>e;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return Xa!==b&&(Xa>b&&(Xa=0,Ya={line:1,column:1,seenCR:!1}),c(Ya,Xa,b),Xa=b),Ya}function d(a){Za>Va||(Va>Za&&(Za=Va,$a=[]),$a.push(a))}function e(d,e,f){function g(a){var b=1;for(a.sort(function(a,b){return a.descriptionb.description?1:0});b1?g.slice(0,-1).join(", ")+" or "+g[a.length-1]:g[0],e=b?'"'+c(b)+'"':"end of input","Expected "+d+" but "+e+" found."}var i=c(f),j=f1?arguments[1]:{},E={},F={start:f},G=f,H=function(a){return{type:"messageFormatPattern",elements:a}},I=E,J=function(a){var b,c,d,e,f,g="";for(b=0,d=a.length;d>b;b+=1)for(e=a[b],c=0,f=e.length;f>c;c+=1)g+=e[c];return g},K=function(a){return{type:"messageTextElement",value:a}},L=/^[^ \t\n\r,.+={}#]/,M={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},N="{",O={type:"literal",value:"{",description:'"{"'},P=null,Q=",",R={type:"literal",value:",",description:'","'},S="}",T={type:"literal",value:"}",description:'"}"'},U=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},V="number",W={type:"literal",value:"number",description:'"number"'},X="date",Y={type:"literal",value:"date",description:'"date"'},Z="time",$={type:"literal",value:"time",description:'"time"'},_=function(a,b){return{type:a+"Format",style:b&&b[2]}},aa="plural",ba={type:"literal",value:"plural",description:'"plural"'},ca=function(a){return{type:a.type,ordinal:!1,offset:a.offset||0,options:a.options}},da="selectordinal",ea={type:"literal",value:"selectordinal",description:'"selectordinal"'},fa=function(a){return{type:a.type,ordinal:!0,offset:a.offset||0,options:a.options}},ga="select",ha={type:"literal",value:"select",description:'"select"'},ia=function(a){return{type:"selectFormat",options:a}},ja="=",ka={type:"literal",value:"=",description:'"="'},la=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},ma="offset:",na={type:"literal",value:"offset:",description:'"offset:"'},oa=function(a){return a},pa=function(a,b){return{type:"pluralFormat",offset:a,options:b}},qa={type:"other",description:"whitespace"},ra=/^[ \t\n\r]/,sa={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},ta={type:"other",description:"optionalWhitespace"},ua=/^[0-9]/,va={type:"class",value:"[0-9]",description:"[0-9]"},wa=/^[0-9a-f]/i,xa={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},ya="0",za={type:"literal",value:"0",description:'"0"'},Aa=/^[1-9]/,Ba={type:"class",value:"[1-9]",description:"[1-9]"},Ca=function(a){return parseInt(a,10)},Da=/^[^{}\\\0-\x1F \t\n\r]/,Ea={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},Fa="\\\\",Ga={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},Ha=function(){return"\\"},Ia="\\#",Ja={type:"literal",value:"\\#",description:'"\\\\#"'},Ka=function(){return"\\#"},La="\\{",Ma={type:"literal",value:"\\{",description:'"\\\\{"'},Na=function(){return"{"},Oa="\\}",Pa={type:"literal",value:"\\}",description:'"\\\\}"'},Qa=function(){return"}"},Ra="\\u",Sa={type:"literal",value:"\\u",description:'"\\\\u"'},Ta=function(a){return String.fromCharCode(parseInt(a,16))},Ua=function(a){return a.join("")},Va=0,Wa=0,Xa=0,Ya={line:1,column:1,seenCR:!1},Za=0,$a=[],_a=0;if("startRule"in D){if(!(D.startRule in F))throw new Error("Can't start parsing from rule \""+D.startRule+'".');G=F[D.startRule]}if(C=G(),C!==E&&Va===a.length)return C;throw C!==E&&Vac;c+=1)if(e=a[c],"string"!=typeof e){if(f=e.id,!b||!h.call(b,f))throw new Error("A value must be provided for: "+f);g=b[f],i+=e.options?this._format(e.getOption(g),b):e.format(g)}else i+=e;return i},g.prototype._mergeFormats=function(b,c){var d,e,f={};for(d in b)h.call(b,d)&&(f[d]=e=k(b[d]),c&&h.call(c,d)&&a(e,c[d]));return f},g.prototype._resolveLocale=function(a){"string"==typeof a&&(a=[a]),a=(a||[]).concat(g.defaultLocale);var b,c,d,e,f=g.__localeData__;for(b=0,c=a.length;c>b;b+=1)for(d=a[b].toLowerCase().split("-");d.length;){if(e=f[d.join("-")])return e.locale;d.pop()}var h=a.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+a.join(", ")+", or the default locale: "+h)};var o={locale:"en",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?1==f&&11!=g?"one":2==f&&12!=g?"two":3==f&&13!=g?"few":"other":1==a&&d?"one":"other"}};n.__addLocaleData(o),n.defaultLocale="en";var p=n;this.IntlMessageFormat=p}).call(this),IntlMessageFormat.__addLocaleData({locale:"af",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"af-NA",parentLocale:"af"}),IntlMessageFormat.__addLocaleData({locale:"agq",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ak",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"am",pluralRuleFunction:function(a,b){return b?"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ar",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a,e=d&&c[0].slice(-2);return b?"other":0==a?"zero":1==a?"one":2==a?"two":e>=3&&10>=e?"few":e>=11&&99>=e?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ar-AE",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-BH",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-DJ",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-DZ",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-EG",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-EH",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-ER",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-IL",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-IQ",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-JO",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-KM",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-KW",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-LB",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-LY",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-MA",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-MR",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-OM",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-PS",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-QA",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-SA",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-SD",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-SO",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-SS",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-SY",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-TD",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-TN",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"ar-YE",parentLocale:"ar"}),IntlMessageFormat.__addLocaleData({locale:"as",pluralRuleFunction:function(a,b){return b?1==a||5==a||7==a||8==a||9==a||10==a?"one":2==a||3==a?"two":4==a?"few":6==a?"many":"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"asa",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ast",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"az",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=d.slice(-1),f=d.slice(-2),g=d.slice(-3);return b?1==e||2==e||5==e||7==e||8==e||20==f||50==f||70==f||80==f?"one":3==e||4==e||100==g||200==g||300==g||400==g||500==g||600==g||700==g||800==g||900==g?"few":0==d||6==e||40==f||60==f||90==f?"many":"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"az-Arab",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"az-Cyrl",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"az-Latn",parentLocale:"az"}),IntlMessageFormat.__addLocaleData({locale:"bas",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"be",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a,e=d&&c[0].slice(-1),f=d&&c[0].slice(-2);return b?2!=e&&3!=e||12==f||13==f?"other":"few":1==e&&11!=f?"one":e>=2&&4>=e&&(12>f||f>14)?"few":d&&0==e||e>=5&&9>=e||f>=11&&14>=f?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bem",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bez",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bg",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bh",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bm",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"bm-Nkoo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"bn",pluralRuleFunction:function(a,b){return b?1==a||5==a||7==a||8==a||9==a||10==a?"one":2==a||3==a?"two":4==a?"few":6==a?"many":"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bn-IN",parentLocale:"bn"}),IntlMessageFormat.__addLocaleData({locale:"bo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"bo-IN",parentLocale:"bo"}),IntlMessageFormat.__addLocaleData({locale:"br",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a,e=d&&c[0].slice(-1),f=d&&c[0].slice(-2),g=d&&c[0].slice(-6);return b?"other":1==e&&11!=f&&71!=f&&91!=f?"one":2==e&&12!=f&&72!=f&&92!=f?"two":(3==e||4==e||9==e)&&(10>f||f>19)&&(70>f||f>79)&&(90>f||f>99)?"few":0!=a&&d&&0==g?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"brx",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bs",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=d.slice(-2),i=e.slice(-1),j=e.slice(-2);return b?"other":f&&1==g&&11!=h||1==i&&11!=j?"one":f&&g>=2&&4>=g&&(12>h||h>14)||i>=2&&4>=i&&(12>j||j>14)?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"bs-Cyrl",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"bs-Latn",parentLocale:"bs"}),IntlMessageFormat.__addLocaleData({locale:"ca",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?1==a||3==a?"one":2==a?"two":4==a?"few":"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ca-AD",parentLocale:"ca"}),IntlMessageFormat.__addLocaleData({locale:"ca-ES-VALENCIA",parentLocale:"ca-ES"}),IntlMessageFormat.__addLocaleData({locale:"ca-ES",parentLocale:"ca"}),IntlMessageFormat.__addLocaleData({locale:"ca-FR",parentLocale:"ca"}),IntlMessageFormat.__addLocaleData({locale:"ca-IT",parentLocale:"ca"}),IntlMessageFormat.__addLocaleData({locale:"ce",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"cgg",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"chr",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ckb",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ckb-IR",parentLocale:"ckb"}),IntlMessageFormat.__addLocaleData({locale:"cs",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1];return b?"other":1==a&&e?"one":d>=2&&4>=d&&e?"few":e?"other":"many"}}),IntlMessageFormat.__addLocaleData({locale:"cu",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"cy",pluralRuleFunction:function(a,b){return b?0==a||7==a||8==a||9==a?"zero":1==a?"one":2==a?"two":3==a||4==a?"few":5==a||6==a?"many":"other":0==a?"zero":1==a?"one":2==a?"two":3==a?"few":6==a?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"da",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=Number(c[0])==a;return b?"other":1!=a&&(e||0!=d&&1!=d)?"other":"one"}}),IntlMessageFormat.__addLocaleData({locale:"da-GL",parentLocale:"da"}),IntlMessageFormat.__addLocaleData({locale:"dav",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"de",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"de-AT",parentLocale:"de"}),IntlMessageFormat.__addLocaleData({locale:"de-BE",parentLocale:"de"}),IntlMessageFormat.__addLocaleData({locale:"de-CH",parentLocale:"de"}),IntlMessageFormat.__addLocaleData({locale:"de-LI",parentLocale:"de"}),IntlMessageFormat.__addLocaleData({locale:"de-LU",parentLocale:"de"}),IntlMessageFormat.__addLocaleData({locale:"dje",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"dsb",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-2),h=e.slice(-2);return b?"other":f&&1==g||1==h?"one":f&&2==g||2==h?"two":f&&(3==g||4==g)||3==h||4==h?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"dua",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"dv",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"dyo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"dz",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ebu",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ee",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ee-TG",parentLocale:"ee"}),IntlMessageFormat.__addLocaleData({locale:"el",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"el-CY",parentLocale:"el"}),IntlMessageFormat.__addLocaleData({locale:"en",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?1==f&&11!=g?"one":2==f&&12!=g?"two":3==f&&13!=g?"few":"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"en-001",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-150",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-AG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-AI",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-AS",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-AT",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-AU",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-BB",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-BE",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-BI",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-BM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-BS",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-BW",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-BZ",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-CA",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-CC",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-CH",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-CK",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-CM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-CX",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-CY",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-DE",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-DG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-DK",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-DM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-Dsrt",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"en-ER",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-FI",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-FJ",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-FK",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-FM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GB",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GD",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GH",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GI",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-GU",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-GY",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-HK",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-IE",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-IL",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-IM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-IN",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-IO",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-JE",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-JM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-KE",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-KI",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-KN",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-KY",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-LC",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-LR",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-LS",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MH",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-MO",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MP",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-MS",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MT",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MU",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MW",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-MY",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-NA",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-NF",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-NG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-NL",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-NR",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-NU",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-NZ",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-PG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-PH",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({ +locale:"en-PK",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-PN",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-PR",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-PW",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-RW",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SB",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SC",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SD",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SE",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-SG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SH",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SI",parentLocale:"en-150"}),IntlMessageFormat.__addLocaleData({locale:"en-SL",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SS",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SX",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-SZ",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-Shaw",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"en-TC",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-TK",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-TO",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-TT",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-TV",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-TZ",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-UG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-UM",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-US",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-VC",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-VG",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-VI",parentLocale:"en"}),IntlMessageFormat.__addLocaleData({locale:"en-VU",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-WS",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-ZA",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-ZM",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"en-ZW",parentLocale:"en-001"}),IntlMessageFormat.__addLocaleData({locale:"eo",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"es",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"es-419",parentLocale:"es"}),IntlMessageFormat.__addLocaleData({locale:"es-AR",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-BO",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-CL",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-CO",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-CR",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-CU",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-DO",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-EA",parentLocale:"es"}),IntlMessageFormat.__addLocaleData({locale:"es-EC",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-GQ",parentLocale:"es"}),IntlMessageFormat.__addLocaleData({locale:"es-GT",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-HN",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-IC",parentLocale:"es"}),IntlMessageFormat.__addLocaleData({locale:"es-MX",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-NI",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-PA",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-PE",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-PH",parentLocale:"es"}),IntlMessageFormat.__addLocaleData({locale:"es-PR",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-PY",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-SV",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-US",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-UY",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"es-VE",parentLocale:"es-419"}),IntlMessageFormat.__addLocaleData({locale:"et",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"eu",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ewo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"fa",pluralRuleFunction:function(a,b){return b?"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"fa-AF",parentLocale:"fa"}),IntlMessageFormat.__addLocaleData({locale:"ff",pluralRuleFunction:function(a,b){return b?"other":a>=0&&2>a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ff-CM",parentLocale:"ff"}),IntlMessageFormat.__addLocaleData({locale:"ff-GN",parentLocale:"ff"}),IntlMessageFormat.__addLocaleData({locale:"ff-MR",parentLocale:"ff"}),IntlMessageFormat.__addLocaleData({locale:"fi",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"fil",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=e.slice(-1);return b?1==a?"one":"other":f&&(1==d||2==d||3==d)||f&&4!=g&&6!=g&&9!=g||!f&&4!=h&&6!=h&&9!=h?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"fo",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"fo-DK",parentLocale:"fo"}),IntlMessageFormat.__addLocaleData({locale:"fr",pluralRuleFunction:function(a,b){return b?1==a?"one":"other":a>=0&&2>a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"fr-BE",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-BF",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-BI",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-BJ",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-BL",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CA",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CD",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CF",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CG",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CH",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CI",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-CM",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-DJ",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-DZ",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-GA",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-GF",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-GN",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-GP",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-GQ",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-HT",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-KM",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-LU",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MA",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MC",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MF",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MG",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-ML",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MQ",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MR",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-MU",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-NC",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-NE",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-PF",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-PM",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-RE",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-RW",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-SC",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-SN",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-SY",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-TD",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-TG",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-TN",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-VU",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-WF",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fr-YT",parentLocale:"fr"}),IntlMessageFormat.__addLocaleData({locale:"fur",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"fy",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ga",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a;return b?1==a?"one":"other":1==a?"one":2==a?"two":d&&a>=3&&6>=a?"few":d&&a>=7&&10>=a?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"gd",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a;return b?"other":1==a||11==a?"one":2==a||12==a?"two":d&&a>=3&&10>=a||d&&a>=13&&19>=a?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"gl",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"gsw",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"gsw-FR",parentLocale:"gsw"}),IntlMessageFormat.__addLocaleData({locale:"gsw-LI",parentLocale:"gsw"}),IntlMessageFormat.__addLocaleData({locale:"gu",pluralRuleFunction:function(a,b){return b?1==a?"one":2==a||3==a?"two":4==a?"few":6==a?"many":"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"guw",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"guz",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"gv",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=d.slice(-1),g=d.slice(-2);return b?"other":e&&1==f?"one":e&&2==f?"two":!e||0!=g&&20!=g&&40!=g&&60!=g&&80!=g?e?"other":"many":"few"}}),IntlMessageFormat.__addLocaleData({locale:"ha",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ha-Arab",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ha-GH",parentLocale:"ha"}),IntlMessageFormat.__addLocaleData({locale:"ha-NE",parentLocale:"ha"}),IntlMessageFormat.__addLocaleData({locale:"haw",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"he",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=Number(c[0])==a,g=f&&c[0].slice(-1);return b?"other":1==a&&e?"one":2==d&&e?"two":e&&(0>a||a>10)&&f&&0==g?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"hi",pluralRuleFunction:function(a,b){return b?1==a?"one":2==a||3==a?"two":4==a?"few":6==a?"many":"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"hr",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=d.slice(-2),i=e.slice(-1),j=e.slice(-2);return b?"other":f&&1==g&&11!=h||1==i&&11!=j?"one":f&&g>=2&&4>=g&&(12>h||h>14)||i>=2&&4>=i&&(12>j||j>14)?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"hr-BA",parentLocale:"hr"}),IntlMessageFormat.__addLocaleData({locale:"hsb",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-2),h=e.slice(-2);return b?"other":f&&1==g||1==h?"one":f&&2==g||2==h?"two":f&&(3==g||4==g)||3==h||4==h?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"hu",pluralRuleFunction:function(a,b){return b?1==a||5==a?"one":"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"hy",pluralRuleFunction:function(a,b){return b?1==a?"one":"other":a>=0&&2>a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"id",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ig",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ii",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"in",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"is",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=Number(c[0])==a,f=d.slice(-1),g=d.slice(-2);return b?"other":e&&1==f&&11!=g||!e?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"it",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?11==a||8==a||80==a||800==a?"many":"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"it-CH",parentLocale:"it"}),IntlMessageFormat.__addLocaleData({locale:"it-SM",parentLocale:"it"}),IntlMessageFormat.__addLocaleData({locale:"iu",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"iu-Latn",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"iw",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=Number(c[0])==a,g=f&&c[0].slice(-1);return b?"other":1==a&&e?"one":2==d&&e?"two":e&&(0>a||a>10)&&f&&0==g?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ja",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"jbo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"jgo",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ji",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"jmc",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"jv",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"jw",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ka",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=d.slice(-2);return b?1==d?"one":0==d||e>=2&&20>=e||40==e||60==e||80==e?"many":"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kab",pluralRuleFunction:function(a,b){return b?"other":a>=0&&2>a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kaj",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kam",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"kcg",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kde",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"kea",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"khq",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ki",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"kk",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a,e=d&&c[0].slice(-1);return b?6==e||9==e||d&&0==e&&0!=a?"many":"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kkj",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kl",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kln",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"km",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"kn",pluralRuleFunction:function(a,b){return b?"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ko",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ko-KP",parentLocale:"ko"}),IntlMessageFormat.__addLocaleData({locale:"kok",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ks",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ksb",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ksf",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ksh",pluralRuleFunction:function(a,b){return b?"other":0==a?"zero":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ku",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"kw",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ky",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"lag",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0];return b?"other":0==a?"zero":0!=d&&1!=d||0==a?"other":"one"}}),IntlMessageFormat.__addLocaleData({locale:"lb",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"lg",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"lkt",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ln",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ln-AO",parentLocale:"ln"}),IntlMessageFormat.__addLocaleData({locale:"ln-CF",parentLocale:"ln"}),IntlMessageFormat.__addLocaleData({locale:"ln-CG",parentLocale:"ln"}),IntlMessageFormat.__addLocaleData({locale:"lo",pluralRuleFunction:function(a,b){return b&&1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"lrc",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"lrc-IQ",parentLocale:"lrc"}),IntlMessageFormat.__addLocaleData({locale:"lt",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[1]||"",e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?"other":1==f&&(11>g||g>19)?"one":f>=2&&9>=f&&(11>g||g>19)?"few":0!=d?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"lu",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"luo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"luy",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"lv",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[1]||"",e=d.length,f=Number(c[0])==a,g=f&&c[0].slice(-1),h=f&&c[0].slice(-2),i=d.slice(-2),j=d.slice(-1);return b?"other":f&&0==g||h>=11&&19>=h||2==e&&i>=11&&19>=i?"zero":1==g&&11!=h||2==e&&1==j&&11!=i||2!=e&&1==j?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mas",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mas-TZ",parentLocale:"mas"}),IntlMessageFormat.__addLocaleData({locale:"mer",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"mfe",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"mg",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mgh",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"mgo",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mk",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=d.slice(-2),i=e.slice(-1);return b?1==g&&11!=h?"one":2==g&&12!=h?"two":7!=g&&8!=g||17==h||18==h?"other":"many":f&&1==g||1==i?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ml",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mn",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mn-Mong",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"mo",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-2);return b?1==a?"one":"other":1==a&&d?"one":!d||0==a||1!=a&&f>=1&&19>=f?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mr",pluralRuleFunction:function(a,b){return b?1==a?"one":2==a||3==a?"two":4==a?"few":"other":a>=0&&1>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ms",pluralRuleFunction:function(a,b){return b&&1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ms-Arab",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ms-BN",parentLocale:"ms"}),IntlMessageFormat.__addLocaleData({locale:"ms-SG",parentLocale:"ms"}),IntlMessageFormat.__addLocaleData({locale:"mt",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a,e=d&&c[0].slice(-2);return b?"other":1==a?"one":0==a||e>=2&&10>=e?"few":e>=11&&19>=e?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"mua",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"my",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"mzn",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"nah",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"naq",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nb",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nb-SJ",parentLocale:"nb"}),IntlMessageFormat.__addLocaleData({locale:"nd",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ne",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a;return b?d&&a>=1&&4>=a?"one":"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ne-IN",parentLocale:"ne"}),IntlMessageFormat.__addLocaleData({locale:"nl",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nl-AW",parentLocale:"nl"}),IntlMessageFormat.__addLocaleData({locale:"nl-BE",parentLocale:"nl"}),IntlMessageFormat.__addLocaleData({locale:"nl-BQ",parentLocale:"nl"}),IntlMessageFormat.__addLocaleData({locale:"nl-CW",parentLocale:"nl"}),IntlMessageFormat.__addLocaleData({locale:"nl-SR",parentLocale:"nl"}),IntlMessageFormat.__addLocaleData({locale:"nl-SX",parentLocale:"nl"}),IntlMessageFormat.__addLocaleData({locale:"nmg",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"nn",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nnh",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"no",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nqo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"nr",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nso",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nus",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ny",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"nyn",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"om",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"om-KE",parentLocale:"om"}),IntlMessageFormat.__addLocaleData({locale:"or",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"os",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"os-RU",parentLocale:"os"}),IntlMessageFormat.__addLocaleData({locale:"pa",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"pa-Arab",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"pa-Guru",parentLocale:"pa"}),IntlMessageFormat.__addLocaleData({locale:"pap",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"pl",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=d.slice(-1),g=d.slice(-2);return b?"other":1==a&&e?"one":e&&f>=2&&4>=f&&(12>g||g>14)?"few":e&&1!=d&&(0==f||1==f)||e&&f>=5&&9>=f||e&&g>=12&&14>=g?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"prg",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[1]||"",e=d.length,f=Number(c[0])==a,g=f&&c[0].slice(-1),h=f&&c[0].slice(-2),i=d.slice(-2),j=d.slice(-1);return b?"other":f&&0==g||h>=11&&19>=h||2==e&&i>=11&&19>=i?"zero":1==g&&11!=h||2==e&&1==j&&11!=i||2!=e&&1==j?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ps",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"pt",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a;return b?"other":d&&a>=0&&2>=a&&2!=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"pt-AO",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"pt-PT",parentLocale:"pt",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"pt-CV",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"pt-GW",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"pt-MO",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"pt-MZ",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"pt-ST",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"pt-TL",parentLocale:"pt-PT"}),IntlMessageFormat.__addLocaleData({locale:"qu",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"qu-BO",parentLocale:"qu"}),IntlMessageFormat.__addLocaleData({locale:"qu-EC",parentLocale:"qu"}),IntlMessageFormat.__addLocaleData({locale:"rm",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"rn",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ro",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-2);return b?1==a?"one":"other":1==a&&d?"one":!d||0==a||1!=a&&f>=1&&19>=f?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ro-MD",parentLocale:"ro"}),IntlMessageFormat.__addLocaleData({locale:"rof",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ru",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=d.slice(-1),g=d.slice(-2);return b?"other":e&&1==f&&11!=g?"one":e&&f>=2&&4>=f&&(12>g||g>14)?"few":e&&0==f||e&&f>=5&&9>=f||e&&g>=11&&14>=g?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ru-BY",parentLocale:"ru"}),IntlMessageFormat.__addLocaleData({locale:"ru-KG",parentLocale:"ru"}),IntlMessageFormat.__addLocaleData({locale:"ru-KZ",parentLocale:"ru"}),IntlMessageFormat.__addLocaleData({locale:"ru-MD",parentLocale:"ru"}),IntlMessageFormat.__addLocaleData({locale:"ru-UA",parentLocale:"ru"}),IntlMessageFormat.__addLocaleData({locale:"rw",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"rwk",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sah",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"saq",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sbp",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"sdh",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"se",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"se-FI",parentLocale:"se"}),IntlMessageFormat.__addLocaleData({locale:"se-SE",parentLocale:"se"}),IntlMessageFormat.__addLocaleData({locale:"seh",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ses",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"sg",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"sh",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=d.slice(-2),i=e.slice(-1),j=e.slice(-2);return b?"other":f&&1==g&&11!=h||1==i&&11!=j?"one":f&&g>=2&&4>=g&&(12>h||h>14)||i>=2&&4>=i&&(12>j||j>14)?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"shi",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a;return b?"other":a>=0&&1>=a?"one":d&&a>=2&&10>=a?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"shi-Latn",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"shi-Tfng",parentLocale:"shi"}),IntlMessageFormat.__addLocaleData({locale:"si",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"";return b?"other":0==a||1==a||0==d&&1==e?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sk",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1];return b?"other":1==a&&e?"one":d>=2&&4>=d&&e?"few":e?"other":"many"}}),IntlMessageFormat.__addLocaleData({locale:"sl",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=d.slice(-2);return b?"other":e&&1==f?"one":e&&2==f?"two":e&&(3==f||4==f)||!e?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sma",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"; + +}}),IntlMessageFormat.__addLocaleData({locale:"smi",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"smj",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"smn",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sms",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":2==a?"two":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sn",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"so",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"so-DJ",parentLocale:"so"}),IntlMessageFormat.__addLocaleData({locale:"so-ET",parentLocale:"so"}),IntlMessageFormat.__addLocaleData({locale:"so-KE",parentLocale:"so"}),IntlMessageFormat.__addLocaleData({locale:"sq",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a,e=d&&c[0].slice(-1),f=d&&c[0].slice(-2);return b?1==a?"one":4==e&&14!=f?"many":"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sq-MK",parentLocale:"sq"}),IntlMessageFormat.__addLocaleData({locale:"sq-XK",parentLocale:"sq"}),IntlMessageFormat.__addLocaleData({locale:"sr",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=d.slice(-2),i=e.slice(-1),j=e.slice(-2);return b?"other":f&&1==g&&11!=h||1==i&&11!=j?"one":f&&g>=2&&4>=g&&(12>h||h>14)||i>=2&&4>=i&&(12>j||j>14)?"few":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sr-Cyrl",parentLocale:"sr"}),IntlMessageFormat.__addLocaleData({locale:"sr-Cyrl-BA",parentLocale:"sr-Cyrl"}),IntlMessageFormat.__addLocaleData({locale:"sr-Cyrl-ME",parentLocale:"sr-Cyrl"}),IntlMessageFormat.__addLocaleData({locale:"sr-Cyrl-XK",parentLocale:"sr-Cyrl"}),IntlMessageFormat.__addLocaleData({locale:"sr-Latn",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"sr-Latn-BA",parentLocale:"sr-Latn"}),IntlMessageFormat.__addLocaleData({locale:"sr-Latn-ME",parentLocale:"sr-Latn"}),IntlMessageFormat.__addLocaleData({locale:"sr-Latn-XK",parentLocale:"sr-Latn"}),IntlMessageFormat.__addLocaleData({locale:"ss",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ssy",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"st",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sv",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?1!=f&&2!=f||11==g||12==g?"other":"one":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sv-AX",parentLocale:"sv"}),IntlMessageFormat.__addLocaleData({locale:"sv-FI",parentLocale:"sv"}),IntlMessageFormat.__addLocaleData({locale:"sw",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"sw-CD",parentLocale:"sw"}),IntlMessageFormat.__addLocaleData({locale:"sw-KE",parentLocale:"sw"}),IntlMessageFormat.__addLocaleData({locale:"sw-UG",parentLocale:"sw"}),IntlMessageFormat.__addLocaleData({locale:"syr",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ta",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ta-LK",parentLocale:"ta"}),IntlMessageFormat.__addLocaleData({locale:"ta-MY",parentLocale:"ta"}),IntlMessageFormat.__addLocaleData({locale:"ta-SG",parentLocale:"ta"}),IntlMessageFormat.__addLocaleData({locale:"te",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"teo",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"teo-KE",parentLocale:"teo"}),IntlMessageFormat.__addLocaleData({locale:"th",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"ti",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ti-ER",parentLocale:"ti"}),IntlMessageFormat.__addLocaleData({locale:"tig",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"tk",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"tl",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=c[1]||"",f=!c[1],g=d.slice(-1),h=e.slice(-1);return b?1==a?"one":"other":f&&(1==d||2==d||3==d)||f&&4!=g&&6!=g&&9!=g||!f&&4!=h&&6!=h&&9!=h?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"tn",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"to",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"tr",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"tr-CY",parentLocale:"tr"}),IntlMessageFormat.__addLocaleData({locale:"ts",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"twq",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"tzm",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=Number(c[0])==a;return b?"other":0==a||1==a||d&&a>=11&&99>=a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ug",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"uk",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=c[0],e=!c[1],f=Number(c[0])==a,g=f&&c[0].slice(-1),h=f&&c[0].slice(-2),i=d.slice(-1),j=d.slice(-2);return b?3==g&&13!=h?"few":"other":e&&1==i&&11!=j?"one":e&&i>=2&&4>=i&&(12>j||j>14)?"few":e&&0==i||e&&i>=5&&9>=i||e&&j>=11&&14>=j?"many":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ur",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"ur-IN",parentLocale:"ur"}),IntlMessageFormat.__addLocaleData({locale:"uz",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"uz-Arab",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"uz-Cyrl",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"uz-Latn",parentLocale:"uz"}),IntlMessageFormat.__addLocaleData({locale:"vai",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"vai-Latn",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"vai-Vaii",parentLocale:"vai"}),IntlMessageFormat.__addLocaleData({locale:"ve",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"vi",pluralRuleFunction:function(a,b){return b&&1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"vo",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"vun",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"wa",pluralRuleFunction:function(a,b){return b?"other":0==a||1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"wae",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"wo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"xh",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"xog",pluralRuleFunction:function(a,b){return b?"other":1==a?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"yav",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"yi",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1];return b?"other":1==a&&d?"one":"other"}}),IntlMessageFormat.__addLocaleData({locale:"yo",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"yo-BJ",parentLocale:"yo"}),IntlMessageFormat.__addLocaleData({locale:"zgh",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"zh",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"zh-Hans",parentLocale:"zh"}),IntlMessageFormat.__addLocaleData({locale:"zh-Hans-HK",parentLocale:"zh-Hans"}),IntlMessageFormat.__addLocaleData({locale:"zh-Hans-MO",parentLocale:"zh-Hans"}),IntlMessageFormat.__addLocaleData({locale:"zh-Hans-SG",parentLocale:"zh-Hans"}),IntlMessageFormat.__addLocaleData({locale:"zh-Hant",pluralRuleFunction:function(a,b){return"other"}}),IntlMessageFormat.__addLocaleData({locale:"zh-Hant-HK",parentLocale:"zh-Hant"}),IntlMessageFormat.__addLocaleData({locale:"zh-Hant-MO",parentLocale:"zh-Hant-HK"}),IntlMessageFormat.__addLocaleData({locale:"zu",pluralRuleFunction:function(a,b){return b?"other":a>=0&&1>=a?"one":"other"}}); +//# sourceMappingURL=intl-messageformat-with-locales.min.js.map \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat-with-locales.min.js.map b/lib/intl-messageformat/dist/intl-messageformat-with-locales.min.js.map new file mode 100644 index 00000000..f541157f --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat-with-locales.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"intl-messageformat-with-locales.min.js","sources":["intl-messageformat/src/utils.js","intl-messageformat/src/es5.js","intl-messageformat/src/compiler.js","intl-messageformat/node_modules/intl-messageformat-parser/src/parser.js","intl-messageformat/src/core.js","intl-messageformat/src/en.js","intl-messageformat/src/main.js","locale-data/af.js","locale-data/agq.js","locale-data/ak.js","locale-data/am.js","locale-data/ar.js","locale-data/as.js","locale-data/asa.js","locale-data/ast.js","locale-data/az.js","locale-data/bas.js","locale-data/be.js","locale-data/bem.js","locale-data/bez.js","locale-data/bg.js","locale-data/bh.js","locale-data/bm.js","locale-data/bn.js","locale-data/bo.js","locale-data/br.js","locale-data/brx.js","locale-data/bs.js","locale-data/ca.js","locale-data/ce.js","locale-data/cgg.js","locale-data/chr.js","locale-data/ckb.js","locale-data/cs.js","locale-data/cu.js","locale-data/cy.js","locale-data/da.js","locale-data/dav.js","locale-data/de.js","locale-data/dje.js","locale-data/dsb.js","locale-data/dua.js","locale-data/dv.js","locale-data/dyo.js","locale-data/dz.js","locale-data/ebu.js","locale-data/ee.js","locale-data/el.js","locale-data/en.js","locale-data/eo.js","locale-data/es.js","locale-data/et.js","locale-data/eu.js","locale-data/ewo.js","locale-data/fa.js","locale-data/ff.js","locale-data/fi.js","locale-data/fil.js","locale-data/fo.js","locale-data/fr.js","locale-data/fur.js","locale-data/fy.js","locale-data/ga.js","locale-data/gd.js","locale-data/gl.js","locale-data/gsw.js","locale-data/gu.js","locale-data/guw.js","locale-data/guz.js","locale-data/gv.js","locale-data/ha.js","locale-data/haw.js","locale-data/he.js","locale-data/hi.js","locale-data/hr.js","locale-data/hsb.js","locale-data/hu.js","locale-data/hy.js","locale-data/id.js","locale-data/ig.js","locale-data/ii.js","locale-data/in.js","locale-data/is.js","locale-data/it.js","locale-data/iu.js","locale-data/iw.js","locale-data/ja.js","locale-data/jbo.js","locale-data/jgo.js","locale-data/ji.js","locale-data/jmc.js","locale-data/jv.js","locale-data/jw.js","locale-data/ka.js","locale-data/kab.js","locale-data/kaj.js","locale-data/kam.js","locale-data/kcg.js","locale-data/kde.js","locale-data/kea.js","locale-data/khq.js","locale-data/ki.js","locale-data/kk.js","locale-data/kkj.js","locale-data/kl.js","locale-data/kln.js","locale-data/km.js","locale-data/kn.js","locale-data/ko.js","locale-data/kok.js","locale-data/ks.js","locale-data/ksb.js","locale-data/ksf.js","locale-data/ksh.js","locale-data/ku.js","locale-data/kw.js","locale-data/ky.js","locale-data/lag.js","locale-data/lb.js","locale-data/lg.js","locale-data/lkt.js","locale-data/ln.js","locale-data/lo.js","locale-data/lrc.js","locale-data/lt.js","locale-data/lu.js","locale-data/luo.js","locale-data/luy.js","locale-data/lv.js","locale-data/mas.js","locale-data/mer.js","locale-data/mfe.js","locale-data/mg.js","locale-data/mgh.js","locale-data/mgo.js","locale-data/mk.js","locale-data/ml.js","locale-data/mn.js","locale-data/mo.js","locale-data/mr.js","locale-data/ms.js","locale-data/mt.js","locale-data/mua.js","locale-data/my.js","locale-data/mzn.js","locale-data/nah.js","locale-data/naq.js","locale-data/nb.js","locale-data/nd.js","locale-data/ne.js","locale-data/nl.js","locale-data/nmg.js","locale-data/nn.js","locale-data/nnh.js","locale-data/no.js","locale-data/nqo.js","locale-data/nr.js","locale-data/nso.js","locale-data/nus.js","locale-data/ny.js","locale-data/nyn.js","locale-data/om.js","locale-data/or.js","locale-data/os.js","locale-data/pa.js","locale-data/pap.js","locale-data/pl.js","locale-data/prg.js","locale-data/ps.js","locale-data/pt.js","locale-data/qu.js","locale-data/rm.js","locale-data/rn.js","locale-data/ro.js","locale-data/rof.js","locale-data/ru.js","locale-data/rw.js","locale-data/rwk.js","locale-data/sah.js","locale-data/saq.js","locale-data/sbp.js","locale-data/sdh.js","locale-data/se.js","locale-data/seh.js","locale-data/ses.js","locale-data/sg.js","locale-data/sh.js","locale-data/shi.js","locale-data/si.js","locale-data/sk.js","locale-data/sl.js","locale-data/sma.js","locale-data/smi.js","locale-data/smj.js","locale-data/smn.js","locale-data/sms.js","locale-data/sn.js","locale-data/so.js","locale-data/sq.js","locale-data/sr.js","locale-data/ss.js","locale-data/ssy.js","locale-data/st.js","locale-data/sv.js","locale-data/sw.js","locale-data/syr.js","locale-data/ta.js","locale-data/te.js","locale-data/teo.js","locale-data/th.js","locale-data/ti.js","locale-data/tig.js","locale-data/tk.js","locale-data/tl.js","locale-data/tn.js","locale-data/to.js","locale-data/tr.js","locale-data/ts.js","locale-data/twq.js","locale-data/tzm.js","locale-data/ug.js","locale-data/uk.js","locale-data/ur.js","locale-data/uz.js","locale-data/vai.js","locale-data/ve.js","locale-data/vi.js","locale-data/vo.js","locale-data/vun.js","locale-data/wa.js","locale-data/wae.js","locale-data/wo.js","locale-data/xh.js","locale-data/xog.js","locale-data/yav.js","locale-data/yi.js","locale-data/yo.js","locale-data/zgh.js","locale-data/zh.js","locale-data/zu.js"],"names":["$$utils$$extend","obj","i","len","source","key","sources","Array","prototype","slice","call","arguments","length","$$utils$$hop","$$compiler$$Compiler","locales","formats","pluralFn","this","$$compiler$$StringFormat","id","$$compiler$$PluralFormat","useOrdinal","offset","options","$$compiler$$PluralOffsetString","numberFormat","string","$$compiler$$SelectFormat","$$core$$MessageFormat","message","ast","__parse","type","TypeError","_mergeFormats","value","_resolveLocale","_findPluralRuleFunction","_locale","pattern","_compilePattern","messageFormat","format","values","_format","Object","hasOwnProperty","$$es5$$realDefineProp","defineProperty","e","$$es5$$defineProperty","__defineGetter__","name","desc","get","$$es5$$objCreate","create","proto","props","F","k","compile","pluralStack","currentPlural","pluralNumberFormat","compileMessage","Error","element","elements","push","compileMessageText","compileArgument","test","Intl","NumberFormat","replace","number","style","date","DateTimeFormat","time","compileOptions","ordinal","optionsHash","option","selector","pop","String","getOption","other","peg$subclass","child","parent","ctor","constructor","SyntaxError","expected","found","line","column","parse","input","peg$computePosDetails","pos","advance","details","startPos","endPos","p","ch","charAt","seenCR","peg$cachedPos","peg$cachedPosDetails","peg$fail","peg$maxFailPos","peg$currPos","peg$maxFailExpected","peg$buildException","cleanupExpected","sort","a","b","description","splice","buildMessage","stringEscape","s","hex","charCodeAt","toString","toUpperCase","expectedDesc","foundDesc","expectedDescs","join","posDetails","peg$parsestart","s0","peg$parsemessageFormatPattern","s1","s2","peg$parsemessageFormatElement","peg$FAILED","peg$reportedPos","peg$c1","peg$parsemessageTextElement","peg$parseargumentElement","peg$parsemessageText","s3","s4","s5","peg$parse_","peg$parsechars","peg$c2","peg$c3","peg$parsews","substring","peg$c4","peg$parseargument","peg$parsenumber","peg$c5","peg$silentFails","peg$c6","s6","s7","s8","peg$c7","peg$c8","peg$c10","peg$c11","peg$parseelementFormat","peg$c9","peg$c12","peg$c13","peg$c14","peg$parsesimpleFormat","peg$parsepluralFormat","peg$parseselectOrdinalFormat","peg$parseselectFormat","substr","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","peg$c21","peg$c22","peg$c23","peg$parsepluralStyle","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$parseoptionalFormatPattern","peg$c30","peg$parseselector","peg$c31","peg$c32","peg$c33","peg$parseoffset","peg$c34","peg$c35","peg$c36","peg$c37","peg$c39","peg$c40","peg$c38","peg$c41","peg$parsedigit","peg$c42","peg$c43","peg$parsehexDigit","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$parsechar","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","peg$c66","peg$c67","peg$c68","peg$result","peg$startRuleFunctions","start","peg$startRuleFunction","text","j","outerLen","inner","innerLen","messageText","pluralStyle","digits","parseInt","fromCharCode","chars","startRule","enumerable","currency","percent","short","month","day","year","medium","long","full","weekday","hour","minute","second","timeZoneName","data","locale","__localeData__","toLowerCase","intl$messageformat$parser$$default","writable","undefined","resolvedOptions","compiler","$$compiler$$default","localeData","pluralRuleFunction","parentLocale","part","result","defaults","mergedType","mergedFormats","concat","defaultLocale","localeParts","split","n","ord","v0","t0","Number","n10","n100","__addLocaleData","$$en$$default","IntlMessageFormat","i10","i100","i1000","n1000000","f","f10","f100","v"],"mappings":"wBAUO,SAAOA,GAASC,GACnB,GACIC,GAAGC,EAAKC,EAAQC,EADhBC,EAAUC,MAAMC,UAAUC,MAAMC,KAAKC,UAAW,EAGpD,KAAKT,EAAI,EAAGC,EAAMG,EAAQM,OAAYT,EAAJD,EAASA,GAAK,EAE5C,GADAE,EAASE,EAAQJ,GAGjB,IAAKG,IAAOD,GACLS,EAAKH,KAAKN,EAAQC,KACjBJ,EAAII,GAAOD,EAAOC,GAK9B,OAAOJ,GEfX,QAAOa,GAAWC,EAASC,EAASC,GAChCC,KAAKH,QAAWA,EAChBG,KAAKF,QAAWA,EAChBE,KAAKD,SAAWA,EA4IpB,QAAOE,GAAeC,GAClBF,KAAKE,GAAKA,EAWd,QAAOC,GAAeD,EAAIE,EAAYC,EAAQC,EAASP,GACnDC,KAAKE,GAAaA,EAClBF,KAAKI,WAAaA,EAClBJ,KAAKK,OAAaA,EAClBL,KAAKM,QAAaA,EAClBN,KAAKD,SAAaA,EAYtB,QAAOQ,GAAqBL,EAAIG,EAAQG,EAAcC,GAClDT,KAAKE,GAAeA,EACpBF,KAAKK,OAAeA,EACpBL,KAAKQ,aAAeA,EACpBR,KAAKS,OAAeA,EAWxB,QAAOC,GAAeR,EAAII,GACtBN,KAAKE,GAAUA,EACfF,KAAKM,QAAUA,EEtLnB,QAAOK,GAAgBC,EAASf,EAASC,GAErC,GAAIe,GAAyB,gBAAZD,KACKE,QAAQF,GAAWA,CAEzC,KAAMC,GAAoB,yBAAbA,EAAIE,KACb,KAAM,IAAIC,WAAU,iDAKxBlB,GAAUE,KAAKiB,cAAaN,EAAeb,QAASA,KAGrCE,KAAM,WAAakB,MAAOlB,KAAKmB,eAAetB,IAK7D,IAAIE,GAAWC,KAAKoB,wBAAwBpB,KAAKqB,SAC7CC,EAAWtB,KAAKuB,gBAAgBV,EAAK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YAAY,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI;;ACPvF,iBAAiB,CAAC,eAAe,GAAG,MAAM,GAAG,EAAE,GAAG,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,KAAK,KAAK","sourcesContent":["/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(\n element.id, format.ordinal, format.offset, options, pluralFn\n );\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conforms the spec's algorithm\n // for handling `\"#\"` syntax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original current plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, useOrdinal, offset, options, pluralFn) {\n this.id = id;\n this.useOrdinal = useOrdinal;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset, this.useOrdinal)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: false,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n };\n },\n peg$c25 = \"selectordinal\",\n peg$c26 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n peg$c27 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: true,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n }\n },\n peg$c28 = \"select\",\n peg$c29 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c30 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n };\n },\n peg$c31 = \"=\",\n peg$c32 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c33 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c34 = \"offset:\",\n peg$c35 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c36 = function(number) {\n return number;\n },\n peg$c37 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset,\n options: options\n };\n },\n peg$c38 = { type: \"other\", description: \"whitespace\" },\n peg$c39 = /^[ \\t\\n\\r]/,\n peg$c40 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c41 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c42 = /^[0-9]/,\n peg$c43 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c44 = /^[0-9a-f]/i,\n peg$c45 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c46 = \"0\",\n peg$c47 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c48 = /^[1-9]/,\n peg$c49 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c50 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c51 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c52 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c53 = \"\\\\\\\\\",\n peg$c54 = { type: \"literal\", value: \"\\\\\\\\\", description: \"\\\"\\\\\\\\\\\\\\\\\\\"\" },\n peg$c55 = function() { return '\\\\'; },\n peg$c56 = \"\\\\#\",\n peg$c57 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c58 = function() { return '\\\\#'; },\n peg$c59 = \"\\\\{\",\n peg$c60 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c61 = function() { return '\\u007B'; },\n peg$c62 = \"\\\\}\",\n peg$c63 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c64 = function() { return '\\u007D'; },\n peg$c65 = \"\\\\u\",\n peg$c66 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c67 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c68 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectOrdinalFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectOrdinalFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 13) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 13;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c28) {\n s1 = peg$c28;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c31;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c34) {\n s1 = peg$c34;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralStyle() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseoffset();\n if (s1 === peg$FAILED) {\n s1 = peg$c9;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parseoptionalFormatPattern();\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parseoptionalFormatPattern();\n }\n } else {\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c48.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c53) {\n s1 = peg$c53;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c55();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c56) {\n s1 = peg$c56;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c58();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c59) {\n s1 = peg$c59;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c67(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c68(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pluralFn = this._findPluralRuleFunction(this._locale);\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n MessageFormat.__localeData__[data.locale.toLowerCase()] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._findPluralRuleFunction = function (locale) {\n var localeData = MessageFormat.__localeData__;\n var data = localeData[locale.toLowerCase()];\n\n // The locale data is de-duplicated, so we have to traverse the locale's\n // hierarchy until we find a `pluralRuleFunction` to return.\n while (data) {\n if (data.pluralRuleFunction) {\n return data.pluralRuleFunction;\n }\n\n data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];\n }\n\n throw new Error(\n 'Locale data added to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` for :' + locale\n );\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n // Create a copy of the array so we can push on the default locale.\n locales = (locales || []).concat(MessageFormat.defaultLocale);\n\n var localeData = MessageFormat.__localeData__;\n var i, len, localeParts, data;\n\n // Using the set of locales + the default locale, we look for the first one\n // which that has been registered. When data does not exist for a locale, we\n // traverse its ancestors to find something that's been registered within\n // its hierarchy of locales. Since we lack the proper `parentLocale` data\n // here, we must take a naive approach to traversal.\n for (i = 0, len = locales.length; i < len; i += 1) {\n localeParts = locales[i].toLowerCase().split('-');\n\n while (localeParts.length) {\n data = localeData[localeParts.join('-')];\n if (data) {\n // Return the normalized locale string; e.g., we return \"en-US\",\n // instead of \"en-us\".\n return data.locale;\n }\n\n localeParts.pop();\n }\n }\n\n var defaultLocale = locales.pop();\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ') + ', or the default locale: ' + defaultLocale\n );\n};\n","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}};\n","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n","IntlMessageFormat.__addLocaleData({\"locale\":\"af\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"af-NA\",\"parentLocale\":\"af\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"agq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ak\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"am\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ar\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return\"other\";return n==0?\"zero\":n==1?\"one\":n==2?\"two\":n100>=3&&n100<=10?\"few\":n100>=11&&n100<=99?\"many\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-AE\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-BH\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-DJ\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-DZ\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-EG\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-EH\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-ER\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-IL\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-IQ\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-JO\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-KM\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-KW\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-LB\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-LY\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-MA\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-MR\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-OM\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-PS\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-QA\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SA\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SD\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SO\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SS\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-SY\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-TD\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-TN\",\"parentLocale\":\"ar\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ar-YE\",\"parentLocale\":\"ar\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"as\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"asa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ast\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"az\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],i10=i.slice(-1),i100=i.slice(-2),i1000=i.slice(-3);if(ord)return i10==1||i10==2||i10==5||i10==7||i10==8||(i100==20||i100==50||i100==70||i100==80)?\"one\":i10==3||i10==4||(i1000==100||i1000==200||i1000==300||i1000==400||i1000==500||i1000==600||i1000==700||i1000==800||i1000==900)?\"few\":i==0||i10==6||(i100==40||i100==60||i100==90)?\"many\":\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"az-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"az-Cyrl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"az-Latn\",\"parentLocale\":\"az\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bas\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"be\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==2||n10==3)&&n100!=12&&n100!=13?\"few\":\"other\";return n10==1&&n100!=11?\"one\":n10>=2&&n10<=4&&(n100<12||n100>14)?\"few\":t0&&n10==0||n10>=5&&n10<=9||n100>=11&&n100<=14?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bem\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bez\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bm\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bm-Nkoo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bn\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bn-IN\",\"parentLocale\":\"bn\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bo-IN\",\"parentLocale\":\"bo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"br\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),n1000000=t0&&s[0].slice(-6);if(ord)return\"other\";return n10==1&&n100!=11&&n100!=71&&n100!=91?\"one\":n10==2&&n100!=12&&n100!=72&&n100!=92?\"two\":(n10==3||n10==4||n10==9)&&(n100<10||n100>19)&&(n100<70||n100>79)&&(n100<90||n100>99)?\"few\":n!=0&&t0&&n1000000==0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"brx\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"bs\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bs-Cyrl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"bs-Latn\",\"parentLocale\":\"bs\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ca\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return n==1||n==3?\"one\":n==2?\"two\":n==4?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-AD\",\"parentLocale\":\"ca\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-ES-VALENCIA\",\"parentLocale\":\"ca-ES\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-ES\",\"parentLocale\":\"ca\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-FR\",\"parentLocale\":\"ca\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ca-IT\",\"parentLocale\":\"ca\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ce\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cgg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"chr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ckb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ckb-IR\",\"parentLocale\":\"ckb\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cs\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":i>=2&&i<=4&&v0?\"few\":!v0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"cy\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==0||n==7||n==8||n==9?\"zero\":n==1?\"one\":n==2?\"two\":n==3||n==4?\"few\":n==5||n==6?\"many\":\"other\";return n==0?\"zero\":n==1?\"one\":n==2?\"two\":n==3?\"few\":n==6?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"da\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],t0=Number(s[0])==n;if(ord)return\"other\";return n==1||!t0&&(i==0||i==1)?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"da-GL\",\"parentLocale\":\"da\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dav\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"de\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-AT\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-BE\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-CH\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-LI\",\"parentLocale\":\"de\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"de-LU\",\"parentLocale\":\"de\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dje\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dsb\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return\"other\";return v0&&i100==1||f100==1?\"one\":v0&&i100==2||f100==2?\"two\":v0&&(i100==3||i100==4)||(f100==3||f100==4)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dua\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dv\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dyo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"dz\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ebu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ee\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ee-TG\",\"parentLocale\":\"ee\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"el\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"el-CY\",\"parentLocale\":\"el\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-001\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-150\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AI\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AS\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AT\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-AU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BB\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BI\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-BZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CA\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CH\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CX\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-CY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DE\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DK\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-DM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-Dsrt\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ER\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FI\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FJ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-FM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GB\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GD\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GH\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GI\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GU\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-GY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-HK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IL\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IN\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-IO\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-JE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-JM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KE\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KI\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KN\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-KY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-LC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-LR\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-LS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MH\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MO\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MP\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MT\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-MY\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NA\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NF\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NL\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NR\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-NZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PH\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PN\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PR\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-PW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-RW\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SB\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SD\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SE\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SH\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SI\",\"parentLocale\":\"en-150\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SL\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SX\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-SZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-Shaw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TK\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TO\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TT\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TV\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-TZ\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-UG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-UM\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-US\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VC\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VG\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VI\",\"parentLocale\":\"en\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-VU\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-WS\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ZA\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ZM\",\"parentLocale\":\"en-001\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"en-ZW\",\"parentLocale\":\"en-001\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"eo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"es\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-419\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-AR\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-BO\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CL\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CO\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CR\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-CU\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-DO\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-EA\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-EC\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-GQ\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-GT\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-HN\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-IC\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-MX\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-NI\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PA\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PE\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PH\",\"parentLocale\":\"es\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PR\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-PY\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-SV\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-US\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-UY\",\"parentLocale\":\"es-419\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"es-VE\",\"parentLocale\":\"es-419\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"et\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"eu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ewo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fa-AF\",\"parentLocale\":\"fa\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ff\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<2?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ff-CM\",\"parentLocale\":\"ff\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ff-GN\",\"parentLocale\":\"ff\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ff-MR\",\"parentLocale\":\"ff\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fi\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fil\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?\"one\":\"other\";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fo-DK\",\"parentLocale\":\"fo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fr\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return n>=0&&n<2?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BE\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BI\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BJ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-BL\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CA\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CD\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CG\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CH\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CI\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-CM\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-DJ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-DZ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GA\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GN\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GP\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-GQ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-HT\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-KM\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-LU\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MA\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MC\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MG\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-ML\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MQ\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MR\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-MU\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-NC\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-NE\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-PF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-PM\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-RE\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-RW\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-SC\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-SN\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-SY\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-TD\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-TG\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-TN\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-VU\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-WF\",\"parentLocale\":\"fr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"fr-YT\",\"parentLocale\":\"fr\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fur\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"fy\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ga\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return n==1?\"one\":\"other\";return n==1?\"one\":n==2?\"two\":t0&&n>=3&&n<=6?\"few\":t0&&n>=7&&n<=10?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gd\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return n==1||n==11?\"one\":n==2||n==12?\"two\":t0&&n>=3&&n<=10||t0&&n>=13&&n<=19?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gsw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"gsw-FR\",\"parentLocale\":\"gsw\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"gsw-LI\",\"parentLocale\":\"gsw\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gu\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"guw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"guz\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"gv\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return v0&&i10==1?\"one\":v0&&i10==2?\"two\":v0&&(i100==0||i100==20||i100==40||i100==60||i100==80)?\"few\":!v0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ha\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ha-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ha-GH\",\"parentLocale\":\"ha\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ha-NE\",\"parentLocale\":\"ha\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"haw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"he\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return\"other\";return n==1&&v0?\"one\":i==2&&v0?\"two\":v0&&(n<0||n>10)&&t0&&n10==0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hi\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":n==2||n==3?\"two\":n==4?\"few\":n==6?\"many\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hr\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"hr-BA\",\"parentLocale\":\"hr\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hsb\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return\"other\";return v0&&i100==1||f100==1?\"one\":v0&&i100==2||f100==2?\"two\":v0&&(i100==3||i100==4)||(f100==3||f100==4)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hu\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1||n==5?\"one\":\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"hy\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return n>=0&&n<2?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"id\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ig\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ii\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"in\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"is\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],t0=Number(s[0])==n,i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return t0&&i10==1&&i100!=11||!t0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"it\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return n==11||n==8||n==80||n==800?\"many\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"it-CH\",\"parentLocale\":\"it\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"it-SM\",\"parentLocale\":\"it\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"iu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"iu-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"iw\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return\"other\";return n==1&&v0?\"one\":i==2&&v0?\"two\":v0&&(n<0||n>10)&&t0&&n10==0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ja\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jbo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jgo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ji\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jmc\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jv\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"jw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ka\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],i100=i.slice(-2);if(ord)return i==1?\"one\":i==0||(i100>=2&&i100<=20||i100==40||i100==60||i100==80)?\"many\":\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<2?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kaj\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kam\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kcg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kde\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kea\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"khq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ki\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return n10==6||n10==9||t0&&n10==0&&n!=0?\"many\":\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kkj\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kln\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"km\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ko\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ko-KP\",\"parentLocale\":\"ko\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kok\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ks\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ksb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ksf\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ksh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0?\"zero\":n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ku\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"kw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ky\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lag\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0];if(ord)return\"other\";return n==0?\"zero\":(i==0||i==1)&&n!=0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lkt\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ln\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ln-AO\",\"parentLocale\":\"ln\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ln-CF\",\"parentLocale\":\"ln\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ln-CG\",\"parentLocale\":\"ln\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lo\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lrc\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"lrc-IQ\",\"parentLocale\":\"lrc\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),f=s[1]||\"\",t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return\"other\";return n10==1&&(n100<11||n100>19)?\"one\":n10>=2&&n10<=9&&(n100<11||n100>19)?\"few\":f!=0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"luo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"luy\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"lv\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),f=s[1]||\"\",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return\"other\";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?\"zero\":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mas\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"mas-TZ\",\"parentLocale\":\"mas\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mer\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mfe\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mgh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mgo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1);if(ord)return i10==1&&i100!=11?\"one\":i10==2&&i100!=12?\"two\":(i10==7||i10==8)&&i100!=17&&i100!=18?\"many\":\"other\";return v0&&i10==1||f10==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ml\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"mn-Mong\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mo\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?\"one\":\"other\";return n==1&&v0?\"one\":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mr\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":n==2||n==3?\"two\":n==4?\"few\":\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ms\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ms-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ms-BN\",\"parentLocale\":\"ms\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ms-SG\",\"parentLocale\":\"ms\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return\"other\";return n==1?\"one\":n==0||n100>=2&&n100<=10?\"few\":n100>=11&&n100<=19?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mua\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"my\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"mzn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nah\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"naq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nb\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nb-SJ\",\"parentLocale\":\"nb\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nd\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ne\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return t0&&n>=1&&n<=4?\"one\":\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ne-IN\",\"parentLocale\":\"ne\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-AW\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-BE\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-BQ\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-CW\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-SR\",\"parentLocale\":\"nl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"nl-SX\",\"parentLocale\":\"nl\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nmg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nnh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"no\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nqo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nso\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nus\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ny\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"nyn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"om\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"om-KE\",\"parentLocale\":\"om\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"or\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"os\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"os-RU\",\"parentLocale\":\"os\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pa-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pa-Guru\",\"parentLocale\":\"pa\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pap\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return n==1&&v0?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?\"few\":v0&&i!=1&&(i10==0||i10==1)||v0&&(i10>=5&&i10<=9)||v0&&(i100>=12&&i100<=14)?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"prg\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),f=s[1]||\"\",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return\"other\";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?\"zero\":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ps\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"pt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return t0&&n>=0&&n<=2&&n!=2?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-AO\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-PT\",\"parentLocale\":\"pt\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-CV\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-GW\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-MO\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-MZ\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-ST\",\"parentLocale\":\"pt-PT\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"pt-TL\",\"parentLocale\":\"pt-PT\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"qu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"qu-BO\",\"parentLocale\":\"qu\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"qu-EC\",\"parentLocale\":\"qu\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rm\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ro\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?\"one\":\"other\";return n==1&&v0?\"one\":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ro-MD\",\"parentLocale\":\"ro\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rof\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ru\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?\"few\":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?\"many\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-BY\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-KG\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-KZ\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-MD\",\"parentLocale\":\"ru\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ru-UA\",\"parentLocale\":\"ru\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rw\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"rwk\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sah\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"saq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sbp\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sdh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"se\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"se-FI\",\"parentLocale\":\"se\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"se-SE\",\"parentLocale\":\"se\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"seh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ses\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sg\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sh\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"shi\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return n>=0&&n<=1?\"one\":t0&&n>=2&&n<=10?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"shi-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"shi-Tfng\",\"parentLocale\":\"shi\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"si\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\";if(ord)return\"other\";return n==0||n==1||i==0&&f==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":i>=2&&i<=4&&v0?\"few\":!v0?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],i100=i.slice(-2);if(ord)return\"other\";return v0&&i100==1?\"one\":v0&&i100==2?\"two\":v0&&(i100==3||i100==4)||!v0?\"few\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sma\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"smi\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"smj\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"smn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sms\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":n==2?\"two\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"so\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"so-DJ\",\"parentLocale\":\"so\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"so-ET\",\"parentLocale\":\"so\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"so-KE\",\"parentLocale\":\"so\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sq\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n==1?\"one\":n10==4&&n100!=14?\"many\":\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sq-MK\",\"parentLocale\":\"sq\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sq-XK\",\"parentLocale\":\"sq\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sr\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return\"other\";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?\"few\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl\",\"parentLocale\":\"sr\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl-BA\",\"parentLocale\":\"sr-Cyrl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl-ME\",\"parentLocale\":\"sr-Cyrl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Cyrl-XK\",\"parentLocale\":\"sr-Cyrl\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn-BA\",\"parentLocale\":\"sr-Latn\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn-ME\",\"parentLocale\":\"sr-Latn\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sr-Latn-XK\",\"parentLocale\":\"sr-Latn\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ss\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ssy\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"st\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sv\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==1||n10==2)&&n100!=11&&n100!=12?\"one\":\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sv-AX\",\"parentLocale\":\"sv\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sv-FI\",\"parentLocale\":\"sv\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"sw\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sw-CD\",\"parentLocale\":\"sw\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sw-KE\",\"parentLocale\":\"sw\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"sw-UG\",\"parentLocale\":\"sw\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"syr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ta\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ta-LK\",\"parentLocale\":\"ta\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ta-MY\",\"parentLocale\":\"ta\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ta-SG\",\"parentLocale\":\"ta\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"te\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"teo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"teo-KE\",\"parentLocale\":\"teo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"th\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ti\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ti-ER\",\"parentLocale\":\"ti\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tig\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tk\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tl\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],f=s[1]||\"\",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?\"one\":\"other\";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"to\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tr\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"tr-CY\",\"parentLocale\":\"tr\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ts\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"twq\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"tzm\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),t0=Number(s[0])==n;if(ord)return\"other\";return n==0||n==1||t0&&n>=11&&n<=99?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ug\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"uk\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),i10=i.slice(-1),i100=i.slice(-2);if(ord)return n10==3&&n100!=13?\"few\":\"other\";return v0&&i10==1&&i100!=11?\"one\":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?\"few\":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?\"many\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ur\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"ur-IN\",\"parentLocale\":\"ur\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"uz\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"uz-Arab\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"uz-Cyrl\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"uz-Latn\",\"parentLocale\":\"uz\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vai\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"vai-Latn\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"vai-Vaii\",\"parentLocale\":\"vai\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"ve\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vi\",\"pluralRuleFunction\":function (n,ord){if(ord)return n==1?\"one\":\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"vun\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"wa\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==0||n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"wae\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"wo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"xh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"xog\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n==1?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"yav\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"yi\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1];if(ord)return\"other\";return n==1&&v0?\"one\":\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"yo\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"yo-BJ\",\"parentLocale\":\"yo\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"zgh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"zh\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans\",\"parentLocale\":\"zh\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans-HK\",\"parentLocale\":\"zh-Hans\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans-MO\",\"parentLocale\":\"zh-Hans\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hans-SG\",\"parentLocale\":\"zh-Hans\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hant\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return\"other\"}});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hant-HK\",\"parentLocale\":\"zh-Hant\"});\nIntlMessageFormat.__addLocaleData({\"locale\":\"zh-Hant-MO\",\"parentLocale\":\"zh-Hant-HK\"});\n","IntlMessageFormat.__addLocaleData({\"locale\":\"zu\",\"pluralRuleFunction\":function (n,ord){if(ord)return\"other\";return n>=0&&n<=1?\"one\":\"other\"}});\n"]} \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat.js b/lib/intl-messageformat/dist/intl-messageformat.js new file mode 100644 index 00000000..fc9c2ddc --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat.js @@ -0,0 +1,1874 @@ +(function() { + "use strict"; + var $$utils$$hop = Object.prototype.hasOwnProperty; + + function $$utils$$extend(obj) { + var sources = Array.prototype.slice.call(arguments, 1), + i, len, source, key; + + for (i = 0, len = sources.length; i < len; i += 1) { + source = sources[i]; + if (!source) { continue; } + + for (key in source) { + if ($$utils$$hop.call(source, key)) { + obj[key] = source[key]; + } + } + } + + return obj; + } + + // Purposely using the same implementation as the Intl.js `Intl` polyfill. + // Copyright 2013 Andy Earnshaw, MIT License + + var $$es5$$realDefineProp = (function () { + try { return !!Object.defineProperty({}, 'a', {}); } + catch (e) { return false; } + })(); + + var $$es5$$es3 = !$$es5$$realDefineProp && !Object.prototype.__defineGetter__; + + var $$es5$$defineProperty = $$es5$$realDefineProp ? Object.defineProperty : + function (obj, name, desc) { + + if ('get' in desc && obj.__defineGetter__) { + obj.__defineGetter__(name, desc.get); + } else if (!$$utils$$hop.call(obj, name) || 'value' in desc) { + obj[name] = desc.value; + } + }; + + var $$es5$$objCreate = Object.create || function (proto, props) { + var obj, k; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (k in props) { + if ($$utils$$hop.call(props, k)) { + $$es5$$defineProperty(obj, k, props[k]); + } + } + + return obj; + }; + var $$compiler$$default = $$compiler$$Compiler; + + function $$compiler$$Compiler(locales, formats, pluralFn) { + this.locales = locales; + this.formats = formats; + this.pluralFn = pluralFn; + } + + $$compiler$$Compiler.prototype.compile = function (ast) { + this.pluralStack = []; + this.currentPlural = null; + this.pluralNumberFormat = null; + + return this.compileMessage(ast); + }; + + $$compiler$$Compiler.prototype.compileMessage = function (ast) { + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new Error('Message AST is not of type: "messageFormatPattern"'); + } + + var elements = ast.elements, + pattern = []; + + var i, len, element; + + for (i = 0, len = elements.length; i < len; i += 1) { + element = elements[i]; + + switch (element.type) { + case 'messageTextElement': + pattern.push(this.compileMessageText(element)); + break; + + case 'argumentElement': + pattern.push(this.compileArgument(element)); + break; + + default: + throw new Error('Message element does not have a valid type'); + } + } + + return pattern; + }; + + $$compiler$$Compiler.prototype.compileMessageText = function (element) { + // When this `element` is part of plural sub-pattern and its value contains + // an unescaped '#', use a `PluralOffsetString` helper to properly output + // the number with the correct offset in the string. + if (this.currentPlural && /(^|[^\\])#/g.test(element.value)) { + // Create a cache a NumberFormat instance that can be reused for any + // PluralOffsetString instance in this message. + if (!this.pluralNumberFormat) { + this.pluralNumberFormat = new Intl.NumberFormat(this.locales); + } + + return new $$compiler$$PluralOffsetString( + this.currentPlural.id, + this.currentPlural.format.offset, + this.pluralNumberFormat, + element.value); + } + + // Unescape the escaped '#'s in the message text. + return element.value.replace(/\\#/g, '#'); + }; + + $$compiler$$Compiler.prototype.compileArgument = function (element) { + var format = element.format; + + if (!format) { + return new $$compiler$$StringFormat(element.id); + } + + var formats = this.formats, + locales = this.locales, + pluralFn = this.pluralFn, + options; + + switch (format.type) { + case 'numberFormat': + options = formats.number[format.style]; + return { + id : element.id, + format: new Intl.NumberFormat(locales, options).format + }; + + case 'dateFormat': + options = formats.date[format.style]; + return { + id : element.id, + format: new Intl.DateTimeFormat(locales, options).format + }; + + case 'timeFormat': + options = formats.time[format.style]; + return { + id : element.id, + format: new Intl.DateTimeFormat(locales, options).format + }; + + case 'pluralFormat': + options = this.compileOptions(element); + return new $$compiler$$PluralFormat( + element.id, format.ordinal, format.offset, options, pluralFn + ); + + case 'selectFormat': + options = this.compileOptions(element); + return new $$compiler$$SelectFormat(element.id, options); + + default: + throw new Error('Message element does not have a valid format type'); + } + }; + + $$compiler$$Compiler.prototype.compileOptions = function (element) { + var format = element.format, + options = format.options, + optionsHash = {}; + + // Save the current plural element, if any, then set it to a new value when + // compiling the options sub-patterns. This conforms the spec's algorithm + // for handling `"#"` syntax in message text. + this.pluralStack.push(this.currentPlural); + this.currentPlural = format.type === 'pluralFormat' ? element : null; + + var i, len, option; + + for (i = 0, len = options.length; i < len; i += 1) { + option = options[i]; + + // Compile the sub-pattern and save it under the options's selector. + optionsHash[option.selector] = this.compileMessage(option.value); + } + + // Pop the plural stack to put back the original current plural value. + this.currentPlural = this.pluralStack.pop(); + + return optionsHash; + }; + + // -- Compiler Helper Classes -------------------------------------------------- + + function $$compiler$$StringFormat(id) { + this.id = id; + } + + $$compiler$$StringFormat.prototype.format = function (value) { + if (!value) { + return ''; + } + + return typeof value === 'string' ? value : String(value); + }; + + function $$compiler$$PluralFormat(id, useOrdinal, offset, options, pluralFn) { + this.id = id; + this.useOrdinal = useOrdinal; + this.offset = offset; + this.options = options; + this.pluralFn = pluralFn; + } + + $$compiler$$PluralFormat.prototype.getOption = function (value) { + var options = this.options; + + var option = options['=' + value] || + options[this.pluralFn(value - this.offset, this.useOrdinal)]; + + return option || options.other; + }; + + function $$compiler$$PluralOffsetString(id, offset, numberFormat, string) { + this.id = id; + this.offset = offset; + this.numberFormat = numberFormat; + this.string = string; + } + + $$compiler$$PluralOffsetString.prototype.format = function (value) { + var number = this.numberFormat.format(value - this.offset); + + return this.string + .replace(/(^|[^\\])#/g, '$1' + number) + .replace(/\\#/g, '#'); + }; + + function $$compiler$$SelectFormat(id, options) { + this.id = id; + this.options = options; + } + + $$compiler$$SelectFormat.prototype.getOption = function (value) { + var options = this.options; + return options[value] || options.other; + }; + + var intl$messageformat$parser$$default = (function() { + /* + * Generated by PEG.js 0.8.0. + * + * http://pegjs.majda.cz/ + */ + + function peg$subclass(child, parent) { + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + + function SyntaxError(message, expected, found, offset, line, column) { + this.message = message; + this.expected = expected; + this.found = found; + this.offset = offset; + this.line = line; + this.column = column; + + this.name = "SyntaxError"; + } + + peg$subclass(SyntaxError, Error); + + function parse(input) { + var options = arguments.length > 1 ? arguments[1] : {}, + + peg$FAILED = {}, + + peg$startRuleFunctions = { start: peg$parsestart }, + peg$startRuleFunction = peg$parsestart, + + peg$c0 = [], + peg$c1 = function(elements) { + return { + type : 'messageFormatPattern', + elements: elements + }; + }, + peg$c2 = peg$FAILED, + peg$c3 = function(text) { + var string = '', + i, j, outerLen, inner, innerLen; + + for (i = 0, outerLen = text.length; i < outerLen; i += 1) { + inner = text[i]; + + for (j = 0, innerLen = inner.length; j < innerLen; j += 1) { + string += inner[j]; + } + } + + return string; + }, + peg$c4 = function(messageText) { + return { + type : 'messageTextElement', + value: messageText + }; + }, + peg$c5 = /^[^ \t\n\r,.+={}#]/, + peg$c6 = { type: "class", value: "[^ \\t\\n\\r,.+={}#]", description: "[^ \\t\\n\\r,.+={}#]" }, + peg$c7 = "{", + peg$c8 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c9 = null, + peg$c10 = ",", + peg$c11 = { type: "literal", value: ",", description: "\",\"" }, + peg$c12 = "}", + peg$c13 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c14 = function(id, format) { + return { + type : 'argumentElement', + id : id, + format: format && format[2] + }; + }, + peg$c15 = "number", + peg$c16 = { type: "literal", value: "number", description: "\"number\"" }, + peg$c17 = "date", + peg$c18 = { type: "literal", value: "date", description: "\"date\"" }, + peg$c19 = "time", + peg$c20 = { type: "literal", value: "time", description: "\"time\"" }, + peg$c21 = function(type, style) { + return { + type : type + 'Format', + style: style && style[2] + }; + }, + peg$c22 = "plural", + peg$c23 = { type: "literal", value: "plural", description: "\"plural\"" }, + peg$c24 = function(pluralStyle) { + return { + type : pluralStyle.type, + ordinal: false, + offset : pluralStyle.offset || 0, + options: pluralStyle.options + }; + }, + peg$c25 = "selectordinal", + peg$c26 = { type: "literal", value: "selectordinal", description: "\"selectordinal\"" }, + peg$c27 = function(pluralStyle) { + return { + type : pluralStyle.type, + ordinal: true, + offset : pluralStyle.offset || 0, + options: pluralStyle.options + } + }, + peg$c28 = "select", + peg$c29 = { type: "literal", value: "select", description: "\"select\"" }, + peg$c30 = function(options) { + return { + type : 'selectFormat', + options: options + }; + }, + peg$c31 = "=", + peg$c32 = { type: "literal", value: "=", description: "\"=\"" }, + peg$c33 = function(selector, pattern) { + return { + type : 'optionalFormatPattern', + selector: selector, + value : pattern + }; + }, + peg$c34 = "offset:", + peg$c35 = { type: "literal", value: "offset:", description: "\"offset:\"" }, + peg$c36 = function(number) { + return number; + }, + peg$c37 = function(offset, options) { + return { + type : 'pluralFormat', + offset : offset, + options: options + }; + }, + peg$c38 = { type: "other", description: "whitespace" }, + peg$c39 = /^[ \t\n\r]/, + peg$c40 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" }, + peg$c41 = { type: "other", description: "optionalWhitespace" }, + peg$c42 = /^[0-9]/, + peg$c43 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c44 = /^[0-9a-f]/i, + peg$c45 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" }, + peg$c46 = "0", + peg$c47 = { type: "literal", value: "0", description: "\"0\"" }, + peg$c48 = /^[1-9]/, + peg$c49 = { type: "class", value: "[1-9]", description: "[1-9]" }, + peg$c50 = function(digits) { + return parseInt(digits, 10); + }, + peg$c51 = /^[^{}\\\0-\x1F \t\n\r]/, + peg$c52 = { type: "class", value: "[^{}\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}\\\\\\0-\\x1F \\t\\n\\r]" }, + peg$c53 = "\\\\", + peg$c54 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" }, + peg$c55 = function() { return '\\'; }, + peg$c56 = "\\#", + peg$c57 = { type: "literal", value: "\\#", description: "\"\\\\#\"" }, + peg$c58 = function() { return '\\#'; }, + peg$c59 = "\\{", + peg$c60 = { type: "literal", value: "\\{", description: "\"\\\\{\"" }, + peg$c61 = function() { return '\u007B'; }, + peg$c62 = "\\}", + peg$c63 = { type: "literal", value: "\\}", description: "\"\\\\}\"" }, + peg$c64 = function() { return '\u007D'; }, + peg$c65 = "\\u", + peg$c66 = { type: "literal", value: "\\u", description: "\"\\\\u\"" }, + peg$c67 = function(digits) { + return String.fromCharCode(parseInt(digits, 16)); + }, + peg$c68 = function(chars) { return chars.join(''); }, + + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$reportedPos, peg$currPos); + } + + function offset() { + return peg$reportedPos; + } + + function line() { + return peg$computePosDetails(peg$reportedPos).line; + } + + function column() { + return peg$computePosDetails(peg$reportedPos).column; + } + + function expected(description) { + throw peg$buildException( + null, + [{ type: "other", description: description }], + peg$reportedPos + ); + } + + function error(message) { + throw peg$buildException(message, null, peg$reportedPos); + } + + function peg$computePosDetails(pos) { + function advance(details, startPos, endPos) { + var p, ch; + + for (p = startPos; p < endPos; p++) { + ch = input.charAt(p); + if (ch === "\n") { + if (!details.seenCR) { details.line++; } + details.column = 1; + details.seenCR = false; + } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { + details.line++; + details.column = 1; + details.seenCR = true; + } else { + details.column++; + details.seenCR = false; + } + } + } + + if (peg$cachedPos !== pos) { + if (peg$cachedPos > pos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advance(peg$cachedPosDetails, peg$cachedPos, pos); + peg$cachedPos = pos; + } + + return peg$cachedPosDetails; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildException(message, expected, pos) { + function cleanupExpected(expected) { + var i = 1; + + expected.sort(function(a, b) { + if (a.description < b.description) { + return -1; + } else if (a.description > b.description) { + return 1; + } else { + return 0; + } + }); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } + } + } + + function buildMessage(expected, found) { + function stringEscape(s) { + function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } + + return s + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) + .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); }) + .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) + .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); + } + + var expectedDescs = new Array(expected.length), + expectedDesc, foundDesc, i; + + for (i = 0; i < expected.length; i++) { + expectedDescs[i] = expected[i].description; + } + + expectedDesc = expected.length > 1 + ? expectedDescs.slice(0, -1).join(", ") + + " or " + + expectedDescs[expected.length - 1] + : expectedDescs[0]; + + foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; + + return "Expected " + expectedDesc + " but " + foundDesc + " found."; + } + + var posDetails = peg$computePosDetails(pos), + found = pos < input.length ? input.charAt(pos) : null; + + if (expected !== null) { + cleanupExpected(expected); + } + + return new SyntaxError( + message !== null ? message : buildMessage(expected, found), + expected, + found, + pos, + posDetails.line, + posDetails.column + ); + } + + function peg$parsestart() { + var s0; + + s0 = peg$parsemessageFormatPattern(); + + return s0; + } + + function peg$parsemessageFormatPattern() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsemessageFormatElement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsemessageFormatElement(); + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c1(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsemessageFormatElement() { + var s0; + + s0 = peg$parsemessageTextElement(); + if (s0 === peg$FAILED) { + s0 = peg$parseargumentElement(); + } + + return s0; + } + + function peg$parsemessageText() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parsechars(); + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parsechars(); + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c3(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsews(); + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parsemessageTextElement() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parsemessageText(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c4(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseargument() { + var s0, s1, s2; + + s0 = peg$parsenumber(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + if (peg$c5.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c5.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } + } + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parseargumentElement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c7; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c8); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseargument(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c10; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + s8 = peg$parseelementFormat(); + if (s8 !== peg$FAILED) { + s6 = [s6, s7, s8]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$c2; + } + } else { + peg$currPos = s5; + s5 = peg$c2; + } + } else { + peg$currPos = s5; + s5 = peg$c2; + } + if (s5 === peg$FAILED) { + s5 = peg$c9; + } + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s7 = peg$c12; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s7 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c14(s3, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseelementFormat() { + var s0; + + s0 = peg$parsesimpleFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parsepluralFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectOrdinalFormat(); + if (s0 === peg$FAILED) { + s0 = peg$parseselectFormat(); + } + } + } + + return s0; + } + + function peg$parsesimpleFormat() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c15) { + s1 = peg$c15; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c16); } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c17) { + s1 = peg$c17; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c18); } + } + if (s1 === peg$FAILED) { + if (input.substr(peg$currPos, 4) === peg$c19) { + s1 = peg$c19; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c20); } + } + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 44) { + s4 = peg$c10; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsechars(); + if (s6 !== peg$FAILED) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + if (s3 === peg$FAILED) { + s3 = peg$c9; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c21(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsepluralFormat() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c22) { + s1 = peg$c22; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c23); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsepluralStyle(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c24(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselectOrdinalFormat() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 13) === peg$c25) { + s1 = peg$c25; + peg$currPos += 13; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parsepluralStyle(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c27(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselectFormat() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c28) { + s1 = peg$c28; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c29); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s3 = peg$c10; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseoptionalFormatPattern(); + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseoptionalFormatPattern(); + } + } else { + s5 = peg$c2; + } + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c30(s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseselector() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c31; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + s2 = [s2, s3]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c2; + } + } else { + peg$currPos = s1; + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parsechars(); + } + + return s0; + } + + function peg$parseoptionalFormatPattern() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseselector(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s4 = peg$c7; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c8); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + s6 = peg$parsemessageFormatPattern(); + if (s6 !== peg$FAILED) { + s7 = peg$parse_(); + if (s7 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s8 = peg$c12; + peg$currPos++; + } else { + s8 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s8 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parseoffset() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c34) { + s1 = peg$c34; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c35); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parsenumber(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c36(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsepluralStyle() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseoffset(); + if (s1 === peg$FAILED) { + s1 = peg$c9; + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseoptionalFormatPattern(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseoptionalFormatPattern(); + } + } else { + s3 = peg$c2; + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c37(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + + return s0; + } + + function peg$parsews() { + var s0, s1; + + peg$silentFails++; + s0 = []; + if (peg$c39.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c40); } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c39.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c40); } + } + } + } else { + s0 = peg$c2; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c38); } + } + + return s0; + } + + function peg$parse_() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsews(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsews(); + } + if (s1 !== peg$FAILED) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c41); } + } + + return s0; + } + + function peg$parsedigit() { + var s0; + + if (peg$c42.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c43); } + } + + return s0; + } + + function peg$parsehexDigit() { + var s0; + + if (peg$c44.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c45); } + } + + return s0; + } + + function peg$parsenumber() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s1 = peg$c46; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c47); } + } + if (s1 === peg$FAILED) { + s1 = peg$currPos; + s2 = peg$currPos; + if (peg$c48.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c49); } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parsedigit(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parsedigit(); + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c2; + } + } else { + peg$currPos = s2; + s2 = peg$c2; + } + if (s2 !== peg$FAILED) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + + return s0; + } + + function peg$parsechar() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + if (peg$c51.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c52); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c53) { + s1 = peg$c53; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c54); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c55(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c56) { + s1 = peg$c56; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c57); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c59) { + s1 = peg$c59; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c60); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c61(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c62) { + s1 = peg$c62; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c63); } + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c64(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c65) { + s1 = peg$c65; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c66); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + s4 = peg$parsehexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsehexDigit(); + if (s5 !== peg$FAILED) { + s6 = peg$parsehexDigit(); + if (s6 !== peg$FAILED) { + s7 = peg$parsehexDigit(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + } else { + peg$currPos = s3; + s3 = peg$c2; + } + if (s3 !== peg$FAILED) { + s3 = input.substring(s2, peg$currPos); + } + s2 = s3; + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c67(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } else { + peg$currPos = s0; + s0 = peg$c2; + } + } + } + } + } + } + + return s0; + } + + function peg$parsechars() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsechar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsechar(); + } + } else { + s1 = peg$c2; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c68(s1); + } + s0 = s1; + + return s0; + } + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail({ type: "end", description: "end of input" }); + } + + throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); + } + } + + return { + SyntaxError: SyntaxError, + parse: parse + }; + })(); + + var $$core$$default = $$core$$MessageFormat; + + // -- MessageFormat -------------------------------------------------------- + + function $$core$$MessageFormat(message, locales, formats) { + // Parse string messages into an AST. + var ast = typeof message === 'string' ? + $$core$$MessageFormat.__parse(message) : message; + + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new TypeError('A message must be provided as a String or AST.'); + } + + // Creates a new object with the specified `formats` merged with the default + // formats. + formats = this._mergeFormats($$core$$MessageFormat.formats, formats); + + // Defined first because it's used to build the format pattern. + $$es5$$defineProperty(this, '_locale', {value: this._resolveLocale(locales)}); + + // Compile the `ast` to a pattern that is highly optimized for repeated + // `format()` invocations. **Note:** This passes the `locales` set provided + // to the constructor instead of just the resolved locale. + var pluralFn = this._findPluralRuleFunction(this._locale); + var pattern = this._compilePattern(ast, locales, formats, pluralFn); + + // "Bind" `format()` method to `this` so it can be passed by reference like + // the other `Intl` APIs. + var messageFormat = this; + this.format = function (values) { + return messageFormat._format(pattern, values); + }; + } + + // Default format options used as the prototype of the `formats` provided to the + // constructor. These are used when constructing the internal Intl.NumberFormat + // and Intl.DateTimeFormat instances. + $$es5$$defineProperty($$core$$MessageFormat, 'formats', { + enumerable: true, + + value: { + number: { + 'currency': { + style: 'currency' + }, + + 'percent': { + style: 'percent' + } + }, + + date: { + 'short': { + month: 'numeric', + day : 'numeric', + year : '2-digit' + }, + + 'medium': { + month: 'short', + day : 'numeric', + year : 'numeric' + }, + + 'long': { + month: 'long', + day : 'numeric', + year : 'numeric' + }, + + 'full': { + weekday: 'long', + month : 'long', + day : 'numeric', + year : 'numeric' + } + }, + + time: { + 'short': { + hour : 'numeric', + minute: 'numeric' + }, + + 'medium': { + hour : 'numeric', + minute: 'numeric', + second: 'numeric' + }, + + 'long': { + hour : 'numeric', + minute : 'numeric', + second : 'numeric', + timeZoneName: 'short' + }, + + 'full': { + hour : 'numeric', + minute : 'numeric', + second : 'numeric', + timeZoneName: 'short' + } + } + } + }); + + // Define internal private properties for dealing with locale data. + $$es5$$defineProperty($$core$$MessageFormat, '__localeData__', {value: $$es5$$objCreate(null)}); + $$es5$$defineProperty($$core$$MessageFormat, '__addLocaleData', {value: function (data) { + if (!(data && data.locale)) { + throw new Error( + 'Locale data provided to IntlMessageFormat is missing a ' + + '`locale` property' + ); + } + + $$core$$MessageFormat.__localeData__[data.locale.toLowerCase()] = data; + }}); + + // Defines `__parse()` static method as an exposed private. + $$es5$$defineProperty($$core$$MessageFormat, '__parse', {value: intl$messageformat$parser$$default.parse}); + + // Define public `defaultLocale` property which defaults to English, but can be + // set by the developer. + $$es5$$defineProperty($$core$$MessageFormat, 'defaultLocale', { + enumerable: true, + writable : true, + value : undefined + }); + + $$core$$MessageFormat.prototype.resolvedOptions = function () { + // TODO: Provide anything else? + return { + locale: this._locale + }; + }; + + $$core$$MessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) { + var compiler = new $$compiler$$default(locales, formats, pluralFn); + return compiler.compile(ast); + }; + + $$core$$MessageFormat.prototype._findPluralRuleFunction = function (locale) { + var localeData = $$core$$MessageFormat.__localeData__; + var data = localeData[locale.toLowerCase()]; + + // The locale data is de-duplicated, so we have to traverse the locale's + // hierarchy until we find a `pluralRuleFunction` to return. + while (data) { + if (data.pluralRuleFunction) { + return data.pluralRuleFunction; + } + + data = data.parentLocale && localeData[data.parentLocale.toLowerCase()]; + } + + throw new Error( + 'Locale data added to IntlMessageFormat is missing a ' + + '`pluralRuleFunction` for :' + locale + ); + }; + + $$core$$MessageFormat.prototype._format = function (pattern, values) { + var result = '', + i, len, part, id, value; + + for (i = 0, len = pattern.length; i < len; i += 1) { + part = pattern[i]; + + // Exist early for string parts. + if (typeof part === 'string') { + result += part; + continue; + } + + id = part.id; + + // Enforce that all required values are provided by the caller. + if (!(values && $$utils$$hop.call(values, id))) { + throw new Error('A value must be provided for: ' + id); + } + + value = values[id]; + + // Recursively format plural and select parts' option — which can be a + // nested pattern structure. The choosing of the option to use is + // abstracted-by and delegated-to the part helper object. + if (part.options) { + result += this._format(part.getOption(value), values); + } else { + result += part.format(value); + } + } + + return result; + }; + + $$core$$MessageFormat.prototype._mergeFormats = function (defaults, formats) { + var mergedFormats = {}, + type, mergedType; + + for (type in defaults) { + if (!$$utils$$hop.call(defaults, type)) { continue; } + + mergedFormats[type] = mergedType = $$es5$$objCreate(defaults[type]); + + if (formats && $$utils$$hop.call(formats, type)) { + $$utils$$extend(mergedType, formats[type]); + } + } + + return mergedFormats; + }; + + $$core$$MessageFormat.prototype._resolveLocale = function (locales) { + if (typeof locales === 'string') { + locales = [locales]; + } + + // Create a copy of the array so we can push on the default locale. + locales = (locales || []).concat($$core$$MessageFormat.defaultLocale); + + var localeData = $$core$$MessageFormat.__localeData__; + var i, len, localeParts, data; + + // Using the set of locales + the default locale, we look for the first one + // which that has been registered. When data does not exist for a locale, we + // traverse its ancestors to find something that's been registered within + // its hierarchy of locales. Since we lack the proper `parentLocale` data + // here, we must take a naive approach to traversal. + for (i = 0, len = locales.length; i < len; i += 1) { + localeParts = locales[i].toLowerCase().split('-'); + + while (localeParts.length) { + data = localeData[localeParts.join('-')]; + if (data) { + // Return the normalized locale string; e.g., we return "en-US", + // instead of "en-us". + return data.locale; + } + + localeParts.pop(); + } + } + + var defaultLocale = locales.pop(); + throw new Error( + 'No locale data has been added to IntlMessageFormat for: ' + + locales.join(', ') + ', or the default locale: ' + defaultLocale + ); + }; + var $$en$$default = {"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}}; + + $$core$$default.__addLocaleData($$en$$default); + $$core$$default.defaultLocale = 'en'; + + var src$main$$default = $$core$$default; + this['IntlMessageFormat'] = src$main$$default; +}).call(this); + +//# sourceMappingURL=intl-messageformat.js.map \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat.js.map b/lib/intl-messageformat/dist/intl-messageformat.js.map new file mode 100644 index 00000000..407810fa --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["src/utils.js","src/es5.js","src/compiler.js","node_modules/intl-messageformat-parser/src/parser.js","src/core.js","src/en.js","src/main.js"],"names":[],"mappings":";;IAQO,CAAC,CAAC,eAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;IAEzC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;QACxB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAClD,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,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AAC,CAAC,CAAC,CAAC,CAAC,CAAC;;mBCIlR,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;mBAC/B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC","file":"dist/intl-messageformat.js","sourceRoot":"intl-messageformat/","sourcesContent":["/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(\n element.id, format.ordinal, format.offset, options, pluralFn\n );\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conforms the spec's algorithm\n // for handling `\"#\"` syntax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original current plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, useOrdinal, offset, options, pluralFn) {\n this.id = id;\n this.useOrdinal = useOrdinal;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset, this.useOrdinal)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: false,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n };\n },\n peg$c25 = \"selectordinal\",\n peg$c26 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n peg$c27 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: true,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n }\n },\n peg$c28 = \"select\",\n peg$c29 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c30 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n };\n },\n peg$c31 = \"=\",\n peg$c32 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c33 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c34 = \"offset:\",\n peg$c35 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c36 = function(number) {\n return number;\n },\n peg$c37 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset,\n options: options\n };\n },\n peg$c38 = { type: \"other\", description: \"whitespace\" },\n peg$c39 = /^[ \\t\\n\\r]/,\n peg$c40 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c41 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c42 = /^[0-9]/,\n peg$c43 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c44 = /^[0-9a-f]/i,\n peg$c45 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c46 = \"0\",\n peg$c47 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c48 = /^[1-9]/,\n peg$c49 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c50 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c51 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c52 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c53 = \"\\\\\\\\\",\n peg$c54 = { type: \"literal\", value: \"\\\\\\\\\", description: \"\\\"\\\\\\\\\\\\\\\\\\\"\" },\n peg$c55 = function() { return '\\\\'; },\n peg$c56 = \"\\\\#\",\n peg$c57 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c58 = function() { return '\\\\#'; },\n peg$c59 = \"\\\\{\",\n peg$c60 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c61 = function() { return '\\u007B'; },\n peg$c62 = \"\\\\}\",\n peg$c63 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c64 = function() { return '\\u007D'; },\n peg$c65 = \"\\\\u\",\n peg$c66 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c67 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c68 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectOrdinalFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectOrdinalFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 13) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 13;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c28) {\n s1 = peg$c28;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c31;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c34) {\n s1 = peg$c34;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralStyle() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseoffset();\n if (s1 === peg$FAILED) {\n s1 = peg$c9;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parseoptionalFormatPattern();\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parseoptionalFormatPattern();\n }\n } else {\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c48.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c53) {\n s1 = peg$c53;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c55();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c56) {\n s1 = peg$c56;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c58();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c59) {\n s1 = peg$c59;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c67(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c68(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pluralFn = this._findPluralRuleFunction(this._locale);\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n MessageFormat.__localeData__[data.locale.toLowerCase()] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._findPluralRuleFunction = function (locale) {\n var localeData = MessageFormat.__localeData__;\n var data = localeData[locale.toLowerCase()];\n\n // The locale data is de-duplicated, so we have to traverse the locale's\n // hierarchy until we find a `pluralRuleFunction` to return.\n while (data) {\n if (data.pluralRuleFunction) {\n return data.pluralRuleFunction;\n }\n\n data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];\n }\n\n throw new Error(\n 'Locale data added to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` for :' + locale\n );\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n // Create a copy of the array so we can push on the default locale.\n locales = (locales || []).concat(MessageFormat.defaultLocale);\n\n var localeData = MessageFormat.__localeData__;\n var i, len, localeParts, data;\n\n // Using the set of locales + the default locale, we look for the first one\n // which that has been registered. When data does not exist for a locale, we\n // traverse its ancestors to find something that's been registered within\n // its hierarchy of locales. Since we lack the proper `parentLocale` data\n // here, we must take a naive approach to traversal.\n for (i = 0, len = locales.length; i < len; i += 1) {\n localeParts = locales[i].toLowerCase().split('-');\n\n while (localeParts.length) {\n data = localeData[localeParts.join('-')];\n if (data) {\n // Return the normalized locale string; e.g., we return \"en-US\",\n // instead of \"en-us\".\n return data.locale;\n }\n\n localeParts.pop();\n }\n }\n\n var defaultLocale = locales.pop();\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ') + ', or the default locale: ' + defaultLocale\n );\n};\n","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}};\n","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n"]} \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat.min.js b/lib/intl-messageformat/dist/intl-messageformat.min.js new file mode 100644 index 00000000..9d27ff79 --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat.min.js @@ -0,0 +1,2 @@ +(function(){"use strict";function a(a){var b,c,d,e,f=Array.prototype.slice.call(arguments,1);for(b=0,c=f.length;c>b;b+=1)if(d=f[b])for(e in d)h.call(d,e)&&(a[e]=d[e]);return a}function b(a,b,c){this.locales=a,this.formats=b,this.pluralFn=c}function c(a){this.id=a}function d(a,b,c,d,e){this.id=a,this.useOrdinal=b,this.offset=c,this.options=d,this.pluralFn=e}function e(a,b,c,d){this.id=a,this.offset=b,this.numberFormat=c,this.string=d}function f(a,b){this.id=a,this.options=b}function g(a,b,c){var d="string"==typeof a?g.__parse(a):a;if(!d||"messageFormatPattern"!==d.type)throw new TypeError("A message must be provided as a String or AST.");c=this._mergeFormats(g.formats,c),j(this,"_locale",{value:this._resolveLocale(b)});var e=this._findPluralRuleFunction(this._locale),f=this._compilePattern(d,b,c,e),h=this;this.format=function(a){return h._format(f,a)}}var h=Object.prototype.hasOwnProperty,i=function(){try{return!!Object.defineProperty({},"a",{})}catch(a){return!1}}(),j=(!i&&!Object.prototype.__defineGetter__,i?Object.defineProperty:function(a,b,c){"get"in c&&a.__defineGetter__?a.__defineGetter__(b,c.get):(!h.call(a,b)||"value"in c)&&(a[b]=c.value)}),k=Object.create||function(a,b){function c(){}var d,e;c.prototype=a,d=new c;for(e in b)h.call(b,e)&&j(d,e,b[e]);return d},l=b;b.prototype.compile=function(a){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(a)},b.prototype.compileMessage=function(a){if(!a||"messageFormatPattern"!==a.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var b,c,d,e=a.elements,f=[];for(b=0,c=e.length;c>b;b+=1)switch(d=e[b],d.type){case"messageTextElement":f.push(this.compileMessageText(d));break;case"argumentElement":f.push(this.compileArgument(d));break;default:throw new Error("Message element does not have a valid type")}return f},b.prototype.compileMessageText=function(a){return this.currentPlural&&/(^|[^\\])#/g.test(a.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),new e(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,a.value)):a.value.replace(/\\#/g,"#")},b.prototype.compileArgument=function(a){var b=a.format;if(!b)return new c(a.id);var e,g=this.formats,h=this.locales,i=this.pluralFn;switch(b.type){case"numberFormat":return e=g.number[b.style],{id:a.id,format:new Intl.NumberFormat(h,e).format};case"dateFormat":return e=g.date[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"timeFormat":return e=g.time[b.style],{id:a.id,format:new Intl.DateTimeFormat(h,e).format};case"pluralFormat":return e=this.compileOptions(a),new d(a.id,b.ordinal,b.offset,e,i);case"selectFormat":return e=this.compileOptions(a),new f(a.id,e);default:throw new Error("Message element does not have a valid format type")}},b.prototype.compileOptions=function(a){var b=a.format,c=b.options,d={};this.pluralStack.push(this.currentPlural),this.currentPlural="pluralFormat"===b.type?a:null;var e,f,g;for(e=0,f=c.length;f>e;e+=1)g=c[e],d[g.selector]=this.compileMessage(g.value);return this.currentPlural=this.pluralStack.pop(),d},c.prototype.format=function(a){return a?"string"==typeof a?a:String(a):""},d.prototype.getOption=function(a){var b=this.options,c=b["="+a]||b[this.pluralFn(a-this.offset,this.useOrdinal)];return c||b.other},e.prototype.format=function(a){var b=this.numberFormat.format(a-this.offset);return this.string.replace(/(^|[^\\])#/g,"$1"+b).replace(/\\#/g,"#")},f.prototype.getOption=function(a){var b=this.options;return b[a]||b.other};var m=function(){function a(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}function b(a,b,c,d,e,f){this.message=a,this.expected=b,this.found=c,this.offset=d,this.line=e,this.column=f,this.name="SyntaxError"}function c(a){function c(b){function c(b,c,d){var e,f;for(e=c;d>e;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return Xa!==b&&(Xa>b&&(Xa=0,Ya={line:1,column:1,seenCR:!1}),c(Ya,Xa,b),Xa=b),Ya}function d(a){Za>Va||(Va>Za&&(Za=Va,$a=[]),$a.push(a))}function e(d,e,f){function g(a){var b=1;for(a.sort(function(a,b){return a.descriptionb.description?1:0});b1?g.slice(0,-1).join(", ")+" or "+g[a.length-1]:g[0],e=b?'"'+c(b)+'"':"end of input","Expected "+d+" but "+e+" found."}var i=c(f),j=f1?arguments[1]:{},E={},F={start:f},G=f,H=function(a){return{type:"messageFormatPattern",elements:a}},I=E,J=function(a){var b,c,d,e,f,g="";for(b=0,d=a.length;d>b;b+=1)for(e=a[b],c=0,f=e.length;f>c;c+=1)g+=e[c];return g},K=function(a){return{type:"messageTextElement",value:a}},L=/^[^ \t\n\r,.+={}#]/,M={type:"class",value:"[^ \\t\\n\\r,.+={}#]",description:"[^ \\t\\n\\r,.+={}#]"},N="{",O={type:"literal",value:"{",description:'"{"'},P=null,Q=",",R={type:"literal",value:",",description:'","'},S="}",T={type:"literal",value:"}",description:'"}"'},U=function(a,b){return{type:"argumentElement",id:a,format:b&&b[2]}},V="number",W={type:"literal",value:"number",description:'"number"'},X="date",Y={type:"literal",value:"date",description:'"date"'},Z="time",$={type:"literal",value:"time",description:'"time"'},_=function(a,b){return{type:a+"Format",style:b&&b[2]}},aa="plural",ba={type:"literal",value:"plural",description:'"plural"'},ca=function(a){return{type:a.type,ordinal:!1,offset:a.offset||0,options:a.options}},da="selectordinal",ea={type:"literal",value:"selectordinal",description:'"selectordinal"'},fa=function(a){return{type:a.type,ordinal:!0,offset:a.offset||0,options:a.options}},ga="select",ha={type:"literal",value:"select",description:'"select"'},ia=function(a){return{type:"selectFormat",options:a}},ja="=",ka={type:"literal",value:"=",description:'"="'},la=function(a,b){return{type:"optionalFormatPattern",selector:a,value:b}},ma="offset:",na={type:"literal",value:"offset:",description:'"offset:"'},oa=function(a){return a},pa=function(a,b){return{type:"pluralFormat",offset:a,options:b}},qa={type:"other",description:"whitespace"},ra=/^[ \t\n\r]/,sa={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},ta={type:"other",description:"optionalWhitespace"},ua=/^[0-9]/,va={type:"class",value:"[0-9]",description:"[0-9]"},wa=/^[0-9a-f]/i,xa={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},ya="0",za={type:"literal",value:"0",description:'"0"'},Aa=/^[1-9]/,Ba={type:"class",value:"[1-9]",description:"[1-9]"},Ca=function(a){return parseInt(a,10)},Da=/^[^{}\\\0-\x1F \t\n\r]/,Ea={type:"class",value:"[^{}\\\\\\0-\\x1F \\t\\n\\r]",description:"[^{}\\\\\\0-\\x1F \\t\\n\\r]"},Fa="\\\\",Ga={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},Ha=function(){return"\\"},Ia="\\#",Ja={type:"literal",value:"\\#",description:'"\\\\#"'},Ka=function(){return"\\#"},La="\\{",Ma={type:"literal",value:"\\{",description:'"\\\\{"'},Na=function(){return"{"},Oa="\\}",Pa={type:"literal",value:"\\}",description:'"\\\\}"'},Qa=function(){return"}"},Ra="\\u",Sa={type:"literal",value:"\\u",description:'"\\\\u"'},Ta=function(a){return String.fromCharCode(parseInt(a,16))},Ua=function(a){return a.join("")},Va=0,Wa=0,Xa=0,Ya={line:1,column:1,seenCR:!1},Za=0,$a=[],_a=0;if("startRule"in D){if(!(D.startRule in F))throw new Error("Can't start parsing from rule \""+D.startRule+'".');G=F[D.startRule]}if(C=G(),C!==E&&Va===a.length)return C;throw C!==E&&Vac;c+=1)if(e=a[c],"string"!=typeof e){if(f=e.id,!b||!h.call(b,f))throw new Error("A value must be provided for: "+f);g=b[f],i+=e.options?this._format(e.getOption(g),b):e.format(g)}else i+=e;return i},g.prototype._mergeFormats=function(b,c){var d,e,f={};for(d in b)h.call(b,d)&&(f[d]=e=k(b[d]),c&&h.call(c,d)&&a(e,c[d]));return f},g.prototype._resolveLocale=function(a){"string"==typeof a&&(a=[a]),a=(a||[]).concat(g.defaultLocale);var b,c,d,e,f=g.__localeData__;for(b=0,c=a.length;c>b;b+=1)for(d=a[b].toLowerCase().split("-");d.length;){if(e=f[d.join("-")])return e.locale;d.pop()}var h=a.pop();throw new Error("No locale data has been added to IntlMessageFormat for: "+a.join(", ")+", or the default locale: "+h)};var o={locale:"en",pluralRuleFunction:function(a,b){var c=String(a).split("."),d=!c[1],e=Number(c[0])==a,f=e&&c[0].slice(-1),g=e&&c[0].slice(-2);return b?1==f&&11!=g?"one":2==f&&12!=g?"two":3==f&&13!=g?"few":"other":1==a&&d?"one":"other"}};n.__addLocaleData(o),n.defaultLocale="en";var p=n;this.IntlMessageFormat=p}).call(this); +//# sourceMappingURL=intl-messageformat.min.js.map \ No newline at end of file diff --git a/lib/intl-messageformat/dist/intl-messageformat.min.js.map b/lib/intl-messageformat/dist/intl-messageformat.min.js.map new file mode 100644 index 00000000..f7536bb0 --- /dev/null +++ b/lib/intl-messageformat/dist/intl-messageformat.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"intl-messageformat.min.js","sources":["src/utils.js","src/es5.js","src/compiler.js","node_modules/intl-messageformat-parser/src/parser.js","src/core.js","src/en.js","src/main.js","intl-messageformat/src/utils.js","intl-messageformat/src/compiler.js","intl-messageformat/src/core.js","intl-messageformat/src/es5.js","intl-messageformat/node_modules/intl-messageformat-parser/src/parser.js","intl-messageformat/src/en.js","intl-messageformat/src/main.js"],"names":["$$utils$$extend","obj","i","len","source","key","sources","Array","prototype","slice","call","arguments","length","$$utils$$hop","$$compiler$$Compiler","locales","formats","pluralFn","this","$$compiler$$StringFormat","id","$$compiler$$PluralFormat","useOrdinal","offset","options","$$compiler$$PluralOffsetString","numberFormat","string","$$compiler$$SelectFormat","$$core$$MessageFormat","message","ast","__parse","type","TypeError","_mergeFormats","value","_resolveLocale","_findPluralRuleFunction","_locale","pattern","_compilePattern","messageFormat","format","values","_format","Object","hasOwnProperty","$$es5$$realDefineProp","defineProperty","e","$$es5$$defineProperty","__defineGetter__","name","desc","get","$$es5$$objCreate","create","proto","props","F","k","compile","pluralStack","currentPlural","pluralNumberFormat","compileMessage","Error","element","elements","push","compileMessageText","compileArgument","test","Intl","NumberFormat","replace","number","style","date","DateTimeFormat","time","compileOptions","ordinal","optionsHash","option","selector","pop","String","getOption","other","peg$subclass","child","parent","ctor","constructor","SyntaxError","expected","found","line","column","parse","input","peg$computePosDetails","pos","advance","details","startPos","endPos","p","ch","charAt","seenCR","peg$cachedPos","peg$cachedPosDetails","peg$fail","peg$maxFailPos","peg$currPos","peg$maxFailExpected","peg$buildException","cleanupExpected","sort","a","b","description","splice","buildMessage","stringEscape","s","hex","charCodeAt","toString","toUpperCase","expectedDesc","foundDesc","expectedDescs","join","posDetails","peg$parsestart","s0","peg$parsemessageFormatPattern","s1","s2","peg$parsemessageFormatElement","peg$FAILED","peg$reportedPos","peg$c1","peg$parsemessageTextElement","peg$parseargumentElement","peg$parsemessageText","s3","s4","s5","peg$parse_","peg$parsechars","peg$c2","peg$c3","peg$parsews","substring","peg$c4","peg$parseargument","peg$parsenumber","peg$c5","peg$silentFails","peg$c6","s6","s7","s8","peg$c7","peg$c8","peg$c10","peg$c11","peg$parseelementFormat","peg$c9","peg$c12","peg$c13","peg$c14","peg$parsesimpleFormat","peg$parsepluralFormat","peg$parseselectOrdinalFormat","peg$parseselectFormat","substr","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","peg$c21","peg$c22","peg$c23","peg$parsepluralStyle","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$parseoptionalFormatPattern","peg$c30","peg$parseselector","peg$c31","peg$c32","peg$c33","peg$parseoffset","peg$c34","peg$c35","peg$c36","peg$c37","peg$c39","peg$c40","peg$c38","peg$c41","peg$parsedigit","peg$c42","peg$c43","peg$parsehexDigit","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$parsechar","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","peg$c66","peg$c67","peg$c68","peg$result","peg$startRuleFunctions","start","peg$startRuleFunction","text","j","outerLen","inner","innerLen","messageText","pluralStyle","digits","parseInt","fromCharCode","chars","startRule","enumerable","currency","percent","short","month","day","year","medium","long","full","weekday","hour","minute","second","timeZoneName","data","locale","__localeData__","toLowerCase","intl$messageformat$parser$$default","writable","undefined","resolvedOptions","compiler","$$compiler$$default","localeData","pluralRuleFunction","parentLocale","part","result","defaults","mergedType","mergedFormats","concat","defaultLocale","localeParts","split","n","ord","v0","t0","Number","n10","n100","__addLocaleData","$$en$$default"],"mappings":"wBOUO,SAAOA,GAASC,GACnB,GACIC,GAAGC,EAAKC,EAAQC,EADhBC,EAAUC,MAAMC,UAAUC,MAAMC,KAAKC,UAAW,EAGpD,KAAKT,EAAI,EAAGC,EAAMG,EAAQM,OAAYT,EAAJD,EAASA,GAAK,EAE5C,GADAE,EAASE,EAAQJ,GAGjB,IAAKG,IAAOD,GACLS,EAAKH,KAAKN,EAAQC,KACjBJ,EAAII,GAAOD,EAAOC,GAK9B,OAAOJ,GCfX,QAAOa,GAAWC,EAASC,EAASC,GAChCC,KAAKH,QAAWA,EAChBG,KAAKF,QAAWA,EAChBE,KAAKD,SAAWA,EA4IpB,QAAOE,GAAeC,GAClBF,KAAKE,GAAKA,EAWd,QAAOC,GAAeD,EAAIE,EAAYC,EAAQC,EAASP,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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC","sourcesContent":["/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(\n element.id, format.ordinal, format.offset, options, pluralFn\n );\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conforms the spec's algorithm\n // for handling `\"#\"` syntax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original current plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, useOrdinal, offset, options, pluralFn) {\n this.id = id;\n this.useOrdinal = useOrdinal;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset, this.useOrdinal)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: false,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n };\n },\n peg$c25 = \"selectordinal\",\n peg$c26 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n peg$c27 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: true,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n }\n },\n peg$c28 = \"select\",\n peg$c29 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c30 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n };\n },\n peg$c31 = \"=\",\n peg$c32 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c33 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c34 = \"offset:\",\n peg$c35 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c36 = function(number) {\n return number;\n },\n peg$c37 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset,\n options: options\n };\n },\n peg$c38 = { type: \"other\", description: \"whitespace\" },\n peg$c39 = /^[ \\t\\n\\r]/,\n peg$c40 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c41 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c42 = /^[0-9]/,\n peg$c43 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c44 = /^[0-9a-f]/i,\n peg$c45 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c46 = \"0\",\n peg$c47 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c48 = /^[1-9]/,\n peg$c49 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c50 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c51 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c52 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c53 = \"\\\\\\\\\",\n peg$c54 = { type: \"literal\", value: \"\\\\\\\\\", description: \"\\\"\\\\\\\\\\\\\\\\\\\"\" },\n peg$c55 = function() { return '\\\\'; },\n peg$c56 = \"\\\\#\",\n peg$c57 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c58 = function() { return '\\\\#'; },\n peg$c59 = \"\\\\{\",\n peg$c60 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c61 = function() { return '\\u007B'; },\n peg$c62 = \"\\\\}\",\n peg$c63 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c64 = function() { return '\\u007D'; },\n peg$c65 = \"\\\\u\",\n peg$c66 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c67 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c68 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectOrdinalFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectOrdinalFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 13) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 13;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c28) {\n s1 = peg$c28;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c31;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c34) {\n s1 = peg$c34;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralStyle() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseoffset();\n if (s1 === peg$FAILED) {\n s1 = peg$c9;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parseoptionalFormatPattern();\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parseoptionalFormatPattern();\n }\n } else {\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c48.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c53) {\n s1 = peg$c53;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c55();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c56) {\n s1 = peg$c56;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c58();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c59) {\n s1 = peg$c59;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c67(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c68(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pluralFn = this._findPluralRuleFunction(this._locale);\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n MessageFormat.__localeData__[data.locale.toLowerCase()] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._findPluralRuleFunction = function (locale) {\n var localeData = MessageFormat.__localeData__;\n var data = localeData[locale.toLowerCase()];\n\n // The locale data is de-duplicated, so we have to traverse the locale's\n // hierarchy until we find a `pluralRuleFunction` to return.\n while (data) {\n if (data.pluralRuleFunction) {\n return data.pluralRuleFunction;\n }\n\n data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];\n }\n\n throw new Error(\n 'Locale data added to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` for :' + locale\n );\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n // Create a copy of the array so we can push on the default locale.\n locales = (locales || []).concat(MessageFormat.defaultLocale);\n\n var localeData = MessageFormat.__localeData__;\n var i, len, localeParts, data;\n\n // Using the set of locales + the default locale, we look for the first one\n // which that has been registered. When data does not exist for a locale, we\n // traverse its ancestors to find something that's been registered within\n // its hierarchy of locales. Since we lack the proper `parentLocale` data\n // here, we must take a naive approach to traversal.\n for (i = 0, len = locales.length; i < len; i += 1) {\n localeParts = locales[i].toLowerCase().split('-');\n\n while (localeParts.length) {\n data = localeData[localeParts.join('-')];\n if (data) {\n // Return the normalized locale string; e.g., we return \"en-US\",\n // instead of \"en-us\".\n return data.locale;\n }\n\n localeParts.pop();\n }\n }\n\n var defaultLocale = locales.pop();\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ') + ', or the default locale: ' + defaultLocale\n );\n};\n","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}};\n","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport var hop = Object.prototype.hasOwnProperty;\n\nexport function extend(obj) {\n var sources = Array.prototype.slice.call(arguments, 1),\n i, len, source, key;\n\n for (i = 0, len = sources.length; i < len; i += 1) {\n source = sources[i];\n if (!source) { continue; }\n\n for (key in source) {\n if (hop.call(source, key)) {\n obj[key] = source[key];\n }\n }\n }\n\n return obj;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nexport default Compiler;\n\nfunction Compiler(locales, formats, pluralFn) {\n this.locales = locales;\n this.formats = formats;\n this.pluralFn = pluralFn;\n}\n\nCompiler.prototype.compile = function (ast) {\n this.pluralStack = [];\n this.currentPlural = null;\n this.pluralNumberFormat = null;\n\n return this.compileMessage(ast);\n};\n\nCompiler.prototype.compileMessage = function (ast) {\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new Error('Message AST is not of type: \"messageFormatPattern\"');\n }\n\n var elements = ast.elements,\n pattern = [];\n\n var i, len, element;\n\n for (i = 0, len = elements.length; i < len; i += 1) {\n element = elements[i];\n\n switch (element.type) {\n case 'messageTextElement':\n pattern.push(this.compileMessageText(element));\n break;\n\n case 'argumentElement':\n pattern.push(this.compileArgument(element));\n break;\n\n default:\n throw new Error('Message element does not have a valid type');\n }\n }\n\n return pattern;\n};\n\nCompiler.prototype.compileMessageText = function (element) {\n // When this `element` is part of plural sub-pattern and its value contains\n // an unescaped '#', use a `PluralOffsetString` helper to properly output\n // the number with the correct offset in the string.\n if (this.currentPlural && /(^|[^\\\\])#/g.test(element.value)) {\n // Create a cache a NumberFormat instance that can be reused for any\n // PluralOffsetString instance in this message.\n if (!this.pluralNumberFormat) {\n this.pluralNumberFormat = new Intl.NumberFormat(this.locales);\n }\n\n return new PluralOffsetString(\n this.currentPlural.id,\n this.currentPlural.format.offset,\n this.pluralNumberFormat,\n element.value);\n }\n\n // Unescape the escaped '#'s in the message text.\n return element.value.replace(/\\\\#/g, '#');\n};\n\nCompiler.prototype.compileArgument = function (element) {\n var format = element.format;\n\n if (!format) {\n return new StringFormat(element.id);\n }\n\n var formats = this.formats,\n locales = this.locales,\n pluralFn = this.pluralFn,\n options;\n\n switch (format.type) {\n case 'numberFormat':\n options = formats.number[format.style];\n return {\n id : element.id,\n format: new Intl.NumberFormat(locales, options).format\n };\n\n case 'dateFormat':\n options = formats.date[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'timeFormat':\n options = formats.time[format.style];\n return {\n id : element.id,\n format: new Intl.DateTimeFormat(locales, options).format\n };\n\n case 'pluralFormat':\n options = this.compileOptions(element);\n return new PluralFormat(\n element.id, format.ordinal, format.offset, options, pluralFn\n );\n\n case 'selectFormat':\n options = this.compileOptions(element);\n return new SelectFormat(element.id, options);\n\n default:\n throw new Error('Message element does not have a valid format type');\n }\n};\n\nCompiler.prototype.compileOptions = function (element) {\n var format = element.format,\n options = format.options,\n optionsHash = {};\n\n // Save the current plural element, if any, then set it to a new value when\n // compiling the options sub-patterns. This conforms the spec's algorithm\n // for handling `\"#\"` syntax in message text.\n this.pluralStack.push(this.currentPlural);\n this.currentPlural = format.type === 'pluralFormat' ? element : null;\n\n var i, len, option;\n\n for (i = 0, len = options.length; i < len; i += 1) {\n option = options[i];\n\n // Compile the sub-pattern and save it under the options's selector.\n optionsHash[option.selector] = this.compileMessage(option.value);\n }\n\n // Pop the plural stack to put back the original current plural value.\n this.currentPlural = this.pluralStack.pop();\n\n return optionsHash;\n};\n\n// -- Compiler Helper Classes --------------------------------------------------\n\nfunction StringFormat(id) {\n this.id = id;\n}\n\nStringFormat.prototype.format = function (value) {\n if (!value) {\n return '';\n }\n\n return typeof value === 'string' ? value : String(value);\n};\n\nfunction PluralFormat(id, useOrdinal, offset, options, pluralFn) {\n this.id = id;\n this.useOrdinal = useOrdinal;\n this.offset = offset;\n this.options = options;\n this.pluralFn = pluralFn;\n}\n\nPluralFormat.prototype.getOption = function (value) {\n var options = this.options;\n\n var option = options['=' + value] ||\n options[this.pluralFn(value - this.offset, this.useOrdinal)];\n\n return option || options.other;\n};\n\nfunction PluralOffsetString(id, offset, numberFormat, string) {\n this.id = id;\n this.offset = offset;\n this.numberFormat = numberFormat;\n this.string = string;\n}\n\nPluralOffsetString.prototype.format = function (value) {\n var number = this.numberFormat.format(value - this.offset);\n\n return this.string\n .replace(/(^|[^\\\\])#/g, '$1' + number)\n .replace(/\\\\#/g, '#');\n};\n\nfunction SelectFormat(id, options) {\n this.id = id;\n this.options = options;\n}\n\nSelectFormat.prototype.getOption = function (value) {\n var options = this.options;\n return options[value] || options.other;\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {extend, hop} from './utils';\nimport {defineProperty, objCreate} from './es5';\nimport Compiler from './compiler';\nimport parser from 'intl-messageformat-parser';\n\nexport default MessageFormat;\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction MessageFormat(message, locales, formats) {\n // Parse string messages into an AST.\n var ast = typeof message === 'string' ?\n MessageFormat.__parse(message) : message;\n\n if (!(ast && ast.type === 'messageFormatPattern')) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n formats = this._mergeFormats(MessageFormat.formats, formats);\n\n // Defined first because it's used to build the format pattern.\n defineProperty(this, '_locale', {value: this._resolveLocale(locales)});\n\n // Compile the `ast` to a pattern that is highly optimized for repeated\n // `format()` invocations. **Note:** This passes the `locales` set provided\n // to the constructor instead of just the resolved locale.\n var pluralFn = this._findPluralRuleFunction(this._locale);\n var pattern = this._compilePattern(ast, locales, formats, pluralFn);\n\n // \"Bind\" `format()` method to `this` so it can be passed by reference like\n // the other `Intl` APIs.\n var messageFormat = this;\n this.format = function (values) {\n return messageFormat._format(pattern, values);\n };\n}\n\n// Default format options used as the prototype of the `formats` provided to the\n// constructor. These are used when constructing the internal Intl.NumberFormat\n// and Intl.DateTimeFormat instances.\ndefineProperty(MessageFormat, 'formats', {\n enumerable: true,\n\n value: {\n number: {\n 'currency': {\n style: 'currency'\n },\n\n 'percent': {\n style: 'percent'\n }\n },\n\n date: {\n 'short': {\n month: 'numeric',\n day : 'numeric',\n year : '2-digit'\n },\n\n 'medium': {\n month: 'short',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'long': {\n month: 'long',\n day : 'numeric',\n year : 'numeric'\n },\n\n 'full': {\n weekday: 'long',\n month : 'long',\n day : 'numeric',\n year : 'numeric'\n }\n },\n\n time: {\n 'short': {\n hour : 'numeric',\n minute: 'numeric'\n },\n\n 'medium': {\n hour : 'numeric',\n minute: 'numeric',\n second: 'numeric'\n },\n\n 'long': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n },\n\n 'full': {\n hour : 'numeric',\n minute : 'numeric',\n second : 'numeric',\n timeZoneName: 'short'\n }\n }\n }\n});\n\n// Define internal private properties for dealing with locale data.\ndefineProperty(MessageFormat, '__localeData__', {value: objCreate(null)});\ndefineProperty(MessageFormat, '__addLocaleData', {value: function (data) {\n if (!(data && data.locale)) {\n throw new Error(\n 'Locale data provided to IntlMessageFormat is missing a ' +\n '`locale` property'\n );\n }\n\n MessageFormat.__localeData__[data.locale.toLowerCase()] = data;\n}});\n\n// Defines `__parse()` static method as an exposed private.\ndefineProperty(MessageFormat, '__parse', {value: parser.parse});\n\n// Define public `defaultLocale` property which defaults to English, but can be\n// set by the developer.\ndefineProperty(MessageFormat, 'defaultLocale', {\n enumerable: true,\n writable : true,\n value : undefined\n});\n\nMessageFormat.prototype.resolvedOptions = function () {\n // TODO: Provide anything else?\n return {\n locale: this._locale\n };\n};\n\nMessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {\n var compiler = new Compiler(locales, formats, pluralFn);\n return compiler.compile(ast);\n};\n\nMessageFormat.prototype._findPluralRuleFunction = function (locale) {\n var localeData = MessageFormat.__localeData__;\n var data = localeData[locale.toLowerCase()];\n\n // The locale data is de-duplicated, so we have to traverse the locale's\n // hierarchy until we find a `pluralRuleFunction` to return.\n while (data) {\n if (data.pluralRuleFunction) {\n return data.pluralRuleFunction;\n }\n\n data = data.parentLocale && localeData[data.parentLocale.toLowerCase()];\n }\n\n throw new Error(\n 'Locale data added to IntlMessageFormat is missing a ' +\n '`pluralRuleFunction` for :' + locale\n );\n};\n\nMessageFormat.prototype._format = function (pattern, values) {\n var result = '',\n i, len, part, id, value;\n\n for (i = 0, len = pattern.length; i < len; i += 1) {\n part = pattern[i];\n\n // Exist early for string parts.\n if (typeof part === 'string') {\n result += part;\n continue;\n }\n\n id = part.id;\n\n // Enforce that all required values are provided by the caller.\n if (!(values && hop.call(values, id))) {\n throw new Error('A value must be provided for: ' + id);\n }\n\n value = values[id];\n\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (part.options) {\n result += this._format(part.getOption(value), values);\n } else {\n result += part.format(value);\n }\n }\n\n return result;\n};\n\nMessageFormat.prototype._mergeFormats = function (defaults, formats) {\n var mergedFormats = {},\n type, mergedType;\n\n for (type in defaults) {\n if (!hop.call(defaults, type)) { continue; }\n\n mergedFormats[type] = mergedType = objCreate(defaults[type]);\n\n if (formats && hop.call(formats, type)) {\n extend(mergedType, formats[type]);\n }\n }\n\n return mergedFormats;\n};\n\nMessageFormat.prototype._resolveLocale = function (locales) {\n if (typeof locales === 'string') {\n locales = [locales];\n }\n\n // Create a copy of the array so we can push on the default locale.\n locales = (locales || []).concat(MessageFormat.defaultLocale);\n\n var localeData = MessageFormat.__localeData__;\n var i, len, localeParts, data;\n\n // Using the set of locales + the default locale, we look for the first one\n // which that has been registered. When data does not exist for a locale, we\n // traverse its ancestors to find something that's been registered within\n // its hierarchy of locales. Since we lack the proper `parentLocale` data\n // here, we must take a naive approach to traversal.\n for (i = 0, len = locales.length; i < len; i += 1) {\n localeParts = locales[i].toLowerCase().split('-');\n\n while (localeParts.length) {\n data = localeData[localeParts.join('-')];\n if (data) {\n // Return the normalized locale string; e.g., we return \"en-US\",\n // instead of \"en-us\".\n return data.locale;\n }\n\n localeParts.pop();\n }\n }\n\n var defaultLocale = locales.pop();\n throw new Error(\n 'No locale data has been added to IntlMessageFormat for: ' +\n locales.join(', ') + ', or the default locale: ' + defaultLocale\n );\n};\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n/* jslint esnext: true */\n\nimport {hop} from './utils';\n\nexport {defineProperty, objCreate};\n\n// Purposely using the same implementation as the Intl.js `Intl` polyfill.\n// Copyright 2013 Andy Earnshaw, MIT License\n\nvar realDefineProp = (function () {\n try { return !!Object.defineProperty({}, 'a', {}); }\n catch (e) { return false; }\n})();\n\nvar es3 = !realDefineProp && !Object.prototype.__defineGetter__;\n\nvar defineProperty = realDefineProp ? Object.defineProperty :\n function (obj, name, desc) {\n\n if ('get' in desc && obj.__defineGetter__) {\n obj.__defineGetter__(name, desc.get);\n } else if (!hop.call(obj, name) || 'value' in desc) {\n obj[name] = desc.value;\n }\n};\n\nvar objCreate = Object.create || function (proto, props) {\n var obj, k;\n\n function F() {}\n F.prototype = proto;\n obj = new F();\n\n for (k in props) {\n if (hop.call(props, k)) {\n defineProperty(obj, k, props[k]);\n }\n }\n\n return obj;\n};\n","export default (function() {\n /*\n * Generated by PEG.js 0.8.0.\n *\n * http://pegjs.majda.cz/\n */\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function SyntaxError(message, expected, found, offset, line, column) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.offset = offset;\n this.line = line;\n this.column = column;\n\n this.name = \"SyntaxError\";\n }\n\n peg$subclass(SyntaxError, Error);\n\n function parse(input) {\n var options = arguments.length > 1 ? arguments[1] : {},\n\n peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = [],\n peg$c1 = function(elements) {\n return {\n type : 'messageFormatPattern',\n elements: elements\n };\n },\n peg$c2 = peg$FAILED,\n peg$c3 = function(text) {\n var string = '',\n i, j, outerLen, inner, innerLen;\n\n for (i = 0, outerLen = text.length; i < outerLen; i += 1) {\n inner = text[i];\n\n for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {\n string += inner[j];\n }\n }\n\n return string;\n },\n peg$c4 = function(messageText) {\n return {\n type : 'messageTextElement',\n value: messageText\n };\n },\n peg$c5 = /^[^ \\t\\n\\r,.+={}#]/,\n peg$c6 = { type: \"class\", value: \"[^ \\\\t\\\\n\\\\r,.+={}#]\", description: \"[^ \\\\t\\\\n\\\\r,.+={}#]\" },\n peg$c7 = \"{\",\n peg$c8 = { type: \"literal\", value: \"{\", description: \"\\\"{\\\"\" },\n peg$c9 = null,\n peg$c10 = \",\",\n peg$c11 = { type: \"literal\", value: \",\", description: \"\\\",\\\"\" },\n peg$c12 = \"}\",\n peg$c13 = { type: \"literal\", value: \"}\", description: \"\\\"}\\\"\" },\n peg$c14 = function(id, format) {\n return {\n type : 'argumentElement',\n id : id,\n format: format && format[2]\n };\n },\n peg$c15 = \"number\",\n peg$c16 = { type: \"literal\", value: \"number\", description: \"\\\"number\\\"\" },\n peg$c17 = \"date\",\n peg$c18 = { type: \"literal\", value: \"date\", description: \"\\\"date\\\"\" },\n peg$c19 = \"time\",\n peg$c20 = { type: \"literal\", value: \"time\", description: \"\\\"time\\\"\" },\n peg$c21 = function(type, style) {\n return {\n type : type + 'Format',\n style: style && style[2]\n };\n },\n peg$c22 = \"plural\",\n peg$c23 = { type: \"literal\", value: \"plural\", description: \"\\\"plural\\\"\" },\n peg$c24 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: false,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n };\n },\n peg$c25 = \"selectordinal\",\n peg$c26 = { type: \"literal\", value: \"selectordinal\", description: \"\\\"selectordinal\\\"\" },\n peg$c27 = function(pluralStyle) {\n return {\n type : pluralStyle.type,\n ordinal: true,\n offset : pluralStyle.offset || 0,\n options: pluralStyle.options\n }\n },\n peg$c28 = \"select\",\n peg$c29 = { type: \"literal\", value: \"select\", description: \"\\\"select\\\"\" },\n peg$c30 = function(options) {\n return {\n type : 'selectFormat',\n options: options\n };\n },\n peg$c31 = \"=\",\n peg$c32 = { type: \"literal\", value: \"=\", description: \"\\\"=\\\"\" },\n peg$c33 = function(selector, pattern) {\n return {\n type : 'optionalFormatPattern',\n selector: selector,\n value : pattern\n };\n },\n peg$c34 = \"offset:\",\n peg$c35 = { type: \"literal\", value: \"offset:\", description: \"\\\"offset:\\\"\" },\n peg$c36 = function(number) {\n return number;\n },\n peg$c37 = function(offset, options) {\n return {\n type : 'pluralFormat',\n offset : offset,\n options: options\n };\n },\n peg$c38 = { type: \"other\", description: \"whitespace\" },\n peg$c39 = /^[ \\t\\n\\r]/,\n peg$c40 = { type: \"class\", value: \"[ \\\\t\\\\n\\\\r]\", description: \"[ \\\\t\\\\n\\\\r]\" },\n peg$c41 = { type: \"other\", description: \"optionalWhitespace\" },\n peg$c42 = /^[0-9]/,\n peg$c43 = { type: \"class\", value: \"[0-9]\", description: \"[0-9]\" },\n peg$c44 = /^[0-9a-f]/i,\n peg$c45 = { type: \"class\", value: \"[0-9a-f]i\", description: \"[0-9a-f]i\" },\n peg$c46 = \"0\",\n peg$c47 = { type: \"literal\", value: \"0\", description: \"\\\"0\\\"\" },\n peg$c48 = /^[1-9]/,\n peg$c49 = { type: \"class\", value: \"[1-9]\", description: \"[1-9]\" },\n peg$c50 = function(digits) {\n return parseInt(digits, 10);\n },\n peg$c51 = /^[^{}\\\\\\0-\\x1F \\t\\n\\r]/,\n peg$c52 = { type: \"class\", value: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\", description: \"[^{}\\\\\\\\\\\\0-\\\\x1F \\\\t\\\\n\\\\r]\" },\n peg$c53 = \"\\\\\\\\\",\n peg$c54 = { type: \"literal\", value: \"\\\\\\\\\", description: \"\\\"\\\\\\\\\\\\\\\\\\\"\" },\n peg$c55 = function() { return '\\\\'; },\n peg$c56 = \"\\\\#\",\n peg$c57 = { type: \"literal\", value: \"\\\\#\", description: \"\\\"\\\\\\\\#\\\"\" },\n peg$c58 = function() { return '\\\\#'; },\n peg$c59 = \"\\\\{\",\n peg$c60 = { type: \"literal\", value: \"\\\\{\", description: \"\\\"\\\\\\\\{\\\"\" },\n peg$c61 = function() { return '\\u007B'; },\n peg$c62 = \"\\\\}\",\n peg$c63 = { type: \"literal\", value: \"\\\\}\", description: \"\\\"\\\\\\\\}\\\"\" },\n peg$c64 = function() { return '\\u007D'; },\n peg$c65 = \"\\\\u\",\n peg$c66 = { type: \"literal\", value: \"\\\\u\", description: \"\\\"\\\\\\\\u\\\"\" },\n peg$c67 = function(digits) {\n return String.fromCharCode(parseInt(digits, 16));\n },\n peg$c68 = function(chars) { return chars.join(''); },\n\n peg$currPos = 0,\n peg$reportedPos = 0,\n peg$cachedPos = 0,\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$reportedPos, peg$currPos);\n }\n\n function offset() {\n return peg$reportedPos;\n }\n\n function line() {\n return peg$computePosDetails(peg$reportedPos).line;\n }\n\n function column() {\n return peg$computePosDetails(peg$reportedPos).column;\n }\n\n function expected(description) {\n throw peg$buildException(\n null,\n [{ type: \"other\", description: description }],\n peg$reportedPos\n );\n }\n\n function error(message) {\n throw peg$buildException(message, null, peg$reportedPos);\n }\n\n function peg$computePosDetails(pos) {\n function advance(details, startPos, endPos) {\n var p, ch;\n\n for (p = startPos; p < endPos; p++) {\n ch = input.charAt(p);\n if (ch === \"\\n\") {\n if (!details.seenCR) { details.line++; }\n details.column = 1;\n details.seenCR = false;\n } else if (ch === \"\\r\" || ch === \"\\u2028\" || ch === \"\\u2029\") {\n details.line++;\n details.column = 1;\n details.seenCR = true;\n } else {\n details.column++;\n details.seenCR = false;\n }\n }\n }\n\n if (peg$cachedPos !== pos) {\n if (peg$cachedPos > pos) {\n peg$cachedPos = 0;\n peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };\n }\n advance(peg$cachedPosDetails, peg$cachedPos, pos);\n peg$cachedPos = pos;\n }\n\n return peg$cachedPosDetails;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildException(message, expected, pos) {\n function cleanupExpected(expected) {\n var i = 1;\n\n expected.sort(function(a, b) {\n if (a.description < b.description) {\n return -1;\n } else if (a.description > b.description) {\n return 1;\n } else {\n return 0;\n }\n });\n\n while (i < expected.length) {\n if (expected[i - 1] === expected[i]) {\n expected.splice(i, 1);\n } else {\n i++;\n }\n }\n }\n\n function buildMessage(expected, found) {\n function stringEscape(s) {\n function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }\n\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\x08/g, '\\\\b')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x80-\\xFF]/g, function(ch) { return '\\\\x' + hex(ch); })\n .replace(/[\\u0180-\\u0FFF]/g, function(ch) { return '\\\\u0' + hex(ch); })\n .replace(/[\\u1080-\\uFFFF]/g, function(ch) { return '\\\\u' + hex(ch); });\n }\n\n var expectedDescs = new Array(expected.length),\n expectedDesc, foundDesc, i;\n\n for (i = 0; i < expected.length; i++) {\n expectedDescs[i] = expected[i].description;\n }\n\n expectedDesc = expected.length > 1\n ? expectedDescs.slice(0, -1).join(\", \")\n + \" or \"\n + expectedDescs[expected.length - 1]\n : expectedDescs[0];\n\n foundDesc = found ? \"\\\"\" + stringEscape(found) + \"\\\"\" : \"end of input\";\n\n return \"Expected \" + expectedDesc + \" but \" + foundDesc + \" found.\";\n }\n\n var posDetails = peg$computePosDetails(pos),\n found = pos < input.length ? input.charAt(pos) : null;\n\n if (expected !== null) {\n cleanupExpected(expected);\n }\n\n return new SyntaxError(\n message !== null ? message : buildMessage(expected, found),\n expected,\n found,\n pos,\n posDetails.line,\n posDetails.column\n );\n }\n\n function peg$parsestart() {\n var s0;\n\n s0 = peg$parsemessageFormatPattern();\n\n return s0;\n }\n\n function peg$parsemessageFormatPattern() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsemessageFormatElement();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsemessageFormatElement();\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsemessageFormatElement() {\n var s0;\n\n s0 = peg$parsemessageTextElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n }\n\n return s0;\n }\n\n function peg$parsemessageText() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsechars();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c3(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsews();\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parsemessageTextElement() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c4(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseargument() {\n var s0, s1, s2;\n\n s0 = peg$parsenumber();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n }\n\n return s0;\n }\n\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c7;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargument();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s6 = peg$c10;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n s8 = peg$parseelementFormat();\n if (s8 !== peg$FAILED) {\n s6 = [s6, s7, s8];\n s5 = s6;\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n } else {\n peg$currPos = s5;\n s5 = peg$c2;\n }\n if (s5 === peg$FAILED) {\n s5 = peg$c9;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c12;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s7 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c14(s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseelementFormat() {\n var s0;\n\n s0 = peg$parsesimpleFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectOrdinalFormat();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectFormat();\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsesimpleFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c16); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c17) {\n s1 = peg$c17;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s1 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c20); }\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s4 = peg$c10;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsechars();\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 === peg$FAILED) {\n s3 = peg$c9;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c21(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c24(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectOrdinalFormat() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 13) === peg$c25) {\n s1 = peg$c25;\n peg$currPos += 13;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsepluralStyle();\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c27(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselectFormat() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c28) {\n s1 = peg$c28;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s3 = peg$c10;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = peg$parseoptionalFormatPattern();\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = peg$parseoptionalFormatPattern();\n }\n } else {\n s5 = peg$c2;\n }\n if (s5 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c30(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c31;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$parsechars();\n }\n\n return s0;\n }\n\n function peg$parseoptionalFormatPattern() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessageFormatPattern();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s8 = peg$c12;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c13); }\n }\n if (s8 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c33(s2, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parseoffset() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c34) {\n s1 = peg$c34;\n peg$currPos += 7;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c35); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c36(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsepluralStyle() {\n var s0, s1, s2, s3, s4;\n\n s0 = peg$currPos;\n s1 = peg$parseoffset();\n if (s1 === peg$FAILED) {\n s1 = peg$c9;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parseoptionalFormatPattern();\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parseoptionalFormatPattern();\n }\n } else {\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c37(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n\n return s0;\n }\n\n function peg$parsews() {\n var s0, s1;\n\n peg$silentFails++;\n s0 = [];\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n } else {\n s0 = peg$c2;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1, s2;\n\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsews();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsews();\n }\n if (s1 !== peg$FAILED) {\n s1 = input.substring(s0, peg$currPos);\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c41); }\n }\n\n return s0;\n }\n\n function peg$parsedigit() {\n var s0;\n\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c43); }\n }\n\n return s0;\n }\n\n function peg$parsehexDigit() {\n var s0;\n\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c46;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c47); }\n }\n if (s1 === peg$FAILED) {\n s1 = peg$currPos;\n s2 = peg$currPos;\n if (peg$c48.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsedigit();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsedigit();\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$c2;\n }\n if (s2 !== peg$FAILED) {\n s2 = input.substring(s1, peg$currPos);\n }\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c50(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parsechar() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n if (peg$c51.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c52); }\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c53) {\n s1 = peg$c53;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c55();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c56) {\n s1 = peg$c56;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c57); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c58();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c59) {\n s1 = peg$c59;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c61();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c62) {\n s1 = peg$c62;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c63); }\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c64();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n s4 = peg$parsehexDigit();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsehexDigit();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsehexDigit();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehexDigit();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$c2;\n }\n if (s3 !== peg$FAILED) {\n s3 = input.substring(s2, peg$currPos);\n }\n s2 = s3;\n if (s2 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c67(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$c2;\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsechars() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsechar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsechar();\n }\n } else {\n s1 = peg$c2;\n }\n if (s1 !== peg$FAILED) {\n peg$reportedPos = s0;\n s1 = peg$c68(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail({ type: \"end\", description: \"end of input\" });\n }\n\n throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);\n }\n }\n\n return {\n SyntaxError: SyntaxError,\n parse: parse\n };\n})();","// GENERATED FILE\nexport default {\"locale\":\"en\",\"pluralRuleFunction\":function (n,ord){var s=String(n).split(\".\"),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?\"one\":n10==2&&n100!=12?\"two\":n10==3&&n100!=13?\"few\":\"other\";return n==1&&v0?\"one\":\"other\"}};\n","/* jslint esnext: true */\n\nimport IntlMessageFormat from './core';\nimport defaultLocale from './en';\n\nIntlMessageFormat.__addLocaleData(defaultLocale);\nIntlMessageFormat.defaultLocale = 'en';\n\nexport default IntlMessageFormat;\n"]} \ No newline at end of file diff --git a/lib/intl-messageformat/dist/locale-data/af.js b/lib/intl-messageformat/dist/locale-data/af.js new file mode 100644 index 00000000..499aa26c --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/af.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"af","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"af-NA","parentLocale":"af"}); diff --git a/lib/intl-messageformat/dist/locale-data/agq.js b/lib/intl-messageformat/dist/locale-data/agq.js new file mode 100644 index 00000000..b7945e9a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/agq.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"agq","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ak.js b/lib/intl-messageformat/dist/locale-data/ak.js new file mode 100644 index 00000000..cf604e4a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ak.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ak","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/am.js b/lib/intl-messageformat/dist/locale-data/am.js new file mode 100644 index 00000000..873fffee --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/am.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"am","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ar.js b/lib/intl-messageformat/dist/locale-data/ar.js new file mode 100644 index 00000000..1b59cc28 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ar.js @@ -0,0 +1,28 @@ +IntlMessageFormat.__addLocaleData({"locale":"ar","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return"other";return n==0?"zero":n==1?"one":n==2?"two":n100>=3&&n100<=10?"few":n100>=11&&n100<=99?"many":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ar-AE","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-BH","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-DJ","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-DZ","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-EG","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-EH","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-ER","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-IL","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-IQ","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-JO","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-KM","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-KW","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-LB","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-LY","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-MA","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-MR","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-OM","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-PS","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-QA","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SA","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SD","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SO","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SS","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-SY","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-TD","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-TN","parentLocale":"ar"}); +IntlMessageFormat.__addLocaleData({"locale":"ar-YE","parentLocale":"ar"}); diff --git a/lib/intl-messageformat/dist/locale-data/as.js b/lib/intl-messageformat/dist/locale-data/as.js new file mode 100644 index 00000000..efef0fbd --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/as.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"as","pluralRuleFunction":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/asa.js b/lib/intl-messageformat/dist/locale-data/asa.js new file mode 100644 index 00000000..a3544af1 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/asa.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"asa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ast.js b/lib/intl-messageformat/dist/locale-data/ast.js new file mode 100644 index 00000000..8464aa9d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ast.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ast","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/az.js b/lib/intl-messageformat/dist/locale-data/az.js new file mode 100644 index 00000000..763df35a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/az.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"az","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],i10=i.slice(-1),i100=i.slice(-2),i1000=i.slice(-3);if(ord)return i10==1||i10==2||i10==5||i10==7||i10==8||(i100==20||i100==50||i100==70||i100==80)?"one":i10==3||i10==4||(i1000==100||i1000==200||i1000==300||i1000==400||i1000==500||i1000==600||i1000==700||i1000==800||i1000==900)?"few":i==0||i10==6||(i100==40||i100==60||i100==90)?"many":"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"az-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"az-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"az-Latn","parentLocale":"az"}); diff --git a/lib/intl-messageformat/dist/locale-data/bas.js b/lib/intl-messageformat/dist/locale-data/bas.js new file mode 100644 index 00000000..7228c4ad --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bas.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"bas","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/be.js b/lib/intl-messageformat/dist/locale-data/be.js new file mode 100644 index 00000000..66cb9694 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/be.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"be","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==2||n10==3)&&n100!=12&&n100!=13?"few":"other";return n10==1&&n100!=11?"one":n10>=2&&n10<=4&&(n100<12||n100>14)?"few":t0&&n10==0||n10>=5&&n10<=9||n100>=11&&n100<=14?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bem.js b/lib/intl-messageformat/dist/locale-data/bem.js new file mode 100644 index 00000000..980c8d09 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bem.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"bem","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bez.js b/lib/intl-messageformat/dist/locale-data/bez.js new file mode 100644 index 00000000..0e2ad473 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bez.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"bez","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bg.js b/lib/intl-messageformat/dist/locale-data/bg.js new file mode 100644 index 00000000..41fcae05 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"bg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bh.js b/lib/intl-messageformat/dist/locale-data/bh.js new file mode 100644 index 00000000..2e23bece --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"bh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bm.js b/lib/intl-messageformat/dist/locale-data/bm.js new file mode 100644 index 00000000..2161e3eb --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bm.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"bm","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bm-Nkoo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bn.js b/lib/intl-messageformat/dist/locale-data/bn.js new file mode 100644 index 00000000..c2934b55 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bn.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"bn","pluralRuleFunction":function (n,ord){if(ord)return n==1||n==5||n==7||n==8||n==9||n==10?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bn-IN","parentLocale":"bn"}); diff --git a/lib/intl-messageformat/dist/locale-data/bo.js b/lib/intl-messageformat/dist/locale-data/bo.js new file mode 100644 index 00000000..27facd2b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bo.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"bo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bo-IN","parentLocale":"bo"}); diff --git a/lib/intl-messageformat/dist/locale-data/br.js b/lib/intl-messageformat/dist/locale-data/br.js new file mode 100644 index 00000000..1b8c657d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/br.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"br","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),n1000000=t0&&s[0].slice(-6);if(ord)return"other";return n10==1&&n100!=11&&n100!=71&&n100!=91?"one":n10==2&&n100!=12&&n100!=72&&n100!=92?"two":(n10==3||n10==4||n10==9)&&(n100<10||n100>19)&&(n100<70||n100>79)&&(n100<90||n100>99)?"few":n!=0&&t0&&n1000000==0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/brx.js b/lib/intl-messageformat/dist/locale-data/brx.js new file mode 100644 index 00000000..36e8eb44 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/brx.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"brx","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/bs.js b/lib/intl-messageformat/dist/locale-data/bs.js new file mode 100644 index 00000000..122e3016 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/bs.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"bs","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bs-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"bs-Latn","parentLocale":"bs"}); diff --git a/lib/intl-messageformat/dist/locale-data/ca.js b/lib/intl-messageformat/dist/locale-data/ca.js new file mode 100644 index 00000000..6cfbe2ae --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ca.js @@ -0,0 +1,6 @@ +IntlMessageFormat.__addLocaleData({"locale":"ca","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return n==1||n==3?"one":n==2?"two":n==4?"few":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ca-AD","parentLocale":"ca"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-ES-VALENCIA","parentLocale":"ca-ES"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-ES","parentLocale":"ca"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-FR","parentLocale":"ca"}); +IntlMessageFormat.__addLocaleData({"locale":"ca-IT","parentLocale":"ca"}); diff --git a/lib/intl-messageformat/dist/locale-data/ce.js b/lib/intl-messageformat/dist/locale-data/ce.js new file mode 100644 index 00000000..21767e50 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ce.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ce","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/cgg.js b/lib/intl-messageformat/dist/locale-data/cgg.js new file mode 100644 index 00000000..41be3612 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/cgg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"cgg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/chr.js b/lib/intl-messageformat/dist/locale-data/chr.js new file mode 100644 index 00000000..f0cefa75 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/chr.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"chr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ckb.js b/lib/intl-messageformat/dist/locale-data/ckb.js new file mode 100644 index 00000000..4fce57cb --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ckb.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ckb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ckb-IR","parentLocale":"ckb"}); diff --git a/lib/intl-messageformat/dist/locale-data/cs.js b/lib/intl-messageformat/dist/locale-data/cs.js new file mode 100644 index 00000000..102a572c --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/cs.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"cs","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1];if(ord)return"other";return n==1&&v0?"one":i>=2&&i<=4&&v0?"few":!v0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/cu.js b/lib/intl-messageformat/dist/locale-data/cu.js new file mode 100644 index 00000000..d974fe41 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/cu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"cu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/cy.js b/lib/intl-messageformat/dist/locale-data/cy.js new file mode 100644 index 00000000..6d07ec5d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/cy.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"cy","pluralRuleFunction":function (n,ord){if(ord)return n==0||n==7||n==8||n==9?"zero":n==1?"one":n==2?"two":n==3||n==4?"few":n==5||n==6?"many":"other";return n==0?"zero":n==1?"one":n==2?"two":n==3?"few":n==6?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/da.js b/lib/intl-messageformat/dist/locale-data/da.js new file mode 100644 index 00000000..2c2659b7 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/da.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"da","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],t0=Number(s[0])==n;if(ord)return"other";return n==1||!t0&&(i==0||i==1)?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"da-GL","parentLocale":"da"}); diff --git a/lib/intl-messageformat/dist/locale-data/dav.js b/lib/intl-messageformat/dist/locale-data/dav.js new file mode 100644 index 00000000..5029719f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dav.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dav","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/de.js b/lib/intl-messageformat/dist/locale-data/de.js new file mode 100644 index 00000000..4e8c779e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/de.js @@ -0,0 +1,6 @@ +IntlMessageFormat.__addLocaleData({"locale":"de","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"de-AT","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-BE","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-CH","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-LI","parentLocale":"de"}); +IntlMessageFormat.__addLocaleData({"locale":"de-LU","parentLocale":"de"}); diff --git a/lib/intl-messageformat/dist/locale-data/dje.js b/lib/intl-messageformat/dist/locale-data/dje.js new file mode 100644 index 00000000..863c0a1b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dje.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dje","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/dsb.js b/lib/intl-messageformat/dist/locale-data/dsb.js new file mode 100644 index 00000000..c6e1f836 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dsb.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dsb","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return"other";return v0&&i100==1||f100==1?"one":v0&&i100==2||f100==2?"two":v0&&(i100==3||i100==4)||(f100==3||f100==4)?"few":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/dua.js b/lib/intl-messageformat/dist/locale-data/dua.js new file mode 100644 index 00000000..28ae79c3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dua.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dua","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/dv.js b/lib/intl-messageformat/dist/locale-data/dv.js new file mode 100644 index 00000000..4350c32d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dv.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dv","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/dyo.js b/lib/intl-messageformat/dist/locale-data/dyo.js new file mode 100644 index 00000000..96ea2c3b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dyo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dyo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/dz.js b/lib/intl-messageformat/dist/locale-data/dz.js new file mode 100644 index 00000000..10991463 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/dz.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"dz","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ebu.js b/lib/intl-messageformat/dist/locale-data/ebu.js new file mode 100644 index 00000000..9501694a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ebu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ebu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ee.js b/lib/intl-messageformat/dist/locale-data/ee.js new file mode 100644 index 00000000..9e526369 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ee.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ee","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ee-TG","parentLocale":"ee"}); diff --git a/lib/intl-messageformat/dist/locale-data/el.js b/lib/intl-messageformat/dist/locale-data/el.js new file mode 100644 index 00000000..12fe6973 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/el.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"el","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"el-CY","parentLocale":"el"}); diff --git a/lib/intl-messageformat/dist/locale-data/en.js b/lib/intl-messageformat/dist/locale-data/en.js new file mode 100644 index 00000000..31dc2204 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/en.js @@ -0,0 +1,107 @@ +IntlMessageFormat.__addLocaleData({"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"en-001","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-150","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AI","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AS","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AT","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-AU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BB","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BI","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-BZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CA","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CH","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CX","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-CY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DE","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DK","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-DM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-Dsrt","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"en-ER","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FI","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FJ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-FM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GB","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GD","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GH","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GI","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GU","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-GY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-HK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IL","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IN","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-IO","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-JE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-JM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KE","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KI","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KN","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-KY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-LC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-LR","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-LS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MH","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MO","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MP","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MT","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-MY","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NA","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NF","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NL","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NR","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-NZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PH","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PN","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PR","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-PW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-RW","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SB","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SD","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SE","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SH","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SI","parentLocale":"en-150"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SL","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SX","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-SZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-Shaw","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"en-TC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TK","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TO","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TT","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TV","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-TZ","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-UG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-UM","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-US","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VC","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VG","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VI","parentLocale":"en"}); +IntlMessageFormat.__addLocaleData({"locale":"en-VU","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-WS","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-ZA","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-ZM","parentLocale":"en-001"}); +IntlMessageFormat.__addLocaleData({"locale":"en-ZW","parentLocale":"en-001"}); diff --git a/lib/intl-messageformat/dist/locale-data/eo.js b/lib/intl-messageformat/dist/locale-data/eo.js new file mode 100644 index 00000000..fbdff501 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/eo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"eo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/es.js b/lib/intl-messageformat/dist/locale-data/es.js new file mode 100644 index 00000000..00ef6dfa --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/es.js @@ -0,0 +1,26 @@ +IntlMessageFormat.__addLocaleData({"locale":"es","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"es-419","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-AR","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-BO","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CL","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CO","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CR","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-CU","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-DO","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-EA","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-EC","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-GQ","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-GT","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-HN","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-IC","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-MX","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-NI","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PA","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PE","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PH","parentLocale":"es"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PR","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-PY","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-SV","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-US","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-UY","parentLocale":"es-419"}); +IntlMessageFormat.__addLocaleData({"locale":"es-VE","parentLocale":"es-419"}); diff --git a/lib/intl-messageformat/dist/locale-data/et.js b/lib/intl-messageformat/dist/locale-data/et.js new file mode 100644 index 00000000..a4da14a4 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/et.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"et","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/eu.js b/lib/intl-messageformat/dist/locale-data/eu.js new file mode 100644 index 00000000..05b77771 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/eu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"eu","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ewo.js b/lib/intl-messageformat/dist/locale-data/ewo.js new file mode 100644 index 00000000..359d17ad --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ewo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ewo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/fa.js b/lib/intl-messageformat/dist/locale-data/fa.js new file mode 100644 index 00000000..d00b7cc4 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fa.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"fa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"fa-AF","parentLocale":"fa"}); diff --git a/lib/intl-messageformat/dist/locale-data/ff.js b/lib/intl-messageformat/dist/locale-data/ff.js new file mode 100644 index 00000000..11b86edb --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ff.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"ff","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<2?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ff-CM","parentLocale":"ff"}); +IntlMessageFormat.__addLocaleData({"locale":"ff-GN","parentLocale":"ff"}); +IntlMessageFormat.__addLocaleData({"locale":"ff-MR","parentLocale":"ff"}); diff --git a/lib/intl-messageformat/dist/locale-data/fi.js b/lib/intl-messageformat/dist/locale-data/fi.js new file mode 100644 index 00000000..857b3ae1 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fi.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"fi","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/fil.js b/lib/intl-messageformat/dist/locale-data/fil.js new file mode 100644 index 00000000..db5a071d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fil.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"fil","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?"one":"other";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/fo.js b/lib/intl-messageformat/dist/locale-data/fo.js new file mode 100644 index 00000000..a92fdb42 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fo.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"fo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"fo-DK","parentLocale":"fo"}); diff --git a/lib/intl-messageformat/dist/locale-data/fr.js b/lib/intl-messageformat/dist/locale-data/fr.js new file mode 100644 index 00000000..dcdd30e2 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fr.js @@ -0,0 +1,46 @@ +IntlMessageFormat.__addLocaleData({"locale":"fr","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return n>=0&&n<2?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BE","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BI","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BJ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-BL","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CA","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CD","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CG","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CH","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CI","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-CM","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-DJ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-DZ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GA","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GN","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GP","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-GQ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-HT","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-KM","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-LU","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MA","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MC","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MG","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-ML","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MQ","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MR","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-MU","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-NC","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-NE","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-PF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-PM","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-RE","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-RW","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-SC","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-SN","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-SY","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-TD","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-TG","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-TN","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-VU","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-WF","parentLocale":"fr"}); +IntlMessageFormat.__addLocaleData({"locale":"fr-YT","parentLocale":"fr"}); diff --git a/lib/intl-messageformat/dist/locale-data/fur.js b/lib/intl-messageformat/dist/locale-data/fur.js new file mode 100644 index 00000000..8e41939a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fur.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"fur","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/fy.js b/lib/intl-messageformat/dist/locale-data/fy.js new file mode 100644 index 00000000..9e6afba5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/fy.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"fy","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ga.js b/lib/intl-messageformat/dist/locale-data/ga.js new file mode 100644 index 00000000..610a86ae --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ga.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ga","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return n==1?"one":"other";return n==1?"one":n==2?"two":t0&&n>=3&&n<=6?"few":t0&&n>=7&&n<=10?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/gd.js b/lib/intl-messageformat/dist/locale-data/gd.js new file mode 100644 index 00000000..e7eb9e6e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/gd.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"gd","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return n==1||n==11?"one":n==2||n==12?"two":t0&&n>=3&&n<=10||t0&&n>=13&&n<=19?"few":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/gl.js b/lib/intl-messageformat/dist/locale-data/gl.js new file mode 100644 index 00000000..ef6cd722 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/gl.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"gl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/gsw.js b/lib/intl-messageformat/dist/locale-data/gsw.js new file mode 100644 index 00000000..38772312 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/gsw.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"gsw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"gsw-FR","parentLocale":"gsw"}); +IntlMessageFormat.__addLocaleData({"locale":"gsw-LI","parentLocale":"gsw"}); diff --git a/lib/intl-messageformat/dist/locale-data/gu.js b/lib/intl-messageformat/dist/locale-data/gu.js new file mode 100644 index 00000000..d30a2f42 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/gu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"gu","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/guw.js b/lib/intl-messageformat/dist/locale-data/guw.js new file mode 100644 index 00000000..3856956f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/guw.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"guw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/guz.js b/lib/intl-messageformat/dist/locale-data/guz.js new file mode 100644 index 00000000..341d3035 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/guz.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"guz","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/gv.js b/lib/intl-messageformat/dist/locale-data/gv.js new file mode 100644 index 00000000..e90b036d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/gv.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"gv","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return v0&&i10==1?"one":v0&&i10==2?"two":v0&&(i100==0||i100==20||i100==40||i100==60||i100==80)?"few":!v0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ha.js b/lib/intl-messageformat/dist/locale-data/ha.js new file mode 100644 index 00000000..15a5319d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ha.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"ha","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ha-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ha-GH","parentLocale":"ha"}); +IntlMessageFormat.__addLocaleData({"locale":"ha-NE","parentLocale":"ha"}); diff --git a/lib/intl-messageformat/dist/locale-data/haw.js b/lib/intl-messageformat/dist/locale-data/haw.js new file mode 100644 index 00000000..a718c911 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/haw.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"haw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/he.js b/lib/intl-messageformat/dist/locale-data/he.js new file mode 100644 index 00000000..e5c6d182 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/he.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"he","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return"other";return n==1&&v0?"one":i==2&&v0?"two":v0&&(n<0||n>10)&&t0&&n10==0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/hi.js b/lib/intl-messageformat/dist/locale-data/hi.js new file mode 100644 index 00000000..df2eceb9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/hi.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"hi","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":n==2||n==3?"two":n==4?"few":n==6?"many":"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/hr.js b/lib/intl-messageformat/dist/locale-data/hr.js new file mode 100644 index 00000000..35389758 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/hr.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"hr","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"hr-BA","parentLocale":"hr"}); diff --git a/lib/intl-messageformat/dist/locale-data/hsb.js b/lib/intl-messageformat/dist/locale-data/hsb.js new file mode 100644 index 00000000..30b82c2f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/hsb.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"hsb","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i100=i.slice(-2),f100=f.slice(-2);if(ord)return"other";return v0&&i100==1||f100==1?"one":v0&&i100==2||f100==2?"two":v0&&(i100==3||i100==4)||(f100==3||f100==4)?"few":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/hu.js b/lib/intl-messageformat/dist/locale-data/hu.js new file mode 100644 index 00000000..fe265a14 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/hu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"hu","pluralRuleFunction":function (n,ord){if(ord)return n==1||n==5?"one":"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/hy.js b/lib/intl-messageformat/dist/locale-data/hy.js new file mode 100644 index 00000000..1cd89847 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/hy.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"hy","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return n>=0&&n<2?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/id.js b/lib/intl-messageformat/dist/locale-data/id.js new file mode 100644 index 00000000..2bf515bf --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/id.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"id","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ig.js b/lib/intl-messageformat/dist/locale-data/ig.js new file mode 100644 index 00000000..7259cebb --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ig.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ig","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ii.js b/lib/intl-messageformat/dist/locale-data/ii.js new file mode 100644 index 00000000..e3c6de88 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ii.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ii","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/in.js b/lib/intl-messageformat/dist/locale-data/in.js new file mode 100644 index 00000000..7510c7b5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/in.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"in","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/is.js b/lib/intl-messageformat/dist/locale-data/is.js new file mode 100644 index 00000000..64e8ffe9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/is.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"is","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],t0=Number(s[0])==n,i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return t0&&i10==1&&i100!=11||!t0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/it.js b/lib/intl-messageformat/dist/locale-data/it.js new file mode 100644 index 00000000..895e3e0d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/it.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"it","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return n==11||n==8||n==80||n==800?"many":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"it-CH","parentLocale":"it"}); +IntlMessageFormat.__addLocaleData({"locale":"it-SM","parentLocale":"it"}); diff --git a/lib/intl-messageformat/dist/locale-data/iu.js b/lib/intl-messageformat/dist/locale-data/iu.js new file mode 100644 index 00000000..b070aeab --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/iu.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"iu","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"iu-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/iw.js b/lib/intl-messageformat/dist/locale-data/iw.js new file mode 100644 index 00000000..274ae63b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/iw.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"iw","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return"other";return n==1&&v0?"one":i==2&&v0?"two":v0&&(n<0||n>10)&&t0&&n10==0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ja.js b/lib/intl-messageformat/dist/locale-data/ja.js new file mode 100644 index 00000000..e5a0e5db --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ja.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ja","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/jbo.js b/lib/intl-messageformat/dist/locale-data/jbo.js new file mode 100644 index 00000000..2d92409a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/jbo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"jbo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/jgo.js b/lib/intl-messageformat/dist/locale-data/jgo.js new file mode 100644 index 00000000..5a67a243 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/jgo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"jgo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ji.js b/lib/intl-messageformat/dist/locale-data/ji.js new file mode 100644 index 00000000..8c375a24 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ji.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ji","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/jmc.js b/lib/intl-messageformat/dist/locale-data/jmc.js new file mode 100644 index 00000000..47080f23 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/jmc.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"jmc","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/jv.js b/lib/intl-messageformat/dist/locale-data/jv.js new file mode 100644 index 00000000..eb530cca --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/jv.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"jv","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/jw.js b/lib/intl-messageformat/dist/locale-data/jw.js new file mode 100644 index 00000000..245591c3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/jw.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"jw","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ka.js b/lib/intl-messageformat/dist/locale-data/ka.js new file mode 100644 index 00000000..c552fd50 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ka.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ka","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],i100=i.slice(-2);if(ord)return i==1?"one":i==0||(i100>=2&&i100<=20||i100==40||i100==60||i100==80)?"many":"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kab.js b/lib/intl-messageformat/dist/locale-data/kab.js new file mode 100644 index 00000000..0e2c62d5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kab.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kab","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<2?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kaj.js b/lib/intl-messageformat/dist/locale-data/kaj.js new file mode 100644 index 00000000..b1dffdb1 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kaj.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kaj","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kam.js b/lib/intl-messageformat/dist/locale-data/kam.js new file mode 100644 index 00000000..92c26d19 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kam.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kam","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kcg.js b/lib/intl-messageformat/dist/locale-data/kcg.js new file mode 100644 index 00000000..7c79eb6d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kcg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kcg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kde.js b/lib/intl-messageformat/dist/locale-data/kde.js new file mode 100644 index 00000000..bbb37b46 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kde.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kde","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kea.js b/lib/intl-messageformat/dist/locale-data/kea.js new file mode 100644 index 00000000..c1ffe283 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kea.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kea","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/khq.js b/lib/intl-messageformat/dist/locale-data/khq.js new file mode 100644 index 00000000..3e953562 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/khq.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"khq","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ki.js b/lib/intl-messageformat/dist/locale-data/ki.js new file mode 100644 index 00000000..1f847a5f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ki.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ki","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kk.js b/lib/intl-messageformat/dist/locale-data/kk.js new file mode 100644 index 00000000..de13f90b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kk.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1);if(ord)return n10==6||n10==9||t0&&n10==0&&n!=0?"many":"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kkj.js b/lib/intl-messageformat/dist/locale-data/kkj.js new file mode 100644 index 00000000..41fc268d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kkj.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kkj","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kl.js b/lib/intl-messageformat/dist/locale-data/kl.js new file mode 100644 index 00000000..e3ff75d6 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kl.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kl","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kln.js b/lib/intl-messageformat/dist/locale-data/kln.js new file mode 100644 index 00000000..30226052 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kln.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kln","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/km.js b/lib/intl-messageformat/dist/locale-data/km.js new file mode 100644 index 00000000..abbfe8ea --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/km.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"km","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kn.js b/lib/intl-messageformat/dist/locale-data/kn.js new file mode 100644 index 00000000..920828ed --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ko.js b/lib/intl-messageformat/dist/locale-data/ko.js new file mode 100644 index 00000000..b8b0a7bd --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ko.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ko","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ko-KP","parentLocale":"ko"}); diff --git a/lib/intl-messageformat/dist/locale-data/kok.js b/lib/intl-messageformat/dist/locale-data/kok.js new file mode 100644 index 00000000..ed368338 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kok.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kok","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ks.js b/lib/intl-messageformat/dist/locale-data/ks.js new file mode 100644 index 00000000..54e3cfba --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ks.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ks","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ksb.js b/lib/intl-messageformat/dist/locale-data/ksb.js new file mode 100644 index 00000000..166d0a7e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ksb.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ksb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ksf.js b/lib/intl-messageformat/dist/locale-data/ksf.js new file mode 100644 index 00000000..ee30052d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ksf.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ksf","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ksh.js b/lib/intl-messageformat/dist/locale-data/ksh.js new file mode 100644 index 00000000..3fb624c1 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ksh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ksh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0?"zero":n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ku.js b/lib/intl-messageformat/dist/locale-data/ku.js new file mode 100644 index 00000000..e9f34abc --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ku.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ku","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/kw.js b/lib/intl-messageformat/dist/locale-data/kw.js new file mode 100644 index 00000000..1f6e088c --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/kw.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"kw","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ky.js b/lib/intl-messageformat/dist/locale-data/ky.js new file mode 100644 index 00000000..786c1cb6 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ky.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ky","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lag.js b/lib/intl-messageformat/dist/locale-data/lag.js new file mode 100644 index 00000000..3eff2e8e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lag.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lag","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0];if(ord)return"other";return n==0?"zero":(i==0||i==1)&&n!=0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lb.js b/lib/intl-messageformat/dist/locale-data/lb.js new file mode 100644 index 00000000..51d4c9eb --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lb.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lg.js b/lib/intl-messageformat/dist/locale-data/lg.js new file mode 100644 index 00000000..da2c92b9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lkt.js b/lib/intl-messageformat/dist/locale-data/lkt.js new file mode 100644 index 00000000..e6271b3a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lkt.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lkt","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ln.js b/lib/intl-messageformat/dist/locale-data/ln.js new file mode 100644 index 00000000..665c448c --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ln.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"ln","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ln-AO","parentLocale":"ln"}); +IntlMessageFormat.__addLocaleData({"locale":"ln-CF","parentLocale":"ln"}); +IntlMessageFormat.__addLocaleData({"locale":"ln-CG","parentLocale":"ln"}); diff --git a/lib/intl-messageformat/dist/locale-data/lo.js b/lib/intl-messageformat/dist/locale-data/lo.js new file mode 100644 index 00000000..bee6b69f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lo","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lrc.js b/lib/intl-messageformat/dist/locale-data/lrc.js new file mode 100644 index 00000000..3481c7fe --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lrc.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"lrc","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"lrc-IQ","parentLocale":"lrc"}); diff --git a/lib/intl-messageformat/dist/locale-data/lt.js b/lib/intl-messageformat/dist/locale-data/lt.js new file mode 100644 index 00000000..93b42da6 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lt.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),f=s[1]||"",t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return"other";return n10==1&&(n100<11||n100>19)?"one":n10>=2&&n10<=9&&(n100<11||n100>19)?"few":f!=0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lu.js b/lib/intl-messageformat/dist/locale-data/lu.js new file mode 100644 index 00000000..c8de9cab --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/luo.js b/lib/intl-messageformat/dist/locale-data/luo.js new file mode 100644 index 00000000..43c21b03 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/luo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"luo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/luy.js b/lib/intl-messageformat/dist/locale-data/luy.js new file mode 100644 index 00000000..0edc2ec6 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/luy.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"luy","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/lv.js b/lib/intl-messageformat/dist/locale-data/lv.js new file mode 100644 index 00000000..98755f71 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/lv.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"lv","pluralRuleFunction":function (n,ord){var s=String(n).split("."),f=s[1]||"",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return"other";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?"zero":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mas.js b/lib/intl-messageformat/dist/locale-data/mas.js new file mode 100644 index 00000000..9d07327e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mas.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"mas","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"mas-TZ","parentLocale":"mas"}); diff --git a/lib/intl-messageformat/dist/locale-data/mer.js b/lib/intl-messageformat/dist/locale-data/mer.js new file mode 100644 index 00000000..136b9c92 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mer.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mer","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mfe.js b/lib/intl-messageformat/dist/locale-data/mfe.js new file mode 100644 index 00000000..e8092ff9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mfe.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mfe","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mg.js b/lib/intl-messageformat/dist/locale-data/mg.js new file mode 100644 index 00000000..086ffc0d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mg","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mgh.js b/lib/intl-messageformat/dist/locale-data/mgh.js new file mode 100644 index 00000000..37278815 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mgh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mgh","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mgo.js b/lib/intl-messageformat/dist/locale-data/mgo.js new file mode 100644 index 00000000..c5dbcb07 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mgo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mgo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mk.js b/lib/intl-messageformat/dist/locale-data/mk.js new file mode 100644 index 00000000..20646755 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mk.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1);if(ord)return i10==1&&i100!=11?"one":i10==2&&i100!=12?"two":(i10==7||i10==8)&&i100!=17&&i100!=18?"many":"other";return v0&&i10==1||f10==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ml.js b/lib/intl-messageformat/dist/locale-data/ml.js new file mode 100644 index 00000000..ce6fae04 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ml.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ml","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mn.js b/lib/intl-messageformat/dist/locale-data/mn.js new file mode 100644 index 00000000..3c0e332a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mn.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"mn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"mn-Mong","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mo.js b/lib/intl-messageformat/dist/locale-data/mo.js new file mode 100644 index 00000000..6497f029 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mo","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?"one":"other";return n==1&&v0?"one":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?"few":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mr.js b/lib/intl-messageformat/dist/locale-data/mr.js new file mode 100644 index 00000000..e1d7b3c3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mr.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mr","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":n==2||n==3?"two":n==4?"few":"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ms.js b/lib/intl-messageformat/dist/locale-data/ms.js new file mode 100644 index 00000000..b3abb892 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ms.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"ms","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ms-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ms-BN","parentLocale":"ms"}); +IntlMessageFormat.__addLocaleData({"locale":"ms-SG","parentLocale":"ms"}); diff --git a/lib/intl-messageformat/dist/locale-data/mt.js b/lib/intl-messageformat/dist/locale-data/mt.js new file mode 100644 index 00000000..aae79d63 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mt.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return"other";return n==1?"one":n==0||n100>=2&&n100<=10?"few":n100>=11&&n100<=19?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mua.js b/lib/intl-messageformat/dist/locale-data/mua.js new file mode 100644 index 00000000..8529212f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mua.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mua","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/my.js b/lib/intl-messageformat/dist/locale-data/my.js new file mode 100644 index 00000000..dd9358b3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/my.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"my","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/mzn.js b/lib/intl-messageformat/dist/locale-data/mzn.js new file mode 100644 index 00000000..3e8f31b9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/mzn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"mzn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nah.js b/lib/intl-messageformat/dist/locale-data/nah.js new file mode 100644 index 00000000..6fc7fbcf --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nah.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nah","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/naq.js b/lib/intl-messageformat/dist/locale-data/naq.js new file mode 100644 index 00000000..db3d6b48 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/naq.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"naq","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nb.js b/lib/intl-messageformat/dist/locale-data/nb.js new file mode 100644 index 00000000..9ccf47a4 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nb.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"nb","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"nb-SJ","parentLocale":"nb"}); diff --git a/lib/intl-messageformat/dist/locale-data/nd.js b/lib/intl-messageformat/dist/locale-data/nd.js new file mode 100644 index 00000000..befc77a7 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nd.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nd","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ne.js b/lib/intl-messageformat/dist/locale-data/ne.js new file mode 100644 index 00000000..1fd315d4 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ne.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ne","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return t0&&n>=1&&n<=4?"one":"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ne-IN","parentLocale":"ne"}); diff --git a/lib/intl-messageformat/dist/locale-data/nl.js b/lib/intl-messageformat/dist/locale-data/nl.js new file mode 100644 index 00000000..c8d21217 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nl.js @@ -0,0 +1,7 @@ +IntlMessageFormat.__addLocaleData({"locale":"nl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"nl-AW","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-BE","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-BQ","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-CW","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-SR","parentLocale":"nl"}); +IntlMessageFormat.__addLocaleData({"locale":"nl-SX","parentLocale":"nl"}); diff --git a/lib/intl-messageformat/dist/locale-data/nmg.js b/lib/intl-messageformat/dist/locale-data/nmg.js new file mode 100644 index 00000000..d34f4698 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nmg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nmg","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nn.js b/lib/intl-messageformat/dist/locale-data/nn.js new file mode 100644 index 00000000..083a6663 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nnh.js b/lib/intl-messageformat/dist/locale-data/nnh.js new file mode 100644 index 00000000..babfd701 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nnh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nnh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/no.js b/lib/intl-messageformat/dist/locale-data/no.js new file mode 100644 index 00000000..c5b828b3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/no.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"no","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nqo.js b/lib/intl-messageformat/dist/locale-data/nqo.js new file mode 100644 index 00000000..6309be63 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nqo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nqo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nr.js b/lib/intl-messageformat/dist/locale-data/nr.js new file mode 100644 index 00000000..093e2d2b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nr.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nso.js b/lib/intl-messageformat/dist/locale-data/nso.js new file mode 100644 index 00000000..27930ff3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nso.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nso","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nus.js b/lib/intl-messageformat/dist/locale-data/nus.js new file mode 100644 index 00000000..e2bda381 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nus.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nus","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ny.js b/lib/intl-messageformat/dist/locale-data/ny.js new file mode 100644 index 00000000..765fefc8 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ny.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ny","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/nyn.js b/lib/intl-messageformat/dist/locale-data/nyn.js new file mode 100644 index 00000000..8522ad77 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/nyn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"nyn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/om.js b/lib/intl-messageformat/dist/locale-data/om.js new file mode 100644 index 00000000..ec5b4003 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/om.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"om","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"om-KE","parentLocale":"om"}); diff --git a/lib/intl-messageformat/dist/locale-data/or.js b/lib/intl-messageformat/dist/locale-data/or.js new file mode 100644 index 00000000..b6570512 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/or.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"or","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/os.js b/lib/intl-messageformat/dist/locale-data/os.js new file mode 100644 index 00000000..e15bb930 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/os.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"os","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"os-RU","parentLocale":"os"}); diff --git a/lib/intl-messageformat/dist/locale-data/pa.js b/lib/intl-messageformat/dist/locale-data/pa.js new file mode 100644 index 00000000..f9220052 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/pa.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"pa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pa-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pa-Guru","parentLocale":"pa"}); diff --git a/lib/intl-messageformat/dist/locale-data/pap.js b/lib/intl-messageformat/dist/locale-data/pap.js new file mode 100644 index 00000000..9409b6b2 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/pap.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"pap","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/pl.js b/lib/intl-messageformat/dist/locale-data/pl.js new file mode 100644 index 00000000..d7c83b9a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/pl.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"pl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return n==1&&v0?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?"few":v0&&i!=1&&(i10==0||i10==1)||v0&&(i10>=5&&i10<=9)||v0&&(i100>=12&&i100<=14)?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/prg.js b/lib/intl-messageformat/dist/locale-data/prg.js new file mode 100644 index 00000000..05068735 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/prg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"prg","pluralRuleFunction":function (n,ord){var s=String(n).split("."),f=s[1]||"",v=f.length,t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),f100=f.slice(-2),f10=f.slice(-1);if(ord)return"other";return t0&&n10==0||n100>=11&&n100<=19||v==2&&(f100>=11&&f100<=19)?"zero":n10==1&&n100!=11||v==2&&f10==1&&f100!=11||v!=2&&f10==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ps.js b/lib/intl-messageformat/dist/locale-data/ps.js new file mode 100644 index 00000000..88e86f81 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ps.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ps","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/pt.js b/lib/intl-messageformat/dist/locale-data/pt.js new file mode 100644 index 00000000..7b5b083e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/pt.js @@ -0,0 +1,9 @@ +IntlMessageFormat.__addLocaleData({"locale":"pt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return t0&&n>=0&&n<=2&&n!=2?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pt-AO","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-PT","parentLocale":"pt","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"pt-CV","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-GW","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-MO","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-MZ","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-ST","parentLocale":"pt-PT"}); +IntlMessageFormat.__addLocaleData({"locale":"pt-TL","parentLocale":"pt-PT"}); diff --git a/lib/intl-messageformat/dist/locale-data/qu.js b/lib/intl-messageformat/dist/locale-data/qu.js new file mode 100644 index 00000000..51cc0291 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/qu.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"qu","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"qu-BO","parentLocale":"qu"}); +IntlMessageFormat.__addLocaleData({"locale":"qu-EC","parentLocale":"qu"}); diff --git a/lib/intl-messageformat/dist/locale-data/rm.js b/lib/intl-messageformat/dist/locale-data/rm.js new file mode 100644 index 00000000..5b911495 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/rm.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"rm","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/rn.js b/lib/intl-messageformat/dist/locale-data/rn.js new file mode 100644 index 00000000..316dd0f3 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/rn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"rn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ro.js b/lib/intl-messageformat/dist/locale-data/ro.js new file mode 100644 index 00000000..3e9cb30f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ro.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ro","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n100=t0&&s[0].slice(-2);if(ord)return n==1?"one":"other";return n==1&&v0?"one":!v0||n==0||n!=1&&(n100>=1&&n100<=19)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ro-MD","parentLocale":"ro"}); diff --git a/lib/intl-messageformat/dist/locale-data/rof.js b/lib/intl-messageformat/dist/locale-data/rof.js new file mode 100644 index 00000000..593e6810 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/rof.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"rof","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ru.js b/lib/intl-messageformat/dist/locale-data/ru.js new file mode 100644 index 00000000..c22ac22a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ru.js @@ -0,0 +1,6 @@ +IntlMessageFormat.__addLocaleData({"locale":"ru","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i10=i.slice(-1),i100=i.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?"few":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?"many":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ru-BY","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-KG","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-KZ","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-MD","parentLocale":"ru"}); +IntlMessageFormat.__addLocaleData({"locale":"ru-UA","parentLocale":"ru"}); diff --git a/lib/intl-messageformat/dist/locale-data/rw.js b/lib/intl-messageformat/dist/locale-data/rw.js new file mode 100644 index 00000000..cb9fc46f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/rw.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"rw","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/rwk.js b/lib/intl-messageformat/dist/locale-data/rwk.js new file mode 100644 index 00000000..8b3ad747 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/rwk.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"rwk","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sah.js b/lib/intl-messageformat/dist/locale-data/sah.js new file mode 100644 index 00000000..a0ea4607 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sah.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sah","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/saq.js b/lib/intl-messageformat/dist/locale-data/saq.js new file mode 100644 index 00000000..238bd937 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/saq.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"saq","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sbp.js b/lib/intl-messageformat/dist/locale-data/sbp.js new file mode 100644 index 00000000..8229a1d0 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sbp.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sbp","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sdh.js b/lib/intl-messageformat/dist/locale-data/sdh.js new file mode 100644 index 00000000..a3b6e210 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sdh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sdh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/se.js b/lib/intl-messageformat/dist/locale-data/se.js new file mode 100644 index 00000000..3970c26a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/se.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"se","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"se-FI","parentLocale":"se"}); +IntlMessageFormat.__addLocaleData({"locale":"se-SE","parentLocale":"se"}); diff --git a/lib/intl-messageformat/dist/locale-data/seh.js b/lib/intl-messageformat/dist/locale-data/seh.js new file mode 100644 index 00000000..abc85317 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/seh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"seh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ses.js b/lib/intl-messageformat/dist/locale-data/ses.js new file mode 100644 index 00000000..d0eb3956 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ses.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ses","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sg.js b/lib/intl-messageformat/dist/locale-data/sg.js new file mode 100644 index 00000000..f1c838b5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sg.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sg","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sh.js b/lib/intl-messageformat/dist/locale-data/sh.js new file mode 100644 index 00000000..8eef59f4 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sh","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/shi.js b/lib/intl-messageformat/dist/locale-data/shi.js new file mode 100644 index 00000000..6d17f601 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/shi.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"shi","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return n>=0&&n<=1?"one":t0&&n>=2&&n<=10?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"shi-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"shi-Tfng","parentLocale":"shi"}); diff --git a/lib/intl-messageformat/dist/locale-data/si.js b/lib/intl-messageformat/dist/locale-data/si.js new file mode 100644 index 00000000..02ffeec2 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/si.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"si","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"";if(ord)return"other";return n==0||n==1||i==0&&f==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sk.js b/lib/intl-messageformat/dist/locale-data/sk.js new file mode 100644 index 00000000..302f7531 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sk.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1];if(ord)return"other";return n==1&&v0?"one":i>=2&&i<=4&&v0?"few":!v0?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sl.js b/lib/intl-messageformat/dist/locale-data/sl.js new file mode 100644 index 00000000..a379ad0e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sl.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],i100=i.slice(-2);if(ord)return"other";return v0&&i100==1?"one":v0&&i100==2?"two":v0&&(i100==3||i100==4)||!v0?"few":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sma.js b/lib/intl-messageformat/dist/locale-data/sma.js new file mode 100644 index 00000000..4ebba952 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sma.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sma","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/smi.js b/lib/intl-messageformat/dist/locale-data/smi.js new file mode 100644 index 00000000..832a8fd9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/smi.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"smi","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/smj.js b/lib/intl-messageformat/dist/locale-data/smj.js new file mode 100644 index 00000000..4fd98e23 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/smj.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"smj","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/smn.js b/lib/intl-messageformat/dist/locale-data/smn.js new file mode 100644 index 00000000..f839d71b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/smn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"smn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sms.js b/lib/intl-messageformat/dist/locale-data/sms.js new file mode 100644 index 00000000..89d24f61 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sms.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sms","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":n==2?"two":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sn.js b/lib/intl-messageformat/dist/locale-data/sn.js new file mode 100644 index 00000000..317f71a6 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"sn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/so.js b/lib/intl-messageformat/dist/locale-data/so.js new file mode 100644 index 00000000..e317bfbf --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/so.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"so","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"so-DJ","parentLocale":"so"}); +IntlMessageFormat.__addLocaleData({"locale":"so-ET","parentLocale":"so"}); +IntlMessageFormat.__addLocaleData({"locale":"so-KE","parentLocale":"so"}); diff --git a/lib/intl-messageformat/dist/locale-data/sq.js b/lib/intl-messageformat/dist/locale-data/sq.js new file mode 100644 index 00000000..abecdc2f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sq.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"sq","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n==1?"one":n10==4&&n100!=14?"many":"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sq-MK","parentLocale":"sq"}); +IntlMessageFormat.__addLocaleData({"locale":"sq-XK","parentLocale":"sq"}); diff --git a/lib/intl-messageformat/dist/locale-data/sr.js b/lib/intl-messageformat/dist/locale-data/sr.js new file mode 100644 index 00000000..9845562e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sr.js @@ -0,0 +1,9 @@ +IntlMessageFormat.__addLocaleData({"locale":"sr","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),i100=i.slice(-2),f10=f.slice(-1),f100=f.slice(-2);if(ord)return"other";return v0&&i10==1&&i100!=11||f10==1&&f100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)||f10>=2&&f10<=4&&(f100<12||f100>14)?"few":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl","parentLocale":"sr"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl-BA","parentLocale":"sr-Cyrl"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl-ME","parentLocale":"sr-Cyrl"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Cyrl-XK","parentLocale":"sr-Cyrl"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn-BA","parentLocale":"sr-Latn"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn-ME","parentLocale":"sr-Latn"}); +IntlMessageFormat.__addLocaleData({"locale":"sr-Latn-XK","parentLocale":"sr-Latn"}); diff --git a/lib/intl-messageformat/dist/locale-data/ss.js b/lib/intl-messageformat/dist/locale-data/ss.js new file mode 100644 index 00000000..d56dc7ab --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ss.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ss","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ssy.js b/lib/intl-messageformat/dist/locale-data/ssy.js new file mode 100644 index 00000000..0c2784bc --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ssy.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ssy","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/st.js b/lib/intl-messageformat/dist/locale-data/st.js new file mode 100644 index 00000000..eeeecab2 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/st.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"st","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/sv.js b/lib/intl-messageformat/dist/locale-data/sv.js new file mode 100644 index 00000000..bcc0bf97 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sv.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"sv","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return(n10==1||n10==2)&&n100!=11&&n100!=12?"one":"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sv-AX","parentLocale":"sv"}); +IntlMessageFormat.__addLocaleData({"locale":"sv-FI","parentLocale":"sv"}); diff --git a/lib/intl-messageformat/dist/locale-data/sw.js b/lib/intl-messageformat/dist/locale-data/sw.js new file mode 100644 index 00000000..b5c86538 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/sw.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"sw","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"sw-CD","parentLocale":"sw"}); +IntlMessageFormat.__addLocaleData({"locale":"sw-KE","parentLocale":"sw"}); +IntlMessageFormat.__addLocaleData({"locale":"sw-UG","parentLocale":"sw"}); diff --git a/lib/intl-messageformat/dist/locale-data/syr.js b/lib/intl-messageformat/dist/locale-data/syr.js new file mode 100644 index 00000000..af3844a5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/syr.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"syr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ta.js b/lib/intl-messageformat/dist/locale-data/ta.js new file mode 100644 index 00000000..ad4e8e55 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ta.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"ta","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ta-LK","parentLocale":"ta"}); +IntlMessageFormat.__addLocaleData({"locale":"ta-MY","parentLocale":"ta"}); +IntlMessageFormat.__addLocaleData({"locale":"ta-SG","parentLocale":"ta"}); diff --git a/lib/intl-messageformat/dist/locale-data/te.js b/lib/intl-messageformat/dist/locale-data/te.js new file mode 100644 index 00000000..30b40790 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/te.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"te","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/teo.js b/lib/intl-messageformat/dist/locale-data/teo.js new file mode 100644 index 00000000..35b1eddd --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/teo.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"teo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"teo-KE","parentLocale":"teo"}); diff --git a/lib/intl-messageformat/dist/locale-data/th.js b/lib/intl-messageformat/dist/locale-data/th.js new file mode 100644 index 00000000..3d475dc5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/th.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"th","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ti.js b/lib/intl-messageformat/dist/locale-data/ti.js new file mode 100644 index 00000000..4cfc5321 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ti.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ti","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ti-ER","parentLocale":"ti"}); diff --git a/lib/intl-messageformat/dist/locale-data/tig.js b/lib/intl-messageformat/dist/locale-data/tig.js new file mode 100644 index 00000000..d88b5296 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/tig.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"tig","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/tk.js b/lib/intl-messageformat/dist/locale-data/tk.js new file mode 100644 index 00000000..2afde8f0 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/tk.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"tk","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/tl.js b/lib/intl-messageformat/dist/locale-data/tl.js new file mode 100644 index 00000000..27840c3a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/tl.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"tl","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],f=s[1]||"",v0=!s[1],i10=i.slice(-1),f10=f.slice(-1);if(ord)return n==1?"one":"other";return v0&&(i==1||i==2||i==3)||v0&&i10!=4&&i10!=6&&i10!=9||!v0&&f10!=4&&f10!=6&&f10!=9?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/tn.js b/lib/intl-messageformat/dist/locale-data/tn.js new file mode 100644 index 00000000..c165ce6d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/tn.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"tn","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/to.js b/lib/intl-messageformat/dist/locale-data/to.js new file mode 100644 index 00000000..9822d8e9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/to.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"to","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/tr.js b/lib/intl-messageformat/dist/locale-data/tr.js new file mode 100644 index 00000000..2970c315 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/tr.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"tr","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"tr-CY","parentLocale":"tr"}); diff --git a/lib/intl-messageformat/dist/locale-data/ts.js b/lib/intl-messageformat/dist/locale-data/ts.js new file mode 100644 index 00000000..7b3792c9 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ts.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ts","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/twq.js b/lib/intl-messageformat/dist/locale-data/twq.js new file mode 100644 index 00000000..e07ecb6b --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/twq.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"twq","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/tzm.js b/lib/intl-messageformat/dist/locale-data/tzm.js new file mode 100644 index 00000000..6dff8594 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/tzm.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"tzm","pluralRuleFunction":function (n,ord){var s=String(n).split("."),t0=Number(s[0])==n;if(ord)return"other";return n==0||n==1||t0&&n>=11&&n<=99?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ug.js b/lib/intl-messageformat/dist/locale-data/ug.js new file mode 100644 index 00000000..32d78a33 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ug.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ug","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/uk.js b/lib/intl-messageformat/dist/locale-data/uk.js new file mode 100644 index 00000000..e10f7265 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/uk.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"uk","pluralRuleFunction":function (n,ord){var s=String(n).split("."),i=s[0],v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2),i10=i.slice(-1),i100=i.slice(-2);if(ord)return n10==3&&n100!=13?"few":"other";return v0&&i10==1&&i100!=11?"one":v0&&(i10>=2&&i10<=4)&&(i100<12||i100>14)?"few":v0&&i10==0||v0&&(i10>=5&&i10<=9)||v0&&(i100>=11&&i100<=14)?"many":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/ur.js b/lib/intl-messageformat/dist/locale-data/ur.js new file mode 100644 index 00000000..40b6676f --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ur.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"ur","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"ur-IN","parentLocale":"ur"}); diff --git a/lib/intl-messageformat/dist/locale-data/uz.js b/lib/intl-messageformat/dist/locale-data/uz.js new file mode 100644 index 00000000..e84ac5a5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/uz.js @@ -0,0 +1,4 @@ +IntlMessageFormat.__addLocaleData({"locale":"uz","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"uz-Arab","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"uz-Cyrl","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"uz-Latn","parentLocale":"uz"}); diff --git a/lib/intl-messageformat/dist/locale-data/vai.js b/lib/intl-messageformat/dist/locale-data/vai.js new file mode 100644 index 00000000..ee3bf0d1 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/vai.js @@ -0,0 +1,3 @@ +IntlMessageFormat.__addLocaleData({"locale":"vai","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"vai-Latn","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"vai-Vaii","parentLocale":"vai"}); diff --git a/lib/intl-messageformat/dist/locale-data/ve.js b/lib/intl-messageformat/dist/locale-data/ve.js new file mode 100644 index 00000000..54221a8e --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/ve.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"ve","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/vi.js b/lib/intl-messageformat/dist/locale-data/vi.js new file mode 100644 index 00000000..cca6f88a --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/vi.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"vi","pluralRuleFunction":function (n,ord){if(ord)return n==1?"one":"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/vo.js b/lib/intl-messageformat/dist/locale-data/vo.js new file mode 100644 index 00000000..53c34fce --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/vo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"vo","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/vun.js b/lib/intl-messageformat/dist/locale-data/vun.js new file mode 100644 index 00000000..4e031446 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/vun.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"vun","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/wa.js b/lib/intl-messageformat/dist/locale-data/wa.js new file mode 100644 index 00000000..9d99a9a0 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/wa.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"wa","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==0||n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/wae.js b/lib/intl-messageformat/dist/locale-data/wae.js new file mode 100644 index 00000000..682fe990 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/wae.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"wae","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/wo.js b/lib/intl-messageformat/dist/locale-data/wo.js new file mode 100644 index 00000000..a1f529a5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/wo.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"wo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/xh.js b/lib/intl-messageformat/dist/locale-data/xh.js new file mode 100644 index 00000000..110f46fc --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/xh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"xh","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/xog.js b/lib/intl-messageformat/dist/locale-data/xog.js new file mode 100644 index 00000000..d94c76ff --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/xog.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"xog","pluralRuleFunction":function (n,ord){if(ord)return"other";return n==1?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/yav.js b/lib/intl-messageformat/dist/locale-data/yav.js new file mode 100644 index 00000000..0992e90d --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/yav.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"yav","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/yi.js b/lib/intl-messageformat/dist/locale-data/yi.js new file mode 100644 index 00000000..d08df6de --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/yi.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"yi","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1];if(ord)return"other";return n==1&&v0?"one":"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/yo.js b/lib/intl-messageformat/dist/locale-data/yo.js new file mode 100644 index 00000000..cbec7de5 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/yo.js @@ -0,0 +1,2 @@ +IntlMessageFormat.__addLocaleData({"locale":"yo","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"yo-BJ","parentLocale":"yo"}); diff --git a/lib/intl-messageformat/dist/locale-data/zgh.js b/lib/intl-messageformat/dist/locale-data/zgh.js new file mode 100644 index 00000000..5f66cc09 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/zgh.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"zgh","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); diff --git a/lib/intl-messageformat/dist/locale-data/zh.js b/lib/intl-messageformat/dist/locale-data/zh.js new file mode 100644 index 00000000..33bd2620 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/zh.js @@ -0,0 +1,8 @@ +IntlMessageFormat.__addLocaleData({"locale":"zh","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans","parentLocale":"zh"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans-HK","parentLocale":"zh-Hans"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans-MO","parentLocale":"zh-Hans"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hans-SG","parentLocale":"zh-Hans"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hant","pluralRuleFunction":function (n,ord){if(ord)return"other";return"other"}}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hant-HK","parentLocale":"zh-Hant"}); +IntlMessageFormat.__addLocaleData({"locale":"zh-Hant-MO","parentLocale":"zh-Hant-HK"}); diff --git a/lib/intl-messageformat/dist/locale-data/zu.js b/lib/intl-messageformat/dist/locale-data/zu.js new file mode 100644 index 00000000..515332b2 --- /dev/null +++ b/lib/intl-messageformat/dist/locale-data/zu.js @@ -0,0 +1 @@ +IntlMessageFormat.__addLocaleData({"locale":"zu","pluralRuleFunction":function (n,ord){if(ord)return"other";return n>=0&&n<=1?"one":"other"}}); diff --git a/lib/intl-messageformat/index.js b/lib/intl-messageformat/index.js new file mode 100644 index 00000000..41ddebdf --- /dev/null +++ b/lib/intl-messageformat/index.js @@ -0,0 +1,15 @@ +/* jshint node:true */ + +'use strict'; + +var IntlMessageFormat = require('./lib/main')['default']; + +// Add all locale data to `IntlMessageFormat`. This module will be ignored when +// bundling for the browser with Browserify/Webpack. +require('./lib/locales'); + +// Re-export `IntlMessageFormat` as the CommonJS default exports with all the +// locale data registered, and with English set as the default locale. Define +// the `default` prop for use with other compiled ES6 Modules. +exports = module.exports = IntlMessageFormat; +exports['default'] = exports; diff --git a/lib/intl-messageformat/package.json b/lib/intl-messageformat/package.json new file mode 100644 index 00000000..350be851 --- /dev/null +++ b/lib/intl-messageformat/package.json @@ -0,0 +1,70 @@ +{ + "name": "intl-messageformat", + "version": "1.3.0", + "description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.", + "keywords": [ + "i18n", + "intl", + "internationalization", + "localization", + "globalization", + "messageformat", + "parser", + "plural", + "icu" + ], + "author": "Eric Ferraiuolo ", + "contributors": [ + "Drew Folta ", + "Caridy Patino ", + "Anthony Pipkin " + ], + "bugs": { + "url": "https://github.com/yahoo/intl-messageformat/issues" + }, + "repository": { + "type": "git", + "url": "git@github.com:yahoo/intl-messageformat.git" + }, + "main": "index.js", + "jsnext:main": "src/main.js", + "browser": { + "./lib/locales": false, + "./lib/locales.js": false + }, + "dependencies": { + "intl-messageformat-parser": "1.2.0" + }, + "devDependencies": { + "benchmark": "^1.0.0", + "expect.js": "^0.3.1", + "grunt": "^0.4.5", + "grunt-benchmark": "^0.3.0", + "grunt-browserify": "^3.3.0", + "grunt-bundle-jsnext-lib": "^0.5.0", + "grunt-cli": "^0.1.13", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-concat": "^0.5.0", + "grunt-contrib-connect": "^0.9.0", + "grunt-contrib-copy": "^0.8.0", + "grunt-contrib-jshint": "^0.11.0", + "grunt-contrib-uglify": "^0.8.0", + "grunt-extract-cldr-data": "^3.0.0", + "grunt-json-remove-fields": "git://github.com/ericf/grunt-json-remove-fields#improve-files-and-output", + "grunt-saucelabs": "^8.4.1", + "intl": "^0.1.4", + "istanbul": "^0.3.0", + "mocha": "^2.0.1", + "xunit-file": "0.0.6" + }, + "scripts": { + "test": "istanbul cover -x lib/locales.js -- _mocha tests/runner.js --reporter spec", + "travis": "istanbul cover -x lib/locales.js -- _mocha tests/runner.js --reporter spec && tests/saucelabs.sh", + "prepublish": "grunt" + }, + "homepage": "https://github.com/yahoo/intl-messageformat", + "directories": { + "test": "tests" + }, + "license": "BSD-3-Clause" +} diff --git a/lib/intl-messageformat/src/compiler.js b/lib/intl-messageformat/src/compiler.js new file mode 100644 index 00000000..aeeb8079 --- /dev/null +++ b/lib/intl-messageformat/src/compiler.js @@ -0,0 +1,206 @@ +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + +/* jslint esnext: true */ + +export default Compiler; + +function Compiler(locales, formats, pluralFn) { + this.locales = locales; + this.formats = formats; + this.pluralFn = pluralFn; +} + +Compiler.prototype.compile = function (ast) { + this.pluralStack = []; + this.currentPlural = null; + this.pluralNumberFormat = null; + + return this.compileMessage(ast); +}; + +Compiler.prototype.compileMessage = function (ast) { + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new Error('Message AST is not of type: "messageFormatPattern"'); + } + + var elements = ast.elements, + pattern = []; + + var i, len, element; + + for (i = 0, len = elements.length; i < len; i += 1) { + element = elements[i]; + + switch (element.type) { + case 'messageTextElement': + pattern.push(this.compileMessageText(element)); + break; + + case 'argumentElement': + pattern.push(this.compileArgument(element)); + break; + + default: + throw new Error('Message element does not have a valid type'); + } + } + + return pattern; +}; + +Compiler.prototype.compileMessageText = function (element) { + // When this `element` is part of plural sub-pattern and its value contains + // an unescaped '#', use a `PluralOffsetString` helper to properly output + // the number with the correct offset in the string. + if (this.currentPlural && /(^|[^\\])#/g.test(element.value)) { + // Create a cache a NumberFormat instance that can be reused for any + // PluralOffsetString instance in this message. + if (!this.pluralNumberFormat) { + this.pluralNumberFormat = new Intl.NumberFormat(this.locales); + } + + return new PluralOffsetString( + this.currentPlural.id, + this.currentPlural.format.offset, + this.pluralNumberFormat, + element.value); + } + + // Unescape the escaped '#'s in the message text. + return element.value.replace(/\\#/g, '#'); +}; + +Compiler.prototype.compileArgument = function (element) { + var format = element.format; + + if (!format) { + return new StringFormat(element.id); + } + + var formats = this.formats, + locales = this.locales, + pluralFn = this.pluralFn, + options; + + switch (format.type) { + case 'numberFormat': + options = formats.number[format.style]; + return { + id : element.id, + format: new Intl.NumberFormat(locales, options).format + }; + + case 'dateFormat': + options = formats.date[format.style]; + return { + id : element.id, + format: new Intl.DateTimeFormat(locales, options).format + }; + + case 'timeFormat': + options = formats.time[format.style]; + return { + id : element.id, + format: new Intl.DateTimeFormat(locales, options).format + }; + + case 'pluralFormat': + options = this.compileOptions(element); + return new PluralFormat( + element.id, format.ordinal, format.offset, options, pluralFn + ); + + case 'selectFormat': + options = this.compileOptions(element); + return new SelectFormat(element.id, options); + + default: + throw new Error('Message element does not have a valid format type'); + } +}; + +Compiler.prototype.compileOptions = function (element) { + var format = element.format, + options = format.options, + optionsHash = {}; + + // Save the current plural element, if any, then set it to a new value when + // compiling the options sub-patterns. This conforms the spec's algorithm + // for handling `"#"` syntax in message text. + this.pluralStack.push(this.currentPlural); + this.currentPlural = format.type === 'pluralFormat' ? element : null; + + var i, len, option; + + for (i = 0, len = options.length; i < len; i += 1) { + option = options[i]; + + // Compile the sub-pattern and save it under the options's selector. + optionsHash[option.selector] = this.compileMessage(option.value); + } + + // Pop the plural stack to put back the original current plural value. + this.currentPlural = this.pluralStack.pop(); + + return optionsHash; +}; + +// -- Compiler Helper Classes -------------------------------------------------- + +function StringFormat(id) { + this.id = id; +} + +StringFormat.prototype.format = function (value) { + if (!value) { + return ''; + } + + return typeof value === 'string' ? value : String(value); +}; + +function PluralFormat(id, useOrdinal, offset, options, pluralFn) { + this.id = id; + this.useOrdinal = useOrdinal; + this.offset = offset; + this.options = options; + this.pluralFn = pluralFn; +} + +PluralFormat.prototype.getOption = function (value) { + var options = this.options; + + var option = options['=' + value] || + options[this.pluralFn(value - this.offset, this.useOrdinal)]; + + return option || options.other; +}; + +function PluralOffsetString(id, offset, numberFormat, string) { + this.id = id; + this.offset = offset; + this.numberFormat = numberFormat; + this.string = string; +} + +PluralOffsetString.prototype.format = function (value) { + var number = this.numberFormat.format(value - this.offset); + + return this.string + .replace(/(^|[^\\])#/g, '$1' + number) + .replace(/\\#/g, '#'); +}; + +function SelectFormat(id, options) { + this.id = id; + this.options = options; +} + +SelectFormat.prototype.getOption = function (value) { + var options = this.options; + return options[value] || options.other; +}; diff --git a/lib/intl-messageformat/src/core.js b/lib/intl-messageformat/src/core.js new file mode 100644 index 00000000..7435f8d5 --- /dev/null +++ b/lib/intl-messageformat/src/core.js @@ -0,0 +1,265 @@ +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + +/* jslint esnext: true */ + +import {extend, hop} from './utils'; +import {defineProperty, objCreate} from './es5'; +import Compiler from './compiler'; +import parser from 'intl-messageformat-parser'; + +export default MessageFormat; + +// -- MessageFormat -------------------------------------------------------- + +function MessageFormat(message, locales, formats) { + // Parse string messages into an AST. + var ast = typeof message === 'string' ? + MessageFormat.__parse(message) : message; + + if (!(ast && ast.type === 'messageFormatPattern')) { + throw new TypeError('A message must be provided as a String or AST.'); + } + + // Creates a new object with the specified `formats` merged with the default + // formats. + formats = this._mergeFormats(MessageFormat.formats, formats); + + // Defined first because it's used to build the format pattern. + defineProperty(this, '_locale', {value: this._resolveLocale(locales)}); + + // Compile the `ast` to a pattern that is highly optimized for repeated + // `format()` invocations. **Note:** This passes the `locales` set provided + // to the constructor instead of just the resolved locale. + var pluralFn = this._findPluralRuleFunction(this._locale); + var pattern = this._compilePattern(ast, locales, formats, pluralFn); + + // "Bind" `format()` method to `this` so it can be passed by reference like + // the other `Intl` APIs. + var messageFormat = this; + this.format = function (values) { + return messageFormat._format(pattern, values); + }; +} + +// Default format options used as the prototype of the `formats` provided to the +// constructor. These are used when constructing the internal Intl.NumberFormat +// and Intl.DateTimeFormat instances. +defineProperty(MessageFormat, 'formats', { + enumerable: true, + + value: { + number: { + 'currency': { + style: 'currency' + }, + + 'percent': { + style: 'percent' + } + }, + + date: { + 'short': { + month: 'numeric', + day : 'numeric', + year : '2-digit' + }, + + 'medium': { + month: 'short', + day : 'numeric', + year : 'numeric' + }, + + 'long': { + month: 'long', + day : 'numeric', + year : 'numeric' + }, + + 'full': { + weekday: 'long', + month : 'long', + day : 'numeric', + year : 'numeric' + } + }, + + time: { + 'short': { + hour : 'numeric', + minute: 'numeric' + }, + + 'medium': { + hour : 'numeric', + minute: 'numeric', + second: 'numeric' + }, + + 'long': { + hour : 'numeric', + minute : 'numeric', + second : 'numeric', + timeZoneName: 'short' + }, + + 'full': { + hour : 'numeric', + minute : 'numeric', + second : 'numeric', + timeZoneName: 'short' + } + } + } +}); + +// Define internal private properties for dealing with locale data. +defineProperty(MessageFormat, '__localeData__', {value: objCreate(null)}); +defineProperty(MessageFormat, '__addLocaleData', {value: function (data) { + if (!(data && data.locale)) { + throw new Error( + 'Locale data provided to IntlMessageFormat is missing a ' + + '`locale` property' + ); + } + + MessageFormat.__localeData__[data.locale.toLowerCase()] = data; +}}); + +// Defines `__parse()` static method as an exposed private. +defineProperty(MessageFormat, '__parse', {value: parser.parse}); + +// Define public `defaultLocale` property which defaults to English, but can be +// set by the developer. +defineProperty(MessageFormat, 'defaultLocale', { + enumerable: true, + writable : true, + value : undefined +}); + +MessageFormat.prototype.resolvedOptions = function () { + // TODO: Provide anything else? + return { + locale: this._locale + }; +}; + +MessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) { + var compiler = new Compiler(locales, formats, pluralFn); + return compiler.compile(ast); +}; + +MessageFormat.prototype._findPluralRuleFunction = function (locale) { + var localeData = MessageFormat.__localeData__; + var data = localeData[locale.toLowerCase()]; + + // The locale data is de-duplicated, so we have to traverse the locale's + // hierarchy until we find a `pluralRuleFunction` to return. + while (data) { + if (data.pluralRuleFunction) { + return data.pluralRuleFunction; + } + + data = data.parentLocale && localeData[data.parentLocale.toLowerCase()]; + } + + throw new Error( + 'Locale data added to IntlMessageFormat is missing a ' + + '`pluralRuleFunction` for :' + locale + ); +}; + +MessageFormat.prototype._format = function (pattern, values) { + var result = '', + i, len, part, id, value; + + for (i = 0, len = pattern.length; i < len; i += 1) { + part = pattern[i]; + + // Exist early for string parts. + if (typeof part === 'string') { + result += part; + continue; + } + + id = part.id; + + // Enforce that all required values are provided by the caller. + if (!(values && hop.call(values, id))) { + throw new Error('A value must be provided for: ' + id); + } + + value = values[id]; + + // Recursively format plural and select parts' option — which can be a + // nested pattern structure. The choosing of the option to use is + // abstracted-by and delegated-to the part helper object. + if (part.options) { + result += this._format(part.getOption(value), values); + } else { + result += part.format(value); + } + } + + return result; +}; + +MessageFormat.prototype._mergeFormats = function (defaults, formats) { + var mergedFormats = {}, + type, mergedType; + + for (type in defaults) { + if (!hop.call(defaults, type)) { continue; } + + mergedFormats[type] = mergedType = objCreate(defaults[type]); + + if (formats && hop.call(formats, type)) { + extend(mergedType, formats[type]); + } + } + + return mergedFormats; +}; + +MessageFormat.prototype._resolveLocale = function (locales) { + if (typeof locales === 'string') { + locales = [locales]; + } + + // Create a copy of the array so we can push on the default locale. + locales = (locales || []).concat(MessageFormat.defaultLocale); + + var localeData = MessageFormat.__localeData__; + var i, len, localeParts, data; + + // Using the set of locales + the default locale, we look for the first one + // which that has been registered. When data does not exist for a locale, we + // traverse its ancestors to find something that's been registered within + // its hierarchy of locales. Since we lack the proper `parentLocale` data + // here, we must take a naive approach to traversal. + for (i = 0, len = locales.length; i < len; i += 1) { + localeParts = locales[i].toLowerCase().split('-'); + + while (localeParts.length) { + data = localeData[localeParts.join('-')]; + if (data) { + // Return the normalized locale string; e.g., we return "en-US", + // instead of "en-us". + return data.locale; + } + + localeParts.pop(); + } + } + + var defaultLocale = locales.pop(); + throw new Error( + 'No locale data has been added to IntlMessageFormat for: ' + + locales.join(', ') + ', or the default locale: ' + defaultLocale + ); +}; diff --git a/lib/intl-messageformat/src/en.js b/lib/intl-messageformat/src/en.js new file mode 100644 index 00000000..f1519ef5 --- /dev/null +++ b/lib/intl-messageformat/src/en.js @@ -0,0 +1,2 @@ +// GENERATED FILE +export default {"locale":"en","pluralRuleFunction":function (n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}}; diff --git a/lib/intl-messageformat/src/es5.js b/lib/intl-messageformat/src/es5.js new file mode 100644 index 00000000..401cad71 --- /dev/null +++ b/lib/intl-messageformat/src/es5.js @@ -0,0 +1,47 @@ +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + +/* jslint esnext: true */ + +import {hop} from './utils'; + +export {defineProperty, objCreate}; + +// Purposely using the same implementation as the Intl.js `Intl` polyfill. +// Copyright 2013 Andy Earnshaw, MIT License + +var realDefineProp = (function () { + try { return !!Object.defineProperty({}, 'a', {}); } + catch (e) { return false; } +})(); + +var es3 = !realDefineProp && !Object.prototype.__defineGetter__; + +var defineProperty = realDefineProp ? Object.defineProperty : + function (obj, name, desc) { + + if ('get' in desc && obj.__defineGetter__) { + obj.__defineGetter__(name, desc.get); + } else if (!hop.call(obj, name) || 'value' in desc) { + obj[name] = desc.value; + } +}; + +var objCreate = Object.create || function (proto, props) { + var obj, k; + + function F() {} + F.prototype = proto; + obj = new F(); + + for (k in props) { + if (hop.call(props, k)) { + defineProperty(obj, k, props[k]); + } + } + + return obj; +}; diff --git a/lib/intl-messageformat/src/main.js b/lib/intl-messageformat/src/main.js new file mode 100644 index 00000000..5eb6a4e8 --- /dev/null +++ b/lib/intl-messageformat/src/main.js @@ -0,0 +1,9 @@ +/* jslint esnext: true */ + +import IntlMessageFormat from './core'; +import defaultLocale from './en'; + +IntlMessageFormat.__addLocaleData(defaultLocale); +IntlMessageFormat.defaultLocale = 'en'; + +export default IntlMessageFormat; diff --git a/lib/intl-messageformat/src/utils.js b/lib/intl-messageformat/src/utils.js new file mode 100644 index 00000000..67b7d923 --- /dev/null +++ b/lib/intl-messageformat/src/utils.js @@ -0,0 +1,27 @@ +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + +/* jslint esnext: true */ + +export var hop = Object.prototype.hasOwnProperty; + +export function extend(obj) { + var sources = Array.prototype.slice.call(arguments, 1), + i, len, source, key; + + for (i = 0, len = sources.length; i < len; i += 1) { + source = sources[i]; + if (!source) { continue; } + + for (key in source) { + if (hop.call(source, key)) { + obj[key] = source[key]; + } + } + } + + return obj; +} diff --git a/lib/intl-messageformat/tests/benchmark/format_cached_complex_msg.js b/lib/intl-messageformat/tests/benchmark/format_cached_complex_msg.js new file mode 100644 index 00000000..5664f36a --- /dev/null +++ b/lib/intl-messageformat/tests/benchmark/format_cached_complex_msg.js @@ -0,0 +1,37 @@ +'use strict'; + +global.Intl || require('intl'); + +var IntlMessageFormat = require('../../'); + +var msg = '' + + '{gender_of_host, select, ' + + 'female {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to her party.}' + + '=2 {{host} invites {guest} and one other person to her party.}' + + 'other {{host} invites {guest} and # other people to her party.}}}' + + 'male {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to his party.}' + + '=2 {{host} invites {guest} and one other person to his party.}' + + 'other {{host} invites {guest} and # other people to his party.}}}' + + 'other {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to their party.}' + + '=2 {{host} invites {guest} and one other person to their party.}' + + 'other {{host} invites {guest} and # other people to their party.}}}}'; + +var mf = new IntlMessageFormat(msg, 'en-US'); + +module.exports = function () { + mf.format({ + gender_of_host: 'male', + num_guests : 10, + host : 'Eric', + guest : 'Caridy' + }); +}; diff --git a/lib/intl-messageformat/tests/benchmark/format_cached_string_msg.js b/lib/intl-messageformat/tests/benchmark/format_cached_string_msg.js new file mode 100644 index 00000000..18092051 --- /dev/null +++ b/lib/intl-messageformat/tests/benchmark/format_cached_string_msg.js @@ -0,0 +1,13 @@ +'use strict'; + +global.Intl || require('intl'); + +var IntlMessageFormat = require('../../'); + +var msg = 'Hello, world!'; + +var mf = new IntlMessageFormat(msg, 'en-US'); + +module.exports = function () { + mf.format(); +}; diff --git a/lib/intl-messageformat/tests/benchmark/new_complex_msg.js b/lib/intl-messageformat/tests/benchmark/new_complex_msg.js new file mode 100644 index 00000000..96662deb --- /dev/null +++ b/lib/intl-messageformat/tests/benchmark/new_complex_msg.js @@ -0,0 +1,30 @@ +'use strict'; + +global.Intl || require('intl'); + +var IntlMessageFormat = require('../../'); + +var msg = '' + + '{gender_of_host, select, ' + + 'female {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to her party.}' + + '=2 {{host} invites {guest} and one other person to her party.}' + + 'other {{host} invites {guest} and # other people to her party.}}}' + + 'male {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to his party.}' + + '=2 {{host} invites {guest} and one other person to his party.}' + + 'other {{host} invites {guest} and # other people to his party.}}}' + + 'other {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to their party.}' + + '=2 {{host} invites {guest} and one other person to their party.}' + + 'other {{host} invites {guest} and # other people to their party.}}}}'; + +module.exports = function () { + new IntlMessageFormat(msg, 'en-US'); +}; diff --git a/lib/intl-messageformat/tests/benchmark/new_complex_msg_preparsed.js b/lib/intl-messageformat/tests/benchmark/new_complex_msg_preparsed.js new file mode 100644 index 00000000..03e8d567 --- /dev/null +++ b/lib/intl-messageformat/tests/benchmark/new_complex_msg_preparsed.js @@ -0,0 +1,32 @@ +'use strict'; + +global.Intl || require('intl'); + +var IntlMessageFormat = require('../../'); + +var msg = '' + + '{gender_of_host, select, ' + + 'female {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to her party.}' + + '=2 {{host} invites {guest} and one other person to her party.}' + + 'other {{host} invites {guest} and # other people to her party.}}}' + + 'male {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to his party.}' + + '=2 {{host} invites {guest} and one other person to his party.}' + + 'other {{host} invites {guest} and # other people to his party.}}}' + + 'other {' + + '{num_guests, plural, offset:1 ' + + '=0 {{host} does not give a party.}' + + '=1 {{host} invites {guest} to their party.}' + + '=2 {{host} invites {guest} and one other person to their party.}' + + 'other {{host} invites {guest} and # other people to their party.}}}}'; + +msg = IntlMessageFormat.__parse(msg); + +module.exports = function () { + new IntlMessageFormat(msg, 'en-US'); +}; diff --git a/lib/intl-messageformat/tests/benchmark/new_string_msg.js b/lib/intl-messageformat/tests/benchmark/new_string_msg.js new file mode 100644 index 00000000..a2ca1efb --- /dev/null +++ b/lib/intl-messageformat/tests/benchmark/new_string_msg.js @@ -0,0 +1,11 @@ +'use strict'; + +global.Intl || require('intl'); + +var IntlMessageFormat = require('../../'); + +var msg = 'Hello, world!'; + +module.exports = function () { + new IntlMessageFormat(msg, 'en-US'); +}; diff --git a/lib/intl-messageformat/tests/browserify/app.js b/lib/intl-messageformat/tests/browserify/app.js new file mode 100644 index 00000000..597821b7 --- /dev/null +++ b/lib/intl-messageformat/tests/browserify/app.js @@ -0,0 +1,3 @@ +'use strict'; + +window.IntlMessageFormat = require('../../'); diff --git a/lib/intl-messageformat/tests/browserify/index.html b/lib/intl-messageformat/tests/browserify/index.html new file mode 100644 index 00000000..d7779229 --- /dev/null +++ b/lib/intl-messageformat/tests/browserify/index.html @@ -0,0 +1,55 @@ + + + + Browserify Mocha Tests + + + + + +
+ + + + + + + + + + + + + + diff --git a/lib/intl-messageformat/tests/index.html b/lib/intl-messageformat/tests/index.html new file mode 100644 index 00000000..691d4db5 --- /dev/null +++ b/lib/intl-messageformat/tests/index.html @@ -0,0 +1,50 @@ + + + + index.js Mocha Tests + + + + + +
+ + + + + + + + + diff --git a/lib/intl-messageformat/tests/index.js b/lib/intl-messageformat/tests/index.js new file mode 100644 index 00000000..20b17135 --- /dev/null +++ b/lib/intl-messageformat/tests/index.js @@ -0,0 +1,379 @@ +/* + * Copyright (c) 2011-2013, Yahoo! Inc. All rights reserved. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + +/*jshint node:true */ +/*global describe,it,beforeEach,afterEach,expect,IntlMessageFormat */ +'use strict'; + +describe('IntlMessageFormat', function () { + it('should be a function', function () { + expect(IntlMessageFormat).to.be.a('function'); + }); + + // STATIC + + describe('.__addLocaleData( [obj] )', function () { + it('should respond to .__addLocaleData()', function () { + expect(IntlMessageFormat.__addLocaleData).to.be.a('function'); + }); + }); + + // INSTANCE METHODS + + describe('#resolvedOptions( )', function () { + it('should be a function', function () { + var mf = new IntlMessageFormat(''); + expect(mf.resolvedOptions).to.be.a('function'); + }); + + it('should have a `locale` property', function () { + var mf = new IntlMessageFormat(''); + expect(mf.resolvedOptions()).to.have.key('locale'); + }); + + describe('`locale`', function () { + var IMFLocaleData = IntlMessageFormat.__localeData__; + var localeData = {}; + + // Helper to remove and replace the locale data available during the + // the different tests. + function transferLocaleData(from, to) { + for (var locale in from) { + if (Object.prototype.hasOwnProperty.call(from, locale)) { + if (locale === IntlMessageFormat.defaultLocale) { + continue; + } + + to[locale] = from[locale]; + delete from[locale]; + } + } + } + + beforeEach(function () { + transferLocaleData(IMFLocaleData, localeData); + }); + + afterEach(function () { + transferLocaleData(localeData, IMFLocaleData); + }); + + it('should default to "en"', function () { + var mf = new IntlMessageFormat(''); + expect(mf.resolvedOptions().locale).to.equal('en'); + }); + + it('should normalize the casing', function () { + transferLocaleData(localeData, IMFLocaleData); + + var mf = new IntlMessageFormat('', 'en-us'); + expect(mf.resolvedOptions().locale).to.equal('en-US'); + + mf = new IntlMessageFormat('', 'EN-US'); + expect(mf.resolvedOptions().locale).to.equal('en-US'); + }); + + it('should be a fallback value when data is missing', function () { + IMFLocaleData.fr = localeData.fr; + + var mf = new IntlMessageFormat('', 'fr-FR'); + expect(mf.resolvedOptions().locale).to.equal('fr'); + + mf = new IntlMessageFormat('', 'pt'); + expect(mf.resolvedOptions().locale).to.equal('en'); + }); + }); + }); + + describe('#format( [object] )', function () { + it('should be a function', function () { + var mf = new IntlMessageFormat(''); + expect(mf.format).to.be.a('function'); + }); + + it('should return a string', function () { + var mf = new IntlMessageFormat(''); + expect(mf.format()).to.be.a('string'); + }); + }); + + describe('using a string pattern', function () { + it('should properly replace direct arguments in the string', function () { + var mf = new IntlMessageFormat('My name is {FIRST} {LAST}.'); + var output = mf.format({ + FIRST: 'Anthony', + LAST : 'Pipkin' + }); + + expect(output).to.equal('My name is Anthony Pipkin.'); + }); + }); + + describe('and plurals under the Arabic locale', function () { + var msg = '' + + 'I have {numPeople, plural,' + + 'zero {zero points}' + + 'one {a point}' + + 'two {two points}' + + 'few {a few points}' + + 'many {lots of points}' + + 'other {some other amount of points}}' + + '.'; + + var msgFmt = new IntlMessageFormat(msg, 'ar'); + + it('should match zero', function () { + var m = msgFmt.format({ + numPeople: 0 + }); + + expect(m).to.equal('I have zero points.'); + }); + + it('should match one', function () { + var m = msgFmt.format({ + numPeople: 1 + }); + + expect(m).to.equal('I have a point.'); + }); + + it('should match two', function () { + var m = msgFmt.format({ + numPeople: 2 + }); + + expect(m).to.equal('I have two points.'); + }); + + it('should match few', function () { + var m = msgFmt.format({ + numPeople: 5 + }); + + expect(m).to.equal('I have a few points.'); + }); + + it('should match many', function () { + var m = msgFmt.format({ + numPeople: 20 + }); + + expect(m).to.equal('I have lots of points.'); + }); + + it('should match other', function () { + var m = msgFmt.format({ + numPeople: 100 + }); + + expect(m).to.equal('I have some other amount of points.'); + }); + }); + + describe('and changing the locale', function () { + var simple = { + en: '{NAME} went to {CITY}.', + + fr: '{NAME} est {GENDER, select, ' + + 'female {allée}' + + 'other {allé}}'+ + ' à {CITY}.' + }; + + var complex = { + en: '{TRAVELLERS} went to {CITY}.', + + fr: '{TRAVELLERS} {TRAVELLER_COUNT, plural, ' + + '=1 {est {GENDER, select, ' + + 'female {allée}' + + 'other {allé}}}' + + 'other {sont {GENDER, select, ' + + 'female {allées}' + + 'other {allés}}}}' + + ' à {CITY}.' + }; + + var maleObj = { + NAME : 'Tony', + CITY : 'Paris', + GENDER: 'male' + }; + + var femaleObj = { + NAME : 'Jenny', + CITY : 'Paris', + GENDER: 'female' + }; + + var maleTravelers = { + TRAVELLERS : 'Lucas, Tony and Drew', + TRAVELLER_COUNT: 3, + GENDER : 'male', + CITY : 'Paris' + }; + + var femaleTravelers = { + TRAVELLERS : 'Monica', + TRAVELLER_COUNT: 1, + GENDER : 'female', + CITY : 'Paris' + }; + + it('should format message en-US simple with different objects', function () { + var msgFmt = new IntlMessageFormat(simple.en, 'en-US'); + expect(msgFmt.format(maleObj)).to.equal('Tony went to Paris.'); + expect(msgFmt.format(femaleObj)).to.equal('Jenny went to Paris.'); + }); + + + it('should format message fr-FR simple with different objects', function () { + var msgFmt = new IntlMessageFormat(simple.fr, 'fr-FR'); + expect(msgFmt.format(maleObj)).to.equal('Tony est allé à Paris.'); + expect(msgFmt.format(femaleObj)).to.equal('Jenny est allée à Paris.'); + }); + + it('should format message en-US complex with different objects', function () { + var msgFmt = new IntlMessageFormat(complex.en, 'en-US'); + expect(msgFmt.format(maleTravelers)).to.equal('Lucas, Tony and Drew went to Paris.'); + expect(msgFmt.format(femaleTravelers)).to.equal('Monica went to Paris.'); + }); + + + it('should format message fr-FR complex with different objects', function () { + var msgFmt = new IntlMessageFormat(complex.fr, 'fr-FR'); + expect(msgFmt.format(maleTravelers)).to.equal('Lucas, Tony and Drew sont allés à Paris.'); + expect(msgFmt.format(femaleTravelers)).to.equal('Monica est allée à Paris.'); + }); + }); + + describe('and change the locale with different counts', function () { + var messages = { + en: '{COMPANY_COUNT, plural, ' + + '=1 {One company}' + + 'other {# companies}}' + + ' published new books.', + + ru: '{COMPANY_COUNT, plural, ' + + 'one {Одна компания опубликовала}' + + 'few {# компании опубликовали}' + + 'many {# компаний опубликовали}' + + 'other {# компаний опубликовали}}' + + ' новые книги.' + }; + + it('should format a message with en-US locale', function () { + var msgFmt = new IntlMessageFormat(messages.en, 'en-US'); + + expect(msgFmt.format({COMPANY_COUNT: 0})).to.equal('0 companies published new books.'); + expect(msgFmt.format({COMPANY_COUNT: 1})).to.equal('One company published new books.'); + expect(msgFmt.format({COMPANY_COUNT: 2})).to.equal('2 companies published new books.'); + expect(msgFmt.format({COMPANY_COUNT: 5})).to.equal('5 companies published new books.'); + expect(msgFmt.format({COMPANY_COUNT: 10})).to.equal('10 companies published new books.'); + }); + + it('should format a message with ru-RU locale', function () { + var msgFmt = new IntlMessageFormat(messages.ru, 'ru-RU'); + + expect(msgFmt.format({COMPANY_COUNT: 0})).to.equal('0 компаний опубликовали новые книги.'); + expect(msgFmt.format({COMPANY_COUNT: 1})).to.equal('Одна компания опубликовала новые книги.'); + expect(msgFmt.format({COMPANY_COUNT: 2})).to.equal('2 компании опубликовали новые книги.'); + expect(msgFmt.format({COMPANY_COUNT: 5})).to.equal('5 компаний опубликовали новые книги.'); + expect(msgFmt.format({COMPANY_COUNT: 10})).to.equal('10 компаний опубликовали новые книги.'); + }); + }); + + describe('arguments with', function () { + + describe('no spaces', function() { + var msg = new IntlMessageFormat('{STATE}'), + state = 'Missouri'; + + it('should fail when the argument in the pattern is not provided', function () { + expect(msg.format).to.throwException(function (e) { + expect(e).to.be.an(Error); + }); + }); + + it('should fail when the argument in the pattern has a typo', function () { + function formatWithValueNameTypo() { + return msg.format({'ST ATE': state}); + } + + expect(formatWithValueNameTypo).to.throwException(function (e) { + expect(e).to.be.an(Error); + }); + }); + + it('should succeed when the argument is correct', function () { + expect(msg.format({ STATE: state })).to.equal(state); + }); + }); + + describe('a numeral', function() { + var msg = new IntlMessageFormat('{ST1ATE}'), + state = 'Missouri'; + + it('should fail when the argument in the pattern is not provided', function () { + function formatWithMissingValue() { + return msg.format({ FOO: state }); + } + + expect(formatWithMissingValue).to.throwException(function (e) { + expect(e).to.be.an(Error); + }); + }); + + it('should fail when the argument in the pattern has a typo', function () { + function formatWithMissingValue() { + msg.format({ 'ST ATE': state }); + } + + expect(formatWithMissingValue).to.throwException(function (e) { + expect(e).to.be.an(Error); + }); + }); + + it('should succeed when the argument is correct', function () { + expect(msg.format({ ST1ATE: state })).to.equal(state); + }); + }); + }); + + describe('selectordinal arguments', function () { + var msg = 'This is my {year, selectordinal, one{#st} two{#nd} few{#rd} other{#th}} birthday.'; + + it('should parse without errors', function () { + expect(IntlMessageFormat.__parse).withArgs(msg).to.not.throwException(); + }); + + it('should use ordinal pluralization rules', function () { + var mf = new IntlMessageFormat(msg, 'en'); + + expect(mf.format({year: 1})).to.equal('This is my 1st birthday.'); + expect(mf.format({year: 2})).to.equal('This is my 2nd birthday.'); + expect(mf.format({year: 3})).to.equal('This is my 3rd birthday.'); + expect(mf.format({year: 4})).to.equal('This is my 4th birthday.'); + expect(mf.format({year: 11})).to.equal('This is my 11th birthday.'); + expect(mf.format({year: 21})).to.equal('This is my 21st birthday.'); + expect(mf.format({year: 22})).to.equal('This is my 22nd birthday.'); + expect(mf.format({year: 33})).to.equal('This is my 33rd birthday.'); + expect(mf.format({year: 44})).to.equal('This is my 44th birthday.'); + expect(mf.format({year: 1024})).to.equal('This is my 1,024th birthday.'); + }); + }); + + describe('exceptions', function () { + it('should use the correct PT plural rules', function () { + var msg = '{num, plural, one{one} other{other}}'; + var pt = new IntlMessageFormat(msg, 'pt'); + var ptMZ = new IntlMessageFormat(msg, 'pt-MZ'); + + expect(pt.format({num: 0})).to.equal('one'); + expect(ptMZ.format({num: 0})).to.equal('other'); + }); + }); +}); diff --git a/lib/intl-messageformat/tests/purged.js b/lib/intl-messageformat/tests/purged.js new file mode 100644 index 00000000..73915e8a --- /dev/null +++ b/lib/intl-messageformat/tests/purged.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2011-2013, Yahoo! Inc. All rights reserved. + * Copyrights licensed under the New BSD License. + * See the accompanying LICENSE file for terms. + */ + +/*jshint node:true */ +/*global describe, it, before */ + +'use strict'; + +var chai = require('chai'), + expect = chai.expect, + IntlMessageFormat = require('../'); + +describe('no locale', function () { + + describe('no locale provided', function () { + + it('should default to English', function () { + var msg = new IntlMessageFormat('I have {NUM_BOOKS, plural, =1 {1 book} other {# books}}.'); + expect(msg.resolvedOptions().locale).to.equal('en'); + expect(msg.format({ NUM_BOOKS: 2 })).to.equal('I have 2 books.'); + }); + }); + + describe('invalid locale default', function () { + + it('should fallback to default locale', function () { + // let's set the locale to something witout data + IntlMessageFormat.__addLocaleData({ + locale: 'fu-baz', + pluralRuleFunction: function (count) { return null; } + }); + + var msg = new IntlMessageFormat('{COMPANY_COUNT, plural, =1 {One company} other {# companies}} published new books.'); + var m = msg.format({ COMPANY_COUNT: 1}); + + expect(m).to.equal('One company published new books.'); + }); + }); +}); diff --git a/lib/intl-messageformat/tests/runner.js b/lib/intl-messageformat/tests/runner.js new file mode 100644 index 00000000..33e7dc1b --- /dev/null +++ b/lib/intl-messageformat/tests/runner.js @@ -0,0 +1,8 @@ +if (typeof Intl === 'undefined') { + require('intl'); +} + +global.expect = require('expect.js'); +global.IntlMessageFormat = require('../'); + +require('./index'); diff --git a/lib/intl-messageformat/tests/saucelabs.sh b/lib/intl-messageformat/tests/saucelabs.sh new file mode 100644 index 00000000..9796a560 --- /dev/null +++ b/lib/intl-messageformat/tests/saucelabs.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +echo branch $TRAVIS_BRANCH +echo pull request $TRAVIS_PULL_REQUEST + +if [[ "false" != "$TRAVIS_PULL_REQUEST" ]]; then + echo "saucelabs testing does not work with pull requests" + exit 0 +fi + +if [[ "x" == "x$SAUCE_USERNAME" ]]; then + echo $0 "is missing env var SAUCE_USERNAME" + exit 1 +fi +if [[ "x" == "x$SAUCE_ACCESS_KEY" ]]; then + echo $0 "is missing env var SAUCE_ACCESS_KEY" + exit 1 +fi + +build=$$ +if [[ "x" != "x$TRAVIS_BUILD_NUMBER" ]]; then + build=$TRAVIS_BUILD_NUMBER +fi +echo build $build + +echo +./node_modules/.bin/grunt sauce diff --git a/lib/iron-a11y-announcer/.github/ISSUE_TEMPLATE.md b/lib/iron-a11y-announcer/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..594376ff --- /dev/null +++ b/lib/iron-a11y-announcer/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-a11y-announcer/CONTRIBUTING.md b/lib/iron-a11y-announcer/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-a11y-announcer/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-a11y-announcer/README.md b/lib/iron-a11y-announcer/README.md new file mode 100644 index 00000000..8b997a30 --- /dev/null +++ b/lib/iron-a11y-announcer/README.md @@ -0,0 +1,55 @@ + + + +[![Build status](https://travis-ci.org/PolymerElements/iron-a11y-announcer.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-a11y-announcer) + +_[Demo and API docs](https://elements.polymer-project.org/elements/iron-a11y-announcer)_ + + +##<iron-a11y-announcer> + +`iron-a11y-announcer` is a singleton element that is intended to add a11y +to features that require on-demand announcement from screen readers. In +order to make use of the announcer, it is best to request its availability +in the announcing element. + +Example: + +```javascript +Polymer({ + + is: 'x-chatty', + + attached: function() { + // This will create the singleton element if it has not + // been created yet: + Polymer.IronA11yAnnouncer.requestAvailability(); + } +}); +``` + +After the `iron-a11y-announcer` has been made available, elements can +make announces by firing bubbling `iron-announce` events. + +Example: + +```javascript +this.fire('iron-announce', { + text: 'This is an announcement!' +}, { bubbles: true }); +``` + +Note: announcements are only audible if you have a screen reader enabled. + + diff --git a/lib/iron-a11y-announcer/index.html b/lib/iron-a11y-announcer/index.html new file mode 100644 index 00000000..1f8889a8 --- /dev/null +++ b/lib/iron-a11y-announcer/index.html @@ -0,0 +1,28 @@ + + + + + + + iron-a11y-announcer + + + + + + + + + + + + + diff --git a/lib/iron-a11y-announcer/iron-a11y-announcer.html b/lib/iron-a11y-announcer/iron-a11y-announcer.html new file mode 100644 index 00000000..11a8809f --- /dev/null +++ b/lib/iron-a11y-announcer/iron-a11y-announcer.html @@ -0,0 +1,124 @@ + + + + + + + + + + + diff --git a/lib/iron-a11y-announcer/test/iron-a11y-announcer.html b/lib/iron-a11y-announcer/test/iron-a11y-announcer.html new file mode 100644 index 00000000..510bf6f9 --- /dev/null +++ b/lib/iron-a11y-announcer/test/iron-a11y-announcer.html @@ -0,0 +1,56 @@ + + + + + + iron-a11y-announcer + + + + + + + + + + + + + + + + + diff --git a/lib/iron-a11y-keys-behavior/.bower.json b/lib/iron-a11y-keys-behavior/.bower.json index 4ed69111..5388ae4b 100644 --- a/lib/iron-a11y-keys-behavior/.bower.json +++ b/lib/iron-a11y-keys-behavior/.bower.json @@ -59,6 +59,6 @@ "commit": "a3f03fc3fb5a0d8e93eaa33c2b6c02c16098b402" }, "_source": "https://github.com/PolymerElements/iron-a11y-keys-behavior.git", - "_target": "^2.0.0", + "_target": "^2.0.1", "_originalSource": "PolymerElements/iron-a11y-keys-behavior" } \ No newline at end of file diff --git a/lib/iron-a11y-keys-behavior/.github/ISSUE_TEMPLATE.md b/lib/iron-a11y-keys-behavior/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..7d936048 --- /dev/null +++ b/lib/iron-a11y-keys-behavior/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-a11y-keys-behavior/CONTRIBUTING.md b/lib/iron-a11y-keys-behavior/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-a11y-keys-behavior/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-a11y-keys-behavior/index.html b/lib/iron-a11y-keys-behavior/index.html new file mode 100644 index 00000000..c53ba6cf --- /dev/null +++ b/lib/iron-a11y-keys-behavior/index.html @@ -0,0 +1,24 @@ + + + + + + iron-a11y-keys-behavior + + + + + + + + + + diff --git a/lib/iron-a11y-keys/.github/ISSUE_TEMPLATE.md b/lib/iron-a11y-keys/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..f16b3668 --- /dev/null +++ b/lib/iron-a11y-keys/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-a11y-keys/CONTRIBUTING.md b/lib/iron-a11y-keys/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-a11y-keys/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-a11y-keys/index.html b/lib/iron-a11y-keys/index.html new file mode 100644 index 00000000..8a919686 --- /dev/null +++ b/lib/iron-a11y-keys/index.html @@ -0,0 +1,24 @@ + + + + + + iron-a11y-keys + + + + + + + + + + diff --git a/lib/iron-a11y-keys/iron-a11y-keys.html b/lib/iron-a11y-keys/iron-a11y-keys.html new file mode 100644 index 00000000..64ed5f27 --- /dev/null +++ b/lib/iron-a11y-keys/iron-a11y-keys.html @@ -0,0 +1,179 @@ + + + + + + diff --git a/lib/iron-a11y-keys/test/basic-test.html b/lib/iron-a11y-keys/test/basic-test.html new file mode 100644 index 00000000..385415d1 --- /dev/null +++ b/lib/iron-a11y-keys/test/basic-test.html @@ -0,0 +1,144 @@ + + + + + + + iron-a11y-keys + + + + + + + + + + + + + + + + + diff --git a/lib/iron-ajax/.bower.json b/lib/iron-ajax/.bower.json index 1fda2a7a..4d632aee 100644 --- a/lib/iron-ajax/.bower.json +++ b/lib/iron-ajax/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-ajax", - "version": "2.0.4", + "version": "2.0.6", "description": "Makes it easy to make ajax calls and parse the response", "private": true, "authors": [ @@ -53,13 +53,13 @@ "resolutions": { "webcomponentsjs": "^1.0.0" }, - "_release": "2.0.4", + "_release": "2.0.6", "_resolution": { "type": "version", - "tag": "v2.0.4", - "commit": "14e48b06a497d0c55e670c96ead384c6120a7c35" + "tag": "v2.0.6", + "commit": "db9535a8e40795b464679469f5b3dd71b9163def" }, "_source": "https://github.com/PolymerElements/iron-ajax.git", - "_target": "^2.0.0", + "_target": "^2.0.6", "_originalSource": "PolymerElements/iron-ajax" } \ No newline at end of file diff --git a/lib/iron-ajax/.github/ISSUE_TEMPLATE.md b/lib/iron-ajax/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..e73ee265 --- /dev/null +++ b/lib/iron-ajax/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-ajax/CONTRIBUTING.md b/lib/iron-ajax/CONTRIBUTING.md new file mode 100644 index 00000000..543fda4f --- /dev/null +++ b/lib/iron-ajax/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/zeriha/2/edit?html,output](https://jsbin.com/zeriha/2/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-ajax/README.md b/lib/iron-ajax/README.md index 9015c835..7a1a3697 100644 --- a/lib/iron-ajax/README.md +++ b/lib/iron-ajax/README.md @@ -17,10 +17,60 @@ thing! https://github.com/PolymerLabs/tedium/issues _[Demo and API docs](https://elements.polymer-project.org/elements/iron-ajax)_ ## Changes in 2.0 -* Promise polyfill is now a dev dependency and no longer shipped with `iron-ajax` -* New features introduced in #265 -TODO: remove flag in #265 when we can introduce breaking changes +* Promise polyfill is now a dev dependency and no longer shipped with `iron-ajax`. + + `iron-ajax` uses the `Promise` API, which is not yet supported in all browsers. + + The 1.x version of `iron-ajax` automatically loaded the promise polyfill. This + forced the application to include the polyfill, whether or not it was needed. + + When using `iron-ajax` 2.x with Polymer 1.x, you must provide your own Promise polyfill, + if needed. For example, you could use the promise polyfill by installing it in your project: + + bower install --save PolymerLabs/promise-polyfill#1 - 2 + + Then your app should include the promise polyfill before loading `iron-ajax`: + + + + You can use a different promise polyfill if you need a more fully-featured implementation of + Promise. + + For Polymer 2.x, you **do not need to provide your own Promise polyfill if you are using + the web components polyfills.** Because the web components v1 APIs depend on `Promise`, + a promise polyfill is loaded when needed by the v1 polyfills (`web-components-lite.js` or + `webcomponents-loader.js`). + +* New optional error information. + + The `generateRequest` method returns an `iron-request` element representing the + request, and the request element provides a `completes` property, which is a + promise that completes when the request either succeeds or fails. + + This version includes a new flag, `rejectWithRequest`, that modifies the error handling + of the `completes` promise. By default, when the promise is rejected (because the request + failed), the rejection callback only receives an `Error` object describing the failure. + + With `rejectWithRequest` set to true, the callback receives an object with two keys, `error`, + the error message, and `request`, the original request that the error is related to: + + let request = ironAjaxElement.generateRequest(); + request.completes.then(function(req) { + // succesful request, argument is iron-request element + ... + }, function(rejected) { + // failed request, argument is an object + let req = rejected.request; + let error = rejected.error; + ... + } + ) + + Because this change could break existing code, `rejectWithRequest` is false by default, + however, in the next major release, this option will be removed and the new behavior made + the default. + ## <iron-ajax> diff --git a/lib/iron-ajax/bower.json b/lib/iron-ajax/bower.json index 12c2a5de..30aa3083 100644 --- a/lib/iron-ajax/bower.json +++ b/lib/iron-ajax/bower.json @@ -1,6 +1,6 @@ { "name": "iron-ajax", - "version": "2.0.4", + "version": "2.0.6", "description": "Makes it easy to make ajax calls and parse the response", "private": true, "authors": [ diff --git a/lib/iron-ajax/hero.svg b/lib/iron-ajax/hero.svg new file mode 100644 index 00000000..6ee49f8d --- /dev/null +++ b/lib/iron-ajax/hero.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/iron-ajax/index.html b/lib/iron-ajax/index.html new file mode 100644 index 00000000..41aca5cb --- /dev/null +++ b/lib/iron-ajax/index.html @@ -0,0 +1,27 @@ + + + + + + iron-ajax + + + + + + + + + + + + + diff --git a/lib/iron-ajax/iron-ajax.html b/lib/iron-ajax/iron-ajax.html index aaee25ac..1a9dddf6 100644 --- a/lib/iron-ajax/iron-ajax.html +++ b/lib/iron-ajax/iron-ajax.html @@ -325,8 +325,10 @@ }, /** - * Changes the completes promise chain from generateRequest to reject with an object - * containing the error message as well as the request. + * Changes the [`completes`](iron-request#property-completes) promise chain + * from `generateRequest` to reject with an object + * containing the original request, as well an error message. + * If false (default), the promise rejects with an error message only. */ rejectWithRequest: { type: Boolean, diff --git a/lib/iron-ajax/iron-request.html b/lib/iron-ajax/iron-request.html index ca094be2..da976848 100644 --- a/lib/iron-ajax/iron-request.html +++ b/lib/iron-ajax/iron-request.html @@ -83,6 +83,11 @@ /** * A promise that resolves when the `xhr` response comes back, or rejects * if there is an error before the `xhr` completes. + * The resolve callback is called with the original request as an argument. + * By default, the reject callback is called with an `Error` as an argument. + * If `rejectWithRequest` is true, the reject callback is called with an + * object with two keys: `request`, the original request, and `error`, the + * error object. * * @type {Promise} */ @@ -168,10 +173,11 @@ }, /** - * Sends an HTTP request to the server and returns the XHR object. + * Sends an HTTP request to the server and returns a promise (see the `completes` + * property for details). * * The handling of the `body` parameter will vary based on the Content-Type - * header. See the docs for iron-ajax's `body` param for details. + * header. See the docs for iron-ajax's `body` property for details. * * @param {{ * url: string, @@ -181,16 +187,19 @@ * headers: (Object|undefined), * handleAs: (string|undefined), * jsonPrefix: (string|undefined), - * withCredentials: (boolean|undefined)}} options - - * url The url to which the request is sent. - * method The HTTP method to use, default is GET. - * async By default, all requests are sent asynchronously. To send synchronous requests, + * withCredentials: (boolean|undefined), + * timeout: (Number|undefined), + * rejectWithRequest: (boolean|undefined)}} options - + * - url The url to which the request is sent. + * - method The HTTP method to use, default is GET. + * - async By default, all requests are sent asynchronously. To send synchronous requests, * set to false. - * body The content for the request body for POST method. - * headers HTTP request headers. - * handleAs The response type. Default is 'text'. - * withCredentials Whether or not to send credentials on the request. Default is false. - * timeout: (Number|undefined) + * - body The content for the request body for POST method. + * - headers HTTP request headers. + * - handleAs The response type. Default is 'text'. + * - withCredentials Whether or not to send credentials on the request. Default is false. + * - timeout - Timeout for request, in milliseconds. + * - rejectWithRequest Set to true to include the request object with promise rejections. * @return {Promise} */ send: function(options) { @@ -258,10 +267,11 @@ }.bind(this)); this.url = options.url; + var isXHRAsync = options.async !== false; xhr.open( options.method || 'GET', options.url, - options.async !== false + isXHRAsync ); var acceptType = { @@ -291,10 +301,8 @@ ); }, this); - if (options.async !== false) { - if (options.async) { - xhr.timeout = options.timeout; - } + if (isXHRAsync) { + xhr.timeout = options.timeout; var handleAs = options.handleAs; diff --git a/lib/iron-ajax/test/iron-request.html b/lib/iron-ajax/test/iron-request.html index 6161bb5f..b07e033d 100644 --- a/lib/iron-ajax/test/iron-request.html +++ b/lib/iron-ajax/test/iron-request.html @@ -84,6 +84,12 @@ async: true, timeout: 100 }; + + asynchronousUndefSuccessfulRequestOptions = { + url: '/responds_to_get_with_json', + async: undefined, + timeout: 100 + }; }); teardown(function() { @@ -106,8 +112,8 @@ expect(request.xhr.timeout).to.be.eql(undefined); }); - test('timeout set if asynchronous', function() { - request.send(asynchronousSuccessfulRequestOptions); + test('timeout set if asynchronous is undefined', function() { + request.send(asynchronousUndefSuccessfulRequestOptions); expect(request.xhr.async).to.be.eql(true); expect(request.xhr.timeout).to.be.eql(100); diff --git a/lib/iron-autogrow-textarea/.bower.json b/lib/iron-autogrow-textarea/.bower.json index d7743b3a..2fe5490f 100644 --- a/lib/iron-autogrow-textarea/.bower.json +++ b/lib/iron-autogrow-textarea/.bower.json @@ -67,6 +67,6 @@ "commit": "1e6bcf4c585fa4a1b82acef2ba9aa6eab76de3b4" }, "_source": "https://github.com/PolymerElements/iron-autogrow-textarea.git", - "_target": "^2.0.0", + "_target": "^2.1.0", "_originalSource": "PolymerElements/iron-autogrow-textarea" } \ No newline at end of file diff --git a/lib/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md b/lib/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..0b70c29d --- /dev/null +++ b/lib/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-autogrow-textarea/CONTRIBUTING.md b/lib/iron-autogrow-textarea/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-autogrow-textarea/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-autogrow-textarea/hero.svg b/lib/iron-autogrow-textarea/hero.svg new file mode 100644 index 00000000..ef7e97e7 --- /dev/null +++ b/lib/iron-autogrow-textarea/hero.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/lib/iron-autogrow-textarea/index.html b/lib/iron-autogrow-textarea/index.html new file mode 100644 index 00000000..3be2964f --- /dev/null +++ b/lib/iron-autogrow-textarea/index.html @@ -0,0 +1,30 @@ + + + + + + + + + iron-autogrow-textarea + + + + + + + + + + + + + diff --git a/lib/iron-autogrow-textarea/test/basic.html b/lib/iron-autogrow-textarea/test/basic.html new file mode 100644 index 00000000..51f3abab --- /dev/null +++ b/lib/iron-autogrow-textarea/test/basic.html @@ -0,0 +1,190 @@ + + + + + + iron-autogrow-textarea tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/iron-behaviors/.github/ISSUE_TEMPLATE.md b/lib/iron-behaviors/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..1cc85c0c --- /dev/null +++ b/lib/iron-behaviors/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-behaviors/CONTRIBUTING.md b/lib/iron-behaviors/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-behaviors/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-behaviors/README.md b/lib/iron-behaviors/README.md new file mode 100644 index 00000000..0a0629ec --- /dev/null +++ b/lib/iron-behaviors/README.md @@ -0,0 +1,22 @@ + + + +[![Build status](https://travis-ci.org/PolymerElements/iron-behaviors.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-behaviors) + +_[Demo and API docs](https://elements.polymer-project.org/elements/iron-behaviors)_ + + + + + diff --git a/lib/iron-behaviors/index.html b/lib/iron-behaviors/index.html new file mode 100644 index 00000000..220deb00 --- /dev/null +++ b/lib/iron-behaviors/index.html @@ -0,0 +1,27 @@ + + + + + + Iron Behaviors + + + + + + + + + + + + + diff --git a/lib/iron-behaviors/iron-button-state.html b/lib/iron-behaviors/iron-button-state.html new file mode 100644 index 00000000..c5221b8e --- /dev/null +++ b/lib/iron-behaviors/iron-button-state.html @@ -0,0 +1,236 @@ + + + + + + + diff --git a/lib/iron-behaviors/test/active-state.html b/lib/iron-behaviors/test/active-state.html new file mode 100644 index 00000000..e1ed4791 --- /dev/null +++ b/lib/iron-behaviors/test/active-state.html @@ -0,0 +1,290 @@ + + + + + active-state + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/iron-behaviors/test/disabled-state.html b/lib/iron-behaviors/test/disabled-state.html new file mode 100644 index 00000000..b342cfd1 --- /dev/null +++ b/lib/iron-behaviors/test/disabled-state.html @@ -0,0 +1,82 @@ + + + + + disabled-state + + + + + + + + + + + + + + + + + + + diff --git a/lib/iron-checked-element-behavior/.github/ISSUE_TEMPLATE.md b/lib/iron-checked-element-behavior/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..2d520b47 --- /dev/null +++ b/lib/iron-checked-element-behavior/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-checked-element-behavior/CONTRIBUTING.md b/lib/iron-checked-element-behavior/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-checked-element-behavior/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-checked-element-behavior/demo/index.html b/lib/iron-checked-element-behavior/demo/index.html new file mode 100644 index 00000000..788a64f0 --- /dev/null +++ b/lib/iron-checked-element-behavior/demo/index.html @@ -0,0 +1,39 @@ + + + + + + + + + iron-checked-element-behavior demo + + + + + + +
+
+

Not required

+
+ +
+
+
+

Required

+
+ +
+
+
+ + diff --git a/lib/iron-checked-element-behavior/demo/simple-checkbox.html b/lib/iron-checked-element-behavior/demo/simple-checkbox.html new file mode 100644 index 00000000..24c5c125 --- /dev/null +++ b/lib/iron-checked-element-behavior/demo/simple-checkbox.html @@ -0,0 +1,65 @@ + + + + + + + + + + + diff --git a/lib/iron-checked-element-behavior/index.html b/lib/iron-checked-element-behavior/index.html new file mode 100644 index 00000000..1975dc5a --- /dev/null +++ b/lib/iron-checked-element-behavior/index.html @@ -0,0 +1,30 @@ + + + + + + + + + iron-checked-element-behavior + + + + + + + + + + + + + diff --git a/lib/iron-checked-element-behavior/iron-checked-element-behavior.html b/lib/iron-checked-element-behavior/iron-checked-element-behavior.html new file mode 100644 index 00000000..3ed2ffea --- /dev/null +++ b/lib/iron-checked-element-behavior/iron-checked-element-behavior.html @@ -0,0 +1,120 @@ + + + + + + + diff --git a/lib/iron-checked-element-behavior/test/simple-checkbox.html b/lib/iron-checked-element-behavior/test/simple-checkbox.html new file mode 100644 index 00000000..95228fae --- /dev/null +++ b/lib/iron-checked-element-behavior/test/simple-checkbox.html @@ -0,0 +1,26 @@ + + + + + + diff --git a/lib/iron-collapse/.github/ISSUE_TEMPLATE.md b/lib/iron-collapse/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..544b51e7 --- /dev/null +++ b/lib/iron-collapse/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-collapse/CONTRIBUTING.md b/lib/iron-collapse/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-collapse/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-collapse/hero.svg b/lib/iron-collapse/hero.svg new file mode 100644 index 00000000..408ae52e --- /dev/null +++ b/lib/iron-collapse/hero.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/iron-collapse/index.html b/lib/iron-collapse/index.html new file mode 100644 index 00000000..b5d20077 --- /dev/null +++ b/lib/iron-collapse/index.html @@ -0,0 +1,31 @@ + + + + + + + + + + iron-collapse + + + + + + + + + + + + + diff --git a/lib/iron-component-page/.bower.json b/lib/iron-component-page/.bower.json index ec274284..06d82239 100644 --- a/lib/iron-component-page/.bower.json +++ b/lib/iron-component-page/.bower.json @@ -64,6 +64,6 @@ "commit": "194e7f593837ac255e19aa41302bd333dee30f6f" }, "_source": "https://github.com/PolymerElements/iron-component-page.git", - "_target": "^3.0.0", + "_target": "^3.0.1", "_originalSource": "PolymerElements/iron-component-page" } \ No newline at end of file diff --git a/lib/iron-component-page/.github/ISSUE_TEMPLATE.md b/lib/iron-component-page/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..af977449 --- /dev/null +++ b/lib/iron-component-page/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-component-page/CONTRIBUTING.md b/lib/iron-component-page/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-component-page/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-demo-helpers/.github/ISSUE_TEMPLATE.md b/lib/iron-demo-helpers/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..ff99a8f7 --- /dev/null +++ b/lib/iron-demo-helpers/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-demo-helpers/CONTRIBUTING.md b/lib/iron-demo-helpers/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-demo-helpers/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-demo-helpers/index.html b/lib/iron-demo-helpers/index.html new file mode 100644 index 00000000..74ffffd6 --- /dev/null +++ b/lib/iron-demo-helpers/index.html @@ -0,0 +1,28 @@ + + + + + + + + + iron-demo-helpers + + + + + + + + + + + diff --git a/lib/iron-doc-viewer/.bower.json b/lib/iron-doc-viewer/.bower.json index 5947071f..40055690 100644 --- a/lib/iron-doc-viewer/.bower.json +++ b/lib/iron-doc-viewer/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-doc-viewer", - "version": "3.0.3", + "version": "3.0.4", "authors": [ "The Polymer Authors" ], @@ -56,13 +56,13 @@ "resolutions": { "webcomponentsjs": "^1.0.0" }, - "_release": "3.0.3", + "_release": "3.0.4", "_resolution": { "type": "version", - "tag": "v3.0.3", - "commit": "70bfdeb2b7ded6e541ff4a51f6266644253bd594" + "tag": "v3.0.4", + "commit": "17a2a1a8712bd3fb5d46089fd734964241deee22" }, "_source": "https://github.com/PolymerElements/iron-doc-viewer.git", - "_target": "^3.0.0", + "_target": "^3.0.4", "_originalSource": "PolymerElements/iron-doc-viewer" } \ No newline at end of file diff --git a/lib/iron-doc-viewer/CONTRIBUTING.md b/lib/iron-doc-viewer/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-doc-viewer/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-doc-viewer/iron-doc-demo.html b/lib/iron-doc-viewer/iron-doc-demo.html index 9be4fed8..1154cb39 100644 --- a/lib/iron-doc-viewer/iron-doc-demo.html +++ b/lib/iron-doc-viewer/iron-doc-demo.html @@ -21,6 +21,7 @@ iframe { flex-grow: 1; + height: 100%; border: none; } diff --git a/lib/iron-dropdown/.bower.json b/lib/iron-dropdown/.bower.json index 1f94ba86..7c11793c 100644 --- a/lib/iron-dropdown/.bower.json +++ b/lib/iron-dropdown/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-dropdown", - "version": "2.0.0", + "version": "2.1.0", "description": "An unstyled element that works similarly to a native browser select", "authors": [ "The Polymer Authors" @@ -21,7 +21,7 @@ "dependencies": { "polymer": "Polymer/polymer#1.9 - 2", "iron-behaviors": "PolymerElements/iron-behaviors#1 - 2", - "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#1 - 2", + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.2.0", "neon-animation": "PolymerElements/neon-animation#1 - 2" }, "devDependencies": { @@ -38,7 +38,7 @@ "dependencies": { "polymer": "Polymer/polymer#^1.9", "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", - "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.8.6", + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.2.0", "neon-animation": "PolymerElements/neon-animation#^1.0.0" }, "devDependencies": { @@ -59,13 +59,13 @@ "resolutions": { "webcomponentsjs": "^1.0.0" }, - "_release": "2.0.0", + "_release": "2.1.0", "_resolution": { "type": "version", - "tag": "v2.0.0", - "commit": "1f581967ae539bf6d94f08a29783e323992a33c8" + "tag": "v2.1.0", + "commit": "ec46c453782484d8fbee7b299a486a389699fdf2" }, "_source": "https://github.com/PolymerElements/iron-dropdown.git", - "_target": "^2.0.0", + "_target": "^2.1.0", "_originalSource": "PolymerElements/iron-dropdown" } \ No newline at end of file diff --git a/lib/iron-dropdown/.github/ISSUE_TEMPLATE.md b/lib/iron-dropdown/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..a1b71482 --- /dev/null +++ b/lib/iron-dropdown/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/lib/iron-dropdown/CONTRIBUTING.md b/lib/iron-dropdown/CONTRIBUTING.md new file mode 100644 index 00000000..093090d4 --- /dev/null +++ b/lib/iron-dropdown/CONTRIBUTING.md @@ -0,0 +1,77 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, fixes #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/lib/iron-dropdown/README.md b/lib/iron-dropdown/README.md index ac614b7e..06c02cc0 100644 --- a/lib/iron-dropdown/README.md +++ b/lib/iron-dropdown/README.md @@ -32,3 +32,4 @@ method is called on the element. ### Changes in 2.0 - Removed the private property `_focusTarget` which was deprecated. - `neon-animation 2.0` doesn't import the Web Animations polyfill, so you'll have to import it ([see example](demo/index.html)) +- Distribution moved from the `class="dropdown-content"` to `slot="dropdown-content"` diff --git a/lib/iron-dropdown/bower.json b/lib/iron-dropdown/bower.json index 6ecf2b24..cda69639 100644 --- a/lib/iron-dropdown/bower.json +++ b/lib/iron-dropdown/bower.json @@ -1,6 +1,6 @@ { "name": "iron-dropdown", - "version": "2.0.0", + "version": "2.1.0", "description": "An unstyled element that works similarly to a native browser select", "authors": [ "The Polymer Authors" @@ -21,7 +21,7 @@ "dependencies": { "polymer": "Polymer/polymer#1.9 - 2", "iron-behaviors": "PolymerElements/iron-behaviors#1 - 2", - "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#1 - 2", + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.2.0", "neon-animation": "PolymerElements/neon-animation#1 - 2" }, "devDependencies": { @@ -38,7 +38,7 @@ "dependencies": { "polymer": "Polymer/polymer#^1.9", "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", - "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.8.6", + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.2.0", "neon-animation": "PolymerElements/neon-animation#^1.0.0" }, "devDependencies": { diff --git a/lib/iron-dropdown/demo/grow-height-animation.html b/lib/iron-dropdown/demo/grow-height-animation.html new file mode 100644 index 00000000..e2fdc448 --- /dev/null +++ b/lib/iron-dropdown/demo/grow-height-animation.html @@ -0,0 +1,36 @@ + + + + + + diff --git a/lib/iron-dropdown/demo/index.html b/lib/iron-dropdown/demo/index.html index 4c0f5bcd..15f7480f 100644 --- a/lib/iron-dropdown/demo/index.html +++ b/lib/iron-dropdown/demo/index.html @@ -131,6 +131,26 @@

Alignment

+

Scroll actions

+ + + +

Content

+ + + + + + + +